@lordbex/thelounge 4.4.3-blowfish

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. package/.thelounge_home +1 -0
  2. package/LICENSE +22 -0
  3. package/README.md +95 -0
  4. package/client/index.html.tpl +69 -0
  5. package/dist/defaults/config.js +465 -0
  6. package/dist/package.json +174 -0
  7. package/dist/server/client.js +678 -0
  8. package/dist/server/clientManager.js +220 -0
  9. package/dist/server/command-line/index.js +85 -0
  10. package/dist/server/command-line/install.js +123 -0
  11. package/dist/server/command-line/outdated.js +30 -0
  12. package/dist/server/command-line/start.js +34 -0
  13. package/dist/server/command-line/storage.js +103 -0
  14. package/dist/server/command-line/uninstall.js +40 -0
  15. package/dist/server/command-line/upgrade.js +64 -0
  16. package/dist/server/command-line/users/add.js +67 -0
  17. package/dist/server/command-line/users/edit.js +39 -0
  18. package/dist/server/command-line/users/index.js +17 -0
  19. package/dist/server/command-line/users/list.js +53 -0
  20. package/dist/server/command-line/users/remove.js +37 -0
  21. package/dist/server/command-line/users/reset.js +64 -0
  22. package/dist/server/command-line/utils.js +177 -0
  23. package/dist/server/config.js +138 -0
  24. package/dist/server/helper.js +161 -0
  25. package/dist/server/identification.js +139 -0
  26. package/dist/server/index.js +3 -0
  27. package/dist/server/log.js +35 -0
  28. package/dist/server/models/chan.js +275 -0
  29. package/dist/server/models/msg.js +92 -0
  30. package/dist/server/models/network.js +546 -0
  31. package/dist/server/models/prefix.js +31 -0
  32. package/dist/server/models/user.js +42 -0
  33. package/dist/server/plugins/auth/ldap.js +188 -0
  34. package/dist/server/plugins/auth/local.js +41 -0
  35. package/dist/server/plugins/auth.js +70 -0
  36. package/dist/server/plugins/changelog.js +103 -0
  37. package/dist/server/plugins/clientCertificate.js +115 -0
  38. package/dist/server/plugins/dev-server.js +33 -0
  39. package/dist/server/plugins/inputs/action.js +54 -0
  40. package/dist/server/plugins/inputs/away.js +20 -0
  41. package/dist/server/plugins/inputs/ban.js +45 -0
  42. package/dist/server/plugins/inputs/blow.js +44 -0
  43. package/dist/server/plugins/inputs/connect.js +41 -0
  44. package/dist/server/plugins/inputs/ctcp.js +29 -0
  45. package/dist/server/plugins/inputs/disconnect.js +15 -0
  46. package/dist/server/plugins/inputs/ignore.js +74 -0
  47. package/dist/server/plugins/inputs/ignorelist.js +50 -0
  48. package/dist/server/plugins/inputs/index.js +105 -0
  49. package/dist/server/plugins/inputs/invite.js +31 -0
  50. package/dist/server/plugins/inputs/kick.js +26 -0
  51. package/dist/server/plugins/inputs/kill.js +13 -0
  52. package/dist/server/plugins/inputs/list.js +12 -0
  53. package/dist/server/plugins/inputs/mode.js +55 -0
  54. package/dist/server/plugins/inputs/msg.js +106 -0
  55. package/dist/server/plugins/inputs/mute.js +56 -0
  56. package/dist/server/plugins/inputs/nick.js +55 -0
  57. package/dist/server/plugins/inputs/notice.js +42 -0
  58. package/dist/server/plugins/inputs/part.js +46 -0
  59. package/dist/server/plugins/inputs/quit.js +27 -0
  60. package/dist/server/plugins/inputs/raw.js +13 -0
  61. package/dist/server/plugins/inputs/rejoin.js +25 -0
  62. package/dist/server/plugins/inputs/topic.js +24 -0
  63. package/dist/server/plugins/inputs/whois.js +19 -0
  64. package/dist/server/plugins/irc-events/away.js +59 -0
  65. package/dist/server/plugins/irc-events/cap.js +62 -0
  66. package/dist/server/plugins/irc-events/chghost.js +29 -0
  67. package/dist/server/plugins/irc-events/connection.js +152 -0
  68. package/dist/server/plugins/irc-events/ctcp.js +72 -0
  69. package/dist/server/plugins/irc-events/error.js +80 -0
  70. package/dist/server/plugins/irc-events/help.js +21 -0
  71. package/dist/server/plugins/irc-events/info.js +21 -0
  72. package/dist/server/plugins/irc-events/invite.js +27 -0
  73. package/dist/server/plugins/irc-events/join.js +53 -0
  74. package/dist/server/plugins/irc-events/kick.js +39 -0
  75. package/dist/server/plugins/irc-events/link.js +442 -0
  76. package/dist/server/plugins/irc-events/list.js +47 -0
  77. package/dist/server/plugins/irc-events/message.js +187 -0
  78. package/dist/server/plugins/irc-events/mode.js +124 -0
  79. package/dist/server/plugins/irc-events/modelist.js +67 -0
  80. package/dist/server/plugins/irc-events/motd.js +29 -0
  81. package/dist/server/plugins/irc-events/names.js +21 -0
  82. package/dist/server/plugins/irc-events/nick.js +45 -0
  83. package/dist/server/plugins/irc-events/part.js +35 -0
  84. package/dist/server/plugins/irc-events/quit.js +32 -0
  85. package/dist/server/plugins/irc-events/sasl.js +26 -0
  86. package/dist/server/plugins/irc-events/topic.js +42 -0
  87. package/dist/server/plugins/irc-events/unhandled.js +31 -0
  88. package/dist/server/plugins/irc-events/welcome.js +22 -0
  89. package/dist/server/plugins/irc-events/whois.js +57 -0
  90. package/dist/server/plugins/messageStorage/sqlite.js +454 -0
  91. package/dist/server/plugins/messageStorage/text.js +124 -0
  92. package/dist/server/plugins/packages/index.js +200 -0
  93. package/dist/server/plugins/packages/publicClient.js +66 -0
  94. package/dist/server/plugins/packages/themes.js +61 -0
  95. package/dist/server/plugins/storage.js +88 -0
  96. package/dist/server/plugins/sts.js +85 -0
  97. package/dist/server/plugins/uploader.js +267 -0
  98. package/dist/server/plugins/webpush.js +99 -0
  99. package/dist/server/server.js +857 -0
  100. package/dist/server/storageCleaner.js +131 -0
  101. package/dist/server/utils/fish.js +432 -0
  102. package/dist/shared/irc.js +19 -0
  103. package/dist/shared/linkify.js +81 -0
  104. package/dist/shared/types/chan.js +22 -0
  105. package/dist/shared/types/changelog.js +2 -0
  106. package/dist/shared/types/config.js +2 -0
  107. package/dist/shared/types/mention.js +2 -0
  108. package/dist/shared/types/msg.js +34 -0
  109. package/dist/shared/types/network.js +2 -0
  110. package/dist/shared/types/storage.js +2 -0
  111. package/dist/shared/types/user.js +2 -0
  112. package/dist/webpack.config.js +224 -0
  113. package/index.js +38 -0
  114. package/package.json +174 -0
  115. package/public/audio/pop.wav +0 -0
  116. package/public/css/style.css +12 -0
  117. package/public/css/style.css.map +1 -0
  118. package/public/favicon.ico +0 -0
  119. package/public/fonts/fa-solid-900.woff +0 -0
  120. package/public/fonts/fa-solid-900.woff2 +0 -0
  121. package/public/img/favicon-alerted.ico +0 -0
  122. package/public/img/icon-alerted-black-transparent-bg-72x72px.png +0 -0
  123. package/public/img/icon-alerted-grey-bg-192x192px.png +0 -0
  124. package/public/img/icon-black-transparent-bg.svg +1 -0
  125. package/public/img/logo-grey-bg-120x120px.png +0 -0
  126. package/public/img/logo-grey-bg-152x152px.png +0 -0
  127. package/public/img/logo-grey-bg-167x167px.png +0 -0
  128. package/public/img/logo-grey-bg-180x180px.png +0 -0
  129. package/public/img/logo-grey-bg-192x192px.png +0 -0
  130. package/public/img/logo-grey-bg-512x512px.png +0 -0
  131. package/public/img/logo-grey-bg.svg +1 -0
  132. package/public/img/logo-horizontal-transparent-bg-inverted.svg +1 -0
  133. package/public/img/logo-horizontal-transparent-bg.svg +1 -0
  134. package/public/img/logo-transparent-bg-inverted.svg +1 -0
  135. package/public/img/logo-transparent-bg.svg +1 -0
  136. package/public/img/logo-vertical-transparent-bg-inverted.svg +1 -0
  137. package/public/img/logo-vertical-transparent-bg.svg +1 -0
  138. package/public/js/bundle.js +2 -0
  139. package/public/js/bundle.js.map +1 -0
  140. package/public/js/bundle.vendor.js +3 -0
  141. package/public/js/bundle.vendor.js.LICENSE.txt +18 -0
  142. package/public/js/bundle.vendor.js.map +1 -0
  143. package/public/js/loading-error-handlers.js +1 -0
  144. package/public/robots.txt +2 -0
  145. package/public/service-worker.js +1 -0
  146. package/public/thelounge.webmanifest +53 -0
  147. package/public/themes/default.css +35 -0
  148. package/public/themes/morning.css +183 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"js/bundle.vendor.js","mappings":";uHACAA,OAAOC,eAAeC,EAAS,aAAc,CAAEC,OAAO,IACtDD,EAAQE,eAAY,EACpB,MAAMC,EAAkB,EAAQ,KAC1BC,EAAa,EAAQ,MAC3B,MAAMF,UAAkBC,EAAgBE,aACpC,WAAAC,CAAYC,GACRC,QACA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,OAAS++F,GAGpD,GADAxgG,EAAGuM,SACEhM,SAASogG,YAAY,cAAc,EAAOD,GAAQ,CAGnD1gG,EAAG9B,MAAQ4oB,EAEX,MAAM1lB,EAAQb,SAASoL,YAAY,SACnCvK,EAAM26B,UAAU,SAAS,GAAM,GAC/B/7B,EAAGyM,cAAcrL,EACrB,CAIA,OAFApB,EAAGygG,kBAAkBL,EAAa3+F,OAAQ2+F,EAAa3+F,QACvDw6E,EAAc1vE,QACPvM,CACX,CAEA,SAAS4gG,EAAW5gG,EAAI61E,EAAQ3qC,GAC5B,MAAM21D,EAAU7gG,EAAGoN,aACbgzF,EAAepgG,EAAG9B,MAAMqd,OAAO,EAAGvb,EAAGmN,gBAAkB0oE,EACvDwqB,EAAergG,EAAG9B,MAAMmP,UAAUrN,EAAGmN,eAAgB0zF,IAAY31D,GAAS,IAAMlrC,EAAG9B,MAAMqd,OAAOslF,GAGtG,OAFAr0F,EAAOxM,EAAIogG,EAAcC,GACzBrgG,EAAGoN,aAAeyzF,EAAUhrB,EAAOp0E,OAC5BzB,CACX","sources":["webpack://@lordbex/thelounge/./node_modules/@textcomplete/core/dist/Completer.js","webpack://@lordbex/thelounge/./node_modules/@textcomplete/core/dist/Dropdown.js","webpack://@lordbex/thelounge/./node_modules/@textcomplete/core/dist/Editor.js","webpack://@lordbex/thelounge/./node_modules/@textcomplete/core/dist/SearchResult.js","webpack://@lordbex/thelounge/./node_modules/@textcomplete/core/dist/Strategy.js","webpack://@lordbex/thelounge/./node_modules/@textcomplete/core/dist/Textcomplete.js","webpack://@lordbex/thelounge/./node_modules/@textcomplete/core/dist/index.js","webpack://@lordbex/thelounge/./node_modules/@textcomplete/core/dist/utils.js","webpack://@lordbex/thelounge/./node_modules/@textcomplete/textarea/dist/TextareaEditor.js","webpack://@lordbex/thelounge/./node_modules/@textcomplete/textarea/dist/index.js","webpack://@lordbex/thelounge/./node_modules/@textcomplete/utils/dist/calculateElementOffset.js","webpack://@lordbex/thelounge/./node_modules/@textcomplete/utils/dist/getLineHeightPx.js","webpack://@lordbex/thelounge/./node_modules/@textcomplete/utils/dist/index.js","webpack://@lordbex/thelounge/./node_modules/@textcomplete/utils/dist/isSafari.js","webpack://@lordbex/thelounge/./node_modules/@vue/shared/dist/shared.esm-bundler.js","webpack://@lordbex/thelounge/./node_modules/dayjs/dayjs.min.js","webpack://@lordbex/thelounge/./node_modules/dayjs/plugin/calendar.js","webpack://@lordbex/thelounge/./node_modules/dayjs/plugin/relativeTime.js","webpack://@lordbex/thelounge/./node_modules/eventemitter3/index.js","webpack://@lordbex/thelounge/./node_modules/fuzzy/lib/fuzzy.js","webpack://@lordbex/thelounge/./node_modules/linkify-it/index.js","webpack://@lordbex/thelounge/./node_modules/linkify-it/lib/re.js","webpack://@lordbex/thelounge/./node_modules/lodash/_Symbol.js","webpack://@lordbex/thelounge/./node_modules/lodash/_arrayMap.js","webpack://@lordbex/thelounge/./node_modules/lodash/_baseGetTag.js","webpack://@lordbex/thelounge/./node_modules/lodash/_baseToString.js","webpack://@lordbex/thelounge/./node_modules/lodash/_baseTrim.js","webpack://@lordbex/thelounge/./node_modules/lodash/_freeGlobal.js","webpack://@lordbex/thelounge/./node_modules/lodash/_getRawTag.js","webpack://@lordbex/thelounge/./node_modules/lodash/_objectToString.js","webpack://@lordbex/thelounge/./node_modules/lodash/_root.js","webpack://@lordbex/thelounge/./node_modules/lodash/_trimmedEndIndex.js","webpack://@lordbex/thelounge/./node_modules/lodash/debounce.js","webpack://@lordbex/thelounge/./node_modules/lodash/escapeRegExp.js","webpack://@lordbex/thelounge/./node_modules/lodash/isArray.js","webpack://@lordbex/thelounge/./node_modules/lodash/isObject.js","webpack://@lordbex/thelounge/./node_modules/lodash/isObjectLike.js","webpack://@lordbex/thelounge/./node_modules/lodash/isSymbol.js","webpack://@lordbex/thelounge/./node_modules/lodash/now.js","webpack://@lordbex/thelounge/./node_modules/lodash/throttle.js","webpack://@lordbex/thelounge/./node_modules/lodash/toNumber.js","webpack://@lordbex/thelounge/./node_modules/lodash/toString.js","webpack://@lordbex/thelounge/./node_modules/mousetrap/mousetrap.js","webpack://@lordbex/thelounge/./node_modules/sortablejs/modular/sortable.esm.js","webpack://@lordbex/thelounge/./node_modules/textarea-caret/index.js","webpack://@lordbex/thelounge/./node_modules/uc.micro/categories/Cc/regex.js","webpack://@lordbex/thelounge/./node_modules/uc.micro/categories/P/regex.js","webpack://@lordbex/thelounge/./node_modules/uc.micro/categories/Z/regex.js","webpack://@lordbex/thelounge/./node_modules/uc.micro/properties/Any/regex.js","webpack://@lordbex/thelounge/./node_modules/vue-loader/dist/exportHelper.js","webpack://@lordbex/thelounge/./node_modules/vue-router/dist/vue-router.esm-bundler.js","webpack://@lordbex/thelounge/./node_modules/vue/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js","webpack://@lordbex/thelounge/./node_modules/vue/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js","webpack://@lordbex/thelounge/./node_modules/vue/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js","webpack://@lordbex/thelounge/./node_modules/@vue/devtools-api/lib/esm/env.js","webpack://@lordbex/thelounge/./node_modules/@vue/devtools-api/lib/esm/const.js","webpack://@lordbex/thelounge/./node_modules/@vue/devtools-api/lib/esm/time.js","webpack://@lordbex/thelounge/./node_modules/@vue/devtools-api/lib/esm/proxy.js","webpack://@lordbex/thelounge/./node_modules/vuex/dist/vuex.esm-bundler.js","webpack://@lordbex/thelounge/./node_modules/@vue/devtools-api/lib/esm/index.js","webpack://@lordbex/thelounge/./node_modules/emoji-regex/index.mjs","webpack://@lordbex/thelounge/./node_modules/engine.io-parser/build/esm/commons.js","webpack://@lordbex/thelounge/./node_modules/engine.io-parser/build/esm/encodePacket.browser.js","webpack://@lordbex/thelounge/./node_modules/engine.io-parser/build/esm/contrib/base64-arraybuffer.js","webpack://@lordbex/thelounge/./node_modules/engine.io-parser/build/esm/decodePacket.browser.js","webpack://@lordbex/thelounge/./node_modules/engine.io-parser/build/esm/index.js","webpack://@lordbex/thelounge/./node_modules/@socket.io/component-emitter/index.mjs","webpack://@lordbex/thelounge/./node_modules/engine.io-client/build/esm/globalThis.browser.js","webpack://@lordbex/thelounge/./node_modules/engine.io-client/build/esm/util.js","webpack://@lordbex/thelounge/./node_modules/engine.io-client/build/esm/transport.js","webpack://@lordbex/thelounge/./node_modules/engine.io-client/build/esm/contrib/yeast.js","webpack://@lordbex/thelounge/./node_modules/engine.io-client/build/esm/contrib/parseqs.js","webpack://@lordbex/thelounge/./node_modules/engine.io-client/build/esm/contrib/has-cors.js","webpack://@lordbex/thelounge/./node_modules/engine.io-client/build/esm/transports/xmlhttprequest.browser.js","webpack://@lordbex/thelounge/./node_modules/engine.io-client/build/esm/transports/polling.js","webpack://@lordbex/thelounge/./node_modules/engine.io-client/build/esm/transports/websocket-constructor.browser.js","webpack://@lordbex/thelounge/./node_modules/engine.io-client/build/esm/transports/websocket.js","webpack://@lordbex/thelounge/./node_modules/engine.io-client/build/esm/transports/index.js","webpack://@lordbex/thelounge/./node_modules/engine.io-client/build/esm/contrib/parseuri.js","webpack://@lordbex/thelounge/./node_modules/engine.io-client/build/esm/socket.js","webpack://@lordbex/thelounge/./node_modules/engine.io-client/build/esm/index.js","webpack://@lordbex/thelounge/./node_modules/socket.io-parser/build/esm/is-binary.js","webpack://@lordbex/thelounge/./node_modules/socket.io-parser/build/esm/binary.js","webpack://@lordbex/thelounge/./node_modules/socket.io-parser/build/esm/index.js","webpack://@lordbex/thelounge/./node_modules/socket.io-client/build/esm/on.js","webpack://@lordbex/thelounge/./node_modules/socket.io-client/build/esm/socket.js","webpack://@lordbex/thelounge/./node_modules/socket.io-client/build/esm/contrib/backo2.js","webpack://@lordbex/thelounge/./node_modules/socket.io-client/build/esm/manager.js","webpack://@lordbex/thelounge/./node_modules/socket.io-client/build/esm/index.js","webpack://@lordbex/thelounge/./node_modules/socket.io-client/build/esm/url.js","webpack://@lordbex/thelounge/./node_modules/undate/dist/index.mjs"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Completer = void 0;\nconst eventemitter3_1 = require(\"eventemitter3\");\nconst Strategy_1 = require(\"./Strategy\");\nclass Completer extends eventemitter3_1.EventEmitter {\n constructor(strategyPropsList) {\n super();\n this.handleQueryResult = (searchResults) => {\n this.emit(\"hit\", { searchResults });\n };\n this.strategies = strategyPropsList.map((p) => new Strategy_1.Strategy(p));\n }\n destroy() {\n this.strategies.forEach((s) => s.destroy());\n return this;\n }\n run(beforeCursor) {\n for (const strategy of this.strategies) {\n const executed = strategy.execute(beforeCursor, this.handleQueryResult);\n if (executed)\n return;\n }\n this.handleQueryResult([]);\n }\n}\nexports.Completer = Completer;\n//# sourceMappingURL=Completer.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Dropdown = exports.DEFAULT_DROPDOWN_ITEM_ACTIVE_CLASS_NAME = exports.DEFAULT_DROPDOWN_ITEM_CLASS_NAME = exports.DEFAULT_DROPDOWN_CLASS_NAME = exports.DEFAULT_DROPDOWN_PLACEMENT = exports.DEFAULT_DROPDOWN_MAX_COUNT = void 0;\nconst eventemitter3_1 = require(\"eventemitter3\");\nconst utils_1 = require(\"./utils\");\n// Default constants for Dropdown\nexports.DEFAULT_DROPDOWN_MAX_COUNT = 10;\nexports.DEFAULT_DROPDOWN_PLACEMENT = \"auto\";\nexports.DEFAULT_DROPDOWN_CLASS_NAME = \"dropdown-menu textcomplete-dropdown\";\n// Default constants for DropdownItem\nexports.DEFAULT_DROPDOWN_ITEM_CLASS_NAME = \"textcomplete-item\";\nexports.DEFAULT_DROPDOWN_ITEM_ACTIVE_CLASS_NAME = `${exports.DEFAULT_DROPDOWN_ITEM_CLASS_NAME} active`;\nclass Dropdown extends eventemitter3_1.EventEmitter {\n constructor(el, option) {\n super();\n this.el = el;\n this.option = option;\n this.shown = false;\n this.items = [];\n this.activeIndex = null;\n }\n static create(option) {\n const ul = document.createElement(\"ul\");\n ul.className = option.className || exports.DEFAULT_DROPDOWN_CLASS_NAME;\n Object.assign(ul.style, {\n display: \"none\",\n position: \"absolute\",\n zIndex: \"1000\",\n }, option.style);\n const parent = option.parent || document.body;\n parent === null || parent === void 0 ? void 0 : parent.appendChild(ul);\n return new Dropdown(ul, option);\n }\n /**\n * Render the given search results. Previous results are cleared.\n *\n * @emits render\n * @emits rendered\n */\n render(searchResults, cursorOffset) {\n const event = (0, utils_1.createCustomEvent)(\"render\", { cancelable: true });\n this.emit(\"render\", event);\n if (event.defaultPrevented)\n return this;\n this.clear();\n if (searchResults.length === 0)\n return this.hide();\n this.items = searchResults\n .slice(0, this.option.maxCount || exports.DEFAULT_DROPDOWN_MAX_COUNT)\n .map((r, index) => { var _a; return new DropdownItem(this, index, r, ((_a = this.option) === null || _a === void 0 ? void 0 : _a.item) || {}); });\n this.setStrategyId(searchResults[0])\n .renderEdge(searchResults, \"header\")\n .renderItems()\n .renderEdge(searchResults, \"footer\")\n .show()\n .setOffset(cursorOffset)\n .activate(0);\n this.emit(\"rendered\", (0, utils_1.createCustomEvent)(\"rendered\"));\n return this;\n }\n destroy() {\n var _a;\n this.clear();\n (_a = this.el.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(this.el);\n return this;\n }\n /**\n * Select the given item\n *\n * @emits select\n * @emits selected\n */\n select(item) {\n const detail = { searchResult: item.searchResult };\n const event = (0, utils_1.createCustomEvent)(\"select\", { cancelable: true, detail });\n this.emit(\"select\", event);\n if (event.defaultPrevented)\n return this;\n this.hide();\n this.emit(\"selected\", (0, utils_1.createCustomEvent)(\"selected\", { detail }));\n return this;\n }\n /**\n * Show the dropdown element\n *\n * @emits show\n * @emits shown\n */\n show() {\n if (!this.shown) {\n const event = (0, utils_1.createCustomEvent)(\"show\", { cancelable: true });\n this.emit(\"show\", event);\n if (event.defaultPrevented)\n return this;\n this.el.style.display = \"block\";\n this.shown = true;\n this.emit(\"shown\", (0, utils_1.createCustomEvent)(\"shown\"));\n }\n return this;\n }\n /**\n * Hide the dropdown element\n *\n * @emits hide\n * @emits hidden\n */\n hide() {\n if (this.shown) {\n const event = (0, utils_1.createCustomEvent)(\"hide\", { cancelable: true });\n this.emit(\"hide\", event);\n if (event.defaultPrevented)\n return this;\n this.el.style.display = \"none\";\n this.shown = false;\n this.clear();\n this.emit(\"hidden\", (0, utils_1.createCustomEvent)(\"hidden\"));\n }\n return this;\n }\n /** Clear search results */\n clear() {\n this.items.forEach((i) => i.destroy());\n this.items = [];\n this.el.innerHTML = \"\";\n this.activeIndex = null;\n return this;\n }\n up(e) {\n return this.shown ? this.moveActiveItem(\"prev\", e) : this;\n }\n down(e) {\n return this.shown ? this.moveActiveItem(\"next\", e) : this;\n }\n moveActiveItem(direction, e) {\n if (this.activeIndex != null) {\n const activeIndex = direction === \"next\"\n ? this.getNextActiveIndex()\n : this.getPrevActiveIndex();\n if (activeIndex != null) {\n this.activate(activeIndex);\n e.preventDefault();\n }\n }\n return this;\n }\n activate(index) {\n if (this.activeIndex !== index) {\n if (this.activeIndex != null) {\n this.items[this.activeIndex].deactivate();\n }\n this.activeIndex = index;\n this.items[index].activate();\n }\n return this;\n }\n isShown() {\n return this.shown;\n }\n getActiveItem() {\n return this.activeIndex != null ? this.items[this.activeIndex] : null;\n }\n setOffset(cursorOffset) {\n const doc = document.documentElement;\n if (doc) {\n const elementWidth = this.el.offsetWidth;\n if (cursorOffset.left) {\n const browserWidth = this.option.dynamicWidth\n ? doc.scrollWidth\n : doc.clientWidth;\n if (cursorOffset.left + elementWidth > browserWidth) {\n cursorOffset.left = browserWidth - elementWidth;\n }\n this.el.style.left = `${cursorOffset.left}px`;\n }\n else if (cursorOffset.right) {\n if (cursorOffset.right - elementWidth < 0) {\n cursorOffset.right = 0;\n }\n this.el.style.right = `${cursorOffset.right}px`;\n }\n let forceTop = false;\n const placement = this.option.placement || exports.DEFAULT_DROPDOWN_PLACEMENT;\n if (placement === \"auto\") {\n const dropdownHeight = this.items.length * cursorOffset.lineHeight;\n forceTop =\n cursorOffset.clientTop != null &&\n cursorOffset.clientTop + dropdownHeight > doc.clientHeight;\n }\n if (placement === \"top\" || forceTop) {\n this.el.style.bottom = `${doc.clientHeight - cursorOffset.top + cursorOffset.lineHeight}px`;\n this.el.style.top = \"auto\";\n }\n else {\n this.el.style.top = `${cursorOffset.top}px`;\n this.el.style.bottom = \"auto\";\n }\n }\n return this;\n }\n getNextActiveIndex() {\n if (this.activeIndex == null)\n throw new Error();\n return this.activeIndex < this.items.length - 1\n ? this.activeIndex + 1\n : this.option.rotate\n ? 0\n : null;\n }\n getPrevActiveIndex() {\n if (this.activeIndex == null)\n throw new Error();\n return this.activeIndex !== 0\n ? this.activeIndex - 1\n : this.option.rotate\n ? this.items.length - 1\n : null;\n }\n renderItems() {\n const fragment = document.createDocumentFragment();\n for (const item of this.items) {\n fragment.appendChild(item.el);\n }\n this.el.appendChild(fragment);\n return this;\n }\n setStrategyId(searchResult) {\n const id = searchResult.getStrategyId();\n if (id)\n this.el.dataset.strategy = id;\n return this;\n }\n renderEdge(searchResults, type) {\n const option = this.option[type];\n const li = document.createElement(\"li\");\n li.className = `textcomplete-${type}`;\n li.innerHTML =\n typeof option === \"function\"\n ? option(searchResults.map((s) => s.data))\n : option || \"\";\n this.el.appendChild(li);\n return this;\n }\n}\nexports.Dropdown = Dropdown;\nclass DropdownItem {\n constructor(dropdown, index, searchResult, props) {\n this.dropdown = dropdown;\n this.index = index;\n this.searchResult = searchResult;\n this.props = props;\n this.active = false;\n this.onClick = (e) => {\n e.preventDefault();\n this.dropdown.select(this);\n };\n this.className = this.props.className || exports.DEFAULT_DROPDOWN_ITEM_CLASS_NAME;\n this.activeClassName =\n this.props.activeClassName || exports.DEFAULT_DROPDOWN_ITEM_ACTIVE_CLASS_NAME;\n const li = document.createElement(\"li\");\n li.className = this.active ? this.activeClassName : this.className;\n const span = document.createElement(\"span\");\n span.tabIndex = -1;\n span.innerHTML = this.searchResult.render();\n li.appendChild(span);\n li.addEventListener(\"mousedown\", this.onClick);\n li.addEventListener(\"touchstart\", this.onClick);\n this.el = li;\n }\n destroy() {\n var _a;\n const li = this.el;\n (_a = li.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(li);\n li.removeEventListener(\"mousedown\", this.onClick, false);\n li.removeEventListener(\"touchstart\", this.onClick, false);\n return this;\n }\n activate() {\n if (!this.active) {\n this.active = true;\n this.el.className = this.activeClassName;\n this.dropdown.el.scrollTop = this.el.offsetTop;\n }\n return this;\n }\n deactivate() {\n if (this.active) {\n this.active = false;\n this.el.className = this.className;\n }\n return this;\n }\n}\n//# sourceMappingURL=Dropdown.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Editor = void 0;\nconst eventemitter3_1 = require(\"eventemitter3\");\nconst utils_1 = require(\"./utils\");\nclass Editor extends eventemitter3_1.EventEmitter {\n /**\n * Finalize the editor object.\n *\n * It is called when associated textcomplete object is destroyed.\n */\n destroy() {\n return this;\n }\n /**\n * It is called when a search result is selected by a user.\n */\n applySearchResult(_searchResult) {\n throw new Error(\"Not implemented.\");\n }\n /**\n * The input cursor's absolute coordinates from the window's left\n * top corner.\n */\n getCursorOffset() {\n throw new Error(\"Not implemented.\");\n }\n /**\n * Editor string value from head to the cursor.\n * Returns null if selection type is range not cursor.\n */\n getBeforeCursor() {\n throw new Error(\"Not implemented.\");\n }\n /**\n * Emit a move event, which moves active dropdown element.\n * Child class must call this method at proper timing with proper parameter.\n *\n * @see {@link Textarea} for live example.\n */\n emitMoveEvent(code) {\n const moveEvent = (0, utils_1.createCustomEvent)(\"move\", {\n cancelable: true,\n detail: {\n code: code,\n },\n });\n this.emit(\"move\", moveEvent);\n return moveEvent;\n }\n /**\n * Emit a enter event, which selects current search result.\n * Child class must call this method at proper timing.\n *\n * @see {@link Textarea} for live example.\n */\n emitEnterEvent() {\n const enterEvent = (0, utils_1.createCustomEvent)(\"enter\", { cancelable: true });\n this.emit(\"enter\", enterEvent);\n return enterEvent;\n }\n /**\n * Emit a change event, which triggers auto completion.\n * Child class must call this method at proper timing.\n *\n * @see {@link Textarea} for live example.\n */\n emitChangeEvent() {\n const changeEvent = (0, utils_1.createCustomEvent)(\"change\", {\n detail: {\n beforeCursor: this.getBeforeCursor(),\n },\n });\n this.emit(\"change\", changeEvent);\n return changeEvent;\n }\n /**\n * Emit a esc event, which hides dropdown element.\n * Child class must call this method at proper timing.\n *\n * @see {@link Textarea} for live example.\n */\n emitEscEvent() {\n const escEvent = (0, utils_1.createCustomEvent)(\"esc\", { cancelable: true });\n this.emit(\"esc\", escEvent);\n return escEvent;\n }\n /**\n * Helper method for parsing KeyboardEvent.\n *\n * @see {@link Textarea} for live example.\n */\n getCode(e) {\n return e.keyCode === 9 // tab\n ? \"ENTER\"\n : e.keyCode === 13 // enter\n ? \"ENTER\"\n : e.keyCode === 27 // esc\n ? \"ESC\"\n : e.keyCode === 38 // up\n ? \"UP\"\n : e.keyCode === 40 // down\n ? \"DOWN\"\n : e.keyCode === 78 && e.ctrlKey // ctrl-n\n ? \"DOWN\"\n : e.keyCode === 80 && e.ctrlKey // ctrl-p\n ? \"UP\"\n : \"OTHER\";\n }\n}\nexports.Editor = Editor;\n//# sourceMappingURL=Editor.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SearchResult = void 0;\nconst MAIN = /\\$&/g;\nconst PLACE = /\\$(\\d)/g;\nclass SearchResult {\n constructor(data, term, strategy) {\n this.data = data;\n this.term = term;\n this.strategy = strategy;\n }\n getReplacementData(beforeCursor) {\n let result = this.strategy.replace(this.data);\n if (result == null)\n return null;\n let afterCursor = \"\";\n if (Array.isArray(result)) {\n afterCursor = result[1];\n result = result[0];\n }\n const match = this.strategy.match(beforeCursor);\n if (match == null || match.index == null)\n return null;\n const replacement = result\n .replace(MAIN, match[0])\n .replace(PLACE, (_, p) => match[parseInt(p)]);\n return {\n start: match.index,\n end: match.index + match[0].length,\n beforeCursor: replacement,\n afterCursor: afterCursor,\n };\n }\n replace(beforeCursor, afterCursor) {\n const replacement = this.getReplacementData(beforeCursor);\n if (replacement === null)\n return;\n afterCursor = replacement.afterCursor + afterCursor;\n return [\n [\n beforeCursor.slice(0, replacement.start),\n replacement.beforeCursor,\n beforeCursor.slice(replacement.end),\n ].join(\"\"),\n afterCursor,\n ];\n }\n render() {\n return this.strategy.renderTemplate(this.data, this.term);\n }\n getStrategyId() {\n return this.strategy.getId();\n }\n}\nexports.SearchResult = SearchResult;\n//# sourceMappingURL=SearchResult.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Strategy = exports.DEFAULT_INDEX = void 0;\nconst SearchResult_1 = require(\"./SearchResult\");\nexports.DEFAULT_INDEX = 1;\nclass Strategy {\n constructor(props) {\n this.props = props;\n this.cache = {};\n }\n destroy() {\n this.cache = {};\n return this;\n }\n replace(data) {\n return this.props.replace(data);\n }\n execute(beforeCursor, callback) {\n var _a;\n const match = this.matchWithContext(beforeCursor);\n if (!match)\n return false;\n const term = match[(_a = this.props.index) !== null && _a !== void 0 ? _a : exports.DEFAULT_INDEX];\n this.search(term, (results) => {\n callback(results.map((result) => new SearchResult_1.SearchResult(result, term, this)));\n }, match);\n return true;\n }\n renderTemplate(data, term) {\n if (this.props.template) {\n return this.props.template(data, term);\n }\n if (typeof data === \"string\")\n return data;\n throw new Error(`Unexpected render data type: ${typeof data}. Please implement template parameter by yourself`);\n }\n getId() {\n return this.props.id || null;\n }\n match(text) {\n return typeof this.props.match === \"function\"\n ? this.props.match(text)\n : text.match(this.props.match);\n }\n search(term, callback, match) {\n if (this.props.cache) {\n this.searchWithCach(term, callback, match);\n }\n else {\n this.props.search(term, callback, match);\n }\n }\n matchWithContext(beforeCursor) {\n const context = this.context(beforeCursor);\n if (context === false)\n return null;\n return this.match(context === true ? beforeCursor : context);\n }\n context(beforeCursor) {\n return this.props.context ? this.props.context(beforeCursor) : true;\n }\n searchWithCach(term, callback, match) {\n if (this.cache[term] != null) {\n callback(this.cache[term]);\n }\n else {\n this.props.search(term, (results) => {\n this.cache[term] = results;\n callback(results);\n }, match);\n }\n }\n}\nexports.Strategy = Strategy;\n//# sourceMappingURL=Strategy.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Textcomplete = void 0;\nconst eventemitter3_1 = require(\"eventemitter3\");\nconst Dropdown_1 = require(\"./Dropdown\");\nconst Completer_1 = require(\"./Completer\");\nconst PASSTHOUGH_EVENT_NAMES = [\n \"show\",\n \"shown\",\n \"render\",\n \"rendered\",\n \"selected\",\n \"hidden\",\n \"hide\",\n];\nclass Textcomplete extends eventemitter3_1.EventEmitter {\n constructor(editor, strategies, option) {\n super();\n this.editor = editor;\n this.isQueryInFlight = false;\n this.nextPendingQuery = null;\n this.handleHit = ({ searchResults, }) => {\n if (searchResults.length) {\n this.dropdown.render(searchResults, this.editor.getCursorOffset());\n }\n else {\n this.dropdown.hide();\n }\n this.isQueryInFlight = false;\n if (this.nextPendingQuery !== null)\n this.trigger(this.nextPendingQuery);\n };\n this.handleMove = (e) => {\n e.detail.code === \"UP\" ? this.dropdown.up(e) : this.dropdown.down(e);\n };\n this.handleEnter = (e) => {\n const activeItem = this.dropdown.getActiveItem();\n if (activeItem) {\n this.dropdown.select(activeItem);\n e.preventDefault();\n }\n else {\n this.dropdown.hide();\n }\n };\n this.handleEsc = (e) => {\n if (this.dropdown.isShown()) {\n this.dropdown.hide();\n e.preventDefault();\n }\n };\n this.handleChange = (e) => {\n if (e.detail.beforeCursor != null) {\n this.trigger(e.detail.beforeCursor);\n }\n else {\n this.dropdown.hide();\n }\n };\n this.handleSelect = (selectEvent) => {\n this.emit(\"select\", selectEvent);\n if (!selectEvent.defaultPrevented) {\n this.editor.applySearchResult(selectEvent.detail.searchResult);\n }\n };\n this.handleResize = () => {\n if (this.dropdown.isShown()) {\n this.dropdown.setOffset(this.editor.getCursorOffset());\n }\n };\n this.completer = new Completer_1.Completer(strategies);\n this.dropdown = Dropdown_1.Dropdown.create((option === null || option === void 0 ? void 0 : option.dropdown) || {});\n this.startListening();\n }\n destroy(destroyEditor = true) {\n this.completer.destroy();\n this.dropdown.destroy();\n if (destroyEditor)\n this.editor.destroy();\n this.stopListening();\n return this;\n }\n isShown() {\n return this.dropdown.isShown();\n }\n hide() {\n this.dropdown.hide();\n return this;\n }\n trigger(beforeCursor) {\n if (this.isQueryInFlight) {\n this.nextPendingQuery = beforeCursor;\n }\n else {\n this.isQueryInFlight = true;\n this.nextPendingQuery = null;\n this.completer.run(beforeCursor);\n }\n return this;\n }\n startListening() {\n var _a;\n this.editor\n .on(\"move\", this.handleMove)\n .on(\"enter\", this.handleEnter)\n .on(\"esc\", this.handleEsc)\n .on(\"change\", this.handleChange);\n this.dropdown.on(\"select\", this.handleSelect);\n for (const eventName of PASSTHOUGH_EVENT_NAMES) {\n this.dropdown.on(eventName, (e) => this.emit(eventName, e));\n }\n this.completer.on(\"hit\", this.handleHit);\n (_a = this.dropdown.el.ownerDocument.defaultView) === null || _a === void 0 ? void 0 : _a.addEventListener(\"resize\", this.handleResize);\n }\n stopListening() {\n var _a;\n (_a = this.dropdown.el.ownerDocument.defaultView) === null || _a === void 0 ? void 0 : _a.removeEventListener(\"resize\", this.handleResize);\n this.completer.removeAllListeners();\n this.dropdown.removeAllListeners();\n this.editor\n .removeListener(\"move\", this.handleMove)\n .removeListener(\"enter\", this.handleEnter)\n .removeListener(\"esc\", this.handleEsc)\n .removeListener(\"change\", this.handleChange);\n }\n}\nexports.Textcomplete = Textcomplete;\n//# sourceMappingURL=Textcomplete.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./Completer\"), exports);\n__exportStar(require(\"./Dropdown\"), exports);\n__exportStar(require(\"./Editor\"), exports);\n__exportStar(require(\"./SearchResult\"), exports);\n__exportStar(require(\"./Strategy\"), exports);\n__exportStar(require(\"./Textcomplete\"), exports);\n__exportStar(require(\"./utils\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createCustomEvent = void 0;\nconst isCustomEventSupported = typeof window !== \"undefined\" && !!window.CustomEvent;\nconst createCustomEvent = (type, options) => {\n if (isCustomEventSupported)\n return new CustomEvent(type, options);\n const event = document.createEvent(\"CustomEvent\");\n event.initCustomEvent(type, \n /* bubbles */ false, (options === null || options === void 0 ? void 0 : options.cancelable) || false, (options === null || options === void 0 ? void 0 : options.detail) || undefined);\n return event;\n};\nexports.createCustomEvent = createCustomEvent;\n//# sourceMappingURL=utils.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TextareaEditor = void 0;\nconst undate_1 = require(\"undate\");\nconst textarea_caret_1 = __importDefault(require(\"textarea-caret\"));\nconst core_1 = require(\"@textcomplete/core\");\nconst utils_1 = require(\"@textcomplete/utils\");\nclass TextareaEditor extends core_1.Editor {\n constructor(el) {\n super();\n this.el = el;\n this.onInput = () => {\n this.emitChangeEvent();\n };\n this.onKeydown = (e) => {\n const code = this.getCode(e);\n let event;\n if (code === \"UP\" || code === \"DOWN\") {\n event = this.emitMoveEvent(code);\n }\n else if (code === \"ENTER\") {\n event = this.emitEnterEvent();\n }\n else if (code === \"ESC\") {\n event = this.emitEscEvent();\n }\n if (event && event.defaultPrevented) {\n e.preventDefault();\n }\n };\n this.startListening();\n }\n destroy() {\n super.destroy();\n this.stopListening();\n return this;\n }\n /**\n * @implements {@link Editor#applySearchResult}\n */\n applySearchResult(searchResult) {\n const beforeCursor = this.getBeforeCursor();\n if (beforeCursor != null) {\n const replace = searchResult.replace(beforeCursor, this.getAfterCursor());\n this.el.focus(); // Clicking a dropdown item removes focus from the element.\n if (Array.isArray(replace)) {\n (0, undate_1.update)(this.el, replace[0], replace[1]);\n if (this.el) {\n this.el.dispatchEvent((0, core_1.createCustomEvent)(\"input\"));\n }\n }\n }\n }\n /**\n * @implements {@link Editor#getCursorOffset}\n */\n getCursorOffset() {\n const elOffset = (0, utils_1.calculateElementOffset)(this.el);\n const elScroll = this.getElScroll();\n const cursorPosition = this.getCursorPosition();\n const lineHeight = (0, utils_1.getLineHeightPx)(this.el);\n const top = elOffset.top - elScroll.top + cursorPosition.top + lineHeight;\n const left = elOffset.left - elScroll.left + cursorPosition.left;\n const clientTop = this.el.getBoundingClientRect().top;\n if (this.el.dir !== \"rtl\") {\n return { top, left, lineHeight, clientTop };\n }\n else {\n const right = document.documentElement\n ? document.documentElement.clientWidth - left\n : 0;\n return { top, right, lineHeight, clientTop };\n }\n }\n /**\n * @implements {@link Editor#getBeforeCursor}\n */\n getBeforeCursor() {\n return this.el.selectionStart !== this.el.selectionEnd\n ? null\n : this.el.value.substring(0, this.el.selectionEnd);\n }\n getAfterCursor() {\n return this.el.value.substring(this.el.selectionEnd);\n }\n getElScroll() {\n return { top: this.el.scrollTop, left: this.el.scrollLeft };\n }\n /**\n * The input cursor's relative coordinates from the textarea's left\n * top corner.\n */\n getCursorPosition() {\n return (0, textarea_caret_1.default)(this.el, this.el.selectionEnd);\n }\n startListening() {\n this.el.addEventListener(\"input\", this.onInput);\n this.el.addEventListener(\"keydown\", this.onKeydown);\n }\n stopListening() {\n this.el.removeEventListener(\"input\", this.onInput);\n this.el.removeEventListener(\"keydown\", this.onKeydown);\n }\n}\nexports.TextareaEditor = TextareaEditor;\n//# sourceMappingURL=TextareaEditor.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TextareaEditor = void 0;\nvar TextareaEditor_1 = require(\"./TextareaEditor\");\nObject.defineProperty(exports, \"TextareaEditor\", { enumerable: true, get: function () { return TextareaEditor_1.TextareaEditor; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.calculateElementOffset = void 0;\n/**\n * Get the current coordinates of the `el` relative to the document.\n */\nconst calculateElementOffset = (el) => {\n const rect = el.getBoundingClientRect();\n const owner = el.ownerDocument;\n if (owner == null) {\n throw new Error(\"Given element does not belong to document\");\n }\n const { defaultView, documentElement } = owner;\n if (defaultView == null) {\n throw new Error(\"Given element does not belong to window\");\n }\n const offset = {\n top: rect.top + defaultView.pageYOffset,\n left: rect.left + defaultView.pageXOffset,\n };\n if (documentElement) {\n offset.top -= documentElement.clientTop;\n offset.left -= documentElement.clientLeft;\n }\n return offset;\n};\nexports.calculateElementOffset = calculateElementOffset;\n//# sourceMappingURL=calculateElementOffset.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getLineHeightPx = void 0;\nconst CHAR_CODE_ZERO = \"0\".charCodeAt(0);\nconst CHAR_CODE_NINE = \"9\".charCodeAt(0);\nconst isDigit = (charCode) => CHAR_CODE_ZERO <= charCode && charCode <= CHAR_CODE_NINE;\nconst getLineHeightPx = (el) => {\n const computedStyle = getComputedStyle(el);\n const lineHeight = computedStyle.lineHeight;\n // If the char code starts with a digit, it is either a value in pixels,\n // or unitless, as per:\n // https://drafts.csswg.org/css2/visudet.html#propdef-line-height\n // https://drafts.csswg.org/css2/cascade.html#computed-value\n if (isDigit(lineHeight.charCodeAt(0))) {\n const floatLineHeight = parseFloat(lineHeight);\n // In real browsers the value is *always* in pixels, even for unit-less\n // line-heights. However, we still check as per the spec.\n return isDigit(lineHeight.charCodeAt(lineHeight.length - 1))\n ? floatLineHeight * parseFloat(computedStyle.fontSize)\n : floatLineHeight;\n }\n // Otherwise, the value is \"normal\".\n // If the line-height is \"normal\", calculate by font-size\n return calculateLineHeightPx(el.nodeName, computedStyle);\n};\nexports.getLineHeightPx = getLineHeightPx;\n/**\n * Returns calculated line-height of the given node in pixels.\n */\nconst calculateLineHeightPx = (nodeName, computedStyle) => {\n const body = document.body;\n if (!body)\n return 0;\n const tempNode = document.createElement(nodeName);\n tempNode.innerHTML = \"&nbsp;\";\n Object.assign(tempNode.style, {\n fontSize: computedStyle.fontSize,\n fontFamily: computedStyle.fontFamily,\n padding: \"0\",\n });\n body.appendChild(tempNode);\n // Make sure textarea has only 1 row\n if (tempNode instanceof HTMLTextAreaElement) {\n tempNode.rows = 1;\n }\n // Assume the height of the element is the line-height\n const height = tempNode.offsetHeight;\n body.removeChild(tempNode);\n return height;\n};\n//# sourceMappingURL=getLineHeightPx.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./calculateElementOffset\"), exports);\n__exportStar(require(\"./getLineHeightPx\"), exports);\n__exportStar(require(\"./isSafari\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isSafari = void 0;\nconst isSafari = () => /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\nexports.isSafari = isSafari;\n//# sourceMappingURL=isSafari.js.map","/**\r\n * Make a map and return a function for checking if a key\r\n * is in that map.\r\n * IMPORTANT: all calls of this function must be prefixed with\r\n * \\/\\*#\\_\\_PURE\\_\\_\\*\\/\r\n * So that rollup can tree-shake them if necessary.\r\n */\r\nfunction makeMap(str, expectsLowerCase) {\r\n const map = Object.create(null);\r\n const list = str.split(',');\r\n for (let i = 0; i < list.length; i++) {\r\n map[list[i]] = true;\r\n }\r\n return expectsLowerCase ? val => !!map[val.toLowerCase()] : val => !!map[val];\r\n}\n\n/**\r\n * dev only flag -> name mapping\r\n */\r\nconst PatchFlagNames = {\r\n [1 /* TEXT */]: `TEXT`,\r\n [2 /* CLASS */]: `CLASS`,\r\n [4 /* STYLE */]: `STYLE`,\r\n [8 /* PROPS */]: `PROPS`,\r\n [16 /* FULL_PROPS */]: `FULL_PROPS`,\r\n [32 /* HYDRATE_EVENTS */]: `HYDRATE_EVENTS`,\r\n [64 /* STABLE_FRAGMENT */]: `STABLE_FRAGMENT`,\r\n [128 /* KEYED_FRAGMENT */]: `KEYED_FRAGMENT`,\r\n [256 /* UNKEYED_FRAGMENT */]: `UNKEYED_FRAGMENT`,\r\n [512 /* NEED_PATCH */]: `NEED_PATCH`,\r\n [1024 /* DYNAMIC_SLOTS */]: `DYNAMIC_SLOTS`,\r\n [2048 /* DEV_ROOT_FRAGMENT */]: `DEV_ROOT_FRAGMENT`,\r\n [-1 /* HOISTED */]: `HOISTED`,\r\n [-2 /* BAIL */]: `BAIL`\r\n};\n\n/**\r\n * Dev only\r\n */\r\nconst slotFlagsText = {\r\n [1 /* STABLE */]: 'STABLE',\r\n [2 /* DYNAMIC */]: 'DYNAMIC',\r\n [3 /* FORWARDED */]: 'FORWARDED'\r\n};\n\nconst GLOBALS_WHITE_LISTED = 'Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,' +\r\n 'decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,' +\r\n 'Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt';\r\nconst isGloballyWhitelisted = /*#__PURE__*/ makeMap(GLOBALS_WHITE_LISTED);\n\nconst range = 2;\r\nfunction generateCodeFrame(source, start = 0, end = source.length) {\r\n // Split the content into individual lines but capture the newline sequence\r\n // that separated each line. This is important because the actual sequence is\r\n // needed to properly take into account the full line length for offset\r\n // comparison\r\n let lines = source.split(/(\\r?\\n)/);\r\n // Separate the lines and newline sequences into separate arrays for easier referencing\r\n const newlineSequences = lines.filter((_, idx) => idx % 2 === 1);\r\n lines = lines.filter((_, idx) => idx % 2 === 0);\r\n let count = 0;\r\n const res = [];\r\n for (let i = 0; i < lines.length; i++) {\r\n count +=\r\n lines[i].length +\r\n ((newlineSequences[i] && newlineSequences[i].length) || 0);\r\n if (count >= start) {\r\n for (let j = i - range; j <= i + range || end > count; j++) {\r\n if (j < 0 || j >= lines.length)\r\n continue;\r\n const line = j + 1;\r\n res.push(`${line}${' '.repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}`);\r\n const lineLength = lines[j].length;\r\n const newLineSeqLength = (newlineSequences[j] && newlineSequences[j].length) || 0;\r\n if (j === i) {\r\n // push underline\r\n const pad = start - (count - (lineLength + newLineSeqLength));\r\n const length = Math.max(1, end > count ? lineLength - pad : end - start);\r\n res.push(` | ` + ' '.repeat(pad) + '^'.repeat(length));\r\n }\r\n else if (j > i) {\r\n if (end > count) {\r\n const length = Math.max(Math.min(end - count, lineLength), 1);\r\n res.push(` | ` + '^'.repeat(length));\r\n }\r\n count += lineLength + newLineSeqLength;\r\n }\r\n }\r\n break;\r\n }\r\n }\r\n return res.join('\\n');\r\n}\n\n/**\r\n * On the client we only need to offer special cases for boolean attributes that\r\n * have different names from their corresponding dom properties:\r\n * - itemscope -> N/A\r\n * - allowfullscreen -> allowFullscreen\r\n * - formnovalidate -> formNoValidate\r\n * - ismap -> isMap\r\n * - nomodule -> noModule\r\n * - novalidate -> noValidate\r\n * - readonly -> readOnly\r\n */\r\nconst specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;\r\nconst isSpecialBooleanAttr = /*#__PURE__*/ makeMap(specialBooleanAttrs);\r\n/**\r\n * The full list is needed during SSR to produce the correct initial markup.\r\n */\r\nconst isBooleanAttr = /*#__PURE__*/ makeMap(specialBooleanAttrs +\r\n `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,` +\r\n `loop,open,required,reversed,scoped,seamless,` +\r\n `checked,muted,multiple,selected`);\r\n/**\r\n * Boolean attributes should be included if the value is truthy or ''.\r\n * e.g. `<select multiple>` compiles to `{ multiple: '' }`\r\n */\r\nfunction includeBooleanAttr(value) {\r\n return !!value || value === '';\r\n}\r\nconst unsafeAttrCharRE = /[>/=\"'\\u0009\\u000a\\u000c\\u0020]/;\r\nconst attrValidationCache = {};\r\nfunction isSSRSafeAttrName(name) {\r\n if (attrValidationCache.hasOwnProperty(name)) {\r\n return attrValidationCache[name];\r\n }\r\n const isUnsafe = unsafeAttrCharRE.test(name);\r\n if (isUnsafe) {\r\n console.error(`unsafe attribute name: ${name}`);\r\n }\r\n return (attrValidationCache[name] = !isUnsafe);\r\n}\r\nconst propsToAttrMap = {\r\n acceptCharset: 'accept-charset',\r\n className: 'class',\r\n htmlFor: 'for',\r\n httpEquiv: 'http-equiv'\r\n};\r\n/**\r\n * CSS properties that accept plain numbers\r\n */\r\nconst isNoUnitNumericStyleProp = /*#__PURE__*/ makeMap(`animation-iteration-count,border-image-outset,border-image-slice,` +\r\n `border-image-width,box-flex,box-flex-group,box-ordinal-group,column-count,` +\r\n `columns,flex,flex-grow,flex-positive,flex-shrink,flex-negative,flex-order,` +\r\n `grid-row,grid-row-end,grid-row-span,grid-row-start,grid-column,` +\r\n `grid-column-end,grid-column-span,grid-column-start,font-weight,line-clamp,` +\r\n `line-height,opacity,order,orphans,tab-size,widows,z-index,zoom,` +\r\n // SVG\r\n `fill-opacity,flood-opacity,stop-opacity,stroke-dasharray,stroke-dashoffset,` +\r\n `stroke-miterlimit,stroke-opacity,stroke-width`);\r\n/**\r\n * Known attributes, this is used for stringification of runtime static nodes\r\n * so that we don't stringify bindings that cannot be set from HTML.\r\n * Don't also forget to allow `data-*` and `aria-*`!\r\n * Generated from https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes\r\n */\r\nconst isKnownHtmlAttr = /*#__PURE__*/ makeMap(`accept,accept-charset,accesskey,action,align,allow,alt,async,` +\r\n `autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,` +\r\n `border,buffered,capture,challenge,charset,checked,cite,class,code,` +\r\n `codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,` +\r\n `coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,` +\r\n `disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,` +\r\n `formaction,formenctype,formmethod,formnovalidate,formtarget,headers,` +\r\n `height,hidden,high,href,hreflang,http-equiv,icon,id,importance,integrity,` +\r\n `ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,` +\r\n `manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,` +\r\n `open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,` +\r\n `referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,` +\r\n `selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,` +\r\n `start,step,style,summary,tabindex,target,title,translate,type,usemap,` +\r\n `value,width,wrap`);\r\n/**\r\n * Generated from https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute\r\n */\r\nconst isKnownSvgAttr = /*#__PURE__*/ makeMap(`xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,` +\r\n `arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,` +\r\n `baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,` +\r\n `clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,` +\r\n `color-interpolation-filters,color-profile,color-rendering,` +\r\n `contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,` +\r\n `descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,` +\r\n `dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,` +\r\n `fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,` +\r\n `font-family,font-size,font-size-adjust,font-stretch,font-style,` +\r\n `font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,` +\r\n `glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,` +\r\n `gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,` +\r\n `horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,` +\r\n `k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,` +\r\n `lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,` +\r\n `marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,` +\r\n `mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,` +\r\n `name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,` +\r\n `overflow,overline-position,overline-thickness,panose-1,paint-order,path,` +\r\n `pathLength,patternContentUnits,patternTransform,patternUnits,ping,` +\r\n `pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,` +\r\n `preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,` +\r\n `rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,` +\r\n `restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,` +\r\n `specularConstant,specularExponent,speed,spreadMethod,startOffset,` +\r\n `stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,` +\r\n `strikethrough-position,strikethrough-thickness,string,stroke,` +\r\n `stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,` +\r\n `stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,` +\r\n `systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,` +\r\n `text-decoration,text-rendering,textLength,to,transform,transform-origin,` +\r\n `type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,` +\r\n `unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,` +\r\n `v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,` +\r\n `vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,` +\r\n `writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,` +\r\n `xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,` +\r\n `xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan`);\n\nfunction normalizeStyle(value) {\r\n if (isArray(value)) {\r\n const res = {};\r\n for (let i = 0; i < value.length; i++) {\r\n const item = value[i];\r\n const normalized = isString(item)\r\n ? parseStringStyle(item)\r\n : normalizeStyle(item);\r\n if (normalized) {\r\n for (const key in normalized) {\r\n res[key] = normalized[key];\r\n }\r\n }\r\n }\r\n return res;\r\n }\r\n else if (isString(value)) {\r\n return value;\r\n }\r\n else if (isObject(value)) {\r\n return value;\r\n }\r\n}\r\nconst listDelimiterRE = /;(?![^(]*\\))/g;\r\nconst propertyDelimiterRE = /:(.+)/;\r\nfunction parseStringStyle(cssText) {\r\n const ret = {};\r\n cssText.split(listDelimiterRE).forEach(item => {\r\n if (item) {\r\n const tmp = item.split(propertyDelimiterRE);\r\n tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());\r\n }\r\n });\r\n return ret;\r\n}\r\nfunction stringifyStyle(styles) {\r\n let ret = '';\r\n if (!styles || isString(styles)) {\r\n return ret;\r\n }\r\n for (const key in styles) {\r\n const value = styles[key];\r\n const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key);\r\n if (isString(value) ||\r\n (typeof value === 'number' && isNoUnitNumericStyleProp(normalizedKey))) {\r\n // only render valid values\r\n ret += `${normalizedKey}:${value};`;\r\n }\r\n }\r\n return ret;\r\n}\r\nfunction normalizeClass(value) {\r\n let res = '';\r\n if (isString(value)) {\r\n res = value;\r\n }\r\n else if (isArray(value)) {\r\n for (let i = 0; i < value.length; i++) {\r\n const normalized = normalizeClass(value[i]);\r\n if (normalized) {\r\n res += normalized + ' ';\r\n }\r\n }\r\n }\r\n else if (isObject(value)) {\r\n for (const name in value) {\r\n if (value[name]) {\r\n res += name + ' ';\r\n }\r\n }\r\n }\r\n return res.trim();\r\n}\r\nfunction normalizeProps(props) {\r\n if (!props)\r\n return null;\r\n let { class: klass, style } = props;\r\n if (klass && !isString(klass)) {\r\n props.class = normalizeClass(klass);\r\n }\r\n if (style) {\r\n props.style = normalizeStyle(style);\r\n }\r\n return props;\r\n}\n\n// These tag configs are shared between compiler-dom and runtime-dom, so they\r\n// https://developer.mozilla.org/en-US/docs/Web/HTML/Element\r\nconst HTML_TAGS = 'html,body,base,head,link,meta,style,title,address,article,aside,footer,' +\r\n 'header,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,' +\r\n 'figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,' +\r\n 'data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,' +\r\n 'time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,' +\r\n 'canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,' +\r\n 'th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,' +\r\n 'option,output,progress,select,textarea,details,dialog,menu,' +\r\n 'summary,template,blockquote,iframe,tfoot';\r\n// https://developer.mozilla.org/en-US/docs/Web/SVG/Element\r\nconst SVG_TAGS = 'svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,' +\r\n 'defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,' +\r\n 'feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,' +\r\n 'feDistanceLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,' +\r\n 'feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,' +\r\n 'fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,' +\r\n 'foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,' +\r\n 'mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,' +\r\n 'polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,' +\r\n 'text,textPath,title,tspan,unknown,use,view';\r\nconst VOID_TAGS = 'area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr';\r\n/**\r\n * Compiler only.\r\n * Do NOT use in runtime code paths unless behind `(process.env.NODE_ENV !== 'production')` flag.\r\n */\r\nconst isHTMLTag = /*#__PURE__*/ makeMap(HTML_TAGS);\r\n/**\r\n * Compiler only.\r\n * Do NOT use in runtime code paths unless behind `(process.env.NODE_ENV !== 'production')` flag.\r\n */\r\nconst isSVGTag = /*#__PURE__*/ makeMap(SVG_TAGS);\r\n/**\r\n * Compiler only.\r\n * Do NOT use in runtime code paths unless behind `(process.env.NODE_ENV !== 'production')` flag.\r\n */\r\nconst isVoidTag = /*#__PURE__*/ makeMap(VOID_TAGS);\n\nconst escapeRE = /[\"'&<>]/;\r\nfunction escapeHtml(string) {\r\n const str = '' + string;\r\n const match = escapeRE.exec(str);\r\n if (!match) {\r\n return str;\r\n }\r\n let html = '';\r\n let escaped;\r\n let index;\r\n let lastIndex = 0;\r\n for (index = match.index; index < str.length; index++) {\r\n switch (str.charCodeAt(index)) {\r\n case 34: // \"\r\n escaped = '&quot;';\r\n break;\r\n case 38: // &\r\n escaped = '&amp;';\r\n break;\r\n case 39: // '\r\n escaped = '&#39;';\r\n break;\r\n case 60: // <\r\n escaped = '&lt;';\r\n break;\r\n case 62: // >\r\n escaped = '&gt;';\r\n break;\r\n default:\r\n continue;\r\n }\r\n if (lastIndex !== index) {\r\n html += str.slice(lastIndex, index);\r\n }\r\n lastIndex = index + 1;\r\n html += escaped;\r\n }\r\n return lastIndex !== index ? html + str.slice(lastIndex, index) : html;\r\n}\r\n// https://www.w3.org/TR/html52/syntax.html#comments\r\nconst commentStripRE = /^-?>|<!--|-->|--!>|<!-$/g;\r\nfunction escapeHtmlComment(src) {\r\n return src.replace(commentStripRE, '');\r\n}\n\nfunction looseCompareArrays(a, b) {\r\n if (a.length !== b.length)\r\n return false;\r\n let equal = true;\r\n for (let i = 0; equal && i < a.length; i++) {\r\n equal = looseEqual(a[i], b[i]);\r\n }\r\n return equal;\r\n}\r\nfunction looseEqual(a, b) {\r\n if (a === b)\r\n return true;\r\n let aValidType = isDate(a);\r\n let bValidType = isDate(b);\r\n if (aValidType || bValidType) {\r\n return aValidType && bValidType ? a.getTime() === b.getTime() : false;\r\n }\r\n aValidType = isSymbol(a);\r\n bValidType = isSymbol(b);\r\n if (aValidType || bValidType) {\r\n return a === b;\r\n }\r\n aValidType = isArray(a);\r\n bValidType = isArray(b);\r\n if (aValidType || bValidType) {\r\n return aValidType && bValidType ? looseCompareArrays(a, b) : false;\r\n }\r\n aValidType = isObject(a);\r\n bValidType = isObject(b);\r\n if (aValidType || bValidType) {\r\n /* istanbul ignore if: this if will probably never be called */\r\n if (!aValidType || !bValidType) {\r\n return false;\r\n }\r\n const aKeysCount = Object.keys(a).length;\r\n const bKeysCount = Object.keys(b).length;\r\n if (aKeysCount !== bKeysCount) {\r\n return false;\r\n }\r\n for (const key in a) {\r\n const aHasKey = a.hasOwnProperty(key);\r\n const bHasKey = b.hasOwnProperty(key);\r\n if ((aHasKey && !bHasKey) ||\r\n (!aHasKey && bHasKey) ||\r\n !looseEqual(a[key], b[key])) {\r\n return false;\r\n }\r\n }\r\n }\r\n return String(a) === String(b);\r\n}\r\nfunction looseIndexOf(arr, val) {\r\n return arr.findIndex(item => looseEqual(item, val));\r\n}\n\n/**\r\n * For converting {{ interpolation }} values to displayed strings.\r\n * @private\r\n */\r\nconst toDisplayString = (val) => {\r\n return isString(val)\r\n ? val\r\n : val == null\r\n ? ''\r\n : isArray(val) ||\r\n (isObject(val) &&\r\n (val.toString === objectToString || !isFunction(val.toString)))\r\n ? JSON.stringify(val, replacer, 2)\r\n : String(val);\r\n};\r\nconst replacer = (_key, val) => {\r\n // can't use isRef here since @vue/shared has no deps\r\n if (val && val.__v_isRef) {\r\n return replacer(_key, val.value);\r\n }\r\n else if (isMap(val)) {\r\n return {\r\n [`Map(${val.size})`]: [...val.entries()].reduce((entries, [key, val]) => {\r\n entries[`${key} =>`] = val;\r\n return entries;\r\n }, {})\r\n };\r\n }\r\n else if (isSet(val)) {\r\n return {\r\n [`Set(${val.size})`]: [...val.values()]\r\n };\r\n }\r\n else if (isObject(val) && !isArray(val) && !isPlainObject(val)) {\r\n return String(val);\r\n }\r\n return val;\r\n};\n\nconst EMPTY_OBJ = (process.env.NODE_ENV !== 'production')\r\n ? Object.freeze({})\r\n : {};\r\nconst EMPTY_ARR = (process.env.NODE_ENV !== 'production') ? Object.freeze([]) : [];\r\nconst NOOP = () => { };\r\n/**\r\n * Always return false.\r\n */\r\nconst NO = () => false;\r\nconst onRE = /^on[^a-z]/;\r\nconst isOn = (key) => onRE.test(key);\r\nconst isModelListener = (key) => key.startsWith('onUpdate:');\r\nconst extend = Object.assign;\r\nconst remove = (arr, el) => {\r\n const i = arr.indexOf(el);\r\n if (i > -1) {\r\n arr.splice(i, 1);\r\n }\r\n};\r\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\r\nconst hasOwn = (val, key) => hasOwnProperty.call(val, key);\r\nconst isArray = Array.isArray;\r\nconst isMap = (val) => toTypeString(val) === '[object Map]';\r\nconst isSet = (val) => toTypeString(val) === '[object Set]';\r\nconst isDate = (val) => toTypeString(val) === '[object Date]';\r\nconst isFunction = (val) => typeof val === 'function';\r\nconst isString = (val) => typeof val === 'string';\r\nconst isSymbol = (val) => typeof val === 'symbol';\r\nconst isObject = (val) => val !== null && typeof val === 'object';\r\nconst isPromise = (val) => {\r\n return isObject(val) && isFunction(val.then) && isFunction(val.catch);\r\n};\r\nconst objectToString = Object.prototype.toString;\r\nconst toTypeString = (value) => objectToString.call(value);\r\nconst toRawType = (value) => {\r\n // extract \"RawType\" from strings like \"[object RawType]\"\r\n return toTypeString(value).slice(8, -1);\r\n};\r\nconst isPlainObject = (val) => toTypeString(val) === '[object Object]';\r\nconst isIntegerKey = (key) => isString(key) &&\r\n key !== 'NaN' &&\r\n key[0] !== '-' &&\r\n '' + parseInt(key, 10) === key;\r\nconst isReservedProp = /*#__PURE__*/ makeMap(\r\n// the leading comma is intentional so empty string \"\" is also included\r\n',key,ref,ref_for,ref_key,' +\r\n 'onVnodeBeforeMount,onVnodeMounted,' +\r\n 'onVnodeBeforeUpdate,onVnodeUpdated,' +\r\n 'onVnodeBeforeUnmount,onVnodeUnmounted');\r\nconst isBuiltInDirective = /*#__PURE__*/ makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo');\r\nconst cacheStringFunction = (fn) => {\r\n const cache = Object.create(null);\r\n return ((str) => {\r\n const hit = cache[str];\r\n return hit || (cache[str] = fn(str));\r\n });\r\n};\r\nconst camelizeRE = /-(\\w)/g;\r\n/**\r\n * @private\r\n */\r\nconst camelize = cacheStringFunction((str) => {\r\n return str.replace(camelizeRE, (_, c) => (c ? c.toUpperCase() : ''));\r\n});\r\nconst hyphenateRE = /\\B([A-Z])/g;\r\n/**\r\n * @private\r\n */\r\nconst hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, '-$1').toLowerCase());\r\n/**\r\n * @private\r\n */\r\nconst capitalize = cacheStringFunction((str) => str.charAt(0).toUpperCase() + str.slice(1));\r\n/**\r\n * @private\r\n */\r\nconst toHandlerKey = cacheStringFunction((str) => str ? `on${capitalize(str)}` : ``);\r\n// compare whether a value has changed, accounting for NaN.\r\nconst hasChanged = (value, oldValue) => !Object.is(value, oldValue);\r\nconst invokeArrayFns = (fns, arg) => {\r\n for (let i = 0; i < fns.length; i++) {\r\n fns[i](arg);\r\n }\r\n};\r\nconst def = (obj, key, value) => {\r\n Object.defineProperty(obj, key, {\r\n configurable: true,\r\n enumerable: false,\r\n value\r\n });\r\n};\r\nconst toNumber = (val) => {\r\n const n = parseFloat(val);\r\n return isNaN(n) ? val : n;\r\n};\r\nlet _globalThis;\r\nconst getGlobalThis = () => {\r\n return (_globalThis ||\r\n (_globalThis =\r\n typeof globalThis !== 'undefined'\r\n ? globalThis\r\n : typeof self !== 'undefined'\r\n ? self\r\n : typeof window !== 'undefined'\r\n ? window\r\n : typeof global !== 'undefined'\r\n ? global\r\n : {}));\r\n};\r\nconst identRE = /^[_$a-zA-Z\\xA0-\\uFFFF][_$a-zA-Z0-9\\xA0-\\uFFFF]*$/;\r\nfunction genPropsAccessExp(name) {\r\n return identRE.test(name)\r\n ? `__props.${name}`\r\n : `__props[${JSON.stringify(name)}]`;\r\n}\n\nexport { EMPTY_ARR, EMPTY_OBJ, NO, NOOP, PatchFlagNames, camelize, capitalize, def, escapeHtml, escapeHtmlComment, extend, genPropsAccessExp, generateCodeFrame, getGlobalThis, hasChanged, hasOwn, hyphenate, includeBooleanAttr, invokeArrayFns, isArray, isBooleanAttr, isBuiltInDirective, isDate, isFunction, isGloballyWhitelisted, isHTMLTag, isIntegerKey, isKnownHtmlAttr, isKnownSvgAttr, isMap, isModelListener, isNoUnitNumericStyleProp, isObject, isOn, isPlainObject, isPromise, isReservedProp, isSSRSafeAttrName, isSVGTag, isSet, isSpecialBooleanAttr, isString, isSymbol, isVoidTag, looseEqual, looseIndexOf, makeMap, normalizeClass, normalizeProps, normalizeStyle, objectToString, parseStringStyle, propsToAttrMap, remove, slotFlagsText, stringifyStyle, toDisplayString, toHandlerKey, toNumber, toRawType, toTypeString };\n","!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs=e()}(this,(function(){\"use strict\";var t=1e3,e=6e4,n=36e5,r=\"millisecond\",i=\"second\",s=\"minute\",u=\"hour\",a=\"day\",o=\"week\",f=\"month\",h=\"quarter\",c=\"year\",d=\"date\",$=\"Invalid Date\",l=/^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/,y=/\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:\"en\",weekdays:\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),months:\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\")},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:\"\"+Array(e+1-r.length).join(n)+t},g={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?\"+\":\"-\")+m(r,2,\"0\")+\":\"+m(i,2,\"0\")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,f),s=n-i<0,u=e.clone().add(r+(s?-1:1),f);return+(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:f,y:c,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:h}[t]||String(t||\"\").toLowerCase().replace(/s$/,\"\")},u:function(t){return void 0===t}},D=\"en\",v={};v[D]=M;var p=function(t){return t instanceof _},S=function(t,e,n){var r;if(!t)return D;if(\"string\"==typeof t)v[t]&&(r=t),e&&(v[t]=e,r=t);else{var i=t.name;v[i]=t,r=i}return!n&&r&&(D=r),r||!n&&D},w=function(t,e){if(p(t))return t.clone();var n=\"object\"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},O=g;O.l=S,O.i=p,O.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=S(t.locale,null,!0),this.parse(t)}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.u(e))return new Date;if(e instanceof Date)return new Date(e);if(\"string\"==typeof e&&!/Z$/i.test(e)){var r=e.match(l);if(r){var i=r[2]-1||0,s=(r[7]||\"0\").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return O},m.isValid=function(){return!(this.$d.toString()===$)},m.isSame=function(t,e){var n=w(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return w(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<w(t)},m.$g=function(t,e,n){return O.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!O.u(e)||e,h=O.p(t),$=function(t,e){var i=O.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},l=function(t,e){return O.w(n.toDate()[t].apply(n.toDate(\"s\"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,g=\"set\"+(this.$u?\"UTC\":\"\");switch(h){case c:return r?$(1,0):$(31,11);case f:return r?$(1,M):$(0,M+1);case o:var D=this.$locale().weekStart||0,v=(y<D?y+7:y)-D;return $(r?m-v:m+(6-v),M);case a:case d:return l(g+\"Hours\",0);case u:return l(g+\"Minutes\",1);case s:return l(g+\"Seconds\",2);case i:return l(g+\"Milliseconds\",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=O.p(t),h=\"set\"+(this.$u?\"UTC\":\"\"),$=(n={},n[a]=h+\"Date\",n[d]=h+\"Date\",n[f]=h+\"Month\",n[c]=h+\"FullYear\",n[u]=h+\"Hours\",n[s]=h+\"Minutes\",n[i]=h+\"Seconds\",n[r]=h+\"Milliseconds\",n)[o],l=o===a?this.$D+(e-this.$W):e;if(o===f||o===c){var y=this.clone().set(d,1);y.$d[$](l),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d}else $&&this.$d[$](l);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[O.p(t)]()},m.add=function(r,h){var d,$=this;r=Number(r);var l=O.p(h),y=function(t){var e=w($);return O.w(e.date(e.date()+Math.round(t*r)),$)};if(l===f)return this.set(f,this.$M+r);if(l===c)return this.set(c,this.$y+r);if(l===a)return y(1);if(l===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[l]||1,m=this.$d.getTime()+r*M;return O.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||$;var r=t||\"YYYY-MM-DDTHH:mm:ssZ\",i=O.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,f=n.months,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].substr(0,s)},c=function(t){return O.s(s%12||12,t,\"0\")},d=n.meridiem||function(t,e,n){var r=t<12?\"AM\":\"PM\";return n?r.toLowerCase():r},l={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:O.s(a+1,2,\"0\"),MMM:h(n.monthsShort,a,f,3),MMMM:h(f,a),D:this.$D,DD:O.s(this.$D,2,\"0\"),d:String(this.$W),dd:h(n.weekdaysMin,this.$W,o,2),ddd:h(n.weekdaysShort,this.$W,o,3),dddd:o[this.$W],H:String(s),HH:O.s(s,2,\"0\"),h:c(1),hh:c(2),a:d(s,u,!0),A:d(s,u,!1),m:String(u),mm:O.s(u,2,\"0\"),s:String(this.$s),ss:O.s(this.$s,2,\"0\"),SSS:O.s(this.$ms,3,\"0\"),Z:i};return r.replace(y,(function(t,e){return e||l[t]||i.replace(\":\",\"\")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,$){var l,y=O.p(d),M=w(r),m=(M.utcOffset()-this.utcOffset())*e,g=this-M,D=O.m(this,M);return D=(l={},l[c]=D/12,l[f]=D,l[h]=D/3,l[o]=(g-m)/6048e5,l[a]=(g-m)/864e5,l[u]=g/n,l[s]=g/e,l[i]=g/t,l)[y]||g,$?D:O.a(D)},m.daysInMonth=function(){return this.endOf(f).$D},m.$locale=function(){return v[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=S(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return O.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),b=_.prototype;return w.prototype=b,[[\"$ms\",r],[\"$s\",i],[\"$m\",s],[\"$H\",u],[\"$W\",a],[\"$M\",f],[\"$y\",c],[\"$D\",d]].forEach((function(t){b[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),w.extend=function(t,e){return t.$i||(t(e,_,w),t.$i=!0),w},w.locale=S,w.isDayjs=p,w.unix=function(t){return w(1e3*t)},w.en=v[D],w.Ls=v,w.p={},w}));","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_calendar=t()}(this,(function(){\"use strict\";return function(e,t,a){var n=\"h:mm A\",d={lastDay:\"[Yesterday at] \"+n,sameDay:\"[Today at] \"+n,nextDay:\"[Tomorrow at] \"+n,nextWeek:\"dddd [at] \"+n,lastWeek:\"[Last] dddd [at] \"+n,sameElse:\"MM/DD/YYYY\"};t.prototype.calendar=function(e,t){var n=t||this.$locale().calendar||d,o=a(e||void 0).startOf(\"d\"),s=this.diff(o,\"d\",!0),i=\"sameElse\",f=s<-6?i:s<-1?\"lastWeek\":s<0?\"lastDay\":s<1?\"sameDay\":s<2?\"nextDay\":s<7?\"nextWeek\":i,l=n[f]||d[f];return\"function\"==typeof l?l.call(this,a()):this.format(l)}}}));","!function(r,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(r=\"undefined\"!=typeof globalThis?globalThis:r||self).dayjs_plugin_relativeTime=e()}(this,(function(){\"use strict\";return function(r,e,t){r=r||{};var n=e.prototype,o={future:\"in %s\",past:\"%s ago\",s:\"a few seconds\",m:\"a minute\",mm:\"%d minutes\",h:\"an hour\",hh:\"%d hours\",d:\"a day\",dd:\"%d days\",M:\"a month\",MM:\"%d months\",y:\"a year\",yy:\"%d years\"};function i(r,e,t,o){return n.fromToBase(r,e,t,o)}t.en.relativeTime=o,n.fromToBase=function(e,n,i,d,u){for(var f,a,s,l=i.$locale().relativeTime||o,h=r.thresholds||[{l:\"s\",r:44,d:\"second\"},{l:\"m\",r:89},{l:\"mm\",r:44,d:\"minute\"},{l:\"h\",r:89},{l:\"hh\",r:21,d:\"hour\"},{l:\"d\",r:35},{l:\"dd\",r:25,d:\"day\"},{l:\"M\",r:45},{l:\"MM\",r:10,d:\"month\"},{l:\"y\",r:17},{l:\"yy\",d:\"year\"}],m=h.length,c=0;c<m;c+=1){var y=h[c];y.d&&(f=d?t(e).diff(i,y.d,!0):i.diff(e,y.d,!0));var p=(r.rounding||Math.round)(Math.abs(f));if(s=f>0,p<=y.r||!y.r){p<=1&&c>0&&(y=h[c-1]);var v=l[y.l];u&&(p=u(\"\"+p)),a=\"string\"==typeof v?v.replace(\"%d\",p):v(p,n,y.l,s);break}}if(n)return a;var M=s?l.future:l.past;return\"function\"==typeof M?M(a):M.replace(\"%s\",a)},n.to=function(r,e){return i(r,e,this,!0)},n.from=function(r,e){return i(r,e,this)};var d=function(r){return r.$u?t.utc():t()};n.toNow=function(r){return this.to(d(this),r)},n.fromNow=function(r){return this.from(d(this),r)}}}));","'use strict';\n\nvar has = Object.prototype.hasOwnProperty\n , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n Events.prototype = Object.create(null);\n\n //\n // This hack is needed because the `__proto__` property is still inherited in\n // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n //\n if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @private\n */\nfunction EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n}\n\n/**\n * Add a listener for a given event.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} once Specify if the listener is a one-time listener.\n * @returns {EventEmitter}\n * @private\n */\nfunction addListener(emitter, event, fn, context, once) {\n if (typeof fn !== 'function') {\n throw new TypeError('The listener must be a function');\n }\n\n var listener = new EE(fn, context || emitter, once)\n , evt = prefix ? prefix + event : event;\n\n if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;\n else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);\n else emitter._events[evt] = [emitter._events[evt], listener];\n\n return emitter;\n}\n\n/**\n * Clear event by name.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} evt The Event name.\n * @private\n */\nfunction clearEvent(emitter, evt) {\n if (--emitter._eventsCount === 0) emitter._events = new Events();\n else delete emitter._events[evt];\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @public\n */\nfunction EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n var names = []\n , events\n , name;\n\n if (this._eventsCount === 0) return names;\n\n for (name in (events = this._events)) {\n if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n }\n\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n\n return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Array} The registered listeners.\n * @public\n */\nEventEmitter.prototype.listeners = function listeners(event) {\n var evt = prefix ? prefix + event : event\n , handlers = this._events[evt];\n\n if (!handlers) return [];\n if (handlers.fn) return [handlers.fn];\n\n for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n ee[i] = handlers[i].fn;\n }\n\n return ee;\n};\n\n/**\n * Return the number of listeners listening to a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Number} The number of listeners.\n * @public\n */\nEventEmitter.prototype.listenerCount = function listenerCount(event) {\n var evt = prefix ? prefix + event : event\n , listeners = this._events[evt];\n\n if (!listeners) return 0;\n if (listeners.fn) return 1;\n return listeners.length;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return false;\n\n var listeners = this._events[evt]\n , len = arguments.length\n , args\n , i;\n\n if (listeners.fn) {\n if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n switch (len) {\n case 1: return listeners.fn.call(listeners.context), true;\n case 2: return listeners.fn.call(listeners.context, a1), true;\n case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n }\n\n for (i = 1, args = new Array(len -1); i < len; i++) {\n args[i - 1] = arguments[i];\n }\n\n listeners.fn.apply(listeners.context, args);\n } else {\n var length = listeners.length\n , j;\n\n for (i = 0; i < length; i++) {\n if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n switch (len) {\n case 1: listeners[i].fn.call(listeners[i].context); break;\n case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n default:\n if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n args[j - 1] = arguments[j];\n }\n\n listeners[i].fn.apply(listeners[i].context, args);\n }\n }\n }\n\n return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n return addListener(this, event, fn, context, false);\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n return addListener(this, event, fn, context, true);\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {*} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return this;\n if (!fn) {\n clearEvent(this, evt);\n return this;\n }\n\n var listeners = this._events[evt];\n\n if (listeners.fn) {\n if (\n listeners.fn === fn &&\n (!once || listeners.once) &&\n (!context || listeners.context === context)\n ) {\n clearEvent(this, evt);\n }\n } else {\n for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n if (\n listeners[i].fn !== fn ||\n (once && !listeners[i].once) ||\n (context && listeners[i].context !== context)\n ) {\n events.push(listeners[i]);\n }\n }\n\n //\n // Reset the array, or remove it completely if we have no more listeners.\n //\n if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n else clearEvent(this, evt);\n }\n\n return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {(String|Symbol)} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n var evt;\n\n if (event) {\n evt = prefix ? prefix + event : event;\n if (this._events[evt]) clearEvent(this, evt);\n } else {\n this._events = new Events();\n this._eventsCount = 0;\n }\n\n return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif ('undefined' !== typeof module) {\n module.exports = EventEmitter;\n}\n","/*\n * Fuzzy\n * https://github.com/myork/fuzzy\n *\n * Copyright (c) 2012 Matt York\n * Licensed under the MIT license.\n */\n\n(function() {\n\nvar root = this;\n\nvar fuzzy = {};\n\n// Use in node or in browser\nif (typeof exports !== 'undefined') {\n module.exports = fuzzy;\n} else {\n root.fuzzy = fuzzy;\n}\n\n// Return all elements of `array` that have a fuzzy\n// match against `pattern`.\nfuzzy.simpleFilter = function(pattern, array) {\n return array.filter(function(str) {\n return fuzzy.test(pattern, str);\n });\n};\n\n// Does `pattern` fuzzy match `str`?\nfuzzy.test = function(pattern, str) {\n return fuzzy.match(pattern, str) !== null;\n};\n\n// If `pattern` matches `str`, wrap each matching character\n// in `opts.pre` and `opts.post`. If no match, return null\nfuzzy.match = function(pattern, str, opts) {\n opts = opts || {};\n var patternIdx = 0\n , result = []\n , len = str.length\n , totalScore = 0\n , currScore = 0\n // prefix\n , pre = opts.pre || ''\n // suffix\n , post = opts.post || ''\n // String to compare against. This might be a lowercase version of the\n // raw string\n , compareString = opts.caseSensitive && str || str.toLowerCase()\n , ch;\n\n pattern = opts.caseSensitive && pattern || pattern.toLowerCase();\n\n // For each character in the string, either add it to the result\n // or wrap in template if it's the next string in the pattern\n for(var idx = 0; idx < len; idx++) {\n ch = str[idx];\n if(compareString[idx] === pattern[patternIdx]) {\n ch = pre + ch + post;\n patternIdx += 1;\n\n // consecutive characters should increase the score more than linearly\n currScore += 1 + currScore;\n } else {\n currScore = 0;\n }\n totalScore += currScore;\n result[result.length] = ch;\n }\n\n // return rendered string if we have a match for every char\n if(patternIdx === pattern.length) {\n // if the string is an exact match with pattern, totalScore should be maxed\n totalScore = (compareString === pattern) ? Infinity : totalScore;\n return {rendered: result.join(''), score: totalScore};\n }\n\n return null;\n};\n\n// The normal entry point. Filters `arr` for matches against `pattern`.\n// It returns an array with matching values of the type:\n//\n// [{\n// string: '<b>lah' // The rendered string\n// , index: 2 // The index of the element in `arr`\n// , original: 'blah' // The original element in `arr`\n// }]\n//\n// `opts` is an optional argument bag. Details:\n//\n// opts = {\n// // string to put before a matching character\n// pre: '<b>'\n//\n// // string to put after matching character\n// , post: '</b>'\n//\n// // Optional function. Input is an entry in the given arr`,\n// // output should be the string to test `pattern` against.\n// // In this example, if `arr = [{crying: 'koala'}]` we would return\n// // 'koala'.\n// , extract: function(arg) { return arg.crying; }\n// }\nfuzzy.filter = function(pattern, arr, opts) {\n if(!arr || arr.length === 0) {\n return [];\n }\n if (typeof pattern !== 'string') {\n return arr;\n }\n opts = opts || {};\n return arr\n .reduce(function(prev, element, idx, arr) {\n var str = element;\n if(opts.extract) {\n str = opts.extract(element);\n }\n var rendered = fuzzy.match(pattern, str, opts);\n if(rendered != null) {\n prev[prev.length] = {\n string: rendered.rendered\n , score: rendered.score\n , index: idx\n , original: element\n };\n }\n return prev;\n }, [])\n\n // Sort by score. Browsers are inconsistent wrt stable/unstable\n // sorting, so force stable by using the index in the case of tie.\n // See http://ofb.net/~sethml/is-sort-stable.html\n .sort(function(a,b) {\n var compare = b.score - a.score;\n if(compare) return compare;\n return a.index - b.index;\n });\n};\n\n\n}());\n\n","'use strict';\n\n\n////////////////////////////////////////////////////////////////////////////////\n// Helpers\n\n// Merge objects\n//\nfunction assign(obj /*from1, from2, from3, ...*/) {\n var sources = Array.prototype.slice.call(arguments, 1);\n\n sources.forEach(function (source) {\n if (!source) { return; }\n\n Object.keys(source).forEach(function (key) {\n obj[key] = source[key];\n });\n });\n\n return obj;\n}\n\nfunction _class(obj) { return Object.prototype.toString.call(obj); }\nfunction isString(obj) { return _class(obj) === '[object String]'; }\nfunction isObject(obj) { return _class(obj) === '[object Object]'; }\nfunction isRegExp(obj) { return _class(obj) === '[object RegExp]'; }\nfunction isFunction(obj) { return _class(obj) === '[object Function]'; }\n\n\nfunction escapeRE(str) { return str.replace(/[.?*+^$[\\]\\\\(){}|-]/g, '\\\\$&'); }\n\n////////////////////////////////////////////////////////////////////////////////\n\n\nvar defaultOptions = {\n fuzzyLink: true,\n fuzzyEmail: true,\n fuzzyIP: false\n};\n\n\nfunction isOptionsObj(obj) {\n return Object.keys(obj || {}).reduce(function (acc, k) {\n return acc || defaultOptions.hasOwnProperty(k);\n }, false);\n}\n\n\nvar defaultSchemas = {\n 'http:': {\n validate: function (text, pos, self) {\n var tail = text.slice(pos);\n\n if (!self.re.http) {\n // compile lazily, because \"host\"-containing variables can change on tlds update.\n self.re.http = new RegExp(\n '^\\\\/\\\\/' + self.re.src_auth + self.re.src_host_port_strict + self.re.src_path, 'i'\n );\n }\n if (self.re.http.test(tail)) {\n return tail.match(self.re.http)[0].length;\n }\n return 0;\n }\n },\n 'https:': 'http:',\n 'ftp:': 'http:',\n '//': {\n validate: function (text, pos, self) {\n var tail = text.slice(pos);\n\n if (!self.re.no_http) {\n // compile lazily, because \"host\"-containing variables can change on tlds update.\n self.re.no_http = new RegExp(\n '^' +\n self.re.src_auth +\n // Don't allow single-level domains, because of false positives like '//test'\n // with code comments\n '(?:localhost|(?:(?:' + self.re.src_domain + ')\\\\.)+' + self.re.src_domain_root + ')' +\n self.re.src_port +\n self.re.src_host_terminator +\n self.re.src_path,\n\n 'i'\n );\n }\n\n if (self.re.no_http.test(tail)) {\n // should not be `://` & `///`, that protects from errors in protocol name\n if (pos >= 3 && text[pos - 3] === ':') { return 0; }\n if (pos >= 3 && text[pos - 3] === '/') { return 0; }\n return tail.match(self.re.no_http)[0].length;\n }\n return 0;\n }\n },\n 'mailto:': {\n validate: function (text, pos, self) {\n var tail = text.slice(pos);\n\n if (!self.re.mailto) {\n self.re.mailto = new RegExp(\n '^' + self.re.src_email_name + '@' + self.re.src_host_strict, 'i'\n );\n }\n if (self.re.mailto.test(tail)) {\n return tail.match(self.re.mailto)[0].length;\n }\n return 0;\n }\n }\n};\n\n/*eslint-disable max-len*/\n\n// RE pattern for 2-character tlds (autogenerated by ./support/tlds_2char_gen.js)\nvar tlds_2ch_src_re = 'a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]';\n\n// DON'T try to make PRs with changes. Extend TLDs with LinkifyIt.tlds() instead\nvar tlds_default = 'biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф'.split('|');\n\n/*eslint-enable max-len*/\n\n////////////////////////////////////////////////////////////////////////////////\n\nfunction resetScanCache(self) {\n self.__index__ = -1;\n self.__text_cache__ = '';\n}\n\nfunction createValidator(re) {\n return function (text, pos) {\n var tail = text.slice(pos);\n\n if (re.test(tail)) {\n return tail.match(re)[0].length;\n }\n return 0;\n };\n}\n\nfunction createNormalizer() {\n return function (match, self) {\n self.normalize(match);\n };\n}\n\n// Schemas compiler. Build regexps.\n//\nfunction compile(self) {\n\n // Load & clone RE patterns.\n var re = self.re = require('./lib/re')(self.__opts__);\n\n // Define dynamic patterns\n var tlds = self.__tlds__.slice();\n\n self.onCompile();\n\n if (!self.__tlds_replaced__) {\n tlds.push(tlds_2ch_src_re);\n }\n tlds.push(re.src_xn);\n\n re.src_tlds = tlds.join('|');\n\n function untpl(tpl) { return tpl.replace('%TLDS%', re.src_tlds); }\n\n re.email_fuzzy = RegExp(untpl(re.tpl_email_fuzzy), 'i');\n re.link_fuzzy = RegExp(untpl(re.tpl_link_fuzzy), 'i');\n re.link_no_ip_fuzzy = RegExp(untpl(re.tpl_link_no_ip_fuzzy), 'i');\n re.host_fuzzy_test = RegExp(untpl(re.tpl_host_fuzzy_test), 'i');\n\n //\n // Compile each schema\n //\n\n var aliases = [];\n\n self.__compiled__ = {}; // Reset compiled data\n\n function schemaError(name, val) {\n throw new Error('(LinkifyIt) Invalid schema \"' + name + '\": ' + val);\n }\n\n Object.keys(self.__schemas__).forEach(function (name) {\n var val = self.__schemas__[name];\n\n // skip disabled methods\n if (val === null) { return; }\n\n var compiled = { validate: null, link: null };\n\n self.__compiled__[name] = compiled;\n\n if (isObject(val)) {\n if (isRegExp(val.validate)) {\n compiled.validate = createValidator(val.validate);\n } else if (isFunction(val.validate)) {\n compiled.validate = val.validate;\n } else {\n schemaError(name, val);\n }\n\n if (isFunction(val.normalize)) {\n compiled.normalize = val.normalize;\n } else if (!val.normalize) {\n compiled.normalize = createNormalizer();\n } else {\n schemaError(name, val);\n }\n\n return;\n }\n\n if (isString(val)) {\n aliases.push(name);\n return;\n }\n\n schemaError(name, val);\n });\n\n //\n // Compile postponed aliases\n //\n\n aliases.forEach(function (alias) {\n if (!self.__compiled__[self.__schemas__[alias]]) {\n // Silently fail on missed schemas to avoid errons on disable.\n // schemaError(alias, self.__schemas__[alias]);\n return;\n }\n\n self.__compiled__[alias].validate =\n self.__compiled__[self.__schemas__[alias]].validate;\n self.__compiled__[alias].normalize =\n self.__compiled__[self.__schemas__[alias]].normalize;\n });\n\n //\n // Fake record for guessed links\n //\n self.__compiled__[''] = { validate: null, normalize: createNormalizer() };\n\n //\n // Build schema condition\n //\n var slist = Object.keys(self.__compiled__)\n .filter(function (name) {\n // Filter disabled & fake schemas\n return name.length > 0 && self.__compiled__[name];\n })\n .map(escapeRE)\n .join('|');\n // (?!_) cause 1.5x slowdown\n self.re.schema_test = RegExp('(^|(?!_)(?:[><\\uff5c]|' + re.src_ZPCc + '))(' + slist + ')', 'i');\n self.re.schema_search = RegExp('(^|(?!_)(?:[><\\uff5c]|' + re.src_ZPCc + '))(' + slist + ')', 'ig');\n\n self.re.pretest = RegExp(\n '(' + self.re.schema_test.source + ')|(' + self.re.host_fuzzy_test.source + ')|@',\n 'i'\n );\n\n //\n // Cleanup\n //\n\n resetScanCache(self);\n}\n\n/**\n * class Match\n *\n * Match result. Single element of array, returned by [[LinkifyIt#match]]\n **/\nfunction Match(self, shift) {\n var start = self.__index__,\n end = self.__last_index__,\n text = self.__text_cache__.slice(start, end);\n\n /**\n * Match#schema -> String\n *\n * Prefix (protocol) for matched string.\n **/\n this.schema = self.__schema__.toLowerCase();\n /**\n * Match#index -> Number\n *\n * First position of matched string.\n **/\n this.index = start + shift;\n /**\n * Match#lastIndex -> Number\n *\n * Next position after matched string.\n **/\n this.lastIndex = end + shift;\n /**\n * Match#raw -> String\n *\n * Matched string.\n **/\n this.raw = text;\n /**\n * Match#text -> String\n *\n * Notmalized text of matched string.\n **/\n this.text = text;\n /**\n * Match#url -> String\n *\n * Normalized url of matched string.\n **/\n this.url = text;\n}\n\nfunction createMatch(self, shift) {\n var match = new Match(self, shift);\n\n self.__compiled__[match.schema].normalize(match, self);\n\n return match;\n}\n\n\n/**\n * class LinkifyIt\n **/\n\n/**\n * new LinkifyIt(schemas, options)\n * - schemas (Object): Optional. Additional schemas to validate (prefix/validator)\n * - options (Object): { fuzzyLink|fuzzyEmail|fuzzyIP: true|false }\n *\n * Creates new linkifier instance with optional additional schemas.\n * Can be called without `new` keyword for convenience.\n *\n * By default understands:\n *\n * - `http(s)://...` , `ftp://...`, `mailto:...` & `//...` links\n * - \"fuzzy\" links and emails (example.com, foo@bar.com).\n *\n * `schemas` is an object, where each key/value describes protocol/rule:\n *\n * - __key__ - link prefix (usually, protocol name with `:` at the end, `skype:`\n * for example). `linkify-it` makes shure that prefix is not preceeded with\n * alphanumeric char and symbols. Only whitespaces and punctuation allowed.\n * - __value__ - rule to check tail after link prefix\n * - _String_ - just alias to existing rule\n * - _Object_\n * - _validate_ - validator function (should return matched length on success),\n * or `RegExp`.\n * - _normalize_ - optional function to normalize text & url of matched result\n * (for example, for @twitter mentions).\n *\n * `options`:\n *\n * - __fuzzyLink__ - recognige URL-s without `http(s):` prefix. Default `true`.\n * - __fuzzyIP__ - allow IPs in fuzzy links above. Can conflict with some texts\n * like version numbers. Default `false`.\n * - __fuzzyEmail__ - recognize emails without `mailto:` prefix.\n *\n **/\nfunction LinkifyIt(schemas, options) {\n if (!(this instanceof LinkifyIt)) {\n return new LinkifyIt(schemas, options);\n }\n\n if (!options) {\n if (isOptionsObj(schemas)) {\n options = schemas;\n schemas = {};\n }\n }\n\n this.__opts__ = assign({}, defaultOptions, options);\n\n // Cache last tested result. Used to skip repeating steps on next `match` call.\n this.__index__ = -1;\n this.__last_index__ = -1; // Next scan position\n this.__schema__ = '';\n this.__text_cache__ = '';\n\n this.__schemas__ = assign({}, defaultSchemas, schemas);\n this.__compiled__ = {};\n\n this.__tlds__ = tlds_default;\n this.__tlds_replaced__ = false;\n\n this.re = {};\n\n compile(this);\n}\n\n\n/** chainable\n * LinkifyIt#add(schema, definition)\n * - schema (String): rule name (fixed pattern prefix)\n * - definition (String|RegExp|Object): schema definition\n *\n * Add new rule definition. See constructor description for details.\n **/\nLinkifyIt.prototype.add = function add(schema, definition) {\n this.__schemas__[schema] = definition;\n compile(this);\n return this;\n};\n\n\n/** chainable\n * LinkifyIt#set(options)\n * - options (Object): { fuzzyLink|fuzzyEmail|fuzzyIP: true|false }\n *\n * Set recognition options for links without schema.\n **/\nLinkifyIt.prototype.set = function set(options) {\n this.__opts__ = assign(this.__opts__, options);\n return this;\n};\n\n\n/**\n * LinkifyIt#test(text) -> Boolean\n *\n * Searches linkifiable pattern and returns `true` on success or `false` on fail.\n **/\nLinkifyIt.prototype.test = function test(text) {\n // Reset scan cache\n this.__text_cache__ = text;\n this.__index__ = -1;\n\n if (!text.length) { return false; }\n\n var m, ml, me, len, shift, next, re, tld_pos, at_pos;\n\n // try to scan for link with schema - that's the most simple rule\n if (this.re.schema_test.test(text)) {\n re = this.re.schema_search;\n re.lastIndex = 0;\n while ((m = re.exec(text)) !== null) {\n len = this.testSchemaAt(text, m[2], re.lastIndex);\n if (len) {\n this.__schema__ = m[2];\n this.__index__ = m.index + m[1].length;\n this.__last_index__ = m.index + m[0].length + len;\n break;\n }\n }\n }\n\n if (this.__opts__.fuzzyLink && this.__compiled__['http:']) {\n // guess schemaless links\n tld_pos = text.search(this.re.host_fuzzy_test);\n if (tld_pos >= 0) {\n // if tld is located after found link - no need to check fuzzy pattern\n if (this.__index__ < 0 || tld_pos < this.__index__) {\n if ((ml = text.match(this.__opts__.fuzzyIP ? this.re.link_fuzzy : this.re.link_no_ip_fuzzy)) !== null) {\n\n shift = ml.index + ml[1].length;\n\n if (this.__index__ < 0 || shift < this.__index__) {\n this.__schema__ = '';\n this.__index__ = shift;\n this.__last_index__ = ml.index + ml[0].length;\n }\n }\n }\n }\n }\n\n if (this.__opts__.fuzzyEmail && this.__compiled__['mailto:']) {\n // guess schemaless emails\n at_pos = text.indexOf('@');\n if (at_pos >= 0) {\n // We can't skip this check, because this cases are possible:\n // 192.168.1.1@gmail.com, my.in@example.com\n if ((me = text.match(this.re.email_fuzzy)) !== null) {\n\n shift = me.index + me[1].length;\n next = me.index + me[0].length;\n\n if (this.__index__ < 0 || shift < this.__index__ ||\n (shift === this.__index__ && next > this.__last_index__)) {\n this.__schema__ = 'mailto:';\n this.__index__ = shift;\n this.__last_index__ = next;\n }\n }\n }\n }\n\n return this.__index__ >= 0;\n};\n\n\n/**\n * LinkifyIt#pretest(text) -> Boolean\n *\n * Very quick check, that can give false positives. Returns true if link MAY BE\n * can exists. Can be used for speed optimization, when you need to check that\n * link NOT exists.\n **/\nLinkifyIt.prototype.pretest = function pretest(text) {\n return this.re.pretest.test(text);\n};\n\n\n/**\n * LinkifyIt#testSchemaAt(text, name, position) -> Number\n * - text (String): text to scan\n * - name (String): rule (schema) name\n * - position (Number): text offset to check from\n *\n * Similar to [[LinkifyIt#test]] but checks only specific protocol tail exactly\n * at given position. Returns length of found pattern (0 on fail).\n **/\nLinkifyIt.prototype.testSchemaAt = function testSchemaAt(text, schema, pos) {\n // If not supported schema check requested - terminate\n if (!this.__compiled__[schema.toLowerCase()]) {\n return 0;\n }\n return this.__compiled__[schema.toLowerCase()].validate(text, pos, this);\n};\n\n\n/**\n * LinkifyIt#match(text) -> Array|null\n *\n * Returns array of found link descriptions or `null` on fail. We strongly\n * recommend to use [[LinkifyIt#test]] first, for best speed.\n *\n * ##### Result match description\n *\n * - __schema__ - link schema, can be empty for fuzzy links, or `//` for\n * protocol-neutral links.\n * - __index__ - offset of matched text\n * - __lastIndex__ - index of next char after mathch end\n * - __raw__ - matched text\n * - __text__ - normalized text\n * - __url__ - link, generated from matched text\n **/\nLinkifyIt.prototype.match = function match(text) {\n var shift = 0, result = [];\n\n // Try to take previous element from cache, if .test() called before\n if (this.__index__ >= 0 && this.__text_cache__ === text) {\n result.push(createMatch(this, shift));\n shift = this.__last_index__;\n }\n\n // Cut head if cache was used\n var tail = shift ? text.slice(shift) : text;\n\n // Scan string until end reached\n while (this.test(tail)) {\n result.push(createMatch(this, shift));\n\n tail = tail.slice(this.__last_index__);\n shift += this.__last_index__;\n }\n\n if (result.length) {\n return result;\n }\n\n return null;\n};\n\n\n/** chainable\n * LinkifyIt#tlds(list [, keepOld]) -> this\n * - list (Array): list of tlds\n * - keepOld (Boolean): merge with current list if `true` (`false` by default)\n *\n * Load (or merge) new tlds list. Those are user for fuzzy links (without prefix)\n * to avoid false positives. By default this algorythm used:\n *\n * - hostname with any 2-letter root zones are ok.\n * - biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф\n * are ok.\n * - encoded (`xn--...`) root zones are ok.\n *\n * If list is replaced, then exact match for 2-chars root zones will be checked.\n **/\nLinkifyIt.prototype.tlds = function tlds(list, keepOld) {\n list = Array.isArray(list) ? list : [ list ];\n\n if (!keepOld) {\n this.__tlds__ = list.slice();\n this.__tlds_replaced__ = true;\n compile(this);\n return this;\n }\n\n this.__tlds__ = this.__tlds__.concat(list)\n .sort()\n .filter(function (el, idx, arr) {\n return el !== arr[idx - 1];\n })\n .reverse();\n\n compile(this);\n return this;\n};\n\n/**\n * LinkifyIt#normalize(match)\n *\n * Default normalizer (if schema does not define it's own).\n **/\nLinkifyIt.prototype.normalize = function normalize(match) {\n\n // Do minimal possible changes by default. Need to collect feedback prior\n // to move forward https://github.com/markdown-it/linkify-it/issues/1\n\n if (!match.schema) { match.url = 'http://' + match.url; }\n\n if (match.schema === 'mailto:' && !/^mailto:/i.test(match.url)) {\n match.url = 'mailto:' + match.url;\n }\n};\n\n\n/**\n * LinkifyIt#onCompile()\n *\n * Override to modify basic RegExp-s.\n **/\nLinkifyIt.prototype.onCompile = function onCompile() {\n};\n\n\nmodule.exports = LinkifyIt;\n","'use strict';\n\n\nmodule.exports = function (opts) {\n var re = {};\n\n // Use direct extract instead of `regenerate` to reduse browserified size\n re.src_Any = require('uc.micro/properties/Any/regex').source;\n re.src_Cc = require('uc.micro/categories/Cc/regex').source;\n re.src_Z = require('uc.micro/categories/Z/regex').source;\n re.src_P = require('uc.micro/categories/P/regex').source;\n\n // \\p{\\Z\\P\\Cc\\CF} (white spaces + control + format + punctuation)\n re.src_ZPCc = [ re.src_Z, re.src_P, re.src_Cc ].join('|');\n\n // \\p{\\Z\\Cc} (white spaces + control)\n re.src_ZCc = [ re.src_Z, re.src_Cc ].join('|');\n\n // Experimental. List of chars, completely prohibited in links\n // because can separate it from other part of text\n var text_separators = '[><\\uff5c]';\n\n // All possible word characters (everything without punctuation, spaces & controls)\n // Defined via punctuation & spaces to save space\n // Should be something like \\p{\\L\\N\\S\\M} (\\w but without `_`)\n re.src_pseudo_letter = '(?:(?!' + text_separators + '|' + re.src_ZPCc + ')' + re.src_Any + ')';\n // The same as abothe but without [0-9]\n // var src_pseudo_letter_non_d = '(?:(?![0-9]|' + src_ZPCc + ')' + src_Any + ')';\n\n ////////////////////////////////////////////////////////////////////////////////\n\n re.src_ip4 =\n\n '(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)';\n\n // Prohibit any of \"@/[]()\" in user/pass to avoid wrong domain fetch.\n re.src_auth = '(?:(?:(?!' + re.src_ZCc + '|[@/\\\\[\\\\]()]).)+@)?';\n\n re.src_port =\n\n '(?::(?:6(?:[0-4]\\\\d{3}|5(?:[0-4]\\\\d{2}|5(?:[0-2]\\\\d|3[0-5])))|[1-5]?\\\\d{1,4}))?';\n\n re.src_host_terminator =\n\n '(?=$|' + text_separators + '|' + re.src_ZPCc + ')(?!-|_|:\\\\d|\\\\.-|\\\\.(?!$|' + re.src_ZPCc + '))';\n\n re.src_path =\n\n '(?:' +\n '[/?#]' +\n '(?:' +\n '(?!' + re.src_ZCc + '|' + text_separators + '|[()[\\\\]{}.,\"\\'?!\\\\-;]).|' +\n '\\\\[(?:(?!' + re.src_ZCc + '|\\\\]).)*\\\\]|' +\n '\\\\((?:(?!' + re.src_ZCc + '|[)]).)*\\\\)|' +\n '\\\\{(?:(?!' + re.src_ZCc + '|[}]).)*\\\\}|' +\n '\\\\\"(?:(?!' + re.src_ZCc + '|[\"]).)+\\\\\"|' +\n \"\\\\'(?:(?!\" + re.src_ZCc + \"|[']).)+\\\\'|\" +\n \"\\\\'(?=\" + re.src_pseudo_letter + '|[-]).|' + // allow `I'm_king` if no pair found\n '\\\\.{2,}[a-zA-Z0-9%/&]|' + // google has many dots in \"google search\" links (#66, #81).\n // github has ... in commit range links,\n // Restrict to\n // - english\n // - percent-encoded\n // - parts of file path\n // - params separator\n // until more examples found.\n '\\\\.(?!' + re.src_ZCc + '|[.]).|' +\n (opts && opts['---'] ?\n '\\\\-(?!--(?:[^-]|$))(?:-*)|' // `---` => long dash, terminate\n :\n '\\\\-+|'\n ) +\n ',(?!' + re.src_ZCc + ').|' + // allow `,,,` in paths\n ';(?!' + re.src_ZCc + ').|' + // allow `;` if not followed by space-like char\n '\\\\!+(?!' + re.src_ZCc + '|[!]).|' + // allow `!!!` in paths, but not at the end\n '\\\\?(?!' + re.src_ZCc + '|[?]).' +\n ')+' +\n '|\\\\/' +\n ')?';\n\n // Allow anything in markdown spec, forbid quote (\") at the first position\n // because emails enclosed in quotes are far more common\n re.src_email_name =\n\n '[\\\\-;:&=\\\\+\\\\$,\\\\.a-zA-Z0-9_][\\\\-;:&=\\\\+\\\\$,\\\\\"\\\\.a-zA-Z0-9_]*';\n\n re.src_xn =\n\n 'xn--[a-z0-9\\\\-]{1,59}';\n\n // More to read about domain names\n // http://serverfault.com/questions/638260/\n\n re.src_domain_root =\n\n // Allow letters & digits (http://test1)\n '(?:' +\n re.src_xn +\n '|' +\n re.src_pseudo_letter + '{1,63}' +\n ')';\n\n re.src_domain =\n\n '(?:' +\n re.src_xn +\n '|' +\n '(?:' + re.src_pseudo_letter + ')' +\n '|' +\n '(?:' + re.src_pseudo_letter + '(?:-|' + re.src_pseudo_letter + '){0,61}' + re.src_pseudo_letter + ')' +\n ')';\n\n re.src_host =\n\n '(?:' +\n // Don't need IP check, because digits are already allowed in normal domain names\n // src_ip4 +\n // '|' +\n '(?:(?:(?:' + re.src_domain + ')\\\\.)*' + re.src_domain/*_root*/ + ')' +\n ')';\n\n re.tpl_host_fuzzy =\n\n '(?:' +\n re.src_ip4 +\n '|' +\n '(?:(?:(?:' + re.src_domain + ')\\\\.)+(?:%TLDS%))' +\n ')';\n\n re.tpl_host_no_ip_fuzzy =\n\n '(?:(?:(?:' + re.src_domain + ')\\\\.)+(?:%TLDS%))';\n\n re.src_host_strict =\n\n re.src_host + re.src_host_terminator;\n\n re.tpl_host_fuzzy_strict =\n\n re.tpl_host_fuzzy + re.src_host_terminator;\n\n re.src_host_port_strict =\n\n re.src_host + re.src_port + re.src_host_terminator;\n\n re.tpl_host_port_fuzzy_strict =\n\n re.tpl_host_fuzzy + re.src_port + re.src_host_terminator;\n\n re.tpl_host_port_no_ip_fuzzy_strict =\n\n re.tpl_host_no_ip_fuzzy + re.src_port + re.src_host_terminator;\n\n\n ////////////////////////////////////////////////////////////////////////////////\n // Main rules\n\n // Rude test fuzzy links by host, for quick deny\n re.tpl_host_fuzzy_test =\n\n 'localhost|www\\\\.|\\\\.\\\\d{1,3}\\\\.|(?:\\\\.(?:%TLDS%)(?:' + re.src_ZPCc + '|>|$))';\n\n re.tpl_email_fuzzy =\n\n '(^|' + text_separators + '|\"|\\\\(|' + re.src_ZCc + ')' +\n '(' + re.src_email_name + '@' + re.tpl_host_fuzzy_strict + ')';\n\n re.tpl_link_fuzzy =\n // Fuzzy link can't be prepended with .:/\\- and non punctuation.\n // but can start with > (markdown blockquote)\n '(^|(?![.:/\\\\-_@])(?:[$+<=>^`|\\uff5c]|' + re.src_ZPCc + '))' +\n '((?![$+<=>^`|\\uff5c])' + re.tpl_host_port_fuzzy_strict + re.src_path + ')';\n\n re.tpl_link_no_ip_fuzzy =\n // Fuzzy link can't be prepended with .:/\\- and non punctuation.\n // but can start with > (markdown blockquote)\n '(^|(?![.:/\\\\-_@])(?:[$+<=>^`|\\uff5c]|' + re.src_ZPCc + '))' +\n '((?![$+<=>^`|\\uff5c])' + re.tpl_host_port_no_ip_fuzzy_strict + re.src_path + ')';\n\n return re;\n};\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nmodule.exports = arrayMap;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var Symbol = require('./_Symbol'),\n arrayMap = require('./_arrayMap'),\n isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = baseToString;\n","var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nmodule.exports = baseTrim;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nmodule.exports = trimmedEndIndex;\n","var isObject = require('./isObject'),\n now = require('./now'),\n toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nmodule.exports = debounce;\n","var toString = require('./toString');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g,\n reHasRegExpChar = RegExp(reRegExpChar.source);\n\n/**\n * Escapes the `RegExp` special characters \"^\", \"$\", \"\\\", \".\", \"*\", \"+\",\n * \"?\", \"(\", \")\", \"[\", \"]\", \"{\", \"}\", and \"|\" in `string`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escapeRegExp('[lodash](https://lodash.com/)');\n * // => '\\[lodash\\]\\(https://lodash\\.com/\\)'\n */\nfunction escapeRegExp(string) {\n string = toString(string);\n return (string && reHasRegExpChar.test(string))\n ? string.replace(reRegExpChar, '\\\\$&')\n : string;\n}\n\nmodule.exports = escapeRegExp;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nmodule.exports = now;\n","var debounce = require('./debounce'),\n isObject = require('./isObject');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n}\n\nmodule.exports = throttle;\n","var baseTrim = require('./_baseTrim'),\n isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n","var baseToString = require('./_baseToString');\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\nmodule.exports = toString;\n","/*global define:false */\n/**\n * Copyright 2012-2017 Craig Campbell\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * Mousetrap is a simple keyboard shortcut library for Javascript with\n * no external dependencies\n *\n * @version 1.6.5\n * @url craig.is/killing/mice\n */\n(function(window, document, undefined) {\n\n // Check if mousetrap is used inside browser, if not, return\n if (!window) {\n return;\n }\n\n /**\n * mapping of special keycodes to their corresponding keys\n *\n * everything in this dictionary cannot use keypress events\n * so it has to be here to map to the correct keycodes for\n * keyup/keydown events\n *\n * @type {Object}\n */\n var _MAP = {\n 8: 'backspace',\n 9: 'tab',\n 13: 'enter',\n 16: 'shift',\n 17: 'ctrl',\n 18: 'alt',\n 20: 'capslock',\n 27: 'esc',\n 32: 'space',\n 33: 'pageup',\n 34: 'pagedown',\n 35: 'end',\n 36: 'home',\n 37: 'left',\n 38: 'up',\n 39: 'right',\n 40: 'down',\n 45: 'ins',\n 46: 'del',\n 91: 'meta',\n 93: 'meta',\n 224: 'meta'\n };\n\n /**\n * mapping for special characters so they can support\n *\n * this dictionary is only used incase you want to bind a\n * keyup or keydown event to one of these keys\n *\n * @type {Object}\n */\n var _KEYCODE_MAP = {\n 106: '*',\n 107: '+',\n 109: '-',\n 110: '.',\n 111 : '/',\n 186: ';',\n 187: '=',\n 188: ',',\n 189: '-',\n 190: '.',\n 191: '/',\n 192: '`',\n 219: '[',\n 220: '\\\\',\n 221: ']',\n 222: '\\''\n };\n\n /**\n * this is a mapping of keys that require shift on a US keypad\n * back to the non shift equivelents\n *\n * this is so you can use keyup events with these keys\n *\n * note that this will only work reliably on US keyboards\n *\n * @type {Object}\n */\n var _SHIFT_MAP = {\n '~': '`',\n '!': '1',\n '@': '2',\n '#': '3',\n '$': '4',\n '%': '5',\n '^': '6',\n '&': '7',\n '*': '8',\n '(': '9',\n ')': '0',\n '_': '-',\n '+': '=',\n ':': ';',\n '\\\"': '\\'',\n '<': ',',\n '>': '.',\n '?': '/',\n '|': '\\\\'\n };\n\n /**\n * this is a list of special strings you can use to map\n * to modifier keys when you specify your keyboard shortcuts\n *\n * @type {Object}\n */\n var _SPECIAL_ALIASES = {\n 'option': 'alt',\n 'command': 'meta',\n 'return': 'enter',\n 'escape': 'esc',\n 'plus': '+',\n 'mod': /Mac|iPod|iPhone|iPad/.test(navigator.platform) ? 'meta' : 'ctrl'\n };\n\n /**\n * variable to store the flipped version of _MAP from above\n * needed to check if we should use keypress or not when no action\n * is specified\n *\n * @type {Object|undefined}\n */\n var _REVERSE_MAP;\n\n /**\n * loop through the f keys, f1 to f19 and add them to the map\n * programatically\n */\n for (var i = 1; i < 20; ++i) {\n _MAP[111 + i] = 'f' + i;\n }\n\n /**\n * loop through to map numbers on the numeric keypad\n */\n for (i = 0; i <= 9; ++i) {\n\n // This needs to use a string cause otherwise since 0 is falsey\n // mousetrap will never fire for numpad 0 pressed as part of a keydown\n // event.\n //\n // @see https://github.com/ccampbell/mousetrap/pull/258\n _MAP[i + 96] = i.toString();\n }\n\n /**\n * cross browser add event method\n *\n * @param {Element|HTMLDocument} object\n * @param {string} type\n * @param {Function} callback\n * @returns void\n */\n function _addEvent(object, type, callback) {\n if (object.addEventListener) {\n object.addEventListener(type, callback, false);\n return;\n }\n\n object.attachEvent('on' + type, callback);\n }\n\n /**\n * takes the event and returns the key character\n *\n * @param {Event} e\n * @return {string}\n */\n function _characterFromEvent(e) {\n\n // for keypress events we should return the character as is\n if (e.type == 'keypress') {\n var character = String.fromCharCode(e.which);\n\n // if the shift key is not pressed then it is safe to assume\n // that we want the character to be lowercase. this means if\n // you accidentally have caps lock on then your key bindings\n // will continue to work\n //\n // the only side effect that might not be desired is if you\n // bind something like 'A' cause you want to trigger an\n // event when capital A is pressed caps lock will no longer\n // trigger the event. shift+a will though.\n if (!e.shiftKey) {\n character = character.toLowerCase();\n }\n\n return character;\n }\n\n // for non keypress events the special maps are needed\n if (_MAP[e.which]) {\n return _MAP[e.which];\n }\n\n if (_KEYCODE_MAP[e.which]) {\n return _KEYCODE_MAP[e.which];\n }\n\n // if it is not in the special map\n\n // with keydown and keyup events the character seems to always\n // come in as an uppercase character whether you are pressing shift\n // or not. we should make sure it is always lowercase for comparisons\n return String.fromCharCode(e.which).toLowerCase();\n }\n\n /**\n * checks if two arrays are equal\n *\n * @param {Array} modifiers1\n * @param {Array} modifiers2\n * @returns {boolean}\n */\n function _modifiersMatch(modifiers1, modifiers2) {\n return modifiers1.sort().join(',') === modifiers2.sort().join(',');\n }\n\n /**\n * takes a key event and figures out what the modifiers are\n *\n * @param {Event} e\n * @returns {Array}\n */\n function _eventModifiers(e) {\n var modifiers = [];\n\n if (e.shiftKey) {\n modifiers.push('shift');\n }\n\n if (e.altKey) {\n modifiers.push('alt');\n }\n\n if (e.ctrlKey) {\n modifiers.push('ctrl');\n }\n\n if (e.metaKey) {\n modifiers.push('meta');\n }\n\n return modifiers;\n }\n\n /**\n * prevents default for this event\n *\n * @param {Event} e\n * @returns void\n */\n function _preventDefault(e) {\n if (e.preventDefault) {\n e.preventDefault();\n return;\n }\n\n e.returnValue = false;\n }\n\n /**\n * stops propogation for this event\n *\n * @param {Event} e\n * @returns void\n */\n function _stopPropagation(e) {\n if (e.stopPropagation) {\n e.stopPropagation();\n return;\n }\n\n e.cancelBubble = true;\n }\n\n /**\n * determines if the keycode specified is a modifier key or not\n *\n * @param {string} key\n * @returns {boolean}\n */\n function _isModifier(key) {\n return key == 'shift' || key == 'ctrl' || key == 'alt' || key == 'meta';\n }\n\n /**\n * reverses the map lookup so that we can look for specific keys\n * to see what can and can't use keypress\n *\n * @return {Object}\n */\n function _getReverseMap() {\n if (!_REVERSE_MAP) {\n _REVERSE_MAP = {};\n for (var key in _MAP) {\n\n // pull out the numeric keypad from here cause keypress should\n // be able to detect the keys from the character\n if (key > 95 && key < 112) {\n continue;\n }\n\n if (_MAP.hasOwnProperty(key)) {\n _REVERSE_MAP[_MAP[key]] = key;\n }\n }\n }\n return _REVERSE_MAP;\n }\n\n /**\n * picks the best action based on the key combination\n *\n * @param {string} key - character for key\n * @param {Array} modifiers\n * @param {string=} action passed in\n */\n function _pickBestAction(key, modifiers, action) {\n\n // if no action was picked in we should try to pick the one\n // that we think would work best for this key\n if (!action) {\n action = _getReverseMap()[key] ? 'keydown' : 'keypress';\n }\n\n // modifier keys don't work as expected with keypress,\n // switch to keydown\n if (action == 'keypress' && modifiers.length) {\n action = 'keydown';\n }\n\n return action;\n }\n\n /**\n * Converts from a string key combination to an array\n *\n * @param {string} combination like \"command+shift+l\"\n * @return {Array}\n */\n function _keysFromString(combination) {\n if (combination === '+') {\n return ['+'];\n }\n\n combination = combination.replace(/\\+{2}/g, '+plus');\n return combination.split('+');\n }\n\n /**\n * Gets info for a specific key combination\n *\n * @param {string} combination key combination (\"command+s\" or \"a\" or \"*\")\n * @param {string=} action\n * @returns {Object}\n */\n function _getKeyInfo(combination, action) {\n var keys;\n var key;\n var i;\n var modifiers = [];\n\n // take the keys from this pattern and figure out what the actual\n // pattern is all about\n keys = _keysFromString(combination);\n\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n\n // normalize key names\n if (_SPECIAL_ALIASES[key]) {\n key = _SPECIAL_ALIASES[key];\n }\n\n // if this is not a keypress event then we should\n // be smart about using shift keys\n // this will only work for US keyboards however\n if (action && action != 'keypress' && _SHIFT_MAP[key]) {\n key = _SHIFT_MAP[key];\n modifiers.push('shift');\n }\n\n // if this key is a modifier then add it to the list of modifiers\n if (_isModifier(key)) {\n modifiers.push(key);\n }\n }\n\n // depending on what the key combination is\n // we will try to pick the best event for it\n action = _pickBestAction(key, modifiers, action);\n\n return {\n key: key,\n modifiers: modifiers,\n action: action\n };\n }\n\n function _belongsTo(element, ancestor) {\n if (element === null || element === document) {\n return false;\n }\n\n if (element === ancestor) {\n return true;\n }\n\n return _belongsTo(element.parentNode, ancestor);\n }\n\n function Mousetrap(targetElement) {\n var self = this;\n\n targetElement = targetElement || document;\n\n if (!(self instanceof Mousetrap)) {\n return new Mousetrap(targetElement);\n }\n\n /**\n * element to attach key events to\n *\n * @type {Element}\n */\n self.target = targetElement;\n\n /**\n * a list of all the callbacks setup via Mousetrap.bind()\n *\n * @type {Object}\n */\n self._callbacks = {};\n\n /**\n * direct map of string combinations to callbacks used for trigger()\n *\n * @type {Object}\n */\n self._directMap = {};\n\n /**\n * keeps track of what level each sequence is at since multiple\n * sequences can start out with the same sequence\n *\n * @type {Object}\n */\n var _sequenceLevels = {};\n\n /**\n * variable to store the setTimeout call\n *\n * @type {null|number}\n */\n var _resetTimer;\n\n /**\n * temporary state where we will ignore the next keyup\n *\n * @type {boolean|string}\n */\n var _ignoreNextKeyup = false;\n\n /**\n * temporary state where we will ignore the next keypress\n *\n * @type {boolean}\n */\n var _ignoreNextKeypress = false;\n\n /**\n * are we currently inside of a sequence?\n * type of action (\"keyup\" or \"keydown\" or \"keypress\") or false\n *\n * @type {boolean|string}\n */\n var _nextExpectedAction = false;\n\n /**\n * resets all sequence counters except for the ones passed in\n *\n * @param {Object} doNotReset\n * @returns void\n */\n function _resetSequences(doNotReset) {\n doNotReset = doNotReset || {};\n\n var activeSequences = false,\n key;\n\n for (key in _sequenceLevels) {\n if (doNotReset[key]) {\n activeSequences = true;\n continue;\n }\n _sequenceLevels[key] = 0;\n }\n\n if (!activeSequences) {\n _nextExpectedAction = false;\n }\n }\n\n /**\n * finds all callbacks that match based on the keycode, modifiers,\n * and action\n *\n * @param {string} character\n * @param {Array} modifiers\n * @param {Event|Object} e\n * @param {string=} sequenceName - name of the sequence we are looking for\n * @param {string=} combination\n * @param {number=} level\n * @returns {Array}\n */\n function _getMatches(character, modifiers, e, sequenceName, combination, level) {\n var i;\n var callback;\n var matches = [];\n var action = e.type;\n\n // if there are no events related to this keycode\n if (!self._callbacks[character]) {\n return [];\n }\n\n // if a modifier key is coming up on its own we should allow it\n if (action == 'keyup' && _isModifier(character)) {\n modifiers = [character];\n }\n\n // loop through all callbacks for the key that was pressed\n // and see if any of them match\n for (i = 0; i < self._callbacks[character].length; ++i) {\n callback = self._callbacks[character][i];\n\n // if a sequence name is not specified, but this is a sequence at\n // the wrong level then move onto the next match\n if (!sequenceName && callback.seq && _sequenceLevels[callback.seq] != callback.level) {\n continue;\n }\n\n // if the action we are looking for doesn't match the action we got\n // then we should keep going\n if (action != callback.action) {\n continue;\n }\n\n // if this is a keypress event and the meta key and control key\n // are not pressed that means that we need to only look at the\n // character, otherwise check the modifiers as well\n //\n // chrome will not fire a keypress if meta or control is down\n // safari will fire a keypress if meta or meta+shift is down\n // firefox will fire a keypress if meta or control is down\n if ((action == 'keypress' && !e.metaKey && !e.ctrlKey) || _modifiersMatch(modifiers, callback.modifiers)) {\n\n // when you bind a combination or sequence a second time it\n // should overwrite the first one. if a sequenceName or\n // combination is specified in this call it does just that\n //\n // @todo make deleting its own method?\n var deleteCombo = !sequenceName && callback.combo == combination;\n var deleteSequence = sequenceName && callback.seq == sequenceName && callback.level == level;\n if (deleteCombo || deleteSequence) {\n self._callbacks[character].splice(i, 1);\n }\n\n matches.push(callback);\n }\n }\n\n return matches;\n }\n\n /**\n * actually calls the callback function\n *\n * if your callback function returns false this will use the jquery\n * convention - prevent default and stop propogation on the event\n *\n * @param {Function} callback\n * @param {Event} e\n * @returns void\n */\n function _fireCallback(callback, e, combo, sequence) {\n\n // if this event should not happen stop here\n if (self.stopCallback(e, e.target || e.srcElement, combo, sequence)) {\n return;\n }\n\n if (callback(e, combo) === false) {\n _preventDefault(e);\n _stopPropagation(e);\n }\n }\n\n /**\n * handles a character key event\n *\n * @param {string} character\n * @param {Array} modifiers\n * @param {Event} e\n * @returns void\n */\n self._handleKey = function(character, modifiers, e) {\n var callbacks = _getMatches(character, modifiers, e);\n var i;\n var doNotReset = {};\n var maxLevel = 0;\n var processedSequenceCallback = false;\n\n // Calculate the maxLevel for sequences so we can only execute the longest callback sequence\n for (i = 0; i < callbacks.length; ++i) {\n if (callbacks[i].seq) {\n maxLevel = Math.max(maxLevel, callbacks[i].level);\n }\n }\n\n // loop through matching callbacks for this key event\n for (i = 0; i < callbacks.length; ++i) {\n\n // fire for all sequence callbacks\n // this is because if for example you have multiple sequences\n // bound such as \"g i\" and \"g t\" they both need to fire the\n // callback for matching g cause otherwise you can only ever\n // match the first one\n if (callbacks[i].seq) {\n\n // only fire callbacks for the maxLevel to prevent\n // subsequences from also firing\n //\n // for example 'a option b' should not cause 'option b' to fire\n // even though 'option b' is part of the other sequence\n //\n // any sequences that do not match here will be discarded\n // below by the _resetSequences call\n if (callbacks[i].level != maxLevel) {\n continue;\n }\n\n processedSequenceCallback = true;\n\n // keep a list of which sequences were matches for later\n doNotReset[callbacks[i].seq] = 1;\n _fireCallback(callbacks[i].callback, e, callbacks[i].combo, callbacks[i].seq);\n continue;\n }\n\n // if there were no sequence matches but we are still here\n // that means this is a regular match so we should fire that\n if (!processedSequenceCallback) {\n _fireCallback(callbacks[i].callback, e, callbacks[i].combo);\n }\n }\n\n // if the key you pressed matches the type of sequence without\n // being a modifier (ie \"keyup\" or \"keypress\") then we should\n // reset all sequences that were not matched by this event\n //\n // this is so, for example, if you have the sequence \"h a t\" and you\n // type \"h e a r t\" it does not match. in this case the \"e\" will\n // cause the sequence to reset\n //\n // modifier keys are ignored because you can have a sequence\n // that contains modifiers such as \"enter ctrl+space\" and in most\n // cases the modifier key will be pressed before the next key\n //\n // also if you have a sequence such as \"ctrl+b a\" then pressing the\n // \"b\" key will trigger a \"keypress\" and a \"keydown\"\n //\n // the \"keydown\" is expected when there is a modifier, but the\n // \"keypress\" ends up matching the _nextExpectedAction since it occurs\n // after and that causes the sequence to reset\n //\n // we ignore keypresses in a sequence that directly follow a keydown\n // for the same character\n var ignoreThisKeypress = e.type == 'keypress' && _ignoreNextKeypress;\n if (e.type == _nextExpectedAction && !_isModifier(character) && !ignoreThisKeypress) {\n _resetSequences(doNotReset);\n }\n\n _ignoreNextKeypress = processedSequenceCallback && e.type == 'keydown';\n };\n\n /**\n * handles a keydown event\n *\n * @param {Event} e\n * @returns void\n */\n function _handleKeyEvent(e) {\n\n // normalize e.which for key events\n // @see http://stackoverflow.com/questions/4285627/javascript-keycode-vs-charcode-utter-confusion\n if (typeof e.which !== 'number') {\n e.which = e.keyCode;\n }\n\n var character = _characterFromEvent(e);\n\n // no character found then stop\n if (!character) {\n return;\n }\n\n // need to use === for the character check because the character can be 0\n if (e.type == 'keyup' && _ignoreNextKeyup === character) {\n _ignoreNextKeyup = false;\n return;\n }\n\n self.handleKey(character, _eventModifiers(e), e);\n }\n\n /**\n * called to set a 1 second timeout on the specified sequence\n *\n * this is so after each key press in the sequence you have 1 second\n * to press the next key before you have to start over\n *\n * @returns void\n */\n function _resetSequenceTimer() {\n clearTimeout(_resetTimer);\n _resetTimer = setTimeout(_resetSequences, 1000);\n }\n\n /**\n * binds a key sequence to an event\n *\n * @param {string} combo - combo specified in bind call\n * @param {Array} keys\n * @param {Function} callback\n * @param {string=} action\n * @returns void\n */\n function _bindSequence(combo, keys, callback, action) {\n\n // start off by adding a sequence level record for this combination\n // and setting the level to 0\n _sequenceLevels[combo] = 0;\n\n /**\n * callback to increase the sequence level for this sequence and reset\n * all other sequences that were active\n *\n * @param {string} nextAction\n * @returns {Function}\n */\n function _increaseSequence(nextAction) {\n return function() {\n _nextExpectedAction = nextAction;\n ++_sequenceLevels[combo];\n _resetSequenceTimer();\n };\n }\n\n /**\n * wraps the specified callback inside of another function in order\n * to reset all sequence counters as soon as this sequence is done\n *\n * @param {Event} e\n * @returns void\n */\n function _callbackAndReset(e) {\n _fireCallback(callback, e, combo);\n\n // we should ignore the next key up if the action is key down\n // or keypress. this is so if you finish a sequence and\n // release the key the final key will not trigger a keyup\n if (action !== 'keyup') {\n _ignoreNextKeyup = _characterFromEvent(e);\n }\n\n // weird race condition if a sequence ends with the key\n // another sequence begins with\n setTimeout(_resetSequences, 10);\n }\n\n // loop through keys one at a time and bind the appropriate callback\n // function. for any key leading up to the final one it should\n // increase the sequence. after the final, it should reset all sequences\n //\n // if an action is specified in the original bind call then that will\n // be used throughout. otherwise we will pass the action that the\n // next key in the sequence should match. this allows a sequence\n // to mix and match keypress and keydown events depending on which\n // ones are better suited to the key provided\n for (var i = 0; i < keys.length; ++i) {\n var isFinal = i + 1 === keys.length;\n var wrappedCallback = isFinal ? _callbackAndReset : _increaseSequence(action || _getKeyInfo(keys[i + 1]).action);\n _bindSingle(keys[i], wrappedCallback, action, combo, i);\n }\n }\n\n /**\n * binds a single keyboard combination\n *\n * @param {string} combination\n * @param {Function} callback\n * @param {string=} action\n * @param {string=} sequenceName - name of sequence if part of sequence\n * @param {number=} level - what part of the sequence the command is\n * @returns void\n */\n function _bindSingle(combination, callback, action, sequenceName, level) {\n\n // store a direct mapped reference for use with Mousetrap.trigger\n self._directMap[combination + ':' + action] = callback;\n\n // make sure multiple spaces in a row become a single space\n combination = combination.replace(/\\s+/g, ' ');\n\n var sequence = combination.split(' ');\n var info;\n\n // if this pattern is a sequence of keys then run through this method\n // to reprocess each pattern one key at a time\n if (sequence.length > 1) {\n _bindSequence(combination, sequence, callback, action);\n return;\n }\n\n info = _getKeyInfo(combination, action);\n\n // make sure to initialize array if this is the first time\n // a callback is added for this key\n self._callbacks[info.key] = self._callbacks[info.key] || [];\n\n // remove an existing match if there is one\n _getMatches(info.key, info.modifiers, {type: info.action}, sequenceName, combination, level);\n\n // add this call back to the array\n // if it is a sequence put it at the beginning\n // if not put it at the end\n //\n // this is important because the way these are processed expects\n // the sequence ones to come first\n self._callbacks[info.key][sequenceName ? 'unshift' : 'push']({\n callback: callback,\n modifiers: info.modifiers,\n action: info.action,\n seq: sequenceName,\n level: level,\n combo: combination\n });\n }\n\n /**\n * binds multiple combinations to the same callback\n *\n * @param {Array} combinations\n * @param {Function} callback\n * @param {string|undefined} action\n * @returns void\n */\n self._bindMultiple = function(combinations, callback, action) {\n for (var i = 0; i < combinations.length; ++i) {\n _bindSingle(combinations[i], callback, action);\n }\n };\n\n // start!\n _addEvent(targetElement, 'keypress', _handleKeyEvent);\n _addEvent(targetElement, 'keydown', _handleKeyEvent);\n _addEvent(targetElement, 'keyup', _handleKeyEvent);\n }\n\n /**\n * binds an event to mousetrap\n *\n * can be a single key, a combination of keys separated with +,\n * an array of keys, or a sequence of keys separated by spaces\n *\n * be sure to list the modifier keys first to make sure that the\n * correct key ends up getting bound (the last key in the pattern)\n *\n * @param {string|Array} keys\n * @param {Function} callback\n * @param {string=} action - 'keypress', 'keydown', or 'keyup'\n * @returns void\n */\n Mousetrap.prototype.bind = function(keys, callback, action) {\n var self = this;\n keys = keys instanceof Array ? keys : [keys];\n self._bindMultiple.call(self, keys, callback, action);\n return self;\n };\n\n /**\n * unbinds an event to mousetrap\n *\n * the unbinding sets the callback function of the specified key combo\n * to an empty function and deletes the corresponding key in the\n * _directMap dict.\n *\n * TODO: actually remove this from the _callbacks dictionary instead\n * of binding an empty function\n *\n * the keycombo+action has to be exactly the same as\n * it was defined in the bind method\n *\n * @param {string|Array} keys\n * @param {string} action\n * @returns void\n */\n Mousetrap.prototype.unbind = function(keys, action) {\n var self = this;\n return self.bind.call(self, keys, function() {}, action);\n };\n\n /**\n * triggers an event that has already been bound\n *\n * @param {string} keys\n * @param {string=} action\n * @returns void\n */\n Mousetrap.prototype.trigger = function(keys, action) {\n var self = this;\n if (self._directMap[keys + ':' + action]) {\n self._directMap[keys + ':' + action]({}, keys);\n }\n return self;\n };\n\n /**\n * resets the library back to its initial state. this is useful\n * if you want to clear out the current keyboard shortcuts and bind\n * new ones - for example if you switch to another page\n *\n * @returns void\n */\n Mousetrap.prototype.reset = function() {\n var self = this;\n self._callbacks = {};\n self._directMap = {};\n return self;\n };\n\n /**\n * should we stop this event before firing off callbacks\n *\n * @param {Event} e\n * @param {Element} element\n * @return {boolean}\n */\n Mousetrap.prototype.stopCallback = function(e, element) {\n var self = this;\n\n // if the element has the class \"mousetrap\" then no need to stop\n if ((' ' + element.className + ' ').indexOf(' mousetrap ') > -1) {\n return false;\n }\n\n if (_belongsTo(element, self.target)) {\n return false;\n }\n\n // Events originating from a shadow DOM are re-targetted and `e.target` is the shadow host,\n // not the initial event target in the shadow tree. Note that not all events cross the\n // shadow boundary.\n // For shadow trees with `mode: 'open'`, the initial event target is the first element in\n // the event’s composed path. For shadow trees with `mode: 'closed'`, the initial event\n // target cannot be obtained.\n if ('composedPath' in e && typeof e.composedPath === 'function') {\n // For open shadow trees, update `element` so that the following check works.\n var initialEventTarget = e.composedPath()[0];\n if (initialEventTarget !== e.target) {\n element = initialEventTarget;\n }\n }\n\n // stop for input, select, and textarea\n return element.tagName == 'INPUT' || element.tagName == 'SELECT' || element.tagName == 'TEXTAREA' || element.isContentEditable;\n };\n\n /**\n * exposes _handleKey publicly so it can be overwritten by extensions\n */\n Mousetrap.prototype.handleKey = function() {\n var self = this;\n return self._handleKey.apply(self, arguments);\n };\n\n /**\n * allow custom key mappings\n */\n Mousetrap.addKeycodes = function(object) {\n for (var key in object) {\n if (object.hasOwnProperty(key)) {\n _MAP[key] = object[key];\n }\n }\n _REVERSE_MAP = null;\n };\n\n /**\n * Init the global mousetrap functions\n *\n * This method is needed to allow the global mousetrap functions to work\n * now that mousetrap is a constructor function.\n */\n Mousetrap.init = function() {\n var documentMousetrap = Mousetrap(document);\n for (var method in documentMousetrap) {\n if (method.charAt(0) !== '_') {\n Mousetrap[method] = (function(method) {\n return function() {\n return documentMousetrap[method].apply(documentMousetrap, arguments);\n };\n } (method));\n }\n }\n };\n\n Mousetrap.init();\n\n // expose mousetrap to the global object\n window.Mousetrap = Mousetrap;\n\n // expose as a common js module\n if (typeof module !== 'undefined' && module.exports) {\n module.exports = Mousetrap;\n }\n\n // expose mousetrap as an AMD module\n if (typeof define === 'function' && define.amd) {\n define(function() {\n return Mousetrap;\n });\n }\n}) (typeof window !== 'undefined' ? window : null, typeof window !== 'undefined' ? document : null);\n","/**!\n * Sortable 1.15.2\n * @author\tRubaXa <trash@rubaxa.org>\n * @author\towenm <owen23355@gmail.com>\n * @license MIT\n */\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n return target;\n}\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n return _typeof(obj);\n}\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\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 _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}\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = _objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(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(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\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}\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\nvar version = \"1.15.2\";\n\nfunction userAgent(pattern) {\n if (typeof window !== 'undefined' && window.navigator) {\n return !! /*@__PURE__*/navigator.userAgent.match(pattern);\n }\n}\nvar IE11OrLess = userAgent(/(?:Trident.*rv[ :]?11\\.|msie|iemobile|Windows Phone)/i);\nvar Edge = userAgent(/Edge/i);\nvar FireFox = userAgent(/firefox/i);\nvar Safari = userAgent(/safari/i) && !userAgent(/chrome/i) && !userAgent(/android/i);\nvar IOS = userAgent(/iP(ad|od|hone)/i);\nvar ChromeForAndroid = userAgent(/chrome/i) && userAgent(/android/i);\n\nvar captureMode = {\n capture: false,\n passive: false\n};\nfunction on(el, event, fn) {\n el.addEventListener(event, fn, !IE11OrLess && captureMode);\n}\nfunction off(el, event, fn) {\n el.removeEventListener(event, fn, !IE11OrLess && captureMode);\n}\nfunction matches( /**HTMLElement*/el, /**String*/selector) {\n if (!selector) return;\n selector[0] === '>' && (selector = selector.substring(1));\n if (el) {\n try {\n if (el.matches) {\n return el.matches(selector);\n } else if (el.msMatchesSelector) {\n return el.msMatchesSelector(selector);\n } else if (el.webkitMatchesSelector) {\n return el.webkitMatchesSelector(selector);\n }\n } catch (_) {\n return false;\n }\n }\n return false;\n}\nfunction getParentOrHost(el) {\n return el.host && el !== document && el.host.nodeType ? el.host : el.parentNode;\n}\nfunction closest( /**HTMLElement*/el, /**String*/selector, /**HTMLElement*/ctx, includeCTX) {\n if (el) {\n ctx = ctx || document;\n do {\n if (selector != null && (selector[0] === '>' ? el.parentNode === ctx && matches(el, selector) : matches(el, selector)) || includeCTX && el === ctx) {\n return el;\n }\n if (el === ctx) break;\n /* jshint boss:true */\n } while (el = getParentOrHost(el));\n }\n return null;\n}\nvar R_SPACE = /\\s+/g;\nfunction toggleClass(el, name, state) {\n if (el && name) {\n if (el.classList) {\n el.classList[state ? 'add' : 'remove'](name);\n } else {\n var className = (' ' + el.className + ' ').replace(R_SPACE, ' ').replace(' ' + name + ' ', ' ');\n el.className = (className + (state ? ' ' + name : '')).replace(R_SPACE, ' ');\n }\n }\n}\nfunction css(el, prop, val) {\n var style = el && el.style;\n if (style) {\n if (val === void 0) {\n if (document.defaultView && document.defaultView.getComputedStyle) {\n val = document.defaultView.getComputedStyle(el, '');\n } else if (el.currentStyle) {\n val = el.currentStyle;\n }\n return prop === void 0 ? val : val[prop];\n } else {\n if (!(prop in style) && prop.indexOf('webkit') === -1) {\n prop = '-webkit-' + prop;\n }\n style[prop] = val + (typeof val === 'string' ? '' : 'px');\n }\n }\n}\nfunction matrix(el, selfOnly) {\n var appliedTransforms = '';\n if (typeof el === 'string') {\n appliedTransforms = el;\n } else {\n do {\n var transform = css(el, 'transform');\n if (transform && transform !== 'none') {\n appliedTransforms = transform + ' ' + appliedTransforms;\n }\n /* jshint boss:true */\n } while (!selfOnly && (el = el.parentNode));\n }\n var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;\n /*jshint -W056 */\n return matrixFn && new matrixFn(appliedTransforms);\n}\nfunction find(ctx, tagName, iterator) {\n if (ctx) {\n var list = ctx.getElementsByTagName(tagName),\n i = 0,\n n = list.length;\n if (iterator) {\n for (; i < n; i++) {\n iterator(list[i], i);\n }\n }\n return list;\n }\n return [];\n}\nfunction getWindowScrollingElement() {\n var scrollingElement = document.scrollingElement;\n if (scrollingElement) {\n return scrollingElement;\n } else {\n return document.documentElement;\n }\n}\n\n/**\r\n * Returns the \"bounding client rect\" of given element\r\n * @param {HTMLElement} el The element whose boundingClientRect is wanted\r\n * @param {[Boolean]} relativeToContainingBlock Whether the rect should be relative to the containing block of (including) the container\r\n * @param {[Boolean]} relativeToNonStaticParent Whether the rect should be relative to the relative parent of (including) the contaienr\r\n * @param {[Boolean]} undoScale Whether the container's scale() should be undone\r\n * @param {[HTMLElement]} container The parent the element will be placed in\r\n * @return {Object} The boundingClientRect of el, with specified adjustments\r\n */\nfunction getRect(el, relativeToContainingBlock, relativeToNonStaticParent, undoScale, container) {\n if (!el.getBoundingClientRect && el !== window) return;\n var elRect, top, left, bottom, right, height, width;\n if (el !== window && el.parentNode && el !== getWindowScrollingElement()) {\n elRect = el.getBoundingClientRect();\n top = elRect.top;\n left = elRect.left;\n bottom = elRect.bottom;\n right = elRect.right;\n height = elRect.height;\n width = elRect.width;\n } else {\n top = 0;\n left = 0;\n bottom = window.innerHeight;\n right = window.innerWidth;\n height = window.innerHeight;\n width = window.innerWidth;\n }\n if ((relativeToContainingBlock || relativeToNonStaticParent) && el !== window) {\n // Adjust for translate()\n container = container || el.parentNode;\n\n // solves #1123 (see: https://stackoverflow.com/a/37953806/6088312)\n // Not needed on <= IE11\n if (!IE11OrLess) {\n do {\n if (container && container.getBoundingClientRect && (css(container, 'transform') !== 'none' || relativeToNonStaticParent && css(container, 'position') !== 'static')) {\n var containerRect = container.getBoundingClientRect();\n\n // Set relative to edges of padding box of container\n top -= containerRect.top + parseInt(css(container, 'border-top-width'));\n left -= containerRect.left + parseInt(css(container, 'border-left-width'));\n bottom = top + elRect.height;\n right = left + elRect.width;\n break;\n }\n /* jshint boss:true */\n } while (container = container.parentNode);\n }\n }\n if (undoScale && el !== window) {\n // Adjust for scale()\n var elMatrix = matrix(container || el),\n scaleX = elMatrix && elMatrix.a,\n scaleY = elMatrix && elMatrix.d;\n if (elMatrix) {\n top /= scaleY;\n left /= scaleX;\n width /= scaleX;\n height /= scaleY;\n bottom = top + height;\n right = left + width;\n }\n }\n return {\n top: top,\n left: left,\n bottom: bottom,\n right: right,\n width: width,\n height: height\n };\n}\n\n/**\r\n * Checks if a side of an element is scrolled past a side of its parents\r\n * @param {HTMLElement} el The element who's side being scrolled out of view is in question\r\n * @param {String} elSide Side of the element in question ('top', 'left', 'right', 'bottom')\r\n * @param {String} parentSide Side of the parent in question ('top', 'left', 'right', 'bottom')\r\n * @return {HTMLElement} The parent scroll element that the el's side is scrolled past, or null if there is no such element\r\n */\nfunction isScrolledPast(el, elSide, parentSide) {\n var parent = getParentAutoScrollElement(el, true),\n elSideVal = getRect(el)[elSide];\n\n /* jshint boss:true */\n while (parent) {\n var parentSideVal = getRect(parent)[parentSide],\n visible = void 0;\n if (parentSide === 'top' || parentSide === 'left') {\n visible = elSideVal >= parentSideVal;\n } else {\n visible = elSideVal <= parentSideVal;\n }\n if (!visible) return parent;\n if (parent === getWindowScrollingElement()) break;\n parent = getParentAutoScrollElement(parent, false);\n }\n return false;\n}\n\n/**\r\n * Gets nth child of el, ignoring hidden children, sortable's elements (does not ignore clone if it's visible)\r\n * and non-draggable elements\r\n * @param {HTMLElement} el The parent element\r\n * @param {Number} childNum The index of the child\r\n * @param {Object} options Parent Sortable's options\r\n * @return {HTMLElement} The child at index childNum, or null if not found\r\n */\nfunction getChild(el, childNum, options, includeDragEl) {\n var currentChild = 0,\n i = 0,\n children = el.children;\n while (i < children.length) {\n if (children[i].style.display !== 'none' && children[i] !== Sortable.ghost && (includeDragEl || children[i] !== Sortable.dragged) && closest(children[i], options.draggable, el, false)) {\n if (currentChild === childNum) {\n return children[i];\n }\n currentChild++;\n }\n i++;\n }\n return null;\n}\n\n/**\r\n * Gets the last child in the el, ignoring ghostEl or invisible elements (clones)\r\n * @param {HTMLElement} el Parent element\r\n * @param {selector} selector Any other elements that should be ignored\r\n * @return {HTMLElement} The last child, ignoring ghostEl\r\n */\nfunction lastChild(el, selector) {\n var last = el.lastElementChild;\n while (last && (last === Sortable.ghost || css(last, 'display') === 'none' || selector && !matches(last, selector))) {\n last = last.previousElementSibling;\n }\n return last || null;\n}\n\n/**\r\n * Returns the index of an element within its parent for a selected set of\r\n * elements\r\n * @param {HTMLElement} el\r\n * @param {selector} selector\r\n * @return {number}\r\n */\nfunction index(el, selector) {\n var index = 0;\n if (!el || !el.parentNode) {\n return -1;\n }\n\n /* jshint boss:true */\n while (el = el.previousElementSibling) {\n if (el.nodeName.toUpperCase() !== 'TEMPLATE' && el !== Sortable.clone && (!selector || matches(el, selector))) {\n index++;\n }\n }\n return index;\n}\n\n/**\r\n * Returns the scroll offset of the given element, added with all the scroll offsets of parent elements.\r\n * The value is returned in real pixels.\r\n * @param {HTMLElement} el\r\n * @return {Array} Offsets in the format of [left, top]\r\n */\nfunction getRelativeScrollOffset(el) {\n var offsetLeft = 0,\n offsetTop = 0,\n winScroller = getWindowScrollingElement();\n if (el) {\n do {\n var elMatrix = matrix(el),\n scaleX = elMatrix.a,\n scaleY = elMatrix.d;\n offsetLeft += el.scrollLeft * scaleX;\n offsetTop += el.scrollTop * scaleY;\n } while (el !== winScroller && (el = el.parentNode));\n }\n return [offsetLeft, offsetTop];\n}\n\n/**\r\n * Returns the index of the object within the given array\r\n * @param {Array} arr Array that may or may not hold the object\r\n * @param {Object} obj An object that has a key-value pair unique to and identical to a key-value pair in the object you want to find\r\n * @return {Number} The index of the object in the array, or -1\r\n */\nfunction indexOfObject(arr, obj) {\n for (var i in arr) {\n if (!arr.hasOwnProperty(i)) continue;\n for (var key in obj) {\n if (obj.hasOwnProperty(key) && obj[key] === arr[i][key]) return Number(i);\n }\n }\n return -1;\n}\nfunction getParentAutoScrollElement(el, includeSelf) {\n // skip to window\n if (!el || !el.getBoundingClientRect) return getWindowScrollingElement();\n var elem = el;\n var gotSelf = false;\n do {\n // we don't need to get elem css if it isn't even overflowing in the first place (performance)\n if (elem.clientWidth < elem.scrollWidth || elem.clientHeight < elem.scrollHeight) {\n var elemCSS = css(elem);\n if (elem.clientWidth < elem.scrollWidth && (elemCSS.overflowX == 'auto' || elemCSS.overflowX == 'scroll') || elem.clientHeight < elem.scrollHeight && (elemCSS.overflowY == 'auto' || elemCSS.overflowY == 'scroll')) {\n if (!elem.getBoundingClientRect || elem === document.body) return getWindowScrollingElement();\n if (gotSelf || includeSelf) return elem;\n gotSelf = true;\n }\n }\n /* jshint boss:true */\n } while (elem = elem.parentNode);\n return getWindowScrollingElement();\n}\nfunction extend(dst, src) {\n if (dst && src) {\n for (var key in src) {\n if (src.hasOwnProperty(key)) {\n dst[key] = src[key];\n }\n }\n }\n return dst;\n}\nfunction isRectEqual(rect1, rect2) {\n return Math.round(rect1.top) === Math.round(rect2.top) && Math.round(rect1.left) === Math.round(rect2.left) && Math.round(rect1.height) === Math.round(rect2.height) && Math.round(rect1.width) === Math.round(rect2.width);\n}\nvar _throttleTimeout;\nfunction throttle(callback, ms) {\n return function () {\n if (!_throttleTimeout) {\n var args = arguments,\n _this = this;\n if (args.length === 1) {\n callback.call(_this, args[0]);\n } else {\n callback.apply(_this, args);\n }\n _throttleTimeout = setTimeout(function () {\n _throttleTimeout = void 0;\n }, ms);\n }\n };\n}\nfunction cancelThrottle() {\n clearTimeout(_throttleTimeout);\n _throttleTimeout = void 0;\n}\nfunction scrollBy(el, x, y) {\n el.scrollLeft += x;\n el.scrollTop += y;\n}\nfunction clone(el) {\n var Polymer = window.Polymer;\n var $ = window.jQuery || window.Zepto;\n if (Polymer && Polymer.dom) {\n return Polymer.dom(el).cloneNode(true);\n } else if ($) {\n return $(el).clone(true)[0];\n } else {\n return el.cloneNode(true);\n }\n}\nfunction setRect(el, rect) {\n css(el, 'position', 'absolute');\n css(el, 'top', rect.top);\n css(el, 'left', rect.left);\n css(el, 'width', rect.width);\n css(el, 'height', rect.height);\n}\nfunction unsetRect(el) {\n css(el, 'position', '');\n css(el, 'top', '');\n css(el, 'left', '');\n css(el, 'width', '');\n css(el, 'height', '');\n}\nfunction getChildContainingRectFromElement(container, options, ghostEl) {\n var rect = {};\n Array.from(container.children).forEach(function (child) {\n var _rect$left, _rect$top, _rect$right, _rect$bottom;\n if (!closest(child, options.draggable, container, false) || child.animated || child === ghostEl) return;\n var childRect = getRect(child);\n rect.left = Math.min((_rect$left = rect.left) !== null && _rect$left !== void 0 ? _rect$left : Infinity, childRect.left);\n rect.top = Math.min((_rect$top = rect.top) !== null && _rect$top !== void 0 ? _rect$top : Infinity, childRect.top);\n rect.right = Math.max((_rect$right = rect.right) !== null && _rect$right !== void 0 ? _rect$right : -Infinity, childRect.right);\n rect.bottom = Math.max((_rect$bottom = rect.bottom) !== null && _rect$bottom !== void 0 ? _rect$bottom : -Infinity, childRect.bottom);\n });\n rect.width = rect.right - rect.left;\n rect.height = rect.bottom - rect.top;\n rect.x = rect.left;\n rect.y = rect.top;\n return rect;\n}\nvar expando = 'Sortable' + new Date().getTime();\n\nfunction AnimationStateManager() {\n var animationStates = [],\n animationCallbackId;\n return {\n captureAnimationState: function captureAnimationState() {\n animationStates = [];\n if (!this.options.animation) return;\n var children = [].slice.call(this.el.children);\n children.forEach(function (child) {\n if (css(child, 'display') === 'none' || child === Sortable.ghost) return;\n animationStates.push({\n target: child,\n rect: getRect(child)\n });\n var fromRect = _objectSpread2({}, animationStates[animationStates.length - 1].rect);\n\n // If animating: compensate for current animation\n if (child.thisAnimationDuration) {\n var childMatrix = matrix(child, true);\n if (childMatrix) {\n fromRect.top -= childMatrix.f;\n fromRect.left -= childMatrix.e;\n }\n }\n child.fromRect = fromRect;\n });\n },\n addAnimationState: function addAnimationState(state) {\n animationStates.push(state);\n },\n removeAnimationState: function removeAnimationState(target) {\n animationStates.splice(indexOfObject(animationStates, {\n target: target\n }), 1);\n },\n animateAll: function animateAll(callback) {\n var _this = this;\n if (!this.options.animation) {\n clearTimeout(animationCallbackId);\n if (typeof callback === 'function') callback();\n return;\n }\n var animating = false,\n animationTime = 0;\n animationStates.forEach(function (state) {\n var time = 0,\n target = state.target,\n fromRect = target.fromRect,\n toRect = getRect(target),\n prevFromRect = target.prevFromRect,\n prevToRect = target.prevToRect,\n animatingRect = state.rect,\n targetMatrix = matrix(target, true);\n if (targetMatrix) {\n // Compensate for current animation\n toRect.top -= targetMatrix.f;\n toRect.left -= targetMatrix.e;\n }\n target.toRect = toRect;\n if (target.thisAnimationDuration) {\n // Could also check if animatingRect is between fromRect and toRect\n if (isRectEqual(prevFromRect, toRect) && !isRectEqual(fromRect, toRect) &&\n // Make sure animatingRect is on line between toRect & fromRect\n (animatingRect.top - toRect.top) / (animatingRect.left - toRect.left) === (fromRect.top - toRect.top) / (fromRect.left - toRect.left)) {\n // If returning to same place as started from animation and on same axis\n time = calculateRealTime(animatingRect, prevFromRect, prevToRect, _this.options);\n }\n }\n\n // if fromRect != toRect: animate\n if (!isRectEqual(toRect, fromRect)) {\n target.prevFromRect = fromRect;\n target.prevToRect = toRect;\n if (!time) {\n time = _this.options.animation;\n }\n _this.animate(target, animatingRect, toRect, time);\n }\n if (time) {\n animating = true;\n animationTime = Math.max(animationTime, time);\n clearTimeout(target.animationResetTimer);\n target.animationResetTimer = setTimeout(function () {\n target.animationTime = 0;\n target.prevFromRect = null;\n target.fromRect = null;\n target.prevToRect = null;\n target.thisAnimationDuration = null;\n }, time);\n target.thisAnimationDuration = time;\n }\n });\n clearTimeout(animationCallbackId);\n if (!animating) {\n if (typeof callback === 'function') callback();\n } else {\n animationCallbackId = setTimeout(function () {\n if (typeof callback === 'function') callback();\n }, animationTime);\n }\n animationStates = [];\n },\n animate: function animate(target, currentRect, toRect, duration) {\n if (duration) {\n css(target, 'transition', '');\n css(target, 'transform', '');\n var elMatrix = matrix(this.el),\n scaleX = elMatrix && elMatrix.a,\n scaleY = elMatrix && elMatrix.d,\n translateX = (currentRect.left - toRect.left) / (scaleX || 1),\n translateY = (currentRect.top - toRect.top) / (scaleY || 1);\n target.animatingX = !!translateX;\n target.animatingY = !!translateY;\n css(target, 'transform', 'translate3d(' + translateX + 'px,' + translateY + 'px,0)');\n this.forRepaintDummy = repaint(target); // repaint\n\n css(target, 'transition', 'transform ' + duration + 'ms' + (this.options.easing ? ' ' + this.options.easing : ''));\n css(target, 'transform', 'translate3d(0,0,0)');\n typeof target.animated === 'number' && clearTimeout(target.animated);\n target.animated = setTimeout(function () {\n css(target, 'transition', '');\n css(target, 'transform', '');\n target.animated = false;\n target.animatingX = false;\n target.animatingY = false;\n }, duration);\n }\n }\n };\n}\nfunction repaint(target) {\n return target.offsetWidth;\n}\nfunction calculateRealTime(animatingRect, fromRect, toRect, options) {\n return Math.sqrt(Math.pow(fromRect.top - animatingRect.top, 2) + Math.pow(fromRect.left - animatingRect.left, 2)) / Math.sqrt(Math.pow(fromRect.top - toRect.top, 2) + Math.pow(fromRect.left - toRect.left, 2)) * options.animation;\n}\n\nvar plugins = [];\nvar defaults = {\n initializeByDefault: true\n};\nvar PluginManager = {\n mount: function mount(plugin) {\n // Set default static properties\n for (var option in defaults) {\n if (defaults.hasOwnProperty(option) && !(option in plugin)) {\n plugin[option] = defaults[option];\n }\n }\n plugins.forEach(function (p) {\n if (p.pluginName === plugin.pluginName) {\n throw \"Sortable: Cannot mount plugin \".concat(plugin.pluginName, \" more than once\");\n }\n });\n plugins.push(plugin);\n },\n pluginEvent: function pluginEvent(eventName, sortable, evt) {\n var _this = this;\n this.eventCanceled = false;\n evt.cancel = function () {\n _this.eventCanceled = true;\n };\n var eventNameGlobal = eventName + 'Global';\n plugins.forEach(function (plugin) {\n if (!sortable[plugin.pluginName]) return;\n // Fire global events if it exists in this sortable\n if (sortable[plugin.pluginName][eventNameGlobal]) {\n sortable[plugin.pluginName][eventNameGlobal](_objectSpread2({\n sortable: sortable\n }, evt));\n }\n\n // Only fire plugin event if plugin is enabled in this sortable,\n // and plugin has event defined\n if (sortable.options[plugin.pluginName] && sortable[plugin.pluginName][eventName]) {\n sortable[plugin.pluginName][eventName](_objectSpread2({\n sortable: sortable\n }, evt));\n }\n });\n },\n initializePlugins: function initializePlugins(sortable, el, defaults, options) {\n plugins.forEach(function (plugin) {\n var pluginName = plugin.pluginName;\n if (!sortable.options[pluginName] && !plugin.initializeByDefault) return;\n var initialized = new plugin(sortable, el, sortable.options);\n initialized.sortable = sortable;\n initialized.options = sortable.options;\n sortable[pluginName] = initialized;\n\n // Add default options from plugin\n _extends(defaults, initialized.defaults);\n });\n for (var option in sortable.options) {\n if (!sortable.options.hasOwnProperty(option)) continue;\n var modified = this.modifyOption(sortable, option, sortable.options[option]);\n if (typeof modified !== 'undefined') {\n sortable.options[option] = modified;\n }\n }\n },\n getEventProperties: function getEventProperties(name, sortable) {\n var eventProperties = {};\n plugins.forEach(function (plugin) {\n if (typeof plugin.eventProperties !== 'function') return;\n _extends(eventProperties, plugin.eventProperties.call(sortable[plugin.pluginName], name));\n });\n return eventProperties;\n },\n modifyOption: function modifyOption(sortable, name, value) {\n var modifiedValue;\n plugins.forEach(function (plugin) {\n // Plugin must exist on the Sortable\n if (!sortable[plugin.pluginName]) return;\n\n // If static option listener exists for this option, call in the context of the Sortable's instance of this plugin\n if (plugin.optionListeners && typeof plugin.optionListeners[name] === 'function') {\n modifiedValue = plugin.optionListeners[name].call(sortable[plugin.pluginName], value);\n }\n });\n return modifiedValue;\n }\n};\n\nfunction dispatchEvent(_ref) {\n var sortable = _ref.sortable,\n rootEl = _ref.rootEl,\n name = _ref.name,\n targetEl = _ref.targetEl,\n cloneEl = _ref.cloneEl,\n toEl = _ref.toEl,\n fromEl = _ref.fromEl,\n oldIndex = _ref.oldIndex,\n newIndex = _ref.newIndex,\n oldDraggableIndex = _ref.oldDraggableIndex,\n newDraggableIndex = _ref.newDraggableIndex,\n originalEvent = _ref.originalEvent,\n putSortable = _ref.putSortable,\n extraEventProperties = _ref.extraEventProperties;\n sortable = sortable || rootEl && rootEl[expando];\n if (!sortable) return;\n var evt,\n options = sortable.options,\n onName = 'on' + name.charAt(0).toUpperCase() + name.substr(1);\n // Support for new CustomEvent feature\n if (window.CustomEvent && !IE11OrLess && !Edge) {\n evt = new CustomEvent(name, {\n bubbles: true,\n cancelable: true\n });\n } else {\n evt = document.createEvent('Event');\n evt.initEvent(name, true, true);\n }\n evt.to = toEl || rootEl;\n evt.from = fromEl || rootEl;\n evt.item = targetEl || rootEl;\n evt.clone = cloneEl;\n evt.oldIndex = oldIndex;\n evt.newIndex = newIndex;\n evt.oldDraggableIndex = oldDraggableIndex;\n evt.newDraggableIndex = newDraggableIndex;\n evt.originalEvent = originalEvent;\n evt.pullMode = putSortable ? putSortable.lastPutMode : undefined;\n var allEventProperties = _objectSpread2(_objectSpread2({}, extraEventProperties), PluginManager.getEventProperties(name, sortable));\n for (var option in allEventProperties) {\n evt[option] = allEventProperties[option];\n }\n if (rootEl) {\n rootEl.dispatchEvent(evt);\n }\n if (options[onName]) {\n options[onName].call(sortable, evt);\n }\n}\n\nvar _excluded = [\"evt\"];\nvar pluginEvent = function pluginEvent(eventName, sortable) {\n var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n originalEvent = _ref.evt,\n data = _objectWithoutProperties(_ref, _excluded);\n PluginManager.pluginEvent.bind(Sortable)(eventName, sortable, _objectSpread2({\n dragEl: dragEl,\n parentEl: parentEl,\n ghostEl: ghostEl,\n rootEl: rootEl,\n nextEl: nextEl,\n lastDownEl: lastDownEl,\n cloneEl: cloneEl,\n cloneHidden: cloneHidden,\n dragStarted: moved,\n putSortable: putSortable,\n activeSortable: Sortable.active,\n originalEvent: originalEvent,\n oldIndex: oldIndex,\n oldDraggableIndex: oldDraggableIndex,\n newIndex: newIndex,\n newDraggableIndex: newDraggableIndex,\n hideGhostForTarget: _hideGhostForTarget,\n unhideGhostForTarget: _unhideGhostForTarget,\n cloneNowHidden: function cloneNowHidden() {\n cloneHidden = true;\n },\n cloneNowShown: function cloneNowShown() {\n cloneHidden = false;\n },\n dispatchSortableEvent: function dispatchSortableEvent(name) {\n _dispatchEvent({\n sortable: sortable,\n name: name,\n originalEvent: originalEvent\n });\n }\n }, data));\n};\nfunction _dispatchEvent(info) {\n dispatchEvent(_objectSpread2({\n putSortable: putSortable,\n cloneEl: cloneEl,\n targetEl: dragEl,\n rootEl: rootEl,\n oldIndex: oldIndex,\n oldDraggableIndex: oldDraggableIndex,\n newIndex: newIndex,\n newDraggableIndex: newDraggableIndex\n }, info));\n}\nvar dragEl,\n parentEl,\n ghostEl,\n rootEl,\n nextEl,\n lastDownEl,\n cloneEl,\n cloneHidden,\n oldIndex,\n newIndex,\n oldDraggableIndex,\n newDraggableIndex,\n activeGroup,\n putSortable,\n awaitingDragStarted = false,\n ignoreNextClick = false,\n sortables = [],\n tapEvt,\n touchEvt,\n lastDx,\n lastDy,\n tapDistanceLeft,\n tapDistanceTop,\n moved,\n lastTarget,\n lastDirection,\n pastFirstInvertThresh = false,\n isCircumstantialInvert = false,\n targetMoveDistance,\n // For positioning ghost absolutely\n ghostRelativeParent,\n ghostRelativeParentInitialScroll = [],\n // (left, top)\n\n _silent = false,\n savedInputChecked = [];\n\n/** @const */\nvar documentExists = typeof document !== 'undefined',\n PositionGhostAbsolutely = IOS,\n CSSFloatProperty = Edge || IE11OrLess ? 'cssFloat' : 'float',\n // This will not pass for IE9, because IE9 DnD only works on anchors\n supportDraggable = documentExists && !ChromeForAndroid && !IOS && 'draggable' in document.createElement('div'),\n supportCssPointerEvents = function () {\n if (!documentExists) return;\n // false when <= IE11\n if (IE11OrLess) {\n return false;\n }\n var el = document.createElement('x');\n el.style.cssText = 'pointer-events:auto';\n return el.style.pointerEvents === 'auto';\n }(),\n _detectDirection = function _detectDirection(el, options) {\n var elCSS = css(el),\n elWidth = parseInt(elCSS.width) - parseInt(elCSS.paddingLeft) - parseInt(elCSS.paddingRight) - parseInt(elCSS.borderLeftWidth) - parseInt(elCSS.borderRightWidth),\n child1 = getChild(el, 0, options),\n child2 = getChild(el, 1, options),\n firstChildCSS = child1 && css(child1),\n secondChildCSS = child2 && css(child2),\n firstChildWidth = firstChildCSS && parseInt(firstChildCSS.marginLeft) + parseInt(firstChildCSS.marginRight) + getRect(child1).width,\n secondChildWidth = secondChildCSS && parseInt(secondChildCSS.marginLeft) + parseInt(secondChildCSS.marginRight) + getRect(child2).width;\n if (elCSS.display === 'flex') {\n return elCSS.flexDirection === 'column' || elCSS.flexDirection === 'column-reverse' ? 'vertical' : 'horizontal';\n }\n if (elCSS.display === 'grid') {\n return elCSS.gridTemplateColumns.split(' ').length <= 1 ? 'vertical' : 'horizontal';\n }\n if (child1 && firstChildCSS[\"float\"] && firstChildCSS[\"float\"] !== 'none') {\n var touchingSideChild2 = firstChildCSS[\"float\"] === 'left' ? 'left' : 'right';\n return child2 && (secondChildCSS.clear === 'both' || secondChildCSS.clear === touchingSideChild2) ? 'vertical' : 'horizontal';\n }\n return child1 && (firstChildCSS.display === 'block' || firstChildCSS.display === 'flex' || firstChildCSS.display === 'table' || firstChildCSS.display === 'grid' || firstChildWidth >= elWidth && elCSS[CSSFloatProperty] === 'none' || child2 && elCSS[CSSFloatProperty] === 'none' && firstChildWidth + secondChildWidth > elWidth) ? 'vertical' : 'horizontal';\n },\n _dragElInRowColumn = function _dragElInRowColumn(dragRect, targetRect, vertical) {\n var dragElS1Opp = vertical ? dragRect.left : dragRect.top,\n dragElS2Opp = vertical ? dragRect.right : dragRect.bottom,\n dragElOppLength = vertical ? dragRect.width : dragRect.height,\n targetS1Opp = vertical ? targetRect.left : targetRect.top,\n targetS2Opp = vertical ? targetRect.right : targetRect.bottom,\n targetOppLength = vertical ? targetRect.width : targetRect.height;\n return dragElS1Opp === targetS1Opp || dragElS2Opp === targetS2Opp || dragElS1Opp + dragElOppLength / 2 === targetS1Opp + targetOppLength / 2;\n },\n /**\r\n * Detects first nearest empty sortable to X and Y position using emptyInsertThreshold.\r\n * @param {Number} x X position\r\n * @param {Number} y Y position\r\n * @return {HTMLElement} Element of the first found nearest Sortable\r\n */\n _detectNearestEmptySortable = function _detectNearestEmptySortable(x, y) {\n var ret;\n sortables.some(function (sortable) {\n var threshold = sortable[expando].options.emptyInsertThreshold;\n if (!threshold || lastChild(sortable)) return;\n var rect = getRect(sortable),\n insideHorizontally = x >= rect.left - threshold && x <= rect.right + threshold,\n insideVertically = y >= rect.top - threshold && y <= rect.bottom + threshold;\n if (insideHorizontally && insideVertically) {\n return ret = sortable;\n }\n });\n return ret;\n },\n _prepareGroup = function _prepareGroup(options) {\n function toFn(value, pull) {\n return function (to, from, dragEl, evt) {\n var sameGroup = to.options.group.name && from.options.group.name && to.options.group.name === from.options.group.name;\n if (value == null && (pull || sameGroup)) {\n // Default pull value\n // Default pull and put value if same group\n return true;\n } else if (value == null || value === false) {\n return false;\n } else if (pull && value === 'clone') {\n return value;\n } else if (typeof value === 'function') {\n return toFn(value(to, from, dragEl, evt), pull)(to, from, dragEl, evt);\n } else {\n var otherGroup = (pull ? to : from).options.group.name;\n return value === true || typeof value === 'string' && value === otherGroup || value.join && value.indexOf(otherGroup) > -1;\n }\n };\n }\n var group = {};\n var originalGroup = options.group;\n if (!originalGroup || _typeof(originalGroup) != 'object') {\n originalGroup = {\n name: originalGroup\n };\n }\n group.name = originalGroup.name;\n group.checkPull = toFn(originalGroup.pull, true);\n group.checkPut = toFn(originalGroup.put);\n group.revertClone = originalGroup.revertClone;\n options.group = group;\n },\n _hideGhostForTarget = function _hideGhostForTarget() {\n if (!supportCssPointerEvents && ghostEl) {\n css(ghostEl, 'display', 'none');\n }\n },\n _unhideGhostForTarget = function _unhideGhostForTarget() {\n if (!supportCssPointerEvents && ghostEl) {\n css(ghostEl, 'display', '');\n }\n };\n\n// #1184 fix - Prevent click event on fallback if dragged but item not changed position\nif (documentExists && !ChromeForAndroid) {\n document.addEventListener('click', function (evt) {\n if (ignoreNextClick) {\n evt.preventDefault();\n evt.stopPropagation && evt.stopPropagation();\n evt.stopImmediatePropagation && evt.stopImmediatePropagation();\n ignoreNextClick = false;\n return false;\n }\n }, true);\n}\nvar nearestEmptyInsertDetectEvent = function nearestEmptyInsertDetectEvent(evt) {\n if (dragEl) {\n evt = evt.touches ? evt.touches[0] : evt;\n var nearest = _detectNearestEmptySortable(evt.clientX, evt.clientY);\n if (nearest) {\n // Create imitation event\n var event = {};\n for (var i in evt) {\n if (evt.hasOwnProperty(i)) {\n event[i] = evt[i];\n }\n }\n event.target = event.rootEl = nearest;\n event.preventDefault = void 0;\n event.stopPropagation = void 0;\n nearest[expando]._onDragOver(event);\n }\n }\n};\nvar _checkOutsideTargetEl = function _checkOutsideTargetEl(evt) {\n if (dragEl) {\n dragEl.parentNode[expando]._isOutsideThisEl(evt.target);\n }\n};\n\n/**\r\n * @class Sortable\r\n * @param {HTMLElement} el\r\n * @param {Object} [options]\r\n */\nfunction Sortable(el, options) {\n if (!(el && el.nodeType && el.nodeType === 1)) {\n throw \"Sortable: `el` must be an HTMLElement, not \".concat({}.toString.call(el));\n }\n this.el = el; // root element\n this.options = options = _extends({}, options);\n\n // Export instance\n el[expando] = this;\n var defaults = {\n group: null,\n sort: true,\n disabled: false,\n store: null,\n handle: null,\n draggable: /^[uo]l$/i.test(el.nodeName) ? '>li' : '>*',\n swapThreshold: 1,\n // percentage; 0 <= x <= 1\n invertSwap: false,\n // invert always\n invertedSwapThreshold: null,\n // will be set to same as swapThreshold if default\n removeCloneOnHide: true,\n direction: function direction() {\n return _detectDirection(el, this.options);\n },\n ghostClass: 'sortable-ghost',\n chosenClass: 'sortable-chosen',\n dragClass: 'sortable-drag',\n ignore: 'a, img',\n filter: null,\n preventOnFilter: true,\n animation: 0,\n easing: null,\n setData: function setData(dataTransfer, dragEl) {\n dataTransfer.setData('Text', dragEl.textContent);\n },\n dropBubble: false,\n dragoverBubble: false,\n dataIdAttr: 'data-id',\n delay: 0,\n delayOnTouchOnly: false,\n touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,\n forceFallback: false,\n fallbackClass: 'sortable-fallback',\n fallbackOnBody: false,\n fallbackTolerance: 0,\n fallbackOffset: {\n x: 0,\n y: 0\n },\n supportPointer: Sortable.supportPointer !== false && 'PointerEvent' in window && !Safari,\n emptyInsertThreshold: 5\n };\n PluginManager.initializePlugins(this, el, defaults);\n\n // Set default options\n for (var name in defaults) {\n !(name in options) && (options[name] = defaults[name]);\n }\n _prepareGroup(options);\n\n // Bind all private methods\n for (var fn in this) {\n if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n this[fn] = this[fn].bind(this);\n }\n }\n\n // Setup drag mode\n this.nativeDraggable = options.forceFallback ? false : supportDraggable;\n if (this.nativeDraggable) {\n // Touch start threshold cannot be greater than the native dragstart threshold\n this.options.touchStartThreshold = 1;\n }\n\n // Bind events\n if (options.supportPointer) {\n on(el, 'pointerdown', this._onTapStart);\n } else {\n on(el, 'mousedown', this._onTapStart);\n on(el, 'touchstart', this._onTapStart);\n }\n if (this.nativeDraggable) {\n on(el, 'dragover', this);\n on(el, 'dragenter', this);\n }\n sortables.push(this.el);\n\n // Restore sorting\n options.store && options.store.get && this.sort(options.store.get(this) || []);\n\n // Add animation state manager\n _extends(this, AnimationStateManager());\n}\nSortable.prototype = /** @lends Sortable.prototype */{\n constructor: Sortable,\n _isOutsideThisEl: function _isOutsideThisEl(target) {\n if (!this.el.contains(target) && target !== this.el) {\n lastTarget = null;\n }\n },\n _getDirection: function _getDirection(evt, target) {\n return typeof this.options.direction === 'function' ? this.options.direction.call(this, evt, target, dragEl) : this.options.direction;\n },\n _onTapStart: function _onTapStart( /** Event|TouchEvent */evt) {\n if (!evt.cancelable) return;\n var _this = this,\n el = this.el,\n options = this.options,\n preventOnFilter = options.preventOnFilter,\n type = evt.type,\n touch = evt.touches && evt.touches[0] || evt.pointerType && evt.pointerType === 'touch' && evt,\n target = (touch || evt).target,\n originalTarget = evt.target.shadowRoot && (evt.path && evt.path[0] || evt.composedPath && evt.composedPath()[0]) || target,\n filter = options.filter;\n _saveInputCheckedState(el);\n\n // Don't trigger start event when an element is been dragged, otherwise the evt.oldindex always wrong when set option.group.\n if (dragEl) {\n return;\n }\n if (/mousedown|pointerdown/.test(type) && evt.button !== 0 || options.disabled) {\n return; // only left button and enabled\n }\n\n // cancel dnd if original target is content editable\n if (originalTarget.isContentEditable) {\n return;\n }\n\n // Safari ignores further event handling after mousedown\n if (!this.nativeDraggable && Safari && target && target.tagName.toUpperCase() === 'SELECT') {\n return;\n }\n target = closest(target, options.draggable, el, false);\n if (target && target.animated) {\n return;\n }\n if (lastDownEl === target) {\n // Ignoring duplicate `down`\n return;\n }\n\n // Get the index of the dragged element within its parent\n oldIndex = index(target);\n oldDraggableIndex = index(target, options.draggable);\n\n // Check filter\n if (typeof filter === 'function') {\n if (filter.call(this, evt, target, this)) {\n _dispatchEvent({\n sortable: _this,\n rootEl: originalTarget,\n name: 'filter',\n targetEl: target,\n toEl: el,\n fromEl: el\n });\n pluginEvent('filter', _this, {\n evt: evt\n });\n preventOnFilter && evt.cancelable && evt.preventDefault();\n return; // cancel dnd\n }\n } else if (filter) {\n filter = filter.split(',').some(function (criteria) {\n criteria = closest(originalTarget, criteria.trim(), el, false);\n if (criteria) {\n _dispatchEvent({\n sortable: _this,\n rootEl: criteria,\n name: 'filter',\n targetEl: target,\n fromEl: el,\n toEl: el\n });\n pluginEvent('filter', _this, {\n evt: evt\n });\n return true;\n }\n });\n if (filter) {\n preventOnFilter && evt.cancelable && evt.preventDefault();\n return; // cancel dnd\n }\n }\n if (options.handle && !closest(originalTarget, options.handle, el, false)) {\n return;\n }\n\n // Prepare `dragstart`\n this._prepareDragStart(evt, touch, target);\n },\n _prepareDragStart: function _prepareDragStart( /** Event */evt, /** Touch */touch, /** HTMLElement */target) {\n var _this = this,\n el = _this.el,\n options = _this.options,\n ownerDocument = el.ownerDocument,\n dragStartFn;\n if (target && !dragEl && target.parentNode === el) {\n var dragRect = getRect(target);\n rootEl = el;\n dragEl = target;\n parentEl = dragEl.parentNode;\n nextEl = dragEl.nextSibling;\n lastDownEl = target;\n activeGroup = options.group;\n Sortable.dragged = dragEl;\n tapEvt = {\n target: dragEl,\n clientX: (touch || evt).clientX,\n clientY: (touch || evt).clientY\n };\n tapDistanceLeft = tapEvt.clientX - dragRect.left;\n tapDistanceTop = tapEvt.clientY - dragRect.top;\n this._lastX = (touch || evt).clientX;\n this._lastY = (touch || evt).clientY;\n dragEl.style['will-change'] = 'all';\n dragStartFn = function dragStartFn() {\n pluginEvent('delayEnded', _this, {\n evt: evt\n });\n if (Sortable.eventCanceled) {\n _this._onDrop();\n return;\n }\n // Delayed drag has been triggered\n // we can re-enable the events: touchmove/mousemove\n _this._disableDelayedDragEvents();\n if (!FireFox && _this.nativeDraggable) {\n dragEl.draggable = true;\n }\n\n // Bind the events: dragstart/dragend\n _this._triggerDragStart(evt, touch);\n\n // Drag start event\n _dispatchEvent({\n sortable: _this,\n name: 'choose',\n originalEvent: evt\n });\n\n // Chosen item\n toggleClass(dragEl, options.chosenClass, true);\n };\n\n // Disable \"draggable\"\n options.ignore.split(',').forEach(function (criteria) {\n find(dragEl, criteria.trim(), _disableDraggable);\n });\n on(ownerDocument, 'dragover', nearestEmptyInsertDetectEvent);\n on(ownerDocument, 'mousemove', nearestEmptyInsertDetectEvent);\n on(ownerDocument, 'touchmove', nearestEmptyInsertDetectEvent);\n on(ownerDocument, 'mouseup', _this._onDrop);\n on(ownerDocument, 'touchend', _this._onDrop);\n on(ownerDocument, 'touchcancel', _this._onDrop);\n\n // Make dragEl draggable (must be before delay for FireFox)\n if (FireFox && this.nativeDraggable) {\n this.options.touchStartThreshold = 4;\n dragEl.draggable = true;\n }\n pluginEvent('delayStart', this, {\n evt: evt\n });\n\n // Delay is impossible for native DnD in Edge or IE\n if (options.delay && (!options.delayOnTouchOnly || touch) && (!this.nativeDraggable || !(Edge || IE11OrLess))) {\n if (Sortable.eventCanceled) {\n this._onDrop();\n return;\n }\n // If the user moves the pointer or let go the click or touch\n // before the delay has been reached:\n // disable the delayed drag\n on(ownerDocument, 'mouseup', _this._disableDelayedDrag);\n on(ownerDocument, 'touchend', _this._disableDelayedDrag);\n on(ownerDocument, 'touchcancel', _this._disableDelayedDrag);\n on(ownerDocument, 'mousemove', _this._delayedDragTouchMoveHandler);\n on(ownerDocument, 'touchmove', _this._delayedDragTouchMoveHandler);\n options.supportPointer && on(ownerDocument, 'pointermove', _this._delayedDragTouchMoveHandler);\n _this._dragStartTimer = setTimeout(dragStartFn, options.delay);\n } else {\n dragStartFn();\n }\n }\n },\n _delayedDragTouchMoveHandler: function _delayedDragTouchMoveHandler( /** TouchEvent|PointerEvent **/e) {\n var touch = e.touches ? e.touches[0] : e;\n if (Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1))) {\n this._disableDelayedDrag();\n }\n },\n _disableDelayedDrag: function _disableDelayedDrag() {\n dragEl && _disableDraggable(dragEl);\n clearTimeout(this._dragStartTimer);\n this._disableDelayedDragEvents();\n },\n _disableDelayedDragEvents: function _disableDelayedDragEvents() {\n var ownerDocument = this.el.ownerDocument;\n off(ownerDocument, 'mouseup', this._disableDelayedDrag);\n off(ownerDocument, 'touchend', this._disableDelayedDrag);\n off(ownerDocument, 'touchcancel', this._disableDelayedDrag);\n off(ownerDocument, 'mousemove', this._delayedDragTouchMoveHandler);\n off(ownerDocument, 'touchmove', this._delayedDragTouchMoveHandler);\n off(ownerDocument, 'pointermove', this._delayedDragTouchMoveHandler);\n },\n _triggerDragStart: function _triggerDragStart( /** Event */evt, /** Touch */touch) {\n touch = touch || evt.pointerType == 'touch' && evt;\n if (!this.nativeDraggable || touch) {\n if (this.options.supportPointer) {\n on(document, 'pointermove', this._onTouchMove);\n } else if (touch) {\n on(document, 'touchmove', this._onTouchMove);\n } else {\n on(document, 'mousemove', this._onTouchMove);\n }\n } else {\n on(dragEl, 'dragend', this);\n on(rootEl, 'dragstart', this._onDragStart);\n }\n try {\n if (document.selection) {\n // Timeout neccessary for IE9\n _nextTick(function () {\n document.selection.empty();\n });\n } else {\n window.getSelection().removeAllRanges();\n }\n } catch (err) {}\n },\n _dragStarted: function _dragStarted(fallback, evt) {\n awaitingDragStarted = false;\n if (rootEl && dragEl) {\n pluginEvent('dragStarted', this, {\n evt: evt\n });\n if (this.nativeDraggable) {\n on(document, 'dragover', _checkOutsideTargetEl);\n }\n var options = this.options;\n\n // Apply effect\n !fallback && toggleClass(dragEl, options.dragClass, false);\n toggleClass(dragEl, options.ghostClass, true);\n Sortable.active = this;\n fallback && this._appendGhost();\n\n // Drag start event\n _dispatchEvent({\n sortable: this,\n name: 'start',\n originalEvent: evt\n });\n } else {\n this._nulling();\n }\n },\n _emulateDragOver: function _emulateDragOver() {\n if (touchEvt) {\n this._lastX = touchEvt.clientX;\n this._lastY = touchEvt.clientY;\n _hideGhostForTarget();\n var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY);\n var parent = target;\n while (target && target.shadowRoot) {\n target = target.shadowRoot.elementFromPoint(touchEvt.clientX, touchEvt.clientY);\n if (target === parent) break;\n parent = target;\n }\n dragEl.parentNode[expando]._isOutsideThisEl(target);\n if (parent) {\n do {\n if (parent[expando]) {\n var inserted = void 0;\n inserted = parent[expando]._onDragOver({\n clientX: touchEvt.clientX,\n clientY: touchEvt.clientY,\n target: target,\n rootEl: parent\n });\n if (inserted && !this.options.dragoverBubble) {\n break;\n }\n }\n target = parent; // store last element\n }\n /* jshint boss:true */ while (parent = parent.parentNode);\n }\n _unhideGhostForTarget();\n }\n },\n _onTouchMove: function _onTouchMove( /**TouchEvent*/evt) {\n if (tapEvt) {\n var options = this.options,\n fallbackTolerance = options.fallbackTolerance,\n fallbackOffset = options.fallbackOffset,\n touch = evt.touches ? evt.touches[0] : evt,\n ghostMatrix = ghostEl && matrix(ghostEl, true),\n scaleX = ghostEl && ghostMatrix && ghostMatrix.a,\n scaleY = ghostEl && ghostMatrix && ghostMatrix.d,\n relativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset(ghostRelativeParent),\n dx = (touch.clientX - tapEvt.clientX + fallbackOffset.x) / (scaleX || 1) + (relativeScrollOffset ? relativeScrollOffset[0] - ghostRelativeParentInitialScroll[0] : 0) / (scaleX || 1),\n dy = (touch.clientY - tapEvt.clientY + fallbackOffset.y) / (scaleY || 1) + (relativeScrollOffset ? relativeScrollOffset[1] - ghostRelativeParentInitialScroll[1] : 0) / (scaleY || 1);\n\n // only set the status to dragging, when we are actually dragging\n if (!Sortable.active && !awaitingDragStarted) {\n if (fallbackTolerance && Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) < fallbackTolerance) {\n return;\n }\n this._onDragStart(evt, true);\n }\n if (ghostEl) {\n if (ghostMatrix) {\n ghostMatrix.e += dx - (lastDx || 0);\n ghostMatrix.f += dy - (lastDy || 0);\n } else {\n ghostMatrix = {\n a: 1,\n b: 0,\n c: 0,\n d: 1,\n e: dx,\n f: dy\n };\n }\n var cssMatrix = \"matrix(\".concat(ghostMatrix.a, \",\").concat(ghostMatrix.b, \",\").concat(ghostMatrix.c, \",\").concat(ghostMatrix.d, \",\").concat(ghostMatrix.e, \",\").concat(ghostMatrix.f, \")\");\n css(ghostEl, 'webkitTransform', cssMatrix);\n css(ghostEl, 'mozTransform', cssMatrix);\n css(ghostEl, 'msTransform', cssMatrix);\n css(ghostEl, 'transform', cssMatrix);\n lastDx = dx;\n lastDy = dy;\n touchEvt = touch;\n }\n evt.cancelable && evt.preventDefault();\n }\n },\n _appendGhost: function _appendGhost() {\n // Bug if using scale(): https://stackoverflow.com/questions/2637058\n // Not being adjusted for\n if (!ghostEl) {\n var container = this.options.fallbackOnBody ? document.body : rootEl,\n rect = getRect(dragEl, true, PositionGhostAbsolutely, true, container),\n options = this.options;\n\n // Position absolutely\n if (PositionGhostAbsolutely) {\n // Get relatively positioned parent\n ghostRelativeParent = container;\n while (css(ghostRelativeParent, 'position') === 'static' && css(ghostRelativeParent, 'transform') === 'none' && ghostRelativeParent !== document) {\n ghostRelativeParent = ghostRelativeParent.parentNode;\n }\n if (ghostRelativeParent !== document.body && ghostRelativeParent !== document.documentElement) {\n if (ghostRelativeParent === document) ghostRelativeParent = getWindowScrollingElement();\n rect.top += ghostRelativeParent.scrollTop;\n rect.left += ghostRelativeParent.scrollLeft;\n } else {\n ghostRelativeParent = getWindowScrollingElement();\n }\n ghostRelativeParentInitialScroll = getRelativeScrollOffset(ghostRelativeParent);\n }\n ghostEl = dragEl.cloneNode(true);\n toggleClass(ghostEl, options.ghostClass, false);\n toggleClass(ghostEl, options.fallbackClass, true);\n toggleClass(ghostEl, options.dragClass, true);\n css(ghostEl, 'transition', '');\n css(ghostEl, 'transform', '');\n css(ghostEl, 'box-sizing', 'border-box');\n css(ghostEl, 'margin', 0);\n css(ghostEl, 'top', rect.top);\n css(ghostEl, 'left', rect.left);\n css(ghostEl, 'width', rect.width);\n css(ghostEl, 'height', rect.height);\n css(ghostEl, 'opacity', '0.8');\n css(ghostEl, 'position', PositionGhostAbsolutely ? 'absolute' : 'fixed');\n css(ghostEl, 'zIndex', '100000');\n css(ghostEl, 'pointerEvents', 'none');\n Sortable.ghost = ghostEl;\n container.appendChild(ghostEl);\n\n // Set transform-origin\n css(ghostEl, 'transform-origin', tapDistanceLeft / parseInt(ghostEl.style.width) * 100 + '% ' + tapDistanceTop / parseInt(ghostEl.style.height) * 100 + '%');\n }\n },\n _onDragStart: function _onDragStart( /**Event*/evt, /**boolean*/fallback) {\n var _this = this;\n var dataTransfer = evt.dataTransfer;\n var options = _this.options;\n pluginEvent('dragStart', this, {\n evt: evt\n });\n if (Sortable.eventCanceled) {\n this._onDrop();\n return;\n }\n pluginEvent('setupClone', this);\n if (!Sortable.eventCanceled) {\n cloneEl = clone(dragEl);\n cloneEl.removeAttribute(\"id\");\n cloneEl.draggable = false;\n cloneEl.style['will-change'] = '';\n this._hideClone();\n toggleClass(cloneEl, this.options.chosenClass, false);\n Sortable.clone = cloneEl;\n }\n\n // #1143: IFrame support workaround\n _this.cloneId = _nextTick(function () {\n pluginEvent('clone', _this);\n if (Sortable.eventCanceled) return;\n if (!_this.options.removeCloneOnHide) {\n rootEl.insertBefore(cloneEl, dragEl);\n }\n _this._hideClone();\n _dispatchEvent({\n sortable: _this,\n name: 'clone'\n });\n });\n !fallback && toggleClass(dragEl, options.dragClass, true);\n\n // Set proper drop events\n if (fallback) {\n ignoreNextClick = true;\n _this._loopId = setInterval(_this._emulateDragOver, 50);\n } else {\n // Undo what was set in _prepareDragStart before drag started\n off(document, 'mouseup', _this._onDrop);\n off(document, 'touchend', _this._onDrop);\n off(document, 'touchcancel', _this._onDrop);\n if (dataTransfer) {\n dataTransfer.effectAllowed = 'move';\n options.setData && options.setData.call(_this, dataTransfer, dragEl);\n }\n on(document, 'drop', _this);\n\n // #1276 fix:\n css(dragEl, 'transform', 'translateZ(0)');\n }\n awaitingDragStarted = true;\n _this._dragStartId = _nextTick(_this._dragStarted.bind(_this, fallback, evt));\n on(document, 'selectstart', _this);\n moved = true;\n if (Safari) {\n css(document.body, 'user-select', 'none');\n }\n },\n // Returns true - if no further action is needed (either inserted or another condition)\n _onDragOver: function _onDragOver( /**Event*/evt) {\n var el = this.el,\n target = evt.target,\n dragRect,\n targetRect,\n revert,\n options = this.options,\n group = options.group,\n activeSortable = Sortable.active,\n isOwner = activeGroup === group,\n canSort = options.sort,\n fromSortable = putSortable || activeSortable,\n vertical,\n _this = this,\n completedFired = false;\n if (_silent) return;\n function dragOverEvent(name, extra) {\n pluginEvent(name, _this, _objectSpread2({\n evt: evt,\n isOwner: isOwner,\n axis: vertical ? 'vertical' : 'horizontal',\n revert: revert,\n dragRect: dragRect,\n targetRect: targetRect,\n canSort: canSort,\n fromSortable: fromSortable,\n target: target,\n completed: completed,\n onMove: function onMove(target, after) {\n return _onMove(rootEl, el, dragEl, dragRect, target, getRect(target), evt, after);\n },\n changed: changed\n }, extra));\n }\n\n // Capture animation state\n function capture() {\n dragOverEvent('dragOverAnimationCapture');\n _this.captureAnimationState();\n if (_this !== fromSortable) {\n fromSortable.captureAnimationState();\n }\n }\n\n // Return invocation when dragEl is inserted (or completed)\n function completed(insertion) {\n dragOverEvent('dragOverCompleted', {\n insertion: insertion\n });\n if (insertion) {\n // Clones must be hidden before folding animation to capture dragRectAbsolute properly\n if (isOwner) {\n activeSortable._hideClone();\n } else {\n activeSortable._showClone(_this);\n }\n if (_this !== fromSortable) {\n // Set ghost class to new sortable's ghost class\n toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : activeSortable.options.ghostClass, false);\n toggleClass(dragEl, options.ghostClass, true);\n }\n if (putSortable !== _this && _this !== Sortable.active) {\n putSortable = _this;\n } else if (_this === Sortable.active && putSortable) {\n putSortable = null;\n }\n\n // Animation\n if (fromSortable === _this) {\n _this._ignoreWhileAnimating = target;\n }\n _this.animateAll(function () {\n dragOverEvent('dragOverAnimationComplete');\n _this._ignoreWhileAnimating = null;\n });\n if (_this !== fromSortable) {\n fromSortable.animateAll();\n fromSortable._ignoreWhileAnimating = null;\n }\n }\n\n // Null lastTarget if it is not inside a previously swapped element\n if (target === dragEl && !dragEl.animated || target === el && !target.animated) {\n lastTarget = null;\n }\n\n // no bubbling and not fallback\n if (!options.dragoverBubble && !evt.rootEl && target !== document) {\n dragEl.parentNode[expando]._isOutsideThisEl(evt.target);\n\n // Do not detect for empty insert if already inserted\n !insertion && nearestEmptyInsertDetectEvent(evt);\n }\n !options.dragoverBubble && evt.stopPropagation && evt.stopPropagation();\n return completedFired = true;\n }\n\n // Call when dragEl has been inserted\n function changed() {\n newIndex = index(dragEl);\n newDraggableIndex = index(dragEl, options.draggable);\n _dispatchEvent({\n sortable: _this,\n name: 'change',\n toEl: el,\n newIndex: newIndex,\n newDraggableIndex: newDraggableIndex,\n originalEvent: evt\n });\n }\n if (evt.preventDefault !== void 0) {\n evt.cancelable && evt.preventDefault();\n }\n target = closest(target, options.draggable, el, true);\n dragOverEvent('dragOver');\n if (Sortable.eventCanceled) return completedFired;\n if (dragEl.contains(evt.target) || target.animated && target.animatingX && target.animatingY || _this._ignoreWhileAnimating === target) {\n return completed(false);\n }\n ignoreNextClick = false;\n if (activeSortable && !options.disabled && (isOwner ? canSort || (revert = parentEl !== rootEl) // Reverting item into the original list\n : putSortable === this || (this.lastPutMode = activeGroup.checkPull(this, activeSortable, dragEl, evt)) && group.checkPut(this, activeSortable, dragEl, evt))) {\n vertical = this._getDirection(evt, target) === 'vertical';\n dragRect = getRect(dragEl);\n dragOverEvent('dragOverValid');\n if (Sortable.eventCanceled) return completedFired;\n if (revert) {\n parentEl = rootEl; // actualization\n capture();\n this._hideClone();\n dragOverEvent('revert');\n if (!Sortable.eventCanceled) {\n if (nextEl) {\n rootEl.insertBefore(dragEl, nextEl);\n } else {\n rootEl.appendChild(dragEl);\n }\n }\n return completed(true);\n }\n var elLastChild = lastChild(el, options.draggable);\n if (!elLastChild || _ghostIsLast(evt, vertical, this) && !elLastChild.animated) {\n // Insert to end of list\n\n // If already at end of list: Do not insert\n if (elLastChild === dragEl) {\n return completed(false);\n }\n\n // if there is a last element, it is the target\n if (elLastChild && el === evt.target) {\n target = elLastChild;\n }\n if (target) {\n targetRect = getRect(target);\n }\n if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, !!target) !== false) {\n capture();\n if (elLastChild && elLastChild.nextSibling) {\n // the last draggable element is not the last node\n el.insertBefore(dragEl, elLastChild.nextSibling);\n } else {\n el.appendChild(dragEl);\n }\n parentEl = el; // actualization\n\n changed();\n return completed(true);\n }\n } else if (elLastChild && _ghostIsFirst(evt, vertical, this)) {\n // Insert to start of list\n var firstChild = getChild(el, 0, options, true);\n if (firstChild === dragEl) {\n return completed(false);\n }\n target = firstChild;\n targetRect = getRect(target);\n if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, false) !== false) {\n capture();\n el.insertBefore(dragEl, firstChild);\n parentEl = el; // actualization\n\n changed();\n return completed(true);\n }\n } else if (target.parentNode === el) {\n targetRect = getRect(target);\n var direction = 0,\n targetBeforeFirstSwap,\n differentLevel = dragEl.parentNode !== el,\n differentRowCol = !_dragElInRowColumn(dragEl.animated && dragEl.toRect || dragRect, target.animated && target.toRect || targetRect, vertical),\n side1 = vertical ? 'top' : 'left',\n scrolledPastTop = isScrolledPast(target, 'top', 'top') || isScrolledPast(dragEl, 'top', 'top'),\n scrollBefore = scrolledPastTop ? scrolledPastTop.scrollTop : void 0;\n if (lastTarget !== target) {\n targetBeforeFirstSwap = targetRect[side1];\n pastFirstInvertThresh = false;\n isCircumstantialInvert = !differentRowCol && options.invertSwap || differentLevel;\n }\n direction = _getSwapDirection(evt, target, targetRect, vertical, differentRowCol ? 1 : options.swapThreshold, options.invertedSwapThreshold == null ? options.swapThreshold : options.invertedSwapThreshold, isCircumstantialInvert, lastTarget === target);\n var sibling;\n if (direction !== 0) {\n // Check if target is beside dragEl in respective direction (ignoring hidden elements)\n var dragIndex = index(dragEl);\n do {\n dragIndex -= direction;\n sibling = parentEl.children[dragIndex];\n } while (sibling && (css(sibling, 'display') === 'none' || sibling === ghostEl));\n }\n // If dragEl is already beside target: Do not insert\n if (direction === 0 || sibling === target) {\n return completed(false);\n }\n lastTarget = target;\n lastDirection = direction;\n var nextSibling = target.nextElementSibling,\n after = false;\n after = direction === 1;\n var moveVector = _onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, after);\n if (moveVector !== false) {\n if (moveVector === 1 || moveVector === -1) {\n after = moveVector === 1;\n }\n _silent = true;\n setTimeout(_unsilent, 30);\n capture();\n if (after && !nextSibling) {\n el.appendChild(dragEl);\n } else {\n target.parentNode.insertBefore(dragEl, after ? nextSibling : target);\n }\n\n // Undo chrome's scroll adjustment (has no effect on other browsers)\n if (scrolledPastTop) {\n scrollBy(scrolledPastTop, 0, scrollBefore - scrolledPastTop.scrollTop);\n }\n parentEl = dragEl.parentNode; // actualization\n\n // must be done before animation\n if (targetBeforeFirstSwap !== undefined && !isCircumstantialInvert) {\n targetMoveDistance = Math.abs(targetBeforeFirstSwap - getRect(target)[side1]);\n }\n changed();\n return completed(true);\n }\n }\n if (el.contains(dragEl)) {\n return completed(false);\n }\n }\n return false;\n },\n _ignoreWhileAnimating: null,\n _offMoveEvents: function _offMoveEvents() {\n off(document, 'mousemove', this._onTouchMove);\n off(document, 'touchmove', this._onTouchMove);\n off(document, 'pointermove', this._onTouchMove);\n off(document, 'dragover', nearestEmptyInsertDetectEvent);\n off(document, 'mousemove', nearestEmptyInsertDetectEvent);\n off(document, 'touchmove', nearestEmptyInsertDetectEvent);\n },\n _offUpEvents: function _offUpEvents() {\n var ownerDocument = this.el.ownerDocument;\n off(ownerDocument, 'mouseup', this._onDrop);\n off(ownerDocument, 'touchend', this._onDrop);\n off(ownerDocument, 'pointerup', this._onDrop);\n off(ownerDocument, 'touchcancel', this._onDrop);\n off(document, 'selectstart', this);\n },\n _onDrop: function _onDrop( /**Event*/evt) {\n var el = this.el,\n options = this.options;\n\n // Get the index of the dragged element within its parent\n newIndex = index(dragEl);\n newDraggableIndex = index(dragEl, options.draggable);\n pluginEvent('drop', this, {\n evt: evt\n });\n parentEl = dragEl && dragEl.parentNode;\n\n // Get again after plugin event\n newIndex = index(dragEl);\n newDraggableIndex = index(dragEl, options.draggable);\n if (Sortable.eventCanceled) {\n this._nulling();\n return;\n }\n awaitingDragStarted = false;\n isCircumstantialInvert = false;\n pastFirstInvertThresh = false;\n clearInterval(this._loopId);\n clearTimeout(this._dragStartTimer);\n _cancelNextTick(this.cloneId);\n _cancelNextTick(this._dragStartId);\n\n // Unbind events\n if (this.nativeDraggable) {\n off(document, 'drop', this);\n off(el, 'dragstart', this._onDragStart);\n }\n this._offMoveEvents();\n this._offUpEvents();\n if (Safari) {\n css(document.body, 'user-select', '');\n }\n css(dragEl, 'transform', '');\n if (evt) {\n if (moved) {\n evt.cancelable && evt.preventDefault();\n !options.dropBubble && evt.stopPropagation();\n }\n ghostEl && ghostEl.parentNode && ghostEl.parentNode.removeChild(ghostEl);\n if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {\n // Remove clone(s)\n cloneEl && cloneEl.parentNode && cloneEl.parentNode.removeChild(cloneEl);\n }\n if (dragEl) {\n if (this.nativeDraggable) {\n off(dragEl, 'dragend', this);\n }\n _disableDraggable(dragEl);\n dragEl.style['will-change'] = '';\n\n // Remove classes\n // ghostClass is added in dragStarted\n if (moved && !awaitingDragStarted) {\n toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : this.options.ghostClass, false);\n }\n toggleClass(dragEl, this.options.chosenClass, false);\n\n // Drag stop event\n _dispatchEvent({\n sortable: this,\n name: 'unchoose',\n toEl: parentEl,\n newIndex: null,\n newDraggableIndex: null,\n originalEvent: evt\n });\n if (rootEl !== parentEl) {\n if (newIndex >= 0) {\n // Add event\n _dispatchEvent({\n rootEl: parentEl,\n name: 'add',\n toEl: parentEl,\n fromEl: rootEl,\n originalEvent: evt\n });\n\n // Remove event\n _dispatchEvent({\n sortable: this,\n name: 'remove',\n toEl: parentEl,\n originalEvent: evt\n });\n\n // drag from one list and drop into another\n _dispatchEvent({\n rootEl: parentEl,\n name: 'sort',\n toEl: parentEl,\n fromEl: rootEl,\n originalEvent: evt\n });\n _dispatchEvent({\n sortable: this,\n name: 'sort',\n toEl: parentEl,\n originalEvent: evt\n });\n }\n putSortable && putSortable.save();\n } else {\n if (newIndex !== oldIndex) {\n if (newIndex >= 0) {\n // drag & drop within the same list\n _dispatchEvent({\n sortable: this,\n name: 'update',\n toEl: parentEl,\n originalEvent: evt\n });\n _dispatchEvent({\n sortable: this,\n name: 'sort',\n toEl: parentEl,\n originalEvent: evt\n });\n }\n }\n }\n if (Sortable.active) {\n /* jshint eqnull:true */\n if (newIndex == null || newIndex === -1) {\n newIndex = oldIndex;\n newDraggableIndex = oldDraggableIndex;\n }\n _dispatchEvent({\n sortable: this,\n name: 'end',\n toEl: parentEl,\n originalEvent: evt\n });\n\n // Save sorting\n this.save();\n }\n }\n }\n this._nulling();\n },\n _nulling: function _nulling() {\n pluginEvent('nulling', this);\n rootEl = dragEl = parentEl = ghostEl = nextEl = cloneEl = lastDownEl = cloneHidden = tapEvt = touchEvt = moved = newIndex = newDraggableIndex = oldIndex = oldDraggableIndex = lastTarget = lastDirection = putSortable = activeGroup = Sortable.dragged = Sortable.ghost = Sortable.clone = Sortable.active = null;\n savedInputChecked.forEach(function (el) {\n el.checked = true;\n });\n savedInputChecked.length = lastDx = lastDy = 0;\n },\n handleEvent: function handleEvent( /**Event*/evt) {\n switch (evt.type) {\n case 'drop':\n case 'dragend':\n this._onDrop(evt);\n break;\n case 'dragenter':\n case 'dragover':\n if (dragEl) {\n this._onDragOver(evt);\n _globalDragOver(evt);\n }\n break;\n case 'selectstart':\n evt.preventDefault();\n break;\n }\n },\n /**\r\n * Serializes the item into an array of string.\r\n * @returns {String[]}\r\n */\n toArray: function toArray() {\n var order = [],\n el,\n children = this.el.children,\n i = 0,\n n = children.length,\n options = this.options;\n for (; i < n; i++) {\n el = children[i];\n if (closest(el, options.draggable, this.el, false)) {\n order.push(el.getAttribute(options.dataIdAttr) || _generateId(el));\n }\n }\n return order;\n },\n /**\r\n * Sorts the elements according to the array.\r\n * @param {String[]} order order of the items\r\n */\n sort: function sort(order, useAnimation) {\n var items = {},\n rootEl = this.el;\n this.toArray().forEach(function (id, i) {\n var el = rootEl.children[i];\n if (closest(el, this.options.draggable, rootEl, false)) {\n items[id] = el;\n }\n }, this);\n useAnimation && this.captureAnimationState();\n order.forEach(function (id) {\n if (items[id]) {\n rootEl.removeChild(items[id]);\n rootEl.appendChild(items[id]);\n }\n });\n useAnimation && this.animateAll();\n },\n /**\r\n * Save the current sorting\r\n */\n save: function save() {\n var store = this.options.store;\n store && store.set && store.set(this);\n },\n /**\r\n * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.\r\n * @param {HTMLElement} el\r\n * @param {String} [selector] default: `options.draggable`\r\n * @returns {HTMLElement|null}\r\n */\n closest: function closest$1(el, selector) {\n return closest(el, selector || this.options.draggable, this.el, false);\n },\n /**\r\n * Set/get option\r\n * @param {string} name\r\n * @param {*} [value]\r\n * @returns {*}\r\n */\n option: function option(name, value) {\n var options = this.options;\n if (value === void 0) {\n return options[name];\n } else {\n var modifiedValue = PluginManager.modifyOption(this, name, value);\n if (typeof modifiedValue !== 'undefined') {\n options[name] = modifiedValue;\n } else {\n options[name] = value;\n }\n if (name === 'group') {\n _prepareGroup(options);\n }\n }\n },\n /**\r\n * Destroy\r\n */\n destroy: function destroy() {\n pluginEvent('destroy', this);\n var el = this.el;\n el[expando] = null;\n off(el, 'mousedown', this._onTapStart);\n off(el, 'touchstart', this._onTapStart);\n off(el, 'pointerdown', this._onTapStart);\n if (this.nativeDraggable) {\n off(el, 'dragover', this);\n off(el, 'dragenter', this);\n }\n // Remove draggable attributes\n Array.prototype.forEach.call(el.querySelectorAll('[draggable]'), function (el) {\n el.removeAttribute('draggable');\n });\n this._onDrop();\n this._disableDelayedDragEvents();\n sortables.splice(sortables.indexOf(this.el), 1);\n this.el = el = null;\n },\n _hideClone: function _hideClone() {\n if (!cloneHidden) {\n pluginEvent('hideClone', this);\n if (Sortable.eventCanceled) return;\n css(cloneEl, 'display', 'none');\n if (this.options.removeCloneOnHide && cloneEl.parentNode) {\n cloneEl.parentNode.removeChild(cloneEl);\n }\n cloneHidden = true;\n }\n },\n _showClone: function _showClone(putSortable) {\n if (putSortable.lastPutMode !== 'clone') {\n this._hideClone();\n return;\n }\n if (cloneHidden) {\n pluginEvent('showClone', this);\n if (Sortable.eventCanceled) return;\n\n // show clone at dragEl or original position\n if (dragEl.parentNode == rootEl && !this.options.group.revertClone) {\n rootEl.insertBefore(cloneEl, dragEl);\n } else if (nextEl) {\n rootEl.insertBefore(cloneEl, nextEl);\n } else {\n rootEl.appendChild(cloneEl);\n }\n if (this.options.group.revertClone) {\n this.animate(dragEl, cloneEl);\n }\n css(cloneEl, 'display', '');\n cloneHidden = false;\n }\n }\n};\nfunction _globalDragOver( /**Event*/evt) {\n if (evt.dataTransfer) {\n evt.dataTransfer.dropEffect = 'move';\n }\n evt.cancelable && evt.preventDefault();\n}\nfunction _onMove(fromEl, toEl, dragEl, dragRect, targetEl, targetRect, originalEvent, willInsertAfter) {\n var evt,\n sortable = fromEl[expando],\n onMoveFn = sortable.options.onMove,\n retVal;\n // Support for new CustomEvent feature\n if (window.CustomEvent && !IE11OrLess && !Edge) {\n evt = new CustomEvent('move', {\n bubbles: true,\n cancelable: true\n });\n } else {\n evt = document.createEvent('Event');\n evt.initEvent('move', true, true);\n }\n evt.to = toEl;\n evt.from = fromEl;\n evt.dragged = dragEl;\n evt.draggedRect = dragRect;\n evt.related = targetEl || toEl;\n evt.relatedRect = targetRect || getRect(toEl);\n evt.willInsertAfter = willInsertAfter;\n evt.originalEvent = originalEvent;\n fromEl.dispatchEvent(evt);\n if (onMoveFn) {\n retVal = onMoveFn.call(sortable, evt, originalEvent);\n }\n return retVal;\n}\nfunction _disableDraggable(el) {\n el.draggable = false;\n}\nfunction _unsilent() {\n _silent = false;\n}\nfunction _ghostIsFirst(evt, vertical, sortable) {\n var firstElRect = getRect(getChild(sortable.el, 0, sortable.options, true));\n var childContainingRect = getChildContainingRectFromElement(sortable.el, sortable.options, ghostEl);\n var spacer = 10;\n return vertical ? evt.clientX < childContainingRect.left - spacer || evt.clientY < firstElRect.top && evt.clientX < firstElRect.right : evt.clientY < childContainingRect.top - spacer || evt.clientY < firstElRect.bottom && evt.clientX < firstElRect.left;\n}\nfunction _ghostIsLast(evt, vertical, sortable) {\n var lastElRect = getRect(lastChild(sortable.el, sortable.options.draggable));\n var childContainingRect = getChildContainingRectFromElement(sortable.el, sortable.options, ghostEl);\n var spacer = 10;\n return vertical ? evt.clientX > childContainingRect.right + spacer || evt.clientY > lastElRect.bottom && evt.clientX > lastElRect.left : evt.clientY > childContainingRect.bottom + spacer || evt.clientX > lastElRect.right && evt.clientY > lastElRect.top;\n}\nfunction _getSwapDirection(evt, target, targetRect, vertical, swapThreshold, invertedSwapThreshold, invertSwap, isLastTarget) {\n var mouseOnAxis = vertical ? evt.clientY : evt.clientX,\n targetLength = vertical ? targetRect.height : targetRect.width,\n targetS1 = vertical ? targetRect.top : targetRect.left,\n targetS2 = vertical ? targetRect.bottom : targetRect.right,\n invert = false;\n if (!invertSwap) {\n // Never invert or create dragEl shadow when target movemenet causes mouse to move past the end of regular swapThreshold\n if (isLastTarget && targetMoveDistance < targetLength * swapThreshold) {\n // multiplied only by swapThreshold because mouse will already be inside target by (1 - threshold) * targetLength / 2\n // check if past first invert threshold on side opposite of lastDirection\n if (!pastFirstInvertThresh && (lastDirection === 1 ? mouseOnAxis > targetS1 + targetLength * invertedSwapThreshold / 2 : mouseOnAxis < targetS2 - targetLength * invertedSwapThreshold / 2)) {\n // past first invert threshold, do not restrict inverted threshold to dragEl shadow\n pastFirstInvertThresh = true;\n }\n if (!pastFirstInvertThresh) {\n // dragEl shadow (target move distance shadow)\n if (lastDirection === 1 ? mouseOnAxis < targetS1 + targetMoveDistance // over dragEl shadow\n : mouseOnAxis > targetS2 - targetMoveDistance) {\n return -lastDirection;\n }\n } else {\n invert = true;\n }\n } else {\n // Regular\n if (mouseOnAxis > targetS1 + targetLength * (1 - swapThreshold) / 2 && mouseOnAxis < targetS2 - targetLength * (1 - swapThreshold) / 2) {\n return _getInsertDirection(target);\n }\n }\n }\n invert = invert || invertSwap;\n if (invert) {\n // Invert of regular\n if (mouseOnAxis < targetS1 + targetLength * invertedSwapThreshold / 2 || mouseOnAxis > targetS2 - targetLength * invertedSwapThreshold / 2) {\n return mouseOnAxis > targetS1 + targetLength / 2 ? 1 : -1;\n }\n }\n return 0;\n}\n\n/**\r\n * Gets the direction dragEl must be swapped relative to target in order to make it\r\n * seem that dragEl has been \"inserted\" into that element's position\r\n * @param {HTMLElement} target The target whose position dragEl is being inserted at\r\n * @return {Number} Direction dragEl must be swapped\r\n */\nfunction _getInsertDirection(target) {\n if (index(dragEl) < index(target)) {\n return 1;\n } else {\n return -1;\n }\n}\n\n/**\r\n * Generate id\r\n * @param {HTMLElement} el\r\n * @returns {String}\r\n * @private\r\n */\nfunction _generateId(el) {\n var str = el.tagName + el.className + el.src + el.href + el.textContent,\n i = str.length,\n sum = 0;\n while (i--) {\n sum += str.charCodeAt(i);\n }\n return sum.toString(36);\n}\nfunction _saveInputCheckedState(root) {\n savedInputChecked.length = 0;\n var inputs = root.getElementsByTagName('input');\n var idx = inputs.length;\n while (idx--) {\n var el = inputs[idx];\n el.checked && savedInputChecked.push(el);\n }\n}\nfunction _nextTick(fn) {\n return setTimeout(fn, 0);\n}\nfunction _cancelNextTick(id) {\n return clearTimeout(id);\n}\n\n// Fixed #973:\nif (documentExists) {\n on(document, 'touchmove', function (evt) {\n if ((Sortable.active || awaitingDragStarted) && evt.cancelable) {\n evt.preventDefault();\n }\n });\n}\n\n// Export utils\nSortable.utils = {\n on: on,\n off: off,\n css: css,\n find: find,\n is: function is(el, selector) {\n return !!closest(el, selector, el, false);\n },\n extend: extend,\n throttle: throttle,\n closest: closest,\n toggleClass: toggleClass,\n clone: clone,\n index: index,\n nextTick: _nextTick,\n cancelNextTick: _cancelNextTick,\n detectDirection: _detectDirection,\n getChild: getChild\n};\n\n/**\r\n * Get the Sortable instance of an element\r\n * @param {HTMLElement} element The element\r\n * @return {Sortable|undefined} The instance of Sortable\r\n */\nSortable.get = function (element) {\n return element[expando];\n};\n\n/**\r\n * Mount a plugin to Sortable\r\n * @param {...SortablePlugin|SortablePlugin[]} plugins Plugins being mounted\r\n */\nSortable.mount = function () {\n for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) {\n plugins[_key] = arguments[_key];\n }\n if (plugins[0].constructor === Array) plugins = plugins[0];\n plugins.forEach(function (plugin) {\n if (!plugin.prototype || !plugin.prototype.constructor) {\n throw \"Sortable: Mounted plugin must be a constructor function, not \".concat({}.toString.call(plugin));\n }\n if (plugin.utils) Sortable.utils = _objectSpread2(_objectSpread2({}, Sortable.utils), plugin.utils);\n PluginManager.mount(plugin);\n });\n};\n\n/**\r\n * Create sortable instance\r\n * @param {HTMLElement} el\r\n * @param {Object} [options]\r\n */\nSortable.create = function (el, options) {\n return new Sortable(el, options);\n};\n\n// Export\nSortable.version = version;\n\nvar autoScrolls = [],\n scrollEl,\n scrollRootEl,\n scrolling = false,\n lastAutoScrollX,\n lastAutoScrollY,\n touchEvt$1,\n pointerElemChangedInterval;\nfunction AutoScrollPlugin() {\n function AutoScroll() {\n this.defaults = {\n scroll: true,\n forceAutoScrollFallback: false,\n scrollSensitivity: 30,\n scrollSpeed: 10,\n bubbleScroll: true\n };\n\n // Bind all private methods\n for (var fn in this) {\n if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n this[fn] = this[fn].bind(this);\n }\n }\n }\n AutoScroll.prototype = {\n dragStarted: function dragStarted(_ref) {\n var originalEvent = _ref.originalEvent;\n if (this.sortable.nativeDraggable) {\n on(document, 'dragover', this._handleAutoScroll);\n } else {\n if (this.options.supportPointer) {\n on(document, 'pointermove', this._handleFallbackAutoScroll);\n } else if (originalEvent.touches) {\n on(document, 'touchmove', this._handleFallbackAutoScroll);\n } else {\n on(document, 'mousemove', this._handleFallbackAutoScroll);\n }\n }\n },\n dragOverCompleted: function dragOverCompleted(_ref2) {\n var originalEvent = _ref2.originalEvent;\n // For when bubbling is canceled and using fallback (fallback 'touchmove' always reached)\n if (!this.options.dragOverBubble && !originalEvent.rootEl) {\n this._handleAutoScroll(originalEvent);\n }\n },\n drop: function drop() {\n if (this.sortable.nativeDraggable) {\n off(document, 'dragover', this._handleAutoScroll);\n } else {\n off(document, 'pointermove', this._handleFallbackAutoScroll);\n off(document, 'touchmove', this._handleFallbackAutoScroll);\n off(document, 'mousemove', this._handleFallbackAutoScroll);\n }\n clearPointerElemChangedInterval();\n clearAutoScrolls();\n cancelThrottle();\n },\n nulling: function nulling() {\n touchEvt$1 = scrollRootEl = scrollEl = scrolling = pointerElemChangedInterval = lastAutoScrollX = lastAutoScrollY = null;\n autoScrolls.length = 0;\n },\n _handleFallbackAutoScroll: function _handleFallbackAutoScroll(evt) {\n this._handleAutoScroll(evt, true);\n },\n _handleAutoScroll: function _handleAutoScroll(evt, fallback) {\n var _this = this;\n var x = (evt.touches ? evt.touches[0] : evt).clientX,\n y = (evt.touches ? evt.touches[0] : evt).clientY,\n elem = document.elementFromPoint(x, y);\n touchEvt$1 = evt;\n\n // IE does not seem to have native autoscroll,\n // Edge's autoscroll seems too conditional,\n // MACOS Safari does not have autoscroll,\n // Firefox and Chrome are good\n if (fallback || this.options.forceAutoScrollFallback || Edge || IE11OrLess || Safari) {\n autoScroll(evt, this.options, elem, fallback);\n\n // Listener for pointer element change\n var ogElemScroller = getParentAutoScrollElement(elem, true);\n if (scrolling && (!pointerElemChangedInterval || x !== lastAutoScrollX || y !== lastAutoScrollY)) {\n pointerElemChangedInterval && clearPointerElemChangedInterval();\n // Detect for pointer elem change, emulating native DnD behaviour\n pointerElemChangedInterval = setInterval(function () {\n var newElem = getParentAutoScrollElement(document.elementFromPoint(x, y), true);\n if (newElem !== ogElemScroller) {\n ogElemScroller = newElem;\n clearAutoScrolls();\n }\n autoScroll(evt, _this.options, newElem, fallback);\n }, 10);\n lastAutoScrollX = x;\n lastAutoScrollY = y;\n }\n } else {\n // if DnD is enabled (and browser has good autoscrolling), first autoscroll will already scroll, so get parent autoscroll of first autoscroll\n if (!this.options.bubbleScroll || getParentAutoScrollElement(elem, true) === getWindowScrollingElement()) {\n clearAutoScrolls();\n return;\n }\n autoScroll(evt, this.options, getParentAutoScrollElement(elem, false), false);\n }\n }\n };\n return _extends(AutoScroll, {\n pluginName: 'scroll',\n initializeByDefault: true\n });\n}\nfunction clearAutoScrolls() {\n autoScrolls.forEach(function (autoScroll) {\n clearInterval(autoScroll.pid);\n });\n autoScrolls = [];\n}\nfunction clearPointerElemChangedInterval() {\n clearInterval(pointerElemChangedInterval);\n}\nvar autoScroll = throttle(function (evt, options, rootEl, isFallback) {\n // Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=505521\n if (!options.scroll) return;\n var x = (evt.touches ? evt.touches[0] : evt).clientX,\n y = (evt.touches ? evt.touches[0] : evt).clientY,\n sens = options.scrollSensitivity,\n speed = options.scrollSpeed,\n winScroller = getWindowScrollingElement();\n var scrollThisInstance = false,\n scrollCustomFn;\n\n // New scroll root, set scrollEl\n if (scrollRootEl !== rootEl) {\n scrollRootEl = rootEl;\n clearAutoScrolls();\n scrollEl = options.scroll;\n scrollCustomFn = options.scrollFn;\n if (scrollEl === true) {\n scrollEl = getParentAutoScrollElement(rootEl, true);\n }\n }\n var layersOut = 0;\n var currentParent = scrollEl;\n do {\n var el = currentParent,\n rect = getRect(el),\n top = rect.top,\n bottom = rect.bottom,\n left = rect.left,\n right = rect.right,\n width = rect.width,\n height = rect.height,\n canScrollX = void 0,\n canScrollY = void 0,\n scrollWidth = el.scrollWidth,\n scrollHeight = el.scrollHeight,\n elCSS = css(el),\n scrollPosX = el.scrollLeft,\n scrollPosY = el.scrollTop;\n if (el === winScroller) {\n canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll' || elCSS.overflowX === 'visible');\n canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll' || elCSS.overflowY === 'visible');\n } else {\n canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll');\n canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll');\n }\n var vx = canScrollX && (Math.abs(right - x) <= sens && scrollPosX + width < scrollWidth) - (Math.abs(left - x) <= sens && !!scrollPosX);\n var vy = canScrollY && (Math.abs(bottom - y) <= sens && scrollPosY + height < scrollHeight) - (Math.abs(top - y) <= sens && !!scrollPosY);\n if (!autoScrolls[layersOut]) {\n for (var i = 0; i <= layersOut; i++) {\n if (!autoScrolls[i]) {\n autoScrolls[i] = {};\n }\n }\n }\n if (autoScrolls[layersOut].vx != vx || autoScrolls[layersOut].vy != vy || autoScrolls[layersOut].el !== el) {\n autoScrolls[layersOut].el = el;\n autoScrolls[layersOut].vx = vx;\n autoScrolls[layersOut].vy = vy;\n clearInterval(autoScrolls[layersOut].pid);\n if (vx != 0 || vy != 0) {\n scrollThisInstance = true;\n /* jshint loopfunc:true */\n autoScrolls[layersOut].pid = setInterval(function () {\n // emulate drag over during autoscroll (fallback), emulating native DnD behaviour\n if (isFallback && this.layer === 0) {\n Sortable.active._onTouchMove(touchEvt$1); // To move ghost if it is positioned absolutely\n }\n var scrollOffsetY = autoScrolls[this.layer].vy ? autoScrolls[this.layer].vy * speed : 0;\n var scrollOffsetX = autoScrolls[this.layer].vx ? autoScrolls[this.layer].vx * speed : 0;\n if (typeof scrollCustomFn === 'function') {\n if (scrollCustomFn.call(Sortable.dragged.parentNode[expando], scrollOffsetX, scrollOffsetY, evt, touchEvt$1, autoScrolls[this.layer].el) !== 'continue') {\n return;\n }\n }\n scrollBy(autoScrolls[this.layer].el, scrollOffsetX, scrollOffsetY);\n }.bind({\n layer: layersOut\n }), 24);\n }\n }\n layersOut++;\n } while (options.bubbleScroll && currentParent !== winScroller && (currentParent = getParentAutoScrollElement(currentParent, false)));\n scrolling = scrollThisInstance; // in case another function catches scrolling as false in between when it is not\n}, 30);\n\nvar drop = function drop(_ref) {\n var originalEvent = _ref.originalEvent,\n putSortable = _ref.putSortable,\n dragEl = _ref.dragEl,\n activeSortable = _ref.activeSortable,\n dispatchSortableEvent = _ref.dispatchSortableEvent,\n hideGhostForTarget = _ref.hideGhostForTarget,\n unhideGhostForTarget = _ref.unhideGhostForTarget;\n if (!originalEvent) return;\n var toSortable = putSortable || activeSortable;\n hideGhostForTarget();\n var touch = originalEvent.changedTouches && originalEvent.changedTouches.length ? originalEvent.changedTouches[0] : originalEvent;\n var target = document.elementFromPoint(touch.clientX, touch.clientY);\n unhideGhostForTarget();\n if (toSortable && !toSortable.el.contains(target)) {\n dispatchSortableEvent('spill');\n this.onSpill({\n dragEl: dragEl,\n putSortable: putSortable\n });\n }\n};\nfunction Revert() {}\nRevert.prototype = {\n startIndex: null,\n dragStart: function dragStart(_ref2) {\n var oldDraggableIndex = _ref2.oldDraggableIndex;\n this.startIndex = oldDraggableIndex;\n },\n onSpill: function onSpill(_ref3) {\n var dragEl = _ref3.dragEl,\n putSortable = _ref3.putSortable;\n this.sortable.captureAnimationState();\n if (putSortable) {\n putSortable.captureAnimationState();\n }\n var nextSibling = getChild(this.sortable.el, this.startIndex, this.options);\n if (nextSibling) {\n this.sortable.el.insertBefore(dragEl, nextSibling);\n } else {\n this.sortable.el.appendChild(dragEl);\n }\n this.sortable.animateAll();\n if (putSortable) {\n putSortable.animateAll();\n }\n },\n drop: drop\n};\n_extends(Revert, {\n pluginName: 'revertOnSpill'\n});\nfunction Remove() {}\nRemove.prototype = {\n onSpill: function onSpill(_ref4) {\n var dragEl = _ref4.dragEl,\n putSortable = _ref4.putSortable;\n var parentSortable = putSortable || this.sortable;\n parentSortable.captureAnimationState();\n dragEl.parentNode && dragEl.parentNode.removeChild(dragEl);\n parentSortable.animateAll();\n },\n drop: drop\n};\n_extends(Remove, {\n pluginName: 'removeOnSpill'\n});\n\nvar lastSwapEl;\nfunction SwapPlugin() {\n function Swap() {\n this.defaults = {\n swapClass: 'sortable-swap-highlight'\n };\n }\n Swap.prototype = {\n dragStart: function dragStart(_ref) {\n var dragEl = _ref.dragEl;\n lastSwapEl = dragEl;\n },\n dragOverValid: function dragOverValid(_ref2) {\n var completed = _ref2.completed,\n target = _ref2.target,\n onMove = _ref2.onMove,\n activeSortable = _ref2.activeSortable,\n changed = _ref2.changed,\n cancel = _ref2.cancel;\n if (!activeSortable.options.swap) return;\n var el = this.sortable.el,\n options = this.options;\n if (target && target !== el) {\n var prevSwapEl = lastSwapEl;\n if (onMove(target) !== false) {\n toggleClass(target, options.swapClass, true);\n lastSwapEl = target;\n } else {\n lastSwapEl = null;\n }\n if (prevSwapEl && prevSwapEl !== lastSwapEl) {\n toggleClass(prevSwapEl, options.swapClass, false);\n }\n }\n changed();\n completed(true);\n cancel();\n },\n drop: function drop(_ref3) {\n var activeSortable = _ref3.activeSortable,\n putSortable = _ref3.putSortable,\n dragEl = _ref3.dragEl;\n var toSortable = putSortable || this.sortable;\n var options = this.options;\n lastSwapEl && toggleClass(lastSwapEl, options.swapClass, false);\n if (lastSwapEl && (options.swap || putSortable && putSortable.options.swap)) {\n if (dragEl !== lastSwapEl) {\n toSortable.captureAnimationState();\n if (toSortable !== activeSortable) activeSortable.captureAnimationState();\n swapNodes(dragEl, lastSwapEl);\n toSortable.animateAll();\n if (toSortable !== activeSortable) activeSortable.animateAll();\n }\n }\n },\n nulling: function nulling() {\n lastSwapEl = null;\n }\n };\n return _extends(Swap, {\n pluginName: 'swap',\n eventProperties: function eventProperties() {\n return {\n swapItem: lastSwapEl\n };\n }\n });\n}\nfunction swapNodes(n1, n2) {\n var p1 = n1.parentNode,\n p2 = n2.parentNode,\n i1,\n i2;\n if (!p1 || !p2 || p1.isEqualNode(n2) || p2.isEqualNode(n1)) return;\n i1 = index(n1);\n i2 = index(n2);\n if (p1.isEqualNode(p2) && i1 < i2) {\n i2++;\n }\n p1.insertBefore(n2, p1.children[i1]);\n p2.insertBefore(n1, p2.children[i2]);\n}\n\nvar multiDragElements = [],\n multiDragClones = [],\n lastMultiDragSelect,\n // for selection with modifier key down (SHIFT)\n multiDragSortable,\n initialFolding = false,\n // Initial multi-drag fold when drag started\n folding = false,\n // Folding any other time\n dragStarted = false,\n dragEl$1,\n clonesFromRect,\n clonesHidden;\nfunction MultiDragPlugin() {\n function MultiDrag(sortable) {\n // Bind all private methods\n for (var fn in this) {\n if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n this[fn] = this[fn].bind(this);\n }\n }\n if (!sortable.options.avoidImplicitDeselect) {\n if (sortable.options.supportPointer) {\n on(document, 'pointerup', this._deselectMultiDrag);\n } else {\n on(document, 'mouseup', this._deselectMultiDrag);\n on(document, 'touchend', this._deselectMultiDrag);\n }\n }\n on(document, 'keydown', this._checkKeyDown);\n on(document, 'keyup', this._checkKeyUp);\n this.defaults = {\n selectedClass: 'sortable-selected',\n multiDragKey: null,\n avoidImplicitDeselect: false,\n setData: function setData(dataTransfer, dragEl) {\n var data = '';\n if (multiDragElements.length && multiDragSortable === sortable) {\n multiDragElements.forEach(function (multiDragElement, i) {\n data += (!i ? '' : ', ') + multiDragElement.textContent;\n });\n } else {\n data = dragEl.textContent;\n }\n dataTransfer.setData('Text', data);\n }\n };\n }\n MultiDrag.prototype = {\n multiDragKeyDown: false,\n isMultiDrag: false,\n delayStartGlobal: function delayStartGlobal(_ref) {\n var dragged = _ref.dragEl;\n dragEl$1 = dragged;\n },\n delayEnded: function delayEnded() {\n this.isMultiDrag = ~multiDragElements.indexOf(dragEl$1);\n },\n setupClone: function setupClone(_ref2) {\n var sortable = _ref2.sortable,\n cancel = _ref2.cancel;\n if (!this.isMultiDrag) return;\n for (var i = 0; i < multiDragElements.length; i++) {\n multiDragClones.push(clone(multiDragElements[i]));\n multiDragClones[i].sortableIndex = multiDragElements[i].sortableIndex;\n multiDragClones[i].draggable = false;\n multiDragClones[i].style['will-change'] = '';\n toggleClass(multiDragClones[i], this.options.selectedClass, false);\n multiDragElements[i] === dragEl$1 && toggleClass(multiDragClones[i], this.options.chosenClass, false);\n }\n sortable._hideClone();\n cancel();\n },\n clone: function clone(_ref3) {\n var sortable = _ref3.sortable,\n rootEl = _ref3.rootEl,\n dispatchSortableEvent = _ref3.dispatchSortableEvent,\n cancel = _ref3.cancel;\n if (!this.isMultiDrag) return;\n if (!this.options.removeCloneOnHide) {\n if (multiDragElements.length && multiDragSortable === sortable) {\n insertMultiDragClones(true, rootEl);\n dispatchSortableEvent('clone');\n cancel();\n }\n }\n },\n showClone: function showClone(_ref4) {\n var cloneNowShown = _ref4.cloneNowShown,\n rootEl = _ref4.rootEl,\n cancel = _ref4.cancel;\n if (!this.isMultiDrag) return;\n insertMultiDragClones(false, rootEl);\n multiDragClones.forEach(function (clone) {\n css(clone, 'display', '');\n });\n cloneNowShown();\n clonesHidden = false;\n cancel();\n },\n hideClone: function hideClone(_ref5) {\n var _this = this;\n var sortable = _ref5.sortable,\n cloneNowHidden = _ref5.cloneNowHidden,\n cancel = _ref5.cancel;\n if (!this.isMultiDrag) return;\n multiDragClones.forEach(function (clone) {\n css(clone, 'display', 'none');\n if (_this.options.removeCloneOnHide && clone.parentNode) {\n clone.parentNode.removeChild(clone);\n }\n });\n cloneNowHidden();\n clonesHidden = true;\n cancel();\n },\n dragStartGlobal: function dragStartGlobal(_ref6) {\n var sortable = _ref6.sortable;\n if (!this.isMultiDrag && multiDragSortable) {\n multiDragSortable.multiDrag._deselectMultiDrag();\n }\n multiDragElements.forEach(function (multiDragElement) {\n multiDragElement.sortableIndex = index(multiDragElement);\n });\n\n // Sort multi-drag elements\n multiDragElements = multiDragElements.sort(function (a, b) {\n return a.sortableIndex - b.sortableIndex;\n });\n dragStarted = true;\n },\n dragStarted: function dragStarted(_ref7) {\n var _this2 = this;\n var sortable = _ref7.sortable;\n if (!this.isMultiDrag) return;\n if (this.options.sort) {\n // Capture rects,\n // hide multi drag elements (by positioning them absolute),\n // set multi drag elements rects to dragRect,\n // show multi drag elements,\n // animate to rects,\n // unset rects & remove from DOM\n\n sortable.captureAnimationState();\n if (this.options.animation) {\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement === dragEl$1) return;\n css(multiDragElement, 'position', 'absolute');\n });\n var dragRect = getRect(dragEl$1, false, true, true);\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement === dragEl$1) return;\n setRect(multiDragElement, dragRect);\n });\n folding = true;\n initialFolding = true;\n }\n }\n sortable.animateAll(function () {\n folding = false;\n initialFolding = false;\n if (_this2.options.animation) {\n multiDragElements.forEach(function (multiDragElement) {\n unsetRect(multiDragElement);\n });\n }\n\n // Remove all auxiliary multidrag items from el, if sorting enabled\n if (_this2.options.sort) {\n removeMultiDragElements();\n }\n });\n },\n dragOver: function dragOver(_ref8) {\n var target = _ref8.target,\n completed = _ref8.completed,\n cancel = _ref8.cancel;\n if (folding && ~multiDragElements.indexOf(target)) {\n completed(false);\n cancel();\n }\n },\n revert: function revert(_ref9) {\n var fromSortable = _ref9.fromSortable,\n rootEl = _ref9.rootEl,\n sortable = _ref9.sortable,\n dragRect = _ref9.dragRect;\n if (multiDragElements.length > 1) {\n // Setup unfold animation\n multiDragElements.forEach(function (multiDragElement) {\n sortable.addAnimationState({\n target: multiDragElement,\n rect: folding ? getRect(multiDragElement) : dragRect\n });\n unsetRect(multiDragElement);\n multiDragElement.fromRect = dragRect;\n fromSortable.removeAnimationState(multiDragElement);\n });\n folding = false;\n insertMultiDragElements(!this.options.removeCloneOnHide, rootEl);\n }\n },\n dragOverCompleted: function dragOverCompleted(_ref10) {\n var sortable = _ref10.sortable,\n isOwner = _ref10.isOwner,\n insertion = _ref10.insertion,\n activeSortable = _ref10.activeSortable,\n parentEl = _ref10.parentEl,\n putSortable = _ref10.putSortable;\n var options = this.options;\n if (insertion) {\n // Clones must be hidden before folding animation to capture dragRectAbsolute properly\n if (isOwner) {\n activeSortable._hideClone();\n }\n initialFolding = false;\n // If leaving sort:false root, or already folding - Fold to new location\n if (options.animation && multiDragElements.length > 1 && (folding || !isOwner && !activeSortable.options.sort && !putSortable)) {\n // Fold: Set all multi drag elements's rects to dragEl's rect when multi-drag elements are invisible\n var dragRectAbsolute = getRect(dragEl$1, false, true, true);\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement === dragEl$1) return;\n setRect(multiDragElement, dragRectAbsolute);\n\n // Move element(s) to end of parentEl so that it does not interfere with multi-drag clones insertion if they are inserted\n // while folding, and so that we can capture them again because old sortable will no longer be fromSortable\n parentEl.appendChild(multiDragElement);\n });\n folding = true;\n }\n\n // Clones must be shown (and check to remove multi drags) after folding when interfering multiDragElements are moved out\n if (!isOwner) {\n // Only remove if not folding (folding will remove them anyways)\n if (!folding) {\n removeMultiDragElements();\n }\n if (multiDragElements.length > 1) {\n var clonesHiddenBefore = clonesHidden;\n activeSortable._showClone(sortable);\n\n // Unfold animation for clones if showing from hidden\n if (activeSortable.options.animation && !clonesHidden && clonesHiddenBefore) {\n multiDragClones.forEach(function (clone) {\n activeSortable.addAnimationState({\n target: clone,\n rect: clonesFromRect\n });\n clone.fromRect = clonesFromRect;\n clone.thisAnimationDuration = null;\n });\n }\n } else {\n activeSortable._showClone(sortable);\n }\n }\n }\n },\n dragOverAnimationCapture: function dragOverAnimationCapture(_ref11) {\n var dragRect = _ref11.dragRect,\n isOwner = _ref11.isOwner,\n activeSortable = _ref11.activeSortable;\n multiDragElements.forEach(function (multiDragElement) {\n multiDragElement.thisAnimationDuration = null;\n });\n if (activeSortable.options.animation && !isOwner && activeSortable.multiDrag.isMultiDrag) {\n clonesFromRect = _extends({}, dragRect);\n var dragMatrix = matrix(dragEl$1, true);\n clonesFromRect.top -= dragMatrix.f;\n clonesFromRect.left -= dragMatrix.e;\n }\n },\n dragOverAnimationComplete: function dragOverAnimationComplete() {\n if (folding) {\n folding = false;\n removeMultiDragElements();\n }\n },\n drop: function drop(_ref12) {\n var evt = _ref12.originalEvent,\n rootEl = _ref12.rootEl,\n parentEl = _ref12.parentEl,\n sortable = _ref12.sortable,\n dispatchSortableEvent = _ref12.dispatchSortableEvent,\n oldIndex = _ref12.oldIndex,\n putSortable = _ref12.putSortable;\n var toSortable = putSortable || this.sortable;\n if (!evt) return;\n var options = this.options,\n children = parentEl.children;\n\n // Multi-drag selection\n if (!dragStarted) {\n if (options.multiDragKey && !this.multiDragKeyDown) {\n this._deselectMultiDrag();\n }\n toggleClass(dragEl$1, options.selectedClass, !~multiDragElements.indexOf(dragEl$1));\n if (!~multiDragElements.indexOf(dragEl$1)) {\n multiDragElements.push(dragEl$1);\n dispatchEvent({\n sortable: sortable,\n rootEl: rootEl,\n name: 'select',\n targetEl: dragEl$1,\n originalEvent: evt\n });\n\n // Modifier activated, select from last to dragEl\n if (evt.shiftKey && lastMultiDragSelect && sortable.el.contains(lastMultiDragSelect)) {\n var lastIndex = index(lastMultiDragSelect),\n currentIndex = index(dragEl$1);\n if (~lastIndex && ~currentIndex && lastIndex !== currentIndex) {\n // Must include lastMultiDragSelect (select it), in case modified selection from no selection\n // (but previous selection existed)\n var n, i;\n if (currentIndex > lastIndex) {\n i = lastIndex;\n n = currentIndex;\n } else {\n i = currentIndex;\n n = lastIndex + 1;\n }\n for (; i < n; i++) {\n if (~multiDragElements.indexOf(children[i])) continue;\n toggleClass(children[i], options.selectedClass, true);\n multiDragElements.push(children[i]);\n dispatchEvent({\n sortable: sortable,\n rootEl: rootEl,\n name: 'select',\n targetEl: children[i],\n originalEvent: evt\n });\n }\n }\n } else {\n lastMultiDragSelect = dragEl$1;\n }\n multiDragSortable = toSortable;\n } else {\n multiDragElements.splice(multiDragElements.indexOf(dragEl$1), 1);\n lastMultiDragSelect = null;\n dispatchEvent({\n sortable: sortable,\n rootEl: rootEl,\n name: 'deselect',\n targetEl: dragEl$1,\n originalEvent: evt\n });\n }\n }\n\n // Multi-drag drop\n if (dragStarted && this.isMultiDrag) {\n folding = false;\n // Do not \"unfold\" after around dragEl if reverted\n if ((parentEl[expando].options.sort || parentEl !== rootEl) && multiDragElements.length > 1) {\n var dragRect = getRect(dragEl$1),\n multiDragIndex = index(dragEl$1, ':not(.' + this.options.selectedClass + ')');\n if (!initialFolding && options.animation) dragEl$1.thisAnimationDuration = null;\n toSortable.captureAnimationState();\n if (!initialFolding) {\n if (options.animation) {\n dragEl$1.fromRect = dragRect;\n multiDragElements.forEach(function (multiDragElement) {\n multiDragElement.thisAnimationDuration = null;\n if (multiDragElement !== dragEl$1) {\n var rect = folding ? getRect(multiDragElement) : dragRect;\n multiDragElement.fromRect = rect;\n\n // Prepare unfold animation\n toSortable.addAnimationState({\n target: multiDragElement,\n rect: rect\n });\n }\n });\n }\n\n // Multi drag elements are not necessarily removed from the DOM on drop, so to reinsert\n // properly they must all be removed\n removeMultiDragElements();\n multiDragElements.forEach(function (multiDragElement) {\n if (children[multiDragIndex]) {\n parentEl.insertBefore(multiDragElement, children[multiDragIndex]);\n } else {\n parentEl.appendChild(multiDragElement);\n }\n multiDragIndex++;\n });\n\n // If initial folding is done, the elements may have changed position because they are now\n // unfolding around dragEl, even though dragEl may not have his index changed, so update event\n // must be fired here as Sortable will not.\n if (oldIndex === index(dragEl$1)) {\n var update = false;\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement.sortableIndex !== index(multiDragElement)) {\n update = true;\n return;\n }\n });\n if (update) {\n dispatchSortableEvent('update');\n dispatchSortableEvent('sort');\n }\n }\n }\n\n // Must be done after capturing individual rects (scroll bar)\n multiDragElements.forEach(function (multiDragElement) {\n unsetRect(multiDragElement);\n });\n toSortable.animateAll();\n }\n multiDragSortable = toSortable;\n }\n\n // Remove clones if necessary\n if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {\n multiDragClones.forEach(function (clone) {\n clone.parentNode && clone.parentNode.removeChild(clone);\n });\n }\n },\n nullingGlobal: function nullingGlobal() {\n this.isMultiDrag = dragStarted = false;\n multiDragClones.length = 0;\n },\n destroyGlobal: function destroyGlobal() {\n this._deselectMultiDrag();\n off(document, 'pointerup', this._deselectMultiDrag);\n off(document, 'mouseup', this._deselectMultiDrag);\n off(document, 'touchend', this._deselectMultiDrag);\n off(document, 'keydown', this._checkKeyDown);\n off(document, 'keyup', this._checkKeyUp);\n },\n _deselectMultiDrag: function _deselectMultiDrag(evt) {\n if (typeof dragStarted !== \"undefined\" && dragStarted) return;\n\n // Only deselect if selection is in this sortable\n if (multiDragSortable !== this.sortable) return;\n\n // Only deselect if target is not item in this sortable\n if (evt && closest(evt.target, this.options.draggable, this.sortable.el, false)) return;\n\n // Only deselect if left click\n if (evt && evt.button !== 0) return;\n while (multiDragElements.length) {\n var el = multiDragElements[0];\n toggleClass(el, this.options.selectedClass, false);\n multiDragElements.shift();\n dispatchEvent({\n sortable: this.sortable,\n rootEl: this.sortable.el,\n name: 'deselect',\n targetEl: el,\n originalEvent: evt\n });\n }\n },\n _checkKeyDown: function _checkKeyDown(evt) {\n if (evt.key === this.options.multiDragKey) {\n this.multiDragKeyDown = true;\n }\n },\n _checkKeyUp: function _checkKeyUp(evt) {\n if (evt.key === this.options.multiDragKey) {\n this.multiDragKeyDown = false;\n }\n }\n };\n return _extends(MultiDrag, {\n // Static methods & properties\n pluginName: 'multiDrag',\n utils: {\n /**\r\n * Selects the provided multi-drag item\r\n * @param {HTMLElement} el The element to be selected\r\n */\n select: function select(el) {\n var sortable = el.parentNode[expando];\n if (!sortable || !sortable.options.multiDrag || ~multiDragElements.indexOf(el)) return;\n if (multiDragSortable && multiDragSortable !== sortable) {\n multiDragSortable.multiDrag._deselectMultiDrag();\n multiDragSortable = sortable;\n }\n toggleClass(el, sortable.options.selectedClass, true);\n multiDragElements.push(el);\n },\n /**\r\n * Deselects the provided multi-drag item\r\n * @param {HTMLElement} el The element to be deselected\r\n */\n deselect: function deselect(el) {\n var sortable = el.parentNode[expando],\n index = multiDragElements.indexOf(el);\n if (!sortable || !sortable.options.multiDrag || !~index) return;\n toggleClass(el, sortable.options.selectedClass, false);\n multiDragElements.splice(index, 1);\n }\n },\n eventProperties: function eventProperties() {\n var _this3 = this;\n var oldIndicies = [],\n newIndicies = [];\n multiDragElements.forEach(function (multiDragElement) {\n oldIndicies.push({\n multiDragElement: multiDragElement,\n index: multiDragElement.sortableIndex\n });\n\n // multiDragElements will already be sorted if folding\n var newIndex;\n if (folding && multiDragElement !== dragEl$1) {\n newIndex = -1;\n } else if (folding) {\n newIndex = index(multiDragElement, ':not(.' + _this3.options.selectedClass + ')');\n } else {\n newIndex = index(multiDragElement);\n }\n newIndicies.push({\n multiDragElement: multiDragElement,\n index: newIndex\n });\n });\n return {\n items: _toConsumableArray(multiDragElements),\n clones: [].concat(multiDragClones),\n oldIndicies: oldIndicies,\n newIndicies: newIndicies\n };\n },\n optionListeners: {\n multiDragKey: function multiDragKey(key) {\n key = key.toLowerCase();\n if (key === 'ctrl') {\n key = 'Control';\n } else if (key.length > 1) {\n key = key.charAt(0).toUpperCase() + key.substr(1);\n }\n return key;\n }\n }\n });\n}\nfunction insertMultiDragElements(clonesInserted, rootEl) {\n multiDragElements.forEach(function (multiDragElement, i) {\n var target = rootEl.children[multiDragElement.sortableIndex + (clonesInserted ? Number(i) : 0)];\n if (target) {\n rootEl.insertBefore(multiDragElement, target);\n } else {\n rootEl.appendChild(multiDragElement);\n }\n });\n}\n\n/**\r\n * Insert multi-drag clones\r\n * @param {[Boolean]} elementsInserted Whether the multi-drag elements are inserted\r\n * @param {HTMLElement} rootEl\r\n */\nfunction insertMultiDragClones(elementsInserted, rootEl) {\n multiDragClones.forEach(function (clone, i) {\n var target = rootEl.children[clone.sortableIndex + (elementsInserted ? Number(i) : 0)];\n if (target) {\n rootEl.insertBefore(clone, target);\n } else {\n rootEl.appendChild(clone);\n }\n });\n}\nfunction removeMultiDragElements() {\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement === dragEl$1) return;\n multiDragElement.parentNode && multiDragElement.parentNode.removeChild(multiDragElement);\n });\n}\n\nSortable.mount(new AutoScrollPlugin());\nSortable.mount(Remove, Revert);\n\nexport default Sortable;\nexport { MultiDragPlugin as MultiDrag, Sortable, SwapPlugin as Swap };\n","/* jshint browser: true */\n\n(function () {\n\n// We'll copy the properties below into the mirror div.\n// Note that some browsers, such as Firefox, do not concatenate properties\n// into their shorthand (e.g. padding-top, padding-bottom etc. -> padding),\n// so we have to list every single property explicitly.\nvar properties = [\n 'direction', // RTL support\n 'boxSizing',\n 'width', // on Chrome and IE, exclude the scrollbar, so the mirror div wraps exactly as the textarea does\n 'height',\n 'overflowX',\n 'overflowY', // copy the scrollbar for IE\n\n 'borderTopWidth',\n 'borderRightWidth',\n 'borderBottomWidth',\n 'borderLeftWidth',\n 'borderStyle',\n\n 'paddingTop',\n 'paddingRight',\n 'paddingBottom',\n 'paddingLeft',\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/font\n 'fontStyle',\n 'fontVariant',\n 'fontWeight',\n 'fontStretch',\n 'fontSize',\n 'fontSizeAdjust',\n 'lineHeight',\n 'fontFamily',\n\n 'textAlign',\n 'textTransform',\n 'textIndent',\n 'textDecoration', // might not make a difference, but better be safe\n\n 'letterSpacing',\n 'wordSpacing',\n\n 'tabSize',\n 'MozTabSize'\n\n];\n\nvar isBrowser = (typeof window !== 'undefined');\nvar isFirefox = (isBrowser && window.mozInnerScreenX != null);\n\nfunction getCaretCoordinates(element, position, options) {\n if (!isBrowser) {\n throw new Error('textarea-caret-position#getCaretCoordinates should only be called in a browser');\n }\n\n var debug = options && options.debug || false;\n if (debug) {\n var el = document.querySelector('#input-textarea-caret-position-mirror-div');\n if (el) el.parentNode.removeChild(el);\n }\n\n // The mirror div will replicate the textarea's style\n var div = document.createElement('div');\n div.id = 'input-textarea-caret-position-mirror-div';\n document.body.appendChild(div);\n\n var style = div.style;\n var computed = window.getComputedStyle ? window.getComputedStyle(element) : element.currentStyle; // currentStyle for IE < 9\n var isInput = element.nodeName === 'INPUT';\n\n // Default textarea styles\n style.whiteSpace = 'pre-wrap';\n if (!isInput)\n style.wordWrap = 'break-word'; // only for textarea-s\n\n // Position off-screen\n style.position = 'absolute'; // required to return coordinates properly\n if (!debug)\n style.visibility = 'hidden'; // not 'display: none' because we want rendering\n\n // Transfer the element's properties to the div\n properties.forEach(function (prop) {\n if (isInput && prop === 'lineHeight') {\n // Special case for <input>s because text is rendered centered and line height may be != height\n style.lineHeight = computed.height;\n } else {\n style[prop] = computed[prop];\n }\n });\n\n if (isFirefox) {\n // Firefox lies about the overflow property for textareas: https://bugzilla.mozilla.org/show_bug.cgi?id=984275\n if (element.scrollHeight > parseInt(computed.height))\n style.overflowY = 'scroll';\n } else {\n style.overflow = 'hidden'; // for Chrome to not render a scrollbar; IE keeps overflowY = 'scroll'\n }\n\n div.textContent = element.value.substring(0, position);\n // The second special handling for input type=\"text\" vs textarea:\n // spaces need to be replaced with non-breaking spaces - http://stackoverflow.com/a/13402035/1269037\n if (isInput)\n div.textContent = div.textContent.replace(/\\s/g, '\\u00a0');\n\n var span = document.createElement('span');\n // Wrapping must be replicated *exactly*, including when a long word gets\n // onto the next line, with whitespace at the end of the line before (#7).\n // The *only* reliable way to do that is to copy the *entire* rest of the\n // textarea's content into the <span> created at the caret position.\n // For inputs, just '.' would be enough, but no need to bother.\n span.textContent = element.value.substring(position) || '.'; // || because a completely empty faux span doesn't render at all\n div.appendChild(span);\n\n var coordinates = {\n top: span.offsetTop + parseInt(computed['borderTopWidth']),\n left: span.offsetLeft + parseInt(computed['borderLeftWidth']),\n height: parseInt(computed['lineHeight'])\n };\n\n if (debug) {\n span.style.backgroundColor = '#aaa';\n } else {\n document.body.removeChild(div);\n }\n\n return coordinates;\n}\n\nif (typeof module != 'undefined' && typeof module.exports != 'undefined') {\n module.exports = getCaretCoordinates;\n} else if(isBrowser) {\n window.getCaretCoordinates = getCaretCoordinates;\n}\n\n}());\n","module.exports=/[\\0-\\x1F\\x7F-\\x9F]/","module.exports=/[!-#%-\\*,-\\/:;\\?@\\[-\\]_\\{\\}\\xA1\\xA7\\xAB\\xB6\\xB7\\xBB\\xBF\\u037E\\u0387\\u055A-\\u055F\\u0589\\u058A\\u05BE\\u05C0\\u05C3\\u05C6\\u05F3\\u05F4\\u0609\\u060A\\u060C\\u060D\\u061B\\u061E\\u061F\\u066A-\\u066D\\u06D4\\u0700-\\u070D\\u07F7-\\u07F9\\u0830-\\u083E\\u085E\\u0964\\u0965\\u0970\\u09FD\\u0A76\\u0AF0\\u0C84\\u0DF4\\u0E4F\\u0E5A\\u0E5B\\u0F04-\\u0F12\\u0F14\\u0F3A-\\u0F3D\\u0F85\\u0FD0-\\u0FD4\\u0FD9\\u0FDA\\u104A-\\u104F\\u10FB\\u1360-\\u1368\\u1400\\u166D\\u166E\\u169B\\u169C\\u16EB-\\u16ED\\u1735\\u1736\\u17D4-\\u17D6\\u17D8-\\u17DA\\u1800-\\u180A\\u1944\\u1945\\u1A1E\\u1A1F\\u1AA0-\\u1AA6\\u1AA8-\\u1AAD\\u1B5A-\\u1B60\\u1BFC-\\u1BFF\\u1C3B-\\u1C3F\\u1C7E\\u1C7F\\u1CC0-\\u1CC7\\u1CD3\\u2010-\\u2027\\u2030-\\u2043\\u2045-\\u2051\\u2053-\\u205E\\u207D\\u207E\\u208D\\u208E\\u2308-\\u230B\\u2329\\u232A\\u2768-\\u2775\\u27C5\\u27C6\\u27E6-\\u27EF\\u2983-\\u2998\\u29D8-\\u29DB\\u29FC\\u29FD\\u2CF9-\\u2CFC\\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\\uD81A[\\uDE6E\\uDE6F\\uDEF5\\uDF37-\\uDF3B\\uDF44]|\\uD81B[\\uDE97-\\uDE9A]|\\uD82F\\uDC9F|\\uD836[\\uDE87-\\uDE8B]|\\uD83A[\\uDD5E\\uDD5F]/","module.exports=/[ \\xA0\\u1680\\u2000-\\u200A\\u2028\\u2029\\u202F\\u205F\\u3000]/","module.exports=/[\\0-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// runtime helper for setting properties on components\n// in a tree-shakable way\nexports.default = (sfc, props) => {\n const target = sfc.__vccOpts || sfc;\n for (const [key, val] of props) {\n target[key] = val;\n }\n return target;\n};\n","/*!\n * vue-router v4.0.15\n * (c) 2022 Eduardo San Martin Morote\n * @license MIT\n */\nimport { getCurrentInstance, inject, onUnmounted, onDeactivated, onActivated, computed, unref, watchEffect, defineComponent, reactive, h, provide, ref, watch, shallowRef, nextTick } from 'vue';\nimport { setupDevtoolsPlugin } from '@vue/devtools-api';\n\nconst hasSymbol = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';\r\nconst PolySymbol = (name) => \r\n// vr = vue router\r\nhasSymbol\r\n ? Symbol((process.env.NODE_ENV !== 'production') ? '[vue-router]: ' + name : name)\r\n : ((process.env.NODE_ENV !== 'production') ? '[vue-router]: ' : '_vr_') + name;\r\n// rvlm = Router View Location Matched\r\n/**\r\n * RouteRecord being rendered by the closest ancestor Router View. Used for\r\n * `onBeforeRouteUpdate` and `onBeforeRouteLeave`. rvlm stands for Router View\r\n * Location Matched\r\n *\r\n * @internal\r\n */\r\nconst matchedRouteKey = /*#__PURE__*/ PolySymbol((process.env.NODE_ENV !== 'production') ? 'router view location matched' : 'rvlm');\r\n/**\r\n * Allows overriding the router view depth to control which component in\r\n * `matched` is rendered. rvd stands for Router View Depth\r\n *\r\n * @internal\r\n */\r\nconst viewDepthKey = /*#__PURE__*/ PolySymbol((process.env.NODE_ENV !== 'production') ? 'router view depth' : 'rvd');\r\n/**\r\n * Allows overriding the router instance returned by `useRouter` in tests. r\r\n * stands for router\r\n *\r\n * @internal\r\n */\r\nconst routerKey = /*#__PURE__*/ PolySymbol((process.env.NODE_ENV !== 'production') ? 'router' : 'r');\r\n/**\r\n * Allows overriding the current route returned by `useRoute` in tests. rl\r\n * stands for route location\r\n *\r\n * @internal\r\n */\r\nconst routeLocationKey = /*#__PURE__*/ PolySymbol((process.env.NODE_ENV !== 'production') ? 'route location' : 'rl');\r\n/**\r\n * Allows overriding the current route used by router-view. Internally this is\r\n * used when the `route` prop is passed.\r\n *\r\n * @internal\r\n */\r\nconst routerViewLocationKey = /*#__PURE__*/ PolySymbol((process.env.NODE_ENV !== 'production') ? 'router view location' : 'rvl');\n\nconst isBrowser = typeof window !== 'undefined';\n\nfunction isESModule(obj) {\r\n return obj.__esModule || (hasSymbol && obj[Symbol.toStringTag] === 'Module');\r\n}\r\nconst assign = Object.assign;\r\nfunction applyToParams(fn, params) {\r\n const newParams = {};\r\n for (const key in params) {\r\n const value = params[key];\r\n newParams[key] = Array.isArray(value) ? value.map(fn) : fn(value);\r\n }\r\n return newParams;\r\n}\r\nconst noop = () => { };\n\nfunction warn(msg) {\r\n // avoid using ...args as it breaks in older Edge builds\r\n const args = Array.from(arguments).slice(1);\r\n console.warn.apply(console, ['[Vue Router warn]: ' + msg].concat(args));\r\n}\n\nconst TRAILING_SLASH_RE = /\\/$/;\r\nconst removeTrailingSlash = (path) => path.replace(TRAILING_SLASH_RE, '');\r\n/**\r\n * Transforms an URI into a normalized history location\r\n *\r\n * @param parseQuery\r\n * @param location - URI to normalize\r\n * @param currentLocation - current absolute location. Allows resolving relative\r\n * paths. Must start with `/`. Defaults to `/`\r\n * @returns a normalized history location\r\n */\r\nfunction parseURL(parseQuery, location, currentLocation = '/') {\r\n let path, query = {}, searchString = '', hash = '';\r\n // Could use URL and URLSearchParams but IE 11 doesn't support it\r\n const searchPos = location.indexOf('?');\r\n const hashPos = location.indexOf('#', searchPos > -1 ? searchPos : 0);\r\n if (searchPos > -1) {\r\n path = location.slice(0, searchPos);\r\n searchString = location.slice(searchPos + 1, hashPos > -1 ? hashPos : location.length);\r\n query = parseQuery(searchString);\r\n }\r\n if (hashPos > -1) {\r\n path = path || location.slice(0, hashPos);\r\n // keep the # character\r\n hash = location.slice(hashPos, location.length);\r\n }\r\n // no search and no query\r\n path = resolveRelativePath(path != null ? path : location, currentLocation);\r\n // empty path means a relative query or hash `?foo=f`, `#thing`\r\n return {\r\n fullPath: path + (searchString && '?') + searchString + hash,\r\n path,\r\n query,\r\n hash,\r\n };\r\n}\r\n/**\r\n * Stringifies a URL object\r\n *\r\n * @param stringifyQuery\r\n * @param location\r\n */\r\nfunction stringifyURL(stringifyQuery, location) {\r\n const query = location.query ? stringifyQuery(location.query) : '';\r\n return location.path + (query && '?') + query + (location.hash || '');\r\n}\r\n/**\r\n * Strips off the base from the beginning of a location.pathname in a non\r\n * case-sensitive way.\r\n *\r\n * @param pathname - location.pathname\r\n * @param base - base to strip off\r\n */\r\nfunction stripBase(pathname, base) {\r\n // no base or base is not found at the beginning\r\n if (!base || !pathname.toLowerCase().startsWith(base.toLowerCase()))\r\n return pathname;\r\n return pathname.slice(base.length) || '/';\r\n}\r\n/**\r\n * Checks if two RouteLocation are equal. This means that both locations are\r\n * pointing towards the same {@link RouteRecord} and that all `params`, `query`\r\n * parameters and `hash` are the same\r\n *\r\n * @param a - first {@link RouteLocation}\r\n * @param b - second {@link RouteLocation}\r\n */\r\nfunction isSameRouteLocation(stringifyQuery, a, b) {\r\n const aLastIndex = a.matched.length - 1;\r\n const bLastIndex = b.matched.length - 1;\r\n return (aLastIndex > -1 &&\r\n aLastIndex === bLastIndex &&\r\n isSameRouteRecord(a.matched[aLastIndex], b.matched[bLastIndex]) &&\r\n isSameRouteLocationParams(a.params, b.params) &&\r\n stringifyQuery(a.query) === stringifyQuery(b.query) &&\r\n a.hash === b.hash);\r\n}\r\n/**\r\n * Check if two `RouteRecords` are equal. Takes into account aliases: they are\r\n * considered equal to the `RouteRecord` they are aliasing.\r\n *\r\n * @param a - first {@link RouteRecord}\r\n * @param b - second {@link RouteRecord}\r\n */\r\nfunction isSameRouteRecord(a, b) {\r\n // since the original record has an undefined value for aliasOf\r\n // but all aliases point to the original record, this will always compare\r\n // the original record\r\n return (a.aliasOf || a) === (b.aliasOf || b);\r\n}\r\nfunction isSameRouteLocationParams(a, b) {\r\n if (Object.keys(a).length !== Object.keys(b).length)\r\n return false;\r\n for (const key in a) {\r\n if (!isSameRouteLocationParamsValue(a[key], b[key]))\r\n return false;\r\n }\r\n return true;\r\n}\r\nfunction isSameRouteLocationParamsValue(a, b) {\r\n return Array.isArray(a)\r\n ? isEquivalentArray(a, b)\r\n : Array.isArray(b)\r\n ? isEquivalentArray(b, a)\r\n : a === b;\r\n}\r\n/**\r\n * Check if two arrays are the same or if an array with one single entry is the\r\n * same as another primitive value. Used to check query and parameters\r\n *\r\n * @param a - array of values\r\n * @param b - array of values or a single value\r\n */\r\nfunction isEquivalentArray(a, b) {\r\n return Array.isArray(b)\r\n ? a.length === b.length && a.every((value, i) => value === b[i])\r\n : a.length === 1 && a[0] === b;\r\n}\r\n/**\r\n * Resolves a relative path that starts with `.`.\r\n *\r\n * @param to - path location we are resolving\r\n * @param from - currentLocation.path, should start with `/`\r\n */\r\nfunction resolveRelativePath(to, from) {\r\n if (to.startsWith('/'))\r\n return to;\r\n if ((process.env.NODE_ENV !== 'production') && !from.startsWith('/')) {\r\n warn(`Cannot resolve a relative location without an absolute path. Trying to resolve \"${to}\" from \"${from}\". It should look like \"/${from}\".`);\r\n return to;\r\n }\r\n if (!to)\r\n return from;\r\n const fromSegments = from.split('/');\r\n const toSegments = to.split('/');\r\n let position = fromSegments.length - 1;\r\n let toPosition;\r\n let segment;\r\n for (toPosition = 0; toPosition < toSegments.length; toPosition++) {\r\n segment = toSegments[toPosition];\r\n // can't go below zero\r\n if (position === 1 || segment === '.')\r\n continue;\r\n if (segment === '..')\r\n position--;\r\n // found something that is not relative path\r\n else\r\n break;\r\n }\r\n return (fromSegments.slice(0, position).join('/') +\r\n '/' +\r\n toSegments\r\n .slice(toPosition - (toPosition === toSegments.length ? 1 : 0))\r\n .join('/'));\r\n}\n\nvar NavigationType;\r\n(function (NavigationType) {\r\n NavigationType[\"pop\"] = \"pop\";\r\n NavigationType[\"push\"] = \"push\";\r\n})(NavigationType || (NavigationType = {}));\r\nvar NavigationDirection;\r\n(function (NavigationDirection) {\r\n NavigationDirection[\"back\"] = \"back\";\r\n NavigationDirection[\"forward\"] = \"forward\";\r\n NavigationDirection[\"unknown\"] = \"\";\r\n})(NavigationDirection || (NavigationDirection = {}));\r\n/**\r\n * Starting location for Histories\r\n */\r\nconst START = '';\r\n// Generic utils\r\n/**\r\n * Normalizes a base by removing any trailing slash and reading the base tag if\r\n * present.\r\n *\r\n * @param base - base to normalize\r\n */\r\nfunction normalizeBase(base) {\r\n if (!base) {\r\n if (isBrowser) {\r\n // respect <base> tag\r\n const baseEl = document.querySelector('base');\r\n base = (baseEl && baseEl.getAttribute('href')) || '/';\r\n // strip full URL origin\r\n base = base.replace(/^\\w+:\\/\\/[^\\/]+/, '');\r\n }\r\n else {\r\n base = '/';\r\n }\r\n }\r\n // ensure leading slash when it was removed by the regex above avoid leading\r\n // slash with hash because the file could be read from the disk like file://\r\n // and the leading slash would cause problems\r\n if (base[0] !== '/' && base[0] !== '#')\r\n base = '/' + base;\r\n // remove the trailing slash so all other method can just do `base + fullPath`\r\n // to build an href\r\n return removeTrailingSlash(base);\r\n}\r\n// remove any character before the hash\r\nconst BEFORE_HASH_RE = /^[^#]+#/;\r\nfunction createHref(base, location) {\r\n return base.replace(BEFORE_HASH_RE, '#') + location;\r\n}\n\nfunction getElementPosition(el, offset) {\r\n const docRect = document.documentElement.getBoundingClientRect();\r\n const elRect = el.getBoundingClientRect();\r\n return {\r\n behavior: offset.behavior,\r\n left: elRect.left - docRect.left - (offset.left || 0),\r\n top: elRect.top - docRect.top - (offset.top || 0),\r\n };\r\n}\r\nconst computeScrollPosition = () => ({\r\n left: window.pageXOffset,\r\n top: window.pageYOffset,\r\n});\r\nfunction scrollToPosition(position) {\r\n let scrollToOptions;\r\n if ('el' in position) {\r\n const positionEl = position.el;\r\n const isIdSelector = typeof positionEl === 'string' && positionEl.startsWith('#');\r\n /**\r\n * `id`s can accept pretty much any characters, including CSS combinators\r\n * like `>` or `~`. It's still possible to retrieve elements using\r\n * `document.getElementById('~')` but it needs to be escaped when using\r\n * `document.querySelector('#\\\\~')` for it to be valid. The only\r\n * requirements for `id`s are them to be unique on the page and to not be\r\n * empty (`id=\"\"`). Because of that, when passing an id selector, it should\r\n * be properly escaped for it to work with `querySelector`. We could check\r\n * for the id selector to be simple (no CSS combinators `+ >~`) but that\r\n * would make things inconsistent since they are valid characters for an\r\n * `id` but would need to be escaped when using `querySelector`, breaking\r\n * their usage and ending up in no selector returned. Selectors need to be\r\n * escaped:\r\n *\r\n * - `#1-thing` becomes `#\\31 -thing`\r\n * - `#with~symbols` becomes `#with\\\\~symbols`\r\n *\r\n * - More information about the topic can be found at\r\n * https://mathiasbynens.be/notes/html5-id-class.\r\n * - Practical example: https://mathiasbynens.be/demo/html5-id\r\n */\r\n if ((process.env.NODE_ENV !== 'production') && typeof position.el === 'string') {\r\n if (!isIdSelector || !document.getElementById(position.el.slice(1))) {\r\n try {\r\n const foundEl = document.querySelector(position.el);\r\n if (isIdSelector && foundEl) {\r\n warn(`The selector \"${position.el}\" should be passed as \"el: document.querySelector('${position.el}')\" because it starts with \"#\".`);\r\n // return to avoid other warnings\r\n return;\r\n }\r\n }\r\n catch (err) {\r\n warn(`The selector \"${position.el}\" is invalid. If you are using an id selector, make sure to escape it. You can find more information about escaping characters in selectors at https://mathiasbynens.be/notes/css-escapes or use CSS.escape (https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape).`);\r\n // return to avoid other warnings\r\n return;\r\n }\r\n }\r\n }\r\n const el = typeof positionEl === 'string'\r\n ? isIdSelector\r\n ? document.getElementById(positionEl.slice(1))\r\n : document.querySelector(positionEl)\r\n : positionEl;\r\n if (!el) {\r\n (process.env.NODE_ENV !== 'production') &&\r\n warn(`Couldn't find element using selector \"${position.el}\" returned by scrollBehavior.`);\r\n return;\r\n }\r\n scrollToOptions = getElementPosition(el, position);\r\n }\r\n else {\r\n scrollToOptions = position;\r\n }\r\n if ('scrollBehavior' in document.documentElement.style)\r\n window.scrollTo(scrollToOptions);\r\n else {\r\n window.scrollTo(scrollToOptions.left != null ? scrollToOptions.left : window.pageXOffset, scrollToOptions.top != null ? scrollToOptions.top : window.pageYOffset);\r\n }\r\n}\r\nfunction getScrollKey(path, delta) {\r\n const position = history.state ? history.state.position - delta : -1;\r\n return position + path;\r\n}\r\nconst scrollPositions = new Map();\r\nfunction saveScrollPosition(key, scrollPosition) {\r\n scrollPositions.set(key, scrollPosition);\r\n}\r\nfunction getSavedScrollPosition(key) {\r\n const scroll = scrollPositions.get(key);\r\n // consume it so it's not used again\r\n scrollPositions.delete(key);\r\n return scroll;\r\n}\r\n// TODO: RFC about how to save scroll position\r\n/**\r\n * ScrollBehavior instance used by the router to compute and restore the scroll\r\n * position when navigating.\r\n */\r\n// export interface ScrollHandler<ScrollPositionEntry extends HistoryStateValue, ScrollPosition extends ScrollPositionEntry> {\r\n// // returns a scroll position that can be saved in history\r\n// compute(): ScrollPositionEntry\r\n// // can take an extended ScrollPositionEntry\r\n// scroll(position: ScrollPosition): void\r\n// }\r\n// export const scrollHandler: ScrollHandler<ScrollPosition> = {\r\n// compute: computeScroll,\r\n// scroll: scrollToPosition,\r\n// }\n\nlet createBaseLocation = () => location.protocol + '//' + location.host;\r\n/**\r\n * Creates a normalized history location from a window.location object\r\n * @param location -\r\n */\r\nfunction createCurrentLocation(base, location) {\r\n const { pathname, search, hash } = location;\r\n // allows hash bases like #, /#, #/, #!, #!/, /#!/, or even /folder#end\r\n const hashPos = base.indexOf('#');\r\n if (hashPos > -1) {\r\n let slicePos = hash.includes(base.slice(hashPos))\r\n ? base.slice(hashPos).length\r\n : 1;\r\n let pathFromHash = hash.slice(slicePos);\r\n // prepend the starting slash to hash so the url starts with /#\r\n if (pathFromHash[0] !== '/')\r\n pathFromHash = '/' + pathFromHash;\r\n return stripBase(pathFromHash, '');\r\n }\r\n const path = stripBase(pathname, base);\r\n return path + search + hash;\r\n}\r\nfunction useHistoryListeners(base, historyState, currentLocation, replace) {\r\n let listeners = [];\r\n let teardowns = [];\r\n // TODO: should it be a stack? a Dict. Check if the popstate listener\r\n // can trigger twice\r\n let pauseState = null;\r\n const popStateHandler = ({ state, }) => {\r\n const to = createCurrentLocation(base, location);\r\n const from = currentLocation.value;\r\n const fromState = historyState.value;\r\n let delta = 0;\r\n if (state) {\r\n currentLocation.value = to;\r\n historyState.value = state;\r\n // ignore the popstate and reset the pauseState\r\n if (pauseState && pauseState === from) {\r\n pauseState = null;\r\n return;\r\n }\r\n delta = fromState ? state.position - fromState.position : 0;\r\n }\r\n else {\r\n replace(to);\r\n }\r\n // console.log({ deltaFromCurrent })\r\n // Here we could also revert the navigation by calling history.go(-delta)\r\n // this listener will have to be adapted to not trigger again and to wait for the url\r\n // to be updated before triggering the listeners. Some kind of validation function would also\r\n // need to be passed to the listeners so the navigation can be accepted\r\n // call all listeners\r\n listeners.forEach(listener => {\r\n listener(currentLocation.value, from, {\r\n delta,\r\n type: NavigationType.pop,\r\n direction: delta\r\n ? delta > 0\r\n ? NavigationDirection.forward\r\n : NavigationDirection.back\r\n : NavigationDirection.unknown,\r\n });\r\n });\r\n };\r\n function pauseListeners() {\r\n pauseState = currentLocation.value;\r\n }\r\n function listen(callback) {\r\n // setup the listener and prepare teardown callbacks\r\n listeners.push(callback);\r\n const teardown = () => {\r\n const index = listeners.indexOf(callback);\r\n if (index > -1)\r\n listeners.splice(index, 1);\r\n };\r\n teardowns.push(teardown);\r\n return teardown;\r\n }\r\n function beforeUnloadListener() {\r\n const { history } = window;\r\n if (!history.state)\r\n return;\r\n history.replaceState(assign({}, history.state, { scroll: computeScrollPosition() }), '');\r\n }\r\n function destroy() {\r\n for (const teardown of teardowns)\r\n teardown();\r\n teardowns = [];\r\n window.removeEventListener('popstate', popStateHandler);\r\n window.removeEventListener('beforeunload', beforeUnloadListener);\r\n }\r\n // setup the listeners and prepare teardown callbacks\r\n window.addEventListener('popstate', popStateHandler);\r\n window.addEventListener('beforeunload', beforeUnloadListener);\r\n return {\r\n pauseListeners,\r\n listen,\r\n destroy,\r\n };\r\n}\r\n/**\r\n * Creates a state object\r\n */\r\nfunction buildState(back, current, forward, replaced = false, computeScroll = false) {\r\n return {\r\n back,\r\n current,\r\n forward,\r\n replaced,\r\n position: window.history.length,\r\n scroll: computeScroll ? computeScrollPosition() : null,\r\n };\r\n}\r\nfunction useHistoryStateNavigation(base) {\r\n const { history, location } = window;\r\n // private variables\r\n const currentLocation = {\r\n value: createCurrentLocation(base, location),\r\n };\r\n const historyState = { value: history.state };\r\n // build current history entry as this is a fresh navigation\r\n if (!historyState.value) {\r\n changeLocation(currentLocation.value, {\r\n back: null,\r\n current: currentLocation.value,\r\n forward: null,\r\n // the length is off by one, we need to decrease it\r\n position: history.length - 1,\r\n replaced: true,\r\n // don't add a scroll as the user may have an anchor and we want\r\n // scrollBehavior to be triggered without a saved position\r\n scroll: null,\r\n }, true);\r\n }\r\n function changeLocation(to, state, replace) {\r\n /**\r\n * if a base tag is provided and we are on a normal domain, we have to\r\n * respect the provided `base` attribute because pushState() will use it and\r\n * potentially erase anything before the `#` like at\r\n * https://github.com/vuejs/router/issues/685 where a base of\r\n * `/folder/#` but a base of `/` would erase the `/folder/` section. If\r\n * there is no host, the `<base>` tag makes no sense and if there isn't a\r\n * base tag we can just use everything after the `#`.\r\n */\r\n const hashIndex = base.indexOf('#');\r\n const url = hashIndex > -1\r\n ? (location.host && document.querySelector('base')\r\n ? base\r\n : base.slice(hashIndex)) + to\r\n : createBaseLocation() + base + to;\r\n try {\r\n // BROWSER QUIRK\r\n // NOTE: Safari throws a SecurityError when calling this function 100 times in 30 seconds\r\n history[replace ? 'replaceState' : 'pushState'](state, '', url);\r\n historyState.value = state;\r\n }\r\n catch (err) {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n warn('Error with push/replace State', err);\r\n }\r\n else {\r\n console.error(err);\r\n }\r\n // Force the navigation, this also resets the call count\r\n location[replace ? 'replace' : 'assign'](url);\r\n }\r\n }\r\n function replace(to, data) {\r\n const state = assign({}, history.state, buildState(historyState.value.back, \r\n // keep back and forward entries but override current position\r\n to, historyState.value.forward, true), data, { position: historyState.value.position });\r\n changeLocation(to, state, true);\r\n currentLocation.value = to;\r\n }\r\n function push(to, data) {\r\n // Add to current entry the information of where we are going\r\n // as well as saving the current position\r\n const currentState = assign({}, \r\n // use current history state to gracefully handle a wrong call to\r\n // history.replaceState\r\n // https://github.com/vuejs/router/issues/366\r\n historyState.value, history.state, {\r\n forward: to,\r\n scroll: computeScrollPosition(),\r\n });\r\n if ((process.env.NODE_ENV !== 'production') && !history.state) {\r\n warn(`history.state seems to have been manually replaced without preserving the necessary values. Make sure to preserve existing history state if you are manually calling history.replaceState:\\n\\n` +\r\n `history.replaceState(history.state, '', url)\\n\\n` +\r\n `You can find more information at https://next.router.vuejs.org/guide/migration/#usage-of-history-state.`);\r\n }\r\n changeLocation(currentState.current, currentState, true);\r\n const state = assign({}, buildState(currentLocation.value, to, null), { position: currentState.position + 1 }, data);\r\n changeLocation(to, state, false);\r\n currentLocation.value = to;\r\n }\r\n return {\r\n location: currentLocation,\r\n state: historyState,\r\n push,\r\n replace,\r\n };\r\n}\r\n/**\r\n * Creates an HTML5 history. Most common history for single page applications.\r\n *\r\n * @param base -\r\n */\r\nfunction createWebHistory(base) {\r\n base = normalizeBase(base);\r\n const historyNavigation = useHistoryStateNavigation(base);\r\n const historyListeners = useHistoryListeners(base, historyNavigation.state, historyNavigation.location, historyNavigation.replace);\r\n function go(delta, triggerListeners = true) {\r\n if (!triggerListeners)\r\n historyListeners.pauseListeners();\r\n history.go(delta);\r\n }\r\n const routerHistory = assign({\r\n // it's overridden right after\r\n location: '',\r\n base,\r\n go,\r\n createHref: createHref.bind(null, base),\r\n }, historyNavigation, historyListeners);\r\n Object.defineProperty(routerHistory, 'location', {\r\n enumerable: true,\r\n get: () => historyNavigation.location.value,\r\n });\r\n Object.defineProperty(routerHistory, 'state', {\r\n enumerable: true,\r\n get: () => historyNavigation.state.value,\r\n });\r\n return routerHistory;\r\n}\n\n/**\r\n * Creates a in-memory based history. The main purpose of this history is to handle SSR. It starts in a special location that is nowhere.\r\n * It's up to the user to replace that location with the starter location by either calling `router.push` or `router.replace`.\r\n *\r\n * @param base - Base applied to all urls, defaults to '/'\r\n * @returns a history object that can be passed to the router constructor\r\n */\r\nfunction createMemoryHistory(base = '') {\r\n let listeners = [];\r\n let queue = [START];\r\n let position = 0;\r\n base = normalizeBase(base);\r\n function setLocation(location) {\r\n position++;\r\n if (position === queue.length) {\r\n // we are at the end, we can simply append a new entry\r\n queue.push(location);\r\n }\r\n else {\r\n // we are in the middle, we remove everything from here in the queue\r\n queue.splice(position);\r\n queue.push(location);\r\n }\r\n }\r\n function triggerListeners(to, from, { direction, delta }) {\r\n const info = {\r\n direction,\r\n delta,\r\n type: NavigationType.pop,\r\n };\r\n for (const callback of listeners) {\r\n callback(to, from, info);\r\n }\r\n }\r\n const routerHistory = {\r\n // rewritten by Object.defineProperty\r\n location: START,\r\n // TODO: should be kept in queue\r\n state: {},\r\n base,\r\n createHref: createHref.bind(null, base),\r\n replace(to) {\r\n // remove current entry and decrement position\r\n queue.splice(position--, 1);\r\n setLocation(to);\r\n },\r\n push(to, data) {\r\n setLocation(to);\r\n },\r\n listen(callback) {\r\n listeners.push(callback);\r\n return () => {\r\n const index = listeners.indexOf(callback);\r\n if (index > -1)\r\n listeners.splice(index, 1);\r\n };\r\n },\r\n destroy() {\r\n listeners = [];\r\n queue = [START];\r\n position = 0;\r\n },\r\n go(delta, shouldTrigger = true) {\r\n const from = this.location;\r\n const direction = \r\n // we are considering delta === 0 going forward, but in abstract mode\r\n // using 0 for the delta doesn't make sense like it does in html5 where\r\n // it reloads the page\r\n delta < 0 ? NavigationDirection.back : NavigationDirection.forward;\r\n position = Math.max(0, Math.min(position + delta, queue.length - 1));\r\n if (shouldTrigger) {\r\n triggerListeners(this.location, from, {\r\n direction,\r\n delta,\r\n });\r\n }\r\n },\r\n };\r\n Object.defineProperty(routerHistory, 'location', {\r\n enumerable: true,\r\n get: () => queue[position],\r\n });\r\n return routerHistory;\r\n}\n\n/**\r\n * Creates a hash history. Useful for web applications with no host (e.g.\r\n * `file://`) or when configuring a server to handle any URL is not possible.\r\n *\r\n * @param base - optional base to provide. Defaults to `location.pathname +\r\n * location.search` If there is a `<base>` tag in the `head`, its value will be\r\n * ignored in favor of this parameter **but note it affects all the\r\n * history.pushState() calls**, meaning that if you use a `<base>` tag, it's\r\n * `href` value **has to match this parameter** (ignoring anything after the\r\n * `#`).\r\n *\r\n * @example\r\n * ```js\r\n * // at https://example.com/folder\r\n * createWebHashHistory() // gives a url of `https://example.com/folder#`\r\n * createWebHashHistory('/folder/') // gives a url of `https://example.com/folder/#`\r\n * // if the `#` is provided in the base, it won't be added by `createWebHashHistory`\r\n * createWebHashHistory('/folder/#/app/') // gives a url of `https://example.com/folder/#/app/`\r\n * // you should avoid doing this because it changes the original url and breaks copying urls\r\n * createWebHashHistory('/other-folder/') // gives a url of `https://example.com/other-folder/#`\r\n *\r\n * // at file:///usr/etc/folder/index.html\r\n * // for locations with no `host`, the base is ignored\r\n * createWebHashHistory('/iAmIgnored') // gives a url of `file:///usr/etc/folder/index.html#`\r\n * ```\r\n */\r\nfunction createWebHashHistory(base) {\r\n // Make sure this implementation is fine in terms of encoding, specially for IE11\r\n // for `file://`, directly use the pathname and ignore the base\r\n // location.pathname contains an initial `/` even at the root: `https://example.com`\r\n base = location.host ? base || location.pathname + location.search : '';\r\n // allow the user to provide a `#` in the middle: `/base/#/app`\r\n if (!base.includes('#'))\r\n base += '#';\r\n if ((process.env.NODE_ENV !== 'production') && !base.endsWith('#/') && !base.endsWith('#')) {\r\n warn(`A hash base must end with a \"#\":\\n\"${base}\" should be \"${base.replace(/#.*$/, '#')}\".`);\r\n }\r\n return createWebHistory(base);\r\n}\n\nfunction isRouteLocation(route) {\r\n return typeof route === 'string' || (route && typeof route === 'object');\r\n}\r\nfunction isRouteName(name) {\r\n return typeof name === 'string' || typeof name === 'symbol';\r\n}\n\n/**\r\n * Initial route location where the router is. Can be used in navigation guards\r\n * to differentiate the initial navigation.\r\n *\r\n * @example\r\n * ```js\r\n * import { START_LOCATION } from 'vue-router'\r\n *\r\n * router.beforeEach((to, from) => {\r\n * if (from === START_LOCATION) {\r\n * // initial navigation\r\n * }\r\n * })\r\n * ```\r\n */\r\nconst START_LOCATION_NORMALIZED = {\r\n path: '/',\r\n name: undefined,\r\n params: {},\r\n query: {},\r\n hash: '',\r\n fullPath: '/',\r\n matched: [],\r\n meta: {},\r\n redirectedFrom: undefined,\r\n};\n\nconst NavigationFailureSymbol = /*#__PURE__*/ PolySymbol((process.env.NODE_ENV !== 'production') ? 'navigation failure' : 'nf');\r\n/**\r\n * Enumeration with all possible types for navigation failures. Can be passed to\r\n * {@link isNavigationFailure} to check for specific failures.\r\n */\r\nvar NavigationFailureType;\r\n(function (NavigationFailureType) {\r\n /**\r\n * An aborted navigation is a navigation that failed because a navigation\r\n * guard returned `false` or called `next(false)`\r\n */\r\n NavigationFailureType[NavigationFailureType[\"aborted\"] = 4] = \"aborted\";\r\n /**\r\n * A cancelled navigation is a navigation that failed because a more recent\r\n * navigation finished started (not necessarily finished).\r\n */\r\n NavigationFailureType[NavigationFailureType[\"cancelled\"] = 8] = \"cancelled\";\r\n /**\r\n * A duplicated navigation is a navigation that failed because it was\r\n * initiated while already being at the exact same location.\r\n */\r\n NavigationFailureType[NavigationFailureType[\"duplicated\"] = 16] = \"duplicated\";\r\n})(NavigationFailureType || (NavigationFailureType = {}));\r\n// DEV only debug messages\r\nconst ErrorTypeMessages = {\r\n [1 /* MATCHER_NOT_FOUND */]({ location, currentLocation }) {\r\n return `No match for\\n ${JSON.stringify(location)}${currentLocation\r\n ? '\\nwhile being at\\n' + JSON.stringify(currentLocation)\r\n : ''}`;\r\n },\r\n [2 /* NAVIGATION_GUARD_REDIRECT */]({ from, to, }) {\r\n return `Redirected from \"${from.fullPath}\" to \"${stringifyRoute(to)}\" via a navigation guard.`;\r\n },\r\n [4 /* NAVIGATION_ABORTED */]({ from, to }) {\r\n return `Navigation aborted from \"${from.fullPath}\" to \"${to.fullPath}\" via a navigation guard.`;\r\n },\r\n [8 /* NAVIGATION_CANCELLED */]({ from, to }) {\r\n return `Navigation cancelled from \"${from.fullPath}\" to \"${to.fullPath}\" with a new navigation.`;\r\n },\r\n [16 /* NAVIGATION_DUPLICATED */]({ from, to }) {\r\n return `Avoided redundant navigation to current location: \"${from.fullPath}\".`;\r\n },\r\n};\r\nfunction createRouterError(type, params) {\r\n // keep full error messages in cjs versions\r\n if ((process.env.NODE_ENV !== 'production') || !true) {\r\n return assign(new Error(ErrorTypeMessages[type](params)), {\r\n type,\r\n [NavigationFailureSymbol]: true,\r\n }, params);\r\n }\r\n else {\r\n return assign(new Error(), {\r\n type,\r\n [NavigationFailureSymbol]: true,\r\n }, params);\r\n }\r\n}\r\nfunction isNavigationFailure(error, type) {\r\n return (error instanceof Error &&\r\n NavigationFailureSymbol in error &&\r\n (type == null || !!(error.type & type)));\r\n}\r\nconst propertiesToLog = ['params', 'query', 'hash'];\r\nfunction stringifyRoute(to) {\r\n if (typeof to === 'string')\r\n return to;\r\n if ('path' in to)\r\n return to.path;\r\n const location = {};\r\n for (const key of propertiesToLog) {\r\n if (key in to)\r\n location[key] = to[key];\r\n }\r\n return JSON.stringify(location, null, 2);\r\n}\n\n// default pattern for a param: non greedy everything but /\r\nconst BASE_PARAM_PATTERN = '[^/]+?';\r\nconst BASE_PATH_PARSER_OPTIONS = {\r\n sensitive: false,\r\n strict: false,\r\n start: true,\r\n end: true,\r\n};\r\n// Special Regex characters that must be escaped in static tokens\r\nconst REGEX_CHARS_RE = /[.+*?^${}()[\\]/\\\\]/g;\r\n/**\r\n * Creates a path parser from an array of Segments (a segment is an array of Tokens)\r\n *\r\n * @param segments - array of segments returned by tokenizePath\r\n * @param extraOptions - optional options for the regexp\r\n * @returns a PathParser\r\n */\r\nfunction tokensToParser(segments, extraOptions) {\r\n const options = assign({}, BASE_PATH_PARSER_OPTIONS, extraOptions);\r\n // the amount of scores is the same as the length of segments except for the root segment \"/\"\r\n const score = [];\r\n // the regexp as a string\r\n let pattern = options.start ? '^' : '';\r\n // extracted keys\r\n const keys = [];\r\n for (const segment of segments) {\r\n // the root segment needs special treatment\r\n const segmentScores = segment.length ? [] : [90 /* Root */];\r\n // allow trailing slash\r\n if (options.strict && !segment.length)\r\n pattern += '/';\r\n for (let tokenIndex = 0; tokenIndex < segment.length; tokenIndex++) {\r\n const token = segment[tokenIndex];\r\n // resets the score if we are inside a sub segment /:a-other-:b\r\n let subSegmentScore = 40 /* Segment */ +\r\n (options.sensitive ? 0.25 /* BonusCaseSensitive */ : 0);\r\n if (token.type === 0 /* Static */) {\r\n // prepend the slash if we are starting a new segment\r\n if (!tokenIndex)\r\n pattern += '/';\r\n pattern += token.value.replace(REGEX_CHARS_RE, '\\\\$&');\r\n subSegmentScore += 40 /* Static */;\r\n }\r\n else if (token.type === 1 /* Param */) {\r\n const { value, repeatable, optional, regexp } = token;\r\n keys.push({\r\n name: value,\r\n repeatable,\r\n optional,\r\n });\r\n const re = regexp ? regexp : BASE_PARAM_PATTERN;\r\n // the user provided a custom regexp /:id(\\\\d+)\r\n if (re !== BASE_PARAM_PATTERN) {\r\n subSegmentScore += 10 /* BonusCustomRegExp */;\r\n // make sure the regexp is valid before using it\r\n try {\r\n new RegExp(`(${re})`);\r\n }\r\n catch (err) {\r\n throw new Error(`Invalid custom RegExp for param \"${value}\" (${re}): ` +\r\n err.message);\r\n }\r\n }\r\n // when we repeat we must take care of the repeating leading slash\r\n let subPattern = repeatable ? `((?:${re})(?:/(?:${re}))*)` : `(${re})`;\r\n // prepend the slash if we are starting a new segment\r\n if (!tokenIndex)\r\n subPattern =\r\n // avoid an optional / if there are more segments e.g. /:p?-static\r\n // or /:p?-:p2\r\n optional && segment.length < 2\r\n ? `(?:/${subPattern})`\r\n : '/' + subPattern;\r\n if (optional)\r\n subPattern += '?';\r\n pattern += subPattern;\r\n subSegmentScore += 20 /* Dynamic */;\r\n if (optional)\r\n subSegmentScore += -8 /* BonusOptional */;\r\n if (repeatable)\r\n subSegmentScore += -20 /* BonusRepeatable */;\r\n if (re === '.*')\r\n subSegmentScore += -50 /* BonusWildcard */;\r\n }\r\n segmentScores.push(subSegmentScore);\r\n }\r\n // an empty array like /home/ -> [[{home}], []]\r\n // if (!segment.length) pattern += '/'\r\n score.push(segmentScores);\r\n }\r\n // only apply the strict bonus to the last score\r\n if (options.strict && options.end) {\r\n const i = score.length - 1;\r\n score[i][score[i].length - 1] += 0.7000000000000001 /* BonusStrict */;\r\n }\r\n // TODO: dev only warn double trailing slash\r\n if (!options.strict)\r\n pattern += '/?';\r\n if (options.end)\r\n pattern += '$';\r\n // allow paths like /dynamic to only match dynamic or dynamic/... but not dynamic_something_else\r\n else if (options.strict)\r\n pattern += '(?:/|$)';\r\n const re = new RegExp(pattern, options.sensitive ? '' : 'i');\r\n function parse(path) {\r\n const match = path.match(re);\r\n const params = {};\r\n if (!match)\r\n return null;\r\n for (let i = 1; i < match.length; i++) {\r\n const value = match[i] || '';\r\n const key = keys[i - 1];\r\n params[key.name] = value && key.repeatable ? value.split('/') : value;\r\n }\r\n return params;\r\n }\r\n function stringify(params) {\r\n let path = '';\r\n // for optional parameters to allow to be empty\r\n let avoidDuplicatedSlash = false;\r\n for (const segment of segments) {\r\n if (!avoidDuplicatedSlash || !path.endsWith('/'))\r\n path += '/';\r\n avoidDuplicatedSlash = false;\r\n for (const token of segment) {\r\n if (token.type === 0 /* Static */) {\r\n path += token.value;\r\n }\r\n else if (token.type === 1 /* Param */) {\r\n const { value, repeatable, optional } = token;\r\n const param = value in params ? params[value] : '';\r\n if (Array.isArray(param) && !repeatable)\r\n throw new Error(`Provided param \"${value}\" is an array but it is not repeatable (* or + modifiers)`);\r\n const text = Array.isArray(param) ? param.join('/') : param;\r\n if (!text) {\r\n if (optional) {\r\n // if we have more than one optional param like /:a?-static and there are more segments, we don't need to\r\n // care about the optional param\r\n if (segment.length < 2 && segments.length > 1) {\r\n // remove the last slash as we could be at the end\r\n if (path.endsWith('/'))\r\n path = path.slice(0, -1);\r\n // do not append a slash on the next iteration\r\n else\r\n avoidDuplicatedSlash = true;\r\n }\r\n }\r\n else\r\n throw new Error(`Missing required param \"${value}\"`);\r\n }\r\n path += text;\r\n }\r\n }\r\n }\r\n return path;\r\n }\r\n return {\r\n re,\r\n score,\r\n keys,\r\n parse,\r\n stringify,\r\n };\r\n}\r\n/**\r\n * Compares an array of numbers as used in PathParser.score and returns a\r\n * number. This function can be used to `sort` an array\r\n *\r\n * @param a - first array of numbers\r\n * @param b - second array of numbers\r\n * @returns 0 if both are equal, < 0 if a should be sorted first, > 0 if b\r\n * should be sorted first\r\n */\r\nfunction compareScoreArray(a, b) {\r\n let i = 0;\r\n while (i < a.length && i < b.length) {\r\n const diff = b[i] - a[i];\r\n // only keep going if diff === 0\r\n if (diff)\r\n return diff;\r\n i++;\r\n }\r\n // if the last subsegment was Static, the shorter segments should be sorted first\r\n // otherwise sort the longest segment first\r\n if (a.length < b.length) {\r\n return a.length === 1 && a[0] === 40 /* Static */ + 40 /* Segment */\r\n ? -1\r\n : 1;\r\n }\r\n else if (a.length > b.length) {\r\n return b.length === 1 && b[0] === 40 /* Static */ + 40 /* Segment */\r\n ? 1\r\n : -1;\r\n }\r\n return 0;\r\n}\r\n/**\r\n * Compare function that can be used with `sort` to sort an array of PathParser\r\n *\r\n * @param a - first PathParser\r\n * @param b - second PathParser\r\n * @returns 0 if both are equal, < 0 if a should be sorted first, > 0 if b\r\n */\r\nfunction comparePathParserScore(a, b) {\r\n let i = 0;\r\n const aScore = a.score;\r\n const bScore = b.score;\r\n while (i < aScore.length && i < bScore.length) {\r\n const comp = compareScoreArray(aScore[i], bScore[i]);\r\n // do not return if both are equal\r\n if (comp)\r\n return comp;\r\n i++;\r\n }\r\n // if a and b share the same score entries but b has more, sort b first\r\n return bScore.length - aScore.length;\r\n // this is the ternary version\r\n // return aScore.length < bScore.length\r\n // ? 1\r\n // : aScore.length > bScore.length\r\n // ? -1\r\n // : 0\r\n}\n\nconst ROOT_TOKEN = {\r\n type: 0 /* Static */,\r\n value: '',\r\n};\r\nconst VALID_PARAM_RE = /[a-zA-Z0-9_]/;\r\n// After some profiling, the cache seems to be unnecessary because tokenizePath\r\n// (the slowest part of adding a route) is very fast\r\n// const tokenCache = new Map<string, Token[][]>()\r\nfunction tokenizePath(path) {\r\n if (!path)\r\n return [[]];\r\n if (path === '/')\r\n return [[ROOT_TOKEN]];\r\n if (!path.startsWith('/')) {\r\n throw new Error((process.env.NODE_ENV !== 'production')\r\n ? `Route paths should start with a \"/\": \"${path}\" should be \"/${path}\".`\r\n : `Invalid path \"${path}\"`);\r\n }\r\n // if (tokenCache.has(path)) return tokenCache.get(path)!\r\n function crash(message) {\r\n throw new Error(`ERR (${state})/\"${buffer}\": ${message}`);\r\n }\r\n let state = 0 /* Static */;\r\n let previousState = state;\r\n const tokens = [];\r\n // the segment will always be valid because we get into the initial state\r\n // with the leading /\r\n let segment;\r\n function finalizeSegment() {\r\n if (segment)\r\n tokens.push(segment);\r\n segment = [];\r\n }\r\n // index on the path\r\n let i = 0;\r\n // char at index\r\n let char;\r\n // buffer of the value read\r\n let buffer = '';\r\n // custom regexp for a param\r\n let customRe = '';\r\n function consumeBuffer() {\r\n if (!buffer)\r\n return;\r\n if (state === 0 /* Static */) {\r\n segment.push({\r\n type: 0 /* Static */,\r\n value: buffer,\r\n });\r\n }\r\n else if (state === 1 /* Param */ ||\r\n state === 2 /* ParamRegExp */ ||\r\n state === 3 /* ParamRegExpEnd */) {\r\n if (segment.length > 1 && (char === '*' || char === '+'))\r\n crash(`A repeatable param (${buffer}) must be alone in its segment. eg: '/:ids+.`);\r\n segment.push({\r\n type: 1 /* Param */,\r\n value: buffer,\r\n regexp: customRe,\r\n repeatable: char === '*' || char === '+',\r\n optional: char === '*' || char === '?',\r\n });\r\n }\r\n else {\r\n crash('Invalid state to consume buffer');\r\n }\r\n buffer = '';\r\n }\r\n function addCharToBuffer() {\r\n buffer += char;\r\n }\r\n while (i < path.length) {\r\n char = path[i++];\r\n if (char === '\\\\' && state !== 2 /* ParamRegExp */) {\r\n previousState = state;\r\n state = 4 /* EscapeNext */;\r\n continue;\r\n }\r\n switch (state) {\r\n case 0 /* Static */:\r\n if (char === '/') {\r\n if (buffer) {\r\n consumeBuffer();\r\n }\r\n finalizeSegment();\r\n }\r\n else if (char === ':') {\r\n consumeBuffer();\r\n state = 1 /* Param */;\r\n }\r\n else {\r\n addCharToBuffer();\r\n }\r\n break;\r\n case 4 /* EscapeNext */:\r\n addCharToBuffer();\r\n state = previousState;\r\n break;\r\n case 1 /* Param */:\r\n if (char === '(') {\r\n state = 2 /* ParamRegExp */;\r\n }\r\n else if (VALID_PARAM_RE.test(char)) {\r\n addCharToBuffer();\r\n }\r\n else {\r\n consumeBuffer();\r\n state = 0 /* Static */;\r\n // go back one character if we were not modifying\r\n if (char !== '*' && char !== '?' && char !== '+')\r\n i--;\r\n }\r\n break;\r\n case 2 /* ParamRegExp */:\r\n // TODO: is it worth handling nested regexp? like :p(?:prefix_([^/]+)_suffix)\r\n // it already works by escaping the closing )\r\n // https://paths.esm.dev/?p=AAMeJbiAwQEcDKbAoAAkP60PG2R6QAvgNaA6AFACM2ABuQBB#\r\n // is this really something people need since you can also write\r\n // /prefix_:p()_suffix\r\n if (char === ')') {\r\n // handle the escaped )\r\n if (customRe[customRe.length - 1] == '\\\\')\r\n customRe = customRe.slice(0, -1) + char;\r\n else\r\n state = 3 /* ParamRegExpEnd */;\r\n }\r\n else {\r\n customRe += char;\r\n }\r\n break;\r\n case 3 /* ParamRegExpEnd */:\r\n // same as finalizing a param\r\n consumeBuffer();\r\n state = 0 /* Static */;\r\n // go back one character if we were not modifying\r\n if (char !== '*' && char !== '?' && char !== '+')\r\n i--;\r\n customRe = '';\r\n break;\r\n default:\r\n crash('Unknown state');\r\n break;\r\n }\r\n }\r\n if (state === 2 /* ParamRegExp */)\r\n crash(`Unfinished custom RegExp for param \"${buffer}\"`);\r\n consumeBuffer();\r\n finalizeSegment();\r\n // tokenCache.set(path, tokens)\r\n return tokens;\r\n}\n\nfunction createRouteRecordMatcher(record, parent, options) {\r\n const parser = tokensToParser(tokenizePath(record.path), options);\r\n // warn against params with the same name\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n const existingKeys = new Set();\r\n for (const key of parser.keys) {\r\n if (existingKeys.has(key.name))\r\n warn(`Found duplicated params with name \"${key.name}\" for path \"${record.path}\". Only the last one will be available on \"$route.params\".`);\r\n existingKeys.add(key.name);\r\n }\r\n }\r\n const matcher = assign(parser, {\r\n record,\r\n parent,\r\n // these needs to be populated by the parent\r\n children: [],\r\n alias: [],\r\n });\r\n if (parent) {\r\n // both are aliases or both are not aliases\r\n // we don't want to mix them because the order is used when\r\n // passing originalRecord in Matcher.addRoute\r\n if (!matcher.record.aliasOf === !parent.record.aliasOf)\r\n parent.children.push(matcher);\r\n }\r\n return matcher;\r\n}\n\n/**\r\n * Creates a Router Matcher.\r\n *\r\n * @internal\r\n * @param routes - array of initial routes\r\n * @param globalOptions - global route options\r\n */\r\nfunction createRouterMatcher(routes, globalOptions) {\r\n // normalized ordered array of matchers\r\n const matchers = [];\r\n const matcherMap = new Map();\r\n globalOptions = mergeOptions({ strict: false, end: true, sensitive: false }, globalOptions);\r\n function getRecordMatcher(name) {\r\n return matcherMap.get(name);\r\n }\r\n function addRoute(record, parent, originalRecord) {\r\n // used later on to remove by name\r\n const isRootAdd = !originalRecord;\r\n const mainNormalizedRecord = normalizeRouteRecord(record);\r\n // we might be the child of an alias\r\n mainNormalizedRecord.aliasOf = originalRecord && originalRecord.record;\r\n const options = mergeOptions(globalOptions, record);\r\n // generate an array of records to correctly handle aliases\r\n const normalizedRecords = [\r\n mainNormalizedRecord,\r\n ];\r\n if ('alias' in record) {\r\n const aliases = typeof record.alias === 'string' ? [record.alias] : record.alias;\r\n for (const alias of aliases) {\r\n normalizedRecords.push(assign({}, mainNormalizedRecord, {\r\n // this allows us to hold a copy of the `components` option\r\n // so that async components cache is hold on the original record\r\n components: originalRecord\r\n ? originalRecord.record.components\r\n : mainNormalizedRecord.components,\r\n path: alias,\r\n // we might be the child of an alias\r\n aliasOf: originalRecord\r\n ? originalRecord.record\r\n : mainNormalizedRecord,\r\n // the aliases are always of the same kind as the original since they\r\n // are defined on the same record\r\n }));\r\n }\r\n }\r\n let matcher;\r\n let originalMatcher;\r\n for (const normalizedRecord of normalizedRecords) {\r\n const { path } = normalizedRecord;\r\n // Build up the path for nested routes if the child isn't an absolute\r\n // route. Only add the / delimiter if the child path isn't empty and if the\r\n // parent path doesn't have a trailing slash\r\n if (parent && path[0] !== '/') {\r\n const parentPath = parent.record.path;\r\n const connectingSlash = parentPath[parentPath.length - 1] === '/' ? '' : '/';\r\n normalizedRecord.path =\r\n parent.record.path + (path && connectingSlash + path);\r\n }\r\n if ((process.env.NODE_ENV !== 'production') && normalizedRecord.path === '*') {\r\n throw new Error('Catch all routes (\"*\") must now be defined using a param with a custom regexp.\\n' +\r\n 'See more at https://next.router.vuejs.org/guide/migration/#removed-star-or-catch-all-routes.');\r\n }\r\n // create the object before hand so it can be passed to children\r\n matcher = createRouteRecordMatcher(normalizedRecord, parent, options);\r\n if ((process.env.NODE_ENV !== 'production') && parent && path[0] === '/')\r\n checkMissingParamsInAbsolutePath(matcher, parent);\r\n // if we are an alias we must tell the original record that we exist\r\n // so we can be removed\r\n if (originalRecord) {\r\n originalRecord.alias.push(matcher);\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n checkSameParams(originalRecord, matcher);\r\n }\r\n }\r\n else {\r\n // otherwise, the first record is the original and others are aliases\r\n originalMatcher = originalMatcher || matcher;\r\n if (originalMatcher !== matcher)\r\n originalMatcher.alias.push(matcher);\r\n // remove the route if named and only for the top record (avoid in nested calls)\r\n // this works because the original record is the first one\r\n if (isRootAdd && record.name && !isAliasRecord(matcher))\r\n removeRoute(record.name);\r\n }\r\n if ('children' in mainNormalizedRecord) {\r\n const children = mainNormalizedRecord.children;\r\n for (let i = 0; i < children.length; i++) {\r\n addRoute(children[i], matcher, originalRecord && originalRecord.children[i]);\r\n }\r\n }\r\n // if there was no original record, then the first one was not an alias and all\r\n // other alias (if any) need to reference this record when adding children\r\n originalRecord = originalRecord || matcher;\r\n // TODO: add normalized records for more flexibility\r\n // if (parent && isAliasRecord(originalRecord)) {\r\n // parent.children.push(originalRecord)\r\n // }\r\n insertMatcher(matcher);\r\n }\r\n return originalMatcher\r\n ? () => {\r\n // since other matchers are aliases, they should be removed by the original matcher\r\n removeRoute(originalMatcher);\r\n }\r\n : noop;\r\n }\r\n function removeRoute(matcherRef) {\r\n if (isRouteName(matcherRef)) {\r\n const matcher = matcherMap.get(matcherRef);\r\n if (matcher) {\r\n matcherMap.delete(matcherRef);\r\n matchers.splice(matchers.indexOf(matcher), 1);\r\n matcher.children.forEach(removeRoute);\r\n matcher.alias.forEach(removeRoute);\r\n }\r\n }\r\n else {\r\n const index = matchers.indexOf(matcherRef);\r\n if (index > -1) {\r\n matchers.splice(index, 1);\r\n if (matcherRef.record.name)\r\n matcherMap.delete(matcherRef.record.name);\r\n matcherRef.children.forEach(removeRoute);\r\n matcherRef.alias.forEach(removeRoute);\r\n }\r\n }\r\n }\r\n function getRoutes() {\r\n return matchers;\r\n }\r\n function insertMatcher(matcher) {\r\n let i = 0;\r\n while (i < matchers.length &&\r\n comparePathParserScore(matcher, matchers[i]) >= 0 &&\r\n // Adding children with empty path should still appear before the parent\r\n // https://github.com/vuejs/router/issues/1124\r\n (matcher.record.path !== matchers[i].record.path ||\r\n !isRecordChildOf(matcher, matchers[i])))\r\n i++;\r\n matchers.splice(i, 0, matcher);\r\n // only add the original record to the name map\r\n if (matcher.record.name && !isAliasRecord(matcher))\r\n matcherMap.set(matcher.record.name, matcher);\r\n }\r\n function resolve(location, currentLocation) {\r\n let matcher;\r\n let params = {};\r\n let path;\r\n let name;\r\n if ('name' in location && location.name) {\r\n matcher = matcherMap.get(location.name);\r\n if (!matcher)\r\n throw createRouterError(1 /* MATCHER_NOT_FOUND */, {\r\n location,\r\n });\r\n name = matcher.record.name;\r\n params = assign(\r\n // paramsFromLocation is a new object\r\n paramsFromLocation(currentLocation.params, \r\n // only keep params that exist in the resolved location\r\n // TODO: only keep optional params coming from a parent record\r\n matcher.keys.filter(k => !k.optional).map(k => k.name)), location.params);\r\n // throws if cannot be stringified\r\n path = matcher.stringify(params);\r\n }\r\n else if ('path' in location) {\r\n // no need to resolve the path with the matcher as it was provided\r\n // this also allows the user to control the encoding\r\n path = location.path;\r\n if ((process.env.NODE_ENV !== 'production') && !path.startsWith('/')) {\r\n warn(`The Matcher cannot resolve relative paths but received \"${path}\". Unless you directly called \\`matcher.resolve(\"${path}\")\\`, this is probably a bug in vue-router. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/router.`);\r\n }\r\n matcher = matchers.find(m => m.re.test(path));\r\n // matcher should have a value after the loop\r\n if (matcher) {\r\n // TODO: dev warning of unused params if provided\r\n // we know the matcher works because we tested the regexp\r\n params = matcher.parse(path);\r\n name = matcher.record.name;\r\n }\r\n // location is a relative path\r\n }\r\n else {\r\n // match by name or path of current route\r\n matcher = currentLocation.name\r\n ? matcherMap.get(currentLocation.name)\r\n : matchers.find(m => m.re.test(currentLocation.path));\r\n if (!matcher)\r\n throw createRouterError(1 /* MATCHER_NOT_FOUND */, {\r\n location,\r\n currentLocation,\r\n });\r\n name = matcher.record.name;\r\n // since we are navigating to the same location, we don't need to pick the\r\n // params like when `name` is provided\r\n params = assign({}, currentLocation.params, location.params);\r\n path = matcher.stringify(params);\r\n }\r\n const matched = [];\r\n let parentMatcher = matcher;\r\n while (parentMatcher) {\r\n // reversed order so parents are at the beginning\r\n matched.unshift(parentMatcher.record);\r\n parentMatcher = parentMatcher.parent;\r\n }\r\n return {\r\n name,\r\n path,\r\n params,\r\n matched,\r\n meta: mergeMetaFields(matched),\r\n };\r\n }\r\n // add initial routes\r\n routes.forEach(route => addRoute(route));\r\n return { addRoute, resolve, removeRoute, getRoutes, getRecordMatcher };\r\n}\r\nfunction paramsFromLocation(params, keys) {\r\n const newParams = {};\r\n for (const key of keys) {\r\n if (key in params)\r\n newParams[key] = params[key];\r\n }\r\n return newParams;\r\n}\r\n/**\r\n * Normalizes a RouteRecordRaw. Creates a copy\r\n *\r\n * @param record\r\n * @returns the normalized version\r\n */\r\nfunction normalizeRouteRecord(record) {\r\n return {\r\n path: record.path,\r\n redirect: record.redirect,\r\n name: record.name,\r\n meta: record.meta || {},\r\n aliasOf: undefined,\r\n beforeEnter: record.beforeEnter,\r\n props: normalizeRecordProps(record),\r\n children: record.children || [],\r\n instances: {},\r\n leaveGuards: new Set(),\r\n updateGuards: new Set(),\r\n enterCallbacks: {},\r\n components: 'components' in record\r\n ? record.components || {}\r\n : { default: record.component },\r\n };\r\n}\r\n/**\r\n * Normalize the optional `props` in a record to always be an object similar to\r\n * components. Also accept a boolean for components.\r\n * @param record\r\n */\r\nfunction normalizeRecordProps(record) {\r\n const propsObject = {};\r\n // props does not exist on redirect records but we can set false directly\r\n const props = record.props || false;\r\n if ('component' in record) {\r\n propsObject.default = props;\r\n }\r\n else {\r\n // NOTE: we could also allow a function to be applied to every component.\r\n // Would need user feedback for use cases\r\n for (const name in record.components)\r\n propsObject[name] = typeof props === 'boolean' ? props : props[name];\r\n }\r\n return propsObject;\r\n}\r\n/**\r\n * Checks if a record or any of its parent is an alias\r\n * @param record\r\n */\r\nfunction isAliasRecord(record) {\r\n while (record) {\r\n if (record.record.aliasOf)\r\n return true;\r\n record = record.parent;\r\n }\r\n return false;\r\n}\r\n/**\r\n * Merge meta fields of an array of records\r\n *\r\n * @param matched - array of matched records\r\n */\r\nfunction mergeMetaFields(matched) {\r\n return matched.reduce((meta, record) => assign(meta, record.meta), {});\r\n}\r\nfunction mergeOptions(defaults, partialOptions) {\r\n const options = {};\r\n for (const key in defaults) {\r\n options[key] = key in partialOptions ? partialOptions[key] : defaults[key];\r\n }\r\n return options;\r\n}\r\nfunction isSameParam(a, b) {\r\n return (a.name === b.name &&\r\n a.optional === b.optional &&\r\n a.repeatable === b.repeatable);\r\n}\r\n/**\r\n * Check if a path and its alias have the same required params\r\n *\r\n * @param a - original record\r\n * @param b - alias record\r\n */\r\nfunction checkSameParams(a, b) {\r\n for (const key of a.keys) {\r\n if (!key.optional && !b.keys.find(isSameParam.bind(null, key)))\r\n return warn(`Alias \"${b.record.path}\" and the original record: \"${a.record.path}\" should have the exact same param named \"${key.name}\"`);\r\n }\r\n for (const key of b.keys) {\r\n if (!key.optional && !a.keys.find(isSameParam.bind(null, key)))\r\n return warn(`Alias \"${b.record.path}\" and the original record: \"${a.record.path}\" should have the exact same param named \"${key.name}\"`);\r\n }\r\n}\r\nfunction checkMissingParamsInAbsolutePath(record, parent) {\r\n for (const key of parent.keys) {\r\n if (!record.keys.find(isSameParam.bind(null, key)))\r\n return warn(`Absolute path \"${record.record.path}\" should have the exact same param named \"${key.name}\" as its parent \"${parent.record.path}\".`);\r\n }\r\n}\r\nfunction isRecordChildOf(record, parent) {\r\n return parent.children.some(child => child === record || isRecordChildOf(record, child));\r\n}\n\n/**\r\n * Encoding Rules ␣ = Space Path: ␣ \" < > # ? { } Query: ␣ \" < > # & = Hash: ␣ \"\r\n * < > `\r\n *\r\n * On top of that, the RFC3986 (https://tools.ietf.org/html/rfc3986#section-2.2)\r\n * defines some extra characters to be encoded. Most browsers do not encode them\r\n * in encodeURI https://github.com/whatwg/url/issues/369, so it may be safer to\r\n * also encode `!'()*`. Leaving unencoded only ASCII alphanumeric(`a-zA-Z0-9`)\r\n * plus `-._~`. This extra safety should be applied to query by patching the\r\n * string returned by encodeURIComponent encodeURI also encodes `[\\]^`. `\\`\r\n * should be encoded to avoid ambiguity. Browsers (IE, FF, C) transform a `\\`\r\n * into a `/` if directly typed in. The _backtick_ (`````) should also be\r\n * encoded everywhere because some browsers like FF encode it when directly\r\n * written while others don't. Safari and IE don't encode ``\"<>{}``` in hash.\r\n */\r\n// const EXTRA_RESERVED_RE = /[!'()*]/g\r\n// const encodeReservedReplacer = (c: string) => '%' + c.charCodeAt(0).toString(16)\r\nconst HASH_RE = /#/g; // %23\r\nconst AMPERSAND_RE = /&/g; // %26\r\nconst SLASH_RE = /\\//g; // %2F\r\nconst EQUAL_RE = /=/g; // %3D\r\nconst IM_RE = /\\?/g; // %3F\r\nconst PLUS_RE = /\\+/g; // %2B\r\n/**\r\n * NOTE: It's not clear to me if we should encode the + symbol in queries, it\r\n * seems to be less flexible than not doing so and I can't find out the legacy\r\n * systems requiring this for regular requests like text/html. In the standard,\r\n * the encoding of the plus character is only mentioned for\r\n * application/x-www-form-urlencoded\r\n * (https://url.spec.whatwg.org/#urlencoded-parsing) and most browsers seems lo\r\n * leave the plus character as is in queries. To be more flexible, we allow the\r\n * plus character on the query but it can also be manually encoded by the user.\r\n *\r\n * Resources:\r\n * - https://url.spec.whatwg.org/#urlencoded-parsing\r\n * - https://stackoverflow.com/questions/1634271/url-encoding-the-space-character-or-20\r\n */\r\nconst ENC_BRACKET_OPEN_RE = /%5B/g; // [\r\nconst ENC_BRACKET_CLOSE_RE = /%5D/g; // ]\r\nconst ENC_CARET_RE = /%5E/g; // ^\r\nconst ENC_BACKTICK_RE = /%60/g; // `\r\nconst ENC_CURLY_OPEN_RE = /%7B/g; // {\r\nconst ENC_PIPE_RE = /%7C/g; // |\r\nconst ENC_CURLY_CLOSE_RE = /%7D/g; // }\r\nconst ENC_SPACE_RE = /%20/g; // }\r\n/**\r\n * Encode characters that need to be encoded on the path, search and hash\r\n * sections of the URL.\r\n *\r\n * @internal\r\n * @param text - string to encode\r\n * @returns encoded string\r\n */\r\nfunction commonEncode(text) {\r\n return encodeURI('' + text)\r\n .replace(ENC_PIPE_RE, '|')\r\n .replace(ENC_BRACKET_OPEN_RE, '[')\r\n .replace(ENC_BRACKET_CLOSE_RE, ']');\r\n}\r\n/**\r\n * Encode characters that need to be encoded on the hash section of the URL.\r\n *\r\n * @param text - string to encode\r\n * @returns encoded string\r\n */\r\nfunction encodeHash(text) {\r\n return commonEncode(text)\r\n .replace(ENC_CURLY_OPEN_RE, '{')\r\n .replace(ENC_CURLY_CLOSE_RE, '}')\r\n .replace(ENC_CARET_RE, '^');\r\n}\r\n/**\r\n * Encode characters that need to be encoded query values on the query\r\n * section of the URL.\r\n *\r\n * @param text - string to encode\r\n * @returns encoded string\r\n */\r\nfunction encodeQueryValue(text) {\r\n return (commonEncode(text)\r\n // Encode the space as +, encode the + to differentiate it from the space\r\n .replace(PLUS_RE, '%2B')\r\n .replace(ENC_SPACE_RE, '+')\r\n .replace(HASH_RE, '%23')\r\n .replace(AMPERSAND_RE, '%26')\r\n .replace(ENC_BACKTICK_RE, '`')\r\n .replace(ENC_CURLY_OPEN_RE, '{')\r\n .replace(ENC_CURLY_CLOSE_RE, '}')\r\n .replace(ENC_CARET_RE, '^'));\r\n}\r\n/**\r\n * Like `encodeQueryValue` but also encodes the `=` character.\r\n *\r\n * @param text - string to encode\r\n */\r\nfunction encodeQueryKey(text) {\r\n return encodeQueryValue(text).replace(EQUAL_RE, '%3D');\r\n}\r\n/**\r\n * Encode characters that need to be encoded on the path section of the URL.\r\n *\r\n * @param text - string to encode\r\n * @returns encoded string\r\n */\r\nfunction encodePath(text) {\r\n return commonEncode(text).replace(HASH_RE, '%23').replace(IM_RE, '%3F');\r\n}\r\n/**\r\n * Encode characters that need to be encoded on the path section of the URL as a\r\n * param. This function encodes everything {@link encodePath} does plus the\r\n * slash (`/`) character. If `text` is `null` or `undefined`, returns an empty\r\n * string instead.\r\n *\r\n * @param text - string to encode\r\n * @returns encoded string\r\n */\r\nfunction encodeParam(text) {\r\n return text == null ? '' : encodePath(text).replace(SLASH_RE, '%2F');\r\n}\r\n/**\r\n * Decode text using `decodeURIComponent`. Returns the original text if it\r\n * fails.\r\n *\r\n * @param text - string to decode\r\n * @returns decoded string\r\n */\r\nfunction decode(text) {\r\n try {\r\n return decodeURIComponent('' + text);\r\n }\r\n catch (err) {\r\n (process.env.NODE_ENV !== 'production') && warn(`Error decoding \"${text}\". Using original value`);\r\n }\r\n return '' + text;\r\n}\n\n/**\r\n * Transforms a queryString into a {@link LocationQuery} object. Accept both, a\r\n * version with the leading `?` and without Should work as URLSearchParams\r\n\n * @internal\r\n *\r\n * @param search - search string to parse\r\n * @returns a query object\r\n */\r\nfunction parseQuery(search) {\r\n const query = {};\r\n // avoid creating an object with an empty key and empty value\r\n // because of split('&')\r\n if (search === '' || search === '?')\r\n return query;\r\n const hasLeadingIM = search[0] === '?';\r\n const searchParams = (hasLeadingIM ? search.slice(1) : search).split('&');\r\n for (let i = 0; i < searchParams.length; ++i) {\r\n // pre decode the + into space\r\n const searchParam = searchParams[i].replace(PLUS_RE, ' ');\r\n // allow the = character\r\n const eqPos = searchParam.indexOf('=');\r\n const key = decode(eqPos < 0 ? searchParam : searchParam.slice(0, eqPos));\r\n const value = eqPos < 0 ? null : decode(searchParam.slice(eqPos + 1));\r\n if (key in query) {\r\n // an extra variable for ts types\r\n let currentValue = query[key];\r\n if (!Array.isArray(currentValue)) {\r\n currentValue = query[key] = [currentValue];\r\n }\r\n currentValue.push(value);\r\n }\r\n else {\r\n query[key] = value;\r\n }\r\n }\r\n return query;\r\n}\r\n/**\r\n * Stringifies a {@link LocationQueryRaw} object. Like `URLSearchParams`, it\r\n * doesn't prepend a `?`\r\n *\r\n * @internal\r\n *\r\n * @param query - query object to stringify\r\n * @returns string version of the query without the leading `?`\r\n */\r\nfunction stringifyQuery(query) {\r\n let search = '';\r\n for (let key in query) {\r\n const value = query[key];\r\n key = encodeQueryKey(key);\r\n if (value == null) {\r\n // only null adds the value\r\n if (value !== undefined) {\r\n search += (search.length ? '&' : '') + key;\r\n }\r\n continue;\r\n }\r\n // keep null values\r\n const values = Array.isArray(value)\r\n ? value.map(v => v && encodeQueryValue(v))\r\n : [value && encodeQueryValue(value)];\r\n values.forEach(value => {\r\n // skip undefined values in arrays as if they were not present\r\n // smaller code than using filter\r\n if (value !== undefined) {\r\n // only append & with non-empty search\r\n search += (search.length ? '&' : '') + key;\r\n if (value != null)\r\n search += '=' + value;\r\n }\r\n });\r\n }\r\n return search;\r\n}\r\n/**\r\n * Transforms a {@link LocationQueryRaw} into a {@link LocationQuery} by casting\r\n * numbers into strings, removing keys with an undefined value and replacing\r\n * undefined with null in arrays\r\n *\r\n * @param query - query object to normalize\r\n * @returns a normalized query object\r\n */\r\nfunction normalizeQuery(query) {\r\n const normalizedQuery = {};\r\n for (const key in query) {\r\n const value = query[key];\r\n if (value !== undefined) {\r\n normalizedQuery[key] = Array.isArray(value)\r\n ? value.map(v => (v == null ? null : '' + v))\r\n : value == null\r\n ? value\r\n : '' + value;\r\n }\r\n }\r\n return normalizedQuery;\r\n}\n\n/**\r\n * Create a list of callbacks that can be reset. Used to create before and after navigation guards list\r\n */\r\nfunction useCallbacks() {\r\n let handlers = [];\r\n function add(handler) {\r\n handlers.push(handler);\r\n return () => {\r\n const i = handlers.indexOf(handler);\r\n if (i > -1)\r\n handlers.splice(i, 1);\r\n };\r\n }\r\n function reset() {\r\n handlers = [];\r\n }\r\n return {\r\n add,\r\n list: () => handlers,\r\n reset,\r\n };\r\n}\n\nfunction registerGuard(record, name, guard) {\r\n const removeFromList = () => {\r\n record[name].delete(guard);\r\n };\r\n onUnmounted(removeFromList);\r\n onDeactivated(removeFromList);\r\n onActivated(() => {\r\n record[name].add(guard);\r\n });\r\n record[name].add(guard);\r\n}\r\n/**\r\n * Add a navigation guard that triggers whenever the component for the current\r\n * location is about to be left. Similar to {@link beforeRouteLeave} but can be\r\n * used in any component. The guard is removed when the component is unmounted.\r\n *\r\n * @param leaveGuard - {@link NavigationGuard}\r\n */\r\nfunction onBeforeRouteLeave(leaveGuard) {\r\n if ((process.env.NODE_ENV !== 'production') && !getCurrentInstance()) {\r\n warn('getCurrentInstance() returned null. onBeforeRouteLeave() must be called at the top of a setup function');\r\n return;\r\n }\r\n const activeRecord = inject(matchedRouteKey, \r\n // to avoid warning\r\n {}).value;\r\n if (!activeRecord) {\r\n (process.env.NODE_ENV !== 'production') &&\r\n warn('No active route record was found when calling `onBeforeRouteLeave()`. Make sure you call this function inside of a component child of <router-view>. Maybe you called it inside of App.vue?');\r\n return;\r\n }\r\n registerGuard(activeRecord, 'leaveGuards', leaveGuard);\r\n}\r\n/**\r\n * Add a navigation guard that triggers whenever the current location is about\r\n * to be updated. Similar to {@link beforeRouteUpdate} but can be used in any\r\n * component. The guard is removed when the component is unmounted.\r\n *\r\n * @param updateGuard - {@link NavigationGuard}\r\n */\r\nfunction onBeforeRouteUpdate(updateGuard) {\r\n if ((process.env.NODE_ENV !== 'production') && !getCurrentInstance()) {\r\n warn('getCurrentInstance() returned null. onBeforeRouteUpdate() must be called at the top of a setup function');\r\n return;\r\n }\r\n const activeRecord = inject(matchedRouteKey, \r\n // to avoid warning\r\n {}).value;\r\n if (!activeRecord) {\r\n (process.env.NODE_ENV !== 'production') &&\r\n warn('No active route record was found when calling `onBeforeRouteUpdate()`. Make sure you call this function inside of a component child of <router-view>. Maybe you called it inside of App.vue?');\r\n return;\r\n }\r\n registerGuard(activeRecord, 'updateGuards', updateGuard);\r\n}\r\nfunction guardToPromiseFn(guard, to, from, record, name) {\r\n // keep a reference to the enterCallbackArray to prevent pushing callbacks if a new navigation took place\r\n const enterCallbackArray = record &&\r\n // name is defined if record is because of the function overload\r\n (record.enterCallbacks[name] = record.enterCallbacks[name] || []);\r\n return () => new Promise((resolve, reject) => {\r\n const next = (valid) => {\r\n if (valid === false)\r\n reject(createRouterError(4 /* NAVIGATION_ABORTED */, {\r\n from,\r\n to,\r\n }));\r\n else if (valid instanceof Error) {\r\n reject(valid);\r\n }\r\n else if (isRouteLocation(valid)) {\r\n reject(createRouterError(2 /* NAVIGATION_GUARD_REDIRECT */, {\r\n from: to,\r\n to: valid,\r\n }));\r\n }\r\n else {\r\n if (enterCallbackArray &&\r\n // since enterCallbackArray is truthy, both record and name also are\r\n record.enterCallbacks[name] === enterCallbackArray &&\r\n typeof valid === 'function')\r\n enterCallbackArray.push(valid);\r\n resolve();\r\n }\r\n };\r\n // wrapping with Promise.resolve allows it to work with both async and sync guards\r\n const guardReturn = guard.call(record && record.instances[name], to, from, (process.env.NODE_ENV !== 'production') ? canOnlyBeCalledOnce(next, to, from) : next);\r\n let guardCall = Promise.resolve(guardReturn);\r\n if (guard.length < 3)\r\n guardCall = guardCall.then(next);\r\n if ((process.env.NODE_ENV !== 'production') && guard.length > 2) {\r\n const message = `The \"next\" callback was never called inside of ${guard.name ? '\"' + guard.name + '\"' : ''}:\\n${guard.toString()}\\n. If you are returning a value instead of calling \"next\", make sure to remove the \"next\" parameter from your function.`;\r\n if (typeof guardReturn === 'object' && 'then' in guardReturn) {\r\n guardCall = guardCall.then(resolvedValue => {\r\n // @ts-expect-error: _called is added at canOnlyBeCalledOnce\r\n if (!next._called) {\r\n warn(message);\r\n return Promise.reject(new Error('Invalid navigation guard'));\r\n }\r\n return resolvedValue;\r\n });\r\n // TODO: test me!\r\n }\r\n else if (guardReturn !== undefined) {\r\n // @ts-expect-error: _called is added at canOnlyBeCalledOnce\r\n if (!next._called) {\r\n warn(message);\r\n reject(new Error('Invalid navigation guard'));\r\n return;\r\n }\r\n }\r\n }\r\n guardCall.catch(err => reject(err));\r\n });\r\n}\r\nfunction canOnlyBeCalledOnce(next, to, from) {\r\n let called = 0;\r\n return function () {\r\n if (called++ === 1)\r\n warn(`The \"next\" callback was called more than once in one navigation guard when going from \"${from.fullPath}\" to \"${to.fullPath}\". It should be called exactly one time in each navigation guard. This will fail in production.`);\r\n // @ts-expect-error: we put it in the original one because it's easier to check\r\n next._called = true;\r\n if (called === 1)\r\n next.apply(null, arguments);\r\n };\r\n}\r\nfunction extractComponentsGuards(matched, guardType, to, from) {\r\n const guards = [];\r\n for (const record of matched) {\r\n for (const name in record.components) {\r\n let rawComponent = record.components[name];\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n if (!rawComponent ||\r\n (typeof rawComponent !== 'object' &&\r\n typeof rawComponent !== 'function')) {\r\n warn(`Component \"${name}\" in record with path \"${record.path}\" is not` +\r\n ` a valid component. Received \"${String(rawComponent)}\".`);\r\n // throw to ensure we stop here but warn to ensure the message isn't\r\n // missed by the user\r\n throw new Error('Invalid route component');\r\n }\r\n else if ('then' in rawComponent) {\r\n // warn if user wrote import('/component.vue') instead of () =>\r\n // import('./component.vue')\r\n warn(`Component \"${name}\" in record with path \"${record.path}\" is a ` +\r\n `Promise instead of a function that returns a Promise. Did you ` +\r\n `write \"import('./MyPage.vue')\" instead of ` +\r\n `\"() => import('./MyPage.vue')\" ? This will break in ` +\r\n `production if not fixed.`);\r\n const promise = rawComponent;\r\n rawComponent = () => promise;\r\n }\r\n else if (rawComponent.__asyncLoader &&\r\n // warn only once per component\r\n !rawComponent.__warnedDefineAsync) {\r\n rawComponent.__warnedDefineAsync = true;\r\n warn(`Component \"${name}\" in record with path \"${record.path}\" is defined ` +\r\n `using \"defineAsyncComponent()\". ` +\r\n `Write \"() => import('./MyPage.vue')\" instead of ` +\r\n `\"defineAsyncComponent(() => import('./MyPage.vue'))\".`);\r\n }\r\n }\r\n // skip update and leave guards if the route component is not mounted\r\n if (guardType !== 'beforeRouteEnter' && !record.instances[name])\r\n continue;\r\n if (isRouteComponent(rawComponent)) {\r\n // __vccOpts is added by vue-class-component and contain the regular options\r\n const options = rawComponent.__vccOpts || rawComponent;\r\n const guard = options[guardType];\r\n guard && guards.push(guardToPromiseFn(guard, to, from, record, name));\r\n }\r\n else {\r\n // start requesting the chunk already\r\n let componentPromise = rawComponent();\r\n if ((process.env.NODE_ENV !== 'production') && !('catch' in componentPromise)) {\r\n warn(`Component \"${name}\" in record with path \"${record.path}\" is a function that does not return a Promise. If you were passing a functional component, make sure to add a \"displayName\" to the component. This will break in production if not fixed.`);\r\n componentPromise = Promise.resolve(componentPromise);\r\n }\r\n guards.push(() => componentPromise.then(resolved => {\r\n if (!resolved)\r\n return Promise.reject(new Error(`Couldn't resolve component \"${name}\" at \"${record.path}\"`));\r\n const resolvedComponent = isESModule(resolved)\r\n ? resolved.default\r\n : resolved;\r\n // replace the function with the resolved component\r\n record.components[name] = resolvedComponent;\r\n // __vccOpts is added by vue-class-component and contain the regular options\r\n const options = resolvedComponent.__vccOpts || resolvedComponent;\r\n const guard = options[guardType];\r\n return guard && guardToPromiseFn(guard, to, from, record, name)();\r\n }));\r\n }\r\n }\r\n }\r\n return guards;\r\n}\r\n/**\r\n * Allows differentiating lazy components from functional components and vue-class-component\r\n *\r\n * @param component\r\n */\r\nfunction isRouteComponent(component) {\r\n return (typeof component === 'object' ||\r\n 'displayName' in component ||\r\n 'props' in component ||\r\n '__vccOpts' in component);\r\n}\n\n// TODO: we could allow currentRoute as a prop to expose `isActive` and\r\n// `isExactActive` behavior should go through an RFC\r\nfunction useLink(props) {\r\n const router = inject(routerKey);\r\n const currentRoute = inject(routeLocationKey);\r\n const route = computed(() => router.resolve(unref(props.to)));\r\n const activeRecordIndex = computed(() => {\r\n const { matched } = route.value;\r\n const { length } = matched;\r\n const routeMatched = matched[length - 1];\r\n const currentMatched = currentRoute.matched;\r\n if (!routeMatched || !currentMatched.length)\r\n return -1;\r\n const index = currentMatched.findIndex(isSameRouteRecord.bind(null, routeMatched));\r\n if (index > -1)\r\n return index;\r\n // possible parent record\r\n const parentRecordPath = getOriginalPath(matched[length - 2]);\r\n return (\r\n // we are dealing with nested routes\r\n length > 1 &&\r\n // if the parent and matched route have the same path, this link is\r\n // referring to the empty child. Or we currently are on a different\r\n // child of the same parent\r\n getOriginalPath(routeMatched) === parentRecordPath &&\r\n // avoid comparing the child with its parent\r\n currentMatched[currentMatched.length - 1].path !== parentRecordPath\r\n ? currentMatched.findIndex(isSameRouteRecord.bind(null, matched[length - 2]))\r\n : index);\r\n });\r\n const isActive = computed(() => activeRecordIndex.value > -1 &&\r\n includesParams(currentRoute.params, route.value.params));\r\n const isExactActive = computed(() => activeRecordIndex.value > -1 &&\r\n activeRecordIndex.value === currentRoute.matched.length - 1 &&\r\n isSameRouteLocationParams(currentRoute.params, route.value.params));\r\n function navigate(e = {}) {\r\n if (guardEvent(e)) {\r\n return router[unref(props.replace) ? 'replace' : 'push'](unref(props.to)\r\n // avoid uncaught errors are they are logged anyway\r\n ).catch(noop);\r\n }\r\n return Promise.resolve();\r\n }\r\n // devtools only\r\n if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) && isBrowser) {\r\n const instance = getCurrentInstance();\r\n if (instance) {\r\n const linkContextDevtools = {\r\n route: route.value,\r\n isActive: isActive.value,\r\n isExactActive: isExactActive.value,\r\n };\r\n // @ts-expect-error: this is internal\r\n instance.__vrl_devtools = instance.__vrl_devtools || [];\r\n // @ts-expect-error: this is internal\r\n instance.__vrl_devtools.push(linkContextDevtools);\r\n watchEffect(() => {\r\n linkContextDevtools.route = route.value;\r\n linkContextDevtools.isActive = isActive.value;\r\n linkContextDevtools.isExactActive = isExactActive.value;\r\n }, { flush: 'post' });\r\n }\r\n }\r\n return {\r\n route,\r\n href: computed(() => route.value.href),\r\n isActive,\r\n isExactActive,\r\n navigate,\r\n };\r\n}\r\nconst RouterLinkImpl = /*#__PURE__*/ defineComponent({\r\n name: 'RouterLink',\r\n props: {\r\n to: {\r\n type: [String, Object],\r\n required: true,\r\n },\r\n replace: Boolean,\r\n activeClass: String,\r\n // inactiveClass: String,\r\n exactActiveClass: String,\r\n custom: Boolean,\r\n ariaCurrentValue: {\r\n type: String,\r\n default: 'page',\r\n },\r\n },\r\n useLink,\r\n setup(props, { slots }) {\r\n const link = reactive(useLink(props));\r\n const { options } = inject(routerKey);\r\n const elClass = computed(() => ({\r\n [getLinkClass(props.activeClass, options.linkActiveClass, 'router-link-active')]: link.isActive,\r\n // [getLinkClass(\r\n // props.inactiveClass,\r\n // options.linkInactiveClass,\r\n // 'router-link-inactive'\r\n // )]: !link.isExactActive,\r\n [getLinkClass(props.exactActiveClass, options.linkExactActiveClass, 'router-link-exact-active')]: link.isExactActive,\r\n }));\r\n return () => {\r\n const children = slots.default && slots.default(link);\r\n return props.custom\r\n ? children\r\n : h('a', {\r\n 'aria-current': link.isExactActive\r\n ? props.ariaCurrentValue\r\n : null,\r\n href: link.href,\r\n // this would override user added attrs but Vue will still add\r\n // the listener so we end up triggering both\r\n onClick: link.navigate,\r\n class: elClass.value,\r\n }, children);\r\n };\r\n },\r\n});\r\n// export the public type for h/tsx inference\r\n// also to avoid inline import() in generated d.ts files\r\n/**\r\n * Component to render a link that triggers a navigation on click.\r\n */\r\nconst RouterLink = RouterLinkImpl;\r\nfunction guardEvent(e) {\r\n // don't redirect with control keys\r\n if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey)\r\n return;\r\n // don't redirect when preventDefault called\r\n if (e.defaultPrevented)\r\n return;\r\n // don't redirect on right click\r\n if (e.button !== undefined && e.button !== 0)\r\n return;\r\n // don't redirect if `target=\"_blank\"`\r\n // @ts-expect-error getAttribute does exist\r\n if (e.currentTarget && e.currentTarget.getAttribute) {\r\n // @ts-expect-error getAttribute exists\r\n const target = e.currentTarget.getAttribute('target');\r\n if (/\\b_blank\\b/i.test(target))\r\n return;\r\n }\r\n // this may be a Weex event which doesn't have this method\r\n if (e.preventDefault)\r\n e.preventDefault();\r\n return true;\r\n}\r\nfunction includesParams(outer, inner) {\r\n for (const key in inner) {\r\n const innerValue = inner[key];\r\n const outerValue = outer[key];\r\n if (typeof innerValue === 'string') {\r\n if (innerValue !== outerValue)\r\n return false;\r\n }\r\n else {\r\n if (!Array.isArray(outerValue) ||\r\n outerValue.length !== innerValue.length ||\r\n innerValue.some((value, i) => value !== outerValue[i]))\r\n return false;\r\n }\r\n }\r\n return true;\r\n}\r\n/**\r\n * Get the original path value of a record by following its aliasOf\r\n * @param record\r\n */\r\nfunction getOriginalPath(record) {\r\n return record ? (record.aliasOf ? record.aliasOf.path : record.path) : '';\r\n}\r\n/**\r\n * Utility class to get the active class based on defaults.\r\n * @param propClass\r\n * @param globalClass\r\n * @param defaultClass\r\n */\r\nconst getLinkClass = (propClass, globalClass, defaultClass) => propClass != null\r\n ? propClass\r\n : globalClass != null\r\n ? globalClass\r\n : defaultClass;\n\nconst RouterViewImpl = /*#__PURE__*/ defineComponent({\r\n name: 'RouterView',\r\n // #674 we manually inherit them\r\n inheritAttrs: false,\r\n props: {\r\n name: {\r\n type: String,\r\n default: 'default',\r\n },\r\n route: Object,\r\n },\r\n // Better compat for @vue/compat users\r\n // https://github.com/vuejs/router/issues/1315\r\n compatConfig: { MODE: 3 },\r\n setup(props, { attrs, slots }) {\r\n (process.env.NODE_ENV !== 'production') && warnDeprecatedUsage();\r\n const injectedRoute = inject(routerViewLocationKey);\r\n const routeToDisplay = computed(() => props.route || injectedRoute.value);\r\n const depth = inject(viewDepthKey, 0);\r\n const matchedRouteRef = computed(() => routeToDisplay.value.matched[depth]);\r\n provide(viewDepthKey, depth + 1);\r\n provide(matchedRouteKey, matchedRouteRef);\r\n provide(routerViewLocationKey, routeToDisplay);\r\n const viewRef = ref();\r\n // watch at the same time the component instance, the route record we are\r\n // rendering, and the name\r\n watch(() => [viewRef.value, matchedRouteRef.value, props.name], ([instance, to, name], [oldInstance, from, oldName]) => {\r\n // copy reused instances\r\n if (to) {\r\n // this will update the instance for new instances as well as reused\r\n // instances when navigating to a new route\r\n to.instances[name] = instance;\r\n // the component instance is reused for a different route or name so\r\n // we copy any saved update or leave guards. With async setup, the\r\n // mounting component will mount before the matchedRoute changes,\r\n // making instance === oldInstance, so we check if guards have been\r\n // added before. This works because we remove guards when\r\n // unmounting/deactivating components\r\n if (from && from !== to && instance && instance === oldInstance) {\r\n if (!to.leaveGuards.size) {\r\n to.leaveGuards = from.leaveGuards;\r\n }\r\n if (!to.updateGuards.size) {\r\n to.updateGuards = from.updateGuards;\r\n }\r\n }\r\n }\r\n // trigger beforeRouteEnter next callbacks\r\n if (instance &&\r\n to &&\r\n // if there is no instance but to and from are the same this might be\r\n // the first visit\r\n (!from || !isSameRouteRecord(to, from) || !oldInstance)) {\r\n (to.enterCallbacks[name] || []).forEach(callback => callback(instance));\r\n }\r\n }, { flush: 'post' });\r\n return () => {\r\n const route = routeToDisplay.value;\r\n const matchedRoute = matchedRouteRef.value;\r\n const ViewComponent = matchedRoute && matchedRoute.components[props.name];\r\n // we need the value at the time we render because when we unmount, we\r\n // navigated to a different location so the value is different\r\n const currentName = props.name;\r\n if (!ViewComponent) {\r\n return normalizeSlot(slots.default, { Component: ViewComponent, route });\r\n }\r\n // props from route configuration\r\n const routePropsOption = matchedRoute.props[props.name];\r\n const routeProps = routePropsOption\r\n ? routePropsOption === true\r\n ? route.params\r\n : typeof routePropsOption === 'function'\r\n ? routePropsOption(route)\r\n : routePropsOption\r\n : null;\r\n const onVnodeUnmounted = vnode => {\r\n // remove the instance reference to prevent leak\r\n if (vnode.component.isUnmounted) {\r\n matchedRoute.instances[currentName] = null;\r\n }\r\n };\r\n const component = h(ViewComponent, assign({}, routeProps, attrs, {\r\n onVnodeUnmounted,\r\n ref: viewRef,\r\n }));\r\n if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) &&\r\n isBrowser &&\r\n component.ref) {\r\n // TODO: can display if it's an alias, its props\r\n const info = {\r\n depth,\r\n name: matchedRoute.name,\r\n path: matchedRoute.path,\r\n meta: matchedRoute.meta,\r\n };\r\n const internalInstances = Array.isArray(component.ref)\r\n ? component.ref.map(r => r.i)\r\n : [component.ref.i];\r\n internalInstances.forEach(instance => {\r\n // @ts-expect-error\r\n instance.__vrv_devtools = info;\r\n });\r\n }\r\n return (\r\n // pass the vnode to the slot as a prop.\r\n // h and <component :is=\"...\"> both accept vnodes\r\n normalizeSlot(slots.default, { Component: component, route }) ||\r\n component);\r\n };\r\n },\r\n});\r\nfunction normalizeSlot(slot, data) {\r\n if (!slot)\r\n return null;\r\n const slotContent = slot(data);\r\n return slotContent.length === 1 ? slotContent[0] : slotContent;\r\n}\r\n// export the public type for h/tsx inference\r\n// also to avoid inline import() in generated d.ts files\r\n/**\r\n * Component to display the current route the user is at.\r\n */\r\nconst RouterView = RouterViewImpl;\r\n// warn against deprecated usage with <transition> & <keep-alive>\r\n// due to functional component being no longer eager in Vue 3\r\nfunction warnDeprecatedUsage() {\r\n const instance = getCurrentInstance();\r\n const parentName = instance.parent && instance.parent.type.name;\r\n if (parentName &&\r\n (parentName === 'KeepAlive' || parentName.includes('Transition'))) {\r\n const comp = parentName === 'KeepAlive' ? 'keep-alive' : 'transition';\r\n warn(`<router-view> can no longer be used directly inside <transition> or <keep-alive>.\\n` +\r\n `Use slot props instead:\\n\\n` +\r\n `<router-view v-slot=\"{ Component }\">\\n` +\r\n ` <${comp}>\\n` +\r\n ` <component :is=\"Component\" />\\n` +\r\n ` </${comp}>\\n` +\r\n `</router-view>`);\r\n }\r\n}\n\nfunction formatRouteLocation(routeLocation, tooltip) {\r\n const copy = assign({}, routeLocation, {\r\n // remove variables that can contain vue instances\r\n matched: routeLocation.matched.map(matched => omit(matched, ['instances', 'children', 'aliasOf'])),\r\n });\r\n return {\r\n _custom: {\r\n type: null,\r\n readOnly: true,\r\n display: routeLocation.fullPath,\r\n tooltip,\r\n value: copy,\r\n },\r\n };\r\n}\r\nfunction formatDisplay(display) {\r\n return {\r\n _custom: {\r\n display,\r\n },\r\n };\r\n}\r\n// to support multiple router instances\r\nlet routerId = 0;\r\nfunction addDevtools(app, router, matcher) {\r\n // Take over router.beforeEach and afterEach\r\n // make sure we are not registering the devtool twice\r\n if (router.__hasDevtools)\r\n return;\r\n router.__hasDevtools = true;\r\n // increment to support multiple router instances\r\n const id = routerId++;\r\n setupDevtoolsPlugin({\r\n id: 'org.vuejs.router' + (id ? '.' + id : ''),\r\n label: 'Vue Router',\r\n packageName: 'vue-router',\r\n homepage: 'https://router.vuejs.org',\r\n logo: 'https://router.vuejs.org/logo.png',\r\n componentStateTypes: ['Routing'],\r\n app,\r\n }, api => {\r\n // display state added by the router\r\n api.on.inspectComponent((payload, ctx) => {\r\n if (payload.instanceData) {\r\n payload.instanceData.state.push({\r\n type: 'Routing',\r\n key: '$route',\r\n editable: false,\r\n value: formatRouteLocation(router.currentRoute.value, 'Current Route'),\r\n });\r\n }\r\n });\r\n // mark router-link as active and display tags on router views\r\n api.on.visitComponentTree(({ treeNode: node, componentInstance }) => {\r\n if (componentInstance.__vrv_devtools) {\r\n const info = componentInstance.__vrv_devtools;\r\n node.tags.push({\r\n label: (info.name ? `${info.name.toString()}: ` : '') + info.path,\r\n textColor: 0,\r\n tooltip: 'This component is rendered by &lt;router-view&gt;',\r\n backgroundColor: PINK_500,\r\n });\r\n }\r\n // if multiple useLink are used\r\n if (Array.isArray(componentInstance.__vrl_devtools)) {\r\n componentInstance.__devtoolsApi = api;\r\n componentInstance.__vrl_devtools.forEach(devtoolsData => {\r\n let backgroundColor = ORANGE_400;\r\n let tooltip = '';\r\n if (devtoolsData.isExactActive) {\r\n backgroundColor = LIME_500;\r\n tooltip = 'This is exactly active';\r\n }\r\n else if (devtoolsData.isActive) {\r\n backgroundColor = BLUE_600;\r\n tooltip = 'This link is active';\r\n }\r\n node.tags.push({\r\n label: devtoolsData.route.path,\r\n textColor: 0,\r\n tooltip,\r\n backgroundColor,\r\n });\r\n });\r\n }\r\n });\r\n watch(router.currentRoute, () => {\r\n // refresh active state\r\n refreshRoutesView();\r\n api.notifyComponentUpdate();\r\n api.sendInspectorTree(routerInspectorId);\r\n api.sendInspectorState(routerInspectorId);\r\n });\r\n const navigationsLayerId = 'router:navigations:' + id;\r\n api.addTimelineLayer({\r\n id: navigationsLayerId,\r\n label: `Router${id ? ' ' + id : ''} Navigations`,\r\n color: 0x40a8c4,\r\n });\r\n // const errorsLayerId = 'router:errors'\r\n // api.addTimelineLayer({\r\n // id: errorsLayerId,\r\n // label: 'Router Errors',\r\n // color: 0xea5455,\r\n // })\r\n router.onError((error, to) => {\r\n api.addTimelineEvent({\r\n layerId: navigationsLayerId,\r\n event: {\r\n title: 'Error during Navigation',\r\n subtitle: to.fullPath,\r\n logType: 'error',\r\n time: api.now(),\r\n data: { error },\r\n groupId: to.meta.__navigationId,\r\n },\r\n });\r\n });\r\n // attached to `meta` and used to group events\r\n let navigationId = 0;\r\n router.beforeEach((to, from) => {\r\n const data = {\r\n guard: formatDisplay('beforeEach'),\r\n from: formatRouteLocation(from, 'Current Location during this navigation'),\r\n to: formatRouteLocation(to, 'Target location'),\r\n };\r\n // Used to group navigations together, hide from devtools\r\n Object.defineProperty(to.meta, '__navigationId', {\r\n value: navigationId++,\r\n });\r\n api.addTimelineEvent({\r\n layerId: navigationsLayerId,\r\n event: {\r\n time: api.now(),\r\n title: 'Start of navigation',\r\n subtitle: to.fullPath,\r\n data,\r\n groupId: to.meta.__navigationId,\r\n },\r\n });\r\n });\r\n router.afterEach((to, from, failure) => {\r\n const data = {\r\n guard: formatDisplay('afterEach'),\r\n };\r\n if (failure) {\r\n data.failure = {\r\n _custom: {\r\n type: Error,\r\n readOnly: true,\r\n display: failure ? failure.message : '',\r\n tooltip: 'Navigation Failure',\r\n value: failure,\r\n },\r\n };\r\n data.status = formatDisplay('❌');\r\n }\r\n else {\r\n data.status = formatDisplay('✅');\r\n }\r\n // we set here to have the right order\r\n data.from = formatRouteLocation(from, 'Current Location during this navigation');\r\n data.to = formatRouteLocation(to, 'Target location');\r\n api.addTimelineEvent({\r\n layerId: navigationsLayerId,\r\n event: {\r\n title: 'End of navigation',\r\n subtitle: to.fullPath,\r\n time: api.now(),\r\n data,\r\n logType: failure ? 'warning' : 'default',\r\n groupId: to.meta.__navigationId,\r\n },\r\n });\r\n });\r\n /**\r\n * Inspector of Existing routes\r\n */\r\n const routerInspectorId = 'router-inspector:' + id;\r\n api.addInspector({\r\n id: routerInspectorId,\r\n label: 'Routes' + (id ? ' ' + id : ''),\r\n icon: 'book',\r\n treeFilterPlaceholder: 'Search routes',\r\n });\r\n function refreshRoutesView() {\r\n // the routes view isn't active\r\n if (!activeRoutesPayload)\r\n return;\r\n const payload = activeRoutesPayload;\r\n // children routes will appear as nested\r\n let routes = matcher.getRoutes().filter(route => !route.parent);\r\n // reset match state to false\r\n routes.forEach(resetMatchStateOnRouteRecord);\r\n // apply a match state if there is a payload\r\n if (payload.filter) {\r\n routes = routes.filter(route => \r\n // save matches state based on the payload\r\n isRouteMatching(route, payload.filter.toLowerCase()));\r\n }\r\n // mark active routes\r\n routes.forEach(route => markRouteRecordActive(route, router.currentRoute.value));\r\n payload.rootNodes = routes.map(formatRouteRecordForInspector);\r\n }\r\n let activeRoutesPayload;\r\n api.on.getInspectorTree(payload => {\r\n activeRoutesPayload = payload;\r\n if (payload.app === app && payload.inspectorId === routerInspectorId) {\r\n refreshRoutesView();\r\n }\r\n });\r\n /**\r\n * Display information about the currently selected route record\r\n */\r\n api.on.getInspectorState(payload => {\r\n if (payload.app === app && payload.inspectorId === routerInspectorId) {\r\n const routes = matcher.getRoutes();\r\n const route = routes.find(route => route.record.__vd_id === payload.nodeId);\r\n if (route) {\r\n payload.state = {\r\n options: formatRouteRecordMatcherForStateInspector(route),\r\n };\r\n }\r\n }\r\n });\r\n api.sendInspectorTree(routerInspectorId);\r\n api.sendInspectorState(routerInspectorId);\r\n });\r\n}\r\nfunction modifierForKey(key) {\r\n if (key.optional) {\r\n return key.repeatable ? '*' : '?';\r\n }\r\n else {\r\n return key.repeatable ? '+' : '';\r\n }\r\n}\r\nfunction formatRouteRecordMatcherForStateInspector(route) {\r\n const { record } = route;\r\n const fields = [\r\n { editable: false, key: 'path', value: record.path },\r\n ];\r\n if (record.name != null) {\r\n fields.push({\r\n editable: false,\r\n key: 'name',\r\n value: record.name,\r\n });\r\n }\r\n fields.push({ editable: false, key: 'regexp', value: route.re });\r\n if (route.keys.length) {\r\n fields.push({\r\n editable: false,\r\n key: 'keys',\r\n value: {\r\n _custom: {\r\n type: null,\r\n readOnly: true,\r\n display: route.keys\r\n .map(key => `${key.name}${modifierForKey(key)}`)\r\n .join(' '),\r\n tooltip: 'Param keys',\r\n value: route.keys,\r\n },\r\n },\r\n });\r\n }\r\n if (record.redirect != null) {\r\n fields.push({\r\n editable: false,\r\n key: 'redirect',\r\n value: record.redirect,\r\n });\r\n }\r\n if (route.alias.length) {\r\n fields.push({\r\n editable: false,\r\n key: 'aliases',\r\n value: route.alias.map(alias => alias.record.path),\r\n });\r\n }\r\n fields.push({\r\n key: 'score',\r\n editable: false,\r\n value: {\r\n _custom: {\r\n type: null,\r\n readOnly: true,\r\n display: route.score.map(score => score.join(', ')).join(' | '),\r\n tooltip: 'Score used to sort routes',\r\n value: route.score,\r\n },\r\n },\r\n });\r\n return fields;\r\n}\r\n/**\r\n * Extracted from tailwind palette\r\n */\r\nconst PINK_500 = 0xec4899;\r\nconst BLUE_600 = 0x2563eb;\r\nconst LIME_500 = 0x84cc16;\r\nconst CYAN_400 = 0x22d3ee;\r\nconst ORANGE_400 = 0xfb923c;\r\n// const GRAY_100 = 0xf4f4f5\r\nconst DARK = 0x666666;\r\nfunction formatRouteRecordForInspector(route) {\r\n const tags = [];\r\n const { record } = route;\r\n if (record.name != null) {\r\n tags.push({\r\n label: String(record.name),\r\n textColor: 0,\r\n backgroundColor: CYAN_400,\r\n });\r\n }\r\n if (record.aliasOf) {\r\n tags.push({\r\n label: 'alias',\r\n textColor: 0,\r\n backgroundColor: ORANGE_400,\r\n });\r\n }\r\n if (route.__vd_match) {\r\n tags.push({\r\n label: 'matches',\r\n textColor: 0,\r\n backgroundColor: PINK_500,\r\n });\r\n }\r\n if (route.__vd_exactActive) {\r\n tags.push({\r\n label: 'exact',\r\n textColor: 0,\r\n backgroundColor: LIME_500,\r\n });\r\n }\r\n if (route.__vd_active) {\r\n tags.push({\r\n label: 'active',\r\n textColor: 0,\r\n backgroundColor: BLUE_600,\r\n });\r\n }\r\n if (record.redirect) {\r\n tags.push({\r\n label: 'redirect: ' +\r\n (typeof record.redirect === 'string' ? record.redirect : 'Object'),\r\n textColor: 0xffffff,\r\n backgroundColor: DARK,\r\n });\r\n }\r\n // add an id to be able to select it. Using the `path` is not possible because\r\n // empty path children would collide with their parents\r\n let id = record.__vd_id;\r\n if (id == null) {\r\n id = String(routeRecordId++);\r\n record.__vd_id = id;\r\n }\r\n return {\r\n id,\r\n label: record.path,\r\n tags,\r\n children: route.children.map(formatRouteRecordForInspector),\r\n };\r\n}\r\n// incremental id for route records and inspector state\r\nlet routeRecordId = 0;\r\nconst EXTRACT_REGEXP_RE = /^\\/(.*)\\/([a-z]*)$/;\r\nfunction markRouteRecordActive(route, currentRoute) {\r\n // no route will be active if matched is empty\r\n // reset the matching state\r\n const isExactActive = currentRoute.matched.length &&\r\n isSameRouteRecord(currentRoute.matched[currentRoute.matched.length - 1], route.record);\r\n route.__vd_exactActive = route.__vd_active = isExactActive;\r\n if (!isExactActive) {\r\n route.__vd_active = currentRoute.matched.some(match => isSameRouteRecord(match, route.record));\r\n }\r\n route.children.forEach(childRoute => markRouteRecordActive(childRoute, currentRoute));\r\n}\r\nfunction resetMatchStateOnRouteRecord(route) {\r\n route.__vd_match = false;\r\n route.children.forEach(resetMatchStateOnRouteRecord);\r\n}\r\nfunction isRouteMatching(route, filter) {\r\n const found = String(route.re).match(EXTRACT_REGEXP_RE);\r\n route.__vd_match = false;\r\n if (!found || found.length < 3) {\r\n return false;\r\n }\r\n // use a regexp without $ at the end to match nested routes better\r\n const nonEndingRE = new RegExp(found[1].replace(/\\$$/, ''), found[2]);\r\n if (nonEndingRE.test(filter)) {\r\n // mark children as matches\r\n route.children.forEach(child => isRouteMatching(child, filter));\r\n // exception case: `/`\r\n if (route.record.path !== '/' || filter === '/') {\r\n route.__vd_match = route.re.test(filter);\r\n return true;\r\n }\r\n // hide the / route\r\n return false;\r\n }\r\n const path = route.record.path.toLowerCase();\r\n const decodedPath = decode(path);\r\n // also allow partial matching on the path\r\n if (!filter.startsWith('/') &&\r\n (decodedPath.includes(filter) || path.includes(filter)))\r\n return true;\r\n if (decodedPath.startsWith(filter) || path.startsWith(filter))\r\n return true;\r\n if (route.record.name && String(route.record.name).includes(filter))\r\n return true;\r\n return route.children.some(child => isRouteMatching(child, filter));\r\n}\r\nfunction omit(obj, keys) {\r\n const ret = {};\r\n for (const key in obj) {\r\n if (!keys.includes(key)) {\r\n // @ts-expect-error\r\n ret[key] = obj[key];\r\n }\r\n }\r\n return ret;\r\n}\n\n/**\r\n * Creates a Router instance that can be used by a Vue app.\r\n *\r\n * @param options - {@link RouterOptions}\r\n */\r\nfunction createRouter(options) {\r\n const matcher = createRouterMatcher(options.routes, options);\r\n const parseQuery$1 = options.parseQuery || parseQuery;\r\n const stringifyQuery$1 = options.stringifyQuery || stringifyQuery;\r\n const routerHistory = options.history;\r\n if ((process.env.NODE_ENV !== 'production') && !routerHistory)\r\n throw new Error('Provide the \"history\" option when calling \"createRouter()\":' +\r\n ' https://next.router.vuejs.org/api/#history.');\r\n const beforeGuards = useCallbacks();\r\n const beforeResolveGuards = useCallbacks();\r\n const afterGuards = useCallbacks();\r\n const currentRoute = shallowRef(START_LOCATION_NORMALIZED);\r\n let pendingLocation = START_LOCATION_NORMALIZED;\r\n // leave the scrollRestoration if no scrollBehavior is provided\r\n if (isBrowser && options.scrollBehavior && 'scrollRestoration' in history) {\r\n history.scrollRestoration = 'manual';\r\n }\r\n const normalizeParams = applyToParams.bind(null, paramValue => '' + paramValue);\r\n const encodeParams = applyToParams.bind(null, encodeParam);\r\n const decodeParams = \r\n // @ts-expect-error: intentionally avoid the type check\r\n applyToParams.bind(null, decode);\r\n function addRoute(parentOrRoute, route) {\r\n let parent;\r\n let record;\r\n if (isRouteName(parentOrRoute)) {\r\n parent = matcher.getRecordMatcher(parentOrRoute);\r\n record = route;\r\n }\r\n else {\r\n record = parentOrRoute;\r\n }\r\n return matcher.addRoute(record, parent);\r\n }\r\n function removeRoute(name) {\r\n const recordMatcher = matcher.getRecordMatcher(name);\r\n if (recordMatcher) {\r\n matcher.removeRoute(recordMatcher);\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`Cannot remove non-existent route \"${String(name)}\"`);\r\n }\r\n }\r\n function getRoutes() {\r\n return matcher.getRoutes().map(routeMatcher => routeMatcher.record);\r\n }\r\n function hasRoute(name) {\r\n return !!matcher.getRecordMatcher(name);\r\n }\r\n function resolve(rawLocation, currentLocation) {\r\n // const objectLocation = routerLocationAsObject(rawLocation)\r\n // we create a copy to modify it later\r\n currentLocation = assign({}, currentLocation || currentRoute.value);\r\n if (typeof rawLocation === 'string') {\r\n const locationNormalized = parseURL(parseQuery$1, rawLocation, currentLocation.path);\r\n const matchedRoute = matcher.resolve({ path: locationNormalized.path }, currentLocation);\r\n const href = routerHistory.createHref(locationNormalized.fullPath);\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n if (href.startsWith('//'))\r\n warn(`Location \"${rawLocation}\" resolved to \"${href}\". A resolved location cannot start with multiple slashes.`);\r\n else if (!matchedRoute.matched.length) {\r\n warn(`No match found for location with path \"${rawLocation}\"`);\r\n }\r\n }\r\n // locationNormalized is always a new object\r\n return assign(locationNormalized, matchedRoute, {\r\n params: decodeParams(matchedRoute.params),\r\n hash: decode(locationNormalized.hash),\r\n redirectedFrom: undefined,\r\n href,\r\n });\r\n }\r\n let matcherLocation;\r\n // path could be relative in object as well\r\n if ('path' in rawLocation) {\r\n if ((process.env.NODE_ENV !== 'production') &&\r\n 'params' in rawLocation &&\r\n !('name' in rawLocation) &&\r\n // @ts-expect-error: the type is never\r\n Object.keys(rawLocation.params).length) {\r\n warn(`Path \"${\r\n // @ts-expect-error: the type is never\r\n rawLocation.path}\" was passed with params but they will be ignored. Use a named route alongside params instead.`);\r\n }\r\n matcherLocation = assign({}, rawLocation, {\r\n path: parseURL(parseQuery$1, rawLocation.path, currentLocation.path).path,\r\n });\r\n }\r\n else {\r\n // remove any nullish param\r\n const targetParams = assign({}, rawLocation.params);\r\n for (const key in targetParams) {\r\n if (targetParams[key] == null) {\r\n delete targetParams[key];\r\n }\r\n }\r\n // pass encoded values to the matcher so it can produce encoded path and fullPath\r\n matcherLocation = assign({}, rawLocation, {\r\n params: encodeParams(rawLocation.params),\r\n });\r\n // current location params are decoded, we need to encode them in case the\r\n // matcher merges the params\r\n currentLocation.params = encodeParams(currentLocation.params);\r\n }\r\n const matchedRoute = matcher.resolve(matcherLocation, currentLocation);\r\n const hash = rawLocation.hash || '';\r\n if ((process.env.NODE_ENV !== 'production') && hash && !hash.startsWith('#')) {\r\n warn(`A \\`hash\\` should always start with the character \"#\". Replace \"${hash}\" with \"#${hash}\".`);\r\n }\r\n // decoding them) the matcher might have merged current location params so\r\n // we need to run the decoding again\r\n matchedRoute.params = normalizeParams(decodeParams(matchedRoute.params));\r\n const fullPath = stringifyURL(stringifyQuery$1, assign({}, rawLocation, {\r\n hash: encodeHash(hash),\r\n path: matchedRoute.path,\r\n }));\r\n const href = routerHistory.createHref(fullPath);\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n if (href.startsWith('//')) {\r\n warn(`Location \"${rawLocation}\" resolved to \"${href}\". A resolved location cannot start with multiple slashes.`);\r\n }\r\n else if (!matchedRoute.matched.length) {\r\n warn(`No match found for location with path \"${'path' in rawLocation ? rawLocation.path : rawLocation}\"`);\r\n }\r\n }\r\n return assign({\r\n fullPath,\r\n // keep the hash encoded so fullPath is effectively path + encodedQuery +\r\n // hash\r\n hash,\r\n query: \r\n // if the user is using a custom query lib like qs, we might have\r\n // nested objects, so we keep the query as is, meaning it can contain\r\n // numbers at `$route.query`, but at the point, the user will have to\r\n // use their own type anyway.\r\n // https://github.com/vuejs/router/issues/328#issuecomment-649481567\r\n stringifyQuery$1 === stringifyQuery\r\n ? normalizeQuery(rawLocation.query)\r\n : (rawLocation.query || {}),\r\n }, matchedRoute, {\r\n redirectedFrom: undefined,\r\n href,\r\n });\r\n }\r\n function locationAsObject(to) {\r\n return typeof to === 'string'\r\n ? parseURL(parseQuery$1, to, currentRoute.value.path)\r\n : assign({}, to);\r\n }\r\n function checkCanceledNavigation(to, from) {\r\n if (pendingLocation !== to) {\r\n return createRouterError(8 /* NAVIGATION_CANCELLED */, {\r\n from,\r\n to,\r\n });\r\n }\r\n }\r\n function push(to) {\r\n return pushWithRedirect(to);\r\n }\r\n function replace(to) {\r\n return push(assign(locationAsObject(to), { replace: true }));\r\n }\r\n function handleRedirectRecord(to) {\r\n const lastMatched = to.matched[to.matched.length - 1];\r\n if (lastMatched && lastMatched.redirect) {\r\n const { redirect } = lastMatched;\r\n let newTargetLocation = typeof redirect === 'function' ? redirect(to) : redirect;\r\n if (typeof newTargetLocation === 'string') {\r\n newTargetLocation =\r\n newTargetLocation.includes('?') || newTargetLocation.includes('#')\r\n ? (newTargetLocation = locationAsObject(newTargetLocation))\r\n : // force empty params\r\n { path: newTargetLocation };\r\n // @ts-expect-error: force empty params when a string is passed to let\r\n // the router parse them again\r\n newTargetLocation.params = {};\r\n }\r\n if ((process.env.NODE_ENV !== 'production') &&\r\n !('path' in newTargetLocation) &&\r\n !('name' in newTargetLocation)) {\r\n warn(`Invalid redirect found:\\n${JSON.stringify(newTargetLocation, null, 2)}\\n when navigating to \"${to.fullPath}\". A redirect must contain a name or path. This will break in production.`);\r\n throw new Error('Invalid redirect');\r\n }\r\n return assign({\r\n query: to.query,\r\n hash: to.hash,\r\n params: to.params,\r\n }, newTargetLocation);\r\n }\r\n }\r\n function pushWithRedirect(to, redirectedFrom) {\r\n const targetLocation = (pendingLocation = resolve(to));\r\n const from = currentRoute.value;\r\n const data = to.state;\r\n const force = to.force;\r\n // to could be a string where `replace` is a function\r\n const replace = to.replace === true;\r\n const shouldRedirect = handleRedirectRecord(targetLocation);\r\n if (shouldRedirect)\r\n return pushWithRedirect(assign(locationAsObject(shouldRedirect), {\r\n state: data,\r\n force,\r\n replace,\r\n }), \r\n // keep original redirectedFrom if it exists\r\n redirectedFrom || targetLocation);\r\n // if it was a redirect we already called `pushWithRedirect` above\r\n const toLocation = targetLocation;\r\n toLocation.redirectedFrom = redirectedFrom;\r\n let failure;\r\n if (!force && isSameRouteLocation(stringifyQuery$1, from, targetLocation)) {\r\n failure = createRouterError(16 /* NAVIGATION_DUPLICATED */, { to: toLocation, from });\r\n // trigger scroll to allow scrolling to the same anchor\r\n handleScroll(from, from, \r\n // this is a push, the only way for it to be triggered from a\r\n // history.listen is with a redirect, which makes it become a push\r\n true, \r\n // This cannot be the first navigation because the initial location\r\n // cannot be manually navigated to\r\n false);\r\n }\r\n return (failure ? Promise.resolve(failure) : navigate(toLocation, from))\r\n .catch((error) => isNavigationFailure(error)\r\n ? // navigation redirects still mark the router as ready\r\n isNavigationFailure(error, 2 /* NAVIGATION_GUARD_REDIRECT */)\r\n ? error\r\n : markAsReady(error) // also returns the error\r\n : // reject any unknown error\r\n triggerError(error, toLocation, from))\r\n .then((failure) => {\r\n if (failure) {\r\n if (isNavigationFailure(failure, 2 /* NAVIGATION_GUARD_REDIRECT */)) {\r\n if ((process.env.NODE_ENV !== 'production') &&\r\n // we are redirecting to the same location we were already at\r\n isSameRouteLocation(stringifyQuery$1, resolve(failure.to), toLocation) &&\r\n // and we have done it a couple of times\r\n redirectedFrom &&\r\n // @ts-expect-error: added only in dev\r\n (redirectedFrom._count = redirectedFrom._count\r\n ? // @ts-expect-error\r\n redirectedFrom._count + 1\r\n : 1) > 10) {\r\n warn(`Detected an infinite redirection in a navigation guard when going from \"${from.fullPath}\" to \"${toLocation.fullPath}\". Aborting to avoid a Stack Overflow. This will break in production if not fixed.`);\r\n return Promise.reject(new Error('Infinite redirect in navigation guard'));\r\n }\r\n return pushWithRedirect(\r\n // keep options\r\n assign(locationAsObject(failure.to), {\r\n state: data,\r\n force,\r\n replace,\r\n }), \r\n // preserve the original redirectedFrom if any\r\n redirectedFrom || toLocation);\r\n }\r\n }\r\n else {\r\n // if we fail we don't finalize the navigation\r\n failure = finalizeNavigation(toLocation, from, true, replace, data);\r\n }\r\n triggerAfterEach(toLocation, from, failure);\r\n return failure;\r\n });\r\n }\r\n /**\r\n * Helper to reject and skip all navigation guards if a new navigation happened\r\n * @param to\r\n * @param from\r\n */\r\n function checkCanceledNavigationAndReject(to, from) {\r\n const error = checkCanceledNavigation(to, from);\r\n return error ? Promise.reject(error) : Promise.resolve();\r\n }\r\n // TODO: refactor the whole before guards by internally using router.beforeEach\r\n function navigate(to, from) {\r\n let guards;\r\n const [leavingRecords, updatingRecords, enteringRecords] = extractChangingRecords(to, from);\r\n // all components here have been resolved once because we are leaving\r\n guards = extractComponentsGuards(leavingRecords.reverse(), 'beforeRouteLeave', to, from);\r\n // leavingRecords is already reversed\r\n for (const record of leavingRecords) {\r\n record.leaveGuards.forEach(guard => {\r\n guards.push(guardToPromiseFn(guard, to, from));\r\n });\r\n }\r\n const canceledNavigationCheck = checkCanceledNavigationAndReject.bind(null, to, from);\r\n guards.push(canceledNavigationCheck);\r\n // run the queue of per route beforeRouteLeave guards\r\n return (runGuardQueue(guards)\r\n .then(() => {\r\n // check global guards beforeEach\r\n guards = [];\r\n for (const guard of beforeGuards.list()) {\r\n guards.push(guardToPromiseFn(guard, to, from));\r\n }\r\n guards.push(canceledNavigationCheck);\r\n return runGuardQueue(guards);\r\n })\r\n .then(() => {\r\n // check in components beforeRouteUpdate\r\n guards = extractComponentsGuards(updatingRecords, 'beforeRouteUpdate', to, from);\r\n for (const record of updatingRecords) {\r\n record.updateGuards.forEach(guard => {\r\n guards.push(guardToPromiseFn(guard, to, from));\r\n });\r\n }\r\n guards.push(canceledNavigationCheck);\r\n // run the queue of per route beforeEnter guards\r\n return runGuardQueue(guards);\r\n })\r\n .then(() => {\r\n // check the route beforeEnter\r\n guards = [];\r\n for (const record of to.matched) {\r\n // do not trigger beforeEnter on reused views\r\n if (record.beforeEnter && !from.matched.includes(record)) {\r\n if (Array.isArray(record.beforeEnter)) {\r\n for (const beforeEnter of record.beforeEnter)\r\n guards.push(guardToPromiseFn(beforeEnter, to, from));\r\n }\r\n else {\r\n guards.push(guardToPromiseFn(record.beforeEnter, to, from));\r\n }\r\n }\r\n }\r\n guards.push(canceledNavigationCheck);\r\n // run the queue of per route beforeEnter guards\r\n return runGuardQueue(guards);\r\n })\r\n .then(() => {\r\n // NOTE: at this point to.matched is normalized and does not contain any () => Promise<Component>\r\n // clear existing enterCallbacks, these are added by extractComponentsGuards\r\n to.matched.forEach(record => (record.enterCallbacks = {}));\r\n // check in-component beforeRouteEnter\r\n guards = extractComponentsGuards(enteringRecords, 'beforeRouteEnter', to, from);\r\n guards.push(canceledNavigationCheck);\r\n // run the queue of per route beforeEnter guards\r\n return runGuardQueue(guards);\r\n })\r\n .then(() => {\r\n // check global guards beforeResolve\r\n guards = [];\r\n for (const guard of beforeResolveGuards.list()) {\r\n guards.push(guardToPromiseFn(guard, to, from));\r\n }\r\n guards.push(canceledNavigationCheck);\r\n return runGuardQueue(guards);\r\n })\r\n // catch any navigation canceled\r\n .catch(err => isNavigationFailure(err, 8 /* NAVIGATION_CANCELLED */)\r\n ? err\r\n : Promise.reject(err)));\r\n }\r\n function triggerAfterEach(to, from, failure) {\r\n // navigation is confirmed, call afterGuards\r\n // TODO: wrap with error handlers\r\n for (const guard of afterGuards.list())\r\n guard(to, from, failure);\r\n }\r\n /**\r\n * - Cleans up any navigation guards\r\n * - Changes the url if necessary\r\n * - Calls the scrollBehavior\r\n */\r\n function finalizeNavigation(toLocation, from, isPush, replace, data) {\r\n // a more recent navigation took place\r\n const error = checkCanceledNavigation(toLocation, from);\r\n if (error)\r\n return error;\r\n // only consider as push if it's not the first navigation\r\n const isFirstNavigation = from === START_LOCATION_NORMALIZED;\r\n const state = !isBrowser ? {} : history.state;\r\n // change URL only if the user did a push/replace and if it's not the initial navigation because\r\n // it's just reflecting the url\r\n if (isPush) {\r\n // on the initial navigation, we want to reuse the scroll position from\r\n // history state if it exists\r\n if (replace || isFirstNavigation)\r\n routerHistory.replace(toLocation.fullPath, assign({\r\n scroll: isFirstNavigation && state && state.scroll,\r\n }, data));\r\n else\r\n routerHistory.push(toLocation.fullPath, data);\r\n }\r\n // accept current navigation\r\n currentRoute.value = toLocation;\r\n handleScroll(toLocation, from, isPush, isFirstNavigation);\r\n markAsReady();\r\n }\r\n let removeHistoryListener;\r\n // attach listener to history to trigger navigations\r\n function setupListeners() {\r\n // avoid setting up listeners twice due to an invalid first navigation\r\n if (removeHistoryListener)\r\n return;\r\n removeHistoryListener = routerHistory.listen((to, _from, info) => {\r\n // cannot be a redirect route because it was in history\r\n const toLocation = resolve(to);\r\n // due to dynamic routing, and to hash history with manual navigation\r\n // (manually changing the url or calling history.hash = '#/somewhere'),\r\n // there could be a redirect record in history\r\n const shouldRedirect = handleRedirectRecord(toLocation);\r\n if (shouldRedirect) {\r\n pushWithRedirect(assign(shouldRedirect, { replace: true }), toLocation).catch(noop);\r\n return;\r\n }\r\n pendingLocation = toLocation;\r\n const from = currentRoute.value;\r\n // TODO: should be moved to web history?\r\n if (isBrowser) {\r\n saveScrollPosition(getScrollKey(from.fullPath, info.delta), computeScrollPosition());\r\n }\r\n navigate(toLocation, from)\r\n .catch((error) => {\r\n if (isNavigationFailure(error, 4 /* NAVIGATION_ABORTED */ | 8 /* NAVIGATION_CANCELLED */)) {\r\n return error;\r\n }\r\n if (isNavigationFailure(error, 2 /* NAVIGATION_GUARD_REDIRECT */)) {\r\n // Here we could call if (info.delta) routerHistory.go(-info.delta,\r\n // false) but this is bug prone as we have no way to wait the\r\n // navigation to be finished before calling pushWithRedirect. Using\r\n // a setTimeout of 16ms seems to work but there is not guarantee for\r\n // it to work on every browser. So Instead we do not restore the\r\n // history entry and trigger a new navigation as requested by the\r\n // navigation guard.\r\n // the error is already handled by router.push we just want to avoid\r\n // logging the error\r\n pushWithRedirect(error.to, toLocation\r\n // avoid an uncaught rejection, let push call triggerError\r\n )\r\n .then(failure => {\r\n // manual change in hash history #916 ending up in the URL not\r\n // changing but it was changed by the manual url change, so we\r\n // need to manually change it ourselves\r\n if (isNavigationFailure(failure, 4 /* NAVIGATION_ABORTED */ |\r\n 16 /* NAVIGATION_DUPLICATED */) &&\r\n !info.delta &&\r\n info.type === NavigationType.pop) {\r\n routerHistory.go(-1, false);\r\n }\r\n })\r\n .catch(noop);\r\n // avoid the then branch\r\n return Promise.reject();\r\n }\r\n // do not restore history on unknown direction\r\n if (info.delta)\r\n routerHistory.go(-info.delta, false);\r\n // unrecognized error, transfer to the global handler\r\n return triggerError(error, toLocation, from);\r\n })\r\n .then((failure) => {\r\n failure =\r\n failure ||\r\n finalizeNavigation(\r\n // after navigation, all matched components are resolved\r\n toLocation, from, false);\r\n // revert the navigation\r\n if (failure) {\r\n if (info.delta) {\r\n routerHistory.go(-info.delta, false);\r\n }\r\n else if (info.type === NavigationType.pop &&\r\n isNavigationFailure(failure, 4 /* NAVIGATION_ABORTED */ | 16 /* NAVIGATION_DUPLICATED */)) {\r\n // manual change in hash history #916\r\n // it's like a push but lacks the information of the direction\r\n routerHistory.go(-1, false);\r\n }\r\n }\r\n triggerAfterEach(toLocation, from, failure);\r\n })\r\n .catch(noop);\r\n });\r\n }\r\n // Initialization and Errors\r\n let readyHandlers = useCallbacks();\r\n let errorHandlers = useCallbacks();\r\n let ready;\r\n /**\r\n * Trigger errorHandlers added via onError and throws the error as well\r\n *\r\n * @param error - error to throw\r\n * @param to - location we were navigating to when the error happened\r\n * @param from - location we were navigating from when the error happened\r\n * @returns the error as a rejected promise\r\n */\r\n function triggerError(error, to, from) {\r\n markAsReady(error);\r\n const list = errorHandlers.list();\r\n if (list.length) {\r\n list.forEach(handler => handler(error, to, from));\r\n }\r\n else {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n warn('uncaught error during route navigation:');\r\n }\r\n console.error(error);\r\n }\r\n return Promise.reject(error);\r\n }\r\n function isReady() {\r\n if (ready && currentRoute.value !== START_LOCATION_NORMALIZED)\r\n return Promise.resolve();\r\n return new Promise((resolve, reject) => {\r\n readyHandlers.add([resolve, reject]);\r\n });\r\n }\r\n function markAsReady(err) {\r\n if (!ready) {\r\n // still not ready if an error happened\r\n ready = !err;\r\n setupListeners();\r\n readyHandlers\r\n .list()\r\n .forEach(([resolve, reject]) => (err ? reject(err) : resolve()));\r\n readyHandlers.reset();\r\n }\r\n return err;\r\n }\r\n // Scroll behavior\r\n function handleScroll(to, from, isPush, isFirstNavigation) {\r\n const { scrollBehavior } = options;\r\n if (!isBrowser || !scrollBehavior)\r\n return Promise.resolve();\r\n const scrollPosition = (!isPush && getSavedScrollPosition(getScrollKey(to.fullPath, 0))) ||\r\n ((isFirstNavigation || !isPush) &&\r\n history.state &&\r\n history.state.scroll) ||\r\n null;\r\n return nextTick()\r\n .then(() => scrollBehavior(to, from, scrollPosition))\r\n .then(position => position && scrollToPosition(position))\r\n .catch(err => triggerError(err, to, from));\r\n }\r\n const go = (delta) => routerHistory.go(delta);\r\n let started;\r\n const installedApps = new Set();\r\n const router = {\r\n currentRoute,\r\n addRoute,\r\n removeRoute,\r\n hasRoute,\r\n getRoutes,\r\n resolve,\r\n options,\r\n push,\r\n replace,\r\n go,\r\n back: () => go(-1),\r\n forward: () => go(1),\r\n beforeEach: beforeGuards.add,\r\n beforeResolve: beforeResolveGuards.add,\r\n afterEach: afterGuards.add,\r\n onError: errorHandlers.add,\r\n isReady,\r\n install(app) {\r\n const router = this;\r\n app.component('RouterLink', RouterLink);\r\n app.component('RouterView', RouterView);\r\n app.config.globalProperties.$router = router;\r\n Object.defineProperty(app.config.globalProperties, '$route', {\r\n enumerable: true,\r\n get: () => unref(currentRoute),\r\n });\r\n // this initial navigation is only necessary on client, on server it doesn't\r\n // make sense because it will create an extra unnecessary navigation and could\r\n // lead to problems\r\n if (isBrowser &&\r\n // used for the initial navigation client side to avoid pushing\r\n // multiple times when the router is used in multiple apps\r\n !started &&\r\n currentRoute.value === START_LOCATION_NORMALIZED) {\r\n // see above\r\n started = true;\r\n push(routerHistory.location).catch(err => {\r\n if ((process.env.NODE_ENV !== 'production'))\r\n warn('Unexpected error when starting the router:', err);\r\n });\r\n }\r\n const reactiveRoute = {};\r\n for (const key in START_LOCATION_NORMALIZED) {\r\n // @ts-expect-error: the key matches\r\n reactiveRoute[key] = computed(() => currentRoute.value[key]);\r\n }\r\n app.provide(routerKey, router);\r\n app.provide(routeLocationKey, reactive(reactiveRoute));\r\n app.provide(routerViewLocationKey, currentRoute);\r\n const unmountApp = app.unmount;\r\n installedApps.add(app);\r\n app.unmount = function () {\r\n installedApps.delete(app);\r\n // the router is not attached to an app anymore\r\n if (installedApps.size < 1) {\r\n // invalidate the current navigation\r\n pendingLocation = START_LOCATION_NORMALIZED;\r\n removeHistoryListener && removeHistoryListener();\r\n removeHistoryListener = null;\r\n currentRoute.value = START_LOCATION_NORMALIZED;\r\n started = false;\r\n ready = false;\r\n }\r\n unmountApp();\r\n };\r\n if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) && isBrowser) {\r\n addDevtools(app, router, matcher);\r\n }\r\n },\r\n };\r\n return router;\r\n}\r\nfunction runGuardQueue(guards) {\r\n return guards.reduce((promise, guard) => promise.then(() => guard()), Promise.resolve());\r\n}\r\nfunction extractChangingRecords(to, from) {\r\n const leavingRecords = [];\r\n const updatingRecords = [];\r\n const enteringRecords = [];\r\n const len = Math.max(from.matched.length, to.matched.length);\r\n for (let i = 0; i < len; i++) {\r\n const recordFrom = from.matched[i];\r\n if (recordFrom) {\r\n if (to.matched.find(record => isSameRouteRecord(record, recordFrom)))\r\n updatingRecords.push(recordFrom);\r\n else\r\n leavingRecords.push(recordFrom);\r\n }\r\n const recordTo = to.matched[i];\r\n if (recordTo) {\r\n // the type doesn't matter because we are comparing per reference\r\n if (!from.matched.find(record => isSameRouteRecord(record, recordTo))) {\r\n enteringRecords.push(recordTo);\r\n }\r\n }\r\n }\r\n return [leavingRecords, updatingRecords, enteringRecords];\r\n}\n\n/**\r\n * Returns the router instance. Equivalent to using `$router` inside\r\n * templates.\r\n */\r\nfunction useRouter() {\r\n return inject(routerKey);\r\n}\r\n/**\r\n * Returns the current route location. Equivalent to using `$route` inside\r\n * templates.\r\n */\r\nfunction useRoute() {\r\n return inject(routeLocationKey);\r\n}\n\nexport { NavigationFailureType, RouterLink, RouterView, START_LOCATION_NORMALIZED as START_LOCATION, createMemoryHistory, createRouter, createRouterMatcher, createWebHashHistory, createWebHistory, isNavigationFailure, matchedRouteKey, onBeforeRouteLeave, onBeforeRouteUpdate, parseQuery, routeLocationKey, routerKey, routerViewLocationKey, stringifyQuery, useLink, useRoute, useRouter, viewDepthKey };\n","import { extend, isArray, isMap, isIntegerKey, hasOwn, isSymbol, isObject, hasChanged, makeMap, capitalize, toRawType, def, isFunction, NOOP } from '@vue/shared';\n\nfunction warn(msg, ...args) {\r\n console.warn(`[Vue warn] ${msg}`, ...args);\r\n}\n\nlet activeEffectScope;\r\nclass EffectScope {\r\n constructor(detached = false) {\r\n /**\r\n * @internal\r\n */\r\n this.active = true;\r\n /**\r\n * @internal\r\n */\r\n this.effects = [];\r\n /**\r\n * @internal\r\n */\r\n this.cleanups = [];\r\n if (!detached && activeEffectScope) {\r\n this.parent = activeEffectScope;\r\n this.index =\r\n (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1;\r\n }\r\n }\r\n run(fn) {\r\n if (this.active) {\r\n const currentEffectScope = activeEffectScope;\r\n try {\r\n activeEffectScope = this;\r\n return fn();\r\n }\r\n finally {\r\n activeEffectScope = currentEffectScope;\r\n }\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`cannot run an inactive effect scope.`);\r\n }\r\n }\r\n /**\r\n * This should only be called on non-detached scopes\r\n * @internal\r\n */\r\n on() {\r\n activeEffectScope = this;\r\n }\r\n /**\r\n * This should only be called on non-detached scopes\r\n * @internal\r\n */\r\n off() {\r\n activeEffectScope = this.parent;\r\n }\r\n stop(fromParent) {\r\n if (this.active) {\r\n let i, l;\r\n for (i = 0, l = this.effects.length; i < l; i++) {\r\n this.effects[i].stop();\r\n }\r\n for (i = 0, l = this.cleanups.length; i < l; i++) {\r\n this.cleanups[i]();\r\n }\r\n if (this.scopes) {\r\n for (i = 0, l = this.scopes.length; i < l; i++) {\r\n this.scopes[i].stop(true);\r\n }\r\n }\r\n // nested scope, dereference from parent to avoid memory leaks\r\n if (this.parent && !fromParent) {\r\n // optimized O(1) removal\r\n const last = this.parent.scopes.pop();\r\n if (last && last !== this) {\r\n this.parent.scopes[this.index] = last;\r\n last.index = this.index;\r\n }\r\n }\r\n this.active = false;\r\n }\r\n }\r\n}\r\nfunction effectScope(detached) {\r\n return new EffectScope(detached);\r\n}\r\nfunction recordEffectScope(effect, scope = activeEffectScope) {\r\n if (scope && scope.active) {\r\n scope.effects.push(effect);\r\n }\r\n}\r\nfunction getCurrentScope() {\r\n return activeEffectScope;\r\n}\r\nfunction onScopeDispose(fn) {\r\n if (activeEffectScope) {\r\n activeEffectScope.cleanups.push(fn);\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`onScopeDispose() is called when there is no active effect scope` +\r\n ` to be associated with.`);\r\n }\r\n}\n\nconst createDep = (effects) => {\r\n const dep = new Set(effects);\r\n dep.w = 0;\r\n dep.n = 0;\r\n return dep;\r\n};\r\nconst wasTracked = (dep) => (dep.w & trackOpBit) > 0;\r\nconst newTracked = (dep) => (dep.n & trackOpBit) > 0;\r\nconst initDepMarkers = ({ deps }) => {\r\n if (deps.length) {\r\n for (let i = 0; i < deps.length; i++) {\r\n deps[i].w |= trackOpBit; // set was tracked\r\n }\r\n }\r\n};\r\nconst finalizeDepMarkers = (effect) => {\r\n const { deps } = effect;\r\n if (deps.length) {\r\n let ptr = 0;\r\n for (let i = 0; i < deps.length; i++) {\r\n const dep = deps[i];\r\n if (wasTracked(dep) && !newTracked(dep)) {\r\n dep.delete(effect);\r\n }\r\n else {\r\n deps[ptr++] = dep;\r\n }\r\n // clear bits\r\n dep.w &= ~trackOpBit;\r\n dep.n &= ~trackOpBit;\r\n }\r\n deps.length = ptr;\r\n }\r\n};\n\nconst targetMap = new WeakMap();\r\n// The number of effects currently being tracked recursively.\r\nlet effectTrackDepth = 0;\r\nlet trackOpBit = 1;\r\n/**\r\n * The bitwise track markers support at most 30 levels of recursion.\r\n * This value is chosen to enable modern JS engines to use a SMI on all platforms.\r\n * When recursion depth is greater, fall back to using a full cleanup.\r\n */\r\nconst maxMarkerBits = 30;\r\nlet activeEffect;\r\nconst ITERATE_KEY = Symbol((process.env.NODE_ENV !== 'production') ? 'iterate' : '');\r\nconst MAP_KEY_ITERATE_KEY = Symbol((process.env.NODE_ENV !== 'production') ? 'Map key iterate' : '');\r\nclass ReactiveEffect {\r\n constructor(fn, scheduler = null, scope) {\r\n this.fn = fn;\r\n this.scheduler = scheduler;\r\n this.active = true;\r\n this.deps = [];\r\n this.parent = undefined;\r\n recordEffectScope(this, scope);\r\n }\r\n run() {\r\n if (!this.active) {\r\n return this.fn();\r\n }\r\n let parent = activeEffect;\r\n let lastShouldTrack = shouldTrack;\r\n while (parent) {\r\n if (parent === this) {\r\n return;\r\n }\r\n parent = parent.parent;\r\n }\r\n try {\r\n this.parent = activeEffect;\r\n activeEffect = this;\r\n shouldTrack = true;\r\n trackOpBit = 1 << ++effectTrackDepth;\r\n if (effectTrackDepth <= maxMarkerBits) {\r\n initDepMarkers(this);\r\n }\r\n else {\r\n cleanupEffect(this);\r\n }\r\n return this.fn();\r\n }\r\n finally {\r\n if (effectTrackDepth <= maxMarkerBits) {\r\n finalizeDepMarkers(this);\r\n }\r\n trackOpBit = 1 << --effectTrackDepth;\r\n activeEffect = this.parent;\r\n shouldTrack = lastShouldTrack;\r\n this.parent = undefined;\r\n if (this.deferStop) {\r\n this.stop();\r\n }\r\n }\r\n }\r\n stop() {\r\n // stopped while running itself - defer the cleanup\r\n if (activeEffect === this) {\r\n this.deferStop = true;\r\n }\r\n else if (this.active) {\r\n cleanupEffect(this);\r\n if (this.onStop) {\r\n this.onStop();\r\n }\r\n this.active = false;\r\n }\r\n }\r\n}\r\nfunction cleanupEffect(effect) {\r\n const { deps } = effect;\r\n if (deps.length) {\r\n for (let i = 0; i < deps.length; i++) {\r\n deps[i].delete(effect);\r\n }\r\n deps.length = 0;\r\n }\r\n}\r\nfunction effect(fn, options) {\r\n if (fn.effect) {\r\n fn = fn.effect.fn;\r\n }\r\n const _effect = new ReactiveEffect(fn);\r\n if (options) {\r\n extend(_effect, options);\r\n if (options.scope)\r\n recordEffectScope(_effect, options.scope);\r\n }\r\n if (!options || !options.lazy) {\r\n _effect.run();\r\n }\r\n const runner = _effect.run.bind(_effect);\r\n runner.effect = _effect;\r\n return runner;\r\n}\r\nfunction stop(runner) {\r\n runner.effect.stop();\r\n}\r\nlet shouldTrack = true;\r\nconst trackStack = [];\r\nfunction pauseTracking() {\r\n trackStack.push(shouldTrack);\r\n shouldTrack = false;\r\n}\r\nfunction enableTracking() {\r\n trackStack.push(shouldTrack);\r\n shouldTrack = true;\r\n}\r\nfunction resetTracking() {\r\n const last = trackStack.pop();\r\n shouldTrack = last === undefined ? true : last;\r\n}\r\nfunction track(target, type, key) {\r\n if (shouldTrack && activeEffect) {\r\n let depsMap = targetMap.get(target);\r\n if (!depsMap) {\r\n targetMap.set(target, (depsMap = new Map()));\r\n }\r\n let dep = depsMap.get(key);\r\n if (!dep) {\r\n depsMap.set(key, (dep = createDep()));\r\n }\r\n const eventInfo = (process.env.NODE_ENV !== 'production')\r\n ? { effect: activeEffect, target, type, key }\r\n : undefined;\r\n trackEffects(dep, eventInfo);\r\n }\r\n}\r\nfunction trackEffects(dep, debuggerEventExtraInfo) {\r\n let shouldTrack = false;\r\n if (effectTrackDepth <= maxMarkerBits) {\r\n if (!newTracked(dep)) {\r\n dep.n |= trackOpBit; // set newly tracked\r\n shouldTrack = !wasTracked(dep);\r\n }\r\n }\r\n else {\r\n // Full cleanup mode.\r\n shouldTrack = !dep.has(activeEffect);\r\n }\r\n if (shouldTrack) {\r\n dep.add(activeEffect);\r\n activeEffect.deps.push(dep);\r\n if ((process.env.NODE_ENV !== 'production') && activeEffect.onTrack) {\r\n activeEffect.onTrack(Object.assign({ effect: activeEffect }, debuggerEventExtraInfo));\r\n }\r\n }\r\n}\r\nfunction trigger(target, type, key, newValue, oldValue, oldTarget) {\r\n const depsMap = targetMap.get(target);\r\n if (!depsMap) {\r\n // never been tracked\r\n return;\r\n }\r\n let deps = [];\r\n if (type === \"clear\" /* CLEAR */) {\r\n // collection being cleared\r\n // trigger all effects for target\r\n deps = [...depsMap.values()];\r\n }\r\n else if (key === 'length' && isArray(target)) {\r\n depsMap.forEach((dep, key) => {\r\n if (key === 'length' || key >= newValue) {\r\n deps.push(dep);\r\n }\r\n });\r\n }\r\n else {\r\n // schedule runs for SET | ADD | DELETE\r\n if (key !== void 0) {\r\n deps.push(depsMap.get(key));\r\n }\r\n // also run for iteration key on ADD | DELETE | Map.SET\r\n switch (type) {\r\n case \"add\" /* ADD */:\r\n if (!isArray(target)) {\r\n deps.push(depsMap.get(ITERATE_KEY));\r\n if (isMap(target)) {\r\n deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));\r\n }\r\n }\r\n else if (isIntegerKey(key)) {\r\n // new index added to array -> length changes\r\n deps.push(depsMap.get('length'));\r\n }\r\n break;\r\n case \"delete\" /* DELETE */:\r\n if (!isArray(target)) {\r\n deps.push(depsMap.get(ITERATE_KEY));\r\n if (isMap(target)) {\r\n deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));\r\n }\r\n }\r\n break;\r\n case \"set\" /* SET */:\r\n if (isMap(target)) {\r\n deps.push(depsMap.get(ITERATE_KEY));\r\n }\r\n break;\r\n }\r\n }\r\n const eventInfo = (process.env.NODE_ENV !== 'production')\r\n ? { target, type, key, newValue, oldValue, oldTarget }\r\n : undefined;\r\n if (deps.length === 1) {\r\n if (deps[0]) {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n triggerEffects(deps[0], eventInfo);\r\n }\r\n else {\r\n triggerEffects(deps[0]);\r\n }\r\n }\r\n }\r\n else {\r\n const effects = [];\r\n for (const dep of deps) {\r\n if (dep) {\r\n effects.push(...dep);\r\n }\r\n }\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n triggerEffects(createDep(effects), eventInfo);\r\n }\r\n else {\r\n triggerEffects(createDep(effects));\r\n }\r\n }\r\n}\r\nfunction triggerEffects(dep, debuggerEventExtraInfo) {\r\n // spread into array for stabilization\r\n const effects = isArray(dep) ? dep : [...dep];\r\n for (const effect of effects) {\r\n if (effect.computed) {\r\n triggerEffect(effect, debuggerEventExtraInfo);\r\n }\r\n }\r\n for (const effect of effects) {\r\n if (!effect.computed) {\r\n triggerEffect(effect, debuggerEventExtraInfo);\r\n }\r\n }\r\n}\r\nfunction triggerEffect(effect, debuggerEventExtraInfo) {\r\n if (effect !== activeEffect || effect.allowRecurse) {\r\n if ((process.env.NODE_ENV !== 'production') && effect.onTrigger) {\r\n effect.onTrigger(extend({ effect }, debuggerEventExtraInfo));\r\n }\r\n if (effect.scheduler) {\r\n effect.scheduler();\r\n }\r\n else {\r\n effect.run();\r\n }\r\n }\r\n}\n\nconst isNonTrackableKeys = /*#__PURE__*/ makeMap(`__proto__,__v_isRef,__isVue`);\r\nconst builtInSymbols = new Set(\r\n/*#__PURE__*/\r\nObject.getOwnPropertyNames(Symbol)\r\n // ios10.x Object.getOwnPropertyNames(Symbol) can enumerate 'arguments' and 'caller'\r\n // but accessing them on Symbol leads to TypeError because Symbol is a strict mode\r\n // function\r\n .filter(key => key !== 'arguments' && key !== 'caller')\r\n .map(key => Symbol[key])\r\n .filter(isSymbol));\r\nconst get = /*#__PURE__*/ createGetter();\r\nconst shallowGet = /*#__PURE__*/ createGetter(false, true);\r\nconst readonlyGet = /*#__PURE__*/ createGetter(true);\r\nconst shallowReadonlyGet = /*#__PURE__*/ createGetter(true, true);\r\nconst arrayInstrumentations = /*#__PURE__*/ createArrayInstrumentations();\r\nfunction createArrayInstrumentations() {\r\n const instrumentations = {};\r\n ['includes', 'indexOf', 'lastIndexOf'].forEach(key => {\r\n instrumentations[key] = function (...args) {\r\n const arr = toRaw(this);\r\n for (let i = 0, l = this.length; i < l; i++) {\r\n track(arr, \"get\" /* GET */, i + '');\r\n }\r\n // we run the method using the original args first (which may be reactive)\r\n const res = arr[key](...args);\r\n if (res === -1 || res === false) {\r\n // if that didn't work, run it again using raw values.\r\n return arr[key](...args.map(toRaw));\r\n }\r\n else {\r\n return res;\r\n }\r\n };\r\n });\r\n ['push', 'pop', 'shift', 'unshift', 'splice'].forEach(key => {\r\n instrumentations[key] = function (...args) {\r\n pauseTracking();\r\n const res = toRaw(this)[key].apply(this, args);\r\n resetTracking();\r\n return res;\r\n };\r\n });\r\n return instrumentations;\r\n}\r\nfunction createGetter(isReadonly = false, shallow = false) {\r\n return function get(target, key, receiver) {\r\n if (key === \"__v_isReactive\" /* IS_REACTIVE */) {\r\n return !isReadonly;\r\n }\r\n else if (key === \"__v_isReadonly\" /* IS_READONLY */) {\r\n return isReadonly;\r\n }\r\n else if (key === \"__v_isShallow\" /* IS_SHALLOW */) {\r\n return shallow;\r\n }\r\n else if (key === \"__v_raw\" /* RAW */ &&\r\n receiver ===\r\n (isReadonly\r\n ? shallow\r\n ? shallowReadonlyMap\r\n : readonlyMap\r\n : shallow\r\n ? shallowReactiveMap\r\n : reactiveMap).get(target)) {\r\n return target;\r\n }\r\n const targetIsArray = isArray(target);\r\n if (!isReadonly && targetIsArray && hasOwn(arrayInstrumentations, key)) {\r\n return Reflect.get(arrayInstrumentations, key, receiver);\r\n }\r\n const res = Reflect.get(target, key, receiver);\r\n if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {\r\n return res;\r\n }\r\n if (!isReadonly) {\r\n track(target, \"get\" /* GET */, key);\r\n }\r\n if (shallow) {\r\n return res;\r\n }\r\n if (isRef(res)) {\r\n // ref unwrapping - skip unwrap for Array + integer key.\r\n return targetIsArray && isIntegerKey(key) ? res : res.value;\r\n }\r\n if (isObject(res)) {\r\n // Convert returned value into a proxy as well. we do the isObject check\r\n // here to avoid invalid value warning. Also need to lazy access readonly\r\n // and reactive here to avoid circular dependency.\r\n return isReadonly ? readonly(res) : reactive(res);\r\n }\r\n return res;\r\n };\r\n}\r\nconst set = /*#__PURE__*/ createSetter();\r\nconst shallowSet = /*#__PURE__*/ createSetter(true);\r\nfunction createSetter(shallow = false) {\r\n return function set(target, key, value, receiver) {\r\n let oldValue = target[key];\r\n if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value)) {\r\n return false;\r\n }\r\n if (!shallow && !isReadonly(value)) {\r\n if (!isShallow(value)) {\r\n value = toRaw(value);\r\n oldValue = toRaw(oldValue);\r\n }\r\n if (!isArray(target) && isRef(oldValue) && !isRef(value)) {\r\n oldValue.value = value;\r\n return true;\r\n }\r\n }\r\n const hadKey = isArray(target) && isIntegerKey(key)\r\n ? Number(key) < target.length\r\n : hasOwn(target, key);\r\n const result = Reflect.set(target, key, value, receiver);\r\n // don't trigger if target is something up in the prototype chain of original\r\n if (target === toRaw(receiver)) {\r\n if (!hadKey) {\r\n trigger(target, \"add\" /* ADD */, key, value);\r\n }\r\n else if (hasChanged(value, oldValue)) {\r\n trigger(target, \"set\" /* SET */, key, value, oldValue);\r\n }\r\n }\r\n return result;\r\n };\r\n}\r\nfunction deleteProperty(target, key) {\r\n const hadKey = hasOwn(target, key);\r\n const oldValue = target[key];\r\n const result = Reflect.deleteProperty(target, key);\r\n if (result && hadKey) {\r\n trigger(target, \"delete\" /* DELETE */, key, undefined, oldValue);\r\n }\r\n return result;\r\n}\r\nfunction has(target, key) {\r\n const result = Reflect.has(target, key);\r\n if (!isSymbol(key) || !builtInSymbols.has(key)) {\r\n track(target, \"has\" /* HAS */, key);\r\n }\r\n return result;\r\n}\r\nfunction ownKeys(target) {\r\n track(target, \"iterate\" /* ITERATE */, isArray(target) ? 'length' : ITERATE_KEY);\r\n return Reflect.ownKeys(target);\r\n}\r\nconst mutableHandlers = {\r\n get,\r\n set,\r\n deleteProperty,\r\n has,\r\n ownKeys\r\n};\r\nconst readonlyHandlers = {\r\n get: readonlyGet,\r\n set(target, key) {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`Set operation on key \"${String(key)}\" failed: target is readonly.`, target);\r\n }\r\n return true;\r\n },\r\n deleteProperty(target, key) {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`Delete operation on key \"${String(key)}\" failed: target is readonly.`, target);\r\n }\r\n return true;\r\n }\r\n};\r\nconst shallowReactiveHandlers = /*#__PURE__*/ extend({}, mutableHandlers, {\r\n get: shallowGet,\r\n set: shallowSet\r\n});\r\n// Props handlers are special in the sense that it should not unwrap top-level\r\n// refs (in order to allow refs to be explicitly passed down), but should\r\n// retain the reactivity of the normal readonly object.\r\nconst shallowReadonlyHandlers = /*#__PURE__*/ extend({}, readonlyHandlers, {\r\n get: shallowReadonlyGet\r\n});\n\nconst toShallow = (value) => value;\r\nconst getProto = (v) => Reflect.getPrototypeOf(v);\r\nfunction get$1(target, key, isReadonly = false, isShallow = false) {\r\n // #1772: readonly(reactive(Map)) should return readonly + reactive version\r\n // of the value\r\n target = target[\"__v_raw\" /* RAW */];\r\n const rawTarget = toRaw(target);\r\n const rawKey = toRaw(key);\r\n if (!isReadonly) {\r\n if (key !== rawKey) {\r\n track(rawTarget, \"get\" /* GET */, key);\r\n }\r\n track(rawTarget, \"get\" /* GET */, rawKey);\r\n }\r\n const { has } = getProto(rawTarget);\r\n const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;\r\n if (has.call(rawTarget, key)) {\r\n return wrap(target.get(key));\r\n }\r\n else if (has.call(rawTarget, rawKey)) {\r\n return wrap(target.get(rawKey));\r\n }\r\n else if (target !== rawTarget) {\r\n // #3602 readonly(reactive(Map))\r\n // ensure that the nested reactive `Map` can do tracking for itself\r\n target.get(key);\r\n }\r\n}\r\nfunction has$1(key, isReadonly = false) {\r\n const target = this[\"__v_raw\" /* RAW */];\r\n const rawTarget = toRaw(target);\r\n const rawKey = toRaw(key);\r\n if (!isReadonly) {\r\n if (key !== rawKey) {\r\n track(rawTarget, \"has\" /* HAS */, key);\r\n }\r\n track(rawTarget, \"has\" /* HAS */, rawKey);\r\n }\r\n return key === rawKey\r\n ? target.has(key)\r\n : target.has(key) || target.has(rawKey);\r\n}\r\nfunction size(target, isReadonly = false) {\r\n target = target[\"__v_raw\" /* RAW */];\r\n !isReadonly && track(toRaw(target), \"iterate\" /* ITERATE */, ITERATE_KEY);\r\n return Reflect.get(target, 'size', target);\r\n}\r\nfunction add(value) {\r\n value = toRaw(value);\r\n const target = toRaw(this);\r\n const proto = getProto(target);\r\n const hadKey = proto.has.call(target, value);\r\n if (!hadKey) {\r\n target.add(value);\r\n trigger(target, \"add\" /* ADD */, value, value);\r\n }\r\n return this;\r\n}\r\nfunction set$1(key, value) {\r\n value = toRaw(value);\r\n const target = toRaw(this);\r\n const { has, get } = getProto(target);\r\n let hadKey = has.call(target, key);\r\n if (!hadKey) {\r\n key = toRaw(key);\r\n hadKey = has.call(target, key);\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n checkIdentityKeys(target, has, key);\r\n }\r\n const oldValue = get.call(target, key);\r\n target.set(key, value);\r\n if (!hadKey) {\r\n trigger(target, \"add\" /* ADD */, key, value);\r\n }\r\n else if (hasChanged(value, oldValue)) {\r\n trigger(target, \"set\" /* SET */, key, value, oldValue);\r\n }\r\n return this;\r\n}\r\nfunction deleteEntry(key) {\r\n const target = toRaw(this);\r\n const { has, get } = getProto(target);\r\n let hadKey = has.call(target, key);\r\n if (!hadKey) {\r\n key = toRaw(key);\r\n hadKey = has.call(target, key);\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n checkIdentityKeys(target, has, key);\r\n }\r\n const oldValue = get ? get.call(target, key) : undefined;\r\n // forward the operation before queueing reactions\r\n const result = target.delete(key);\r\n if (hadKey) {\r\n trigger(target, \"delete\" /* DELETE */, key, undefined, oldValue);\r\n }\r\n return result;\r\n}\r\nfunction clear() {\r\n const target = toRaw(this);\r\n const hadItems = target.size !== 0;\r\n const oldTarget = (process.env.NODE_ENV !== 'production')\r\n ? isMap(target)\r\n ? new Map(target)\r\n : new Set(target)\r\n : undefined;\r\n // forward the operation before queueing reactions\r\n const result = target.clear();\r\n if (hadItems) {\r\n trigger(target, \"clear\" /* CLEAR */, undefined, undefined, oldTarget);\r\n }\r\n return result;\r\n}\r\nfunction createForEach(isReadonly, isShallow) {\r\n return function forEach(callback, thisArg) {\r\n const observed = this;\r\n const target = observed[\"__v_raw\" /* RAW */];\r\n const rawTarget = toRaw(target);\r\n const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;\r\n !isReadonly && track(rawTarget, \"iterate\" /* ITERATE */, ITERATE_KEY);\r\n return target.forEach((value, key) => {\r\n // important: make sure the callback is\r\n // 1. invoked with the reactive map as `this` and 3rd arg\r\n // 2. the value received should be a corresponding reactive/readonly.\r\n return callback.call(thisArg, wrap(value), wrap(key), observed);\r\n });\r\n };\r\n}\r\nfunction createIterableMethod(method, isReadonly, isShallow) {\r\n return function (...args) {\r\n const target = this[\"__v_raw\" /* RAW */];\r\n const rawTarget = toRaw(target);\r\n const targetIsMap = isMap(rawTarget);\r\n const isPair = method === 'entries' || (method === Symbol.iterator && targetIsMap);\r\n const isKeyOnly = method === 'keys' && targetIsMap;\r\n const innerIterator = target[method](...args);\r\n const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;\r\n !isReadonly &&\r\n track(rawTarget, \"iterate\" /* ITERATE */, isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY);\r\n // return a wrapped iterator which returns observed versions of the\r\n // values emitted from the real iterator\r\n return {\r\n // iterator protocol\r\n next() {\r\n const { value, done } = innerIterator.next();\r\n return done\r\n ? { value, done }\r\n : {\r\n value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),\r\n done\r\n };\r\n },\r\n // iterable protocol\r\n [Symbol.iterator]() {\r\n return this;\r\n }\r\n };\r\n };\r\n}\r\nfunction createReadonlyMethod(type) {\r\n return function (...args) {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n const key = args[0] ? `on key \"${args[0]}\" ` : ``;\r\n console.warn(`${capitalize(type)} operation ${key}failed: target is readonly.`, toRaw(this));\r\n }\r\n return type === \"delete\" /* DELETE */ ? false : this;\r\n };\r\n}\r\nfunction createInstrumentations() {\r\n const mutableInstrumentations = {\r\n get(key) {\r\n return get$1(this, key);\r\n },\r\n get size() {\r\n return size(this);\r\n },\r\n has: has$1,\r\n add,\r\n set: set$1,\r\n delete: deleteEntry,\r\n clear,\r\n forEach: createForEach(false, false)\r\n };\r\n const shallowInstrumentations = {\r\n get(key) {\r\n return get$1(this, key, false, true);\r\n },\r\n get size() {\r\n return size(this);\r\n },\r\n has: has$1,\r\n add,\r\n set: set$1,\r\n delete: deleteEntry,\r\n clear,\r\n forEach: createForEach(false, true)\r\n };\r\n const readonlyInstrumentations = {\r\n get(key) {\r\n return get$1(this, key, true);\r\n },\r\n get size() {\r\n return size(this, true);\r\n },\r\n has(key) {\r\n return has$1.call(this, key, true);\r\n },\r\n add: createReadonlyMethod(\"add\" /* ADD */),\r\n set: createReadonlyMethod(\"set\" /* SET */),\r\n delete: createReadonlyMethod(\"delete\" /* DELETE */),\r\n clear: createReadonlyMethod(\"clear\" /* CLEAR */),\r\n forEach: createForEach(true, false)\r\n };\r\n const shallowReadonlyInstrumentations = {\r\n get(key) {\r\n return get$1(this, key, true, true);\r\n },\r\n get size() {\r\n return size(this, true);\r\n },\r\n has(key) {\r\n return has$1.call(this, key, true);\r\n },\r\n add: createReadonlyMethod(\"add\" /* ADD */),\r\n set: createReadonlyMethod(\"set\" /* SET */),\r\n delete: createReadonlyMethod(\"delete\" /* DELETE */),\r\n clear: createReadonlyMethod(\"clear\" /* CLEAR */),\r\n forEach: createForEach(true, true)\r\n };\r\n const iteratorMethods = ['keys', 'values', 'entries', Symbol.iterator];\r\n iteratorMethods.forEach(method => {\r\n mutableInstrumentations[method] = createIterableMethod(method, false, false);\r\n readonlyInstrumentations[method] = createIterableMethod(method, true, false);\r\n shallowInstrumentations[method] = createIterableMethod(method, false, true);\r\n shallowReadonlyInstrumentations[method] = createIterableMethod(method, true, true);\r\n });\r\n return [\r\n mutableInstrumentations,\r\n readonlyInstrumentations,\r\n shallowInstrumentations,\r\n shallowReadonlyInstrumentations\r\n ];\r\n}\r\nconst [mutableInstrumentations, readonlyInstrumentations, shallowInstrumentations, shallowReadonlyInstrumentations] = /* #__PURE__*/ createInstrumentations();\r\nfunction createInstrumentationGetter(isReadonly, shallow) {\r\n const instrumentations = shallow\r\n ? isReadonly\r\n ? shallowReadonlyInstrumentations\r\n : shallowInstrumentations\r\n : isReadonly\r\n ? readonlyInstrumentations\r\n : mutableInstrumentations;\r\n return (target, key, receiver) => {\r\n if (key === \"__v_isReactive\" /* IS_REACTIVE */) {\r\n return !isReadonly;\r\n }\r\n else if (key === \"__v_isReadonly\" /* IS_READONLY */) {\r\n return isReadonly;\r\n }\r\n else if (key === \"__v_raw\" /* RAW */) {\r\n return target;\r\n }\r\n return Reflect.get(hasOwn(instrumentations, key) && key in target\r\n ? instrumentations\r\n : target, key, receiver);\r\n };\r\n}\r\nconst mutableCollectionHandlers = {\r\n get: /*#__PURE__*/ createInstrumentationGetter(false, false)\r\n};\r\nconst shallowCollectionHandlers = {\r\n get: /*#__PURE__*/ createInstrumentationGetter(false, true)\r\n};\r\nconst readonlyCollectionHandlers = {\r\n get: /*#__PURE__*/ createInstrumentationGetter(true, false)\r\n};\r\nconst shallowReadonlyCollectionHandlers = {\r\n get: /*#__PURE__*/ createInstrumentationGetter(true, true)\r\n};\r\nfunction checkIdentityKeys(target, has, key) {\r\n const rawKey = toRaw(key);\r\n if (rawKey !== key && has.call(target, rawKey)) {\r\n const type = toRawType(target);\r\n console.warn(`Reactive ${type} contains both the raw and reactive ` +\r\n `versions of the same object${type === `Map` ? ` as keys` : ``}, ` +\r\n `which can lead to inconsistencies. ` +\r\n `Avoid differentiating between the raw and reactive versions ` +\r\n `of an object and only use the reactive version if possible.`);\r\n }\r\n}\n\nconst reactiveMap = new WeakMap();\r\nconst shallowReactiveMap = new WeakMap();\r\nconst readonlyMap = new WeakMap();\r\nconst shallowReadonlyMap = new WeakMap();\r\nfunction targetTypeMap(rawType) {\r\n switch (rawType) {\r\n case 'Object':\r\n case 'Array':\r\n return 1 /* COMMON */;\r\n case 'Map':\r\n case 'Set':\r\n case 'WeakMap':\r\n case 'WeakSet':\r\n return 2 /* COLLECTION */;\r\n default:\r\n return 0 /* INVALID */;\r\n }\r\n}\r\nfunction getTargetType(value) {\r\n return value[\"__v_skip\" /* SKIP */] || !Object.isExtensible(value)\r\n ? 0 /* INVALID */\r\n : targetTypeMap(toRawType(value));\r\n}\r\nfunction reactive(target) {\r\n // if trying to observe a readonly proxy, return the readonly version.\r\n if (isReadonly(target)) {\r\n return target;\r\n }\r\n return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap);\r\n}\r\n/**\r\n * Return a shallowly-reactive copy of the original object, where only the root\r\n * level properties are reactive. It also does not auto-unwrap refs (even at the\r\n * root level).\r\n */\r\nfunction shallowReactive(target) {\r\n return createReactiveObject(target, false, shallowReactiveHandlers, shallowCollectionHandlers, shallowReactiveMap);\r\n}\r\n/**\r\n * Creates a readonly copy of the original object. Note the returned copy is not\r\n * made reactive, but `readonly` can be called on an already reactive object.\r\n */\r\nfunction readonly(target) {\r\n return createReactiveObject(target, true, readonlyHandlers, readonlyCollectionHandlers, readonlyMap);\r\n}\r\n/**\r\n * Returns a reactive-copy of the original object, where only the root level\r\n * properties are readonly, and does NOT unwrap refs nor recursively convert\r\n * returned properties.\r\n * This is used for creating the props proxy object for stateful components.\r\n */\r\nfunction shallowReadonly(target) {\r\n return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap);\r\n}\r\nfunction createReactiveObject(target, isReadonly, baseHandlers, collectionHandlers, proxyMap) {\r\n if (!isObject(target)) {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n console.warn(`value cannot be made reactive: ${String(target)}`);\r\n }\r\n return target;\r\n }\r\n // target is already a Proxy, return it.\r\n // exception: calling readonly() on a reactive object\r\n if (target[\"__v_raw\" /* RAW */] &&\r\n !(isReadonly && target[\"__v_isReactive\" /* IS_REACTIVE */])) {\r\n return target;\r\n }\r\n // target already has corresponding Proxy\r\n const existingProxy = proxyMap.get(target);\r\n if (existingProxy) {\r\n return existingProxy;\r\n }\r\n // only specific value types can be observed.\r\n const targetType = getTargetType(target);\r\n if (targetType === 0 /* INVALID */) {\r\n return target;\r\n }\r\n const proxy = new Proxy(target, targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers);\r\n proxyMap.set(target, proxy);\r\n return proxy;\r\n}\r\nfunction isReactive(value) {\r\n if (isReadonly(value)) {\r\n return isReactive(value[\"__v_raw\" /* RAW */]);\r\n }\r\n return !!(value && value[\"__v_isReactive\" /* IS_REACTIVE */]);\r\n}\r\nfunction isReadonly(value) {\r\n return !!(value && value[\"__v_isReadonly\" /* IS_READONLY */]);\r\n}\r\nfunction isShallow(value) {\r\n return !!(value && value[\"__v_isShallow\" /* IS_SHALLOW */]);\r\n}\r\nfunction isProxy(value) {\r\n return isReactive(value) || isReadonly(value);\r\n}\r\nfunction toRaw(observed) {\r\n const raw = observed && observed[\"__v_raw\" /* RAW */];\r\n return raw ? toRaw(raw) : observed;\r\n}\r\nfunction markRaw(value) {\r\n def(value, \"__v_skip\" /* SKIP */, true);\r\n return value;\r\n}\r\nconst toReactive = (value) => isObject(value) ? reactive(value) : value;\r\nconst toReadonly = (value) => isObject(value) ? readonly(value) : value;\n\nfunction trackRefValue(ref) {\r\n if (shouldTrack && activeEffect) {\r\n ref = toRaw(ref);\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n trackEffects(ref.dep || (ref.dep = createDep()), {\r\n target: ref,\r\n type: \"get\" /* GET */,\r\n key: 'value'\r\n });\r\n }\r\n else {\r\n trackEffects(ref.dep || (ref.dep = createDep()));\r\n }\r\n }\r\n}\r\nfunction triggerRefValue(ref, newVal) {\r\n ref = toRaw(ref);\r\n if (ref.dep) {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n triggerEffects(ref.dep, {\r\n target: ref,\r\n type: \"set\" /* SET */,\r\n key: 'value',\r\n newValue: newVal\r\n });\r\n }\r\n else {\r\n triggerEffects(ref.dep);\r\n }\r\n }\r\n}\r\nfunction isRef(r) {\r\n return !!(r && r.__v_isRef === true);\r\n}\r\nfunction ref(value) {\r\n return createRef(value, false);\r\n}\r\nfunction shallowRef(value) {\r\n return createRef(value, true);\r\n}\r\nfunction createRef(rawValue, shallow) {\r\n if (isRef(rawValue)) {\r\n return rawValue;\r\n }\r\n return new RefImpl(rawValue, shallow);\r\n}\r\nclass RefImpl {\r\n constructor(value, __v_isShallow) {\r\n this.__v_isShallow = __v_isShallow;\r\n this.dep = undefined;\r\n this.__v_isRef = true;\r\n this._rawValue = __v_isShallow ? value : toRaw(value);\r\n this._value = __v_isShallow ? value : toReactive(value);\r\n }\r\n get value() {\r\n trackRefValue(this);\r\n return this._value;\r\n }\r\n set value(newVal) {\r\n newVal = this.__v_isShallow ? newVal : toRaw(newVal);\r\n if (hasChanged(newVal, this._rawValue)) {\r\n this._rawValue = newVal;\r\n this._value = this.__v_isShallow ? newVal : toReactive(newVal);\r\n triggerRefValue(this, newVal);\r\n }\r\n }\r\n}\r\nfunction triggerRef(ref) {\r\n triggerRefValue(ref, (process.env.NODE_ENV !== 'production') ? ref.value : void 0);\r\n}\r\nfunction unref(ref) {\r\n return isRef(ref) ? ref.value : ref;\r\n}\r\nconst shallowUnwrapHandlers = {\r\n get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)),\r\n set: (target, key, value, receiver) => {\r\n const oldValue = target[key];\r\n if (isRef(oldValue) && !isRef(value)) {\r\n oldValue.value = value;\r\n return true;\r\n }\r\n else {\r\n return Reflect.set(target, key, value, receiver);\r\n }\r\n }\r\n};\r\nfunction proxyRefs(objectWithRefs) {\r\n return isReactive(objectWithRefs)\r\n ? objectWithRefs\r\n : new Proxy(objectWithRefs, shallowUnwrapHandlers);\r\n}\r\nclass CustomRefImpl {\r\n constructor(factory) {\r\n this.dep = undefined;\r\n this.__v_isRef = true;\r\n const { get, set } = factory(() => trackRefValue(this), () => triggerRefValue(this));\r\n this._get = get;\r\n this._set = set;\r\n }\r\n get value() {\r\n return this._get();\r\n }\r\n set value(newVal) {\r\n this._set(newVal);\r\n }\r\n}\r\nfunction customRef(factory) {\r\n return new CustomRefImpl(factory);\r\n}\r\nfunction toRefs(object) {\r\n if ((process.env.NODE_ENV !== 'production') && !isProxy(object)) {\r\n console.warn(`toRefs() expects a reactive object but received a plain one.`);\r\n }\r\n const ret = isArray(object) ? new Array(object.length) : {};\r\n for (const key in object) {\r\n ret[key] = toRef(object, key);\r\n }\r\n return ret;\r\n}\r\nclass ObjectRefImpl {\r\n constructor(_object, _key, _defaultValue) {\r\n this._object = _object;\r\n this._key = _key;\r\n this._defaultValue = _defaultValue;\r\n this.__v_isRef = true;\r\n }\r\n get value() {\r\n const val = this._object[this._key];\r\n return val === undefined ? this._defaultValue : val;\r\n }\r\n set value(newVal) {\r\n this._object[this._key] = newVal;\r\n }\r\n}\r\nfunction toRef(object, key, defaultValue) {\r\n const val = object[key];\r\n return isRef(val)\r\n ? val\r\n : new ObjectRefImpl(object, key, defaultValue);\r\n}\n\nclass ComputedRefImpl {\r\n constructor(getter, _setter, isReadonly, isSSR) {\r\n this._setter = _setter;\r\n this.dep = undefined;\r\n this.__v_isRef = true;\r\n this._dirty = true;\r\n this.effect = new ReactiveEffect(getter, () => {\r\n if (!this._dirty) {\r\n this._dirty = true;\r\n triggerRefValue(this);\r\n }\r\n });\r\n this.effect.computed = this;\r\n this.effect.active = this._cacheable = !isSSR;\r\n this[\"__v_isReadonly\" /* IS_READONLY */] = isReadonly;\r\n }\r\n get value() {\r\n // the computed ref may get wrapped by other proxies e.g. readonly() #3376\r\n const self = toRaw(this);\r\n trackRefValue(self);\r\n if (self._dirty || !self._cacheable) {\r\n self._dirty = false;\r\n self._value = self.effect.run();\r\n }\r\n return self._value;\r\n }\r\n set value(newValue) {\r\n this._setter(newValue);\r\n }\r\n}\r\nfunction computed(getterOrOptions, debugOptions, isSSR = false) {\r\n let getter;\r\n let setter;\r\n const onlyGetter = isFunction(getterOrOptions);\r\n if (onlyGetter) {\r\n getter = getterOrOptions;\r\n setter = (process.env.NODE_ENV !== 'production')\r\n ? () => {\r\n console.warn('Write operation failed: computed value is readonly');\r\n }\r\n : NOOP;\r\n }\r\n else {\r\n getter = getterOrOptions.get;\r\n setter = getterOrOptions.set;\r\n }\r\n const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR);\r\n if ((process.env.NODE_ENV !== 'production') && debugOptions && !isSSR) {\r\n cRef.effect.onTrack = debugOptions.onTrack;\r\n cRef.effect.onTrigger = debugOptions.onTrigger;\r\n }\r\n return cRef;\r\n}\n\nvar _a;\r\nconst tick = /*#__PURE__*/ Promise.resolve();\r\nconst queue = [];\r\nlet queued = false;\r\nconst scheduler = (fn) => {\r\n queue.push(fn);\r\n if (!queued) {\r\n queued = true;\r\n tick.then(flush);\r\n }\r\n};\r\nconst flush = () => {\r\n for (let i = 0; i < queue.length; i++) {\r\n queue[i]();\r\n }\r\n queue.length = 0;\r\n queued = false;\r\n};\r\nclass DeferredComputedRefImpl {\r\n constructor(getter) {\r\n this.dep = undefined;\r\n this._dirty = true;\r\n this.__v_isRef = true;\r\n this[_a] = true;\r\n let compareTarget;\r\n let hasCompareTarget = false;\r\n let scheduled = false;\r\n this.effect = new ReactiveEffect(getter, (computedTrigger) => {\r\n if (this.dep) {\r\n if (computedTrigger) {\r\n compareTarget = this._value;\r\n hasCompareTarget = true;\r\n }\r\n else if (!scheduled) {\r\n const valueToCompare = hasCompareTarget ? compareTarget : this._value;\r\n scheduled = true;\r\n hasCompareTarget = false;\r\n scheduler(() => {\r\n if (this.effect.active && this._get() !== valueToCompare) {\r\n triggerRefValue(this);\r\n }\r\n scheduled = false;\r\n });\r\n }\r\n // chained upstream computeds are notified synchronously to ensure\r\n // value invalidation in case of sync access; normal effects are\r\n // deferred to be triggered in scheduler.\r\n for (const e of this.dep) {\r\n if (e.computed instanceof DeferredComputedRefImpl) {\r\n e.scheduler(true /* computedTrigger */);\r\n }\r\n }\r\n }\r\n this._dirty = true;\r\n });\r\n this.effect.computed = this;\r\n }\r\n _get() {\r\n if (this._dirty) {\r\n this._dirty = false;\r\n return (this._value = this.effect.run());\r\n }\r\n return this._value;\r\n }\r\n get value() {\r\n trackRefValue(this);\r\n // the computed ref may get wrapped by other proxies e.g. readonly() #3376\r\n return toRaw(this)._get();\r\n }\r\n}\r\n_a = \"__v_isReadonly\" /* IS_READONLY */;\r\nfunction deferredComputed(getter) {\r\n return new DeferredComputedRefImpl(getter);\r\n}\n\nexport { EffectScope, ITERATE_KEY, ReactiveEffect, computed, customRef, deferredComputed, effect, effectScope, enableTracking, getCurrentScope, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, pauseTracking, proxyRefs, reactive, readonly, ref, resetTracking, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, track, trigger, triggerRef, unref };\n","import { pauseTracking, resetTracking, isRef, toRaw, isShallow as isShallow$1, isReactive, ReactiveEffect, ref, shallowReadonly, track, reactive, shallowReactive, trigger, isProxy, EffectScope, markRaw, proxyRefs, computed as computed$1, isReadonly } from '@vue/reactivity';\nexport { EffectScope, ReactiveEffect, customRef, effect, effectScope, getCurrentScope, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, triggerRef, unref } from '@vue/reactivity';\nimport { isString, isFunction, isPromise, isArray, NOOP, getGlobalThis, extend, EMPTY_OBJ, toHandlerKey, toNumber, hyphenate, camelize, isOn, hasOwn, isModelListener, hasChanged, remove, isObject, isSet, isMap, isPlainObject, invokeArrayFns, isBuiltInDirective, capitalize, isGloballyWhitelisted, def, isReservedProp, EMPTY_ARR, toRawType, makeMap, NO, normalizeClass, normalizeStyle } from '@vue/shared';\nexport { camelize, capitalize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '@vue/shared';\n\nconst stack = [];\r\nfunction pushWarningContext(vnode) {\r\n stack.push(vnode);\r\n}\r\nfunction popWarningContext() {\r\n stack.pop();\r\n}\r\nfunction warn(msg, ...args) {\r\n // avoid props formatting or warn handler tracking deps that might be mutated\r\n // during patch, leading to infinite recursion.\r\n pauseTracking();\r\n const instance = stack.length ? stack[stack.length - 1].component : null;\r\n const appWarnHandler = instance && instance.appContext.config.warnHandler;\r\n const trace = getComponentTrace();\r\n if (appWarnHandler) {\r\n callWithErrorHandling(appWarnHandler, instance, 11 /* APP_WARN_HANDLER */, [\r\n msg + args.join(''),\r\n instance && instance.proxy,\r\n trace\r\n .map(({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`)\r\n .join('\\n'),\r\n trace\r\n ]);\r\n }\r\n else {\r\n const warnArgs = [`[Vue warn]: ${msg}`, ...args];\r\n /* istanbul ignore if */\r\n if (trace.length &&\r\n // avoid spamming console during tests\r\n !false) {\r\n warnArgs.push(`\\n`, ...formatTrace(trace));\r\n }\r\n console.warn(...warnArgs);\r\n }\r\n resetTracking();\r\n}\r\nfunction getComponentTrace() {\r\n let currentVNode = stack[stack.length - 1];\r\n if (!currentVNode) {\r\n return [];\r\n }\r\n // we can't just use the stack because it will be incomplete during updates\r\n // that did not start from the root. Re-construct the parent chain using\r\n // instance parent pointers.\r\n const normalizedStack = [];\r\n while (currentVNode) {\r\n const last = normalizedStack[0];\r\n if (last && last.vnode === currentVNode) {\r\n last.recurseCount++;\r\n }\r\n else {\r\n normalizedStack.push({\r\n vnode: currentVNode,\r\n recurseCount: 0\r\n });\r\n }\r\n const parentInstance = currentVNode.component && currentVNode.component.parent;\r\n currentVNode = parentInstance && parentInstance.vnode;\r\n }\r\n return normalizedStack;\r\n}\r\n/* istanbul ignore next */\r\nfunction formatTrace(trace) {\r\n const logs = [];\r\n trace.forEach((entry, i) => {\r\n logs.push(...(i === 0 ? [] : [`\\n`]), ...formatTraceEntry(entry));\r\n });\r\n return logs;\r\n}\r\nfunction formatTraceEntry({ vnode, recurseCount }) {\r\n const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``;\r\n const isRoot = vnode.component ? vnode.component.parent == null : false;\r\n const open = ` at <${formatComponentName(vnode.component, vnode.type, isRoot)}`;\r\n const close = `>` + postfix;\r\n return vnode.props\r\n ? [open, ...formatProps(vnode.props), close]\r\n : [open + close];\r\n}\r\n/* istanbul ignore next */\r\nfunction formatProps(props) {\r\n const res = [];\r\n const keys = Object.keys(props);\r\n keys.slice(0, 3).forEach(key => {\r\n res.push(...formatProp(key, props[key]));\r\n });\r\n if (keys.length > 3) {\r\n res.push(` ...`);\r\n }\r\n return res;\r\n}\r\n/* istanbul ignore next */\r\nfunction formatProp(key, value, raw) {\r\n if (isString(value)) {\r\n value = JSON.stringify(value);\r\n return raw ? value : [`${key}=${value}`];\r\n }\r\n else if (typeof value === 'number' ||\r\n typeof value === 'boolean' ||\r\n value == null) {\r\n return raw ? value : [`${key}=${value}`];\r\n }\r\n else if (isRef(value)) {\r\n value = formatProp(key, toRaw(value.value), true);\r\n return raw ? value : [`${key}=Ref<`, value, `>`];\r\n }\r\n else if (isFunction(value)) {\r\n return [`${key}=fn${value.name ? `<${value.name}>` : ``}`];\r\n }\r\n else {\r\n value = toRaw(value);\r\n return raw ? value : [`${key}=`, value];\r\n }\r\n}\n\nconst ErrorTypeStrings = {\r\n [\"sp\" /* SERVER_PREFETCH */]: 'serverPrefetch hook',\r\n [\"bc\" /* BEFORE_CREATE */]: 'beforeCreate hook',\r\n [\"c\" /* CREATED */]: 'created hook',\r\n [\"bm\" /* BEFORE_MOUNT */]: 'beforeMount hook',\r\n [\"m\" /* MOUNTED */]: 'mounted hook',\r\n [\"bu\" /* BEFORE_UPDATE */]: 'beforeUpdate hook',\r\n [\"u\" /* UPDATED */]: 'updated',\r\n [\"bum\" /* BEFORE_UNMOUNT */]: 'beforeUnmount hook',\r\n [\"um\" /* UNMOUNTED */]: 'unmounted hook',\r\n [\"a\" /* ACTIVATED */]: 'activated hook',\r\n [\"da\" /* DEACTIVATED */]: 'deactivated hook',\r\n [\"ec\" /* ERROR_CAPTURED */]: 'errorCaptured hook',\r\n [\"rtc\" /* RENDER_TRACKED */]: 'renderTracked hook',\r\n [\"rtg\" /* RENDER_TRIGGERED */]: 'renderTriggered hook',\r\n [0 /* SETUP_FUNCTION */]: 'setup function',\r\n [1 /* RENDER_FUNCTION */]: 'render function',\r\n [2 /* WATCH_GETTER */]: 'watcher getter',\r\n [3 /* WATCH_CALLBACK */]: 'watcher callback',\r\n [4 /* WATCH_CLEANUP */]: 'watcher cleanup function',\r\n [5 /* NATIVE_EVENT_HANDLER */]: 'native event handler',\r\n [6 /* COMPONENT_EVENT_HANDLER */]: 'component event handler',\r\n [7 /* VNODE_HOOK */]: 'vnode hook',\r\n [8 /* DIRECTIVE_HOOK */]: 'directive hook',\r\n [9 /* TRANSITION_HOOK */]: 'transition hook',\r\n [10 /* APP_ERROR_HANDLER */]: 'app errorHandler',\r\n [11 /* APP_WARN_HANDLER */]: 'app warnHandler',\r\n [12 /* FUNCTION_REF */]: 'ref function',\r\n [13 /* ASYNC_COMPONENT_LOADER */]: 'async component loader',\r\n [14 /* SCHEDULER */]: 'scheduler flush. This is likely a Vue internals bug. ' +\r\n 'Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core'\r\n};\r\nfunction callWithErrorHandling(fn, instance, type, args) {\r\n let res;\r\n try {\r\n res = args ? fn(...args) : fn();\r\n }\r\n catch (err) {\r\n handleError(err, instance, type);\r\n }\r\n return res;\r\n}\r\nfunction callWithAsyncErrorHandling(fn, instance, type, args) {\r\n if (isFunction(fn)) {\r\n const res = callWithErrorHandling(fn, instance, type, args);\r\n if (res && isPromise(res)) {\r\n res.catch(err => {\r\n handleError(err, instance, type);\r\n });\r\n }\r\n return res;\r\n }\r\n const values = [];\r\n for (let i = 0; i < fn.length; i++) {\r\n values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));\r\n }\r\n return values;\r\n}\r\nfunction handleError(err, instance, type, throwInDev = true) {\r\n const contextVNode = instance ? instance.vnode : null;\r\n if (instance) {\r\n let cur = instance.parent;\r\n // the exposed instance is the render proxy to keep it consistent with 2.x\r\n const exposedInstance = instance.proxy;\r\n // in production the hook receives only the error code\r\n const errorInfo = (process.env.NODE_ENV !== 'production') ? ErrorTypeStrings[type] : type;\r\n while (cur) {\r\n const errorCapturedHooks = cur.ec;\r\n if (errorCapturedHooks) {\r\n for (let i = 0; i < errorCapturedHooks.length; i++) {\r\n if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) {\r\n return;\r\n }\r\n }\r\n }\r\n cur = cur.parent;\r\n }\r\n // app-level handling\r\n const appErrorHandler = instance.appContext.config.errorHandler;\r\n if (appErrorHandler) {\r\n callWithErrorHandling(appErrorHandler, null, 10 /* APP_ERROR_HANDLER */, [err, exposedInstance, errorInfo]);\r\n return;\r\n }\r\n }\r\n logError(err, type, contextVNode, throwInDev);\r\n}\r\nfunction logError(err, type, contextVNode, throwInDev = true) {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n const info = ErrorTypeStrings[type];\r\n if (contextVNode) {\r\n pushWarningContext(contextVNode);\r\n }\r\n warn(`Unhandled error${info ? ` during execution of ${info}` : ``}`);\r\n if (contextVNode) {\r\n popWarningContext();\r\n }\r\n // crash in dev by default so it's more noticeable\r\n if (throwInDev) {\r\n throw err;\r\n }\r\n else {\r\n console.error(err);\r\n }\r\n }\r\n else {\r\n // recover in prod to reduce the impact on end-user\r\n console.error(err);\r\n }\r\n}\n\nlet isFlushing = false;\r\nlet isFlushPending = false;\r\nconst queue = [];\r\nlet flushIndex = 0;\r\nconst pendingPreFlushCbs = [];\r\nlet activePreFlushCbs = null;\r\nlet preFlushIndex = 0;\r\nconst pendingPostFlushCbs = [];\r\nlet activePostFlushCbs = null;\r\nlet postFlushIndex = 0;\r\nconst resolvedPromise = /*#__PURE__*/ Promise.resolve();\r\nlet currentFlushPromise = null;\r\nlet currentPreFlushParentJob = null;\r\nconst RECURSION_LIMIT = 100;\r\nfunction nextTick(fn) {\r\n const p = currentFlushPromise || resolvedPromise;\r\n return fn ? p.then(this ? fn.bind(this) : fn) : p;\r\n}\r\n// #2768\r\n// Use binary-search to find a suitable position in the queue,\r\n// so that the queue maintains the increasing order of job's id,\r\n// which can prevent the job from being skipped and also can avoid repeated patching.\r\nfunction findInsertionIndex(id) {\r\n // the start index should be `flushIndex + 1`\r\n let start = flushIndex + 1;\r\n let end = queue.length;\r\n while (start < end) {\r\n const middle = (start + end) >>> 1;\r\n const middleJobId = getId(queue[middle]);\r\n middleJobId < id ? (start = middle + 1) : (end = middle);\r\n }\r\n return start;\r\n}\r\nfunction queueJob(job) {\r\n // the dedupe search uses the startIndex argument of Array.includes()\r\n // by default the search index includes the current job that is being run\r\n // so it cannot recursively trigger itself again.\r\n // if the job is a watch() callback, the search will start with a +1 index to\r\n // allow it recursively trigger itself - it is the user's responsibility to\r\n // ensure it doesn't end up in an infinite loop.\r\n if ((!queue.length ||\r\n !queue.includes(job, isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex)) &&\r\n job !== currentPreFlushParentJob) {\r\n if (job.id == null) {\r\n queue.push(job);\r\n }\r\n else {\r\n queue.splice(findInsertionIndex(job.id), 0, job);\r\n }\r\n queueFlush();\r\n }\r\n}\r\nfunction queueFlush() {\r\n if (!isFlushing && !isFlushPending) {\r\n isFlushPending = true;\r\n currentFlushPromise = resolvedPromise.then(flushJobs);\r\n }\r\n}\r\nfunction invalidateJob(job) {\r\n const i = queue.indexOf(job);\r\n if (i > flushIndex) {\r\n queue.splice(i, 1);\r\n }\r\n}\r\nfunction queueCb(cb, activeQueue, pendingQueue, index) {\r\n if (!isArray(cb)) {\r\n if (!activeQueue ||\r\n !activeQueue.includes(cb, cb.allowRecurse ? index + 1 : index)) {\r\n pendingQueue.push(cb);\r\n }\r\n }\r\n else {\r\n // if cb is an array, it is a component lifecycle hook which can only be\r\n // triggered by a job, which is already deduped in the main queue, so\r\n // we can skip duplicate check here to improve perf\r\n pendingQueue.push(...cb);\r\n }\r\n queueFlush();\r\n}\r\nfunction queuePreFlushCb(cb) {\r\n queueCb(cb, activePreFlushCbs, pendingPreFlushCbs, preFlushIndex);\r\n}\r\nfunction queuePostFlushCb(cb) {\r\n queueCb(cb, activePostFlushCbs, pendingPostFlushCbs, postFlushIndex);\r\n}\r\nfunction flushPreFlushCbs(seen, parentJob = null) {\r\n if (pendingPreFlushCbs.length) {\r\n currentPreFlushParentJob = parentJob;\r\n activePreFlushCbs = [...new Set(pendingPreFlushCbs)];\r\n pendingPreFlushCbs.length = 0;\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n seen = seen || new Map();\r\n }\r\n for (preFlushIndex = 0; preFlushIndex < activePreFlushCbs.length; preFlushIndex++) {\r\n if ((process.env.NODE_ENV !== 'production') &&\r\n checkRecursiveUpdates(seen, activePreFlushCbs[preFlushIndex])) {\r\n continue;\r\n }\r\n activePreFlushCbs[preFlushIndex]();\r\n }\r\n activePreFlushCbs = null;\r\n preFlushIndex = 0;\r\n currentPreFlushParentJob = null;\r\n // recursively flush until it drains\r\n flushPreFlushCbs(seen, parentJob);\r\n }\r\n}\r\nfunction flushPostFlushCbs(seen) {\r\n // flush any pre cbs queued during the flush (e.g. pre watchers)\r\n flushPreFlushCbs();\r\n if (pendingPostFlushCbs.length) {\r\n const deduped = [...new Set(pendingPostFlushCbs)];\r\n pendingPostFlushCbs.length = 0;\r\n // #1947 already has active queue, nested flushPostFlushCbs call\r\n if (activePostFlushCbs) {\r\n activePostFlushCbs.push(...deduped);\r\n return;\r\n }\r\n activePostFlushCbs = deduped;\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n seen = seen || new Map();\r\n }\r\n activePostFlushCbs.sort((a, b) => getId(a) - getId(b));\r\n for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {\r\n if ((process.env.NODE_ENV !== 'production') &&\r\n checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) {\r\n continue;\r\n }\r\n activePostFlushCbs[postFlushIndex]();\r\n }\r\n activePostFlushCbs = null;\r\n postFlushIndex = 0;\r\n }\r\n}\r\nconst getId = (job) => job.id == null ? Infinity : job.id;\r\nfunction flushJobs(seen) {\r\n isFlushPending = false;\r\n isFlushing = true;\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n seen = seen || new Map();\r\n }\r\n flushPreFlushCbs(seen);\r\n // Sort queue before flush.\r\n // This ensures that:\r\n // 1. Components are updated from parent to child. (because parent is always\r\n // created before the child so its render effect will have smaller\r\n // priority number)\r\n // 2. If a component is unmounted during a parent component's update,\r\n // its update can be skipped.\r\n queue.sort((a, b) => getId(a) - getId(b));\r\n // conditional usage of checkRecursiveUpdate must be determined out of\r\n // try ... catch block since Rollup by default de-optimizes treeshaking\r\n // inside try-catch. This can leave all warning code unshaked. Although\r\n // they would get eventually shaken by a minifier like terser, some minifiers\r\n // would fail to do that (e.g. https://github.com/evanw/esbuild/issues/1610)\r\n const check = (process.env.NODE_ENV !== 'production')\r\n ? (job) => checkRecursiveUpdates(seen, job)\r\n : NOOP;\r\n try {\r\n for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {\r\n const job = queue[flushIndex];\r\n if (job && job.active !== false) {\r\n if ((process.env.NODE_ENV !== 'production') && check(job)) {\r\n continue;\r\n }\r\n // console.log(`running:`, job.id)\r\n callWithErrorHandling(job, null, 14 /* SCHEDULER */);\r\n }\r\n }\r\n }\r\n finally {\r\n flushIndex = 0;\r\n queue.length = 0;\r\n flushPostFlushCbs(seen);\r\n isFlushing = false;\r\n currentFlushPromise = null;\r\n // some postFlushCb queued jobs!\r\n // keep flushing until it drains.\r\n if (queue.length ||\r\n pendingPreFlushCbs.length ||\r\n pendingPostFlushCbs.length) {\r\n flushJobs(seen);\r\n }\r\n }\r\n}\r\nfunction checkRecursiveUpdates(seen, fn) {\r\n if (!seen.has(fn)) {\r\n seen.set(fn, 1);\r\n }\r\n else {\r\n const count = seen.get(fn);\r\n if (count > RECURSION_LIMIT) {\r\n const instance = fn.ownerInstance;\r\n const componentName = instance && getComponentName(instance.type);\r\n warn(`Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. ` +\r\n `This means you have a reactive effect that is mutating its own ` +\r\n `dependencies and thus recursively triggering itself. Possible sources ` +\r\n `include component template, render function, updated hook or ` +\r\n `watcher source function.`);\r\n return true;\r\n }\r\n else {\r\n seen.set(fn, count + 1);\r\n }\r\n }\r\n}\n\n/* eslint-disable no-restricted-globals */\r\nlet isHmrUpdating = false;\r\nconst hmrDirtyComponents = new Set();\r\n// Expose the HMR runtime on the global object\r\n// This makes it entirely tree-shakable without polluting the exports and makes\r\n// it easier to be used in toolings like vue-loader\r\n// Note: for a component to be eligible for HMR it also needs the __hmrId option\r\n// to be set so that its instances can be registered / removed.\r\nif ((process.env.NODE_ENV !== 'production')) {\r\n getGlobalThis().__VUE_HMR_RUNTIME__ = {\r\n createRecord: tryWrap(createRecord),\r\n rerender: tryWrap(rerender),\r\n reload: tryWrap(reload)\r\n };\r\n}\r\nconst map = new Map();\r\nfunction registerHMR(instance) {\r\n const id = instance.type.__hmrId;\r\n let record = map.get(id);\r\n if (!record) {\r\n createRecord(id, instance.type);\r\n record = map.get(id);\r\n }\r\n record.instances.add(instance);\r\n}\r\nfunction unregisterHMR(instance) {\r\n map.get(instance.type.__hmrId).instances.delete(instance);\r\n}\r\nfunction createRecord(id, initialDef) {\r\n if (map.has(id)) {\r\n return false;\r\n }\r\n map.set(id, {\r\n initialDef: normalizeClassComponent(initialDef),\r\n instances: new Set()\r\n });\r\n return true;\r\n}\r\nfunction normalizeClassComponent(component) {\r\n return isClassComponent(component) ? component.__vccOpts : component;\r\n}\r\nfunction rerender(id, newRender) {\r\n const record = map.get(id);\r\n if (!record) {\r\n return;\r\n }\r\n // update initial record (for not-yet-rendered component)\r\n record.initialDef.render = newRender;\r\n [...record.instances].forEach(instance => {\r\n if (newRender) {\r\n instance.render = newRender;\r\n normalizeClassComponent(instance.type).render = newRender;\r\n }\r\n instance.renderCache = [];\r\n // this flag forces child components with slot content to update\r\n isHmrUpdating = true;\r\n instance.update();\r\n isHmrUpdating = false;\r\n });\r\n}\r\nfunction reload(id, newComp) {\r\n const record = map.get(id);\r\n if (!record)\r\n return;\r\n newComp = normalizeClassComponent(newComp);\r\n // update initial def (for not-yet-rendered components)\r\n updateComponentDef(record.initialDef, newComp);\r\n // create a snapshot which avoids the set being mutated during updates\r\n const instances = [...record.instances];\r\n for (const instance of instances) {\r\n const oldComp = normalizeClassComponent(instance.type);\r\n if (!hmrDirtyComponents.has(oldComp)) {\r\n // 1. Update existing comp definition to match new one\r\n if (oldComp !== record.initialDef) {\r\n updateComponentDef(oldComp, newComp);\r\n }\r\n // 2. mark definition dirty. This forces the renderer to replace the\r\n // component on patch.\r\n hmrDirtyComponents.add(oldComp);\r\n }\r\n // 3. invalidate options resolution cache\r\n instance.appContext.optionsCache.delete(instance.type);\r\n // 4. actually update\r\n if (instance.ceReload) {\r\n // custom element\r\n hmrDirtyComponents.add(oldComp);\r\n instance.ceReload(newComp.styles);\r\n hmrDirtyComponents.delete(oldComp);\r\n }\r\n else if (instance.parent) {\r\n // 4. Force the parent instance to re-render. This will cause all updated\r\n // components to be unmounted and re-mounted. Queue the update so that we\r\n // don't end up forcing the same parent to re-render multiple times.\r\n queueJob(instance.parent.update);\r\n // instance is the inner component of an async custom element\r\n // invoke to reset styles\r\n if (instance.parent.type.__asyncLoader &&\r\n instance.parent.ceReload) {\r\n instance.parent.ceReload(newComp.styles);\r\n }\r\n }\r\n else if (instance.appContext.reload) {\r\n // root instance mounted via createApp() has a reload method\r\n instance.appContext.reload();\r\n }\r\n else if (typeof window !== 'undefined') {\r\n // root instance inside tree created via raw render(). Force reload.\r\n window.location.reload();\r\n }\r\n else {\r\n console.warn('[HMR] Root or manually mounted instance modified. Full reload required.');\r\n }\r\n }\r\n // 5. make sure to cleanup dirty hmr components after update\r\n queuePostFlushCb(() => {\r\n for (const instance of instances) {\r\n hmrDirtyComponents.delete(normalizeClassComponent(instance.type));\r\n }\r\n });\r\n}\r\nfunction updateComponentDef(oldComp, newComp) {\r\n extend(oldComp, newComp);\r\n for (const key in oldComp) {\r\n if (key !== '__file' && !(key in newComp)) {\r\n delete oldComp[key];\r\n }\r\n }\r\n}\r\nfunction tryWrap(fn) {\r\n return (id, arg) => {\r\n try {\r\n return fn(id, arg);\r\n }\r\n catch (e) {\r\n console.error(e);\r\n console.warn(`[HMR] Something went wrong during Vue component hot-reload. ` +\r\n `Full reload required.`);\r\n }\r\n };\r\n}\n\nlet devtools;\r\nlet buffer = [];\r\nlet devtoolsNotInstalled = false;\r\nfunction emit(event, ...args) {\r\n if (devtools) {\r\n devtools.emit(event, ...args);\r\n }\r\n else if (!devtoolsNotInstalled) {\r\n buffer.push({ event, args });\r\n }\r\n}\r\nfunction setDevtoolsHook(hook, target) {\r\n var _a, _b;\r\n devtools = hook;\r\n if (devtools) {\r\n devtools.enabled = true;\r\n buffer.forEach(({ event, args }) => devtools.emit(event, ...args));\r\n buffer = [];\r\n }\r\n else if (\r\n // handle late devtools injection - only do this if we are in an actual\r\n // browser environment to avoid the timer handle stalling test runner exit\r\n // (#4815)\r\n typeof window !== 'undefined' &&\r\n // some envs mock window but not fully\r\n window.HTMLElement &&\r\n // also exclude jsdom\r\n !((_b = (_a = window.navigator) === null || _a === void 0 ? void 0 : _a.userAgent) === null || _b === void 0 ? void 0 : _b.includes('jsdom'))) {\r\n const replay = (target.__VUE_DEVTOOLS_HOOK_REPLAY__ =\r\n target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []);\r\n replay.push((newHook) => {\r\n setDevtoolsHook(newHook, target);\r\n });\r\n // clear buffer after 3s - the user probably doesn't have devtools installed\r\n // at all, and keeping the buffer will cause memory leaks (#4738)\r\n setTimeout(() => {\r\n if (!devtools) {\r\n target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;\r\n devtoolsNotInstalled = true;\r\n buffer = [];\r\n }\r\n }, 3000);\r\n }\r\n else {\r\n // non-browser env, assume not installed\r\n devtoolsNotInstalled = true;\r\n buffer = [];\r\n }\r\n}\r\nfunction devtoolsInitApp(app, version) {\r\n emit(\"app:init\" /* APP_INIT */, app, version, {\r\n Fragment,\r\n Text,\r\n Comment,\r\n Static\r\n });\r\n}\r\nfunction devtoolsUnmountApp(app) {\r\n emit(\"app:unmount\" /* APP_UNMOUNT */, app);\r\n}\r\nconst devtoolsComponentAdded = /*#__PURE__*/ createDevtoolsComponentHook(\"component:added\" /* COMPONENT_ADDED */);\r\nconst devtoolsComponentUpdated = \r\n/*#__PURE__*/ createDevtoolsComponentHook(\"component:updated\" /* COMPONENT_UPDATED */);\r\nconst devtoolsComponentRemoved = \r\n/*#__PURE__*/ createDevtoolsComponentHook(\"component:removed\" /* COMPONENT_REMOVED */);\r\nfunction createDevtoolsComponentHook(hook) {\r\n return (component) => {\r\n emit(hook, component.appContext.app, component.uid, component.parent ? component.parent.uid : undefined, component);\r\n };\r\n}\r\nconst devtoolsPerfStart = /*#__PURE__*/ createDevtoolsPerformanceHook(\"perf:start\" /* PERFORMANCE_START */);\r\nconst devtoolsPerfEnd = /*#__PURE__*/ createDevtoolsPerformanceHook(\"perf:end\" /* PERFORMANCE_END */);\r\nfunction createDevtoolsPerformanceHook(hook) {\r\n return (component, type, time) => {\r\n emit(hook, component.appContext.app, component.uid, component, type, time);\r\n };\r\n}\r\nfunction devtoolsComponentEmit(component, event, params) {\r\n emit(\"component:emit\" /* COMPONENT_EMIT */, component.appContext.app, component, event, params);\r\n}\n\nfunction emit$1(instance, event, ...rawArgs) {\r\n if (instance.isUnmounted)\r\n return;\r\n const props = instance.vnode.props || EMPTY_OBJ;\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n const { emitsOptions, propsOptions: [propsOptions] } = instance;\r\n if (emitsOptions) {\r\n if (!(event in emitsOptions) &&\r\n !(false )) {\r\n if (!propsOptions || !(toHandlerKey(event) in propsOptions)) {\r\n warn(`Component emitted event \"${event}\" but it is neither declared in ` +\r\n `the emits option nor as an \"${toHandlerKey(event)}\" prop.`);\r\n }\r\n }\r\n else {\r\n const validator = emitsOptions[event];\r\n if (isFunction(validator)) {\r\n const isValid = validator(...rawArgs);\r\n if (!isValid) {\r\n warn(`Invalid event arguments: event validation failed for event \"${event}\".`);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n let args = rawArgs;\r\n const isModelListener = event.startsWith('update:');\r\n // for v-model update:xxx events, apply modifiers on args\r\n const modelArg = isModelListener && event.slice(7);\r\n if (modelArg && modelArg in props) {\r\n const modifiersKey = `${modelArg === 'modelValue' ? 'model' : modelArg}Modifiers`;\r\n const { number, trim } = props[modifiersKey] || EMPTY_OBJ;\r\n if (trim) {\r\n args = rawArgs.map(a => a.trim());\r\n }\r\n if (number) {\r\n args = rawArgs.map(toNumber);\r\n }\r\n }\r\n if ((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) {\r\n devtoolsComponentEmit(instance, event, args);\r\n }\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n const lowerCaseEvent = event.toLowerCase();\r\n if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) {\r\n warn(`Event \"${lowerCaseEvent}\" is emitted in component ` +\r\n `${formatComponentName(instance, instance.type)} but the handler is registered for \"${event}\". ` +\r\n `Note that HTML attributes are case-insensitive and you cannot use ` +\r\n `v-on to listen to camelCase events when using in-DOM templates. ` +\r\n `You should probably use \"${hyphenate(event)}\" instead of \"${event}\".`);\r\n }\r\n }\r\n let handlerName;\r\n let handler = props[(handlerName = toHandlerKey(event))] ||\r\n // also try camelCase event handler (#2249)\r\n props[(handlerName = toHandlerKey(camelize(event)))];\r\n // for v-model update:xxx events, also trigger kebab-case equivalent\r\n // for props passed via kebab-case\r\n if (!handler && isModelListener) {\r\n handler = props[(handlerName = toHandlerKey(hyphenate(event)))];\r\n }\r\n if (handler) {\r\n callWithAsyncErrorHandling(handler, instance, 6 /* COMPONENT_EVENT_HANDLER */, args);\r\n }\r\n const onceHandler = props[handlerName + `Once`];\r\n if (onceHandler) {\r\n if (!instance.emitted) {\r\n instance.emitted = {};\r\n }\r\n else if (instance.emitted[handlerName]) {\r\n return;\r\n }\r\n instance.emitted[handlerName] = true;\r\n callWithAsyncErrorHandling(onceHandler, instance, 6 /* COMPONENT_EVENT_HANDLER */, args);\r\n }\r\n}\r\nfunction normalizeEmitsOptions(comp, appContext, asMixin = false) {\r\n const cache = appContext.emitsCache;\r\n const cached = cache.get(comp);\r\n if (cached !== undefined) {\r\n return cached;\r\n }\r\n const raw = comp.emits;\r\n let normalized = {};\r\n // apply mixin/extends props\r\n let hasExtends = false;\r\n if (__VUE_OPTIONS_API__ && !isFunction(comp)) {\r\n const extendEmits = (raw) => {\r\n const normalizedFromExtend = normalizeEmitsOptions(raw, appContext, true);\r\n if (normalizedFromExtend) {\r\n hasExtends = true;\r\n extend(normalized, normalizedFromExtend);\r\n }\r\n };\r\n if (!asMixin && appContext.mixins.length) {\r\n appContext.mixins.forEach(extendEmits);\r\n }\r\n if (comp.extends) {\r\n extendEmits(comp.extends);\r\n }\r\n if (comp.mixins) {\r\n comp.mixins.forEach(extendEmits);\r\n }\r\n }\r\n if (!raw && !hasExtends) {\r\n cache.set(comp, null);\r\n return null;\r\n }\r\n if (isArray(raw)) {\r\n raw.forEach(key => (normalized[key] = null));\r\n }\r\n else {\r\n extend(normalized, raw);\r\n }\r\n cache.set(comp, normalized);\r\n return normalized;\r\n}\r\n// Check if an incoming prop key is a declared emit event listener.\r\n// e.g. With `emits: { click: null }`, props named `onClick` and `onclick` are\r\n// both considered matched listeners.\r\nfunction isEmitListener(options, key) {\r\n if (!options || !isOn(key)) {\r\n return false;\r\n }\r\n key = key.slice(2).replace(/Once$/, '');\r\n return (hasOwn(options, key[0].toLowerCase() + key.slice(1)) ||\r\n hasOwn(options, hyphenate(key)) ||\r\n hasOwn(options, key));\r\n}\n\n/**\r\n * mark the current rendering instance for asset resolution (e.g.\r\n * resolveComponent, resolveDirective) during render\r\n */\r\nlet currentRenderingInstance = null;\r\nlet currentScopeId = null;\r\n/**\r\n * Note: rendering calls maybe nested. The function returns the parent rendering\r\n * instance if present, which should be restored after the render is done:\r\n *\r\n * ```js\r\n * const prev = setCurrentRenderingInstance(i)\r\n * // ...render\r\n * setCurrentRenderingInstance(prev)\r\n * ```\r\n */\r\nfunction setCurrentRenderingInstance(instance) {\r\n const prev = currentRenderingInstance;\r\n currentRenderingInstance = instance;\r\n currentScopeId = (instance && instance.type.__scopeId) || null;\r\n return prev;\r\n}\r\n/**\r\n * Set scope id when creating hoisted vnodes.\r\n * @private compiler helper\r\n */\r\nfunction pushScopeId(id) {\r\n currentScopeId = id;\r\n}\r\n/**\r\n * Technically we no longer need this after 3.0.8 but we need to keep the same\r\n * API for backwards compat w/ code generated by compilers.\r\n * @private\r\n */\r\nfunction popScopeId() {\r\n currentScopeId = null;\r\n}\r\n/**\r\n * Only for backwards compat\r\n * @private\r\n */\r\nconst withScopeId = (_id) => withCtx;\r\n/**\r\n * Wrap a slot function to memoize current rendering instance\r\n * @private compiler helper\r\n */\r\nfunction withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot // false only\r\n) {\r\n if (!ctx)\r\n return fn;\r\n // already normalized\r\n if (fn._n) {\r\n return fn;\r\n }\r\n const renderFnWithContext = (...args) => {\r\n // If a user calls a compiled slot inside a template expression (#1745), it\r\n // can mess up block tracking, so by default we disable block tracking and\r\n // force bail out when invoking a compiled slot (indicated by the ._d flag).\r\n // This isn't necessary if rendering a compiled `<slot>`, so we flip the\r\n // ._d flag off when invoking the wrapped fn inside `renderSlot`.\r\n if (renderFnWithContext._d) {\r\n setBlockTracking(-1);\r\n }\r\n const prevInstance = setCurrentRenderingInstance(ctx);\r\n const res = fn(...args);\r\n setCurrentRenderingInstance(prevInstance);\r\n if (renderFnWithContext._d) {\r\n setBlockTracking(1);\r\n }\r\n if ((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) {\r\n devtoolsComponentUpdated(ctx);\r\n }\r\n return res;\r\n };\r\n // mark normalized to avoid duplicated wrapping\r\n renderFnWithContext._n = true;\r\n // mark this as compiled by default\r\n // this is used in vnode.ts -> normalizeChildren() to set the slot\r\n // rendering flag.\r\n renderFnWithContext._c = true;\r\n // disable block tracking by default\r\n renderFnWithContext._d = true;\r\n return renderFnWithContext;\r\n}\n\n/**\r\n * dev only flag to track whether $attrs was used during render.\r\n * If $attrs was used during render then the warning for failed attrs\r\n * fallthrough can be suppressed.\r\n */\r\nlet accessedAttrs = false;\r\nfunction markAttrsAccessed() {\r\n accessedAttrs = true;\r\n}\r\nfunction renderComponentRoot(instance) {\r\n const { type: Component, vnode, proxy, withProxy, props, propsOptions: [propsOptions], slots, attrs, emit, render, renderCache, data, setupState, ctx, inheritAttrs } = instance;\r\n let result;\r\n let fallthroughAttrs;\r\n const prev = setCurrentRenderingInstance(instance);\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n accessedAttrs = false;\r\n }\r\n try {\r\n if (vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */) {\r\n // withProxy is a proxy with a different `has` trap only for\r\n // runtime-compiled render functions using `with` block.\r\n const proxyToUse = withProxy || proxy;\r\n result = normalizeVNode(render.call(proxyToUse, proxyToUse, renderCache, props, setupState, data, ctx));\r\n fallthroughAttrs = attrs;\r\n }\r\n else {\r\n // functional\r\n const render = Component;\r\n // in dev, mark attrs accessed if optional props (attrs === props)\r\n if ((process.env.NODE_ENV !== 'production') && attrs === props) {\r\n markAttrsAccessed();\r\n }\r\n result = normalizeVNode(render.length > 1\r\n ? render(props, (process.env.NODE_ENV !== 'production')\r\n ? {\r\n get attrs() {\r\n markAttrsAccessed();\r\n return attrs;\r\n },\r\n slots,\r\n emit\r\n }\r\n : { attrs, slots, emit })\r\n : render(props, null /* we know it doesn't need it */));\r\n fallthroughAttrs = Component.props\r\n ? attrs\r\n : getFunctionalFallthrough(attrs);\r\n }\r\n }\r\n catch (err) {\r\n blockStack.length = 0;\r\n handleError(err, instance, 1 /* RENDER_FUNCTION */);\r\n result = createVNode(Comment);\r\n }\r\n // attr merging\r\n // in dev mode, comments are preserved, and it's possible for a template\r\n // to have comments along side the root element which makes it a fragment\r\n let root = result;\r\n let setRoot = undefined;\r\n if ((process.env.NODE_ENV !== 'production') &&\r\n result.patchFlag > 0 &&\r\n result.patchFlag & 2048 /* DEV_ROOT_FRAGMENT */) {\r\n [root, setRoot] = getChildRoot(result);\r\n }\r\n if (fallthroughAttrs && inheritAttrs !== false) {\r\n const keys = Object.keys(fallthroughAttrs);\r\n const { shapeFlag } = root;\r\n if (keys.length) {\r\n if (shapeFlag & (1 /* ELEMENT */ | 6 /* COMPONENT */)) {\r\n if (propsOptions && keys.some(isModelListener)) {\r\n // If a v-model listener (onUpdate:xxx) has a corresponding declared\r\n // prop, it indicates this component expects to handle v-model and\r\n // it should not fallthrough.\r\n // related: #1543, #1643, #1989\r\n fallthroughAttrs = filterModelListeners(fallthroughAttrs, propsOptions);\r\n }\r\n root = cloneVNode(root, fallthroughAttrs);\r\n }\r\n else if ((process.env.NODE_ENV !== 'production') && !accessedAttrs && root.type !== Comment) {\r\n const allAttrs = Object.keys(attrs);\r\n const eventAttrs = [];\r\n const extraAttrs = [];\r\n for (let i = 0, l = allAttrs.length; i < l; i++) {\r\n const key = allAttrs[i];\r\n if (isOn(key)) {\r\n // ignore v-model handlers when they fail to fallthrough\r\n if (!isModelListener(key)) {\r\n // remove `on`, lowercase first letter to reflect event casing\r\n // accurately\r\n eventAttrs.push(key[2].toLowerCase() + key.slice(3));\r\n }\r\n }\r\n else {\r\n extraAttrs.push(key);\r\n }\r\n }\r\n if (extraAttrs.length) {\r\n warn(`Extraneous non-props attributes (` +\r\n `${extraAttrs.join(', ')}) ` +\r\n `were passed to component but could not be automatically inherited ` +\r\n `because component renders fragment or text root nodes.`);\r\n }\r\n if (eventAttrs.length) {\r\n warn(`Extraneous non-emits event listeners (` +\r\n `${eventAttrs.join(', ')}) ` +\r\n `were passed to component but could not be automatically inherited ` +\r\n `because component renders fragment or text root nodes. ` +\r\n `If the listener is intended to be a component custom event listener only, ` +\r\n `declare it using the \"emits\" option.`);\r\n }\r\n }\r\n }\r\n }\r\n // inherit directives\r\n if (vnode.dirs) {\r\n if ((process.env.NODE_ENV !== 'production') && !isElementRoot(root)) {\r\n warn(`Runtime directive used on component with non-element root node. ` +\r\n `The directives will not function as intended.`);\r\n }\r\n // clone before mutating since the root may be a hoisted vnode\r\n root = cloneVNode(root);\r\n root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;\r\n }\r\n // inherit transition data\r\n if (vnode.transition) {\r\n if ((process.env.NODE_ENV !== 'production') && !isElementRoot(root)) {\r\n warn(`Component inside <Transition> renders non-element root node ` +\r\n `that cannot be animated.`);\r\n }\r\n root.transition = vnode.transition;\r\n }\r\n if ((process.env.NODE_ENV !== 'production') && setRoot) {\r\n setRoot(root);\r\n }\r\n else {\r\n result = root;\r\n }\r\n setCurrentRenderingInstance(prev);\r\n return result;\r\n}\r\n/**\r\n * dev only\r\n * In dev mode, template root level comments are rendered, which turns the\r\n * template into a fragment root, but we need to locate the single element\r\n * root for attrs and scope id processing.\r\n */\r\nconst getChildRoot = (vnode) => {\r\n const rawChildren = vnode.children;\r\n const dynamicChildren = vnode.dynamicChildren;\r\n const childRoot = filterSingleRoot(rawChildren);\r\n if (!childRoot) {\r\n return [vnode, undefined];\r\n }\r\n const index = rawChildren.indexOf(childRoot);\r\n const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1;\r\n const setRoot = (updatedRoot) => {\r\n rawChildren[index] = updatedRoot;\r\n if (dynamicChildren) {\r\n if (dynamicIndex > -1) {\r\n dynamicChildren[dynamicIndex] = updatedRoot;\r\n }\r\n else if (updatedRoot.patchFlag > 0) {\r\n vnode.dynamicChildren = [...dynamicChildren, updatedRoot];\r\n }\r\n }\r\n };\r\n return [normalizeVNode(childRoot), setRoot];\r\n};\r\nfunction filterSingleRoot(children) {\r\n let singleRoot;\r\n for (let i = 0; i < children.length; i++) {\r\n const child = children[i];\r\n if (isVNode(child)) {\r\n // ignore user comment\r\n if (child.type !== Comment || child.children === 'v-if') {\r\n if (singleRoot) {\r\n // has more than 1 non-comment child, return now\r\n return;\r\n }\r\n else {\r\n singleRoot = child;\r\n }\r\n }\r\n }\r\n else {\r\n return;\r\n }\r\n }\r\n return singleRoot;\r\n}\r\nconst getFunctionalFallthrough = (attrs) => {\r\n let res;\r\n for (const key in attrs) {\r\n if (key === 'class' || key === 'style' || isOn(key)) {\r\n (res || (res = {}))[key] = attrs[key];\r\n }\r\n }\r\n return res;\r\n};\r\nconst filterModelListeners = (attrs, props) => {\r\n const res = {};\r\n for (const key in attrs) {\r\n if (!isModelListener(key) || !(key.slice(9) in props)) {\r\n res[key] = attrs[key];\r\n }\r\n }\r\n return res;\r\n};\r\nconst isElementRoot = (vnode) => {\r\n return (vnode.shapeFlag & (6 /* COMPONENT */ | 1 /* ELEMENT */) ||\r\n vnode.type === Comment // potential v-if branch switch\r\n );\r\n};\r\nfunction shouldUpdateComponent(prevVNode, nextVNode, optimized) {\r\n const { props: prevProps, children: prevChildren, component } = prevVNode;\r\n const { props: nextProps, children: nextChildren, patchFlag } = nextVNode;\r\n const emits = component.emitsOptions;\r\n // Parent component's render function was hot-updated. Since this may have\r\n // caused the child component's slots content to have changed, we need to\r\n // force the child to update as well.\r\n if ((process.env.NODE_ENV !== 'production') && (prevChildren || nextChildren) && isHmrUpdating) {\r\n return true;\r\n }\r\n // force child update for runtime directive or transition on component vnode.\r\n if (nextVNode.dirs || nextVNode.transition) {\r\n return true;\r\n }\r\n if (optimized && patchFlag >= 0) {\r\n if (patchFlag & 1024 /* DYNAMIC_SLOTS */) {\r\n // slot content that references values that might have changed,\r\n // e.g. in a v-for\r\n return true;\r\n }\r\n if (patchFlag & 16 /* FULL_PROPS */) {\r\n if (!prevProps) {\r\n return !!nextProps;\r\n }\r\n // presence of this flag indicates props are always non-null\r\n return hasPropsChanged(prevProps, nextProps, emits);\r\n }\r\n else if (patchFlag & 8 /* PROPS */) {\r\n const dynamicProps = nextVNode.dynamicProps;\r\n for (let i = 0; i < dynamicProps.length; i++) {\r\n const key = dynamicProps[i];\r\n if (nextProps[key] !== prevProps[key] &&\r\n !isEmitListener(emits, key)) {\r\n return true;\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n // this path is only taken by manually written render functions\r\n // so presence of any children leads to a forced update\r\n if (prevChildren || nextChildren) {\r\n if (!nextChildren || !nextChildren.$stable) {\r\n return true;\r\n }\r\n }\r\n if (prevProps === nextProps) {\r\n return false;\r\n }\r\n if (!prevProps) {\r\n return !!nextProps;\r\n }\r\n if (!nextProps) {\r\n return true;\r\n }\r\n return hasPropsChanged(prevProps, nextProps, emits);\r\n }\r\n return false;\r\n}\r\nfunction hasPropsChanged(prevProps, nextProps, emitsOptions) {\r\n const nextKeys = Object.keys(nextProps);\r\n if (nextKeys.length !== Object.keys(prevProps).length) {\r\n return true;\r\n }\r\n for (let i = 0; i < nextKeys.length; i++) {\r\n const key = nextKeys[i];\r\n if (nextProps[key] !== prevProps[key] &&\r\n !isEmitListener(emitsOptions, key)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}\r\nfunction updateHOCHostEl({ vnode, parent }, el // HostNode\r\n) {\r\n while (parent && parent.subTree === vnode) {\r\n (vnode = parent.vnode).el = el;\r\n parent = parent.parent;\r\n }\r\n}\n\nconst isSuspense = (type) => type.__isSuspense;\r\n// Suspense exposes a component-like API, and is treated like a component\r\n// in the compiler, but internally it's a special built-in type that hooks\r\n// directly into the renderer.\r\nconst SuspenseImpl = {\r\n name: 'Suspense',\r\n // In order to make Suspense tree-shakable, we need to avoid importing it\r\n // directly in the renderer. The renderer checks for the __isSuspense flag\r\n // on a vnode's type and calls the `process` method, passing in renderer\r\n // internals.\r\n __isSuspense: true,\r\n process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, \r\n // platform-specific impl passed from renderer\r\n rendererInternals) {\r\n if (n1 == null) {\r\n mountSuspense(n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals);\r\n }\r\n else {\r\n patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotScopeIds, optimized, rendererInternals);\r\n }\r\n },\r\n hydrate: hydrateSuspense,\r\n create: createSuspenseBoundary,\r\n normalize: normalizeSuspenseChildren\r\n};\r\n// Force-casted public typing for h and TSX props inference\r\nconst Suspense = (SuspenseImpl );\r\nfunction triggerEvent(vnode, name) {\r\n const eventListener = vnode.props && vnode.props[name];\r\n if (isFunction(eventListener)) {\r\n eventListener();\r\n }\r\n}\r\nfunction mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals) {\r\n const { p: patch, o: { createElement } } = rendererInternals;\r\n const hiddenContainer = createElement('div');\r\n const suspense = (vnode.suspense = createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals));\r\n // start mounting the content subtree in an off-dom container\r\n patch(null, (suspense.pendingBranch = vnode.ssContent), hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds);\r\n // now check if we have encountered any async deps\r\n if (suspense.deps > 0) {\r\n // has async\r\n // invoke @fallback event\r\n triggerEvent(vnode, 'onPending');\r\n triggerEvent(vnode, 'onFallback');\r\n // mount the fallback tree\r\n patch(null, vnode.ssFallback, container, anchor, parentComponent, null, // fallback tree will not have suspense context\r\n isSVG, slotScopeIds);\r\n setActiveBranch(suspense, vnode.ssFallback);\r\n }\r\n else {\r\n // Suspense has no async deps. Just resolve.\r\n suspense.resolve();\r\n }\r\n}\r\nfunction patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) {\r\n const suspense = (n2.suspense = n1.suspense);\r\n suspense.vnode = n2;\r\n n2.el = n1.el;\r\n const newBranch = n2.ssContent;\r\n const newFallback = n2.ssFallback;\r\n const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense;\r\n if (pendingBranch) {\r\n suspense.pendingBranch = newBranch;\r\n if (isSameVNodeType(newBranch, pendingBranch)) {\r\n // same root type but content may have changed.\r\n patch(pendingBranch, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized);\r\n if (suspense.deps <= 0) {\r\n suspense.resolve();\r\n }\r\n else if (isInFallback) {\r\n patch(activeBranch, newFallback, container, anchor, parentComponent, null, // fallback tree will not have suspense context\r\n isSVG, slotScopeIds, optimized);\r\n setActiveBranch(suspense, newFallback);\r\n }\r\n }\r\n else {\r\n // toggled before pending tree is resolved\r\n suspense.pendingId++;\r\n if (isHydrating) {\r\n // if toggled before hydration is finished, the current DOM tree is\r\n // no longer valid. set it as the active branch so it will be unmounted\r\n // when resolved\r\n suspense.isHydrating = false;\r\n suspense.activeBranch = pendingBranch;\r\n }\r\n else {\r\n unmount(pendingBranch, parentComponent, suspense);\r\n }\r\n // increment pending ID. this is used to invalidate async callbacks\r\n // reset suspense state\r\n suspense.deps = 0;\r\n // discard effects from pending branch\r\n suspense.effects.length = 0;\r\n // discard previous container\r\n suspense.hiddenContainer = createElement('div');\r\n if (isInFallback) {\r\n // already in fallback state\r\n patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized);\r\n if (suspense.deps <= 0) {\r\n suspense.resolve();\r\n }\r\n else {\r\n patch(activeBranch, newFallback, container, anchor, parentComponent, null, // fallback tree will not have suspense context\r\n isSVG, slotScopeIds, optimized);\r\n setActiveBranch(suspense, newFallback);\r\n }\r\n }\r\n else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {\r\n // toggled \"back\" to current active branch\r\n patch(activeBranch, newBranch, container, anchor, parentComponent, suspense, isSVG, slotScopeIds, optimized);\r\n // force resolve\r\n suspense.resolve(true);\r\n }\r\n else {\r\n // switched to a 3rd branch\r\n patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized);\r\n if (suspense.deps <= 0) {\r\n suspense.resolve();\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {\r\n // root did not change, just normal patch\r\n patch(activeBranch, newBranch, container, anchor, parentComponent, suspense, isSVG, slotScopeIds, optimized);\r\n setActiveBranch(suspense, newBranch);\r\n }\r\n else {\r\n // root node toggled\r\n // invoke @pending event\r\n triggerEvent(n2, 'onPending');\r\n // mount pending branch in off-dom container\r\n suspense.pendingBranch = newBranch;\r\n suspense.pendingId++;\r\n patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized);\r\n if (suspense.deps <= 0) {\r\n // incoming branch has no async deps, resolve now.\r\n suspense.resolve();\r\n }\r\n else {\r\n const { timeout, pendingId } = suspense;\r\n if (timeout > 0) {\r\n setTimeout(() => {\r\n if (suspense.pendingId === pendingId) {\r\n suspense.fallback(newFallback);\r\n }\r\n }, timeout);\r\n }\r\n else if (timeout === 0) {\r\n suspense.fallback(newFallback);\r\n }\r\n }\r\n }\r\n }\r\n}\r\nlet hasWarned = false;\r\nfunction createSuspenseBoundary(vnode, parent, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals, isHydrating = false) {\r\n /* istanbul ignore if */\r\n if ((process.env.NODE_ENV !== 'production') && !false && !hasWarned) {\r\n hasWarned = true;\r\n // @ts-ignore `console.info` cannot be null error\r\n console[console.info ? 'info' : 'log'](`<Suspense> is an experimental feature and its API will likely change.`);\r\n }\r\n const { p: patch, m: move, um: unmount, n: next, o: { parentNode, remove } } = rendererInternals;\r\n const timeout = toNumber(vnode.props && vnode.props.timeout);\r\n const suspense = {\r\n vnode,\r\n parent,\r\n parentComponent,\r\n isSVG,\r\n container,\r\n hiddenContainer,\r\n anchor,\r\n deps: 0,\r\n pendingId: 0,\r\n timeout: typeof timeout === 'number' ? timeout : -1,\r\n activeBranch: null,\r\n pendingBranch: null,\r\n isInFallback: true,\r\n isHydrating,\r\n isUnmounted: false,\r\n effects: [],\r\n resolve(resume = false) {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n if (!resume && !suspense.pendingBranch) {\r\n throw new Error(`suspense.resolve() is called without a pending branch.`);\r\n }\r\n if (suspense.isUnmounted) {\r\n throw new Error(`suspense.resolve() is called on an already unmounted suspense boundary.`);\r\n }\r\n }\r\n const { vnode, activeBranch, pendingBranch, pendingId, effects, parentComponent, container } = suspense;\r\n if (suspense.isHydrating) {\r\n suspense.isHydrating = false;\r\n }\r\n else if (!resume) {\r\n const delayEnter = activeBranch &&\r\n pendingBranch.transition &&\r\n pendingBranch.transition.mode === 'out-in';\r\n if (delayEnter) {\r\n activeBranch.transition.afterLeave = () => {\r\n if (pendingId === suspense.pendingId) {\r\n move(pendingBranch, container, anchor, 0 /* ENTER */);\r\n }\r\n };\r\n }\r\n // this is initial anchor on mount\r\n let { anchor } = suspense;\r\n // unmount current active tree\r\n if (activeBranch) {\r\n // if the fallback tree was mounted, it may have been moved\r\n // as part of a parent suspense. get the latest anchor for insertion\r\n anchor = next(activeBranch);\r\n unmount(activeBranch, parentComponent, suspense, true);\r\n }\r\n if (!delayEnter) {\r\n // move content from off-dom container to actual container\r\n move(pendingBranch, container, anchor, 0 /* ENTER */);\r\n }\r\n }\r\n setActiveBranch(suspense, pendingBranch);\r\n suspense.pendingBranch = null;\r\n suspense.isInFallback = false;\r\n // flush buffered effects\r\n // check if there is a pending parent suspense\r\n let parent = suspense.parent;\r\n let hasUnresolvedAncestor = false;\r\n while (parent) {\r\n if (parent.pendingBranch) {\r\n // found a pending parent suspense, merge buffered post jobs\r\n // into that parent\r\n parent.effects.push(...effects);\r\n hasUnresolvedAncestor = true;\r\n break;\r\n }\r\n parent = parent.parent;\r\n }\r\n // no pending parent suspense, flush all jobs\r\n if (!hasUnresolvedAncestor) {\r\n queuePostFlushCb(effects);\r\n }\r\n suspense.effects = [];\r\n // invoke @resolve event\r\n triggerEvent(vnode, 'onResolve');\r\n },\r\n fallback(fallbackVNode) {\r\n if (!suspense.pendingBranch) {\r\n return;\r\n }\r\n const { vnode, activeBranch, parentComponent, container, isSVG } = suspense;\r\n // invoke @fallback event\r\n triggerEvent(vnode, 'onFallback');\r\n const anchor = next(activeBranch);\r\n const mountFallback = () => {\r\n if (!suspense.isInFallback) {\r\n return;\r\n }\r\n // mount the fallback tree\r\n patch(null, fallbackVNode, container, anchor, parentComponent, null, // fallback tree will not have suspense context\r\n isSVG, slotScopeIds, optimized);\r\n setActiveBranch(suspense, fallbackVNode);\r\n };\r\n const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === 'out-in';\r\n if (delayEnter) {\r\n activeBranch.transition.afterLeave = mountFallback;\r\n }\r\n suspense.isInFallback = true;\r\n // unmount current active branch\r\n unmount(activeBranch, parentComponent, null, // no suspense so unmount hooks fire now\r\n true // shouldRemove\r\n );\r\n if (!delayEnter) {\r\n mountFallback();\r\n }\r\n },\r\n move(container, anchor, type) {\r\n suspense.activeBranch &&\r\n move(suspense.activeBranch, container, anchor, type);\r\n suspense.container = container;\r\n },\r\n next() {\r\n return suspense.activeBranch && next(suspense.activeBranch);\r\n },\r\n registerDep(instance, setupRenderEffect) {\r\n const isInPendingSuspense = !!suspense.pendingBranch;\r\n if (isInPendingSuspense) {\r\n suspense.deps++;\r\n }\r\n const hydratedEl = instance.vnode.el;\r\n instance\r\n .asyncDep.catch(err => {\r\n handleError(err, instance, 0 /* SETUP_FUNCTION */);\r\n })\r\n .then(asyncSetupResult => {\r\n // retry when the setup() promise resolves.\r\n // component may have been unmounted before resolve.\r\n if (instance.isUnmounted ||\r\n suspense.isUnmounted ||\r\n suspense.pendingId !== instance.suspenseId) {\r\n return;\r\n }\r\n // retry from this component\r\n instance.asyncResolved = true;\r\n const { vnode } = instance;\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n pushWarningContext(vnode);\r\n }\r\n handleSetupResult(instance, asyncSetupResult, false);\r\n if (hydratedEl) {\r\n // vnode may have been replaced if an update happened before the\r\n // async dep is resolved.\r\n vnode.el = hydratedEl;\r\n }\r\n const placeholder = !hydratedEl && instance.subTree.el;\r\n setupRenderEffect(instance, vnode, \r\n // component may have been moved before resolve.\r\n // if this is not a hydration, instance.subTree will be the comment\r\n // placeholder.\r\n parentNode(hydratedEl || instance.subTree.el), \r\n // anchor will not be used if this is hydration, so only need to\r\n // consider the comment placeholder case.\r\n hydratedEl ? null : next(instance.subTree), suspense, isSVG, optimized);\r\n if (placeholder) {\r\n remove(placeholder);\r\n }\r\n updateHOCHostEl(instance, vnode.el);\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n popWarningContext();\r\n }\r\n // only decrease deps count if suspense is not already resolved\r\n if (isInPendingSuspense && --suspense.deps === 0) {\r\n suspense.resolve();\r\n }\r\n });\r\n },\r\n unmount(parentSuspense, doRemove) {\r\n suspense.isUnmounted = true;\r\n if (suspense.activeBranch) {\r\n unmount(suspense.activeBranch, parentComponent, parentSuspense, doRemove);\r\n }\r\n if (suspense.pendingBranch) {\r\n unmount(suspense.pendingBranch, parentComponent, parentSuspense, doRemove);\r\n }\r\n }\r\n };\r\n return suspense;\r\n}\r\nfunction hydrateSuspense(node, vnode, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals, hydrateNode) {\r\n /* eslint-disable no-restricted-globals */\r\n const suspense = (vnode.suspense = createSuspenseBoundary(vnode, parentSuspense, parentComponent, node.parentNode, document.createElement('div'), null, isSVG, slotScopeIds, optimized, rendererInternals, true /* hydrating */));\r\n // there are two possible scenarios for server-rendered suspense:\r\n // - success: ssr content should be fully resolved\r\n // - failure: ssr content should be the fallback branch.\r\n // however, on the client we don't really know if it has failed or not\r\n // attempt to hydrate the DOM assuming it has succeeded, but we still\r\n // need to construct a suspense boundary first\r\n const result = hydrateNode(node, (suspense.pendingBranch = vnode.ssContent), parentComponent, suspense, slotScopeIds, optimized);\r\n if (suspense.deps === 0) {\r\n suspense.resolve();\r\n }\r\n return result;\r\n /* eslint-enable no-restricted-globals */\r\n}\r\nfunction normalizeSuspenseChildren(vnode) {\r\n const { shapeFlag, children } = vnode;\r\n const isSlotChildren = shapeFlag & 32 /* SLOTS_CHILDREN */;\r\n vnode.ssContent = normalizeSuspenseSlot(isSlotChildren ? children.default : children);\r\n vnode.ssFallback = isSlotChildren\r\n ? normalizeSuspenseSlot(children.fallback)\r\n : createVNode(Comment);\r\n}\r\nfunction normalizeSuspenseSlot(s) {\r\n let block;\r\n if (isFunction(s)) {\r\n const trackBlock = isBlockTreeEnabled && s._c;\r\n if (trackBlock) {\r\n // disableTracking: false\r\n // allow block tracking for compiled slots\r\n // (see ./componentRenderContext.ts)\r\n s._d = false;\r\n openBlock();\r\n }\r\n s = s();\r\n if (trackBlock) {\r\n s._d = true;\r\n block = currentBlock;\r\n closeBlock();\r\n }\r\n }\r\n if (isArray(s)) {\r\n const singleChild = filterSingleRoot(s);\r\n if ((process.env.NODE_ENV !== 'production') && !singleChild) {\r\n warn(`<Suspense> slots expect a single root node.`);\r\n }\r\n s = singleChild;\r\n }\r\n s = normalizeVNode(s);\r\n if (block && !s.dynamicChildren) {\r\n s.dynamicChildren = block.filter(c => c !== s);\r\n }\r\n return s;\r\n}\r\nfunction queueEffectWithSuspense(fn, suspense) {\r\n if (suspense && suspense.pendingBranch) {\r\n if (isArray(fn)) {\r\n suspense.effects.push(...fn);\r\n }\r\n else {\r\n suspense.effects.push(fn);\r\n }\r\n }\r\n else {\r\n queuePostFlushCb(fn);\r\n }\r\n}\r\nfunction setActiveBranch(suspense, branch) {\r\n suspense.activeBranch = branch;\r\n const { vnode, parentComponent } = suspense;\r\n const el = (vnode.el = branch.el);\r\n // in case suspense is the root node of a component,\r\n // recursively update the HOC el\r\n if (parentComponent && parentComponent.subTree === vnode) {\r\n parentComponent.vnode.el = el;\r\n updateHOCHostEl(parentComponent, el);\r\n }\r\n}\n\nfunction provide(key, value) {\r\n if (!currentInstance) {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`provide() can only be used inside setup().`);\r\n }\r\n }\r\n else {\r\n let provides = currentInstance.provides;\r\n // by default an instance inherits its parent's provides object\r\n // but when it needs to provide values of its own, it creates its\r\n // own provides object using parent provides object as prototype.\r\n // this way in `inject` we can simply look up injections from direct\r\n // parent and let the prototype chain do the work.\r\n const parentProvides = currentInstance.parent && currentInstance.parent.provides;\r\n if (parentProvides === provides) {\r\n provides = currentInstance.provides = Object.create(parentProvides);\r\n }\r\n // TS doesn't allow symbol as index type\r\n provides[key] = value;\r\n }\r\n}\r\nfunction inject(key, defaultValue, treatDefaultAsFactory = false) {\r\n // fallback to `currentRenderingInstance` so that this can be called in\r\n // a functional component\r\n const instance = currentInstance || currentRenderingInstance;\r\n if (instance) {\r\n // #2400\r\n // to support `app.use` plugins,\r\n // fallback to appContext's `provides` if the instance is at root\r\n const provides = instance.parent == null\r\n ? instance.vnode.appContext && instance.vnode.appContext.provides\r\n : instance.parent.provides;\r\n if (provides && key in provides) {\r\n // TS doesn't allow symbol as index type\r\n return provides[key];\r\n }\r\n else if (arguments.length > 1) {\r\n return treatDefaultAsFactory && isFunction(defaultValue)\r\n ? defaultValue.call(instance.proxy)\r\n : defaultValue;\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`injection \"${String(key)}\" not found.`);\r\n }\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`inject() can only be used inside setup() or functional components.`);\r\n }\r\n}\n\n// Simple effect.\r\nfunction watchEffect(effect, options) {\r\n return doWatch(effect, null, options);\r\n}\r\nfunction watchPostEffect(effect, options) {\r\n return doWatch(effect, null, ((process.env.NODE_ENV !== 'production')\r\n ? Object.assign(Object.assign({}, options), { flush: 'post' }) : { flush: 'post' }));\r\n}\r\nfunction watchSyncEffect(effect, options) {\r\n return doWatch(effect, null, ((process.env.NODE_ENV !== 'production')\r\n ? Object.assign(Object.assign({}, options), { flush: 'sync' }) : { flush: 'sync' }));\r\n}\r\n// initial value for watchers to trigger on undefined initial values\r\nconst INITIAL_WATCHER_VALUE = {};\r\n// implementation\r\nfunction watch(source, cb, options) {\r\n if ((process.env.NODE_ENV !== 'production') && !isFunction(cb)) {\r\n warn(`\\`watch(fn, options?)\\` signature has been moved to a separate API. ` +\r\n `Use \\`watchEffect(fn, options?)\\` instead. \\`watch\\` now only ` +\r\n `supports \\`watch(source, cb, options?) signature.`);\r\n }\r\n return doWatch(source, cb, options);\r\n}\r\nfunction doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EMPTY_OBJ) {\r\n if ((process.env.NODE_ENV !== 'production') && !cb) {\r\n if (immediate !== undefined) {\r\n warn(`watch() \"immediate\" option is only respected when using the ` +\r\n `watch(source, callback, options?) signature.`);\r\n }\r\n if (deep !== undefined) {\r\n warn(`watch() \"deep\" option is only respected when using the ` +\r\n `watch(source, callback, options?) signature.`);\r\n }\r\n }\r\n const warnInvalidSource = (s) => {\r\n warn(`Invalid watch source: `, s, `A watch source can only be a getter/effect function, a ref, ` +\r\n `a reactive object, or an array of these types.`);\r\n };\r\n const instance = currentInstance;\r\n let getter;\r\n let forceTrigger = false;\r\n let isMultiSource = false;\r\n if (isRef(source)) {\r\n getter = () => source.value;\r\n forceTrigger = isShallow$1(source);\r\n }\r\n else if (isReactive(source)) {\r\n getter = () => source;\r\n deep = true;\r\n }\r\n else if (isArray(source)) {\r\n isMultiSource = true;\r\n forceTrigger = source.some(s => isReactive(s) || isShallow$1(s));\r\n getter = () => source.map(s => {\r\n if (isRef(s)) {\r\n return s.value;\r\n }\r\n else if (isReactive(s)) {\r\n return traverse(s);\r\n }\r\n else if (isFunction(s)) {\r\n return callWithErrorHandling(s, instance, 2 /* WATCH_GETTER */);\r\n }\r\n else {\r\n (process.env.NODE_ENV !== 'production') && warnInvalidSource(s);\r\n }\r\n });\r\n }\r\n else if (isFunction(source)) {\r\n if (cb) {\r\n // getter with cb\r\n getter = () => callWithErrorHandling(source, instance, 2 /* WATCH_GETTER */);\r\n }\r\n else {\r\n // no cb -> simple effect\r\n getter = () => {\r\n if (instance && instance.isUnmounted) {\r\n return;\r\n }\r\n if (cleanup) {\r\n cleanup();\r\n }\r\n return callWithAsyncErrorHandling(source, instance, 3 /* WATCH_CALLBACK */, [onCleanup]);\r\n };\r\n }\r\n }\r\n else {\r\n getter = NOOP;\r\n (process.env.NODE_ENV !== 'production') && warnInvalidSource(source);\r\n }\r\n if (cb && deep) {\r\n const baseGetter = getter;\r\n getter = () => traverse(baseGetter());\r\n }\r\n let cleanup;\r\n let onCleanup = (fn) => {\r\n cleanup = effect.onStop = () => {\r\n callWithErrorHandling(fn, instance, 4 /* WATCH_CLEANUP */);\r\n };\r\n };\r\n // in SSR there is no need to setup an actual effect, and it should be noop\r\n // unless it's eager\r\n if (isInSSRComponentSetup) {\r\n // we will also not call the invalidate callback (+ runner is not set up)\r\n onCleanup = NOOP;\r\n if (!cb) {\r\n getter();\r\n }\r\n else if (immediate) {\r\n callWithAsyncErrorHandling(cb, instance, 3 /* WATCH_CALLBACK */, [\r\n getter(),\r\n isMultiSource ? [] : undefined,\r\n onCleanup\r\n ]);\r\n }\r\n return NOOP;\r\n }\r\n let oldValue = isMultiSource ? [] : INITIAL_WATCHER_VALUE;\r\n const job = () => {\r\n if (!effect.active) {\r\n return;\r\n }\r\n if (cb) {\r\n // watch(source, cb)\r\n const newValue = effect.run();\r\n if (deep ||\r\n forceTrigger ||\r\n (isMultiSource\r\n ? newValue.some((v, i) => hasChanged(v, oldValue[i]))\r\n : hasChanged(newValue, oldValue)) ||\r\n (false )) {\r\n // cleanup before running cb again\r\n if (cleanup) {\r\n cleanup();\r\n }\r\n callWithAsyncErrorHandling(cb, instance, 3 /* WATCH_CALLBACK */, [\r\n newValue,\r\n // pass undefined as the old value when it's changed for the first time\r\n oldValue === INITIAL_WATCHER_VALUE ? undefined : oldValue,\r\n onCleanup\r\n ]);\r\n oldValue = newValue;\r\n }\r\n }\r\n else {\r\n // watchEffect\r\n effect.run();\r\n }\r\n };\r\n // important: mark the job as a watcher callback so that scheduler knows\r\n // it is allowed to self-trigger (#1727)\r\n job.allowRecurse = !!cb;\r\n let scheduler;\r\n if (flush === 'sync') {\r\n scheduler = job; // the scheduler function gets called directly\r\n }\r\n else if (flush === 'post') {\r\n scheduler = () => queuePostRenderEffect(job, instance && instance.suspense);\r\n }\r\n else {\r\n // default: 'pre'\r\n scheduler = () => queuePreFlushCb(job);\r\n }\r\n const effect = new ReactiveEffect(getter, scheduler);\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n effect.onTrack = onTrack;\r\n effect.onTrigger = onTrigger;\r\n }\r\n // initial run\r\n if (cb) {\r\n if (immediate) {\r\n job();\r\n }\r\n else {\r\n oldValue = effect.run();\r\n }\r\n }\r\n else if (flush === 'post') {\r\n queuePostRenderEffect(effect.run.bind(effect), instance && instance.suspense);\r\n }\r\n else {\r\n effect.run();\r\n }\r\n return () => {\r\n effect.stop();\r\n if (instance && instance.scope) {\r\n remove(instance.scope.effects, effect);\r\n }\r\n };\r\n}\r\n// this.$watch\r\nfunction instanceWatch(source, value, options) {\r\n const publicThis = this.proxy;\r\n const getter = isString(source)\r\n ? source.includes('.')\r\n ? createPathGetter(publicThis, source)\r\n : () => publicThis[source]\r\n : source.bind(publicThis, publicThis);\r\n let cb;\r\n if (isFunction(value)) {\r\n cb = value;\r\n }\r\n else {\r\n cb = value.handler;\r\n options = value;\r\n }\r\n const cur = currentInstance;\r\n setCurrentInstance(this);\r\n const res = doWatch(getter, cb.bind(publicThis), options);\r\n if (cur) {\r\n setCurrentInstance(cur);\r\n }\r\n else {\r\n unsetCurrentInstance();\r\n }\r\n return res;\r\n}\r\nfunction createPathGetter(ctx, path) {\r\n const segments = path.split('.');\r\n return () => {\r\n let cur = ctx;\r\n for (let i = 0; i < segments.length && cur; i++) {\r\n cur = cur[segments[i]];\r\n }\r\n return cur;\r\n };\r\n}\r\nfunction traverse(value, seen) {\r\n if (!isObject(value) || value[\"__v_skip\" /* SKIP */]) {\r\n return value;\r\n }\r\n seen = seen || new Set();\r\n if (seen.has(value)) {\r\n return value;\r\n }\r\n seen.add(value);\r\n if (isRef(value)) {\r\n traverse(value.value, seen);\r\n }\r\n else if (isArray(value)) {\r\n for (let i = 0; i < value.length; i++) {\r\n traverse(value[i], seen);\r\n }\r\n }\r\n else if (isSet(value) || isMap(value)) {\r\n value.forEach((v) => {\r\n traverse(v, seen);\r\n });\r\n }\r\n else if (isPlainObject(value)) {\r\n for (const key in value) {\r\n traverse(value[key], seen);\r\n }\r\n }\r\n return value;\r\n}\n\nfunction useTransitionState() {\r\n const state = {\r\n isMounted: false,\r\n isLeaving: false,\r\n isUnmounting: false,\r\n leavingVNodes: new Map()\r\n };\r\n onMounted(() => {\r\n state.isMounted = true;\r\n });\r\n onBeforeUnmount(() => {\r\n state.isUnmounting = true;\r\n });\r\n return state;\r\n}\r\nconst TransitionHookValidator = [Function, Array];\r\nconst BaseTransitionImpl = {\r\n name: `BaseTransition`,\r\n props: {\r\n mode: String,\r\n appear: Boolean,\r\n persisted: Boolean,\r\n // enter\r\n onBeforeEnter: TransitionHookValidator,\r\n onEnter: TransitionHookValidator,\r\n onAfterEnter: TransitionHookValidator,\r\n onEnterCancelled: TransitionHookValidator,\r\n // leave\r\n onBeforeLeave: TransitionHookValidator,\r\n onLeave: TransitionHookValidator,\r\n onAfterLeave: TransitionHookValidator,\r\n onLeaveCancelled: TransitionHookValidator,\r\n // appear\r\n onBeforeAppear: TransitionHookValidator,\r\n onAppear: TransitionHookValidator,\r\n onAfterAppear: TransitionHookValidator,\r\n onAppearCancelled: TransitionHookValidator\r\n },\r\n setup(props, { slots }) {\r\n const instance = getCurrentInstance();\r\n const state = useTransitionState();\r\n let prevTransitionKey;\r\n return () => {\r\n const children = slots.default && getTransitionRawChildren(slots.default(), true);\r\n if (!children || !children.length) {\r\n return;\r\n }\r\n let child = children[0];\r\n if (children.length > 1) {\r\n let hasFound = false;\r\n // locate first non-comment child\r\n for (const c of children) {\r\n if (c.type !== Comment) {\r\n if ((process.env.NODE_ENV !== 'production') && hasFound) {\r\n // warn more than one non-comment child\r\n warn('<transition> can only be used on a single element or component. ' +\r\n 'Use <transition-group> for lists.');\r\n break;\r\n }\r\n child = c;\r\n hasFound = true;\r\n if (!(process.env.NODE_ENV !== 'production'))\r\n break;\r\n }\r\n }\r\n }\r\n // there's no need to track reactivity for these props so use the raw\r\n // props for a bit better perf\r\n const rawProps = toRaw(props);\r\n const { mode } = rawProps;\r\n // check mode\r\n if ((process.env.NODE_ENV !== 'production') &&\r\n mode &&\r\n mode !== 'in-out' &&\r\n mode !== 'out-in' &&\r\n mode !== 'default') {\r\n warn(`invalid <transition> mode: ${mode}`);\r\n }\r\n if (state.isLeaving) {\r\n return emptyPlaceholder(child);\r\n }\r\n // in the case of <transition><keep-alive/></transition>, we need to\r\n // compare the type of the kept-alive children.\r\n const innerChild = getKeepAliveChild(child);\r\n if (!innerChild) {\r\n return emptyPlaceholder(child);\r\n }\r\n const enterHooks = resolveTransitionHooks(innerChild, rawProps, state, instance);\r\n setTransitionHooks(innerChild, enterHooks);\r\n const oldChild = instance.subTree;\r\n const oldInnerChild = oldChild && getKeepAliveChild(oldChild);\r\n let transitionKeyChanged = false;\r\n const { getTransitionKey } = innerChild.type;\r\n if (getTransitionKey) {\r\n const key = getTransitionKey();\r\n if (prevTransitionKey === undefined) {\r\n prevTransitionKey = key;\r\n }\r\n else if (key !== prevTransitionKey) {\r\n prevTransitionKey = key;\r\n transitionKeyChanged = true;\r\n }\r\n }\r\n // handle mode\r\n if (oldInnerChild &&\r\n oldInnerChild.type !== Comment &&\r\n (!isSameVNodeType(innerChild, oldInnerChild) || transitionKeyChanged)) {\r\n const leavingHooks = resolveTransitionHooks(oldInnerChild, rawProps, state, instance);\r\n // update old tree's hooks in case of dynamic transition\r\n setTransitionHooks(oldInnerChild, leavingHooks);\r\n // switching between different views\r\n if (mode === 'out-in') {\r\n state.isLeaving = true;\r\n // return placeholder node and queue update when leave finishes\r\n leavingHooks.afterLeave = () => {\r\n state.isLeaving = false;\r\n instance.update();\r\n };\r\n return emptyPlaceholder(child);\r\n }\r\n else if (mode === 'in-out' && innerChild.type !== Comment) {\r\n leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => {\r\n const leavingVNodesCache = getLeavingNodesForType(state, oldInnerChild);\r\n leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild;\r\n // early removal callback\r\n el._leaveCb = () => {\r\n earlyRemove();\r\n el._leaveCb = undefined;\r\n delete enterHooks.delayedLeave;\r\n };\r\n enterHooks.delayedLeave = delayedLeave;\r\n };\r\n }\r\n }\r\n return child;\r\n };\r\n }\r\n};\r\n// export the public type for h/tsx inference\r\n// also to avoid inline import() in generated d.ts files\r\nconst BaseTransition = BaseTransitionImpl;\r\nfunction getLeavingNodesForType(state, vnode) {\r\n const { leavingVNodes } = state;\r\n let leavingVNodesCache = leavingVNodes.get(vnode.type);\r\n if (!leavingVNodesCache) {\r\n leavingVNodesCache = Object.create(null);\r\n leavingVNodes.set(vnode.type, leavingVNodesCache);\r\n }\r\n return leavingVNodesCache;\r\n}\r\n// The transition hooks are attached to the vnode as vnode.transition\r\n// and will be called at appropriate timing in the renderer.\r\nfunction resolveTransitionHooks(vnode, props, state, instance) {\r\n const { appear, mode, persisted = false, onBeforeEnter, onEnter, onAfterEnter, onEnterCancelled, onBeforeLeave, onLeave, onAfterLeave, onLeaveCancelled, onBeforeAppear, onAppear, onAfterAppear, onAppearCancelled } = props;\r\n const key = String(vnode.key);\r\n const leavingVNodesCache = getLeavingNodesForType(state, vnode);\r\n const callHook = (hook, args) => {\r\n hook &&\r\n callWithAsyncErrorHandling(hook, instance, 9 /* TRANSITION_HOOK */, args);\r\n };\r\n const callAsyncHook = (hook, args) => {\r\n const done = args[1];\r\n callHook(hook, args);\r\n if (isArray(hook)) {\r\n if (hook.every(hook => hook.length <= 1))\r\n done();\r\n }\r\n else if (hook.length <= 1) {\r\n done();\r\n }\r\n };\r\n const hooks = {\r\n mode,\r\n persisted,\r\n beforeEnter(el) {\r\n let hook = onBeforeEnter;\r\n if (!state.isMounted) {\r\n if (appear) {\r\n hook = onBeforeAppear || onBeforeEnter;\r\n }\r\n else {\r\n return;\r\n }\r\n }\r\n // for same element (v-show)\r\n if (el._leaveCb) {\r\n el._leaveCb(true /* cancelled */);\r\n }\r\n // for toggled element with same key (v-if)\r\n const leavingVNode = leavingVNodesCache[key];\r\n if (leavingVNode &&\r\n isSameVNodeType(vnode, leavingVNode) &&\r\n leavingVNode.el._leaveCb) {\r\n // force early removal (not cancelled)\r\n leavingVNode.el._leaveCb();\r\n }\r\n callHook(hook, [el]);\r\n },\r\n enter(el) {\r\n let hook = onEnter;\r\n let afterHook = onAfterEnter;\r\n let cancelHook = onEnterCancelled;\r\n if (!state.isMounted) {\r\n if (appear) {\r\n hook = onAppear || onEnter;\r\n afterHook = onAfterAppear || onAfterEnter;\r\n cancelHook = onAppearCancelled || onEnterCancelled;\r\n }\r\n else {\r\n return;\r\n }\r\n }\r\n let called = false;\r\n const done = (el._enterCb = (cancelled) => {\r\n if (called)\r\n return;\r\n called = true;\r\n if (cancelled) {\r\n callHook(cancelHook, [el]);\r\n }\r\n else {\r\n callHook(afterHook, [el]);\r\n }\r\n if (hooks.delayedLeave) {\r\n hooks.delayedLeave();\r\n }\r\n el._enterCb = undefined;\r\n });\r\n if (hook) {\r\n callAsyncHook(hook, [el, done]);\r\n }\r\n else {\r\n done();\r\n }\r\n },\r\n leave(el, remove) {\r\n const key = String(vnode.key);\r\n if (el._enterCb) {\r\n el._enterCb(true /* cancelled */);\r\n }\r\n if (state.isUnmounting) {\r\n return remove();\r\n }\r\n callHook(onBeforeLeave, [el]);\r\n let called = false;\r\n const done = (el._leaveCb = (cancelled) => {\r\n if (called)\r\n return;\r\n called = true;\r\n remove();\r\n if (cancelled) {\r\n callHook(onLeaveCancelled, [el]);\r\n }\r\n else {\r\n callHook(onAfterLeave, [el]);\r\n }\r\n el._leaveCb = undefined;\r\n if (leavingVNodesCache[key] === vnode) {\r\n delete leavingVNodesCache[key];\r\n }\r\n });\r\n leavingVNodesCache[key] = vnode;\r\n if (onLeave) {\r\n callAsyncHook(onLeave, [el, done]);\r\n }\r\n else {\r\n done();\r\n }\r\n },\r\n clone(vnode) {\r\n return resolveTransitionHooks(vnode, props, state, instance);\r\n }\r\n };\r\n return hooks;\r\n}\r\n// the placeholder really only handles one special case: KeepAlive\r\n// in the case of a KeepAlive in a leave phase we need to return a KeepAlive\r\n// placeholder with empty content to avoid the KeepAlive instance from being\r\n// unmounted.\r\nfunction emptyPlaceholder(vnode) {\r\n if (isKeepAlive(vnode)) {\r\n vnode = cloneVNode(vnode);\r\n vnode.children = null;\r\n return vnode;\r\n }\r\n}\r\nfunction getKeepAliveChild(vnode) {\r\n return isKeepAlive(vnode)\r\n ? vnode.children\r\n ? vnode.children[0]\r\n : undefined\r\n : vnode;\r\n}\r\nfunction setTransitionHooks(vnode, hooks) {\r\n if (vnode.shapeFlag & 6 /* COMPONENT */ && vnode.component) {\r\n setTransitionHooks(vnode.component.subTree, hooks);\r\n }\r\n else if (vnode.shapeFlag & 128 /* SUSPENSE */) {\r\n vnode.ssContent.transition = hooks.clone(vnode.ssContent);\r\n vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);\r\n }\r\n else {\r\n vnode.transition = hooks;\r\n }\r\n}\r\nfunction getTransitionRawChildren(children, keepComment = false, parentKey) {\r\n let ret = [];\r\n let keyedFragmentCount = 0;\r\n for (let i = 0; i < children.length; i++) {\r\n let child = children[i];\r\n // #5360 inherit parent key in case of <template v-for>\r\n const key = parentKey == null\r\n ? child.key\r\n : String(parentKey) + String(child.key != null ? child.key : i);\r\n // handle fragment children case, e.g. v-for\r\n if (child.type === Fragment) {\r\n if (child.patchFlag & 128 /* KEYED_FRAGMENT */)\r\n keyedFragmentCount++;\r\n ret = ret.concat(getTransitionRawChildren(child.children, keepComment, key));\r\n }\r\n // comment placeholders should be skipped, e.g. v-if\r\n else if (keepComment || child.type !== Comment) {\r\n ret.push(key != null ? cloneVNode(child, { key }) : child);\r\n }\r\n }\r\n // #1126 if a transition children list contains multiple sub fragments, these\r\n // fragments will be merged into a flat children array. Since each v-for\r\n // fragment may contain different static bindings inside, we need to de-op\r\n // these children to force full diffs to ensure correct behavior.\r\n if (keyedFragmentCount > 1) {\r\n for (let i = 0; i < ret.length; i++) {\r\n ret[i].patchFlag = -2 /* BAIL */;\r\n }\r\n }\r\n return ret;\r\n}\n\n// implementation, close to no-op\r\nfunction defineComponent(options) {\r\n return isFunction(options) ? { setup: options, name: options.name } : options;\r\n}\n\nconst isAsyncWrapper = (i) => !!i.type.__asyncLoader;\r\nfunction defineAsyncComponent(source) {\r\n if (isFunction(source)) {\r\n source = { loader: source };\r\n }\r\n const { loader, loadingComponent, errorComponent, delay = 200, timeout, // undefined = never times out\r\n suspensible = true, onError: userOnError } = source;\r\n let pendingRequest = null;\r\n let resolvedComp;\r\n let retries = 0;\r\n const retry = () => {\r\n retries++;\r\n pendingRequest = null;\r\n return load();\r\n };\r\n const load = () => {\r\n let thisRequest;\r\n return (pendingRequest ||\r\n (thisRequest = pendingRequest =\r\n loader()\r\n .catch(err => {\r\n err = err instanceof Error ? err : new Error(String(err));\r\n if (userOnError) {\r\n return new Promise((resolve, reject) => {\r\n const userRetry = () => resolve(retry());\r\n const userFail = () => reject(err);\r\n userOnError(err, userRetry, userFail, retries + 1);\r\n });\r\n }\r\n else {\r\n throw err;\r\n }\r\n })\r\n .then((comp) => {\r\n if (thisRequest !== pendingRequest && pendingRequest) {\r\n return pendingRequest;\r\n }\r\n if ((process.env.NODE_ENV !== 'production') && !comp) {\r\n warn(`Async component loader resolved to undefined. ` +\r\n `If you are using retry(), make sure to return its return value.`);\r\n }\r\n // interop module default\r\n if (comp &&\r\n (comp.__esModule || comp[Symbol.toStringTag] === 'Module')) {\r\n comp = comp.default;\r\n }\r\n if ((process.env.NODE_ENV !== 'production') && comp && !isObject(comp) && !isFunction(comp)) {\r\n throw new Error(`Invalid async component load result: ${comp}`);\r\n }\r\n resolvedComp = comp;\r\n return comp;\r\n })));\r\n };\r\n return defineComponent({\r\n name: 'AsyncComponentWrapper',\r\n __asyncLoader: load,\r\n get __asyncResolved() {\r\n return resolvedComp;\r\n },\r\n setup() {\r\n const instance = currentInstance;\r\n // already resolved\r\n if (resolvedComp) {\r\n return () => createInnerComp(resolvedComp, instance);\r\n }\r\n const onError = (err) => {\r\n pendingRequest = null;\r\n handleError(err, instance, 13 /* ASYNC_COMPONENT_LOADER */, !errorComponent /* do not throw in dev if user provided error component */);\r\n };\r\n // suspense-controlled or SSR.\r\n if ((suspensible && instance.suspense) ||\r\n (isInSSRComponentSetup)) {\r\n return load()\r\n .then(comp => {\r\n return () => createInnerComp(comp, instance);\r\n })\r\n .catch(err => {\r\n onError(err);\r\n return () => errorComponent\r\n ? createVNode(errorComponent, {\r\n error: err\r\n })\r\n : null;\r\n });\r\n }\r\n const loaded = ref(false);\r\n const error = ref();\r\n const delayed = ref(!!delay);\r\n if (delay) {\r\n setTimeout(() => {\r\n delayed.value = false;\r\n }, delay);\r\n }\r\n if (timeout != null) {\r\n setTimeout(() => {\r\n if (!loaded.value && !error.value) {\r\n const err = new Error(`Async component timed out after ${timeout}ms.`);\r\n onError(err);\r\n error.value = err;\r\n }\r\n }, timeout);\r\n }\r\n load()\r\n .then(() => {\r\n loaded.value = true;\r\n if (instance.parent && isKeepAlive(instance.parent.vnode)) {\r\n // parent is keep-alive, force update so the loaded component's\r\n // name is taken into account\r\n queueJob(instance.parent.update);\r\n }\r\n })\r\n .catch(err => {\r\n onError(err);\r\n error.value = err;\r\n });\r\n return () => {\r\n if (loaded.value && resolvedComp) {\r\n return createInnerComp(resolvedComp, instance);\r\n }\r\n else if (error.value && errorComponent) {\r\n return createVNode(errorComponent, {\r\n error: error.value\r\n });\r\n }\r\n else if (loadingComponent && !delayed.value) {\r\n return createVNode(loadingComponent);\r\n }\r\n };\r\n }\r\n });\r\n}\r\nfunction createInnerComp(comp, { vnode: { ref, props, children, shapeFlag }, parent }) {\r\n const vnode = createVNode(comp, props, children);\r\n // ensure inner component inherits the async wrapper's ref owner\r\n vnode.ref = ref;\r\n return vnode;\r\n}\n\nconst isKeepAlive = (vnode) => vnode.type.__isKeepAlive;\r\nconst KeepAliveImpl = {\r\n name: `KeepAlive`,\r\n // Marker for special handling inside the renderer. We are not using a ===\r\n // check directly on KeepAlive in the renderer, because importing it directly\r\n // would prevent it from being tree-shaken.\r\n __isKeepAlive: true,\r\n props: {\r\n include: [String, RegExp, Array],\r\n exclude: [String, RegExp, Array],\r\n max: [String, Number]\r\n },\r\n setup(props, { slots }) {\r\n const instance = getCurrentInstance();\r\n // KeepAlive communicates with the instantiated renderer via the\r\n // ctx where the renderer passes in its internals,\r\n // and the KeepAlive instance exposes activate/deactivate implementations.\r\n // The whole point of this is to avoid importing KeepAlive directly in the\r\n // renderer to facilitate tree-shaking.\r\n const sharedContext = instance.ctx;\r\n // if the internal renderer is not registered, it indicates that this is server-side rendering,\r\n // for KeepAlive, we just need to render its children\r\n if (!sharedContext.renderer) {\r\n return () => {\r\n const children = slots.default && slots.default();\r\n return children && children.length === 1 ? children[0] : children;\r\n };\r\n }\r\n const cache = new Map();\r\n const keys = new Set();\r\n let current = null;\r\n if ((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) {\r\n instance.__v_cache = cache;\r\n }\r\n const parentSuspense = instance.suspense;\r\n const { renderer: { p: patch, m: move, um: _unmount, o: { createElement } } } = sharedContext;\r\n const storageContainer = createElement('div');\r\n sharedContext.activate = (vnode, container, anchor, isSVG, optimized) => {\r\n const instance = vnode.component;\r\n move(vnode, container, anchor, 0 /* ENTER */, parentSuspense);\r\n // in case props have changed\r\n patch(instance.vnode, vnode, container, anchor, instance, parentSuspense, isSVG, vnode.slotScopeIds, optimized);\r\n queuePostRenderEffect(() => {\r\n instance.isDeactivated = false;\r\n if (instance.a) {\r\n invokeArrayFns(instance.a);\r\n }\r\n const vnodeHook = vnode.props && vnode.props.onVnodeMounted;\r\n if (vnodeHook) {\r\n invokeVNodeHook(vnodeHook, instance.parent, vnode);\r\n }\r\n }, parentSuspense);\r\n if ((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) {\r\n // Update components tree\r\n devtoolsComponentAdded(instance);\r\n }\r\n };\r\n sharedContext.deactivate = (vnode) => {\r\n const instance = vnode.component;\r\n move(vnode, storageContainer, null, 1 /* LEAVE */, parentSuspense);\r\n queuePostRenderEffect(() => {\r\n if (instance.da) {\r\n invokeArrayFns(instance.da);\r\n }\r\n const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted;\r\n if (vnodeHook) {\r\n invokeVNodeHook(vnodeHook, instance.parent, vnode);\r\n }\r\n instance.isDeactivated = true;\r\n }, parentSuspense);\r\n if ((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) {\r\n // Update components tree\r\n devtoolsComponentAdded(instance);\r\n }\r\n };\r\n function unmount(vnode) {\r\n // reset the shapeFlag so it can be properly unmounted\r\n resetShapeFlag(vnode);\r\n _unmount(vnode, instance, parentSuspense, true);\r\n }\r\n function pruneCache(filter) {\r\n cache.forEach((vnode, key) => {\r\n const name = getComponentName(vnode.type);\r\n if (name && (!filter || !filter(name))) {\r\n pruneCacheEntry(key);\r\n }\r\n });\r\n }\r\n function pruneCacheEntry(key) {\r\n const cached = cache.get(key);\r\n if (!current || cached.type !== current.type) {\r\n unmount(cached);\r\n }\r\n else if (current) {\r\n // current active instance should no longer be kept-alive.\r\n // we can't unmount it now but it might be later, so reset its flag now.\r\n resetShapeFlag(current);\r\n }\r\n cache.delete(key);\r\n keys.delete(key);\r\n }\r\n // prune cache on include/exclude prop change\r\n watch(() => [props.include, props.exclude], ([include, exclude]) => {\r\n include && pruneCache(name => matches(include, name));\r\n exclude && pruneCache(name => !matches(exclude, name));\r\n }, \r\n // prune post-render after `current` has been updated\r\n { flush: 'post', deep: true });\r\n // cache sub tree after render\r\n let pendingCacheKey = null;\r\n const cacheSubtree = () => {\r\n // fix #1621, the pendingCacheKey could be 0\r\n if (pendingCacheKey != null) {\r\n cache.set(pendingCacheKey, getInnerChild(instance.subTree));\r\n }\r\n };\r\n onMounted(cacheSubtree);\r\n onUpdated(cacheSubtree);\r\n onBeforeUnmount(() => {\r\n cache.forEach(cached => {\r\n const { subTree, suspense } = instance;\r\n const vnode = getInnerChild(subTree);\r\n if (cached.type === vnode.type) {\r\n // current instance will be unmounted as part of keep-alive's unmount\r\n resetShapeFlag(vnode);\r\n // but invoke its deactivated hook here\r\n const da = vnode.component.da;\r\n da && queuePostRenderEffect(da, suspense);\r\n return;\r\n }\r\n unmount(cached);\r\n });\r\n });\r\n return () => {\r\n pendingCacheKey = null;\r\n if (!slots.default) {\r\n return null;\r\n }\r\n const children = slots.default();\r\n const rawVNode = children[0];\r\n if (children.length > 1) {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`KeepAlive should contain exactly one component child.`);\r\n }\r\n current = null;\r\n return children;\r\n }\r\n else if (!isVNode(rawVNode) ||\r\n (!(rawVNode.shapeFlag & 4 /* STATEFUL_COMPONENT */) &&\r\n !(rawVNode.shapeFlag & 128 /* SUSPENSE */))) {\r\n current = null;\r\n return rawVNode;\r\n }\r\n let vnode = getInnerChild(rawVNode);\r\n const comp = vnode.type;\r\n // for async components, name check should be based in its loaded\r\n // inner component if available\r\n const name = getComponentName(isAsyncWrapper(vnode)\r\n ? vnode.type.__asyncResolved || {}\r\n : comp);\r\n const { include, exclude, max } = props;\r\n if ((include && (!name || !matches(include, name))) ||\r\n (exclude && name && matches(exclude, name))) {\r\n current = vnode;\r\n return rawVNode;\r\n }\r\n const key = vnode.key == null ? comp : vnode.key;\r\n const cachedVNode = cache.get(key);\r\n // clone vnode if it's reused because we are going to mutate it\r\n if (vnode.el) {\r\n vnode = cloneVNode(vnode);\r\n if (rawVNode.shapeFlag & 128 /* SUSPENSE */) {\r\n rawVNode.ssContent = vnode;\r\n }\r\n }\r\n // #1513 it's possible for the returned vnode to be cloned due to attr\r\n // fallthrough or scopeId, so the vnode here may not be the final vnode\r\n // that is mounted. Instead of caching it directly, we store the pending\r\n // key and cache `instance.subTree` (the normalized vnode) in\r\n // beforeMount/beforeUpdate hooks.\r\n pendingCacheKey = key;\r\n if (cachedVNode) {\r\n // copy over mounted state\r\n vnode.el = cachedVNode.el;\r\n vnode.component = cachedVNode.component;\r\n if (vnode.transition) {\r\n // recursively update transition hooks on subTree\r\n setTransitionHooks(vnode, vnode.transition);\r\n }\r\n // avoid vnode being mounted as fresh\r\n vnode.shapeFlag |= 512 /* COMPONENT_KEPT_ALIVE */;\r\n // make this key the freshest\r\n keys.delete(key);\r\n keys.add(key);\r\n }\r\n else {\r\n keys.add(key);\r\n // prune oldest entry\r\n if (max && keys.size > parseInt(max, 10)) {\r\n pruneCacheEntry(keys.values().next().value);\r\n }\r\n }\r\n // avoid vnode being unmounted\r\n vnode.shapeFlag |= 256 /* COMPONENT_SHOULD_KEEP_ALIVE */;\r\n current = vnode;\r\n return isSuspense(rawVNode.type) ? rawVNode : vnode;\r\n };\r\n }\r\n};\r\n// export the public type for h/tsx inference\r\n// also to avoid inline import() in generated d.ts files\r\nconst KeepAlive = KeepAliveImpl;\r\nfunction matches(pattern, name) {\r\n if (isArray(pattern)) {\r\n return pattern.some((p) => matches(p, name));\r\n }\r\n else if (isString(pattern)) {\r\n return pattern.split(',').includes(name);\r\n }\r\n else if (pattern.test) {\r\n return pattern.test(name);\r\n }\r\n /* istanbul ignore next */\r\n return false;\r\n}\r\nfunction onActivated(hook, target) {\r\n registerKeepAliveHook(hook, \"a\" /* ACTIVATED */, target);\r\n}\r\nfunction onDeactivated(hook, target) {\r\n registerKeepAliveHook(hook, \"da\" /* DEACTIVATED */, target);\r\n}\r\nfunction registerKeepAliveHook(hook, type, target = currentInstance) {\r\n // cache the deactivate branch check wrapper for injected hooks so the same\r\n // hook can be properly deduped by the scheduler. \"__wdc\" stands for \"with\r\n // deactivation check\".\r\n const wrappedHook = hook.__wdc ||\r\n (hook.__wdc = () => {\r\n // only fire the hook if the target instance is NOT in a deactivated branch.\r\n let current = target;\r\n while (current) {\r\n if (current.isDeactivated) {\r\n return;\r\n }\r\n current = current.parent;\r\n }\r\n return hook();\r\n });\r\n injectHook(type, wrappedHook, target);\r\n // In addition to registering it on the target instance, we walk up the parent\r\n // chain and register it on all ancestor instances that are keep-alive roots.\r\n // This avoids the need to walk the entire component tree when invoking these\r\n // hooks, and more importantly, avoids the need to track child components in\r\n // arrays.\r\n if (target) {\r\n let current = target.parent;\r\n while (current && current.parent) {\r\n if (isKeepAlive(current.parent.vnode)) {\r\n injectToKeepAliveRoot(wrappedHook, type, target, current);\r\n }\r\n current = current.parent;\r\n }\r\n }\r\n}\r\nfunction injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {\r\n // injectHook wraps the original for error handling, so make sure to remove\r\n // the wrapped version.\r\n const injected = injectHook(type, hook, keepAliveRoot, true /* prepend */);\r\n onUnmounted(() => {\r\n remove(keepAliveRoot[type], injected);\r\n }, target);\r\n}\r\nfunction resetShapeFlag(vnode) {\r\n let shapeFlag = vnode.shapeFlag;\r\n if (shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */) {\r\n shapeFlag -= 256 /* COMPONENT_SHOULD_KEEP_ALIVE */;\r\n }\r\n if (shapeFlag & 512 /* COMPONENT_KEPT_ALIVE */) {\r\n shapeFlag -= 512 /* COMPONENT_KEPT_ALIVE */;\r\n }\r\n vnode.shapeFlag = shapeFlag;\r\n}\r\nfunction getInnerChild(vnode) {\r\n return vnode.shapeFlag & 128 /* SUSPENSE */ ? vnode.ssContent : vnode;\r\n}\n\nfunction injectHook(type, hook, target = currentInstance, prepend = false) {\r\n if (target) {\r\n const hooks = target[type] || (target[type] = []);\r\n // cache the error handling wrapper for injected hooks so the same hook\r\n // can be properly deduped by the scheduler. \"__weh\" stands for \"with error\r\n // handling\".\r\n const wrappedHook = hook.__weh ||\r\n (hook.__weh = (...args) => {\r\n if (target.isUnmounted) {\r\n return;\r\n }\r\n // disable tracking inside all lifecycle hooks\r\n // since they can potentially be called inside effects.\r\n pauseTracking();\r\n // Set currentInstance during hook invocation.\r\n // This assumes the hook does not synchronously trigger other hooks, which\r\n // can only be false when the user does something really funky.\r\n setCurrentInstance(target);\r\n const res = callWithAsyncErrorHandling(hook, target, type, args);\r\n unsetCurrentInstance();\r\n resetTracking();\r\n return res;\r\n });\r\n if (prepend) {\r\n hooks.unshift(wrappedHook);\r\n }\r\n else {\r\n hooks.push(wrappedHook);\r\n }\r\n return wrappedHook;\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n const apiName = toHandlerKey(ErrorTypeStrings[type].replace(/ hook$/, ''));\r\n warn(`${apiName} is called when there is no active component instance to be ` +\r\n `associated with. ` +\r\n `Lifecycle injection APIs can only be used during execution of setup().` +\r\n (` If you are using async setup(), make sure to register lifecycle ` +\r\n `hooks before the first await statement.`\r\n ));\r\n }\r\n}\r\nconst createHook = (lifecycle) => (hook, target = currentInstance) => \r\n// post-create lifecycle registrations are noops during SSR (except for serverPrefetch)\r\n(!isInSSRComponentSetup || lifecycle === \"sp\" /* SERVER_PREFETCH */) &&\r\n injectHook(lifecycle, hook, target);\r\nconst onBeforeMount = createHook(\"bm\" /* BEFORE_MOUNT */);\r\nconst onMounted = createHook(\"m\" /* MOUNTED */);\r\nconst onBeforeUpdate = createHook(\"bu\" /* BEFORE_UPDATE */);\r\nconst onUpdated = createHook(\"u\" /* UPDATED */);\r\nconst onBeforeUnmount = createHook(\"bum\" /* BEFORE_UNMOUNT */);\r\nconst onUnmounted = createHook(\"um\" /* UNMOUNTED */);\r\nconst onServerPrefetch = createHook(\"sp\" /* SERVER_PREFETCH */);\r\nconst onRenderTriggered = createHook(\"rtg\" /* RENDER_TRIGGERED */);\r\nconst onRenderTracked = createHook(\"rtc\" /* RENDER_TRACKED */);\r\nfunction onErrorCaptured(hook, target = currentInstance) {\r\n injectHook(\"ec\" /* ERROR_CAPTURED */, hook, target);\r\n}\n\n/**\r\nRuntime helper for applying directives to a vnode. Example usage:\r\n\nconst comp = resolveComponent('comp')\r\nconst foo = resolveDirective('foo')\r\nconst bar = resolveDirective('bar')\r\n\nreturn withDirectives(h(comp), [\r\n [foo, this.x],\r\n [bar, this.y]\r\n])\r\n*/\r\nfunction validateDirectiveName(name) {\r\n if (isBuiltInDirective(name)) {\r\n warn('Do not use built-in directive ids as custom directive id: ' + name);\r\n }\r\n}\r\n/**\r\n * Adds directives to a VNode.\r\n */\r\nfunction withDirectives(vnode, directives) {\r\n const internalInstance = currentRenderingInstance;\r\n if (internalInstance === null) {\r\n (process.env.NODE_ENV !== 'production') && warn(`withDirectives can only be used inside render functions.`);\r\n return vnode;\r\n }\r\n const instance = getExposeProxy(internalInstance) ||\r\n internalInstance.proxy;\r\n const bindings = vnode.dirs || (vnode.dirs = []);\r\n for (let i = 0; i < directives.length; i++) {\r\n let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i];\r\n if (isFunction(dir)) {\r\n dir = {\r\n mounted: dir,\r\n updated: dir\r\n };\r\n }\r\n if (dir.deep) {\r\n traverse(value);\r\n }\r\n bindings.push({\r\n dir,\r\n instance,\r\n value,\r\n oldValue: void 0,\r\n arg,\r\n modifiers\r\n });\r\n }\r\n return vnode;\r\n}\r\nfunction invokeDirectiveHook(vnode, prevVNode, instance, name) {\r\n const bindings = vnode.dirs;\r\n const oldBindings = prevVNode && prevVNode.dirs;\r\n for (let i = 0; i < bindings.length; i++) {\r\n const binding = bindings[i];\r\n if (oldBindings) {\r\n binding.oldValue = oldBindings[i].value;\r\n }\r\n let hook = binding.dir[name];\r\n if (hook) {\r\n // disable tracking inside all lifecycle hooks\r\n // since they can potentially be called inside effects.\r\n pauseTracking();\r\n callWithAsyncErrorHandling(hook, instance, 8 /* DIRECTIVE_HOOK */, [\r\n vnode.el,\r\n binding,\r\n vnode,\r\n prevVNode\r\n ]);\r\n resetTracking();\r\n }\r\n }\r\n}\n\nconst COMPONENTS = 'components';\r\nconst DIRECTIVES = 'directives';\r\n/**\r\n * @private\r\n */\r\nfunction resolveComponent(name, maybeSelfReference) {\r\n return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;\r\n}\r\nconst NULL_DYNAMIC_COMPONENT = Symbol();\r\n/**\r\n * @private\r\n */\r\nfunction resolveDynamicComponent(component) {\r\n if (isString(component)) {\r\n return resolveAsset(COMPONENTS, component, false) || component;\r\n }\r\n else {\r\n // invalid types will fallthrough to createVNode and raise warning\r\n return (component || NULL_DYNAMIC_COMPONENT);\r\n }\r\n}\r\n/**\r\n * @private\r\n */\r\nfunction resolveDirective(name) {\r\n return resolveAsset(DIRECTIVES, name);\r\n}\r\n// implementation\r\nfunction resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {\r\n const instance = currentRenderingInstance || currentInstance;\r\n if (instance) {\r\n const Component = instance.type;\r\n // explicit self name has highest priority\r\n if (type === COMPONENTS) {\r\n const selfName = getComponentName(Component);\r\n if (selfName &&\r\n (selfName === name ||\r\n selfName === camelize(name) ||\r\n selfName === capitalize(camelize(name)))) {\r\n return Component;\r\n }\r\n }\r\n const res = \r\n // local registration\r\n // check instance[type] first which is resolved for options API\r\n resolve(instance[type] || Component[type], name) ||\r\n // global registration\r\n resolve(instance.appContext[type], name);\r\n if (!res && maybeSelfReference) {\r\n // fallback to implicit self-reference\r\n return Component;\r\n }\r\n if ((process.env.NODE_ENV !== 'production') && warnMissing && !res) {\r\n const extra = type === COMPONENTS\r\n ? `\\nIf this is a native custom element, make sure to exclude it from ` +\r\n `component resolution via compilerOptions.isCustomElement.`\r\n : ``;\r\n warn(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);\r\n }\r\n return res;\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`resolve${capitalize(type.slice(0, -1))} ` +\r\n `can only be used in render() or setup().`);\r\n }\r\n}\r\nfunction resolve(registry, name) {\r\n return (registry &&\r\n (registry[name] ||\r\n registry[camelize(name)] ||\r\n registry[capitalize(camelize(name))]));\r\n}\n\n/**\r\n * Actual implementation\r\n */\r\nfunction renderList(source, renderItem, cache, index) {\r\n let ret;\r\n const cached = (cache && cache[index]);\r\n if (isArray(source) || isString(source)) {\r\n ret = new Array(source.length);\r\n for (let i = 0, l = source.length; i < l; i++) {\r\n ret[i] = renderItem(source[i], i, undefined, cached && cached[i]);\r\n }\r\n }\r\n else if (typeof source === 'number') {\r\n if ((process.env.NODE_ENV !== 'production') && !Number.isInteger(source)) {\r\n warn(`The v-for range expect an integer value but got ${source}.`);\r\n }\r\n ret = new Array(source);\r\n for (let i = 0; i < source; i++) {\r\n ret[i] = renderItem(i + 1, i, undefined, cached && cached[i]);\r\n }\r\n }\r\n else if (isObject(source)) {\r\n if (source[Symbol.iterator]) {\r\n ret = Array.from(source, (item, i) => renderItem(item, i, undefined, cached && cached[i]));\r\n }\r\n else {\r\n const keys = Object.keys(source);\r\n ret = new Array(keys.length);\r\n for (let i = 0, l = keys.length; i < l; i++) {\r\n const key = keys[i];\r\n ret[i] = renderItem(source[key], key, i, cached && cached[i]);\r\n }\r\n }\r\n }\r\n else {\r\n ret = [];\r\n }\r\n if (cache) {\r\n cache[index] = ret;\r\n }\r\n return ret;\r\n}\n\n/**\r\n * Compiler runtime helper for creating dynamic slots object\r\n * @private\r\n */\r\nfunction createSlots(slots, dynamicSlots) {\r\n for (let i = 0; i < dynamicSlots.length; i++) {\r\n const slot = dynamicSlots[i];\r\n // array of dynamic slot generated by <template v-for=\"...\" #[...]>\r\n if (isArray(slot)) {\r\n for (let j = 0; j < slot.length; j++) {\r\n slots[slot[j].name] = slot[j].fn;\r\n }\r\n }\r\n else if (slot) {\r\n // conditional single slot generated by <template v-if=\"...\" #foo>\r\n slots[slot.name] = slot.fn;\r\n }\r\n }\r\n return slots;\r\n}\n\n/**\r\n * Compiler runtime helper for rendering `<slot/>`\r\n * @private\r\n */\r\nfunction renderSlot(slots, name, props = {}, \r\n// this is not a user-facing function, so the fallback is always generated by\r\n// the compiler and guaranteed to be a function returning an array\r\nfallback, noSlotted) {\r\n if (currentRenderingInstance.isCE ||\r\n (currentRenderingInstance.parent &&\r\n isAsyncWrapper(currentRenderingInstance.parent) &&\r\n currentRenderingInstance.parent.isCE)) {\r\n return createVNode('slot', name === 'default' ? null : { name }, fallback && fallback());\r\n }\r\n let slot = slots[name];\r\n if ((process.env.NODE_ENV !== 'production') && slot && slot.length > 1) {\r\n warn(`SSR-optimized slot function detected in a non-SSR-optimized render ` +\r\n `function. You need to mark this component with $dynamic-slots in the ` +\r\n `parent template.`);\r\n slot = () => [];\r\n }\r\n // a compiled slot disables block tracking by default to avoid manual\r\n // invocation interfering with template-based block tracking, but in\r\n // `renderSlot` we can be sure that it's template-based so we can force\r\n // enable it.\r\n if (slot && slot._c) {\r\n slot._d = false;\r\n }\r\n openBlock();\r\n const validSlotContent = slot && ensureValidVNode(slot(props));\r\n const rendered = createBlock(Fragment, { key: props.key || `_${name}` }, validSlotContent || (fallback ? fallback() : []), validSlotContent && slots._ === 1 /* STABLE */\r\n ? 64 /* STABLE_FRAGMENT */\r\n : -2 /* BAIL */);\r\n if (!noSlotted && rendered.scopeId) {\r\n rendered.slotScopeIds = [rendered.scopeId + '-s'];\r\n }\r\n if (slot && slot._c) {\r\n slot._d = true;\r\n }\r\n return rendered;\r\n}\r\nfunction ensureValidVNode(vnodes) {\r\n return vnodes.some(child => {\r\n if (!isVNode(child))\r\n return true;\r\n if (child.type === Comment)\r\n return false;\r\n if (child.type === Fragment &&\r\n !ensureValidVNode(child.children))\r\n return false;\r\n return true;\r\n })\r\n ? vnodes\r\n : null;\r\n}\n\n/**\r\n * For prefixing keys in v-on=\"obj\" with \"on\"\r\n * @private\r\n */\r\nfunction toHandlers(obj) {\r\n const ret = {};\r\n if ((process.env.NODE_ENV !== 'production') && !isObject(obj)) {\r\n warn(`v-on with no argument expects an object value.`);\r\n return ret;\r\n }\r\n for (const key in obj) {\r\n ret[toHandlerKey(key)] = obj[key];\r\n }\r\n return ret;\r\n}\n\n/**\r\n * #2437 In Vue 3, functional components do not have a public instance proxy but\r\n * they exist in the internal parent chain. For code that relies on traversing\r\n * public $parent chains, skip functional ones and go to the parent instead.\r\n */\r\nconst getPublicInstance = (i) => {\r\n if (!i)\r\n return null;\r\n if (isStatefulComponent(i))\r\n return getExposeProxy(i) || i.proxy;\r\n return getPublicInstance(i.parent);\r\n};\r\nconst publicPropertiesMap = \r\n// Move PURE marker to new line to workaround compiler discarding it\r\n// due to type annotation\r\n/*#__PURE__*/ extend(Object.create(null), {\r\n $: i => i,\r\n $el: i => i.vnode.el,\r\n $data: i => i.data,\r\n $props: i => ((process.env.NODE_ENV !== 'production') ? shallowReadonly(i.props) : i.props),\r\n $attrs: i => ((process.env.NODE_ENV !== 'production') ? shallowReadonly(i.attrs) : i.attrs),\r\n $slots: i => ((process.env.NODE_ENV !== 'production') ? shallowReadonly(i.slots) : i.slots),\r\n $refs: i => ((process.env.NODE_ENV !== 'production') ? shallowReadonly(i.refs) : i.refs),\r\n $parent: i => getPublicInstance(i.parent),\r\n $root: i => getPublicInstance(i.root),\r\n $emit: i => i.emit,\r\n $options: i => (__VUE_OPTIONS_API__ ? resolveMergedOptions(i) : i.type),\r\n $forceUpdate: i => i.f || (i.f = () => queueJob(i.update)),\r\n $nextTick: i => i.n || (i.n = nextTick.bind(i.proxy)),\r\n $watch: i => (__VUE_OPTIONS_API__ ? instanceWatch.bind(i) : NOOP)\r\n});\r\nconst isReservedPrefix = (key) => key === '_' || key === '$';\r\nconst PublicInstanceProxyHandlers = {\r\n get({ _: instance }, key) {\r\n const { ctx, setupState, data, props, accessCache, type, appContext } = instance;\r\n // for internal formatters to know that this is a Vue instance\r\n if ((process.env.NODE_ENV !== 'production') && key === '__isVue') {\r\n return true;\r\n }\r\n // prioritize <script setup> bindings during dev.\r\n // this allows even properties that start with _ or $ to be used - so that\r\n // it aligns with the production behavior where the render fn is inlined and\r\n // indeed has access to all declared variables.\r\n if ((process.env.NODE_ENV !== 'production') &&\r\n setupState !== EMPTY_OBJ &&\r\n setupState.__isScriptSetup &&\r\n hasOwn(setupState, key)) {\r\n return setupState[key];\r\n }\r\n // data / props / ctx\r\n // This getter gets called for every property access on the render context\r\n // during render and is a major hotspot. The most expensive part of this\r\n // is the multiple hasOwn() calls. It's much faster to do a simple property\r\n // access on a plain object, so we use an accessCache object (with null\r\n // prototype) to memoize what access type a key corresponds to.\r\n let normalizedProps;\r\n if (key[0] !== '$') {\r\n const n = accessCache[key];\r\n if (n !== undefined) {\r\n switch (n) {\r\n case 1 /* SETUP */:\r\n return setupState[key];\r\n case 2 /* DATA */:\r\n return data[key];\r\n case 4 /* CONTEXT */:\r\n return ctx[key];\r\n case 3 /* PROPS */:\r\n return props[key];\r\n // default: just fallthrough\r\n }\r\n }\r\n else if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) {\r\n accessCache[key] = 1 /* SETUP */;\r\n return setupState[key];\r\n }\r\n else if (data !== EMPTY_OBJ && hasOwn(data, key)) {\r\n accessCache[key] = 2 /* DATA */;\r\n return data[key];\r\n }\r\n else if (\r\n // only cache other properties when instance has declared (thus stable)\r\n // props\r\n (normalizedProps = instance.propsOptions[0]) &&\r\n hasOwn(normalizedProps, key)) {\r\n accessCache[key] = 3 /* PROPS */;\r\n return props[key];\r\n }\r\n else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {\r\n accessCache[key] = 4 /* CONTEXT */;\r\n return ctx[key];\r\n }\r\n else if (!__VUE_OPTIONS_API__ || shouldCacheAccess) {\r\n accessCache[key] = 0 /* OTHER */;\r\n }\r\n }\r\n const publicGetter = publicPropertiesMap[key];\r\n let cssModule, globalProperties;\r\n // public $xxx properties\r\n if (publicGetter) {\r\n if (key === '$attrs') {\r\n track(instance, \"get\" /* GET */, key);\r\n (process.env.NODE_ENV !== 'production') && markAttrsAccessed();\r\n }\r\n return publicGetter(instance);\r\n }\r\n else if (\r\n // css module (injected by vue-loader)\r\n (cssModule = type.__cssModules) &&\r\n (cssModule = cssModule[key])) {\r\n return cssModule;\r\n }\r\n else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {\r\n // user may set custom properties to `this` that start with `$`\r\n accessCache[key] = 4 /* CONTEXT */;\r\n return ctx[key];\r\n }\r\n else if (\r\n // global properties\r\n ((globalProperties = appContext.config.globalProperties),\r\n hasOwn(globalProperties, key))) {\r\n {\r\n return globalProperties[key];\r\n }\r\n }\r\n else if ((process.env.NODE_ENV !== 'production') &&\r\n currentRenderingInstance &&\r\n (!isString(key) ||\r\n // #1091 avoid internal isRef/isVNode checks on component instance leading\r\n // to infinite warning loop\r\n key.indexOf('__v') !== 0)) {\r\n if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) {\r\n warn(`Property ${JSON.stringify(key)} must be accessed via $data because it starts with a reserved ` +\r\n `character (\"$\" or \"_\") and is not proxied on the render context.`);\r\n }\r\n else if (instance === currentRenderingInstance) {\r\n warn(`Property ${JSON.stringify(key)} was accessed during render ` +\r\n `but is not defined on instance.`);\r\n }\r\n }\r\n },\r\n set({ _: instance }, key, value) {\r\n const { data, setupState, ctx } = instance;\r\n if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) {\r\n setupState[key] = value;\r\n return true;\r\n }\r\n else if (data !== EMPTY_OBJ && hasOwn(data, key)) {\r\n data[key] = value;\r\n return true;\r\n }\r\n else if (hasOwn(instance.props, key)) {\r\n (process.env.NODE_ENV !== 'production') &&\r\n warn(`Attempting to mutate prop \"${key}\". Props are readonly.`, instance);\r\n return false;\r\n }\r\n if (key[0] === '$' && key.slice(1) in instance) {\r\n (process.env.NODE_ENV !== 'production') &&\r\n warn(`Attempting to mutate public property \"${key}\". ` +\r\n `Properties starting with $ are reserved and readonly.`, instance);\r\n return false;\r\n }\r\n else {\r\n if ((process.env.NODE_ENV !== 'production') && key in instance.appContext.config.globalProperties) {\r\n Object.defineProperty(ctx, key, {\r\n enumerable: true,\r\n configurable: true,\r\n value\r\n });\r\n }\r\n else {\r\n ctx[key] = value;\r\n }\r\n }\r\n return true;\r\n },\r\n has({ _: { data, setupState, accessCache, ctx, appContext, propsOptions } }, key) {\r\n let normalizedProps;\r\n return (!!accessCache[key] ||\r\n (data !== EMPTY_OBJ && hasOwn(data, key)) ||\r\n (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) ||\r\n ((normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key)) ||\r\n hasOwn(ctx, key) ||\r\n hasOwn(publicPropertiesMap, key) ||\r\n hasOwn(appContext.config.globalProperties, key));\r\n },\r\n defineProperty(target, key, descriptor) {\r\n if (descriptor.get != null) {\r\n // invalidate key cache of a getter based property #5417\r\n target._.accessCache[key] = 0;\r\n }\r\n else if (hasOwn(descriptor, 'value')) {\r\n this.set(target, key, descriptor.value, null);\r\n }\r\n return Reflect.defineProperty(target, key, descriptor);\r\n }\r\n};\r\nif ((process.env.NODE_ENV !== 'production') && !false) {\r\n PublicInstanceProxyHandlers.ownKeys = (target) => {\r\n warn(`Avoid app logic that relies on enumerating keys on a component instance. ` +\r\n `The keys will be empty in production mode to avoid performance overhead.`);\r\n return Reflect.ownKeys(target);\r\n };\r\n}\r\nconst RuntimeCompiledPublicInstanceProxyHandlers = /*#__PURE__*/ extend({}, PublicInstanceProxyHandlers, {\r\n get(target, key) {\r\n // fast path for unscopables when using `with` block\r\n if (key === Symbol.unscopables) {\r\n return;\r\n }\r\n return PublicInstanceProxyHandlers.get(target, key, target);\r\n },\r\n has(_, key) {\r\n const has = key[0] !== '_' && !isGloballyWhitelisted(key);\r\n if ((process.env.NODE_ENV !== 'production') && !has && PublicInstanceProxyHandlers.has(_, key)) {\r\n warn(`Property ${JSON.stringify(key)} should not start with _ which is a reserved prefix for Vue internals.`);\r\n }\r\n return has;\r\n }\r\n});\r\n// dev only\r\n// In dev mode, the proxy target exposes the same properties as seen on `this`\r\n// for easier console inspection. In prod mode it will be an empty object so\r\n// these properties definitions can be skipped.\r\nfunction createDevRenderContext(instance) {\r\n const target = {};\r\n // expose internal instance for proxy handlers\r\n Object.defineProperty(target, `_`, {\r\n configurable: true,\r\n enumerable: false,\r\n get: () => instance\r\n });\r\n // expose public properties\r\n Object.keys(publicPropertiesMap).forEach(key => {\r\n Object.defineProperty(target, key, {\r\n configurable: true,\r\n enumerable: false,\r\n get: () => publicPropertiesMap[key](instance),\r\n // intercepted by the proxy so no need for implementation,\r\n // but needed to prevent set errors\r\n set: NOOP\r\n });\r\n });\r\n return target;\r\n}\r\n// dev only\r\nfunction exposePropsOnRenderContext(instance) {\r\n const { ctx, propsOptions: [propsOptions] } = instance;\r\n if (propsOptions) {\r\n Object.keys(propsOptions).forEach(key => {\r\n Object.defineProperty(ctx, key, {\r\n enumerable: true,\r\n configurable: true,\r\n get: () => instance.props[key],\r\n set: NOOP\r\n });\r\n });\r\n }\r\n}\r\n// dev only\r\nfunction exposeSetupStateOnRenderContext(instance) {\r\n const { ctx, setupState } = instance;\r\n Object.keys(toRaw(setupState)).forEach(key => {\r\n if (!setupState.__isScriptSetup) {\r\n if (isReservedPrefix(key[0])) {\r\n warn(`setup() return property ${JSON.stringify(key)} should not start with \"$\" or \"_\" ` +\r\n `which are reserved prefixes for Vue internals.`);\r\n return;\r\n }\r\n Object.defineProperty(ctx, key, {\r\n enumerable: true,\r\n configurable: true,\r\n get: () => setupState[key],\r\n set: NOOP\r\n });\r\n }\r\n });\r\n}\n\nfunction createDuplicateChecker() {\r\n const cache = Object.create(null);\r\n return (type, key) => {\r\n if (cache[key]) {\r\n warn(`${type} property \"${key}\" is already defined in ${cache[key]}.`);\r\n }\r\n else {\r\n cache[key] = type;\r\n }\r\n };\r\n}\r\nlet shouldCacheAccess = true;\r\nfunction applyOptions(instance) {\r\n const options = resolveMergedOptions(instance);\r\n const publicThis = instance.proxy;\r\n const ctx = instance.ctx;\r\n // do not cache property access on public proxy during state initialization\r\n shouldCacheAccess = false;\r\n // call beforeCreate first before accessing other options since\r\n // the hook may mutate resolved options (#2791)\r\n if (options.beforeCreate) {\r\n callHook(options.beforeCreate, instance, \"bc\" /* BEFORE_CREATE */);\r\n }\r\n const { \r\n // state\r\n data: dataOptions, computed: computedOptions, methods, watch: watchOptions, provide: provideOptions, inject: injectOptions, \r\n // lifecycle\r\n created, beforeMount, mounted, beforeUpdate, updated, activated, deactivated, beforeDestroy, beforeUnmount, destroyed, unmounted, render, renderTracked, renderTriggered, errorCaptured, serverPrefetch, \r\n // public API\r\n expose, inheritAttrs, \r\n // assets\r\n components, directives, filters } = options;\r\n const checkDuplicateProperties = (process.env.NODE_ENV !== 'production') ? createDuplicateChecker() : null;\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n const [propsOptions] = instance.propsOptions;\r\n if (propsOptions) {\r\n for (const key in propsOptions) {\r\n checkDuplicateProperties(\"Props\" /* PROPS */, key);\r\n }\r\n }\r\n }\r\n // options initialization order (to be consistent with Vue 2):\r\n // - props (already done outside of this function)\r\n // - inject\r\n // - methods\r\n // - data (deferred since it relies on `this` access)\r\n // - computed\r\n // - watch (deferred since it relies on `this` access)\r\n if (injectOptions) {\r\n resolveInjections(injectOptions, ctx, checkDuplicateProperties, instance.appContext.config.unwrapInjectedRef);\r\n }\r\n if (methods) {\r\n for (const key in methods) {\r\n const methodHandler = methods[key];\r\n if (isFunction(methodHandler)) {\r\n // In dev mode, we use the `createRenderContext` function to define\r\n // methods to the proxy target, and those are read-only but\r\n // reconfigurable, so it needs to be redefined here\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n Object.defineProperty(ctx, key, {\r\n value: methodHandler.bind(publicThis),\r\n configurable: true,\r\n enumerable: true,\r\n writable: true\r\n });\r\n }\r\n else {\r\n ctx[key] = methodHandler.bind(publicThis);\r\n }\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n checkDuplicateProperties(\"Methods\" /* METHODS */, key);\r\n }\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`Method \"${key}\" has type \"${typeof methodHandler}\" in the component definition. ` +\r\n `Did you reference the function correctly?`);\r\n }\r\n }\r\n }\r\n if (dataOptions) {\r\n if ((process.env.NODE_ENV !== 'production') && !isFunction(dataOptions)) {\r\n warn(`The data option must be a function. ` +\r\n `Plain object usage is no longer supported.`);\r\n }\r\n const data = dataOptions.call(publicThis, publicThis);\r\n if ((process.env.NODE_ENV !== 'production') && isPromise(data)) {\r\n warn(`data() returned a Promise - note data() cannot be async; If you ` +\r\n `intend to perform data fetching before component renders, use ` +\r\n `async setup() + <Suspense>.`);\r\n }\r\n if (!isObject(data)) {\r\n (process.env.NODE_ENV !== 'production') && warn(`data() should return an object.`);\r\n }\r\n else {\r\n instance.data = reactive(data);\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n for (const key in data) {\r\n checkDuplicateProperties(\"Data\" /* DATA */, key);\r\n // expose data on ctx during dev\r\n if (!isReservedPrefix(key[0])) {\r\n Object.defineProperty(ctx, key, {\r\n configurable: true,\r\n enumerable: true,\r\n get: () => data[key],\r\n set: NOOP\r\n });\r\n }\r\n }\r\n }\r\n }\r\n }\r\n // state initialization complete at this point - start caching access\r\n shouldCacheAccess = true;\r\n if (computedOptions) {\r\n for (const key in computedOptions) {\r\n const opt = computedOptions[key];\r\n const get = isFunction(opt)\r\n ? opt.bind(publicThis, publicThis)\r\n : isFunction(opt.get)\r\n ? opt.get.bind(publicThis, publicThis)\r\n : NOOP;\r\n if ((process.env.NODE_ENV !== 'production') && get === NOOP) {\r\n warn(`Computed property \"${key}\" has no getter.`);\r\n }\r\n const set = !isFunction(opt) && isFunction(opt.set)\r\n ? opt.set.bind(publicThis)\r\n : (process.env.NODE_ENV !== 'production')\r\n ? () => {\r\n warn(`Write operation failed: computed property \"${key}\" is readonly.`);\r\n }\r\n : NOOP;\r\n const c = computed({\r\n get,\r\n set\r\n });\r\n Object.defineProperty(ctx, key, {\r\n enumerable: true,\r\n configurable: true,\r\n get: () => c.value,\r\n set: v => (c.value = v)\r\n });\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n checkDuplicateProperties(\"Computed\" /* COMPUTED */, key);\r\n }\r\n }\r\n }\r\n if (watchOptions) {\r\n for (const key in watchOptions) {\r\n createWatcher(watchOptions[key], ctx, publicThis, key);\r\n }\r\n }\r\n if (provideOptions) {\r\n const provides = isFunction(provideOptions)\r\n ? provideOptions.call(publicThis)\r\n : provideOptions;\r\n Reflect.ownKeys(provides).forEach(key => {\r\n provide(key, provides[key]);\r\n });\r\n }\r\n if (created) {\r\n callHook(created, instance, \"c\" /* CREATED */);\r\n }\r\n function registerLifecycleHook(register, hook) {\r\n if (isArray(hook)) {\r\n hook.forEach(_hook => register(_hook.bind(publicThis)));\r\n }\r\n else if (hook) {\r\n register(hook.bind(publicThis));\r\n }\r\n }\r\n registerLifecycleHook(onBeforeMount, beforeMount);\r\n registerLifecycleHook(onMounted, mounted);\r\n registerLifecycleHook(onBeforeUpdate, beforeUpdate);\r\n registerLifecycleHook(onUpdated, updated);\r\n registerLifecycleHook(onActivated, activated);\r\n registerLifecycleHook(onDeactivated, deactivated);\r\n registerLifecycleHook(onErrorCaptured, errorCaptured);\r\n registerLifecycleHook(onRenderTracked, renderTracked);\r\n registerLifecycleHook(onRenderTriggered, renderTriggered);\r\n registerLifecycleHook(onBeforeUnmount, beforeUnmount);\r\n registerLifecycleHook(onUnmounted, unmounted);\r\n registerLifecycleHook(onServerPrefetch, serverPrefetch);\r\n if (isArray(expose)) {\r\n if (expose.length) {\r\n const exposed = instance.exposed || (instance.exposed = {});\r\n expose.forEach(key => {\r\n Object.defineProperty(exposed, key, {\r\n get: () => publicThis[key],\r\n set: val => (publicThis[key] = val)\r\n });\r\n });\r\n }\r\n else if (!instance.exposed) {\r\n instance.exposed = {};\r\n }\r\n }\r\n // options that are handled when creating the instance but also need to be\r\n // applied from mixins\r\n if (render && instance.render === NOOP) {\r\n instance.render = render;\r\n }\r\n if (inheritAttrs != null) {\r\n instance.inheritAttrs = inheritAttrs;\r\n }\r\n // asset options.\r\n if (components)\r\n instance.components = components;\r\n if (directives)\r\n instance.directives = directives;\r\n}\r\nfunction resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP, unwrapRef = false) {\r\n if (isArray(injectOptions)) {\r\n injectOptions = normalizeInject(injectOptions);\r\n }\r\n for (const key in injectOptions) {\r\n const opt = injectOptions[key];\r\n let injected;\r\n if (isObject(opt)) {\r\n if ('default' in opt) {\r\n injected = inject(opt.from || key, opt.default, true /* treat default function as factory */);\r\n }\r\n else {\r\n injected = inject(opt.from || key);\r\n }\r\n }\r\n else {\r\n injected = inject(opt);\r\n }\r\n if (isRef(injected)) {\r\n // TODO remove the check in 3.3\r\n if (unwrapRef) {\r\n Object.defineProperty(ctx, key, {\r\n enumerable: true,\r\n configurable: true,\r\n get: () => injected.value,\r\n set: v => (injected.value = v)\r\n });\r\n }\r\n else {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`injected property \"${key}\" is a ref and will be auto-unwrapped ` +\r\n `and no longer needs \\`.value\\` in the next minor release. ` +\r\n `To opt-in to the new behavior now, ` +\r\n `set \\`app.config.unwrapInjectedRef = true\\` (this config is ` +\r\n `temporary and will not be needed in the future.)`);\r\n }\r\n ctx[key] = injected;\r\n }\r\n }\r\n else {\r\n ctx[key] = injected;\r\n }\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n checkDuplicateProperties(\"Inject\" /* INJECT */, key);\r\n }\r\n }\r\n}\r\nfunction callHook(hook, instance, type) {\r\n callWithAsyncErrorHandling(isArray(hook)\r\n ? hook.map(h => h.bind(instance.proxy))\r\n : hook.bind(instance.proxy), instance, type);\r\n}\r\nfunction createWatcher(raw, ctx, publicThis, key) {\r\n const getter = key.includes('.')\r\n ? createPathGetter(publicThis, key)\r\n : () => publicThis[key];\r\n if (isString(raw)) {\r\n const handler = ctx[raw];\r\n if (isFunction(handler)) {\r\n watch(getter, handler);\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`Invalid watch handler specified by key \"${raw}\"`, handler);\r\n }\r\n }\r\n else if (isFunction(raw)) {\r\n watch(getter, raw.bind(publicThis));\r\n }\r\n else if (isObject(raw)) {\r\n if (isArray(raw)) {\r\n raw.forEach(r => createWatcher(r, ctx, publicThis, key));\r\n }\r\n else {\r\n const handler = isFunction(raw.handler)\r\n ? raw.handler.bind(publicThis)\r\n : ctx[raw.handler];\r\n if (isFunction(handler)) {\r\n watch(getter, handler, raw);\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`Invalid watch handler specified by key \"${raw.handler}\"`, handler);\r\n }\r\n }\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`Invalid watch option: \"${key}\"`, raw);\r\n }\r\n}\r\n/**\r\n * Resolve merged options and cache it on the component.\r\n * This is done only once per-component since the merging does not involve\r\n * instances.\r\n */\r\nfunction resolveMergedOptions(instance) {\r\n const base = instance.type;\r\n const { mixins, extends: extendsOptions } = base;\r\n const { mixins: globalMixins, optionsCache: cache, config: { optionMergeStrategies } } = instance.appContext;\r\n const cached = cache.get(base);\r\n let resolved;\r\n if (cached) {\r\n resolved = cached;\r\n }\r\n else if (!globalMixins.length && !mixins && !extendsOptions) {\r\n {\r\n resolved = base;\r\n }\r\n }\r\n else {\r\n resolved = {};\r\n if (globalMixins.length) {\r\n globalMixins.forEach(m => mergeOptions(resolved, m, optionMergeStrategies, true));\r\n }\r\n mergeOptions(resolved, base, optionMergeStrategies);\r\n }\r\n cache.set(base, resolved);\r\n return resolved;\r\n}\r\nfunction mergeOptions(to, from, strats, asMixin = false) {\r\n const { mixins, extends: extendsOptions } = from;\r\n if (extendsOptions) {\r\n mergeOptions(to, extendsOptions, strats, true);\r\n }\r\n if (mixins) {\r\n mixins.forEach((m) => mergeOptions(to, m, strats, true));\r\n }\r\n for (const key in from) {\r\n if (asMixin && key === 'expose') {\r\n (process.env.NODE_ENV !== 'production') &&\r\n warn(`\"expose\" option is ignored when declared in mixins or extends. ` +\r\n `It should only be declared in the base component itself.`);\r\n }\r\n else {\r\n const strat = internalOptionMergeStrats[key] || (strats && strats[key]);\r\n to[key] = strat ? strat(to[key], from[key]) : from[key];\r\n }\r\n }\r\n return to;\r\n}\r\nconst internalOptionMergeStrats = {\r\n data: mergeDataFn,\r\n props: mergeObjectOptions,\r\n emits: mergeObjectOptions,\r\n // objects\r\n methods: mergeObjectOptions,\r\n computed: mergeObjectOptions,\r\n // lifecycle\r\n beforeCreate: mergeAsArray,\r\n created: mergeAsArray,\r\n beforeMount: mergeAsArray,\r\n mounted: mergeAsArray,\r\n beforeUpdate: mergeAsArray,\r\n updated: mergeAsArray,\r\n beforeDestroy: mergeAsArray,\r\n beforeUnmount: mergeAsArray,\r\n destroyed: mergeAsArray,\r\n unmounted: mergeAsArray,\r\n activated: mergeAsArray,\r\n deactivated: mergeAsArray,\r\n errorCaptured: mergeAsArray,\r\n serverPrefetch: mergeAsArray,\r\n // assets\r\n components: mergeObjectOptions,\r\n directives: mergeObjectOptions,\r\n // watch\r\n watch: mergeWatchOptions,\r\n // provide / inject\r\n provide: mergeDataFn,\r\n inject: mergeInject\r\n};\r\nfunction mergeDataFn(to, from) {\r\n if (!from) {\r\n return to;\r\n }\r\n if (!to) {\r\n return from;\r\n }\r\n return function mergedDataFn() {\r\n return (extend)(isFunction(to) ? to.call(this, this) : to, isFunction(from) ? from.call(this, this) : from);\r\n };\r\n}\r\nfunction mergeInject(to, from) {\r\n return mergeObjectOptions(normalizeInject(to), normalizeInject(from));\r\n}\r\nfunction normalizeInject(raw) {\r\n if (isArray(raw)) {\r\n const res = {};\r\n for (let i = 0; i < raw.length; i++) {\r\n res[raw[i]] = raw[i];\r\n }\r\n return res;\r\n }\r\n return raw;\r\n}\r\nfunction mergeAsArray(to, from) {\r\n return to ? [...new Set([].concat(to, from))] : from;\r\n}\r\nfunction mergeObjectOptions(to, from) {\r\n return to ? extend(extend(Object.create(null), to), from) : from;\r\n}\r\nfunction mergeWatchOptions(to, from) {\r\n if (!to)\r\n return from;\r\n if (!from)\r\n return to;\r\n const merged = extend(Object.create(null), to);\r\n for (const key in from) {\r\n merged[key] = mergeAsArray(to[key], from[key]);\r\n }\r\n return merged;\r\n}\n\nfunction initProps(instance, rawProps, isStateful, // result of bitwise flag comparison\r\nisSSR = false) {\r\n const props = {};\r\n const attrs = {};\r\n def(attrs, InternalObjectKey, 1);\r\n instance.propsDefaults = Object.create(null);\r\n setFullProps(instance, rawProps, props, attrs);\r\n // ensure all declared prop keys are present\r\n for (const key in instance.propsOptions[0]) {\r\n if (!(key in props)) {\r\n props[key] = undefined;\r\n }\r\n }\r\n // validation\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n validateProps(rawProps || {}, props, instance);\r\n }\r\n if (isStateful) {\r\n // stateful\r\n instance.props = isSSR ? props : shallowReactive(props);\r\n }\r\n else {\r\n if (!instance.type.props) {\r\n // functional w/ optional props, props === attrs\r\n instance.props = attrs;\r\n }\r\n else {\r\n // functional w/ declared props\r\n instance.props = props;\r\n }\r\n }\r\n instance.attrs = attrs;\r\n}\r\nfunction updateProps(instance, rawProps, rawPrevProps, optimized) {\r\n const { props, attrs, vnode: { patchFlag } } = instance;\r\n const rawCurrentProps = toRaw(props);\r\n const [options] = instance.propsOptions;\r\n let hasAttrsChanged = false;\r\n if (\r\n // always force full diff in dev\r\n // - #1942 if hmr is enabled with sfc component\r\n // - vite#872 non-sfc component used by sfc component\r\n !((process.env.NODE_ENV !== 'production') &&\r\n (instance.type.__hmrId ||\r\n (instance.parent && instance.parent.type.__hmrId))) &&\r\n (optimized || patchFlag > 0) &&\r\n !(patchFlag & 16 /* FULL_PROPS */)) {\r\n if (patchFlag & 8 /* PROPS */) {\r\n // Compiler-generated props & no keys change, just set the updated\r\n // the props.\r\n const propsToUpdate = instance.vnode.dynamicProps;\r\n for (let i = 0; i < propsToUpdate.length; i++) {\r\n let key = propsToUpdate[i];\r\n // skip if the prop key is a declared emit event listener\r\n if (isEmitListener(instance.emitsOptions, key)) {\r\n continue;\r\n }\r\n // PROPS flag guarantees rawProps to be non-null\r\n const value = rawProps[key];\r\n if (options) {\r\n // attr / props separation was done on init and will be consistent\r\n // in this code path, so just check if attrs have it.\r\n if (hasOwn(attrs, key)) {\r\n if (value !== attrs[key]) {\r\n attrs[key] = value;\r\n hasAttrsChanged = true;\r\n }\r\n }\r\n else {\r\n const camelizedKey = camelize(key);\r\n props[camelizedKey] = resolvePropValue(options, rawCurrentProps, camelizedKey, value, instance, false /* isAbsent */);\r\n }\r\n }\r\n else {\r\n if (value !== attrs[key]) {\r\n attrs[key] = value;\r\n hasAttrsChanged = true;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n // full props update.\r\n if (setFullProps(instance, rawProps, props, attrs)) {\r\n hasAttrsChanged = true;\r\n }\r\n // in case of dynamic props, check if we need to delete keys from\r\n // the props object\r\n let kebabKey;\r\n for (const key in rawCurrentProps) {\r\n if (!rawProps ||\r\n // for camelCase\r\n (!hasOwn(rawProps, key) &&\r\n // it's possible the original props was passed in as kebab-case\r\n // and converted to camelCase (#955)\r\n ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey)))) {\r\n if (options) {\r\n if (rawPrevProps &&\r\n // for camelCase\r\n (rawPrevProps[key] !== undefined ||\r\n // for kebab-case\r\n rawPrevProps[kebabKey] !== undefined)) {\r\n props[key] = resolvePropValue(options, rawCurrentProps, key, undefined, instance, true /* isAbsent */);\r\n }\r\n }\r\n else {\r\n delete props[key];\r\n }\r\n }\r\n }\r\n // in the case of functional component w/o props declaration, props and\r\n // attrs point to the same object so it should already have been updated.\r\n if (attrs !== rawCurrentProps) {\r\n for (const key in attrs) {\r\n if (!rawProps ||\r\n (!hasOwn(rawProps, key) &&\r\n (!false ))) {\r\n delete attrs[key];\r\n hasAttrsChanged = true;\r\n }\r\n }\r\n }\r\n }\r\n // trigger updates for $attrs in case it's used in component slots\r\n if (hasAttrsChanged) {\r\n trigger(instance, \"set\" /* SET */, '$attrs');\r\n }\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n validateProps(rawProps || {}, props, instance);\r\n }\r\n}\r\nfunction setFullProps(instance, rawProps, props, attrs) {\r\n const [options, needCastKeys] = instance.propsOptions;\r\n let hasAttrsChanged = false;\r\n let rawCastValues;\r\n if (rawProps) {\r\n for (let key in rawProps) {\r\n // key, ref are reserved and never passed down\r\n if (isReservedProp(key)) {\r\n continue;\r\n }\r\n const value = rawProps[key];\r\n // prop option names are camelized during normalization, so to support\r\n // kebab -> camel conversion here we need to camelize the key.\r\n let camelKey;\r\n if (options && hasOwn(options, (camelKey = camelize(key)))) {\r\n if (!needCastKeys || !needCastKeys.includes(camelKey)) {\r\n props[camelKey] = value;\r\n }\r\n else {\r\n (rawCastValues || (rawCastValues = {}))[camelKey] = value;\r\n }\r\n }\r\n else if (!isEmitListener(instance.emitsOptions, key)) {\r\n if (!(key in attrs) || value !== attrs[key]) {\r\n attrs[key] = value;\r\n hasAttrsChanged = true;\r\n }\r\n }\r\n }\r\n }\r\n if (needCastKeys) {\r\n const rawCurrentProps = toRaw(props);\r\n const castValues = rawCastValues || EMPTY_OBJ;\r\n for (let i = 0; i < needCastKeys.length; i++) {\r\n const key = needCastKeys[i];\r\n props[key] = resolvePropValue(options, rawCurrentProps, key, castValues[key], instance, !hasOwn(castValues, key));\r\n }\r\n }\r\n return hasAttrsChanged;\r\n}\r\nfunction resolvePropValue(options, props, key, value, instance, isAbsent) {\r\n const opt = options[key];\r\n if (opt != null) {\r\n const hasDefault = hasOwn(opt, 'default');\r\n // default values\r\n if (hasDefault && value === undefined) {\r\n const defaultValue = opt.default;\r\n if (opt.type !== Function && isFunction(defaultValue)) {\r\n const { propsDefaults } = instance;\r\n if (key in propsDefaults) {\r\n value = propsDefaults[key];\r\n }\r\n else {\r\n setCurrentInstance(instance);\r\n value = propsDefaults[key] = defaultValue.call(null, props);\r\n unsetCurrentInstance();\r\n }\r\n }\r\n else {\r\n value = defaultValue;\r\n }\r\n }\r\n // boolean casting\r\n if (opt[0 /* shouldCast */]) {\r\n if (isAbsent && !hasDefault) {\r\n value = false;\r\n }\r\n else if (opt[1 /* shouldCastTrue */] &&\r\n (value === '' || value === hyphenate(key))) {\r\n value = true;\r\n }\r\n }\r\n }\r\n return value;\r\n}\r\nfunction normalizePropsOptions(comp, appContext, asMixin = false) {\r\n const cache = appContext.propsCache;\r\n const cached = cache.get(comp);\r\n if (cached) {\r\n return cached;\r\n }\r\n const raw = comp.props;\r\n const normalized = {};\r\n const needCastKeys = [];\r\n // apply mixin/extends props\r\n let hasExtends = false;\r\n if (__VUE_OPTIONS_API__ && !isFunction(comp)) {\r\n const extendProps = (raw) => {\r\n hasExtends = true;\r\n const [props, keys] = normalizePropsOptions(raw, appContext, true);\r\n extend(normalized, props);\r\n if (keys)\r\n needCastKeys.push(...keys);\r\n };\r\n if (!asMixin && appContext.mixins.length) {\r\n appContext.mixins.forEach(extendProps);\r\n }\r\n if (comp.extends) {\r\n extendProps(comp.extends);\r\n }\r\n if (comp.mixins) {\r\n comp.mixins.forEach(extendProps);\r\n }\r\n }\r\n if (!raw && !hasExtends) {\r\n cache.set(comp, EMPTY_ARR);\r\n return EMPTY_ARR;\r\n }\r\n if (isArray(raw)) {\r\n for (let i = 0; i < raw.length; i++) {\r\n if ((process.env.NODE_ENV !== 'production') && !isString(raw[i])) {\r\n warn(`props must be strings when using array syntax.`, raw[i]);\r\n }\r\n const normalizedKey = camelize(raw[i]);\r\n if (validatePropName(normalizedKey)) {\r\n normalized[normalizedKey] = EMPTY_OBJ;\r\n }\r\n }\r\n }\r\n else if (raw) {\r\n if ((process.env.NODE_ENV !== 'production') && !isObject(raw)) {\r\n warn(`invalid props options`, raw);\r\n }\r\n for (const key in raw) {\r\n const normalizedKey = camelize(key);\r\n if (validatePropName(normalizedKey)) {\r\n const opt = raw[key];\r\n const prop = (normalized[normalizedKey] =\r\n isArray(opt) || isFunction(opt) ? { type: opt } : opt);\r\n if (prop) {\r\n const booleanIndex = getTypeIndex(Boolean, prop.type);\r\n const stringIndex = getTypeIndex(String, prop.type);\r\n prop[0 /* shouldCast */] = booleanIndex > -1;\r\n prop[1 /* shouldCastTrue */] =\r\n stringIndex < 0 || booleanIndex < stringIndex;\r\n // if the prop needs boolean casting or default value\r\n if (booleanIndex > -1 || hasOwn(prop, 'default')) {\r\n needCastKeys.push(normalizedKey);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n const res = [normalized, needCastKeys];\r\n cache.set(comp, res);\r\n return res;\r\n}\r\nfunction validatePropName(key) {\r\n if (key[0] !== '$') {\r\n return true;\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`Invalid prop name: \"${key}\" is a reserved property.`);\r\n }\r\n return false;\r\n}\r\n// use function string name to check type constructors\r\n// so that it works across vms / iframes.\r\nfunction getType(ctor) {\r\n const match = ctor && ctor.toString().match(/^\\s*function (\\w+)/);\r\n return match ? match[1] : ctor === null ? 'null' : '';\r\n}\r\nfunction isSameType(a, b) {\r\n return getType(a) === getType(b);\r\n}\r\nfunction getTypeIndex(type, expectedTypes) {\r\n if (isArray(expectedTypes)) {\r\n return expectedTypes.findIndex(t => isSameType(t, type));\r\n }\r\n else if (isFunction(expectedTypes)) {\r\n return isSameType(expectedTypes, type) ? 0 : -1;\r\n }\r\n return -1;\r\n}\r\n/**\r\n * dev only\r\n */\r\nfunction validateProps(rawProps, props, instance) {\r\n const resolvedValues = toRaw(props);\r\n const options = instance.propsOptions[0];\r\n for (const key in options) {\r\n let opt = options[key];\r\n if (opt == null)\r\n continue;\r\n validateProp(key, resolvedValues[key], opt, !hasOwn(rawProps, key) && !hasOwn(rawProps, hyphenate(key)));\r\n }\r\n}\r\n/**\r\n * dev only\r\n */\r\nfunction validateProp(name, value, prop, isAbsent) {\r\n const { type, required, validator } = prop;\r\n // required!\r\n if (required && isAbsent) {\r\n warn('Missing required prop: \"' + name + '\"');\r\n return;\r\n }\r\n // missing but optional\r\n if (value == null && !prop.required) {\r\n return;\r\n }\r\n // type check\r\n if (type != null && type !== true) {\r\n let isValid = false;\r\n const types = isArray(type) ? type : [type];\r\n const expectedTypes = [];\r\n // value is valid as long as one of the specified types match\r\n for (let i = 0; i < types.length && !isValid; i++) {\r\n const { valid, expectedType } = assertType(value, types[i]);\r\n expectedTypes.push(expectedType || '');\r\n isValid = valid;\r\n }\r\n if (!isValid) {\r\n warn(getInvalidTypeMessage(name, value, expectedTypes));\r\n return;\r\n }\r\n }\r\n // custom validator\r\n if (validator && !validator(value)) {\r\n warn('Invalid prop: custom validator check failed for prop \"' + name + '\".');\r\n }\r\n}\r\nconst isSimpleType = /*#__PURE__*/ makeMap('String,Number,Boolean,Function,Symbol,BigInt');\r\n/**\r\n * dev only\r\n */\r\nfunction assertType(value, type) {\r\n let valid;\r\n const expectedType = getType(type);\r\n if (isSimpleType(expectedType)) {\r\n const t = typeof value;\r\n valid = t === expectedType.toLowerCase();\r\n // for primitive wrapper objects\r\n if (!valid && t === 'object') {\r\n valid = value instanceof type;\r\n }\r\n }\r\n else if (expectedType === 'Object') {\r\n valid = isObject(value);\r\n }\r\n else if (expectedType === 'Array') {\r\n valid = isArray(value);\r\n }\r\n else if (expectedType === 'null') {\r\n valid = value === null;\r\n }\r\n else {\r\n valid = value instanceof type;\r\n }\r\n return {\r\n valid,\r\n expectedType\r\n };\r\n}\r\n/**\r\n * dev only\r\n */\r\nfunction getInvalidTypeMessage(name, value, expectedTypes) {\r\n let message = `Invalid prop: type check failed for prop \"${name}\".` +\r\n ` Expected ${expectedTypes.map(capitalize).join(' | ')}`;\r\n const expectedType = expectedTypes[0];\r\n const receivedType = toRawType(value);\r\n const expectedValue = styleValue(value, expectedType);\r\n const receivedValue = styleValue(value, receivedType);\r\n // check if we need to specify expected value\r\n if (expectedTypes.length === 1 &&\r\n isExplicable(expectedType) &&\r\n !isBoolean(expectedType, receivedType)) {\r\n message += ` with value ${expectedValue}`;\r\n }\r\n message += `, got ${receivedType} `;\r\n // check if we need to specify received value\r\n if (isExplicable(receivedType)) {\r\n message += `with value ${receivedValue}.`;\r\n }\r\n return message;\r\n}\r\n/**\r\n * dev only\r\n */\r\nfunction styleValue(value, type) {\r\n if (type === 'String') {\r\n return `\"${value}\"`;\r\n }\r\n else if (type === 'Number') {\r\n return `${Number(value)}`;\r\n }\r\n else {\r\n return `${value}`;\r\n }\r\n}\r\n/**\r\n * dev only\r\n */\r\nfunction isExplicable(type) {\r\n const explicitTypes = ['string', 'number', 'boolean'];\r\n return explicitTypes.some(elem => type.toLowerCase() === elem);\r\n}\r\n/**\r\n * dev only\r\n */\r\nfunction isBoolean(...args) {\r\n return args.some(elem => elem.toLowerCase() === 'boolean');\r\n}\n\nconst isInternalKey = (key) => key[0] === '_' || key === '$stable';\r\nconst normalizeSlotValue = (value) => isArray(value)\r\n ? value.map(normalizeVNode)\r\n : [normalizeVNode(value)];\r\nconst normalizeSlot = (key, rawSlot, ctx) => {\r\n if (rawSlot._n) {\r\n // already normalized - #5353\r\n return rawSlot;\r\n }\r\n const normalized = withCtx((...args) => {\r\n if ((process.env.NODE_ENV !== 'production') && currentInstance) {\r\n warn(`Slot \"${key}\" invoked outside of the render function: ` +\r\n `this will not track dependencies used in the slot. ` +\r\n `Invoke the slot function inside the render function instead.`);\r\n }\r\n return normalizeSlotValue(rawSlot(...args));\r\n }, ctx);\r\n normalized._c = false;\r\n return normalized;\r\n};\r\nconst normalizeObjectSlots = (rawSlots, slots, instance) => {\r\n const ctx = rawSlots._ctx;\r\n for (const key in rawSlots) {\r\n if (isInternalKey(key))\r\n continue;\r\n const value = rawSlots[key];\r\n if (isFunction(value)) {\r\n slots[key] = normalizeSlot(key, value, ctx);\r\n }\r\n else if (value != null) {\r\n if ((process.env.NODE_ENV !== 'production') &&\r\n !(false )) {\r\n warn(`Non-function value encountered for slot \"${key}\". ` +\r\n `Prefer function slots for better performance.`);\r\n }\r\n const normalized = normalizeSlotValue(value);\r\n slots[key] = () => normalized;\r\n }\r\n }\r\n};\r\nconst normalizeVNodeSlots = (instance, children) => {\r\n if ((process.env.NODE_ENV !== 'production') &&\r\n !isKeepAlive(instance.vnode) &&\r\n !(false )) {\r\n warn(`Non-function value encountered for default slot. ` +\r\n `Prefer function slots for better performance.`);\r\n }\r\n const normalized = normalizeSlotValue(children);\r\n instance.slots.default = () => normalized;\r\n};\r\nconst initSlots = (instance, children) => {\r\n if (instance.vnode.shapeFlag & 32 /* SLOTS_CHILDREN */) {\r\n const type = children._;\r\n if (type) {\r\n // users can get the shallow readonly version of the slots object through `this.$slots`,\r\n // we should avoid the proxy object polluting the slots of the internal instance\r\n instance.slots = toRaw(children);\r\n // make compiler marker non-enumerable\r\n def(children, '_', type);\r\n }\r\n else {\r\n normalizeObjectSlots(children, (instance.slots = {}));\r\n }\r\n }\r\n else {\r\n instance.slots = {};\r\n if (children) {\r\n normalizeVNodeSlots(instance, children);\r\n }\r\n }\r\n def(instance.slots, InternalObjectKey, 1);\r\n};\r\nconst updateSlots = (instance, children, optimized) => {\r\n const { vnode, slots } = instance;\r\n let needDeletionCheck = true;\r\n let deletionComparisonTarget = EMPTY_OBJ;\r\n if (vnode.shapeFlag & 32 /* SLOTS_CHILDREN */) {\r\n const type = children._;\r\n if (type) {\r\n // compiled slots.\r\n if ((process.env.NODE_ENV !== 'production') && isHmrUpdating) {\r\n // Parent was HMR updated so slot content may have changed.\r\n // force update slots and mark instance for hmr as well\r\n extend(slots, children);\r\n }\r\n else if (optimized && type === 1 /* STABLE */) {\r\n // compiled AND stable.\r\n // no need to update, and skip stale slots removal.\r\n needDeletionCheck = false;\r\n }\r\n else {\r\n // compiled but dynamic (v-if/v-for on slots) - update slots, but skip\r\n // normalization.\r\n extend(slots, children);\r\n // #2893\r\n // when rendering the optimized slots by manually written render function,\r\n // we need to delete the `slots._` flag if necessary to make subsequent updates reliable,\r\n // i.e. let the `renderSlot` create the bailed Fragment\r\n if (!optimized && type === 1 /* STABLE */) {\r\n delete slots._;\r\n }\r\n }\r\n }\r\n else {\r\n needDeletionCheck = !children.$stable;\r\n normalizeObjectSlots(children, slots);\r\n }\r\n deletionComparisonTarget = children;\r\n }\r\n else if (children) {\r\n // non slot object children (direct value) passed to a component\r\n normalizeVNodeSlots(instance, children);\r\n deletionComparisonTarget = { default: 1 };\r\n }\r\n // delete stale slots\r\n if (needDeletionCheck) {\r\n for (const key in slots) {\r\n if (!isInternalKey(key) && !(key in deletionComparisonTarget)) {\r\n delete slots[key];\r\n }\r\n }\r\n }\r\n};\n\nfunction createAppContext() {\r\n return {\r\n app: null,\r\n config: {\r\n isNativeTag: NO,\r\n performance: false,\r\n globalProperties: {},\r\n optionMergeStrategies: {},\r\n errorHandler: undefined,\r\n warnHandler: undefined,\r\n compilerOptions: {}\r\n },\r\n mixins: [],\r\n components: {},\r\n directives: {},\r\n provides: Object.create(null),\r\n optionsCache: new WeakMap(),\r\n propsCache: new WeakMap(),\r\n emitsCache: new WeakMap()\r\n };\r\n}\r\nlet uid = 0;\r\nfunction createAppAPI(render, hydrate) {\r\n return function createApp(rootComponent, rootProps = null) {\r\n if (!isFunction(rootComponent)) {\r\n rootComponent = Object.assign({}, rootComponent);\r\n }\r\n if (rootProps != null && !isObject(rootProps)) {\r\n (process.env.NODE_ENV !== 'production') && warn(`root props passed to app.mount() must be an object.`);\r\n rootProps = null;\r\n }\r\n const context = createAppContext();\r\n const installedPlugins = new Set();\r\n let isMounted = false;\r\n const app = (context.app = {\r\n _uid: uid++,\r\n _component: rootComponent,\r\n _props: rootProps,\r\n _container: null,\r\n _context: context,\r\n _instance: null,\r\n version,\r\n get config() {\r\n return context.config;\r\n },\r\n set config(v) {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`app.config cannot be replaced. Modify individual options instead.`);\r\n }\r\n },\r\n use(plugin, ...options) {\r\n if (installedPlugins.has(plugin)) {\r\n (process.env.NODE_ENV !== 'production') && warn(`Plugin has already been applied to target app.`);\r\n }\r\n else if (plugin && isFunction(plugin.install)) {\r\n installedPlugins.add(plugin);\r\n plugin.install(app, ...options);\r\n }\r\n else if (isFunction(plugin)) {\r\n installedPlugins.add(plugin);\r\n plugin(app, ...options);\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`A plugin must either be a function or an object with an \"install\" ` +\r\n `function.`);\r\n }\r\n return app;\r\n },\r\n mixin(mixin) {\r\n if (__VUE_OPTIONS_API__) {\r\n if (!context.mixins.includes(mixin)) {\r\n context.mixins.push(mixin);\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn('Mixin has already been applied to target app' +\r\n (mixin.name ? `: ${mixin.name}` : ''));\r\n }\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn('Mixins are only available in builds supporting Options API');\r\n }\r\n return app;\r\n },\r\n component(name, component) {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n validateComponentName(name, context.config);\r\n }\r\n if (!component) {\r\n return context.components[name];\r\n }\r\n if ((process.env.NODE_ENV !== 'production') && context.components[name]) {\r\n warn(`Component \"${name}\" has already been registered in target app.`);\r\n }\r\n context.components[name] = component;\r\n return app;\r\n },\r\n directive(name, directive) {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n validateDirectiveName(name);\r\n }\r\n if (!directive) {\r\n return context.directives[name];\r\n }\r\n if ((process.env.NODE_ENV !== 'production') && context.directives[name]) {\r\n warn(`Directive \"${name}\" has already been registered in target app.`);\r\n }\r\n context.directives[name] = directive;\r\n return app;\r\n },\r\n mount(rootContainer, isHydrate, isSVG) {\r\n if (!isMounted) {\r\n // #5571\r\n if ((process.env.NODE_ENV !== 'production') && rootContainer.__vue_app__) {\r\n warn(`There is already an app instance mounted on the host container.\\n` +\r\n ` If you want to mount another app on the same host container,` +\r\n ` you need to unmount the previous app by calling \\`app.unmount()\\` first.`);\r\n }\r\n const vnode = createVNode(rootComponent, rootProps);\r\n // store app context on the root VNode.\r\n // this will be set on the root instance on initial mount.\r\n vnode.appContext = context;\r\n // HMR root reload\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n context.reload = () => {\r\n render(cloneVNode(vnode), rootContainer, isSVG);\r\n };\r\n }\r\n if (isHydrate && hydrate) {\r\n hydrate(vnode, rootContainer);\r\n }\r\n else {\r\n render(vnode, rootContainer, isSVG);\r\n }\r\n isMounted = true;\r\n app._container = rootContainer;\r\n rootContainer.__vue_app__ = app;\r\n if ((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) {\r\n app._instance = vnode.component;\r\n devtoolsInitApp(app, version);\r\n }\r\n return getExposeProxy(vnode.component) || vnode.component.proxy;\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`App has already been mounted.\\n` +\r\n `If you want to remount the same app, move your app creation logic ` +\r\n `into a factory function and create fresh app instances for each ` +\r\n `mount - e.g. \\`const createMyApp = () => createApp(App)\\``);\r\n }\r\n },\r\n unmount() {\r\n if (isMounted) {\r\n render(null, app._container);\r\n if ((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) {\r\n app._instance = null;\r\n devtoolsUnmountApp(app);\r\n }\r\n delete app._container.__vue_app__;\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`Cannot unmount an app that is not mounted.`);\r\n }\r\n },\r\n provide(key, value) {\r\n if ((process.env.NODE_ENV !== 'production') && key in context.provides) {\r\n warn(`App already provides property with key \"${String(key)}\". ` +\r\n `It will be overwritten with the new value.`);\r\n }\r\n context.provides[key] = value;\r\n return app;\r\n }\r\n });\r\n return app;\r\n };\r\n}\n\n/**\r\n * Function for handling a template ref\r\n */\r\nfunction setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {\r\n if (isArray(rawRef)) {\r\n rawRef.forEach((r, i) => setRef(r, oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), parentSuspense, vnode, isUnmount));\r\n return;\r\n }\r\n if (isAsyncWrapper(vnode) && !isUnmount) {\r\n // when mounting async components, nothing needs to be done,\r\n // because the template ref is forwarded to inner component\r\n return;\r\n }\r\n const refValue = vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */\r\n ? getExposeProxy(vnode.component) || vnode.component.proxy\r\n : vnode.el;\r\n const value = isUnmount ? null : refValue;\r\n const { i: owner, r: ref } = rawRef;\r\n if ((process.env.NODE_ENV !== 'production') && !owner) {\r\n warn(`Missing ref owner context. ref cannot be used on hoisted vnodes. ` +\r\n `A vnode with ref must be created inside the render function.`);\r\n return;\r\n }\r\n const oldRef = oldRawRef && oldRawRef.r;\r\n const refs = owner.refs === EMPTY_OBJ ? (owner.refs = {}) : owner.refs;\r\n const setupState = owner.setupState;\r\n // dynamic ref changed. unset old ref\r\n if (oldRef != null && oldRef !== ref) {\r\n if (isString(oldRef)) {\r\n refs[oldRef] = null;\r\n if (hasOwn(setupState, oldRef)) {\r\n setupState[oldRef] = null;\r\n }\r\n }\r\n else if (isRef(oldRef)) {\r\n oldRef.value = null;\r\n }\r\n }\r\n if (isFunction(ref)) {\r\n callWithErrorHandling(ref, owner, 12 /* FUNCTION_REF */, [value, refs]);\r\n }\r\n else {\r\n const _isString = isString(ref);\r\n const _isRef = isRef(ref);\r\n if (_isString || _isRef) {\r\n const doSet = () => {\r\n if (rawRef.f) {\r\n const existing = _isString ? refs[ref] : ref.value;\r\n if (isUnmount) {\r\n isArray(existing) && remove(existing, refValue);\r\n }\r\n else {\r\n if (!isArray(existing)) {\r\n if (_isString) {\r\n refs[ref] = [refValue];\r\n if (hasOwn(setupState, ref)) {\r\n setupState[ref] = refs[ref];\r\n }\r\n }\r\n else {\r\n ref.value = [refValue];\r\n if (rawRef.k)\r\n refs[rawRef.k] = ref.value;\r\n }\r\n }\r\n else if (!existing.includes(refValue)) {\r\n existing.push(refValue);\r\n }\r\n }\r\n }\r\n else if (_isString) {\r\n refs[ref] = value;\r\n if (hasOwn(setupState, ref)) {\r\n setupState[ref] = value;\r\n }\r\n }\r\n else if (isRef(ref)) {\r\n ref.value = value;\r\n if (rawRef.k)\r\n refs[rawRef.k] = value;\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn('Invalid template ref type:', ref, `(${typeof ref})`);\r\n }\r\n };\r\n if (value) {\r\n doSet.id = -1;\r\n queuePostRenderEffect(doSet, parentSuspense);\r\n }\r\n else {\r\n doSet();\r\n }\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn('Invalid template ref type:', ref, `(${typeof ref})`);\r\n }\r\n }\r\n}\n\nlet hasMismatch = false;\r\nconst isSVGContainer = (container) => /svg/.test(container.namespaceURI) && container.tagName !== 'foreignObject';\r\nconst isComment = (node) => node.nodeType === 8 /* COMMENT */;\r\n// Note: hydration is DOM-specific\r\n// But we have to place it in core due to tight coupling with core - splitting\r\n// it out creates a ton of unnecessary complexity.\r\n// Hydration also depends on some renderer internal logic which needs to be\r\n// passed in via arguments.\r\nfunction createHydrationFunctions(rendererInternals) {\r\n const { mt: mountComponent, p: patch, o: { patchProp, createText, nextSibling, parentNode, remove, insert, createComment } } = rendererInternals;\r\n const hydrate = (vnode, container) => {\r\n if (!container.hasChildNodes()) {\r\n (process.env.NODE_ENV !== 'production') &&\r\n warn(`Attempting to hydrate existing markup but container is empty. ` +\r\n `Performing full mount instead.`);\r\n patch(null, vnode, container);\r\n flushPostFlushCbs();\r\n return;\r\n }\r\n hasMismatch = false;\r\n hydrateNode(container.firstChild, vnode, null, null, null);\r\n flushPostFlushCbs();\r\n if (hasMismatch && !false) {\r\n // this error should show up in production\r\n console.error(`Hydration completed but contains mismatches.`);\r\n }\r\n };\r\n const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {\r\n const isFragmentStart = isComment(node) && node.data === '[';\r\n const onMismatch = () => handleMismatch(node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragmentStart);\r\n const { type, ref, shapeFlag, patchFlag } = vnode;\r\n const domType = node.nodeType;\r\n vnode.el = node;\r\n if (patchFlag === -2 /* BAIL */) {\r\n optimized = false;\r\n vnode.dynamicChildren = null;\r\n }\r\n let nextNode = null;\r\n switch (type) {\r\n case Text:\r\n if (domType !== 3 /* TEXT */) {\r\n // #5728 empty text node inside a slot can cause hydration failure\r\n // because the server rendered HTML won't contain a text node\r\n if (vnode.children === '') {\r\n insert((vnode.el = createText('')), parentNode(node), node);\r\n nextNode = node;\r\n }\r\n else {\r\n nextNode = onMismatch();\r\n }\r\n }\r\n else {\r\n if (node.data !== vnode.children) {\r\n hasMismatch = true;\r\n (process.env.NODE_ENV !== 'production') &&\r\n warn(`Hydration text mismatch:` +\r\n `\\n- Client: ${JSON.stringify(node.data)}` +\r\n `\\n- Server: ${JSON.stringify(vnode.children)}`);\r\n node.data = vnode.children;\r\n }\r\n nextNode = nextSibling(node);\r\n }\r\n break;\r\n case Comment:\r\n if (domType !== 8 /* COMMENT */ || isFragmentStart) {\r\n nextNode = onMismatch();\r\n }\r\n else {\r\n nextNode = nextSibling(node);\r\n }\r\n break;\r\n case Static:\r\n if (domType !== 1 /* ELEMENT */) {\r\n nextNode = onMismatch();\r\n }\r\n else {\r\n // determine anchor, adopt content\r\n nextNode = node;\r\n // if the static vnode has its content stripped during build,\r\n // adopt it from the server-rendered HTML.\r\n const needToAdoptContent = !vnode.children.length;\r\n for (let i = 0; i < vnode.staticCount; i++) {\r\n if (needToAdoptContent)\r\n vnode.children += nextNode.outerHTML;\r\n if (i === vnode.staticCount - 1) {\r\n vnode.anchor = nextNode;\r\n }\r\n nextNode = nextSibling(nextNode);\r\n }\r\n return nextNode;\r\n }\r\n break;\r\n case Fragment:\r\n if (!isFragmentStart) {\r\n nextNode = onMismatch();\r\n }\r\n else {\r\n nextNode = hydrateFragment(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);\r\n }\r\n break;\r\n default:\r\n if (shapeFlag & 1 /* ELEMENT */) {\r\n if (domType !== 1 /* ELEMENT */ ||\r\n vnode.type.toLowerCase() !==\r\n node.tagName.toLowerCase()) {\r\n nextNode = onMismatch();\r\n }\r\n else {\r\n nextNode = hydrateElement(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);\r\n }\r\n }\r\n else if (shapeFlag & 6 /* COMPONENT */) {\r\n // when setting up the render effect, if the initial vnode already\r\n // has .el set, the component will perform hydration instead of mount\r\n // on its sub-tree.\r\n vnode.slotScopeIds = slotScopeIds;\r\n const container = parentNode(node);\r\n mountComponent(vnode, container, null, parentComponent, parentSuspense, isSVGContainer(container), optimized);\r\n // component may be async, so in the case of fragments we cannot rely\r\n // on component's rendered output to determine the end of the fragment\r\n // instead, we do a lookahead to find the end anchor node.\r\n nextNode = isFragmentStart\r\n ? locateClosingAsyncAnchor(node)\r\n : nextSibling(node);\r\n // #4293 teleport as component root\r\n if (nextNode &&\r\n isComment(nextNode) &&\r\n nextNode.data === 'teleport end') {\r\n nextNode = nextSibling(nextNode);\r\n }\r\n // #3787\r\n // if component is async, it may get moved / unmounted before its\r\n // inner component is loaded, so we need to give it a placeholder\r\n // vnode that matches its adopted DOM.\r\n if (isAsyncWrapper(vnode)) {\r\n let subTree;\r\n if (isFragmentStart) {\r\n subTree = createVNode(Fragment);\r\n subTree.anchor = nextNode\r\n ? nextNode.previousSibling\r\n : container.lastChild;\r\n }\r\n else {\r\n subTree =\r\n node.nodeType === 3 ? createTextVNode('') : createVNode('div');\r\n }\r\n subTree.el = node;\r\n vnode.component.subTree = subTree;\r\n }\r\n }\r\n else if (shapeFlag & 64 /* TELEPORT */) {\r\n if (domType !== 8 /* COMMENT */) {\r\n nextNode = onMismatch();\r\n }\r\n else {\r\n nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, rendererInternals, hydrateChildren);\r\n }\r\n }\r\n else if (shapeFlag & 128 /* SUSPENSE */) {\r\n nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, isSVGContainer(parentNode(node)), slotScopeIds, optimized, rendererInternals, hydrateNode);\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn('Invalid HostVNode type:', type, `(${typeof type})`);\r\n }\r\n }\r\n if (ref != null) {\r\n setRef(ref, null, parentSuspense, vnode);\r\n }\r\n return nextNode;\r\n };\r\n const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {\r\n optimized = optimized || !!vnode.dynamicChildren;\r\n const { type, props, patchFlag, shapeFlag, dirs } = vnode;\r\n // #4006 for form elements with non-string v-model value bindings\r\n // e.g. <option :value=\"obj\">, <input type=\"checkbox\" :true-value=\"1\">\r\n const forcePatchValue = (type === 'input' && dirs) || type === 'option';\r\n // skip props & children if this is hoisted static nodes\r\n // #5405 in dev, always hydrate children for HMR\r\n if ((process.env.NODE_ENV !== 'production') || forcePatchValue || patchFlag !== -1 /* HOISTED */) {\r\n if (dirs) {\r\n invokeDirectiveHook(vnode, null, parentComponent, 'created');\r\n }\r\n // props\r\n if (props) {\r\n if (forcePatchValue ||\r\n !optimized ||\r\n patchFlag & (16 /* FULL_PROPS */ | 32 /* HYDRATE_EVENTS */)) {\r\n for (const key in props) {\r\n if ((forcePatchValue && key.endsWith('value')) ||\r\n (isOn(key) && !isReservedProp(key))) {\r\n patchProp(el, key, null, props[key], false, undefined, parentComponent);\r\n }\r\n }\r\n }\r\n else if (props.onClick) {\r\n // Fast path for click listeners (which is most often) to avoid\r\n // iterating through props.\r\n patchProp(el, 'onClick', null, props.onClick, false, undefined, parentComponent);\r\n }\r\n }\r\n // vnode / directive hooks\r\n let vnodeHooks;\r\n if ((vnodeHooks = props && props.onVnodeBeforeMount)) {\r\n invokeVNodeHook(vnodeHooks, parentComponent, vnode);\r\n }\r\n if (dirs) {\r\n invokeDirectiveHook(vnode, null, parentComponent, 'beforeMount');\r\n }\r\n if ((vnodeHooks = props && props.onVnodeMounted) || dirs) {\r\n queueEffectWithSuspense(() => {\r\n vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode);\r\n dirs && invokeDirectiveHook(vnode, null, parentComponent, 'mounted');\r\n }, parentSuspense);\r\n }\r\n // children\r\n if (shapeFlag & 16 /* ARRAY_CHILDREN */ &&\r\n // skip if element has innerHTML / textContent\r\n !(props && (props.innerHTML || props.textContent))) {\r\n let next = hydrateChildren(el.firstChild, vnode, el, parentComponent, parentSuspense, slotScopeIds, optimized);\r\n let hasWarned = false;\r\n while (next) {\r\n hasMismatch = true;\r\n if ((process.env.NODE_ENV !== 'production') && !hasWarned) {\r\n warn(`Hydration children mismatch in <${vnode.type}>: ` +\r\n `server rendered element contains more child nodes than client vdom.`);\r\n hasWarned = true;\r\n }\r\n // The SSRed DOM contains more nodes than it should. Remove them.\r\n const cur = next;\r\n next = next.nextSibling;\r\n remove(cur);\r\n }\r\n }\r\n else if (shapeFlag & 8 /* TEXT_CHILDREN */) {\r\n if (el.textContent !== vnode.children) {\r\n hasMismatch = true;\r\n (process.env.NODE_ENV !== 'production') &&\r\n warn(`Hydration text content mismatch in <${vnode.type}>:\\n` +\r\n `- Client: ${el.textContent}\\n` +\r\n `- Server: ${vnode.children}`);\r\n el.textContent = vnode.children;\r\n }\r\n }\r\n }\r\n return el.nextSibling;\r\n };\r\n const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => {\r\n optimized = optimized || !!parentVNode.dynamicChildren;\r\n const children = parentVNode.children;\r\n const l = children.length;\r\n let hasWarned = false;\r\n for (let i = 0; i < l; i++) {\r\n const vnode = optimized\r\n ? children[i]\r\n : (children[i] = normalizeVNode(children[i]));\r\n if (node) {\r\n node = hydrateNode(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);\r\n }\r\n else if (vnode.type === Text && !vnode.children) {\r\n continue;\r\n }\r\n else {\r\n hasMismatch = true;\r\n if ((process.env.NODE_ENV !== 'production') && !hasWarned) {\r\n warn(`Hydration children mismatch in <${container.tagName.toLowerCase()}>: ` +\r\n `server rendered element contains fewer child nodes than client vdom.`);\r\n hasWarned = true;\r\n }\r\n // the SSRed DOM didn't contain enough nodes. Mount the missing ones.\r\n patch(null, vnode, container, null, parentComponent, parentSuspense, isSVGContainer(container), slotScopeIds);\r\n }\r\n }\r\n return node;\r\n };\r\n const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {\r\n const { slotScopeIds: fragmentSlotScopeIds } = vnode;\r\n if (fragmentSlotScopeIds) {\r\n slotScopeIds = slotScopeIds\r\n ? slotScopeIds.concat(fragmentSlotScopeIds)\r\n : fragmentSlotScopeIds;\r\n }\r\n const container = parentNode(node);\r\n const next = hydrateChildren(nextSibling(node), vnode, container, parentComponent, parentSuspense, slotScopeIds, optimized);\r\n if (next && isComment(next) && next.data === ']') {\r\n return nextSibling((vnode.anchor = next));\r\n }\r\n else {\r\n // fragment didn't hydrate successfully, since we didn't get a end anchor\r\n // back. This should have led to node/children mismatch warnings.\r\n hasMismatch = true;\r\n // since the anchor is missing, we need to create one and insert it\r\n insert((vnode.anchor = createComment(`]`)), container, next);\r\n return next;\r\n }\r\n };\r\n const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {\r\n hasMismatch = true;\r\n (process.env.NODE_ENV !== 'production') &&\r\n warn(`Hydration node mismatch:\\n- Client vnode:`, vnode.type, `\\n- Server rendered DOM:`, node, node.nodeType === 3 /* TEXT */\r\n ? `(text)`\r\n : isComment(node) && node.data === '['\r\n ? `(start of fragment)`\r\n : ``);\r\n vnode.el = null;\r\n if (isFragment) {\r\n // remove excessive fragment nodes\r\n const end = locateClosingAsyncAnchor(node);\r\n while (true) {\r\n const next = nextSibling(node);\r\n if (next && next !== end) {\r\n remove(next);\r\n }\r\n else {\r\n break;\r\n }\r\n }\r\n }\r\n const next = nextSibling(node);\r\n const container = parentNode(node);\r\n remove(node);\r\n patch(null, vnode, container, next, parentComponent, parentSuspense, isSVGContainer(container), slotScopeIds);\r\n return next;\r\n };\r\n const locateClosingAsyncAnchor = (node) => {\r\n let match = 0;\r\n while (node) {\r\n node = nextSibling(node);\r\n if (node && isComment(node)) {\r\n if (node.data === '[')\r\n match++;\r\n if (node.data === ']') {\r\n if (match === 0) {\r\n return nextSibling(node);\r\n }\r\n else {\r\n match--;\r\n }\r\n }\r\n }\r\n }\r\n return node;\r\n };\r\n return [hydrate, hydrateNode];\r\n}\n\n/* eslint-disable no-restricted-globals */\r\nlet supported;\r\nlet perf;\r\nfunction startMeasure(instance, type) {\r\n if (instance.appContext.config.performance && isSupported()) {\r\n perf.mark(`vue-${type}-${instance.uid}`);\r\n }\r\n if ((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) {\r\n devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now());\r\n }\r\n}\r\nfunction endMeasure(instance, type) {\r\n if (instance.appContext.config.performance && isSupported()) {\r\n const startTag = `vue-${type}-${instance.uid}`;\r\n const endTag = startTag + `:end`;\r\n perf.mark(endTag);\r\n perf.measure(`<${formatComponentName(instance, instance.type)}> ${type}`, startTag, endTag);\r\n perf.clearMarks(startTag);\r\n perf.clearMarks(endTag);\r\n }\r\n if ((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) {\r\n devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now());\r\n }\r\n}\r\nfunction isSupported() {\r\n if (supported !== undefined) {\r\n return supported;\r\n }\r\n if (typeof window !== 'undefined' && window.performance) {\r\n supported = true;\r\n perf = window.performance;\r\n }\r\n else {\r\n supported = false;\r\n }\r\n return supported;\r\n}\n\n/**\r\n * This is only called in esm-bundler builds.\r\n * It is called when a renderer is created, in `baseCreateRenderer` so that\r\n * importing runtime-core is side-effects free.\r\n *\r\n * istanbul-ignore-next\r\n */\r\nfunction initFeatureFlags() {\r\n const needWarn = [];\r\n if (typeof __VUE_OPTIONS_API__ !== 'boolean') {\r\n (process.env.NODE_ENV !== 'production') && needWarn.push(`__VUE_OPTIONS_API__`);\r\n getGlobalThis().__VUE_OPTIONS_API__ = true;\r\n }\r\n if (typeof __VUE_PROD_DEVTOOLS__ !== 'boolean') {\r\n (process.env.NODE_ENV !== 'production') && needWarn.push(`__VUE_PROD_DEVTOOLS__`);\r\n getGlobalThis().__VUE_PROD_DEVTOOLS__ = false;\r\n }\r\n if ((process.env.NODE_ENV !== 'production') && needWarn.length) {\r\n const multi = needWarn.length > 1;\r\n console.warn(`Feature flag${multi ? `s` : ``} ${needWarn.join(', ')} ${multi ? `are` : `is`} not explicitly defined. You are running the esm-bundler build of Vue, ` +\r\n `which expects these compile-time feature flags to be globally injected ` +\r\n `via the bundler config in order to get better tree-shaking in the ` +\r\n `production bundle.\\n\\n` +\r\n `For more details, see https://link.vuejs.org/feature-flags.`);\r\n }\r\n}\n\nconst queuePostRenderEffect = queueEffectWithSuspense\r\n ;\r\n/**\r\n * The createRenderer function accepts two generic arguments:\r\n * HostNode and HostElement, corresponding to Node and Element types in the\r\n * host environment. For example, for runtime-dom, HostNode would be the DOM\r\n * `Node` interface and HostElement would be the DOM `Element` interface.\r\n *\r\n * Custom renderers can pass in the platform specific types like this:\r\n *\r\n * ``` js\r\n * const { render, createApp } = createRenderer<Node, Element>({\r\n * patchProp,\r\n * ...nodeOps\r\n * })\r\n * ```\r\n */\r\nfunction createRenderer(options) {\r\n return baseCreateRenderer(options);\r\n}\r\n// Separate API for creating hydration-enabled renderer.\r\n// Hydration logic is only used when calling this function, making it\r\n// tree-shakable.\r\nfunction createHydrationRenderer(options) {\r\n return baseCreateRenderer(options, createHydrationFunctions);\r\n}\r\n// implementation\r\nfunction baseCreateRenderer(options, createHydrationFns) {\r\n // compile-time feature flags check\r\n {\r\n initFeatureFlags();\r\n }\r\n const target = getGlobalThis();\r\n target.__VUE__ = true;\r\n if ((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) {\r\n setDevtoolsHook(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target);\r\n }\r\n const { insert: hostInsert, remove: hostRemove, patchProp: hostPatchProp, createElement: hostCreateElement, createText: hostCreateText, createComment: hostCreateComment, setText: hostSetText, setElementText: hostSetElementText, parentNode: hostParentNode, nextSibling: hostNextSibling, setScopeId: hostSetScopeId = NOOP, cloneNode: hostCloneNode, insertStaticContent: hostInsertStaticContent } = options;\r\n // Note: functions inside this closure should use `const xxx = () => {}`\r\n // style in order to prevent being inlined by minifiers.\r\n const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, isSVG = false, slotScopeIds = null, optimized = (process.env.NODE_ENV !== 'production') && isHmrUpdating ? false : !!n2.dynamicChildren) => {\r\n if (n1 === n2) {\r\n return;\r\n }\r\n // patching & not same type, unmount old tree\r\n if (n1 && !isSameVNodeType(n1, n2)) {\r\n anchor = getNextHostNode(n1);\r\n unmount(n1, parentComponent, parentSuspense, true);\r\n n1 = null;\r\n }\r\n if (n2.patchFlag === -2 /* BAIL */) {\r\n optimized = false;\r\n n2.dynamicChildren = null;\r\n }\r\n const { type, ref, shapeFlag } = n2;\r\n switch (type) {\r\n case Text:\r\n processText(n1, n2, container, anchor);\r\n break;\r\n case Comment:\r\n processCommentNode(n1, n2, container, anchor);\r\n break;\r\n case Static:\r\n if (n1 == null) {\r\n mountStaticNode(n2, container, anchor, isSVG);\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n patchStaticNode(n1, n2, container, isSVG);\r\n }\r\n break;\r\n case Fragment:\r\n processFragment(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);\r\n break;\r\n default:\r\n if (shapeFlag & 1 /* ELEMENT */) {\r\n processElement(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);\r\n }\r\n else if (shapeFlag & 6 /* COMPONENT */) {\r\n processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);\r\n }\r\n else if (shapeFlag & 64 /* TELEPORT */) {\r\n type.process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals);\r\n }\r\n else if (shapeFlag & 128 /* SUSPENSE */) {\r\n type.process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals);\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn('Invalid VNode type:', type, `(${typeof type})`);\r\n }\r\n }\r\n // set ref\r\n if (ref != null && parentComponent) {\r\n setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2);\r\n }\r\n };\r\n const processText = (n1, n2, container, anchor) => {\r\n if (n1 == null) {\r\n hostInsert((n2.el = hostCreateText(n2.children)), container, anchor);\r\n }\r\n else {\r\n const el = (n2.el = n1.el);\r\n if (n2.children !== n1.children) {\r\n hostSetText(el, n2.children);\r\n }\r\n }\r\n };\r\n const processCommentNode = (n1, n2, container, anchor) => {\r\n if (n1 == null) {\r\n hostInsert((n2.el = hostCreateComment(n2.children || '')), container, anchor);\r\n }\r\n else {\r\n // there's no support for dynamic comments\r\n n2.el = n1.el;\r\n }\r\n };\r\n const mountStaticNode = (n2, container, anchor, isSVG) => {\r\n [n2.el, n2.anchor] = hostInsertStaticContent(n2.children, container, anchor, isSVG, n2.el, n2.anchor);\r\n };\r\n /**\r\n * Dev / HMR only\r\n */\r\n const patchStaticNode = (n1, n2, container, isSVG) => {\r\n // static nodes are only patched during dev for HMR\r\n if (n2.children !== n1.children) {\r\n const anchor = hostNextSibling(n1.anchor);\r\n // remove existing\r\n removeStaticNode(n1);\r\n [n2.el, n2.anchor] = hostInsertStaticContent(n2.children, container, anchor, isSVG);\r\n }\r\n else {\r\n n2.el = n1.el;\r\n n2.anchor = n1.anchor;\r\n }\r\n };\r\n const moveStaticNode = ({ el, anchor }, container, nextSibling) => {\r\n let next;\r\n while (el && el !== anchor) {\r\n next = hostNextSibling(el);\r\n hostInsert(el, container, nextSibling);\r\n el = next;\r\n }\r\n hostInsert(anchor, container, nextSibling);\r\n };\r\n const removeStaticNode = ({ el, anchor }) => {\r\n let next;\r\n while (el && el !== anchor) {\r\n next = hostNextSibling(el);\r\n hostRemove(el);\r\n el = next;\r\n }\r\n hostRemove(anchor);\r\n };\r\n const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {\r\n isSVG = isSVG || n2.type === 'svg';\r\n if (n1 == null) {\r\n mountElement(n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);\r\n }\r\n else {\r\n patchElement(n1, n2, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);\r\n }\r\n };\r\n const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {\r\n let el;\r\n let vnodeHook;\r\n const { type, props, shapeFlag, transition, patchFlag, dirs } = vnode;\r\n if (!(process.env.NODE_ENV !== 'production') &&\r\n vnode.el &&\r\n hostCloneNode !== undefined &&\r\n patchFlag === -1 /* HOISTED */) {\r\n // If a vnode has non-null el, it means it's being reused.\r\n // Only static vnodes can be reused, so its mounted DOM nodes should be\r\n // exactly the same, and we can simply do a clone here.\r\n // only do this in production since cloned trees cannot be HMR updated.\r\n el = vnode.el = hostCloneNode(vnode.el);\r\n }\r\n else {\r\n el = vnode.el = hostCreateElement(vnode.type, isSVG, props && props.is, props);\r\n // mount children first, since some props may rely on child content\r\n // being already rendered, e.g. `<select value>`\r\n if (shapeFlag & 8 /* TEXT_CHILDREN */) {\r\n hostSetElementText(el, vnode.children);\r\n }\r\n else if (shapeFlag & 16 /* ARRAY_CHILDREN */) {\r\n mountChildren(vnode.children, el, null, parentComponent, parentSuspense, isSVG && type !== 'foreignObject', slotScopeIds, optimized);\r\n }\r\n if (dirs) {\r\n invokeDirectiveHook(vnode, null, parentComponent, 'created');\r\n }\r\n // props\r\n if (props) {\r\n for (const key in props) {\r\n if (key !== 'value' && !isReservedProp(key)) {\r\n hostPatchProp(el, key, null, props[key], isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren);\r\n }\r\n }\r\n /**\r\n * Special case for setting value on DOM elements:\r\n * - it can be order-sensitive (e.g. should be set *after* min/max, #2325, #4024)\r\n * - it needs to be forced (#1471)\r\n * #2353 proposes adding another renderer option to configure this, but\r\n * the properties affects are so finite it is worth special casing it\r\n * here to reduce the complexity. (Special casing it also should not\r\n * affect non-DOM renderers)\r\n */\r\n if ('value' in props) {\r\n hostPatchProp(el, 'value', null, props.value);\r\n }\r\n if ((vnodeHook = props.onVnodeBeforeMount)) {\r\n invokeVNodeHook(vnodeHook, parentComponent, vnode);\r\n }\r\n }\r\n // scopeId\r\n setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent);\r\n }\r\n if ((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) {\r\n Object.defineProperty(el, '__vnode', {\r\n value: vnode,\r\n enumerable: false\r\n });\r\n Object.defineProperty(el, '__vueParentComponent', {\r\n value: parentComponent,\r\n enumerable: false\r\n });\r\n }\r\n if (dirs) {\r\n invokeDirectiveHook(vnode, null, parentComponent, 'beforeMount');\r\n }\r\n // #1583 For inside suspense + suspense not resolved case, enter hook should call when suspense resolved\r\n // #1689 For inside suspense + suspense resolved case, just call it\r\n const needCallTransitionHooks = (!parentSuspense || (parentSuspense && !parentSuspense.pendingBranch)) &&\r\n transition &&\r\n !transition.persisted;\r\n if (needCallTransitionHooks) {\r\n transition.beforeEnter(el);\r\n }\r\n hostInsert(el, container, anchor);\r\n if ((vnodeHook = props && props.onVnodeMounted) ||\r\n needCallTransitionHooks ||\r\n dirs) {\r\n queuePostRenderEffect(() => {\r\n vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);\r\n needCallTransitionHooks && transition.enter(el);\r\n dirs && invokeDirectiveHook(vnode, null, parentComponent, 'mounted');\r\n }, parentSuspense);\r\n }\r\n };\r\n const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => {\r\n if (scopeId) {\r\n hostSetScopeId(el, scopeId);\r\n }\r\n if (slotScopeIds) {\r\n for (let i = 0; i < slotScopeIds.length; i++) {\r\n hostSetScopeId(el, slotScopeIds[i]);\r\n }\r\n }\r\n if (parentComponent) {\r\n let subTree = parentComponent.subTree;\r\n if ((process.env.NODE_ENV !== 'production') &&\r\n subTree.patchFlag > 0 &&\r\n subTree.patchFlag & 2048 /* DEV_ROOT_FRAGMENT */) {\r\n subTree =\r\n filterSingleRoot(subTree.children) || subTree;\r\n }\r\n if (vnode === subTree) {\r\n const parentVNode = parentComponent.vnode;\r\n setScopeId(el, parentVNode, parentVNode.scopeId, parentVNode.slotScopeIds, parentComponent.parent);\r\n }\r\n }\r\n };\r\n const mountChildren = (children, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, start = 0) => {\r\n for (let i = start; i < children.length; i++) {\r\n const child = (children[i] = optimized\r\n ? cloneIfMounted(children[i])\r\n : normalizeVNode(children[i]));\r\n patch(null, child, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);\r\n }\r\n };\r\n const patchElement = (n1, n2, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {\r\n const el = (n2.el = n1.el);\r\n let { patchFlag, dynamicChildren, dirs } = n2;\r\n // #1426 take the old vnode's patch flag into account since user may clone a\r\n // compiler-generated vnode, which de-opts to FULL_PROPS\r\n patchFlag |= n1.patchFlag & 16 /* FULL_PROPS */;\r\n const oldProps = n1.props || EMPTY_OBJ;\r\n const newProps = n2.props || EMPTY_OBJ;\r\n let vnodeHook;\r\n // disable recurse in beforeUpdate hooks\r\n parentComponent && toggleRecurse(parentComponent, false);\r\n if ((vnodeHook = newProps.onVnodeBeforeUpdate)) {\r\n invokeVNodeHook(vnodeHook, parentComponent, n2, n1);\r\n }\r\n if (dirs) {\r\n invokeDirectiveHook(n2, n1, parentComponent, 'beforeUpdate');\r\n }\r\n parentComponent && toggleRecurse(parentComponent, true);\r\n if ((process.env.NODE_ENV !== 'production') && isHmrUpdating) {\r\n // HMR updated, force full diff\r\n patchFlag = 0;\r\n optimized = false;\r\n dynamicChildren = null;\r\n }\r\n const areChildrenSVG = isSVG && n2.type !== 'foreignObject';\r\n if (dynamicChildren) {\r\n patchBlockChildren(n1.dynamicChildren, dynamicChildren, el, parentComponent, parentSuspense, areChildrenSVG, slotScopeIds);\r\n if ((process.env.NODE_ENV !== 'production') && parentComponent && parentComponent.type.__hmrId) {\r\n traverseStaticChildren(n1, n2);\r\n }\r\n }\r\n else if (!optimized) {\r\n // full diff\r\n patchChildren(n1, n2, el, null, parentComponent, parentSuspense, areChildrenSVG, slotScopeIds, false);\r\n }\r\n if (patchFlag > 0) {\r\n // the presence of a patchFlag means this element's render code was\r\n // generated by the compiler and can take the fast path.\r\n // in this path old node and new node are guaranteed to have the same shape\r\n // (i.e. at the exact same position in the source template)\r\n if (patchFlag & 16 /* FULL_PROPS */) {\r\n // element props contain dynamic keys, full diff needed\r\n patchProps(el, n2, oldProps, newProps, parentComponent, parentSuspense, isSVG);\r\n }\r\n else {\r\n // class\r\n // this flag is matched when the element has dynamic class bindings.\r\n if (patchFlag & 2 /* CLASS */) {\r\n if (oldProps.class !== newProps.class) {\r\n hostPatchProp(el, 'class', null, newProps.class, isSVG);\r\n }\r\n }\r\n // style\r\n // this flag is matched when the element has dynamic style bindings\r\n if (patchFlag & 4 /* STYLE */) {\r\n hostPatchProp(el, 'style', oldProps.style, newProps.style, isSVG);\r\n }\r\n // props\r\n // This flag is matched when the element has dynamic prop/attr bindings\r\n // other than class and style. The keys of dynamic prop/attrs are saved for\r\n // faster iteration.\r\n // Note dynamic keys like :[foo]=\"bar\" will cause this optimization to\r\n // bail out and go through a full diff because we need to unset the old key\r\n if (patchFlag & 8 /* PROPS */) {\r\n // if the flag is present then dynamicProps must be non-null\r\n const propsToUpdate = n2.dynamicProps;\r\n for (let i = 0; i < propsToUpdate.length; i++) {\r\n const key = propsToUpdate[i];\r\n const prev = oldProps[key];\r\n const next = newProps[key];\r\n // #1471 force patch value\r\n if (next !== prev || key === 'value') {\r\n hostPatchProp(el, key, prev, next, isSVG, n1.children, parentComponent, parentSuspense, unmountChildren);\r\n }\r\n }\r\n }\r\n }\r\n // text\r\n // This flag is matched when the element has only dynamic text children.\r\n if (patchFlag & 1 /* TEXT */) {\r\n if (n1.children !== n2.children) {\r\n hostSetElementText(el, n2.children);\r\n }\r\n }\r\n }\r\n else if (!optimized && dynamicChildren == null) {\r\n // unoptimized, full diff\r\n patchProps(el, n2, oldProps, newProps, parentComponent, parentSuspense, isSVG);\r\n }\r\n if ((vnodeHook = newProps.onVnodeUpdated) || dirs) {\r\n queuePostRenderEffect(() => {\r\n vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);\r\n dirs && invokeDirectiveHook(n2, n1, parentComponent, 'updated');\r\n }, parentSuspense);\r\n }\r\n };\r\n // The fast path for blocks.\r\n const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, isSVG, slotScopeIds) => {\r\n for (let i = 0; i < newChildren.length; i++) {\r\n const oldVNode = oldChildren[i];\r\n const newVNode = newChildren[i];\r\n // Determine the container (parent element) for the patch.\r\n const container = \r\n // oldVNode may be an errored async setup() component inside Suspense\r\n // which will not have a mounted element\r\n oldVNode.el &&\r\n // - In the case of a Fragment, we need to provide the actual parent\r\n // of the Fragment itself so it can move its children.\r\n (oldVNode.type === Fragment ||\r\n // - In the case of different nodes, there is going to be a replacement\r\n // which also requires the correct parent container\r\n !isSameVNodeType(oldVNode, newVNode) ||\r\n // - In the case of a component, it could contain anything.\r\n oldVNode.shapeFlag & (6 /* COMPONENT */ | 64 /* TELEPORT */))\r\n ? hostParentNode(oldVNode.el)\r\n : // In other cases, the parent container is not actually used so we\r\n // just pass the block element here to avoid a DOM parentNode call.\r\n fallbackContainer;\r\n patch(oldVNode, newVNode, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, true);\r\n }\r\n };\r\n const patchProps = (el, vnode, oldProps, newProps, parentComponent, parentSuspense, isSVG) => {\r\n if (oldProps !== newProps) {\r\n for (const key in newProps) {\r\n // empty string is not valid prop\r\n if (isReservedProp(key))\r\n continue;\r\n const next = newProps[key];\r\n const prev = oldProps[key];\r\n // defer patching value\r\n if (next !== prev && key !== 'value') {\r\n hostPatchProp(el, key, prev, next, isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren);\r\n }\r\n }\r\n if (oldProps !== EMPTY_OBJ) {\r\n for (const key in oldProps) {\r\n if (!isReservedProp(key) && !(key in newProps)) {\r\n hostPatchProp(el, key, oldProps[key], null, isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren);\r\n }\r\n }\r\n }\r\n if ('value' in newProps) {\r\n hostPatchProp(el, 'value', oldProps.value, newProps.value);\r\n }\r\n }\r\n };\r\n const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {\r\n const fragmentStartAnchor = (n2.el = n1 ? n1.el : hostCreateText(''));\r\n const fragmentEndAnchor = (n2.anchor = n1 ? n1.anchor : hostCreateText(''));\r\n let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2;\r\n if ((process.env.NODE_ENV !== 'production') &&\r\n // #5523 dev root fragment may inherit directives\r\n (isHmrUpdating || patchFlag & 2048 /* DEV_ROOT_FRAGMENT */)) {\r\n // HMR updated / Dev root fragment (w/ comments), force full diff\r\n patchFlag = 0;\r\n optimized = false;\r\n dynamicChildren = null;\r\n }\r\n // check if this is a slot fragment with :slotted scope ids\r\n if (fragmentSlotScopeIds) {\r\n slotScopeIds = slotScopeIds\r\n ? slotScopeIds.concat(fragmentSlotScopeIds)\r\n : fragmentSlotScopeIds;\r\n }\r\n if (n1 == null) {\r\n hostInsert(fragmentStartAnchor, container, anchor);\r\n hostInsert(fragmentEndAnchor, container, anchor);\r\n // a fragment can only have array children\r\n // since they are either generated by the compiler, or implicitly created\r\n // from arrays.\r\n mountChildren(n2.children, container, fragmentEndAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);\r\n }\r\n else {\r\n if (patchFlag > 0 &&\r\n patchFlag & 64 /* STABLE_FRAGMENT */ &&\r\n dynamicChildren &&\r\n // #2715 the previous fragment could've been a BAILed one as a result\r\n // of renderSlot() with no valid children\r\n n1.dynamicChildren) {\r\n // a stable fragment (template root or <template v-for>) doesn't need to\r\n // patch children order, but it may contain dynamicChildren.\r\n patchBlockChildren(n1.dynamicChildren, dynamicChildren, container, parentComponent, parentSuspense, isSVG, slotScopeIds);\r\n if ((process.env.NODE_ENV !== 'production') && parentComponent && parentComponent.type.__hmrId) {\r\n traverseStaticChildren(n1, n2);\r\n }\r\n else if (\r\n // #2080 if the stable fragment has a key, it's a <template v-for> that may\r\n // get moved around. Make sure all root level vnodes inherit el.\r\n // #2134 or if it's a component root, it may also get moved around\r\n // as the component is being moved.\r\n n2.key != null ||\r\n (parentComponent && n2 === parentComponent.subTree)) {\r\n traverseStaticChildren(n1, n2, true /* shallow */);\r\n }\r\n }\r\n else {\r\n // keyed / unkeyed, or manual fragments.\r\n // for keyed & unkeyed, since they are compiler generated from v-for,\r\n // each child is guaranteed to be a block so the fragment will never\r\n // have dynamicChildren.\r\n patchChildren(n1, n2, container, fragmentEndAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);\r\n }\r\n }\r\n };\r\n const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {\r\n n2.slotScopeIds = slotScopeIds;\r\n if (n1 == null) {\r\n if (n2.shapeFlag & 512 /* COMPONENT_KEPT_ALIVE */) {\r\n parentComponent.ctx.activate(n2, container, anchor, isSVG, optimized);\r\n }\r\n else {\r\n mountComponent(n2, container, anchor, parentComponent, parentSuspense, isSVG, optimized);\r\n }\r\n }\r\n else {\r\n updateComponent(n1, n2, optimized);\r\n }\r\n };\r\n const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, isSVG, optimized) => {\r\n const instance = (initialVNode.component = createComponentInstance(initialVNode, parentComponent, parentSuspense));\r\n if ((process.env.NODE_ENV !== 'production') && instance.type.__hmrId) {\r\n registerHMR(instance);\r\n }\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n pushWarningContext(initialVNode);\r\n startMeasure(instance, `mount`);\r\n }\r\n // inject renderer internals for keepAlive\r\n if (isKeepAlive(initialVNode)) {\r\n instance.ctx.renderer = internals;\r\n }\r\n // resolve props and slots for setup context\r\n {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n startMeasure(instance, `init`);\r\n }\r\n setupComponent(instance);\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n endMeasure(instance, `init`);\r\n }\r\n }\r\n // setup() is async. This component relies on async logic to be resolved\r\n // before proceeding\r\n if (instance.asyncDep) {\r\n parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect);\r\n // Give it a placeholder if this is not hydration\r\n // TODO handle self-defined fallback\r\n if (!initialVNode.el) {\r\n const placeholder = (instance.subTree = createVNode(Comment));\r\n processCommentNode(null, placeholder, container, anchor);\r\n }\r\n return;\r\n }\r\n setupRenderEffect(instance, initialVNode, container, anchor, parentSuspense, isSVG, optimized);\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n popWarningContext();\r\n endMeasure(instance, `mount`);\r\n }\r\n };\r\n const updateComponent = (n1, n2, optimized) => {\r\n const instance = (n2.component = n1.component);\r\n if (shouldUpdateComponent(n1, n2, optimized)) {\r\n if (instance.asyncDep &&\r\n !instance.asyncResolved) {\r\n // async & still pending - just update props and slots\r\n // since the component's reactive effect for render isn't set-up yet\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n pushWarningContext(n2);\r\n }\r\n updateComponentPreRender(instance, n2, optimized);\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n popWarningContext();\r\n }\r\n return;\r\n }\r\n else {\r\n // normal update\r\n instance.next = n2;\r\n // in case the child component is also queued, remove it to avoid\r\n // double updating the same child component in the same flush.\r\n invalidateJob(instance.update);\r\n // instance.update is the reactive effect.\r\n instance.update();\r\n }\r\n }\r\n else {\r\n // no update needed. just copy over properties\r\n n2.el = n1.el;\r\n instance.vnode = n2;\r\n }\r\n };\r\n const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, isSVG, optimized) => {\r\n const componentUpdateFn = () => {\r\n if (!instance.isMounted) {\r\n let vnodeHook;\r\n const { el, props } = initialVNode;\r\n const { bm, m, parent } = instance;\r\n const isAsyncWrapperVNode = isAsyncWrapper(initialVNode);\r\n toggleRecurse(instance, false);\r\n // beforeMount hook\r\n if (bm) {\r\n invokeArrayFns(bm);\r\n }\r\n // onVnodeBeforeMount\r\n if (!isAsyncWrapperVNode &&\r\n (vnodeHook = props && props.onVnodeBeforeMount)) {\r\n invokeVNodeHook(vnodeHook, parent, initialVNode);\r\n }\r\n toggleRecurse(instance, true);\r\n if (el && hydrateNode) {\r\n // vnode has adopted host node - perform hydration instead of mount.\r\n const hydrateSubTree = () => {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n startMeasure(instance, `render`);\r\n }\r\n instance.subTree = renderComponentRoot(instance);\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n endMeasure(instance, `render`);\r\n }\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n startMeasure(instance, `hydrate`);\r\n }\r\n hydrateNode(el, instance.subTree, instance, parentSuspense, null);\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n endMeasure(instance, `hydrate`);\r\n }\r\n };\r\n if (isAsyncWrapperVNode) {\r\n initialVNode.type.__asyncLoader().then(\r\n // note: we are moving the render call into an async callback,\r\n // which means it won't track dependencies - but it's ok because\r\n // a server-rendered async wrapper is already in resolved state\r\n // and it will never need to change.\r\n () => !instance.isUnmounted && hydrateSubTree());\r\n }\r\n else {\r\n hydrateSubTree();\r\n }\r\n }\r\n else {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n startMeasure(instance, `render`);\r\n }\r\n const subTree = (instance.subTree = renderComponentRoot(instance));\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n endMeasure(instance, `render`);\r\n }\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n startMeasure(instance, `patch`);\r\n }\r\n patch(null, subTree, container, anchor, instance, parentSuspense, isSVG);\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n endMeasure(instance, `patch`);\r\n }\r\n initialVNode.el = subTree.el;\r\n }\r\n // mounted hook\r\n if (m) {\r\n queuePostRenderEffect(m, parentSuspense);\r\n }\r\n // onVnodeMounted\r\n if (!isAsyncWrapperVNode &&\r\n (vnodeHook = props && props.onVnodeMounted)) {\r\n const scopedInitialVNode = initialVNode;\r\n queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), parentSuspense);\r\n }\r\n // activated hook for keep-alive roots.\r\n // #1742 activated hook must be accessed after first render\r\n // since the hook may be injected by a child keep-alive\r\n if (initialVNode.shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */ ||\r\n (parent &&\r\n isAsyncWrapper(parent.vnode) &&\r\n parent.vnode.shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */)) {\r\n instance.a && queuePostRenderEffect(instance.a, parentSuspense);\r\n }\r\n instance.isMounted = true;\r\n if ((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) {\r\n devtoolsComponentAdded(instance);\r\n }\r\n // #2458: deference mount-only object parameters to prevent memleaks\r\n initialVNode = container = anchor = null;\r\n }\r\n else {\r\n // updateComponent\r\n // This is triggered by mutation of component's own state (next: null)\r\n // OR parent calling processComponent (next: VNode)\r\n let { next, bu, u, parent, vnode } = instance;\r\n let originNext = next;\r\n let vnodeHook;\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n pushWarningContext(next || instance.vnode);\r\n }\r\n // Disallow component effect recursion during pre-lifecycle hooks.\r\n toggleRecurse(instance, false);\r\n if (next) {\r\n next.el = vnode.el;\r\n updateComponentPreRender(instance, next, optimized);\r\n }\r\n else {\r\n next = vnode;\r\n }\r\n // beforeUpdate hook\r\n if (bu) {\r\n invokeArrayFns(bu);\r\n }\r\n // onVnodeBeforeUpdate\r\n if ((vnodeHook = next.props && next.props.onVnodeBeforeUpdate)) {\r\n invokeVNodeHook(vnodeHook, parent, next, vnode);\r\n }\r\n toggleRecurse(instance, true);\r\n // render\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n startMeasure(instance, `render`);\r\n }\r\n const nextTree = renderComponentRoot(instance);\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n endMeasure(instance, `render`);\r\n }\r\n const prevTree = instance.subTree;\r\n instance.subTree = nextTree;\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n startMeasure(instance, `patch`);\r\n }\r\n patch(prevTree, nextTree, \r\n // parent may have changed if it's in a teleport\r\n hostParentNode(prevTree.el), \r\n // anchor may have changed if it's in a fragment\r\n getNextHostNode(prevTree), instance, parentSuspense, isSVG);\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n endMeasure(instance, `patch`);\r\n }\r\n next.el = nextTree.el;\r\n if (originNext === null) {\r\n // self-triggered update. In case of HOC, update parent component\r\n // vnode el. HOC is indicated by parent instance's subTree pointing\r\n // to child component's vnode\r\n updateHOCHostEl(instance, nextTree.el);\r\n }\r\n // updated hook\r\n if (u) {\r\n queuePostRenderEffect(u, parentSuspense);\r\n }\r\n // onVnodeUpdated\r\n if ((vnodeHook = next.props && next.props.onVnodeUpdated)) {\r\n queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, next, vnode), parentSuspense);\r\n }\r\n if ((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) {\r\n devtoolsComponentUpdated(instance);\r\n }\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n popWarningContext();\r\n }\r\n }\r\n };\r\n // create reactive effect for rendering\r\n const effect = (instance.effect = new ReactiveEffect(componentUpdateFn, () => queueJob(update), instance.scope // track it in component's effect scope\r\n ));\r\n const update = (instance.update = () => effect.run());\r\n update.id = instance.uid;\r\n // allowRecurse\r\n // #1801, #2043 component render effects should allow recursive updates\r\n toggleRecurse(instance, true);\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n effect.onTrack = instance.rtc\r\n ? e => invokeArrayFns(instance.rtc, e)\r\n : void 0;\r\n effect.onTrigger = instance.rtg\r\n ? e => invokeArrayFns(instance.rtg, e)\r\n : void 0;\r\n update.ownerInstance = instance;\r\n }\r\n update();\r\n };\r\n const updateComponentPreRender = (instance, nextVNode, optimized) => {\r\n nextVNode.component = instance;\r\n const prevProps = instance.vnode.props;\r\n instance.vnode = nextVNode;\r\n instance.next = null;\r\n updateProps(instance, nextVNode.props, prevProps, optimized);\r\n updateSlots(instance, nextVNode.children, optimized);\r\n pauseTracking();\r\n // props update may have triggered pre-flush watchers.\r\n // flush them before the render update.\r\n flushPreFlushCbs(undefined, instance.update);\r\n resetTracking();\r\n };\r\n const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized = false) => {\r\n const c1 = n1 && n1.children;\r\n const prevShapeFlag = n1 ? n1.shapeFlag : 0;\r\n const c2 = n2.children;\r\n const { patchFlag, shapeFlag } = n2;\r\n // fast path\r\n if (patchFlag > 0) {\r\n if (patchFlag & 128 /* KEYED_FRAGMENT */) {\r\n // this could be either fully-keyed or mixed (some keyed some not)\r\n // presence of patchFlag means children are guaranteed to be arrays\r\n patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);\r\n return;\r\n }\r\n else if (patchFlag & 256 /* UNKEYED_FRAGMENT */) {\r\n // unkeyed\r\n patchUnkeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);\r\n return;\r\n }\r\n }\r\n // children has 3 possibilities: text, array or no children.\r\n if (shapeFlag & 8 /* TEXT_CHILDREN */) {\r\n // text children fast path\r\n if (prevShapeFlag & 16 /* ARRAY_CHILDREN */) {\r\n unmountChildren(c1, parentComponent, parentSuspense);\r\n }\r\n if (c2 !== c1) {\r\n hostSetElementText(container, c2);\r\n }\r\n }\r\n else {\r\n if (prevShapeFlag & 16 /* ARRAY_CHILDREN */) {\r\n // prev children was array\r\n if (shapeFlag & 16 /* ARRAY_CHILDREN */) {\r\n // two arrays, cannot assume anything, do full diff\r\n patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);\r\n }\r\n else {\r\n // no new children, just unmount old\r\n unmountChildren(c1, parentComponent, parentSuspense, true);\r\n }\r\n }\r\n else {\r\n // prev children was text OR null\r\n // new children is array OR null\r\n if (prevShapeFlag & 8 /* TEXT_CHILDREN */) {\r\n hostSetElementText(container, '');\r\n }\r\n // mount new if array\r\n if (shapeFlag & 16 /* ARRAY_CHILDREN */) {\r\n mountChildren(c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);\r\n }\r\n }\r\n }\r\n };\r\n const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {\r\n c1 = c1 || EMPTY_ARR;\r\n c2 = c2 || EMPTY_ARR;\r\n const oldLength = c1.length;\r\n const newLength = c2.length;\r\n const commonLength = Math.min(oldLength, newLength);\r\n let i;\r\n for (i = 0; i < commonLength; i++) {\r\n const nextChild = (c2[i] = optimized\r\n ? cloneIfMounted(c2[i])\r\n : normalizeVNode(c2[i]));\r\n patch(c1[i], nextChild, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);\r\n }\r\n if (oldLength > newLength) {\r\n // remove old\r\n unmountChildren(c1, parentComponent, parentSuspense, true, false, commonLength);\r\n }\r\n else {\r\n // mount new\r\n mountChildren(c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, commonLength);\r\n }\r\n };\r\n // can be all-keyed or mixed\r\n const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {\r\n let i = 0;\r\n const l2 = c2.length;\r\n let e1 = c1.length - 1; // prev ending index\r\n let e2 = l2 - 1; // next ending index\r\n // 1. sync from start\r\n // (a b) c\r\n // (a b) d e\r\n while (i <= e1 && i <= e2) {\r\n const n1 = c1[i];\r\n const n2 = (c2[i] = optimized\r\n ? cloneIfMounted(c2[i])\r\n : normalizeVNode(c2[i]));\r\n if (isSameVNodeType(n1, n2)) {\r\n patch(n1, n2, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);\r\n }\r\n else {\r\n break;\r\n }\r\n i++;\r\n }\r\n // 2. sync from end\r\n // a (b c)\r\n // d e (b c)\r\n while (i <= e1 && i <= e2) {\r\n const n1 = c1[e1];\r\n const n2 = (c2[e2] = optimized\r\n ? cloneIfMounted(c2[e2])\r\n : normalizeVNode(c2[e2]));\r\n if (isSameVNodeType(n1, n2)) {\r\n patch(n1, n2, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);\r\n }\r\n else {\r\n break;\r\n }\r\n e1--;\r\n e2--;\r\n }\r\n // 3. common sequence + mount\r\n // (a b)\r\n // (a b) c\r\n // i = 2, e1 = 1, e2 = 2\r\n // (a b)\r\n // c (a b)\r\n // i = 0, e1 = -1, e2 = 0\r\n if (i > e1) {\r\n if (i <= e2) {\r\n const nextPos = e2 + 1;\r\n const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor;\r\n while (i <= e2) {\r\n patch(null, (c2[i] = optimized\r\n ? cloneIfMounted(c2[i])\r\n : normalizeVNode(c2[i])), container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);\r\n i++;\r\n }\r\n }\r\n }\r\n // 4. common sequence + unmount\r\n // (a b) c\r\n // (a b)\r\n // i = 2, e1 = 2, e2 = 1\r\n // a (b c)\r\n // (b c)\r\n // i = 0, e1 = 0, e2 = -1\r\n else if (i > e2) {\r\n while (i <= e1) {\r\n unmount(c1[i], parentComponent, parentSuspense, true);\r\n i++;\r\n }\r\n }\r\n // 5. unknown sequence\r\n // [i ... e1 + 1]: a b [c d e] f g\r\n // [i ... e2 + 1]: a b [e d c h] f g\r\n // i = 2, e1 = 4, e2 = 5\r\n else {\r\n const s1 = i; // prev starting index\r\n const s2 = i; // next starting index\r\n // 5.1 build key:index map for newChildren\r\n const keyToNewIndexMap = new Map();\r\n for (i = s2; i <= e2; i++) {\r\n const nextChild = (c2[i] = optimized\r\n ? cloneIfMounted(c2[i])\r\n : normalizeVNode(c2[i]));\r\n if (nextChild.key != null) {\r\n if ((process.env.NODE_ENV !== 'production') && keyToNewIndexMap.has(nextChild.key)) {\r\n warn(`Duplicate keys found during update:`, JSON.stringify(nextChild.key), `Make sure keys are unique.`);\r\n }\r\n keyToNewIndexMap.set(nextChild.key, i);\r\n }\r\n }\r\n // 5.2 loop through old children left to be patched and try to patch\r\n // matching nodes & remove nodes that are no longer present\r\n let j;\r\n let patched = 0;\r\n const toBePatched = e2 - s2 + 1;\r\n let moved = false;\r\n // used to track whether any node has moved\r\n let maxNewIndexSoFar = 0;\r\n // works as Map<newIndex, oldIndex>\r\n // Note that oldIndex is offset by +1\r\n // and oldIndex = 0 is a special value indicating the new node has\r\n // no corresponding old node.\r\n // used for determining longest stable subsequence\r\n const newIndexToOldIndexMap = new Array(toBePatched);\r\n for (i = 0; i < toBePatched; i++)\r\n newIndexToOldIndexMap[i] = 0;\r\n for (i = s1; i <= e1; i++) {\r\n const prevChild = c1[i];\r\n if (patched >= toBePatched) {\r\n // all new children have been patched so this can only be a removal\r\n unmount(prevChild, parentComponent, parentSuspense, true);\r\n continue;\r\n }\r\n let newIndex;\r\n if (prevChild.key != null) {\r\n newIndex = keyToNewIndexMap.get(prevChild.key);\r\n }\r\n else {\r\n // key-less node, try to locate a key-less node of the same type\r\n for (j = s2; j <= e2; j++) {\r\n if (newIndexToOldIndexMap[j - s2] === 0 &&\r\n isSameVNodeType(prevChild, c2[j])) {\r\n newIndex = j;\r\n break;\r\n }\r\n }\r\n }\r\n if (newIndex === undefined) {\r\n unmount(prevChild, parentComponent, parentSuspense, true);\r\n }\r\n else {\r\n newIndexToOldIndexMap[newIndex - s2] = i + 1;\r\n if (newIndex >= maxNewIndexSoFar) {\r\n maxNewIndexSoFar = newIndex;\r\n }\r\n else {\r\n moved = true;\r\n }\r\n patch(prevChild, c2[newIndex], container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);\r\n patched++;\r\n }\r\n }\r\n // 5.3 move and mount\r\n // generate longest stable subsequence only when nodes have moved\r\n const increasingNewIndexSequence = moved\r\n ? getSequence(newIndexToOldIndexMap)\r\n : EMPTY_ARR;\r\n j = increasingNewIndexSequence.length - 1;\r\n // looping backwards so that we can use last patched node as anchor\r\n for (i = toBePatched - 1; i >= 0; i--) {\r\n const nextIndex = s2 + i;\r\n const nextChild = c2[nextIndex];\r\n const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor;\r\n if (newIndexToOldIndexMap[i] === 0) {\r\n // mount new\r\n patch(null, nextChild, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);\r\n }\r\n else if (moved) {\r\n // move if:\r\n // There is no stable subsequence (e.g. a reverse)\r\n // OR current node is not among the stable sequence\r\n if (j < 0 || i !== increasingNewIndexSequence[j]) {\r\n move(nextChild, container, anchor, 2 /* REORDER */);\r\n }\r\n else {\r\n j--;\r\n }\r\n }\r\n }\r\n }\r\n };\r\n const move = (vnode, container, anchor, moveType, parentSuspense = null) => {\r\n const { el, type, transition, children, shapeFlag } = vnode;\r\n if (shapeFlag & 6 /* COMPONENT */) {\r\n move(vnode.component.subTree, container, anchor, moveType);\r\n return;\r\n }\r\n if (shapeFlag & 128 /* SUSPENSE */) {\r\n vnode.suspense.move(container, anchor, moveType);\r\n return;\r\n }\r\n if (shapeFlag & 64 /* TELEPORT */) {\r\n type.move(vnode, container, anchor, internals);\r\n return;\r\n }\r\n if (type === Fragment) {\r\n hostInsert(el, container, anchor);\r\n for (let i = 0; i < children.length; i++) {\r\n move(children[i], container, anchor, moveType);\r\n }\r\n hostInsert(vnode.anchor, container, anchor);\r\n return;\r\n }\r\n if (type === Static) {\r\n moveStaticNode(vnode, container, anchor);\r\n return;\r\n }\r\n // single nodes\r\n const needTransition = moveType !== 2 /* REORDER */ &&\r\n shapeFlag & 1 /* ELEMENT */ &&\r\n transition;\r\n if (needTransition) {\r\n if (moveType === 0 /* ENTER */) {\r\n transition.beforeEnter(el);\r\n hostInsert(el, container, anchor);\r\n queuePostRenderEffect(() => transition.enter(el), parentSuspense);\r\n }\r\n else {\r\n const { leave, delayLeave, afterLeave } = transition;\r\n const remove = () => hostInsert(el, container, anchor);\r\n const performLeave = () => {\r\n leave(el, () => {\r\n remove();\r\n afterLeave && afterLeave();\r\n });\r\n };\r\n if (delayLeave) {\r\n delayLeave(el, remove, performLeave);\r\n }\r\n else {\r\n performLeave();\r\n }\r\n }\r\n }\r\n else {\r\n hostInsert(el, container, anchor);\r\n }\r\n };\r\n const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => {\r\n const { type, props, ref, children, dynamicChildren, shapeFlag, patchFlag, dirs } = vnode;\r\n // unset ref\r\n if (ref != null) {\r\n setRef(ref, null, parentSuspense, vnode, true);\r\n }\r\n if (shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */) {\r\n parentComponent.ctx.deactivate(vnode);\r\n return;\r\n }\r\n const shouldInvokeDirs = shapeFlag & 1 /* ELEMENT */ && dirs;\r\n const shouldInvokeVnodeHook = !isAsyncWrapper(vnode);\r\n let vnodeHook;\r\n if (shouldInvokeVnodeHook &&\r\n (vnodeHook = props && props.onVnodeBeforeUnmount)) {\r\n invokeVNodeHook(vnodeHook, parentComponent, vnode);\r\n }\r\n if (shapeFlag & 6 /* COMPONENT */) {\r\n unmountComponent(vnode.component, parentSuspense, doRemove);\r\n }\r\n else {\r\n if (shapeFlag & 128 /* SUSPENSE */) {\r\n vnode.suspense.unmount(parentSuspense, doRemove);\r\n return;\r\n }\r\n if (shouldInvokeDirs) {\r\n invokeDirectiveHook(vnode, null, parentComponent, 'beforeUnmount');\r\n }\r\n if (shapeFlag & 64 /* TELEPORT */) {\r\n vnode.type.remove(vnode, parentComponent, parentSuspense, optimized, internals, doRemove);\r\n }\r\n else if (dynamicChildren &&\r\n // #1153: fast path should not be taken for non-stable (v-for) fragments\r\n (type !== Fragment ||\r\n (patchFlag > 0 && patchFlag & 64 /* STABLE_FRAGMENT */))) {\r\n // fast path for block nodes: only need to unmount dynamic children.\r\n unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true);\r\n }\r\n else if ((type === Fragment &&\r\n patchFlag &\r\n (128 /* KEYED_FRAGMENT */ | 256 /* UNKEYED_FRAGMENT */)) ||\r\n (!optimized && shapeFlag & 16 /* ARRAY_CHILDREN */)) {\r\n unmountChildren(children, parentComponent, parentSuspense);\r\n }\r\n if (doRemove) {\r\n remove(vnode);\r\n }\r\n }\r\n if ((shouldInvokeVnodeHook &&\r\n (vnodeHook = props && props.onVnodeUnmounted)) ||\r\n shouldInvokeDirs) {\r\n queuePostRenderEffect(() => {\r\n vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);\r\n shouldInvokeDirs &&\r\n invokeDirectiveHook(vnode, null, parentComponent, 'unmounted');\r\n }, parentSuspense);\r\n }\r\n };\r\n const remove = vnode => {\r\n const { type, el, anchor, transition } = vnode;\r\n if (type === Fragment) {\r\n if ((process.env.NODE_ENV !== 'production') &&\r\n vnode.patchFlag > 0 &&\r\n vnode.patchFlag & 2048 /* DEV_ROOT_FRAGMENT */ &&\r\n transition &&\r\n !transition.persisted) {\r\n vnode.children.forEach(child => {\r\n if (child.type === Comment) {\r\n hostRemove(child.el);\r\n }\r\n else {\r\n remove(child);\r\n }\r\n });\r\n }\r\n else {\r\n removeFragment(el, anchor);\r\n }\r\n return;\r\n }\r\n if (type === Static) {\r\n removeStaticNode(vnode);\r\n return;\r\n }\r\n const performRemove = () => {\r\n hostRemove(el);\r\n if (transition && !transition.persisted && transition.afterLeave) {\r\n transition.afterLeave();\r\n }\r\n };\r\n if (vnode.shapeFlag & 1 /* ELEMENT */ &&\r\n transition &&\r\n !transition.persisted) {\r\n const { leave, delayLeave } = transition;\r\n const performLeave = () => leave(el, performRemove);\r\n if (delayLeave) {\r\n delayLeave(vnode.el, performRemove, performLeave);\r\n }\r\n else {\r\n performLeave();\r\n }\r\n }\r\n else {\r\n performRemove();\r\n }\r\n };\r\n const removeFragment = (cur, end) => {\r\n // For fragments, directly remove all contained DOM nodes.\r\n // (fragment child nodes cannot have transition)\r\n let next;\r\n while (cur !== end) {\r\n next = hostNextSibling(cur);\r\n hostRemove(cur);\r\n cur = next;\r\n }\r\n hostRemove(end);\r\n };\r\n const unmountComponent = (instance, parentSuspense, doRemove) => {\r\n if ((process.env.NODE_ENV !== 'production') && instance.type.__hmrId) {\r\n unregisterHMR(instance);\r\n }\r\n const { bum, scope, update, subTree, um } = instance;\r\n // beforeUnmount hook\r\n if (bum) {\r\n invokeArrayFns(bum);\r\n }\r\n // stop effects in component scope\r\n scope.stop();\r\n // update may be null if a component is unmounted before its async\r\n // setup has resolved.\r\n if (update) {\r\n // so that scheduler will no longer invoke it\r\n update.active = false;\r\n unmount(subTree, instance, parentSuspense, doRemove);\r\n }\r\n // unmounted hook\r\n if (um) {\r\n queuePostRenderEffect(um, parentSuspense);\r\n }\r\n queuePostRenderEffect(() => {\r\n instance.isUnmounted = true;\r\n }, parentSuspense);\r\n // A component with async dep inside a pending suspense is unmounted before\r\n // its async dep resolves. This should remove the dep from the suspense, and\r\n // cause the suspense to resolve immediately if that was the last dep.\r\n if (parentSuspense &&\r\n parentSuspense.pendingBranch &&\r\n !parentSuspense.isUnmounted &&\r\n instance.asyncDep &&\r\n !instance.asyncResolved &&\r\n instance.suspenseId === parentSuspense.pendingId) {\r\n parentSuspense.deps--;\r\n if (parentSuspense.deps === 0) {\r\n parentSuspense.resolve();\r\n }\r\n }\r\n if ((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) {\r\n devtoolsComponentRemoved(instance);\r\n }\r\n };\r\n const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => {\r\n for (let i = start; i < children.length; i++) {\r\n unmount(children[i], parentComponent, parentSuspense, doRemove, optimized);\r\n }\r\n };\r\n const getNextHostNode = vnode => {\r\n if (vnode.shapeFlag & 6 /* COMPONENT */) {\r\n return getNextHostNode(vnode.component.subTree);\r\n }\r\n if (vnode.shapeFlag & 128 /* SUSPENSE */) {\r\n return vnode.suspense.next();\r\n }\r\n return hostNextSibling((vnode.anchor || vnode.el));\r\n };\r\n const render = (vnode, container, isSVG) => {\r\n if (vnode == null) {\r\n if (container._vnode) {\r\n unmount(container._vnode, null, null, true);\r\n }\r\n }\r\n else {\r\n patch(container._vnode || null, vnode, container, null, null, null, isSVG);\r\n }\r\n flushPostFlushCbs();\r\n container._vnode = vnode;\r\n };\r\n const internals = {\r\n p: patch,\r\n um: unmount,\r\n m: move,\r\n r: remove,\r\n mt: mountComponent,\r\n mc: mountChildren,\r\n pc: patchChildren,\r\n pbc: patchBlockChildren,\r\n n: getNextHostNode,\r\n o: options\r\n };\r\n let hydrate;\r\n let hydrateNode;\r\n if (createHydrationFns) {\r\n [hydrate, hydrateNode] = createHydrationFns(internals);\r\n }\r\n return {\r\n render,\r\n hydrate,\r\n createApp: createAppAPI(render, hydrate)\r\n };\r\n}\r\nfunction toggleRecurse({ effect, update }, allowed) {\r\n effect.allowRecurse = update.allowRecurse = allowed;\r\n}\r\n/**\r\n * #1156\r\n * When a component is HMR-enabled, we need to make sure that all static nodes\r\n * inside a block also inherit the DOM element from the previous tree so that\r\n * HMR updates (which are full updates) can retrieve the element for patching.\r\n *\r\n * #2080\r\n * Inside keyed `template` fragment static children, if a fragment is moved,\r\n * the children will always be moved. Therefore, in order to ensure correct move\r\n * position, el should be inherited from previous nodes.\r\n */\r\nfunction traverseStaticChildren(n1, n2, shallow = false) {\r\n const ch1 = n1.children;\r\n const ch2 = n2.children;\r\n if (isArray(ch1) && isArray(ch2)) {\r\n for (let i = 0; i < ch1.length; i++) {\r\n // this is only called in the optimized path so array children are\r\n // guaranteed to be vnodes\r\n const c1 = ch1[i];\r\n let c2 = ch2[i];\r\n if (c2.shapeFlag & 1 /* ELEMENT */ && !c2.dynamicChildren) {\r\n if (c2.patchFlag <= 0 || c2.patchFlag === 32 /* HYDRATE_EVENTS */) {\r\n c2 = ch2[i] = cloneIfMounted(ch2[i]);\r\n c2.el = c1.el;\r\n }\r\n if (!shallow)\r\n traverseStaticChildren(c1, c2);\r\n }\r\n // also inherit for comment nodes, but not placeholders (e.g. v-if which\r\n // would have received .el during block patch)\r\n if ((process.env.NODE_ENV !== 'production') && c2.type === Comment && !c2.el) {\r\n c2.el = c1.el;\r\n }\r\n }\r\n }\r\n}\r\n// https://en.wikipedia.org/wiki/Longest_increasing_subsequence\r\nfunction getSequence(arr) {\r\n const p = arr.slice();\r\n const result = [0];\r\n let i, j, u, v, c;\r\n const len = arr.length;\r\n for (i = 0; i < len; i++) {\r\n const arrI = arr[i];\r\n if (arrI !== 0) {\r\n j = result[result.length - 1];\r\n if (arr[j] < arrI) {\r\n p[i] = j;\r\n result.push(i);\r\n continue;\r\n }\r\n u = 0;\r\n v = result.length - 1;\r\n while (u < v) {\r\n c = (u + v) >> 1;\r\n if (arr[result[c]] < arrI) {\r\n u = c + 1;\r\n }\r\n else {\r\n v = c;\r\n }\r\n }\r\n if (arrI < arr[result[u]]) {\r\n if (u > 0) {\r\n p[i] = result[u - 1];\r\n }\r\n result[u] = i;\r\n }\r\n }\r\n }\r\n u = result.length;\r\n v = result[u - 1];\r\n while (u-- > 0) {\r\n result[u] = v;\r\n v = p[v];\r\n }\r\n return result;\r\n}\n\nconst isTeleport = (type) => type.__isTeleport;\r\nconst isTeleportDisabled = (props) => props && (props.disabled || props.disabled === '');\r\nconst isTargetSVG = (target) => typeof SVGElement !== 'undefined' && target instanceof SVGElement;\r\nconst resolveTarget = (props, select) => {\r\n const targetSelector = props && props.to;\r\n if (isString(targetSelector)) {\r\n if (!select) {\r\n (process.env.NODE_ENV !== 'production') &&\r\n warn(`Current renderer does not support string target for Teleports. ` +\r\n `(missing querySelector renderer option)`);\r\n return null;\r\n }\r\n else {\r\n const target = select(targetSelector);\r\n if (!target) {\r\n (process.env.NODE_ENV !== 'production') &&\r\n warn(`Failed to locate Teleport target with selector \"${targetSelector}\". ` +\r\n `Note the target element must exist before the component is mounted - ` +\r\n `i.e. the target cannot be rendered by the component itself, and ` +\r\n `ideally should be outside of the entire Vue component tree.`);\r\n }\r\n return target;\r\n }\r\n }\r\n else {\r\n if ((process.env.NODE_ENV !== 'production') && !targetSelector && !isTeleportDisabled(props)) {\r\n warn(`Invalid Teleport target: ${targetSelector}`);\r\n }\r\n return targetSelector;\r\n }\r\n};\r\nconst TeleportImpl = {\r\n __isTeleport: true,\r\n process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals) {\r\n const { mc: mountChildren, pc: patchChildren, pbc: patchBlockChildren, o: { insert, querySelector, createText, createComment } } = internals;\r\n const disabled = isTeleportDisabled(n2.props);\r\n let { shapeFlag, children, dynamicChildren } = n2;\r\n // #3302\r\n // HMR updated, force full diff\r\n if ((process.env.NODE_ENV !== 'production') && isHmrUpdating) {\r\n optimized = false;\r\n dynamicChildren = null;\r\n }\r\n if (n1 == null) {\r\n // insert anchors in the main view\r\n const placeholder = (n2.el = (process.env.NODE_ENV !== 'production')\r\n ? createComment('teleport start')\r\n : createText(''));\r\n const mainAnchor = (n2.anchor = (process.env.NODE_ENV !== 'production')\r\n ? createComment('teleport end')\r\n : createText(''));\r\n insert(placeholder, container, anchor);\r\n insert(mainAnchor, container, anchor);\r\n const target = (n2.target = resolveTarget(n2.props, querySelector));\r\n const targetAnchor = (n2.targetAnchor = createText(''));\r\n if (target) {\r\n insert(targetAnchor, target);\r\n // #2652 we could be teleporting from a non-SVG tree into an SVG tree\r\n isSVG = isSVG || isTargetSVG(target);\r\n }\r\n else if ((process.env.NODE_ENV !== 'production') && !disabled) {\r\n warn('Invalid Teleport target on mount:', target, `(${typeof target})`);\r\n }\r\n const mount = (container, anchor) => {\r\n // Teleport *always* has Array children. This is enforced in both the\r\n // compiler and vnode children normalization.\r\n if (shapeFlag & 16 /* ARRAY_CHILDREN */) {\r\n mountChildren(children, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);\r\n }\r\n };\r\n if (disabled) {\r\n mount(container, mainAnchor);\r\n }\r\n else if (target) {\r\n mount(target, targetAnchor);\r\n }\r\n }\r\n else {\r\n // update content\r\n n2.el = n1.el;\r\n const mainAnchor = (n2.anchor = n1.anchor);\r\n const target = (n2.target = n1.target);\r\n const targetAnchor = (n2.targetAnchor = n1.targetAnchor);\r\n const wasDisabled = isTeleportDisabled(n1.props);\r\n const currentContainer = wasDisabled ? container : target;\r\n const currentAnchor = wasDisabled ? mainAnchor : targetAnchor;\r\n isSVG = isSVG || isTargetSVG(target);\r\n if (dynamicChildren) {\r\n // fast path when the teleport happens to be a block root\r\n patchBlockChildren(n1.dynamicChildren, dynamicChildren, currentContainer, parentComponent, parentSuspense, isSVG, slotScopeIds);\r\n // even in block tree mode we need to make sure all root-level nodes\r\n // in the teleport inherit previous DOM references so that they can\r\n // be moved in future patches.\r\n traverseStaticChildren(n1, n2, true);\r\n }\r\n else if (!optimized) {\r\n patchChildren(n1, n2, currentContainer, currentAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, false);\r\n }\r\n if (disabled) {\r\n if (!wasDisabled) {\r\n // enabled -> disabled\r\n // move into main container\r\n moveTeleport(n2, container, mainAnchor, internals, 1 /* TOGGLE */);\r\n }\r\n }\r\n else {\r\n // target changed\r\n if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) {\r\n const nextTarget = (n2.target = resolveTarget(n2.props, querySelector));\r\n if (nextTarget) {\r\n moveTeleport(n2, nextTarget, null, internals, 0 /* TARGET_CHANGE */);\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn('Invalid Teleport target on update:', target, `(${typeof target})`);\r\n }\r\n }\r\n else if (wasDisabled) {\r\n // disabled -> enabled\r\n // move into teleport target\r\n moveTeleport(n2, target, targetAnchor, internals, 1 /* TOGGLE */);\r\n }\r\n }\r\n }\r\n },\r\n remove(vnode, parentComponent, parentSuspense, optimized, { um: unmount, o: { remove: hostRemove } }, doRemove) {\r\n const { shapeFlag, children, anchor, targetAnchor, target, props } = vnode;\r\n if (target) {\r\n hostRemove(targetAnchor);\r\n }\r\n // an unmounted teleport should always remove its children if not disabled\r\n if (doRemove || !isTeleportDisabled(props)) {\r\n hostRemove(anchor);\r\n if (shapeFlag & 16 /* ARRAY_CHILDREN */) {\r\n for (let i = 0; i < children.length; i++) {\r\n const child = children[i];\r\n unmount(child, parentComponent, parentSuspense, true, !!child.dynamicChildren);\r\n }\r\n }\r\n }\r\n },\r\n move: moveTeleport,\r\n hydrate: hydrateTeleport\r\n};\r\nfunction moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2 /* REORDER */) {\r\n // move target anchor if this is a target change.\r\n if (moveType === 0 /* TARGET_CHANGE */) {\r\n insert(vnode.targetAnchor, container, parentAnchor);\r\n }\r\n const { el, anchor, shapeFlag, children, props } = vnode;\r\n const isReorder = moveType === 2 /* REORDER */;\r\n // move main view anchor if this is a re-order.\r\n if (isReorder) {\r\n insert(el, container, parentAnchor);\r\n }\r\n // if this is a re-order and teleport is enabled (content is in target)\r\n // do not move children. So the opposite is: only move children if this\r\n // is not a reorder, or the teleport is disabled\r\n if (!isReorder || isTeleportDisabled(props)) {\r\n // Teleport has either Array children or no children.\r\n if (shapeFlag & 16 /* ARRAY_CHILDREN */) {\r\n for (let i = 0; i < children.length; i++) {\r\n move(children[i], container, parentAnchor, 2 /* REORDER */);\r\n }\r\n }\r\n }\r\n // move main view anchor if this is a re-order.\r\n if (isReorder) {\r\n insert(anchor, container, parentAnchor);\r\n }\r\n}\r\nfunction hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, { o: { nextSibling, parentNode, querySelector } }, hydrateChildren) {\r\n const target = (vnode.target = resolveTarget(vnode.props, querySelector));\r\n if (target) {\r\n // if multiple teleports rendered to the same target element, we need to\r\n // pick up from where the last teleport finished instead of the first node\r\n const targetNode = target._lpa || target.firstChild;\r\n if (vnode.shapeFlag & 16 /* ARRAY_CHILDREN */) {\r\n if (isTeleportDisabled(vnode.props)) {\r\n vnode.anchor = hydrateChildren(nextSibling(node), vnode, parentNode(node), parentComponent, parentSuspense, slotScopeIds, optimized);\r\n vnode.targetAnchor = targetNode;\r\n }\r\n else {\r\n vnode.anchor = nextSibling(node);\r\n // lookahead until we find the target anchor\r\n // we cannot rely on return value of hydrateChildren() because there\r\n // could be nested teleports\r\n let targetAnchor = targetNode;\r\n while (targetAnchor) {\r\n targetAnchor = nextSibling(targetAnchor);\r\n if (targetAnchor &&\r\n targetAnchor.nodeType === 8 &&\r\n targetAnchor.data === 'teleport anchor') {\r\n vnode.targetAnchor = targetAnchor;\r\n target._lpa =\r\n vnode.targetAnchor && nextSibling(vnode.targetAnchor);\r\n break;\r\n }\r\n }\r\n hydrateChildren(targetNode, vnode, target, parentComponent, parentSuspense, slotScopeIds, optimized);\r\n }\r\n }\r\n }\r\n return vnode.anchor && nextSibling(vnode.anchor);\r\n}\r\n// Force-casted public typing for h and TSX props inference\r\nconst Teleport = TeleportImpl;\n\nconst Fragment = Symbol((process.env.NODE_ENV !== 'production') ? 'Fragment' : undefined);\r\nconst Text = Symbol((process.env.NODE_ENV !== 'production') ? 'Text' : undefined);\r\nconst Comment = Symbol((process.env.NODE_ENV !== 'production') ? 'Comment' : undefined);\r\nconst Static = Symbol((process.env.NODE_ENV !== 'production') ? 'Static' : undefined);\r\n// Since v-if and v-for are the two possible ways node structure can dynamically\r\n// change, once we consider v-if branches and each v-for fragment a block, we\r\n// can divide a template into nested blocks, and within each block the node\r\n// structure would be stable. This allows us to skip most children diffing\r\n// and only worry about the dynamic nodes (indicated by patch flags).\r\nconst blockStack = [];\r\nlet currentBlock = null;\r\n/**\r\n * Open a block.\r\n * This must be called before `createBlock`. It cannot be part of `createBlock`\r\n * because the children of the block are evaluated before `createBlock` itself\r\n * is called. The generated code typically looks like this:\r\n *\r\n * ```js\r\n * function render() {\r\n * return (openBlock(),createBlock('div', null, [...]))\r\n * }\r\n * ```\r\n * disableTracking is true when creating a v-for fragment block, since a v-for\r\n * fragment always diffs its children.\r\n *\r\n * @private\r\n */\r\nfunction openBlock(disableTracking = false) {\r\n blockStack.push((currentBlock = disableTracking ? null : []));\r\n}\r\nfunction closeBlock() {\r\n blockStack.pop();\r\n currentBlock = blockStack[blockStack.length - 1] || null;\r\n}\r\n// Whether we should be tracking dynamic child nodes inside a block.\r\n// Only tracks when this value is > 0\r\n// We are not using a simple boolean because this value may need to be\r\n// incremented/decremented by nested usage of v-once (see below)\r\nlet isBlockTreeEnabled = 1;\r\n/**\r\n * Block tracking sometimes needs to be disabled, for example during the\r\n * creation of a tree that needs to be cached by v-once. The compiler generates\r\n * code like this:\r\n *\r\n * ``` js\r\n * _cache[1] || (\r\n * setBlockTracking(-1),\r\n * _cache[1] = createVNode(...),\r\n * setBlockTracking(1),\r\n * _cache[1]\r\n * )\r\n * ```\r\n *\r\n * @private\r\n */\r\nfunction setBlockTracking(value) {\r\n isBlockTreeEnabled += value;\r\n}\r\nfunction setupBlock(vnode) {\r\n // save current block children on the block vnode\r\n vnode.dynamicChildren =\r\n isBlockTreeEnabled > 0 ? currentBlock || EMPTY_ARR : null;\r\n // close block\r\n closeBlock();\r\n // a block is always going to be patched, so track it as a child of its\r\n // parent block\r\n if (isBlockTreeEnabled > 0 && currentBlock) {\r\n currentBlock.push(vnode);\r\n }\r\n return vnode;\r\n}\r\n/**\r\n * @private\r\n */\r\nfunction createElementBlock(type, props, children, patchFlag, dynamicProps, shapeFlag) {\r\n return setupBlock(createBaseVNode(type, props, children, patchFlag, dynamicProps, shapeFlag, true /* isBlock */));\r\n}\r\n/**\r\n * Create a block root vnode. Takes the same exact arguments as `createVNode`.\r\n * A block root keeps track of dynamic nodes within the block in the\r\n * `dynamicChildren` array.\r\n *\r\n * @private\r\n */\r\nfunction createBlock(type, props, children, patchFlag, dynamicProps) {\r\n return setupBlock(createVNode(type, props, children, patchFlag, dynamicProps, true /* isBlock: prevent a block from tracking itself */));\r\n}\r\nfunction isVNode(value) {\r\n return value ? value.__v_isVNode === true : false;\r\n}\r\nfunction isSameVNodeType(n1, n2) {\r\n if ((process.env.NODE_ENV !== 'production') &&\r\n n2.shapeFlag & 6 /* COMPONENT */ &&\r\n hmrDirtyComponents.has(n2.type)) {\r\n // HMR only: if the component has been hot-updated, force a reload.\r\n return false;\r\n }\r\n return n1.type === n2.type && n1.key === n2.key;\r\n}\r\nlet vnodeArgsTransformer;\r\n/**\r\n * Internal API for registering an arguments transform for createVNode\r\n * used for creating stubs in the test-utils\r\n * It is *internal* but needs to be exposed for test-utils to pick up proper\r\n * typings\r\n */\r\nfunction transformVNodeArgs(transformer) {\r\n vnodeArgsTransformer = transformer;\r\n}\r\nconst createVNodeWithArgsTransform = (...args) => {\r\n return _createVNode(...(vnodeArgsTransformer\r\n ? vnodeArgsTransformer(args, currentRenderingInstance)\r\n : args));\r\n};\r\nconst InternalObjectKey = `__vInternal`;\r\nconst normalizeKey = ({ key }) => key != null ? key : null;\r\nconst normalizeRef = ({ ref, ref_key, ref_for }) => {\r\n return (ref != null\r\n ? isString(ref) || isRef(ref) || isFunction(ref)\r\n ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for }\r\n : ref\r\n : null);\r\n};\r\nfunction createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1 /* ELEMENT */, isBlockNode = false, needFullChildrenNormalization = false) {\r\n const vnode = {\r\n __v_isVNode: true,\r\n __v_skip: true,\r\n type,\r\n props,\r\n key: props && normalizeKey(props),\r\n ref: props && normalizeRef(props),\r\n scopeId: currentScopeId,\r\n slotScopeIds: null,\r\n children,\r\n component: null,\r\n suspense: null,\r\n ssContent: null,\r\n ssFallback: null,\r\n dirs: null,\r\n transition: null,\r\n el: null,\r\n anchor: null,\r\n target: null,\r\n targetAnchor: null,\r\n staticCount: 0,\r\n shapeFlag,\r\n patchFlag,\r\n dynamicProps,\r\n dynamicChildren: null,\r\n appContext: null\r\n };\r\n if (needFullChildrenNormalization) {\r\n normalizeChildren(vnode, children);\r\n // normalize suspense children\r\n if (shapeFlag & 128 /* SUSPENSE */) {\r\n type.normalize(vnode);\r\n }\r\n }\r\n else if (children) {\r\n // compiled element vnode - if children is passed, only possible types are\r\n // string or Array.\r\n vnode.shapeFlag |= isString(children)\r\n ? 8 /* TEXT_CHILDREN */\r\n : 16 /* ARRAY_CHILDREN */;\r\n }\r\n // validate key\r\n if ((process.env.NODE_ENV !== 'production') && vnode.key !== vnode.key) {\r\n warn(`VNode created with invalid key (NaN). VNode type:`, vnode.type);\r\n }\r\n // track vnode for block tree\r\n if (isBlockTreeEnabled > 0 &&\r\n // avoid a block node from tracking itself\r\n !isBlockNode &&\r\n // has current parent block\r\n currentBlock &&\r\n // presence of a patch flag indicates this node needs patching on updates.\r\n // component nodes also should always be patched, because even if the\r\n // component doesn't need to update, it needs to persist the instance on to\r\n // the next vnode so that it can be properly unmounted later.\r\n (vnode.patchFlag > 0 || shapeFlag & 6 /* COMPONENT */) &&\r\n // the EVENTS flag is only for hydration and if it is the only flag, the\r\n // vnode should not be considered dynamic due to handler caching.\r\n vnode.patchFlag !== 32 /* HYDRATE_EVENTS */) {\r\n currentBlock.push(vnode);\r\n }\r\n return vnode;\r\n}\r\nconst createVNode = ((process.env.NODE_ENV !== 'production') ? createVNodeWithArgsTransform : _createVNode);\r\nfunction _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {\r\n if (!type || type === NULL_DYNAMIC_COMPONENT) {\r\n if ((process.env.NODE_ENV !== 'production') && !type) {\r\n warn(`Invalid vnode type when creating vnode: ${type}.`);\r\n }\r\n type = Comment;\r\n }\r\n if (isVNode(type)) {\r\n // createVNode receiving an existing vnode. This happens in cases like\r\n // <component :is=\"vnode\"/>\r\n // #2078 make sure to merge refs during the clone instead of overwriting it\r\n const cloned = cloneVNode(type, props, true /* mergeRef: true */);\r\n if (children) {\r\n normalizeChildren(cloned, children);\r\n }\r\n if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) {\r\n if (cloned.shapeFlag & 6 /* COMPONENT */) {\r\n currentBlock[currentBlock.indexOf(type)] = cloned;\r\n }\r\n else {\r\n currentBlock.push(cloned);\r\n }\r\n }\r\n cloned.patchFlag |= -2 /* BAIL */;\r\n return cloned;\r\n }\r\n // class component normalization.\r\n if (isClassComponent(type)) {\r\n type = type.__vccOpts;\r\n }\r\n // class & style normalization.\r\n if (props) {\r\n // for reactive or proxy objects, we need to clone it to enable mutation.\r\n props = guardReactiveProps(props);\r\n let { class: klass, style } = props;\r\n if (klass && !isString(klass)) {\r\n props.class = normalizeClass(klass);\r\n }\r\n if (isObject(style)) {\r\n // reactive state objects need to be cloned since they are likely to be\r\n // mutated\r\n if (isProxy(style) && !isArray(style)) {\r\n style = extend({}, style);\r\n }\r\n props.style = normalizeStyle(style);\r\n }\r\n }\r\n // encode the vnode type information into a bitmap\r\n const shapeFlag = isString(type)\r\n ? 1 /* ELEMENT */\r\n : isSuspense(type)\r\n ? 128 /* SUSPENSE */\r\n : isTeleport(type)\r\n ? 64 /* TELEPORT */\r\n : isObject(type)\r\n ? 4 /* STATEFUL_COMPONENT */\r\n : isFunction(type)\r\n ? 2 /* FUNCTIONAL_COMPONENT */\r\n : 0;\r\n if ((process.env.NODE_ENV !== 'production') && shapeFlag & 4 /* STATEFUL_COMPONENT */ && isProxy(type)) {\r\n type = toRaw(type);\r\n warn(`Vue received a Component which was made a reactive object. This can ` +\r\n `lead to unnecessary performance overhead, and should be avoided by ` +\r\n `marking the component with \\`markRaw\\` or using \\`shallowRef\\` ` +\r\n `instead of \\`ref\\`.`, `\\nComponent that was made reactive: `, type);\r\n }\r\n return createBaseVNode(type, props, children, patchFlag, dynamicProps, shapeFlag, isBlockNode, true);\r\n}\r\nfunction guardReactiveProps(props) {\r\n if (!props)\r\n return null;\r\n return isProxy(props) || InternalObjectKey in props\r\n ? extend({}, props)\r\n : props;\r\n}\r\nfunction cloneVNode(vnode, extraProps, mergeRef = false) {\r\n // This is intentionally NOT using spread or extend to avoid the runtime\r\n // key enumeration cost.\r\n const { props, ref, patchFlag, children } = vnode;\r\n const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props;\r\n const cloned = {\r\n __v_isVNode: true,\r\n __v_skip: true,\r\n type: vnode.type,\r\n props: mergedProps,\r\n key: mergedProps && normalizeKey(mergedProps),\r\n ref: extraProps && extraProps.ref\r\n ? // #2078 in the case of <component :is=\"vnode\" ref=\"extra\"/>\r\n // if the vnode itself already has a ref, cloneVNode will need to merge\r\n // the refs so the single vnode can be set on multiple refs\r\n mergeRef && ref\r\n ? isArray(ref)\r\n ? ref.concat(normalizeRef(extraProps))\r\n : [ref, normalizeRef(extraProps)]\r\n : normalizeRef(extraProps)\r\n : ref,\r\n scopeId: vnode.scopeId,\r\n slotScopeIds: vnode.slotScopeIds,\r\n children: (process.env.NODE_ENV !== 'production') && patchFlag === -1 /* HOISTED */ && isArray(children)\r\n ? children.map(deepCloneVNode)\r\n : children,\r\n target: vnode.target,\r\n targetAnchor: vnode.targetAnchor,\r\n staticCount: vnode.staticCount,\r\n shapeFlag: vnode.shapeFlag,\r\n // if the vnode is cloned with extra props, we can no longer assume its\r\n // existing patch flag to be reliable and need to add the FULL_PROPS flag.\r\n // note: preserve flag for fragments since they use the flag for children\r\n // fast paths only.\r\n patchFlag: extraProps && vnode.type !== Fragment\r\n ? patchFlag === -1 // hoisted node\r\n ? 16 /* FULL_PROPS */\r\n : patchFlag | 16 /* FULL_PROPS */\r\n : patchFlag,\r\n dynamicProps: vnode.dynamicProps,\r\n dynamicChildren: vnode.dynamicChildren,\r\n appContext: vnode.appContext,\r\n dirs: vnode.dirs,\r\n transition: vnode.transition,\r\n // These should technically only be non-null on mounted VNodes. However,\r\n // they *should* be copied for kept-alive vnodes. So we just always copy\r\n // them since them being non-null during a mount doesn't affect the logic as\r\n // they will simply be overwritten.\r\n component: vnode.component,\r\n suspense: vnode.suspense,\r\n ssContent: vnode.ssContent && cloneVNode(vnode.ssContent),\r\n ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),\r\n el: vnode.el,\r\n anchor: vnode.anchor\r\n };\r\n return cloned;\r\n}\r\n/**\r\n * Dev only, for HMR of hoisted vnodes reused in v-for\r\n * https://github.com/vitejs/vite/issues/2022\r\n */\r\nfunction deepCloneVNode(vnode) {\r\n const cloned = cloneVNode(vnode);\r\n if (isArray(vnode.children)) {\r\n cloned.children = vnode.children.map(deepCloneVNode);\r\n }\r\n return cloned;\r\n}\r\n/**\r\n * @private\r\n */\r\nfunction createTextVNode(text = ' ', flag = 0) {\r\n return createVNode(Text, null, text, flag);\r\n}\r\n/**\r\n * @private\r\n */\r\nfunction createStaticVNode(content, numberOfNodes) {\r\n // A static vnode can contain multiple stringified elements, and the number\r\n // of elements is necessary for hydration.\r\n const vnode = createVNode(Static, null, content);\r\n vnode.staticCount = numberOfNodes;\r\n return vnode;\r\n}\r\n/**\r\n * @private\r\n */\r\nfunction createCommentVNode(text = '', \r\n// when used as the v-else branch, the comment node must be created as a\r\n// block to ensure correct updates.\r\nasBlock = false) {\r\n return asBlock\r\n ? (openBlock(), createBlock(Comment, null, text))\r\n : createVNode(Comment, null, text);\r\n}\r\nfunction normalizeVNode(child) {\r\n if (child == null || typeof child === 'boolean') {\r\n // empty placeholder\r\n return createVNode(Comment);\r\n }\r\n else if (isArray(child)) {\r\n // fragment\r\n return createVNode(Fragment, null, \r\n // #3666, avoid reference pollution when reusing vnode\r\n child.slice());\r\n }\r\n else if (typeof child === 'object') {\r\n // already vnode, this should be the most common since compiled templates\r\n // always produce all-vnode children arrays\r\n return cloneIfMounted(child);\r\n }\r\n else {\r\n // strings and numbers\r\n return createVNode(Text, null, String(child));\r\n }\r\n}\r\n// optimized normalization for template-compiled render fns\r\nfunction cloneIfMounted(child) {\r\n return child.el === null || child.memo ? child : cloneVNode(child);\r\n}\r\nfunction normalizeChildren(vnode, children) {\r\n let type = 0;\r\n const { shapeFlag } = vnode;\r\n if (children == null) {\r\n children = null;\r\n }\r\n else if (isArray(children)) {\r\n type = 16 /* ARRAY_CHILDREN */;\r\n }\r\n else if (typeof children === 'object') {\r\n if (shapeFlag & (1 /* ELEMENT */ | 64 /* TELEPORT */)) {\r\n // Normalize slot to plain children for plain element and Teleport\r\n const slot = children.default;\r\n if (slot) {\r\n // _c marker is added by withCtx() indicating this is a compiled slot\r\n slot._c && (slot._d = false);\r\n normalizeChildren(vnode, slot());\r\n slot._c && (slot._d = true);\r\n }\r\n return;\r\n }\r\n else {\r\n type = 32 /* SLOTS_CHILDREN */;\r\n const slotFlag = children._;\r\n if (!slotFlag && !(InternalObjectKey in children)) {\r\n children._ctx = currentRenderingInstance;\r\n }\r\n else if (slotFlag === 3 /* FORWARDED */ && currentRenderingInstance) {\r\n // a child component receives forwarded slots from the parent.\r\n // its slot type is determined by its parent's slot type.\r\n if (currentRenderingInstance.slots._ === 1 /* STABLE */) {\r\n children._ = 1 /* STABLE */;\r\n }\r\n else {\r\n children._ = 2 /* DYNAMIC */;\r\n vnode.patchFlag |= 1024 /* DYNAMIC_SLOTS */;\r\n }\r\n }\r\n }\r\n }\r\n else if (isFunction(children)) {\r\n children = { default: children, _ctx: currentRenderingInstance };\r\n type = 32 /* SLOTS_CHILDREN */;\r\n }\r\n else {\r\n children = String(children);\r\n // force teleport children to array so it can be moved around\r\n if (shapeFlag & 64 /* TELEPORT */) {\r\n type = 16 /* ARRAY_CHILDREN */;\r\n children = [createTextVNode(children)];\r\n }\r\n else {\r\n type = 8 /* TEXT_CHILDREN */;\r\n }\r\n }\r\n vnode.children = children;\r\n vnode.shapeFlag |= type;\r\n}\r\nfunction mergeProps(...args) {\r\n const ret = {};\r\n for (let i = 0; i < args.length; i++) {\r\n const toMerge = args[i];\r\n for (const key in toMerge) {\r\n if (key === 'class') {\r\n if (ret.class !== toMerge.class) {\r\n ret.class = normalizeClass([ret.class, toMerge.class]);\r\n }\r\n }\r\n else if (key === 'style') {\r\n ret.style = normalizeStyle([ret.style, toMerge.style]);\r\n }\r\n else if (isOn(key)) {\r\n const existing = ret[key];\r\n const incoming = toMerge[key];\r\n if (incoming &&\r\n existing !== incoming &&\r\n !(isArray(existing) && existing.includes(incoming))) {\r\n ret[key] = existing\r\n ? [].concat(existing, incoming)\r\n : incoming;\r\n }\r\n }\r\n else if (key !== '') {\r\n ret[key] = toMerge[key];\r\n }\r\n }\r\n }\r\n return ret;\r\n}\r\nfunction invokeVNodeHook(hook, instance, vnode, prevVNode = null) {\r\n callWithAsyncErrorHandling(hook, instance, 7 /* VNODE_HOOK */, [\r\n vnode,\r\n prevVNode\r\n ]);\r\n}\n\nconst emptyAppContext = createAppContext();\r\nlet uid$1 = 0;\r\nfunction createComponentInstance(vnode, parent, suspense) {\r\n const type = vnode.type;\r\n // inherit parent app context - or - if root, adopt from root vnode\r\n const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;\r\n const instance = {\r\n uid: uid$1++,\r\n vnode,\r\n type,\r\n parent,\r\n appContext,\r\n root: null,\r\n next: null,\r\n subTree: null,\r\n effect: null,\r\n update: null,\r\n scope: new EffectScope(true /* detached */),\r\n render: null,\r\n proxy: null,\r\n exposed: null,\r\n exposeProxy: null,\r\n withProxy: null,\r\n provides: parent ? parent.provides : Object.create(appContext.provides),\r\n accessCache: null,\r\n renderCache: [],\r\n // local resolved assets\r\n components: null,\r\n directives: null,\r\n // resolved props and emits options\r\n propsOptions: normalizePropsOptions(type, appContext),\r\n emitsOptions: normalizeEmitsOptions(type, appContext),\r\n // emit\r\n emit: null,\r\n emitted: null,\r\n // props default value\r\n propsDefaults: EMPTY_OBJ,\r\n // inheritAttrs\r\n inheritAttrs: type.inheritAttrs,\r\n // state\r\n ctx: EMPTY_OBJ,\r\n data: EMPTY_OBJ,\r\n props: EMPTY_OBJ,\r\n attrs: EMPTY_OBJ,\r\n slots: EMPTY_OBJ,\r\n refs: EMPTY_OBJ,\r\n setupState: EMPTY_OBJ,\r\n setupContext: null,\r\n // suspense related\r\n suspense,\r\n suspenseId: suspense ? suspense.pendingId : 0,\r\n asyncDep: null,\r\n asyncResolved: false,\r\n // lifecycle hooks\r\n // not using enums here because it results in computed properties\r\n isMounted: false,\r\n isUnmounted: false,\r\n isDeactivated: false,\r\n bc: null,\r\n c: null,\r\n bm: null,\r\n m: null,\r\n bu: null,\r\n u: null,\r\n um: null,\r\n bum: null,\r\n da: null,\r\n a: null,\r\n rtg: null,\r\n rtc: null,\r\n ec: null,\r\n sp: null\r\n };\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n instance.ctx = createDevRenderContext(instance);\r\n }\r\n else {\r\n instance.ctx = { _: instance };\r\n }\r\n instance.root = parent ? parent.root : instance;\r\n instance.emit = emit$1.bind(null, instance);\r\n // apply custom element special handling\r\n if (vnode.ce) {\r\n vnode.ce(instance);\r\n }\r\n return instance;\r\n}\r\nlet currentInstance = null;\r\nconst getCurrentInstance = () => currentInstance || currentRenderingInstance;\r\nconst setCurrentInstance = (instance) => {\r\n currentInstance = instance;\r\n instance.scope.on();\r\n};\r\nconst unsetCurrentInstance = () => {\r\n currentInstance && currentInstance.scope.off();\r\n currentInstance = null;\r\n};\r\nconst isBuiltInTag = /*#__PURE__*/ makeMap('slot,component');\r\nfunction validateComponentName(name, config) {\r\n const appIsNativeTag = config.isNativeTag || NO;\r\n if (isBuiltInTag(name) || appIsNativeTag(name)) {\r\n warn('Do not use built-in or reserved HTML elements as component id: ' + name);\r\n }\r\n}\r\nfunction isStatefulComponent(instance) {\r\n return instance.vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */;\r\n}\r\nlet isInSSRComponentSetup = false;\r\nfunction setupComponent(instance, isSSR = false) {\r\n isInSSRComponentSetup = isSSR;\r\n const { props, children } = instance.vnode;\r\n const isStateful = isStatefulComponent(instance);\r\n initProps(instance, props, isStateful, isSSR);\r\n initSlots(instance, children);\r\n const setupResult = isStateful\r\n ? setupStatefulComponent(instance, isSSR)\r\n : undefined;\r\n isInSSRComponentSetup = false;\r\n return setupResult;\r\n}\r\nfunction setupStatefulComponent(instance, isSSR) {\r\n var _a;\r\n const Component = instance.type;\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n if (Component.name) {\r\n validateComponentName(Component.name, instance.appContext.config);\r\n }\r\n if (Component.components) {\r\n const names = Object.keys(Component.components);\r\n for (let i = 0; i < names.length; i++) {\r\n validateComponentName(names[i], instance.appContext.config);\r\n }\r\n }\r\n if (Component.directives) {\r\n const names = Object.keys(Component.directives);\r\n for (let i = 0; i < names.length; i++) {\r\n validateDirectiveName(names[i]);\r\n }\r\n }\r\n if (Component.compilerOptions && isRuntimeOnly()) {\r\n warn(`\"compilerOptions\" is only supported when using a build of Vue that ` +\r\n `includes the runtime compiler. Since you are using a runtime-only ` +\r\n `build, the options should be passed via your build tool config instead.`);\r\n }\r\n }\r\n // 0. create render proxy property access cache\r\n instance.accessCache = Object.create(null);\r\n // 1. create public instance / render proxy\r\n // also mark it raw so it's never observed\r\n instance.proxy = markRaw(new Proxy(instance.ctx, PublicInstanceProxyHandlers));\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n exposePropsOnRenderContext(instance);\r\n }\r\n // 2. call setup()\r\n const { setup } = Component;\r\n if (setup) {\r\n const setupContext = (instance.setupContext =\r\n setup.length > 1 ? createSetupContext(instance) : null);\r\n setCurrentInstance(instance);\r\n pauseTracking();\r\n const setupResult = callWithErrorHandling(setup, instance, 0 /* SETUP_FUNCTION */, [(process.env.NODE_ENV !== 'production') ? shallowReadonly(instance.props) : instance.props, setupContext]);\r\n resetTracking();\r\n unsetCurrentInstance();\r\n if (isPromise(setupResult)) {\r\n setupResult.then(unsetCurrentInstance, unsetCurrentInstance);\r\n if (isSSR) {\r\n // return the promise so server-renderer can wait on it\r\n return setupResult\r\n .then((resolvedResult) => {\r\n handleSetupResult(instance, resolvedResult, isSSR);\r\n })\r\n .catch(e => {\r\n handleError(e, instance, 0 /* SETUP_FUNCTION */);\r\n });\r\n }\r\n else {\r\n // async setup returned Promise.\r\n // bail here and wait for re-entry.\r\n instance.asyncDep = setupResult;\r\n if ((process.env.NODE_ENV !== 'production') && !instance.suspense) {\r\n const name = (_a = Component.name) !== null && _a !== void 0 ? _a : 'Anonymous';\r\n warn(`Component <${name}>: setup function returned a promise, but no ` +\r\n `<Suspense> boundary was found in the parent component tree. ` +\r\n `A component with async setup() must be nested in a <Suspense> ` +\r\n `in order to be rendered.`);\r\n }\r\n }\r\n }\r\n else {\r\n handleSetupResult(instance, setupResult, isSSR);\r\n }\r\n }\r\n else {\r\n finishComponentSetup(instance, isSSR);\r\n }\r\n}\r\nfunction handleSetupResult(instance, setupResult, isSSR) {\r\n if (isFunction(setupResult)) {\r\n // setup returned an inline render function\r\n if (instance.type.__ssrInlineRender) {\r\n // when the function's name is `ssrRender` (compiled by SFC inline mode),\r\n // set it as ssrRender instead.\r\n instance.ssrRender = setupResult;\r\n }\r\n else {\r\n instance.render = setupResult;\r\n }\r\n }\r\n else if (isObject(setupResult)) {\r\n if ((process.env.NODE_ENV !== 'production') && isVNode(setupResult)) {\r\n warn(`setup() should not return VNodes directly - ` +\r\n `return a render function instead.`);\r\n }\r\n // setup returned bindings.\r\n // assuming a render function compiled from template is present.\r\n if ((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) {\r\n instance.devtoolsRawSetupState = setupResult;\r\n }\r\n instance.setupState = proxyRefs(setupResult);\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n exposeSetupStateOnRenderContext(instance);\r\n }\r\n }\r\n else if ((process.env.NODE_ENV !== 'production') && setupResult !== undefined) {\r\n warn(`setup() should return an object. Received: ${setupResult === null ? 'null' : typeof setupResult}`);\r\n }\r\n finishComponentSetup(instance, isSSR);\r\n}\r\nlet compile;\r\nlet installWithProxy;\r\n/**\r\n * For runtime-dom to register the compiler.\r\n * Note the exported method uses any to avoid d.ts relying on the compiler types.\r\n */\r\nfunction registerRuntimeCompiler(_compile) {\r\n compile = _compile;\r\n installWithProxy = i => {\r\n if (i.render._rc) {\r\n i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers);\r\n }\r\n };\r\n}\r\n// dev only\r\nconst isRuntimeOnly = () => !compile;\r\nfunction finishComponentSetup(instance, isSSR, skipOptions) {\r\n const Component = instance.type;\r\n // template / render function normalization\r\n // could be already set when returned from setup()\r\n if (!instance.render) {\r\n // only do on-the-fly compile if not in SSR - SSR on-the-fly compilation\r\n // is done by server-renderer\r\n if (!isSSR && compile && !Component.render) {\r\n const template = Component.template;\r\n if (template) {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n startMeasure(instance, `compile`);\r\n }\r\n const { isCustomElement, compilerOptions } = instance.appContext.config;\r\n const { delimiters, compilerOptions: componentCompilerOptions } = Component;\r\n const finalCompilerOptions = extend(extend({\r\n isCustomElement,\r\n delimiters\r\n }, compilerOptions), componentCompilerOptions);\r\n Component.render = compile(template, finalCompilerOptions);\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n endMeasure(instance, `compile`);\r\n }\r\n }\r\n }\r\n instance.render = (Component.render || NOOP);\r\n // for runtime-compiled render functions using `with` blocks, the render\r\n // proxy used needs a different `has` handler which is more performant and\r\n // also only allows a whitelist of globals to fallthrough.\r\n if (installWithProxy) {\r\n installWithProxy(instance);\r\n }\r\n }\r\n // support for 2.x options\r\n if (__VUE_OPTIONS_API__ && !(false )) {\r\n setCurrentInstance(instance);\r\n pauseTracking();\r\n applyOptions(instance);\r\n resetTracking();\r\n unsetCurrentInstance();\r\n }\r\n // warn missing template/render\r\n // the runtime compilation of template in SSR is done by server-render\r\n if ((process.env.NODE_ENV !== 'production') && !Component.render && instance.render === NOOP && !isSSR) {\r\n /* istanbul ignore if */\r\n if (!compile && Component.template) {\r\n warn(`Component provided template option but ` +\r\n `runtime compilation is not supported in this build of Vue.` +\r\n (` Configure your bundler to alias \"vue\" to \"vue/dist/vue.esm-bundler.js\".`\r\n ) /* should not happen */);\r\n }\r\n else {\r\n warn(`Component is missing template or render function.`);\r\n }\r\n }\r\n}\r\nfunction createAttrsProxy(instance) {\r\n return new Proxy(instance.attrs, (process.env.NODE_ENV !== 'production')\r\n ? {\r\n get(target, key) {\r\n markAttrsAccessed();\r\n track(instance, \"get\" /* GET */, '$attrs');\r\n return target[key];\r\n },\r\n set() {\r\n warn(`setupContext.attrs is readonly.`);\r\n return false;\r\n },\r\n deleteProperty() {\r\n warn(`setupContext.attrs is readonly.`);\r\n return false;\r\n }\r\n }\r\n : {\r\n get(target, key) {\r\n track(instance, \"get\" /* GET */, '$attrs');\r\n return target[key];\r\n }\r\n });\r\n}\r\nfunction createSetupContext(instance) {\r\n const expose = exposed => {\r\n if ((process.env.NODE_ENV !== 'production') && instance.exposed) {\r\n warn(`expose() should be called only once per setup().`);\r\n }\r\n instance.exposed = exposed || {};\r\n };\r\n let attrs;\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n // We use getters in dev in case libs like test-utils overwrite instance\r\n // properties (overwrites should not be done in prod)\r\n return Object.freeze({\r\n get attrs() {\r\n return attrs || (attrs = createAttrsProxy(instance));\r\n },\r\n get slots() {\r\n return shallowReadonly(instance.slots);\r\n },\r\n get emit() {\r\n return (event, ...args) => instance.emit(event, ...args);\r\n },\r\n expose\r\n });\r\n }\r\n else {\r\n return {\r\n get attrs() {\r\n return attrs || (attrs = createAttrsProxy(instance));\r\n },\r\n slots: instance.slots,\r\n emit: instance.emit,\r\n expose\r\n };\r\n }\r\n}\r\nfunction getExposeProxy(instance) {\r\n if (instance.exposed) {\r\n return (instance.exposeProxy ||\r\n (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), {\r\n get(target, key) {\r\n if (key in target) {\r\n return target[key];\r\n }\r\n else if (key in publicPropertiesMap) {\r\n return publicPropertiesMap[key](instance);\r\n }\r\n }\r\n })));\r\n }\r\n}\r\nconst classifyRE = /(?:^|[-_])(\\w)/g;\r\nconst classify = (str) => str.replace(classifyRE, c => c.toUpperCase()).replace(/[-_]/g, '');\r\nfunction getComponentName(Component) {\r\n return isFunction(Component)\r\n ? Component.displayName || Component.name\r\n : Component.name;\r\n}\r\n/* istanbul ignore next */\r\nfunction formatComponentName(instance, Component, isRoot = false) {\r\n let name = getComponentName(Component);\r\n if (!name && Component.__file) {\r\n const match = Component.__file.match(/([^/\\\\]+)\\.\\w+$/);\r\n if (match) {\r\n name = match[1];\r\n }\r\n }\r\n if (!name && instance && instance.parent) {\r\n // try to infer the name based on reverse resolution\r\n const inferFromRegistry = (registry) => {\r\n for (const key in registry) {\r\n if (registry[key] === Component) {\r\n return key;\r\n }\r\n }\r\n };\r\n name =\r\n inferFromRegistry(instance.components ||\r\n instance.parent.type.components) || inferFromRegistry(instance.appContext.components);\r\n }\r\n return name ? classify(name) : isRoot ? `App` : `Anonymous`;\r\n}\r\nfunction isClassComponent(value) {\r\n return isFunction(value) && '__vccOpts' in value;\r\n}\n\nconst computed = ((getterOrOptions, debugOptions) => {\r\n // @ts-ignore\r\n return computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);\r\n});\n\n// dev only\r\nconst warnRuntimeUsage = (method) => warn(`${method}() is a compiler-hint helper that is only usable inside ` +\r\n `<script setup> of a single file component. Its arguments should be ` +\r\n `compiled away and passing it at runtime has no effect.`);\r\n// implementation\r\nfunction defineProps() {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n warnRuntimeUsage(`defineProps`);\r\n }\r\n return null;\r\n}\r\n// implementation\r\nfunction defineEmits() {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n warnRuntimeUsage(`defineEmits`);\r\n }\r\n return null;\r\n}\r\n/**\r\n * Vue `<script setup>` compiler macro for declaring a component's exposed\r\n * instance properties when it is accessed by a parent component via template\r\n * refs.\r\n *\r\n * `<script setup>` components are closed by default - i.e. variables inside\r\n * the `<script setup>` scope is not exposed to parent unless explicitly exposed\r\n * via `defineExpose`.\r\n *\r\n * This is only usable inside `<script setup>`, is compiled away in the\r\n * output and should **not** be actually called at runtime.\r\n */\r\nfunction defineExpose(exposed) {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n warnRuntimeUsage(`defineExpose`);\r\n }\r\n}\r\n/**\r\n * Vue `<script setup>` compiler macro for providing props default values when\r\n * using type-based `defineProps` declaration.\r\n *\r\n * Example usage:\r\n * ```ts\r\n * withDefaults(defineProps<{\r\n * size?: number\r\n * labels?: string[]\r\n * }>(), {\r\n * size: 3,\r\n * labels: () => ['default label']\r\n * })\r\n * ```\r\n *\r\n * This is only usable inside `<script setup>`, is compiled away in the output\r\n * and should **not** be actually called at runtime.\r\n */\r\nfunction withDefaults(props, defaults) {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n warnRuntimeUsage(`withDefaults`);\r\n }\r\n return null;\r\n}\r\nfunction useSlots() {\r\n return getContext().slots;\r\n}\r\nfunction useAttrs() {\r\n return getContext().attrs;\r\n}\r\nfunction getContext() {\r\n const i = getCurrentInstance();\r\n if ((process.env.NODE_ENV !== 'production') && !i) {\r\n warn(`useContext() called without active instance.`);\r\n }\r\n return i.setupContext || (i.setupContext = createSetupContext(i));\r\n}\r\n/**\r\n * Runtime helper for merging default declarations. Imported by compiled code\r\n * only.\r\n * @internal\r\n */\r\nfunction mergeDefaults(raw, defaults) {\r\n const props = isArray(raw)\r\n ? raw.reduce((normalized, p) => ((normalized[p] = {}), normalized), {})\r\n : raw;\r\n for (const key in defaults) {\r\n const opt = props[key];\r\n if (opt) {\r\n if (isArray(opt) || isFunction(opt)) {\r\n props[key] = { type: opt, default: defaults[key] };\r\n }\r\n else {\r\n opt.default = defaults[key];\r\n }\r\n }\r\n else if (opt === null) {\r\n props[key] = { default: defaults[key] };\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`props default key \"${key}\" has no corresponding declaration.`);\r\n }\r\n }\r\n return props;\r\n}\r\n/**\r\n * Used to create a proxy for the rest element when destructuring props with\r\n * defineProps().\r\n * @internal\r\n */\r\nfunction createPropsRestProxy(props, excludedKeys) {\r\n const ret = {};\r\n for (const key in props) {\r\n if (!excludedKeys.includes(key)) {\r\n Object.defineProperty(ret, key, {\r\n enumerable: true,\r\n get: () => props[key]\r\n });\r\n }\r\n }\r\n return ret;\r\n}\r\n/**\r\n * `<script setup>` helper for persisting the current instance context over\r\n * async/await flows.\r\n *\r\n * `@vue/compiler-sfc` converts the following:\r\n *\r\n * ```ts\r\n * const x = await foo()\r\n * ```\r\n *\r\n * into:\r\n *\r\n * ```ts\r\n * let __temp, __restore\r\n * const x = (([__temp, __restore] = withAsyncContext(() => foo())),__temp=await __temp,__restore(),__temp)\r\n * ```\r\n * @internal\r\n */\r\nfunction withAsyncContext(getAwaitable) {\r\n const ctx = getCurrentInstance();\r\n if ((process.env.NODE_ENV !== 'production') && !ctx) {\r\n warn(`withAsyncContext called without active current instance. ` +\r\n `This is likely a bug.`);\r\n }\r\n let awaitable = getAwaitable();\r\n unsetCurrentInstance();\r\n if (isPromise(awaitable)) {\r\n awaitable = awaitable.catch(e => {\r\n setCurrentInstance(ctx);\r\n throw e;\r\n });\r\n }\r\n return [awaitable, () => setCurrentInstance(ctx)];\r\n}\n\n// Actual implementation\r\nfunction h(type, propsOrChildren, children) {\r\n const l = arguments.length;\r\n if (l === 2) {\r\n if (isObject(propsOrChildren) && !isArray(propsOrChildren)) {\r\n // single vnode without props\r\n if (isVNode(propsOrChildren)) {\r\n return createVNode(type, null, [propsOrChildren]);\r\n }\r\n // props without children\r\n return createVNode(type, propsOrChildren);\r\n }\r\n else {\r\n // omit props\r\n return createVNode(type, null, propsOrChildren);\r\n }\r\n }\r\n else {\r\n if (l > 3) {\r\n children = Array.prototype.slice.call(arguments, 2);\r\n }\r\n else if (l === 3 && isVNode(children)) {\r\n children = [children];\r\n }\r\n return createVNode(type, propsOrChildren, children);\r\n }\r\n}\n\nconst ssrContextKey = Symbol((process.env.NODE_ENV !== 'production') ? `ssrContext` : ``);\r\nconst useSSRContext = () => {\r\n {\r\n const ctx = inject(ssrContextKey);\r\n if (!ctx) {\r\n warn(`Server rendering context not provided. Make sure to only call ` +\r\n `useSSRContext() conditionally in the server build.`);\r\n }\r\n return ctx;\r\n }\r\n};\n\nfunction isShallow(value) {\r\n return !!(value && value[\"__v_isShallow\" /* IS_SHALLOW */]);\r\n}\n\nfunction initCustomFormatter() {\r\n /* eslint-disable no-restricted-globals */\r\n if (!(process.env.NODE_ENV !== 'production') || typeof window === 'undefined') {\r\n return;\r\n }\r\n const vueStyle = { style: 'color:#3ba776' };\r\n const numberStyle = { style: 'color:#0b1bc9' };\r\n const stringStyle = { style: 'color:#b62e24' };\r\n const keywordStyle = { style: 'color:#9d288c' };\r\n // custom formatter for Chrome\r\n // https://www.mattzeunert.com/2016/02/19/custom-chrome-devtools-object-formatters.html\r\n const formatter = {\r\n header(obj) {\r\n // TODO also format ComponentPublicInstance & ctx.slots/attrs in setup\r\n if (!isObject(obj)) {\r\n return null;\r\n }\r\n if (obj.__isVue) {\r\n return ['div', vueStyle, `VueInstance`];\r\n }\r\n else if (isRef(obj)) {\r\n return [\r\n 'div',\r\n {},\r\n ['span', vueStyle, genRefFlag(obj)],\r\n '<',\r\n formatValue(obj.value),\r\n `>`\r\n ];\r\n }\r\n else if (isReactive(obj)) {\r\n return [\r\n 'div',\r\n {},\r\n ['span', vueStyle, isShallow(obj) ? 'ShallowReactive' : 'Reactive'],\r\n '<',\r\n formatValue(obj),\r\n `>${isReadonly(obj) ? ` (readonly)` : ``}`\r\n ];\r\n }\r\n else if (isReadonly(obj)) {\r\n return [\r\n 'div',\r\n {},\r\n ['span', vueStyle, isShallow(obj) ? 'ShallowReadonly' : 'Readonly'],\r\n '<',\r\n formatValue(obj),\r\n '>'\r\n ];\r\n }\r\n return null;\r\n },\r\n hasBody(obj) {\r\n return obj && obj.__isVue;\r\n },\r\n body(obj) {\r\n if (obj && obj.__isVue) {\r\n return [\r\n 'div',\r\n {},\r\n ...formatInstance(obj.$)\r\n ];\r\n }\r\n }\r\n };\r\n function formatInstance(instance) {\r\n const blocks = [];\r\n if (instance.type.props && instance.props) {\r\n blocks.push(createInstanceBlock('props', toRaw(instance.props)));\r\n }\r\n if (instance.setupState !== EMPTY_OBJ) {\r\n blocks.push(createInstanceBlock('setup', instance.setupState));\r\n }\r\n if (instance.data !== EMPTY_OBJ) {\r\n blocks.push(createInstanceBlock('data', toRaw(instance.data)));\r\n }\r\n const computed = extractKeys(instance, 'computed');\r\n if (computed) {\r\n blocks.push(createInstanceBlock('computed', computed));\r\n }\r\n const injected = extractKeys(instance, 'inject');\r\n if (injected) {\r\n blocks.push(createInstanceBlock('injected', injected));\r\n }\r\n blocks.push([\r\n 'div',\r\n {},\r\n [\r\n 'span',\r\n {\r\n style: keywordStyle.style + ';opacity:0.66'\r\n },\r\n '$ (internal): '\r\n ],\r\n ['object', { object: instance }]\r\n ]);\r\n return blocks;\r\n }\r\n function createInstanceBlock(type, target) {\r\n target = extend({}, target);\r\n if (!Object.keys(target).length) {\r\n return ['span', {}];\r\n }\r\n return [\r\n 'div',\r\n { style: 'line-height:1.25em;margin-bottom:0.6em' },\r\n [\r\n 'div',\r\n {\r\n style: 'color:#476582'\r\n },\r\n type\r\n ],\r\n [\r\n 'div',\r\n {\r\n style: 'padding-left:1.25em'\r\n },\r\n ...Object.keys(target).map(key => {\r\n return [\r\n 'div',\r\n {},\r\n ['span', keywordStyle, key + ': '],\r\n formatValue(target[key], false)\r\n ];\r\n })\r\n ]\r\n ];\r\n }\r\n function formatValue(v, asRaw = true) {\r\n if (typeof v === 'number') {\r\n return ['span', numberStyle, v];\r\n }\r\n else if (typeof v === 'string') {\r\n return ['span', stringStyle, JSON.stringify(v)];\r\n }\r\n else if (typeof v === 'boolean') {\r\n return ['span', keywordStyle, v];\r\n }\r\n else if (isObject(v)) {\r\n return ['object', { object: asRaw ? toRaw(v) : v }];\r\n }\r\n else {\r\n return ['span', stringStyle, String(v)];\r\n }\r\n }\r\n function extractKeys(instance, type) {\r\n const Comp = instance.type;\r\n if (isFunction(Comp)) {\r\n return;\r\n }\r\n const extracted = {};\r\n for (const key in instance.ctx) {\r\n if (isKeyOfType(Comp, key, type)) {\r\n extracted[key] = instance.ctx[key];\r\n }\r\n }\r\n return extracted;\r\n }\r\n function isKeyOfType(Comp, key, type) {\r\n const opts = Comp[type];\r\n if ((isArray(opts) && opts.includes(key)) ||\r\n (isObject(opts) && key in opts)) {\r\n return true;\r\n }\r\n if (Comp.extends && isKeyOfType(Comp.extends, key, type)) {\r\n return true;\r\n }\r\n if (Comp.mixins && Comp.mixins.some(m => isKeyOfType(m, key, type))) {\r\n return true;\r\n }\r\n }\r\n function genRefFlag(v) {\r\n if (isShallow(v)) {\r\n return `ShallowRef`;\r\n }\r\n if (v.effect) {\r\n return `ComputedRef`;\r\n }\r\n return `Ref`;\r\n }\r\n if (window.devtoolsFormatters) {\r\n window.devtoolsFormatters.push(formatter);\r\n }\r\n else {\r\n window.devtoolsFormatters = [formatter];\r\n }\r\n}\n\nfunction withMemo(memo, render, cache, index) {\r\n const cached = cache[index];\r\n if (cached && isMemoSame(cached, memo)) {\r\n return cached;\r\n }\r\n const ret = render();\r\n // shallow clone\r\n ret.memo = memo.slice();\r\n return (cache[index] = ret);\r\n}\r\nfunction isMemoSame(cached, memo) {\r\n const prev = cached.memo;\r\n if (prev.length != memo.length) {\r\n return false;\r\n }\r\n for (let i = 0; i < prev.length; i++) {\r\n if (hasChanged(prev[i], memo[i])) {\r\n return false;\r\n }\r\n }\r\n // make sure to let parent block track it when returning cached\r\n if (isBlockTreeEnabled > 0 && currentBlock) {\r\n currentBlock.push(cached);\r\n }\r\n return true;\r\n}\n\n// Core API ------------------------------------------------------------------\r\nconst version = \"3.2.35\";\r\nconst _ssrUtils = {\r\n createComponentInstance,\r\n setupComponent,\r\n renderComponentRoot,\r\n setCurrentRenderingInstance,\r\n isVNode,\r\n normalizeVNode\r\n};\r\n/**\r\n * SSR utils for \\@vue/server-renderer. Only exposed in cjs builds.\r\n * @internal\r\n */\r\nconst ssrUtils = (_ssrUtils );\r\n/**\r\n * @internal only exposed in compat builds\r\n */\r\nconst resolveFilter = null;\r\n/**\r\n * @internal only exposed in compat builds.\r\n */\r\nconst compatUtils = (null);\n\nexport { BaseTransition, Comment, Fragment, KeepAlive, Static, Suspense, Teleport, Text, callWithAsyncErrorHandling, callWithErrorHandling, cloneVNode, compatUtils, computed, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSlots, createStaticVNode, createTextVNode, createVNode, defineAsyncComponent, defineComponent, defineEmits, defineExpose, defineProps, devtools, getCurrentInstance, getTransitionRawChildren, guardReactiveProps, h, handleError, initCustomFormatter, inject, isMemoSame, isRuntimeOnly, isVNode, mergeDefaults, mergeProps, nextTick, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, pushScopeId, queuePostFlushCb, registerRuntimeCompiler, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, ssrContextKey, ssrUtils, toHandlers, transformVNodeArgs, useAttrs, useSSRContext, useSlots, useTransitionState, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withMemo, withScopeId };\n","import { camelize, warn, callWithAsyncErrorHandling, defineComponent, nextTick, createVNode, getCurrentInstance, watchPostEffect, onMounted, onUnmounted, Fragment, Static, h, BaseTransition, useTransitionState, onUpdated, toRaw, getTransitionRawChildren, setTransitionHooks, resolveTransitionHooks, createRenderer, isRuntimeOnly, createHydrationRenderer } from '@vue/runtime-core';\nexport * from '@vue/runtime-core';\nimport { isString, isArray, hyphenate, capitalize, isSpecialBooleanAttr, includeBooleanAttr, isOn, isModelListener, isFunction, toNumber, camelize as camelize$1, extend, EMPTY_OBJ, isObject, invokeArrayFns, looseIndexOf, isSet, looseEqual, isHTMLTag, isSVGTag } from '@vue/shared';\n\nconst svgNS = 'http://www.w3.org/2000/svg';\r\nconst doc = (typeof document !== 'undefined' ? document : null);\r\nconst templateContainer = doc && /*#__PURE__*/ doc.createElement('template');\r\nconst nodeOps = {\r\n insert: (child, parent, anchor) => {\r\n parent.insertBefore(child, anchor || null);\r\n },\r\n remove: child => {\r\n const parent = child.parentNode;\r\n if (parent) {\r\n parent.removeChild(child);\r\n }\r\n },\r\n createElement: (tag, isSVG, is, props) => {\r\n const el = isSVG\r\n ? doc.createElementNS(svgNS, tag)\r\n : doc.createElement(tag, is ? { is } : undefined);\r\n if (tag === 'select' && props && props.multiple != null) {\r\n el.setAttribute('multiple', props.multiple);\r\n }\r\n return el;\r\n },\r\n createText: text => doc.createTextNode(text),\r\n createComment: text => doc.createComment(text),\r\n setText: (node, text) => {\r\n node.nodeValue = text;\r\n },\r\n setElementText: (el, text) => {\r\n el.textContent = text;\r\n },\r\n parentNode: node => node.parentNode,\r\n nextSibling: node => node.nextSibling,\r\n querySelector: selector => doc.querySelector(selector),\r\n setScopeId(el, id) {\r\n el.setAttribute(id, '');\r\n },\r\n cloneNode(el) {\r\n const cloned = el.cloneNode(true);\r\n // #3072\r\n // - in `patchDOMProp`, we store the actual value in the `el._value` property.\r\n // - normally, elements using `:value` bindings will not be hoisted, but if\r\n // the bound value is a constant, e.g. `:value=\"true\"` - they do get\r\n // hoisted.\r\n // - in production, hoisted nodes are cloned when subsequent inserts, but\r\n // cloneNode() does not copy the custom property we attached.\r\n // - This may need to account for other custom DOM properties we attach to\r\n // elements in addition to `_value` in the future.\r\n if (`_value` in el) {\r\n cloned._value = el._value;\r\n }\r\n return cloned;\r\n },\r\n // __UNSAFE__\r\n // Reason: innerHTML.\r\n // Static content here can only come from compiled templates.\r\n // As long as the user only uses trusted templates, this is safe.\r\n insertStaticContent(content, parent, anchor, isSVG, start, end) {\r\n // <parent> before | first ... last | anchor </parent>\r\n const before = anchor ? anchor.previousSibling : parent.lastChild;\r\n // #5308 can only take cached path if:\r\n // - has a single root node\r\n // - nextSibling info is still available\r\n if (start && (start === end || start.nextSibling)) {\r\n // cached\r\n while (true) {\r\n parent.insertBefore(start.cloneNode(true), anchor);\r\n if (start === end || !(start = start.nextSibling))\r\n break;\r\n }\r\n }\r\n else {\r\n // fresh insert\r\n templateContainer.innerHTML = isSVG ? `<svg>${content}</svg>` : content;\r\n const template = templateContainer.content;\r\n if (isSVG) {\r\n // remove outer svg wrapper\r\n const wrapper = template.firstChild;\r\n while (wrapper.firstChild) {\r\n template.appendChild(wrapper.firstChild);\r\n }\r\n template.removeChild(wrapper);\r\n }\r\n parent.insertBefore(template, anchor);\r\n }\r\n return [\r\n // first\r\n before ? before.nextSibling : parent.firstChild,\r\n // last\r\n anchor ? anchor.previousSibling : parent.lastChild\r\n ];\r\n }\r\n};\n\n// compiler should normalize class + :class bindings on the same element\r\n// into a single binding ['staticClass', dynamic]\r\nfunction patchClass(el, value, isSVG) {\r\n // directly setting className should be faster than setAttribute in theory\r\n // if this is an element during a transition, take the temporary transition\r\n // classes into account.\r\n const transitionClasses = el._vtc;\r\n if (transitionClasses) {\r\n value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(' ');\r\n }\r\n if (value == null) {\r\n el.removeAttribute('class');\r\n }\r\n else if (isSVG) {\r\n el.setAttribute('class', value);\r\n }\r\n else {\r\n el.className = value;\r\n }\r\n}\n\nfunction patchStyle(el, prev, next) {\r\n const style = el.style;\r\n const isCssString = isString(next);\r\n if (next && !isCssString) {\r\n for (const key in next) {\r\n setStyle(style, key, next[key]);\r\n }\r\n if (prev && !isString(prev)) {\r\n for (const key in prev) {\r\n if (next[key] == null) {\r\n setStyle(style, key, '');\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n const currentDisplay = style.display;\r\n if (isCssString) {\r\n if (prev !== next) {\r\n style.cssText = next;\r\n }\r\n }\r\n else if (prev) {\r\n el.removeAttribute('style');\r\n }\r\n // indicates that the `display` of the element is controlled by `v-show`,\r\n // so we always keep the current `display` value regardless of the `style`\r\n // value, thus handing over control to `v-show`.\r\n if ('_vod' in el) {\r\n style.display = currentDisplay;\r\n }\r\n }\r\n}\r\nconst importantRE = /\\s*!important$/;\r\nfunction setStyle(style, name, val) {\r\n if (isArray(val)) {\r\n val.forEach(v => setStyle(style, name, v));\r\n }\r\n else {\r\n if (val == null)\r\n val = '';\r\n if (name.startsWith('--')) {\r\n // custom property definition\r\n style.setProperty(name, val);\r\n }\r\n else {\r\n const prefixed = autoPrefix(style, name);\r\n if (importantRE.test(val)) {\r\n // !important\r\n style.setProperty(hyphenate(prefixed), val.replace(importantRE, ''), 'important');\r\n }\r\n else {\r\n style[prefixed] = val;\r\n }\r\n }\r\n }\r\n}\r\nconst prefixes = ['Webkit', 'Moz', 'ms'];\r\nconst prefixCache = {};\r\nfunction autoPrefix(style, rawName) {\r\n const cached = prefixCache[rawName];\r\n if (cached) {\r\n return cached;\r\n }\r\n let name = camelize(rawName);\r\n if (name !== 'filter' && name in style) {\r\n return (prefixCache[rawName] = name);\r\n }\r\n name = capitalize(name);\r\n for (let i = 0; i < prefixes.length; i++) {\r\n const prefixed = prefixes[i] + name;\r\n if (prefixed in style) {\r\n return (prefixCache[rawName] = prefixed);\r\n }\r\n }\r\n return rawName;\r\n}\n\nconst xlinkNS = 'http://www.w3.org/1999/xlink';\r\nfunction patchAttr(el, key, value, isSVG, instance) {\r\n if (isSVG && key.startsWith('xlink:')) {\r\n if (value == null) {\r\n el.removeAttributeNS(xlinkNS, key.slice(6, key.length));\r\n }\r\n else {\r\n el.setAttributeNS(xlinkNS, key, value);\r\n }\r\n }\r\n else {\r\n // note we are only checking boolean attributes that don't have a\r\n // corresponding dom prop of the same name here.\r\n const isBoolean = isSpecialBooleanAttr(key);\r\n if (value == null || (isBoolean && !includeBooleanAttr(value))) {\r\n el.removeAttribute(key);\r\n }\r\n else {\r\n el.setAttribute(key, isBoolean ? '' : value);\r\n }\r\n }\r\n}\n\n// __UNSAFE__\r\n// functions. The user is responsible for using them with only trusted content.\r\nfunction patchDOMProp(el, key, value, \r\n// the following args are passed only due to potential innerHTML/textContent\r\n// overriding existing VNodes, in which case the old tree must be properly\r\n// unmounted.\r\nprevChildren, parentComponent, parentSuspense, unmountChildren) {\r\n if (key === 'innerHTML' || key === 'textContent') {\r\n if (prevChildren) {\r\n unmountChildren(prevChildren, parentComponent, parentSuspense);\r\n }\r\n el[key] = value == null ? '' : value;\r\n return;\r\n }\r\n if (key === 'value' &&\r\n el.tagName !== 'PROGRESS' &&\r\n // custom elements may use _value internally\r\n !el.tagName.includes('-')) {\r\n // store value as _value as well since\r\n // non-string values will be stringified.\r\n el._value = value;\r\n const newValue = value == null ? '' : value;\r\n if (el.value !== newValue ||\r\n // #4956: always set for OPTION elements because its value falls back to\r\n // textContent if no value attribute is present. And setting .value for\r\n // OPTION has no side effect\r\n el.tagName === 'OPTION') {\r\n el.value = newValue;\r\n }\r\n if (value == null) {\r\n el.removeAttribute(key);\r\n }\r\n return;\r\n }\r\n let needRemove = false;\r\n if (value === '' || value == null) {\r\n const type = typeof el[key];\r\n if (type === 'boolean') {\r\n // e.g. <select multiple> compiles to { multiple: '' }\r\n value = includeBooleanAttr(value);\r\n }\r\n else if (value == null && type === 'string') {\r\n // e.g. <div :id=\"null\">\r\n value = '';\r\n needRemove = true;\r\n }\r\n else if (type === 'number') {\r\n // e.g. <img :width=\"null\">\r\n // the value of some IDL attr must be greater than 0, e.g. input.size = 0 -> error\r\n value = 0;\r\n needRemove = true;\r\n }\r\n }\r\n // some properties perform value validation and throw,\r\n // some properties has getter, no setter, will error in 'use strict'\r\n // eg. <select :type=\"null\"></select> <select :willValidate=\"null\"></select>\r\n try {\r\n el[key] = value;\r\n }\r\n catch (e) {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`Failed setting prop \"${key}\" on <${el.tagName.toLowerCase()}>: ` +\r\n `value ${value} is invalid.`, e);\r\n }\r\n }\r\n needRemove && el.removeAttribute(key);\r\n}\n\n// Async edge case fix requires storing an event listener's attach timestamp.\r\nconst [_getNow, skipTimestampCheck] = /*#__PURE__*/ (() => {\r\n let _getNow = Date.now;\r\n let skipTimestampCheck = false;\r\n if (typeof window !== 'undefined') {\r\n // Determine what event timestamp the browser is using. Annoyingly, the\r\n // timestamp can either be hi-res (relative to page load) or low-res\r\n // (relative to UNIX epoch), so in order to compare time we have to use the\r\n // same timestamp type when saving the flush timestamp.\r\n if (Date.now() > document.createEvent('Event').timeStamp) {\r\n // if the low-res timestamp which is bigger than the event timestamp\r\n // (which is evaluated AFTER) it means the event is using a hi-res timestamp,\r\n // and we need to use the hi-res version for event listeners as well.\r\n _getNow = () => performance.now();\r\n }\r\n // #3485: Firefox <= 53 has incorrect Event.timeStamp implementation\r\n // and does not fire microtasks in between event propagation, so safe to exclude.\r\n const ffMatch = navigator.userAgent.match(/firefox\\/(\\d+)/i);\r\n skipTimestampCheck = !!(ffMatch && Number(ffMatch[1]) <= 53);\r\n }\r\n return [_getNow, skipTimestampCheck];\r\n})();\r\n// To avoid the overhead of repeatedly calling performance.now(), we cache\r\n// and use the same timestamp for all event listeners attached in the same tick.\r\nlet cachedNow = 0;\r\nconst p = /*#__PURE__*/ Promise.resolve();\r\nconst reset = () => {\r\n cachedNow = 0;\r\n};\r\nconst getNow = () => cachedNow || (p.then(reset), (cachedNow = _getNow()));\r\nfunction addEventListener(el, event, handler, options) {\r\n el.addEventListener(event, handler, options);\r\n}\r\nfunction removeEventListener(el, event, handler, options) {\r\n el.removeEventListener(event, handler, options);\r\n}\r\nfunction patchEvent(el, rawName, prevValue, nextValue, instance = null) {\r\n // vei = vue event invokers\r\n const invokers = el._vei || (el._vei = {});\r\n const existingInvoker = invokers[rawName];\r\n if (nextValue && existingInvoker) {\r\n // patch\r\n existingInvoker.value = nextValue;\r\n }\r\n else {\r\n const [name, options] = parseName(rawName);\r\n if (nextValue) {\r\n // add\r\n const invoker = (invokers[rawName] = createInvoker(nextValue, instance));\r\n addEventListener(el, name, invoker, options);\r\n }\r\n else if (existingInvoker) {\r\n // remove\r\n removeEventListener(el, name, existingInvoker, options);\r\n invokers[rawName] = undefined;\r\n }\r\n }\r\n}\r\nconst optionsModifierRE = /(?:Once|Passive|Capture)$/;\r\nfunction parseName(name) {\r\n let options;\r\n if (optionsModifierRE.test(name)) {\r\n options = {};\r\n let m;\r\n while ((m = name.match(optionsModifierRE))) {\r\n name = name.slice(0, name.length - m[0].length);\r\n options[m[0].toLowerCase()] = true;\r\n }\r\n }\r\n return [hyphenate(name.slice(2)), options];\r\n}\r\nfunction createInvoker(initialValue, instance) {\r\n const invoker = (e) => {\r\n // async edge case #6566: inner click event triggers patch, event handler\r\n // attached to outer element during patch, and triggered again. This\r\n // happens because browsers fire microtask ticks between event propagation.\r\n // the solution is simple: we save the timestamp when a handler is attached,\r\n // and the handler would only fire if the event passed to it was fired\r\n // AFTER it was attached.\r\n const timeStamp = e.timeStamp || _getNow();\r\n if (skipTimestampCheck || timeStamp >= invoker.attached - 1) {\r\n callWithAsyncErrorHandling(patchStopImmediatePropagation(e, invoker.value), instance, 5 /* NATIVE_EVENT_HANDLER */, [e]);\r\n }\r\n };\r\n invoker.value = initialValue;\r\n invoker.attached = getNow();\r\n return invoker;\r\n}\r\nfunction patchStopImmediatePropagation(e, value) {\r\n if (isArray(value)) {\r\n const originalStop = e.stopImmediatePropagation;\r\n e.stopImmediatePropagation = () => {\r\n originalStop.call(e);\r\n e._stopped = true;\r\n };\r\n return value.map(fn => (e) => !e._stopped && fn && fn(e));\r\n }\r\n else {\r\n return value;\r\n }\r\n}\n\nconst nativeOnRE = /^on[a-z]/;\r\nconst patchProp = (el, key, prevValue, nextValue, isSVG = false, prevChildren, parentComponent, parentSuspense, unmountChildren) => {\r\n if (key === 'class') {\r\n patchClass(el, nextValue, isSVG);\r\n }\r\n else if (key === 'style') {\r\n patchStyle(el, prevValue, nextValue);\r\n }\r\n else if (isOn(key)) {\r\n // ignore v-model listeners\r\n if (!isModelListener(key)) {\r\n patchEvent(el, key, prevValue, nextValue, parentComponent);\r\n }\r\n }\r\n else if (key[0] === '.'\r\n ? ((key = key.slice(1)), true)\r\n : key[0] === '^'\r\n ? ((key = key.slice(1)), false)\r\n : shouldSetAsProp(el, key, nextValue, isSVG)) {\r\n patchDOMProp(el, key, nextValue, prevChildren, parentComponent, parentSuspense, unmountChildren);\r\n }\r\n else {\r\n // special case for <input v-model type=\"checkbox\"> with\r\n // :true-value & :false-value\r\n // store value as dom properties since non-string values will be\r\n // stringified.\r\n if (key === 'true-value') {\r\n el._trueValue = nextValue;\r\n }\r\n else if (key === 'false-value') {\r\n el._falseValue = nextValue;\r\n }\r\n patchAttr(el, key, nextValue, isSVG);\r\n }\r\n};\r\nfunction shouldSetAsProp(el, key, value, isSVG) {\r\n if (isSVG) {\r\n // most keys must be set as attribute on svg elements to work\r\n // ...except innerHTML & textContent\r\n if (key === 'innerHTML' || key === 'textContent') {\r\n return true;\r\n }\r\n // or native onclick with function values\r\n if (key in el && nativeOnRE.test(key) && isFunction(value)) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n // these are enumerated attrs, however their corresponding DOM properties\r\n // are actually booleans - this leads to setting it with a string \"false\"\r\n // value leading it to be coerced to `true`, so we need to always treat\r\n // them as attributes.\r\n // Note that `contentEditable` doesn't have this problem: its DOM\r\n // property is also enumerated string values.\r\n if (key === 'spellcheck' || key === 'draggable' || key === 'translate') {\r\n return false;\r\n }\r\n // #1787, #2840 form property on form elements is readonly and must be set as\r\n // attribute.\r\n if (key === 'form') {\r\n return false;\r\n }\r\n // #1526 <input list> must be set as attribute\r\n if (key === 'list' && el.tagName === 'INPUT') {\r\n return false;\r\n }\r\n // #2766 <textarea type> must be set as attribute\r\n if (key === 'type' && el.tagName === 'TEXTAREA') {\r\n return false;\r\n }\r\n // native onclick with string value, must be set as attribute\r\n if (nativeOnRE.test(key) && isString(value)) {\r\n return false;\r\n }\r\n return key in el;\r\n}\n\nfunction defineCustomElement(options, hydrate) {\r\n const Comp = defineComponent(options);\r\n class VueCustomElement extends VueElement {\r\n constructor(initialProps) {\r\n super(Comp, initialProps, hydrate);\r\n }\r\n }\r\n VueCustomElement.def = Comp;\r\n return VueCustomElement;\r\n}\r\nconst defineSSRCustomElement = ((options) => {\r\n // @ts-ignore\r\n return defineCustomElement(options, hydrate);\r\n});\r\nconst BaseClass = (typeof HTMLElement !== 'undefined' ? HTMLElement : class {\r\n});\r\nclass VueElement extends BaseClass {\r\n constructor(_def, _props = {}, hydrate) {\r\n super();\r\n this._def = _def;\r\n this._props = _props;\r\n /**\r\n * @internal\r\n */\r\n this._instance = null;\r\n this._connected = false;\r\n this._resolved = false;\r\n this._numberProps = null;\r\n if (this.shadowRoot && hydrate) {\r\n hydrate(this._createVNode(), this.shadowRoot);\r\n }\r\n else {\r\n if ((process.env.NODE_ENV !== 'production') && this.shadowRoot) {\r\n warn(`Custom element has pre-rendered declarative shadow root but is not ` +\r\n `defined as hydratable. Use \\`defineSSRCustomElement\\`.`);\r\n }\r\n this.attachShadow({ mode: 'open' });\r\n }\r\n }\r\n connectedCallback() {\r\n this._connected = true;\r\n if (!this._instance) {\r\n this._resolveDef();\r\n }\r\n }\r\n disconnectedCallback() {\r\n this._connected = false;\r\n nextTick(() => {\r\n if (!this._connected) {\r\n render(null, this.shadowRoot);\r\n this._instance = null;\r\n }\r\n });\r\n }\r\n /**\r\n * resolve inner component definition (handle possible async component)\r\n */\r\n _resolveDef() {\r\n if (this._resolved) {\r\n return;\r\n }\r\n this._resolved = true;\r\n // set initial attrs\r\n for (let i = 0; i < this.attributes.length; i++) {\r\n this._setAttr(this.attributes[i].name);\r\n }\r\n // watch future attr changes\r\n new MutationObserver(mutations => {\r\n for (const m of mutations) {\r\n this._setAttr(m.attributeName);\r\n }\r\n }).observe(this, { attributes: true });\r\n const resolve = (def) => {\r\n const { props, styles } = def;\r\n const hasOptions = !isArray(props);\r\n const rawKeys = props ? (hasOptions ? Object.keys(props) : props) : [];\r\n // cast Number-type props set before resolve\r\n let numberProps;\r\n if (hasOptions) {\r\n for (const key in this._props) {\r\n const opt = props[key];\r\n if (opt === Number || (opt && opt.type === Number)) {\r\n this._props[key] = toNumber(this._props[key]);\r\n (numberProps || (numberProps = Object.create(null)))[key] = true;\r\n }\r\n }\r\n }\r\n this._numberProps = numberProps;\r\n // check if there are props set pre-upgrade or connect\r\n for (const key of Object.keys(this)) {\r\n if (key[0] !== '_') {\r\n this._setProp(key, this[key], true, false);\r\n }\r\n }\r\n // defining getter/setters on prototype\r\n for (const key of rawKeys.map(camelize$1)) {\r\n Object.defineProperty(this, key, {\r\n get() {\r\n return this._getProp(key);\r\n },\r\n set(val) {\r\n this._setProp(key, val);\r\n }\r\n });\r\n }\r\n // apply CSS\r\n this._applyStyles(styles);\r\n // initial render\r\n this._update();\r\n };\r\n const asyncDef = this._def.__asyncLoader;\r\n if (asyncDef) {\r\n asyncDef().then(resolve);\r\n }\r\n else {\r\n resolve(this._def);\r\n }\r\n }\r\n _setAttr(key) {\r\n let value = this.getAttribute(key);\r\n if (this._numberProps && this._numberProps[key]) {\r\n value = toNumber(value);\r\n }\r\n this._setProp(camelize$1(key), value, false);\r\n }\r\n /**\r\n * @internal\r\n */\r\n _getProp(key) {\r\n return this._props[key];\r\n }\r\n /**\r\n * @internal\r\n */\r\n _setProp(key, val, shouldReflect = true, shouldUpdate = true) {\r\n if (val !== this._props[key]) {\r\n this._props[key] = val;\r\n if (shouldUpdate && this._instance) {\r\n this._update();\r\n }\r\n // reflect\r\n if (shouldReflect) {\r\n if (val === true) {\r\n this.setAttribute(hyphenate(key), '');\r\n }\r\n else if (typeof val === 'string' || typeof val === 'number') {\r\n this.setAttribute(hyphenate(key), val + '');\r\n }\r\n else if (!val) {\r\n this.removeAttribute(hyphenate(key));\r\n }\r\n }\r\n }\r\n }\r\n _update() {\r\n render(this._createVNode(), this.shadowRoot);\r\n }\r\n _createVNode() {\r\n const vnode = createVNode(this._def, extend({}, this._props));\r\n if (!this._instance) {\r\n vnode.ce = instance => {\r\n this._instance = instance;\r\n instance.isCE = true;\r\n // HMR\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n instance.ceReload = newStyles => {\r\n // always reset styles\r\n if (this._styles) {\r\n this._styles.forEach(s => this.shadowRoot.removeChild(s));\r\n this._styles.length = 0;\r\n }\r\n this._applyStyles(newStyles);\r\n // if this is an async component, ceReload is called from the inner\r\n // component so no need to reload the async wrapper\r\n if (!this._def.__asyncLoader) {\r\n // reload\r\n this._instance = null;\r\n this._update();\r\n }\r\n };\r\n }\r\n // intercept emit\r\n instance.emit = (event, ...args) => {\r\n this.dispatchEvent(new CustomEvent(event, {\r\n detail: args\r\n }));\r\n };\r\n // locate nearest Vue custom element parent for provide/inject\r\n let parent = this;\r\n while ((parent =\r\n parent && (parent.parentNode || parent.host))) {\r\n if (parent instanceof VueElement) {\r\n instance.parent = parent._instance;\r\n break;\r\n }\r\n }\r\n };\r\n }\r\n return vnode;\r\n }\r\n _applyStyles(styles) {\r\n if (styles) {\r\n styles.forEach(css => {\r\n const s = document.createElement('style');\r\n s.textContent = css;\r\n this.shadowRoot.appendChild(s);\r\n // record for HMR\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n (this._styles || (this._styles = [])).push(s);\r\n }\r\n });\r\n }\r\n }\r\n}\n\nfunction useCssModule(name = '$style') {\r\n /* istanbul ignore else */\r\n {\r\n const instance = getCurrentInstance();\r\n if (!instance) {\r\n (process.env.NODE_ENV !== 'production') && warn(`useCssModule must be called inside setup()`);\r\n return EMPTY_OBJ;\r\n }\r\n const modules = instance.type.__cssModules;\r\n if (!modules) {\r\n (process.env.NODE_ENV !== 'production') && warn(`Current instance does not have CSS modules injected.`);\r\n return EMPTY_OBJ;\r\n }\r\n const mod = modules[name];\r\n if (!mod) {\r\n (process.env.NODE_ENV !== 'production') &&\r\n warn(`Current instance does not have CSS module named \"${name}\".`);\r\n return EMPTY_OBJ;\r\n }\r\n return mod;\r\n }\r\n}\n\n/**\r\n * Runtime helper for SFC's CSS variable injection feature.\r\n * @private\r\n */\r\nfunction useCssVars(getter) {\r\n const instance = getCurrentInstance();\r\n /* istanbul ignore next */\r\n if (!instance) {\r\n (process.env.NODE_ENV !== 'production') &&\r\n warn(`useCssVars is called without current active component instance.`);\r\n return;\r\n }\r\n const setVars = () => setVarsOnVNode(instance.subTree, getter(instance.proxy));\r\n watchPostEffect(setVars);\r\n onMounted(() => {\r\n const ob = new MutationObserver(setVars);\r\n ob.observe(instance.subTree.el.parentNode, { childList: true });\r\n onUnmounted(() => ob.disconnect());\r\n });\r\n}\r\nfunction setVarsOnVNode(vnode, vars) {\r\n if (vnode.shapeFlag & 128 /* SUSPENSE */) {\r\n const suspense = vnode.suspense;\r\n vnode = suspense.activeBranch;\r\n if (suspense.pendingBranch && !suspense.isHydrating) {\r\n suspense.effects.push(() => {\r\n setVarsOnVNode(suspense.activeBranch, vars);\r\n });\r\n }\r\n }\r\n // drill down HOCs until it's a non-component vnode\r\n while (vnode.component) {\r\n vnode = vnode.component.subTree;\r\n }\r\n if (vnode.shapeFlag & 1 /* ELEMENT */ && vnode.el) {\r\n setVarsOnNode(vnode.el, vars);\r\n }\r\n else if (vnode.type === Fragment) {\r\n vnode.children.forEach(c => setVarsOnVNode(c, vars));\r\n }\r\n else if (vnode.type === Static) {\r\n let { el, anchor } = vnode;\r\n while (el) {\r\n setVarsOnNode(el, vars);\r\n if (el === anchor)\r\n break;\r\n el = el.nextSibling;\r\n }\r\n }\r\n}\r\nfunction setVarsOnNode(el, vars) {\r\n if (el.nodeType === 1) {\r\n const style = el.style;\r\n for (const key in vars) {\r\n style.setProperty(`--${key}`, vars[key]);\r\n }\r\n }\r\n}\n\nconst TRANSITION = 'transition';\r\nconst ANIMATION = 'animation';\r\n// DOM Transition is a higher-order-component based on the platform-agnostic\r\n// base Transition component, with DOM-specific logic.\r\nconst Transition = (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots);\r\nTransition.displayName = 'Transition';\r\nconst DOMTransitionPropsValidators = {\r\n name: String,\r\n type: String,\r\n css: {\r\n type: Boolean,\r\n default: true\r\n },\r\n duration: [String, Number, Object],\r\n enterFromClass: String,\r\n enterActiveClass: String,\r\n enterToClass: String,\r\n appearFromClass: String,\r\n appearActiveClass: String,\r\n appearToClass: String,\r\n leaveFromClass: String,\r\n leaveActiveClass: String,\r\n leaveToClass: String\r\n};\r\nconst TransitionPropsValidators = (Transition.props =\r\n /*#__PURE__*/ extend({}, BaseTransition.props, DOMTransitionPropsValidators));\r\n/**\r\n * #3227 Incoming hooks may be merged into arrays when wrapping Transition\r\n * with custom HOCs.\r\n */\r\nconst callHook = (hook, args = []) => {\r\n if (isArray(hook)) {\r\n hook.forEach(h => h(...args));\r\n }\r\n else if (hook) {\r\n hook(...args);\r\n }\r\n};\r\n/**\r\n * Check if a hook expects a callback (2nd arg), which means the user\r\n * intends to explicitly control the end of the transition.\r\n */\r\nconst hasExplicitCallback = (hook) => {\r\n return hook\r\n ? isArray(hook)\r\n ? hook.some(h => h.length > 1)\r\n : hook.length > 1\r\n : false;\r\n};\r\nfunction resolveTransitionProps(rawProps) {\r\n const baseProps = {};\r\n for (const key in rawProps) {\r\n if (!(key in DOMTransitionPropsValidators)) {\r\n baseProps[key] = rawProps[key];\r\n }\r\n }\r\n if (rawProps.css === false) {\r\n return baseProps;\r\n }\r\n const { name = 'v', type, duration, enterFromClass = `${name}-enter-from`, enterActiveClass = `${name}-enter-active`, enterToClass = `${name}-enter-to`, appearFromClass = enterFromClass, appearActiveClass = enterActiveClass, appearToClass = enterToClass, leaveFromClass = `${name}-leave-from`, leaveActiveClass = `${name}-leave-active`, leaveToClass = `${name}-leave-to` } = rawProps;\r\n const durations = normalizeDuration(duration);\r\n const enterDuration = durations && durations[0];\r\n const leaveDuration = durations && durations[1];\r\n const { onBeforeEnter, onEnter, onEnterCancelled, onLeave, onLeaveCancelled, onBeforeAppear = onBeforeEnter, onAppear = onEnter, onAppearCancelled = onEnterCancelled } = baseProps;\r\n const finishEnter = (el, isAppear, done) => {\r\n removeTransitionClass(el, isAppear ? appearToClass : enterToClass);\r\n removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);\r\n done && done();\r\n };\r\n let isLeaving = false;\r\n const finishLeave = (el, done) => {\r\n isLeaving = false;\r\n removeTransitionClass(el, leaveFromClass);\r\n removeTransitionClass(el, leaveToClass);\r\n removeTransitionClass(el, leaveActiveClass);\r\n done && done();\r\n };\r\n const makeEnterHook = (isAppear) => {\r\n return (el, done) => {\r\n const hook = isAppear ? onAppear : onEnter;\r\n const resolve = () => finishEnter(el, isAppear, done);\r\n callHook(hook, [el, resolve]);\r\n nextFrame(() => {\r\n removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass);\r\n addTransitionClass(el, isAppear ? appearToClass : enterToClass);\r\n if (!hasExplicitCallback(hook)) {\r\n whenTransitionEnds(el, type, enterDuration, resolve);\r\n }\r\n });\r\n };\r\n };\r\n return extend(baseProps, {\r\n onBeforeEnter(el) {\r\n callHook(onBeforeEnter, [el]);\r\n addTransitionClass(el, enterFromClass);\r\n addTransitionClass(el, enterActiveClass);\r\n },\r\n onBeforeAppear(el) {\r\n callHook(onBeforeAppear, [el]);\r\n addTransitionClass(el, appearFromClass);\r\n addTransitionClass(el, appearActiveClass);\r\n },\r\n onEnter: makeEnterHook(false),\r\n onAppear: makeEnterHook(true),\r\n onLeave(el, done) {\r\n isLeaving = true;\r\n const resolve = () => finishLeave(el, done);\r\n addTransitionClass(el, leaveFromClass);\r\n // force reflow so *-leave-from classes immediately take effect (#2593)\r\n forceReflow();\r\n addTransitionClass(el, leaveActiveClass);\r\n nextFrame(() => {\r\n if (!isLeaving) {\r\n // cancelled\r\n return;\r\n }\r\n removeTransitionClass(el, leaveFromClass);\r\n addTransitionClass(el, leaveToClass);\r\n if (!hasExplicitCallback(onLeave)) {\r\n whenTransitionEnds(el, type, leaveDuration, resolve);\r\n }\r\n });\r\n callHook(onLeave, [el, resolve]);\r\n },\r\n onEnterCancelled(el) {\r\n finishEnter(el, false);\r\n callHook(onEnterCancelled, [el]);\r\n },\r\n onAppearCancelled(el) {\r\n finishEnter(el, true);\r\n callHook(onAppearCancelled, [el]);\r\n },\r\n onLeaveCancelled(el) {\r\n finishLeave(el);\r\n callHook(onLeaveCancelled, [el]);\r\n }\r\n });\r\n}\r\nfunction normalizeDuration(duration) {\r\n if (duration == null) {\r\n return null;\r\n }\r\n else if (isObject(duration)) {\r\n return [NumberOf(duration.enter), NumberOf(duration.leave)];\r\n }\r\n else {\r\n const n = NumberOf(duration);\r\n return [n, n];\r\n }\r\n}\r\nfunction NumberOf(val) {\r\n const res = toNumber(val);\r\n if ((process.env.NODE_ENV !== 'production'))\r\n validateDuration(res);\r\n return res;\r\n}\r\nfunction validateDuration(val) {\r\n if (typeof val !== 'number') {\r\n warn(`<transition> explicit duration is not a valid number - ` +\r\n `got ${JSON.stringify(val)}.`);\r\n }\r\n else if (isNaN(val)) {\r\n warn(`<transition> explicit duration is NaN - ` +\r\n 'the duration expression might be incorrect.');\r\n }\r\n}\r\nfunction addTransitionClass(el, cls) {\r\n cls.split(/\\s+/).forEach(c => c && el.classList.add(c));\r\n (el._vtc ||\r\n (el._vtc = new Set())).add(cls);\r\n}\r\nfunction removeTransitionClass(el, cls) {\r\n cls.split(/\\s+/).forEach(c => c && el.classList.remove(c));\r\n const { _vtc } = el;\r\n if (_vtc) {\r\n _vtc.delete(cls);\r\n if (!_vtc.size) {\r\n el._vtc = undefined;\r\n }\r\n }\r\n}\r\nfunction nextFrame(cb) {\r\n requestAnimationFrame(() => {\r\n requestAnimationFrame(cb);\r\n });\r\n}\r\nlet endId = 0;\r\nfunction whenTransitionEnds(el, expectedType, explicitTimeout, resolve) {\r\n const id = (el._endId = ++endId);\r\n const resolveIfNotStale = () => {\r\n if (id === el._endId) {\r\n resolve();\r\n }\r\n };\r\n if (explicitTimeout) {\r\n return setTimeout(resolveIfNotStale, explicitTimeout);\r\n }\r\n const { type, timeout, propCount } = getTransitionInfo(el, expectedType);\r\n if (!type) {\r\n return resolve();\r\n }\r\n const endEvent = type + 'end';\r\n let ended = 0;\r\n const end = () => {\r\n el.removeEventListener(endEvent, onEnd);\r\n resolveIfNotStale();\r\n };\r\n const onEnd = (e) => {\r\n if (e.target === el && ++ended >= propCount) {\r\n end();\r\n }\r\n };\r\n setTimeout(() => {\r\n if (ended < propCount) {\r\n end();\r\n }\r\n }, timeout + 1);\r\n el.addEventListener(endEvent, onEnd);\r\n}\r\nfunction getTransitionInfo(el, expectedType) {\r\n const styles = window.getComputedStyle(el);\r\n // JSDOM may return undefined for transition properties\r\n const getStyleProperties = (key) => (styles[key] || '').split(', ');\r\n const transitionDelays = getStyleProperties(TRANSITION + 'Delay');\r\n const transitionDurations = getStyleProperties(TRANSITION + 'Duration');\r\n const transitionTimeout = getTimeout(transitionDelays, transitionDurations);\r\n const animationDelays = getStyleProperties(ANIMATION + 'Delay');\r\n const animationDurations = getStyleProperties(ANIMATION + 'Duration');\r\n const animationTimeout = getTimeout(animationDelays, animationDurations);\r\n let type = null;\r\n let timeout = 0;\r\n let propCount = 0;\r\n /* istanbul ignore if */\r\n if (expectedType === TRANSITION) {\r\n if (transitionTimeout > 0) {\r\n type = TRANSITION;\r\n timeout = transitionTimeout;\r\n propCount = transitionDurations.length;\r\n }\r\n }\r\n else if (expectedType === ANIMATION) {\r\n if (animationTimeout > 0) {\r\n type = ANIMATION;\r\n timeout = animationTimeout;\r\n propCount = animationDurations.length;\r\n }\r\n }\r\n else {\r\n timeout = Math.max(transitionTimeout, animationTimeout);\r\n type =\r\n timeout > 0\r\n ? transitionTimeout > animationTimeout\r\n ? TRANSITION\r\n : ANIMATION\r\n : null;\r\n propCount = type\r\n ? type === TRANSITION\r\n ? transitionDurations.length\r\n : animationDurations.length\r\n : 0;\r\n }\r\n const hasTransform = type === TRANSITION &&\r\n /\\b(transform|all)(,|$)/.test(styles[TRANSITION + 'Property']);\r\n return {\r\n type,\r\n timeout,\r\n propCount,\r\n hasTransform\r\n };\r\n}\r\nfunction getTimeout(delays, durations) {\r\n while (delays.length < durations.length) {\r\n delays = delays.concat(delays);\r\n }\r\n return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i])));\r\n}\r\n// Old versions of Chromium (below 61.0.3163.100) formats floating pointer\r\n// numbers in a locale-dependent way, using a comma instead of a dot.\r\n// If comma is not replaced with a dot, the input will be rounded down\r\n// (i.e. acting as a floor function) causing unexpected behaviors\r\nfunction toMs(s) {\r\n return Number(s.slice(0, -1).replace(',', '.')) * 1000;\r\n}\r\n// synchronously force layout to put elements into a certain state\r\nfunction forceReflow() {\r\n return document.body.offsetHeight;\r\n}\n\nconst positionMap = new WeakMap();\r\nconst newPositionMap = new WeakMap();\r\nconst TransitionGroupImpl = {\r\n name: 'TransitionGroup',\r\n props: /*#__PURE__*/ extend({}, TransitionPropsValidators, {\r\n tag: String,\r\n moveClass: String\r\n }),\r\n setup(props, { slots }) {\r\n const instance = getCurrentInstance();\r\n const state = useTransitionState();\r\n let prevChildren;\r\n let children;\r\n onUpdated(() => {\r\n // children is guaranteed to exist after initial render\r\n if (!prevChildren.length) {\r\n return;\r\n }\r\n const moveClass = props.moveClass || `${props.name || 'v'}-move`;\r\n if (!hasCSSTransform(prevChildren[0].el, instance.vnode.el, moveClass)) {\r\n return;\r\n }\r\n // we divide the work into three loops to avoid mixing DOM reads and writes\r\n // in each iteration - which helps prevent layout thrashing.\r\n prevChildren.forEach(callPendingCbs);\r\n prevChildren.forEach(recordPosition);\r\n const movedChildren = prevChildren.filter(applyTranslation);\r\n // force reflow to put everything in position\r\n forceReflow();\r\n movedChildren.forEach(c => {\r\n const el = c.el;\r\n const style = el.style;\r\n addTransitionClass(el, moveClass);\r\n style.transform = style.webkitTransform = style.transitionDuration = '';\r\n const cb = (el._moveCb = (e) => {\r\n if (e && e.target !== el) {\r\n return;\r\n }\r\n if (!e || /transform$/.test(e.propertyName)) {\r\n el.removeEventListener('transitionend', cb);\r\n el._moveCb = null;\r\n removeTransitionClass(el, moveClass);\r\n }\r\n });\r\n el.addEventListener('transitionend', cb);\r\n });\r\n });\r\n return () => {\r\n const rawProps = toRaw(props);\r\n const cssTransitionProps = resolveTransitionProps(rawProps);\r\n let tag = rawProps.tag || Fragment;\r\n prevChildren = children;\r\n children = slots.default ? getTransitionRawChildren(slots.default()) : [];\r\n for (let i = 0; i < children.length; i++) {\r\n const child = children[i];\r\n if (child.key != null) {\r\n setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance));\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`<TransitionGroup> children must be keyed.`);\r\n }\r\n }\r\n if (prevChildren) {\r\n for (let i = 0; i < prevChildren.length; i++) {\r\n const child = prevChildren[i];\r\n setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance));\r\n positionMap.set(child, child.el.getBoundingClientRect());\r\n }\r\n }\r\n return createVNode(tag, null, children);\r\n };\r\n }\r\n};\r\nconst TransitionGroup = TransitionGroupImpl;\r\nfunction callPendingCbs(c) {\r\n const el = c.el;\r\n if (el._moveCb) {\r\n el._moveCb();\r\n }\r\n if (el._enterCb) {\r\n el._enterCb();\r\n }\r\n}\r\nfunction recordPosition(c) {\r\n newPositionMap.set(c, c.el.getBoundingClientRect());\r\n}\r\nfunction applyTranslation(c) {\r\n const oldPos = positionMap.get(c);\r\n const newPos = newPositionMap.get(c);\r\n const dx = oldPos.left - newPos.left;\r\n const dy = oldPos.top - newPos.top;\r\n if (dx || dy) {\r\n const s = c.el.style;\r\n s.transform = s.webkitTransform = `translate(${dx}px,${dy}px)`;\r\n s.transitionDuration = '0s';\r\n return c;\r\n }\r\n}\r\nfunction hasCSSTransform(el, root, moveClass) {\r\n // Detect whether an element with the move class applied has\r\n // CSS transitions. Since the element may be inside an entering\r\n // transition at this very moment, we make a clone of it and remove\r\n // all other transition classes applied to ensure only the move class\r\n // is applied.\r\n const clone = el.cloneNode();\r\n if (el._vtc) {\r\n el._vtc.forEach(cls => {\r\n cls.split(/\\s+/).forEach(c => c && clone.classList.remove(c));\r\n });\r\n }\r\n moveClass.split(/\\s+/).forEach(c => c && clone.classList.add(c));\r\n clone.style.display = 'none';\r\n const container = (root.nodeType === 1 ? root : root.parentNode);\r\n container.appendChild(clone);\r\n const { hasTransform } = getTransitionInfo(clone);\r\n container.removeChild(clone);\r\n return hasTransform;\r\n}\n\nconst getModelAssigner = (vnode) => {\r\n const fn = vnode.props['onUpdate:modelValue'] ||\r\n (false );\r\n return isArray(fn) ? value => invokeArrayFns(fn, value) : fn;\r\n};\r\nfunction onCompositionStart(e) {\r\n e.target.composing = true;\r\n}\r\nfunction onCompositionEnd(e) {\r\n const target = e.target;\r\n if (target.composing) {\r\n target.composing = false;\r\n target.dispatchEvent(new Event('input'));\r\n }\r\n}\r\n// We are exporting the v-model runtime directly as vnode hooks so that it can\r\n// be tree-shaken in case v-model is never used.\r\nconst vModelText = {\r\n created(el, { modifiers: { lazy, trim, number } }, vnode) {\r\n el._assign = getModelAssigner(vnode);\r\n const castToNumber = number || (vnode.props && vnode.props.type === 'number');\r\n addEventListener(el, lazy ? 'change' : 'input', e => {\r\n if (e.target.composing)\r\n return;\r\n let domValue = el.value;\r\n if (trim) {\r\n domValue = domValue.trim();\r\n }\r\n if (castToNumber) {\r\n domValue = toNumber(domValue);\r\n }\r\n el._assign(domValue);\r\n });\r\n if (trim) {\r\n addEventListener(el, 'change', () => {\r\n el.value = el.value.trim();\r\n });\r\n }\r\n if (!lazy) {\r\n addEventListener(el, 'compositionstart', onCompositionStart);\r\n addEventListener(el, 'compositionend', onCompositionEnd);\r\n // Safari < 10.2 & UIWebView doesn't fire compositionend when\r\n // switching focus before confirming composition choice\r\n // this also fixes the issue where some browsers e.g. iOS Chrome\r\n // fires \"change\" instead of \"input\" on autocomplete.\r\n addEventListener(el, 'change', onCompositionEnd);\r\n }\r\n },\r\n // set value on mounted so it's after min/max for type=\"range\"\r\n mounted(el, { value }) {\r\n el.value = value == null ? '' : value;\r\n },\r\n beforeUpdate(el, { value, modifiers: { lazy, trim, number } }, vnode) {\r\n el._assign = getModelAssigner(vnode);\r\n // avoid clearing unresolved text. #2302\r\n if (el.composing)\r\n return;\r\n if (document.activeElement === el && el.type !== 'range') {\r\n if (lazy) {\r\n return;\r\n }\r\n if (trim && el.value.trim() === value) {\r\n return;\r\n }\r\n if ((number || el.type === 'number') && toNumber(el.value) === value) {\r\n return;\r\n }\r\n }\r\n const newValue = value == null ? '' : value;\r\n if (el.value !== newValue) {\r\n el.value = newValue;\r\n }\r\n }\r\n};\r\nconst vModelCheckbox = {\r\n // #4096 array checkboxes need to be deep traversed\r\n deep: true,\r\n created(el, _, vnode) {\r\n el._assign = getModelAssigner(vnode);\r\n addEventListener(el, 'change', () => {\r\n const modelValue = el._modelValue;\r\n const elementValue = getValue(el);\r\n const checked = el.checked;\r\n const assign = el._assign;\r\n if (isArray(modelValue)) {\r\n const index = looseIndexOf(modelValue, elementValue);\r\n const found = index !== -1;\r\n if (checked && !found) {\r\n assign(modelValue.concat(elementValue));\r\n }\r\n else if (!checked && found) {\r\n const filtered = [...modelValue];\r\n filtered.splice(index, 1);\r\n assign(filtered);\r\n }\r\n }\r\n else if (isSet(modelValue)) {\r\n const cloned = new Set(modelValue);\r\n if (checked) {\r\n cloned.add(elementValue);\r\n }\r\n else {\r\n cloned.delete(elementValue);\r\n }\r\n assign(cloned);\r\n }\r\n else {\r\n assign(getCheckboxValue(el, checked));\r\n }\r\n });\r\n },\r\n // set initial checked on mount to wait for true-value/false-value\r\n mounted: setChecked,\r\n beforeUpdate(el, binding, vnode) {\r\n el._assign = getModelAssigner(vnode);\r\n setChecked(el, binding, vnode);\r\n }\r\n};\r\nfunction setChecked(el, { value, oldValue }, vnode) {\r\n el._modelValue = value;\r\n if (isArray(value)) {\r\n el.checked = looseIndexOf(value, vnode.props.value) > -1;\r\n }\r\n else if (isSet(value)) {\r\n el.checked = value.has(vnode.props.value);\r\n }\r\n else if (value !== oldValue) {\r\n el.checked = looseEqual(value, getCheckboxValue(el, true));\r\n }\r\n}\r\nconst vModelRadio = {\r\n created(el, { value }, vnode) {\r\n el.checked = looseEqual(value, vnode.props.value);\r\n el._assign = getModelAssigner(vnode);\r\n addEventListener(el, 'change', () => {\r\n el._assign(getValue(el));\r\n });\r\n },\r\n beforeUpdate(el, { value, oldValue }, vnode) {\r\n el._assign = getModelAssigner(vnode);\r\n if (value !== oldValue) {\r\n el.checked = looseEqual(value, vnode.props.value);\r\n }\r\n }\r\n};\r\nconst vModelSelect = {\r\n // <select multiple> value need to be deep traversed\r\n deep: true,\r\n created(el, { value, modifiers: { number } }, vnode) {\r\n const isSetModel = isSet(value);\r\n addEventListener(el, 'change', () => {\r\n const selectedVal = Array.prototype.filter\r\n .call(el.options, (o) => o.selected)\r\n .map((o) => number ? toNumber(getValue(o)) : getValue(o));\r\n el._assign(el.multiple\r\n ? isSetModel\r\n ? new Set(selectedVal)\r\n : selectedVal\r\n : selectedVal[0]);\r\n });\r\n el._assign = getModelAssigner(vnode);\r\n },\r\n // set value in mounted & updated because <select> relies on its children\r\n // <option>s.\r\n mounted(el, { value }) {\r\n setSelected(el, value);\r\n },\r\n beforeUpdate(el, _binding, vnode) {\r\n el._assign = getModelAssigner(vnode);\r\n },\r\n updated(el, { value }) {\r\n setSelected(el, value);\r\n }\r\n};\r\nfunction setSelected(el, value) {\r\n const isMultiple = el.multiple;\r\n if (isMultiple && !isArray(value) && !isSet(value)) {\r\n (process.env.NODE_ENV !== 'production') &&\r\n warn(`<select multiple v-model> expects an Array or Set value for its binding, ` +\r\n `but got ${Object.prototype.toString.call(value).slice(8, -1)}.`);\r\n return;\r\n }\r\n for (let i = 0, l = el.options.length; i < l; i++) {\r\n const option = el.options[i];\r\n const optionValue = getValue(option);\r\n if (isMultiple) {\r\n if (isArray(value)) {\r\n option.selected = looseIndexOf(value, optionValue) > -1;\r\n }\r\n else {\r\n option.selected = value.has(optionValue);\r\n }\r\n }\r\n else {\r\n if (looseEqual(getValue(option), value)) {\r\n if (el.selectedIndex !== i)\r\n el.selectedIndex = i;\r\n return;\r\n }\r\n }\r\n }\r\n if (!isMultiple && el.selectedIndex !== -1) {\r\n el.selectedIndex = -1;\r\n }\r\n}\r\n// retrieve raw value set via :value bindings\r\nfunction getValue(el) {\r\n return '_value' in el ? el._value : el.value;\r\n}\r\n// retrieve raw value for true-value and false-value set via :true-value or :false-value bindings\r\nfunction getCheckboxValue(el, checked) {\r\n const key = checked ? '_trueValue' : '_falseValue';\r\n return key in el ? el[key] : checked;\r\n}\r\nconst vModelDynamic = {\r\n created(el, binding, vnode) {\r\n callModelHook(el, binding, vnode, null, 'created');\r\n },\r\n mounted(el, binding, vnode) {\r\n callModelHook(el, binding, vnode, null, 'mounted');\r\n },\r\n beforeUpdate(el, binding, vnode, prevVNode) {\r\n callModelHook(el, binding, vnode, prevVNode, 'beforeUpdate');\r\n },\r\n updated(el, binding, vnode, prevVNode) {\r\n callModelHook(el, binding, vnode, prevVNode, 'updated');\r\n }\r\n};\r\nfunction resolveDynamicModel(tagName, type) {\r\n switch (tagName) {\r\n case 'SELECT':\r\n return vModelSelect;\r\n case 'TEXTAREA':\r\n return vModelText;\r\n default:\r\n switch (type) {\r\n case 'checkbox':\r\n return vModelCheckbox;\r\n case 'radio':\r\n return vModelRadio;\r\n default:\r\n return vModelText;\r\n }\r\n }\r\n}\r\nfunction callModelHook(el, binding, vnode, prevVNode, hook) {\r\n const modelToUse = resolveDynamicModel(el.tagName, vnode.props && vnode.props.type);\r\n const fn = modelToUse[hook];\r\n fn && fn(el, binding, vnode, prevVNode);\r\n}\r\n// SSR vnode transforms, only used when user includes client-oriented render\r\n// function in SSR\r\nfunction initVModelForSSR() {\r\n vModelText.getSSRProps = ({ value }) => ({ value });\r\n vModelRadio.getSSRProps = ({ value }, vnode) => {\r\n if (vnode.props && looseEqual(vnode.props.value, value)) {\r\n return { checked: true };\r\n }\r\n };\r\n vModelCheckbox.getSSRProps = ({ value }, vnode) => {\r\n if (isArray(value)) {\r\n if (vnode.props && looseIndexOf(value, vnode.props.value) > -1) {\r\n return { checked: true };\r\n }\r\n }\r\n else if (isSet(value)) {\r\n if (vnode.props && value.has(vnode.props.value)) {\r\n return { checked: true };\r\n }\r\n }\r\n else if (value) {\r\n return { checked: true };\r\n }\r\n };\r\n vModelDynamic.getSSRProps = (binding, vnode) => {\r\n if (typeof vnode.type !== 'string') {\r\n return;\r\n }\r\n const modelToUse = resolveDynamicModel(\r\n // resolveDynamicModel expects an uppercase tag name, but vnode.type is lowercase\r\n vnode.type.toUpperCase(), vnode.props && vnode.props.type);\r\n if (modelToUse.getSSRProps) {\r\n return modelToUse.getSSRProps(binding, vnode);\r\n }\r\n };\r\n}\n\nconst systemModifiers = ['ctrl', 'shift', 'alt', 'meta'];\r\nconst modifierGuards = {\r\n stop: e => e.stopPropagation(),\r\n prevent: e => e.preventDefault(),\r\n self: e => e.target !== e.currentTarget,\r\n ctrl: e => !e.ctrlKey,\r\n shift: e => !e.shiftKey,\r\n alt: e => !e.altKey,\r\n meta: e => !e.metaKey,\r\n left: e => 'button' in e && e.button !== 0,\r\n middle: e => 'button' in e && e.button !== 1,\r\n right: e => 'button' in e && e.button !== 2,\r\n exact: (e, modifiers) => systemModifiers.some(m => e[`${m}Key`] && !modifiers.includes(m))\r\n};\r\n/**\r\n * @private\r\n */\r\nconst withModifiers = (fn, modifiers) => {\r\n return (event, ...args) => {\r\n for (let i = 0; i < modifiers.length; i++) {\r\n const guard = modifierGuards[modifiers[i]];\r\n if (guard && guard(event, modifiers))\r\n return;\r\n }\r\n return fn(event, ...args);\r\n };\r\n};\r\n// Kept for 2.x compat.\r\n// Note: IE11 compat for `spacebar` and `del` is removed for now.\r\nconst keyNames = {\r\n esc: 'escape',\r\n space: ' ',\r\n up: 'arrow-up',\r\n left: 'arrow-left',\r\n right: 'arrow-right',\r\n down: 'arrow-down',\r\n delete: 'backspace'\r\n};\r\n/**\r\n * @private\r\n */\r\nconst withKeys = (fn, modifiers) => {\r\n return (event) => {\r\n if (!('key' in event)) {\r\n return;\r\n }\r\n const eventKey = hyphenate(event.key);\r\n if (modifiers.some(k => k === eventKey || keyNames[k] === eventKey)) {\r\n return fn(event);\r\n }\r\n };\r\n};\n\nconst vShow = {\r\n beforeMount(el, { value }, { transition }) {\r\n el._vod = el.style.display === 'none' ? '' : el.style.display;\r\n if (transition && value) {\r\n transition.beforeEnter(el);\r\n }\r\n else {\r\n setDisplay(el, value);\r\n }\r\n },\r\n mounted(el, { value }, { transition }) {\r\n if (transition && value) {\r\n transition.enter(el);\r\n }\r\n },\r\n updated(el, { value, oldValue }, { transition }) {\r\n if (!value === !oldValue)\r\n return;\r\n if (transition) {\r\n if (value) {\r\n transition.beforeEnter(el);\r\n setDisplay(el, true);\r\n transition.enter(el);\r\n }\r\n else {\r\n transition.leave(el, () => {\r\n setDisplay(el, false);\r\n });\r\n }\r\n }\r\n else {\r\n setDisplay(el, value);\r\n }\r\n },\r\n beforeUnmount(el, { value }) {\r\n setDisplay(el, value);\r\n }\r\n};\r\nfunction setDisplay(el, value) {\r\n el.style.display = value ? el._vod : 'none';\r\n}\r\n// SSR vnode transforms, only used when user includes client-oriented render\r\n// function in SSR\r\nfunction initVShowForSSR() {\r\n vShow.getSSRProps = ({ value }) => {\r\n if (!value) {\r\n return { style: { display: 'none' } };\r\n }\r\n };\r\n}\n\nconst rendererOptions = /*#__PURE__*/ extend({ patchProp }, nodeOps);\r\n// lazy create the renderer - this makes core renderer logic tree-shakable\r\n// in case the user only imports reactivity utilities from Vue.\r\nlet renderer;\r\nlet enabledHydration = false;\r\nfunction ensureRenderer() {\r\n return (renderer ||\r\n (renderer = createRenderer(rendererOptions)));\r\n}\r\nfunction ensureHydrationRenderer() {\r\n renderer = enabledHydration\r\n ? renderer\r\n : createHydrationRenderer(rendererOptions);\r\n enabledHydration = true;\r\n return renderer;\r\n}\r\n// use explicit type casts here to avoid import() calls in rolled-up d.ts\r\nconst render = ((...args) => {\r\n ensureRenderer().render(...args);\r\n});\r\nconst hydrate = ((...args) => {\r\n ensureHydrationRenderer().hydrate(...args);\r\n});\r\nconst createApp = ((...args) => {\r\n const app = ensureRenderer().createApp(...args);\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n injectNativeTagCheck(app);\r\n injectCompilerOptionsCheck(app);\r\n }\r\n const { mount } = app;\r\n app.mount = (containerOrSelector) => {\r\n const container = normalizeContainer(containerOrSelector);\r\n if (!container)\r\n return;\r\n const component = app._component;\r\n if (!isFunction(component) && !component.render && !component.template) {\r\n // __UNSAFE__\r\n // Reason: potential execution of JS expressions in in-DOM template.\r\n // The user must make sure the in-DOM template is trusted. If it's\r\n // rendered by the server, the template should not contain any user data.\r\n component.template = container.innerHTML;\r\n }\r\n // clear content before mounting\r\n container.innerHTML = '';\r\n const proxy = mount(container, false, container instanceof SVGElement);\r\n if (container instanceof Element) {\r\n container.removeAttribute('v-cloak');\r\n container.setAttribute('data-v-app', '');\r\n }\r\n return proxy;\r\n };\r\n return app;\r\n});\r\nconst createSSRApp = ((...args) => {\r\n const app = ensureHydrationRenderer().createApp(...args);\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n injectNativeTagCheck(app);\r\n injectCompilerOptionsCheck(app);\r\n }\r\n const { mount } = app;\r\n app.mount = (containerOrSelector) => {\r\n const container = normalizeContainer(containerOrSelector);\r\n if (container) {\r\n return mount(container, true, container instanceof SVGElement);\r\n }\r\n };\r\n return app;\r\n});\r\nfunction injectNativeTagCheck(app) {\r\n // Inject `isNativeTag`\r\n // this is used for component name validation (dev only)\r\n Object.defineProperty(app.config, 'isNativeTag', {\r\n value: (tag) => isHTMLTag(tag) || isSVGTag(tag),\r\n writable: false\r\n });\r\n}\r\n// dev only\r\nfunction injectCompilerOptionsCheck(app) {\r\n if (isRuntimeOnly()) {\r\n const isCustomElement = app.config.isCustomElement;\r\n Object.defineProperty(app.config, 'isCustomElement', {\r\n get() {\r\n return isCustomElement;\r\n },\r\n set() {\r\n warn(`The \\`isCustomElement\\` config option is deprecated. Use ` +\r\n `\\`compilerOptions.isCustomElement\\` instead.`);\r\n }\r\n });\r\n const compilerOptions = app.config.compilerOptions;\r\n const msg = `The \\`compilerOptions\\` config option is only respected when using ` +\r\n `a build of Vue.js that includes the runtime compiler (aka \"full build\"). ` +\r\n `Since you are using the runtime-only build, \\`compilerOptions\\` ` +\r\n `must be passed to \\`@vue/compiler-dom\\` in the build setup instead.\\n` +\r\n `- For vue-loader: pass it via vue-loader's \\`compilerOptions\\` loader option.\\n` +\r\n `- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader\\n` +\r\n `- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-dom`;\r\n Object.defineProperty(app.config, 'compilerOptions', {\r\n get() {\r\n warn(msg);\r\n return compilerOptions;\r\n },\r\n set() {\r\n warn(msg);\r\n }\r\n });\r\n }\r\n}\r\nfunction normalizeContainer(container) {\r\n if (isString(container)) {\r\n const res = document.querySelector(container);\r\n if ((process.env.NODE_ENV !== 'production') && !res) {\r\n warn(`Failed to mount app: mount target selector \"${container}\" returned null.`);\r\n }\r\n return res;\r\n }\r\n if ((process.env.NODE_ENV !== 'production') &&\r\n window.ShadowRoot &&\r\n container instanceof window.ShadowRoot &&\r\n container.mode === 'closed') {\r\n warn(`mounting on a ShadowRoot with \\`{mode: \"closed\"}\\` may lead to unpredictable bugs`);\r\n }\r\n return container;\r\n}\r\nlet ssrDirectiveInitialized = false;\r\n/**\r\n * @internal\r\n */\r\nconst initDirectivesForSSR = () => {\r\n if (!ssrDirectiveInitialized) {\r\n ssrDirectiveInitialized = true;\r\n initVModelForSSR();\r\n initVShowForSSR();\r\n }\r\n }\r\n ;\n\nexport { Transition, TransitionGroup, VueElement, createApp, createSSRApp, defineCustomElement, defineSSRCustomElement, hydrate, initDirectivesForSSR, render, useCssModule, useCssVars, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, withKeys, withModifiers };\n","export function getDevtoolsGlobalHook() {\n return getTarget().__VUE_DEVTOOLS_GLOBAL_HOOK__;\n}\nexport function getTarget() {\n // @ts-ignore\n return (typeof navigator !== 'undefined' && typeof window !== 'undefined')\n ? window\n : typeof global !== 'undefined'\n ? global\n : {};\n}\nexport const isProxyAvailable = typeof Proxy === 'function';\n","export const HOOK_SETUP = 'devtools-plugin:setup';\nexport const HOOK_PLUGIN_SETTINGS_SET = 'plugin:settings:set';\n","let supported;\nlet perf;\nexport function isPerformanceSupported() {\n var _a;\n if (supported !== undefined) {\n return supported;\n }\n if (typeof window !== 'undefined' && window.performance) {\n supported = true;\n perf = window.performance;\n }\n else if (typeof global !== 'undefined' && ((_a = global.perf_hooks) === null || _a === void 0 ? void 0 : _a.performance)) {\n supported = true;\n perf = global.perf_hooks.performance;\n }\n else {\n supported = false;\n }\n return supported;\n}\nexport function now() {\n return isPerformanceSupported() ? perf.now() : Date.now();\n}\n","import { HOOK_PLUGIN_SETTINGS_SET } from './const.js';\nimport { now } from './time.js';\nexport class ApiProxy {\n constructor(plugin, hook) {\n this.target = null;\n this.targetQueue = [];\n this.onQueue = [];\n this.plugin = plugin;\n this.hook = hook;\n const defaultSettings = {};\n if (plugin.settings) {\n for (const id in plugin.settings) {\n const item = plugin.settings[id];\n defaultSettings[id] = item.defaultValue;\n }\n }\n const localSettingsSaveId = `__vue-devtools-plugin-settings__${plugin.id}`;\n let currentSettings = Object.assign({}, defaultSettings);\n try {\n const raw = localStorage.getItem(localSettingsSaveId);\n const data = JSON.parse(raw);\n Object.assign(currentSettings, data);\n }\n catch (e) {\n // noop\n }\n this.fallbacks = {\n getSettings() {\n return currentSettings;\n },\n setSettings(value) {\n try {\n localStorage.setItem(localSettingsSaveId, JSON.stringify(value));\n }\n catch (e) {\n // noop\n }\n currentSettings = value;\n },\n now() {\n return now();\n },\n };\n if (hook) {\n hook.on(HOOK_PLUGIN_SETTINGS_SET, (pluginId, value) => {\n if (pluginId === this.plugin.id) {\n this.fallbacks.setSettings(value);\n }\n });\n }\n this.proxiedOn = new Proxy({}, {\n get: (_target, prop) => {\n if (this.target) {\n return this.target.on[prop];\n }\n else {\n return (...args) => {\n this.onQueue.push({\n method: prop,\n args,\n });\n };\n }\n },\n });\n this.proxiedTarget = new Proxy({}, {\n get: (_target, prop) => {\n if (this.target) {\n return this.target[prop];\n }\n else if (prop === 'on') {\n return this.proxiedOn;\n }\n else if (Object.keys(this.fallbacks).includes(prop)) {\n return (...args) => {\n this.targetQueue.push({\n method: prop,\n args,\n resolve: () => { },\n });\n return this.fallbacks[prop](...args);\n };\n }\n else {\n return (...args) => {\n return new Promise(resolve => {\n this.targetQueue.push({\n method: prop,\n args,\n resolve,\n });\n });\n };\n }\n },\n });\n }\n async setRealTarget(target) {\n this.target = target;\n for (const item of this.onQueue) {\n this.target.on[item.method](...item.args);\n }\n for (const item of this.targetQueue) {\n item.resolve(await this.target[item.method](...item.args));\n }\n }\n}\n","/*!\n * vuex v4.0.2\n * (c) 2021 Evan You\n * @license MIT\n */\nimport { inject, reactive, watch } from 'vue';\nimport { setupDevtoolsPlugin } from '@vue/devtools-api';\n\nvar storeKey = 'store';\n\nfunction useStore (key) {\n if ( key === void 0 ) key = null;\n\n return inject(key !== null ? key : storeKey)\n}\n\n/**\n * Get the first item that pass the test\n * by second argument function\n *\n * @param {Array} list\n * @param {Function} f\n * @return {*}\n */\nfunction find (list, f) {\n return list.filter(f)[0]\n}\n\n/**\n * Deep copy the given object considering circular structure.\n * This function caches all nested objects and its copies.\n * If it detects circular structure, use cached copy to avoid infinite loop.\n *\n * @param {*} obj\n * @param {Array<Object>} cache\n * @return {*}\n */\nfunction deepCopy (obj, cache) {\n if ( cache === void 0 ) cache = [];\n\n // just return if obj is immutable value\n if (obj === null || typeof obj !== 'object') {\n return obj\n }\n\n // if obj is hit, it is in circular structure\n var hit = find(cache, function (c) { return c.original === obj; });\n if (hit) {\n return hit.copy\n }\n\n var copy = Array.isArray(obj) ? [] : {};\n // put the copy into cache at first\n // because we want to refer it in recursive deepCopy\n cache.push({\n original: obj,\n copy: copy\n });\n\n Object.keys(obj).forEach(function (key) {\n copy[key] = deepCopy(obj[key], cache);\n });\n\n return copy\n}\n\n/**\n * forEach for object\n */\nfunction forEachValue (obj, fn) {\n Object.keys(obj).forEach(function (key) { return fn(obj[key], key); });\n}\n\nfunction isObject (obj) {\n return obj !== null && typeof obj === 'object'\n}\n\nfunction isPromise (val) {\n return val && typeof val.then === 'function'\n}\n\nfunction assert (condition, msg) {\n if (!condition) { throw new Error((\"[vuex] \" + msg)) }\n}\n\nfunction partial (fn, arg) {\n return function () {\n return fn(arg)\n }\n}\n\nfunction genericSubscribe (fn, subs, options) {\n if (subs.indexOf(fn) < 0) {\n options && options.prepend\n ? subs.unshift(fn)\n : subs.push(fn);\n }\n return function () {\n var i = subs.indexOf(fn);\n if (i > -1) {\n subs.splice(i, 1);\n }\n }\n}\n\nfunction resetStore (store, hot) {\n store._actions = Object.create(null);\n store._mutations = Object.create(null);\n store._wrappedGetters = Object.create(null);\n store._modulesNamespaceMap = Object.create(null);\n var state = store.state;\n // init all modules\n installModule(store, state, [], store._modules.root, true);\n // reset state\n resetStoreState(store, state, hot);\n}\n\nfunction resetStoreState (store, state, hot) {\n var oldState = store._state;\n\n // bind store public getters\n store.getters = {};\n // reset local getters cache\n store._makeLocalGettersCache = Object.create(null);\n var wrappedGetters = store._wrappedGetters;\n var computedObj = {};\n forEachValue(wrappedGetters, function (fn, key) {\n // use computed to leverage its lazy-caching mechanism\n // direct inline function use will lead to closure preserving oldState.\n // using partial to return function with only arguments preserved in closure environment.\n computedObj[key] = partial(fn, store);\n Object.defineProperty(store.getters, key, {\n // TODO: use `computed` when it's possible. at the moment we can't due to\n // https://github.com/vuejs/vuex/pull/1883\n get: function () { return computedObj[key](); },\n enumerable: true // for local getters\n });\n });\n\n store._state = reactive({\n data: state\n });\n\n // enable strict mode for new state\n if (store.strict) {\n enableStrictMode(store);\n }\n\n if (oldState) {\n if (hot) {\n // dispatch changes in all subscribed watchers\n // to force getter re-evaluation for hot reloading.\n store._withCommit(function () {\n oldState.data = null;\n });\n }\n }\n}\n\nfunction installModule (store, rootState, path, module, hot) {\n var isRoot = !path.length;\n var namespace = store._modules.getNamespace(path);\n\n // register in namespace map\n if (module.namespaced) {\n if (store._modulesNamespaceMap[namespace] && (process.env.NODE_ENV !== 'production')) {\n console.error((\"[vuex] duplicate namespace \" + namespace + \" for the namespaced module \" + (path.join('/'))));\n }\n store._modulesNamespaceMap[namespace] = module;\n }\n\n // set state\n if (!isRoot && !hot) {\n var parentState = getNestedState(rootState, path.slice(0, -1));\n var moduleName = path[path.length - 1];\n store._withCommit(function () {\n if ((process.env.NODE_ENV !== 'production')) {\n if (moduleName in parentState) {\n console.warn(\n (\"[vuex] state field \\\"\" + moduleName + \"\\\" was overridden by a module with the same name at \\\"\" + (path.join('.')) + \"\\\"\")\n );\n }\n }\n parentState[moduleName] = module.state;\n });\n }\n\n var local = module.context = makeLocalContext(store, namespace, path);\n\n module.forEachMutation(function (mutation, key) {\n var namespacedType = namespace + key;\n registerMutation(store, namespacedType, mutation, local);\n });\n\n module.forEachAction(function (action, key) {\n var type = action.root ? key : namespace + key;\n var handler = action.handler || action;\n registerAction(store, type, handler, local);\n });\n\n module.forEachGetter(function (getter, key) {\n var namespacedType = namespace + key;\n registerGetter(store, namespacedType, getter, local);\n });\n\n module.forEachChild(function (child, key) {\n installModule(store, rootState, path.concat(key), child, hot);\n });\n}\n\n/**\n * make localized dispatch, commit, getters and state\n * if there is no namespace, just use root ones\n */\nfunction makeLocalContext (store, namespace, path) {\n var noNamespace = namespace === '';\n\n var local = {\n dispatch: noNamespace ? store.dispatch : function (_type, _payload, _options) {\n var args = unifyObjectStyle(_type, _payload, _options);\n var payload = args.payload;\n var options = args.options;\n var type = args.type;\n\n if (!options || !options.root) {\n type = namespace + type;\n if ((process.env.NODE_ENV !== 'production') && !store._actions[type]) {\n console.error((\"[vuex] unknown local action type: \" + (args.type) + \", global type: \" + type));\n return\n }\n }\n\n return store.dispatch(type, payload)\n },\n\n commit: noNamespace ? store.commit : function (_type, _payload, _options) {\n var args = unifyObjectStyle(_type, _payload, _options);\n var payload = args.payload;\n var options = args.options;\n var type = args.type;\n\n if (!options || !options.root) {\n type = namespace + type;\n if ((process.env.NODE_ENV !== 'production') && !store._mutations[type]) {\n console.error((\"[vuex] unknown local mutation type: \" + (args.type) + \", global type: \" + type));\n return\n }\n }\n\n store.commit(type, payload, options);\n }\n };\n\n // getters and state object must be gotten lazily\n // because they will be changed by state update\n Object.defineProperties(local, {\n getters: {\n get: noNamespace\n ? function () { return store.getters; }\n : function () { return makeLocalGetters(store, namespace); }\n },\n state: {\n get: function () { return getNestedState(store.state, path); }\n }\n });\n\n return local\n}\n\nfunction makeLocalGetters (store, namespace) {\n if (!store._makeLocalGettersCache[namespace]) {\n var gettersProxy = {};\n var splitPos = namespace.length;\n Object.keys(store.getters).forEach(function (type) {\n // skip if the target getter is not match this namespace\n if (type.slice(0, splitPos) !== namespace) { return }\n\n // extract local getter type\n var localType = type.slice(splitPos);\n\n // Add a port to the getters proxy.\n // Define as getter property because\n // we do not want to evaluate the getters in this time.\n Object.defineProperty(gettersProxy, localType, {\n get: function () { return store.getters[type]; },\n enumerable: true\n });\n });\n store._makeLocalGettersCache[namespace] = gettersProxy;\n }\n\n return store._makeLocalGettersCache[namespace]\n}\n\nfunction registerMutation (store, type, handler, local) {\n var entry = store._mutations[type] || (store._mutations[type] = []);\n entry.push(function wrappedMutationHandler (payload) {\n handler.call(store, local.state, payload);\n });\n}\n\nfunction registerAction (store, type, handler, local) {\n var entry = store._actions[type] || (store._actions[type] = []);\n entry.push(function wrappedActionHandler (payload) {\n var res = handler.call(store, {\n dispatch: local.dispatch,\n commit: local.commit,\n getters: local.getters,\n state: local.state,\n rootGetters: store.getters,\n rootState: store.state\n }, payload);\n if (!isPromise(res)) {\n res = Promise.resolve(res);\n }\n if (store._devtoolHook) {\n return res.catch(function (err) {\n store._devtoolHook.emit('vuex:error', err);\n throw err\n })\n } else {\n return res\n }\n });\n}\n\nfunction registerGetter (store, type, rawGetter, local) {\n if (store._wrappedGetters[type]) {\n if ((process.env.NODE_ENV !== 'production')) {\n console.error((\"[vuex] duplicate getter key: \" + type));\n }\n return\n }\n store._wrappedGetters[type] = function wrappedGetter (store) {\n return rawGetter(\n local.state, // local state\n local.getters, // local getters\n store.state, // root state\n store.getters // root getters\n )\n };\n}\n\nfunction enableStrictMode (store) {\n watch(function () { return store._state.data; }, function () {\n if ((process.env.NODE_ENV !== 'production')) {\n assert(store._committing, \"do not mutate vuex store state outside mutation handlers.\");\n }\n }, { deep: true, flush: 'sync' });\n}\n\nfunction getNestedState (state, path) {\n return path.reduce(function (state, key) { return state[key]; }, state)\n}\n\nfunction unifyObjectStyle (type, payload, options) {\n if (isObject(type) && type.type) {\n options = payload;\n payload = type;\n type = type.type;\n }\n\n if ((process.env.NODE_ENV !== 'production')) {\n assert(typeof type === 'string', (\"expects string as the type, but found \" + (typeof type) + \".\"));\n }\n\n return { type: type, payload: payload, options: options }\n}\n\nvar LABEL_VUEX_BINDINGS = 'vuex bindings';\nvar MUTATIONS_LAYER_ID = 'vuex:mutations';\nvar ACTIONS_LAYER_ID = 'vuex:actions';\nvar INSPECTOR_ID = 'vuex';\n\nvar actionId = 0;\n\nfunction addDevtools (app, store) {\n setupDevtoolsPlugin(\n {\n id: 'org.vuejs.vuex',\n app: app,\n label: 'Vuex',\n homepage: 'https://next.vuex.vuejs.org/',\n logo: 'https://vuejs.org/images/icons/favicon-96x96.png',\n packageName: 'vuex',\n componentStateTypes: [LABEL_VUEX_BINDINGS]\n },\n function (api) {\n api.addTimelineLayer({\n id: MUTATIONS_LAYER_ID,\n label: 'Vuex Mutations',\n color: COLOR_LIME_500\n });\n\n api.addTimelineLayer({\n id: ACTIONS_LAYER_ID,\n label: 'Vuex Actions',\n color: COLOR_LIME_500\n });\n\n api.addInspector({\n id: INSPECTOR_ID,\n label: 'Vuex',\n icon: 'storage',\n treeFilterPlaceholder: 'Filter stores...'\n });\n\n api.on.getInspectorTree(function (payload) {\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n if (payload.filter) {\n var nodes = [];\n flattenStoreForInspectorTree(nodes, store._modules.root, payload.filter, '');\n payload.rootNodes = nodes;\n } else {\n payload.rootNodes = [\n formatStoreForInspectorTree(store._modules.root, '')\n ];\n }\n }\n });\n\n api.on.getInspectorState(function (payload) {\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n var modulePath = payload.nodeId;\n makeLocalGetters(store, modulePath);\n payload.state = formatStoreForInspectorState(\n getStoreModule(store._modules, modulePath),\n modulePath === 'root' ? store.getters : store._makeLocalGettersCache,\n modulePath\n );\n }\n });\n\n api.on.editInspectorState(function (payload) {\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n var modulePath = payload.nodeId;\n var path = payload.path;\n if (modulePath !== 'root') {\n path = modulePath.split('/').filter(Boolean).concat( path);\n }\n store._withCommit(function () {\n payload.set(store._state.data, path, payload.state.value);\n });\n }\n });\n\n store.subscribe(function (mutation, state) {\n var data = {};\n\n if (mutation.payload) {\n data.payload = mutation.payload;\n }\n\n data.state = state;\n\n api.notifyComponentUpdate();\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: Date.now(),\n title: mutation.type,\n data: data\n }\n });\n });\n\n store.subscribeAction({\n before: function (action, state) {\n var data = {};\n if (action.payload) {\n data.payload = action.payload;\n }\n action._id = actionId++;\n action._time = Date.now();\n data.state = state;\n\n api.addTimelineEvent({\n layerId: ACTIONS_LAYER_ID,\n event: {\n time: action._time,\n title: action.type,\n groupId: action._id,\n subtitle: 'start',\n data: data\n }\n });\n },\n after: function (action, state) {\n var data = {};\n var duration = Date.now() - action._time;\n data.duration = {\n _custom: {\n type: 'duration',\n display: (duration + \"ms\"),\n tooltip: 'Action duration',\n value: duration\n }\n };\n if (action.payload) {\n data.payload = action.payload;\n }\n data.state = state;\n\n api.addTimelineEvent({\n layerId: ACTIONS_LAYER_ID,\n event: {\n time: Date.now(),\n title: action.type,\n groupId: action._id,\n subtitle: 'end',\n data: data\n }\n });\n }\n });\n }\n );\n}\n\n// extracted from tailwind palette\nvar COLOR_LIME_500 = 0x84cc16;\nvar COLOR_DARK = 0x666666;\nvar COLOR_WHITE = 0xffffff;\n\nvar TAG_NAMESPACED = {\n label: 'namespaced',\n textColor: COLOR_WHITE,\n backgroundColor: COLOR_DARK\n};\n\n/**\n * @param {string} path\n */\nfunction extractNameFromPath (path) {\n return path && path !== 'root' ? path.split('/').slice(-2, -1)[0] : 'Root'\n}\n\n/**\n * @param {*} module\n * @return {import('@vue/devtools-api').CustomInspectorNode}\n */\nfunction formatStoreForInspectorTree (module, path) {\n return {\n id: path || 'root',\n // all modules end with a `/`, we want the last segment only\n // cart/ -> cart\n // nested/cart/ -> cart\n label: extractNameFromPath(path),\n tags: module.namespaced ? [TAG_NAMESPACED] : [],\n children: Object.keys(module._children).map(function (moduleName) { return formatStoreForInspectorTree(\n module._children[moduleName],\n path + moduleName + '/'\n ); }\n )\n }\n}\n\n/**\n * @param {import('@vue/devtools-api').CustomInspectorNode[]} result\n * @param {*} module\n * @param {string} filter\n * @param {string} path\n */\nfunction flattenStoreForInspectorTree (result, module, filter, path) {\n if (path.includes(filter)) {\n result.push({\n id: path || 'root',\n label: path.endsWith('/') ? path.slice(0, path.length - 1) : path || 'Root',\n tags: module.namespaced ? [TAG_NAMESPACED] : []\n });\n }\n Object.keys(module._children).forEach(function (moduleName) {\n flattenStoreForInspectorTree(result, module._children[moduleName], filter, path + moduleName + '/');\n });\n}\n\n/**\n * @param {*} module\n * @return {import('@vue/devtools-api').CustomInspectorState}\n */\nfunction formatStoreForInspectorState (module, getters, path) {\n getters = path === 'root' ? getters : getters[path];\n var gettersKeys = Object.keys(getters);\n var storeState = {\n state: Object.keys(module.state).map(function (key) { return ({\n key: key,\n editable: true,\n value: module.state[key]\n }); })\n };\n\n if (gettersKeys.length) {\n var tree = transformPathsToObjectTree(getters);\n storeState.getters = Object.keys(tree).map(function (key) { return ({\n key: key.endsWith('/') ? extractNameFromPath(key) : key,\n editable: false,\n value: canThrow(function () { return tree[key]; })\n }); });\n }\n\n return storeState\n}\n\nfunction transformPathsToObjectTree (getters) {\n var result = {};\n Object.keys(getters).forEach(function (key) {\n var path = key.split('/');\n if (path.length > 1) {\n var target = result;\n var leafKey = path.pop();\n path.forEach(function (p) {\n if (!target[p]) {\n target[p] = {\n _custom: {\n value: {},\n display: p,\n tooltip: 'Module',\n abstract: true\n }\n };\n }\n target = target[p]._custom.value;\n });\n target[leafKey] = canThrow(function () { return getters[key]; });\n } else {\n result[key] = canThrow(function () { return getters[key]; });\n }\n });\n return result\n}\n\nfunction getStoreModule (moduleMap, path) {\n var names = path.split('/').filter(function (n) { return n; });\n return names.reduce(\n function (module, moduleName, i) {\n var child = module[moduleName];\n if (!child) {\n throw new Error((\"Missing module \\\"\" + moduleName + \"\\\" for path \\\"\" + path + \"\\\".\"))\n }\n return i === names.length - 1 ? child : child._children\n },\n path === 'root' ? moduleMap : moduleMap.root._children\n )\n}\n\nfunction canThrow (cb) {\n try {\n return cb()\n } catch (e) {\n return e\n }\n}\n\n// Base data struct for store's module, package with some attribute and method\nvar Module = function Module (rawModule, runtime) {\n this.runtime = runtime;\n // Store some children item\n this._children = Object.create(null);\n // Store the origin module object which passed by programmer\n this._rawModule = rawModule;\n var rawState = rawModule.state;\n\n // Store the origin module's state\n this.state = (typeof rawState === 'function' ? rawState() : rawState) || {};\n};\n\nvar prototypeAccessors$1 = { namespaced: { configurable: true } };\n\nprototypeAccessors$1.namespaced.get = function () {\n return !!this._rawModule.namespaced\n};\n\nModule.prototype.addChild = function addChild (key, module) {\n this._children[key] = module;\n};\n\nModule.prototype.removeChild = function removeChild (key) {\n delete this._children[key];\n};\n\nModule.prototype.getChild = function getChild (key) {\n return this._children[key]\n};\n\nModule.prototype.hasChild = function hasChild (key) {\n return key in this._children\n};\n\nModule.prototype.update = function update (rawModule) {\n this._rawModule.namespaced = rawModule.namespaced;\n if (rawModule.actions) {\n this._rawModule.actions = rawModule.actions;\n }\n if (rawModule.mutations) {\n this._rawModule.mutations = rawModule.mutations;\n }\n if (rawModule.getters) {\n this._rawModule.getters = rawModule.getters;\n }\n};\n\nModule.prototype.forEachChild = function forEachChild (fn) {\n forEachValue(this._children, fn);\n};\n\nModule.prototype.forEachGetter = function forEachGetter (fn) {\n if (this._rawModule.getters) {\n forEachValue(this._rawModule.getters, fn);\n }\n};\n\nModule.prototype.forEachAction = function forEachAction (fn) {\n if (this._rawModule.actions) {\n forEachValue(this._rawModule.actions, fn);\n }\n};\n\nModule.prototype.forEachMutation = function forEachMutation (fn) {\n if (this._rawModule.mutations) {\n forEachValue(this._rawModule.mutations, fn);\n }\n};\n\nObject.defineProperties( Module.prototype, prototypeAccessors$1 );\n\nvar ModuleCollection = function ModuleCollection (rawRootModule) {\n // register root module (Vuex.Store options)\n this.register([], rawRootModule, false);\n};\n\nModuleCollection.prototype.get = function get (path) {\n return path.reduce(function (module, key) {\n return module.getChild(key)\n }, this.root)\n};\n\nModuleCollection.prototype.getNamespace = function getNamespace (path) {\n var module = this.root;\n return path.reduce(function (namespace, key) {\n module = module.getChild(key);\n return namespace + (module.namespaced ? key + '/' : '')\n }, '')\n};\n\nModuleCollection.prototype.update = function update$1 (rawRootModule) {\n update([], this.root, rawRootModule);\n};\n\nModuleCollection.prototype.register = function register (path, rawModule, runtime) {\n var this$1$1 = this;\n if ( runtime === void 0 ) runtime = true;\n\n if ((process.env.NODE_ENV !== 'production')) {\n assertRawModule(path, rawModule);\n }\n\n var newModule = new Module(rawModule, runtime);\n if (path.length === 0) {\n this.root = newModule;\n } else {\n var parent = this.get(path.slice(0, -1));\n parent.addChild(path[path.length - 1], newModule);\n }\n\n // register nested modules\n if (rawModule.modules) {\n forEachValue(rawModule.modules, function (rawChildModule, key) {\n this$1$1.register(path.concat(key), rawChildModule, runtime);\n });\n }\n};\n\nModuleCollection.prototype.unregister = function unregister (path) {\n var parent = this.get(path.slice(0, -1));\n var key = path[path.length - 1];\n var child = parent.getChild(key);\n\n if (!child) {\n if ((process.env.NODE_ENV !== 'production')) {\n console.warn(\n \"[vuex] trying to unregister module '\" + key + \"', which is \" +\n \"not registered\"\n );\n }\n return\n }\n\n if (!child.runtime) {\n return\n }\n\n parent.removeChild(key);\n};\n\nModuleCollection.prototype.isRegistered = function isRegistered (path) {\n var parent = this.get(path.slice(0, -1));\n var key = path[path.length - 1];\n\n if (parent) {\n return parent.hasChild(key)\n }\n\n return false\n};\n\nfunction update (path, targetModule, newModule) {\n if ((process.env.NODE_ENV !== 'production')) {\n assertRawModule(path, newModule);\n }\n\n // update target module\n targetModule.update(newModule);\n\n // update nested modules\n if (newModule.modules) {\n for (var key in newModule.modules) {\n if (!targetModule.getChild(key)) {\n if ((process.env.NODE_ENV !== 'production')) {\n console.warn(\n \"[vuex] trying to add a new module '\" + key + \"' on hot reloading, \" +\n 'manual reload is needed'\n );\n }\n return\n }\n update(\n path.concat(key),\n targetModule.getChild(key),\n newModule.modules[key]\n );\n }\n }\n}\n\nvar functionAssert = {\n assert: function (value) { return typeof value === 'function'; },\n expected: 'function'\n};\n\nvar objectAssert = {\n assert: function (value) { return typeof value === 'function' ||\n (typeof value === 'object' && typeof value.handler === 'function'); },\n expected: 'function or object with \"handler\" function'\n};\n\nvar assertTypes = {\n getters: functionAssert,\n mutations: functionAssert,\n actions: objectAssert\n};\n\nfunction assertRawModule (path, rawModule) {\n Object.keys(assertTypes).forEach(function (key) {\n if (!rawModule[key]) { return }\n\n var assertOptions = assertTypes[key];\n\n forEachValue(rawModule[key], function (value, type) {\n assert(\n assertOptions.assert(value),\n makeAssertionMessage(path, key, type, value, assertOptions.expected)\n );\n });\n });\n}\n\nfunction makeAssertionMessage (path, key, type, value, expected) {\n var buf = key + \" should be \" + expected + \" but \\\"\" + key + \".\" + type + \"\\\"\";\n if (path.length > 0) {\n buf += \" in module \\\"\" + (path.join('.')) + \"\\\"\";\n }\n buf += \" is \" + (JSON.stringify(value)) + \".\";\n return buf\n}\n\nfunction createStore (options) {\n return new Store(options)\n}\n\nvar Store = function Store (options) {\n var this$1$1 = this;\n if ( options === void 0 ) options = {};\n\n if ((process.env.NODE_ENV !== 'production')) {\n assert(typeof Promise !== 'undefined', \"vuex requires a Promise polyfill in this browser.\");\n assert(this instanceof Store, \"store must be called with the new operator.\");\n }\n\n var plugins = options.plugins; if ( plugins === void 0 ) plugins = [];\n var strict = options.strict; if ( strict === void 0 ) strict = false;\n var devtools = options.devtools;\n\n // store internal state\n this._committing = false;\n this._actions = Object.create(null);\n this._actionSubscribers = [];\n this._mutations = Object.create(null);\n this._wrappedGetters = Object.create(null);\n this._modules = new ModuleCollection(options);\n this._modulesNamespaceMap = Object.create(null);\n this._subscribers = [];\n this._makeLocalGettersCache = Object.create(null);\n this._devtools = devtools;\n\n // bind commit and dispatch to self\n var store = this;\n var ref = this;\n var dispatch = ref.dispatch;\n var commit = ref.commit;\n this.dispatch = function boundDispatch (type, payload) {\n return dispatch.call(store, type, payload)\n };\n this.commit = function boundCommit (type, payload, options) {\n return commit.call(store, type, payload, options)\n };\n\n // strict mode\n this.strict = strict;\n\n var state = this._modules.root.state;\n\n // init root module.\n // this also recursively registers all sub-modules\n // and collects all module getters inside this._wrappedGetters\n installModule(this, state, [], this._modules.root);\n\n // initialize the store state, which is responsible for the reactivity\n // (also registers _wrappedGetters as computed properties)\n resetStoreState(this, state);\n\n // apply plugins\n plugins.forEach(function (plugin) { return plugin(this$1$1); });\n};\n\nvar prototypeAccessors = { state: { configurable: true } };\n\nStore.prototype.install = function install (app, injectKey) {\n app.provide(injectKey || storeKey, this);\n app.config.globalProperties.$store = this;\n\n var useDevtools = this._devtools !== undefined\n ? this._devtools\n : (process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__;\n\n if (useDevtools) {\n addDevtools(app, this);\n }\n};\n\nprototypeAccessors.state.get = function () {\n return this._state.data\n};\n\nprototypeAccessors.state.set = function (v) {\n if ((process.env.NODE_ENV !== 'production')) {\n assert(false, \"use store.replaceState() to explicit replace store state.\");\n }\n};\n\nStore.prototype.commit = function commit (_type, _payload, _options) {\n var this$1$1 = this;\n\n // check object-style commit\n var ref = unifyObjectStyle(_type, _payload, _options);\n var type = ref.type;\n var payload = ref.payload;\n var options = ref.options;\n\n var mutation = { type: type, payload: payload };\n var entry = this._mutations[type];\n if (!entry) {\n if ((process.env.NODE_ENV !== 'production')) {\n console.error((\"[vuex] unknown mutation type: \" + type));\n }\n return\n }\n this._withCommit(function () {\n entry.forEach(function commitIterator (handler) {\n handler(payload);\n });\n });\n\n this._subscribers\n .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe\n .forEach(function (sub) { return sub(mutation, this$1$1.state); });\n\n if (\n (process.env.NODE_ENV !== 'production') &&\n options && options.silent\n ) {\n console.warn(\n \"[vuex] mutation type: \" + type + \". Silent option has been removed. \" +\n 'Use the filter functionality in the vue-devtools'\n );\n }\n};\n\nStore.prototype.dispatch = function dispatch (_type, _payload) {\n var this$1$1 = this;\n\n // check object-style dispatch\n var ref = unifyObjectStyle(_type, _payload);\n var type = ref.type;\n var payload = ref.payload;\n\n var action = { type: type, payload: payload };\n var entry = this._actions[type];\n if (!entry) {\n if ((process.env.NODE_ENV !== 'production')) {\n console.error((\"[vuex] unknown action type: \" + type));\n }\n return\n }\n\n try {\n this._actionSubscribers\n .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe\n .filter(function (sub) { return sub.before; })\n .forEach(function (sub) { return sub.before(action, this$1$1.state); });\n } catch (e) {\n if ((process.env.NODE_ENV !== 'production')) {\n console.warn(\"[vuex] error in before action subscribers: \");\n console.error(e);\n }\n }\n\n var result = entry.length > 1\n ? Promise.all(entry.map(function (handler) { return handler(payload); }))\n : entry[0](payload);\n\n return new Promise(function (resolve, reject) {\n result.then(function (res) {\n try {\n this$1$1._actionSubscribers\n .filter(function (sub) { return sub.after; })\n .forEach(function (sub) { return sub.after(action, this$1$1.state); });\n } catch (e) {\n if ((process.env.NODE_ENV !== 'production')) {\n console.warn(\"[vuex] error in after action subscribers: \");\n console.error(e);\n }\n }\n resolve(res);\n }, function (error) {\n try {\n this$1$1._actionSubscribers\n .filter(function (sub) { return sub.error; })\n .forEach(function (sub) { return sub.error(action, this$1$1.state, error); });\n } catch (e) {\n if ((process.env.NODE_ENV !== 'production')) {\n console.warn(\"[vuex] error in error action subscribers: \");\n console.error(e);\n }\n }\n reject(error);\n });\n })\n};\n\nStore.prototype.subscribe = function subscribe (fn, options) {\n return genericSubscribe(fn, this._subscribers, options)\n};\n\nStore.prototype.subscribeAction = function subscribeAction (fn, options) {\n var subs = typeof fn === 'function' ? { before: fn } : fn;\n return genericSubscribe(subs, this._actionSubscribers, options)\n};\n\nStore.prototype.watch = function watch$1 (getter, cb, options) {\n var this$1$1 = this;\n\n if ((process.env.NODE_ENV !== 'production')) {\n assert(typeof getter === 'function', \"store.watch only accepts a function.\");\n }\n return watch(function () { return getter(this$1$1.state, this$1$1.getters); }, cb, Object.assign({}, options))\n};\n\nStore.prototype.replaceState = function replaceState (state) {\n var this$1$1 = this;\n\n this._withCommit(function () {\n this$1$1._state.data = state;\n });\n};\n\nStore.prototype.registerModule = function registerModule (path, rawModule, options) {\n if ( options === void 0 ) options = {};\n\n if (typeof path === 'string') { path = [path]; }\n\n if ((process.env.NODE_ENV !== 'production')) {\n assert(Array.isArray(path), \"module path must be a string or an Array.\");\n assert(path.length > 0, 'cannot register the root module by using registerModule.');\n }\n\n this._modules.register(path, rawModule);\n installModule(this, this.state, path, this._modules.get(path), options.preserveState);\n // reset store to update getters...\n resetStoreState(this, this.state);\n};\n\nStore.prototype.unregisterModule = function unregisterModule (path) {\n var this$1$1 = this;\n\n if (typeof path === 'string') { path = [path]; }\n\n if ((process.env.NODE_ENV !== 'production')) {\n assert(Array.isArray(path), \"module path must be a string or an Array.\");\n }\n\n this._modules.unregister(path);\n this._withCommit(function () {\n var parentState = getNestedState(this$1$1.state, path.slice(0, -1));\n delete parentState[path[path.length - 1]];\n });\n resetStore(this);\n};\n\nStore.prototype.hasModule = function hasModule (path) {\n if (typeof path === 'string') { path = [path]; }\n\n if ((process.env.NODE_ENV !== 'production')) {\n assert(Array.isArray(path), \"module path must be a string or an Array.\");\n }\n\n return this._modules.isRegistered(path)\n};\n\nStore.prototype.hotUpdate = function hotUpdate (newOptions) {\n this._modules.update(newOptions);\n resetStore(this, true);\n};\n\nStore.prototype._withCommit = function _withCommit (fn) {\n var committing = this._committing;\n this._committing = true;\n fn();\n this._committing = committing;\n};\n\nObject.defineProperties( Store.prototype, prototypeAccessors );\n\n/**\n * Reduce the code which written in Vue.js for getting the state.\n * @param {String} [namespace] - Module's namespace\n * @param {Object|Array} states # Object's item can be a function which accept state and getters for param, you can do something for state and getters in it.\n * @param {Object}\n */\nvar mapState = normalizeNamespace(function (namespace, states) {\n var res = {};\n if ((process.env.NODE_ENV !== 'production') && !isValidMap(states)) {\n console.error('[vuex] mapState: mapper parameter must be either an Array or an Object');\n }\n normalizeMap(states).forEach(function (ref) {\n var key = ref.key;\n var val = ref.val;\n\n res[key] = function mappedState () {\n var state = this.$store.state;\n var getters = this.$store.getters;\n if (namespace) {\n var module = getModuleByNamespace(this.$store, 'mapState', namespace);\n if (!module) {\n return\n }\n state = module.context.state;\n getters = module.context.getters;\n }\n return typeof val === 'function'\n ? val.call(this, state, getters)\n : state[val]\n };\n // mark vuex getter for devtools\n res[key].vuex = true;\n });\n return res\n});\n\n/**\n * Reduce the code which written in Vue.js for committing the mutation\n * @param {String} [namespace] - Module's namespace\n * @param {Object|Array} mutations # Object's item can be a function which accept `commit` function as the first param, it can accept another params. You can commit mutation and do any other things in this function. specially, You need to pass anthor params from the mapped function.\n * @return {Object}\n */\nvar mapMutations = normalizeNamespace(function (namespace, mutations) {\n var res = {};\n if ((process.env.NODE_ENV !== 'production') && !isValidMap(mutations)) {\n console.error('[vuex] mapMutations: mapper parameter must be either an Array or an Object');\n }\n normalizeMap(mutations).forEach(function (ref) {\n var key = ref.key;\n var val = ref.val;\n\n res[key] = function mappedMutation () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n // Get the commit method from store\n var commit = this.$store.commit;\n if (namespace) {\n var module = getModuleByNamespace(this.$store, 'mapMutations', namespace);\n if (!module) {\n return\n }\n commit = module.context.commit;\n }\n return typeof val === 'function'\n ? val.apply(this, [commit].concat(args))\n : commit.apply(this.$store, [val].concat(args))\n };\n });\n return res\n});\n\n/**\n * Reduce the code which written in Vue.js for getting the getters\n * @param {String} [namespace] - Module's namespace\n * @param {Object|Array} getters\n * @return {Object}\n */\nvar mapGetters = normalizeNamespace(function (namespace, getters) {\n var res = {};\n if ((process.env.NODE_ENV !== 'production') && !isValidMap(getters)) {\n console.error('[vuex] mapGetters: mapper parameter must be either an Array or an Object');\n }\n normalizeMap(getters).forEach(function (ref) {\n var key = ref.key;\n var val = ref.val;\n\n // The namespace has been mutated by normalizeNamespace\n val = namespace + val;\n res[key] = function mappedGetter () {\n if (namespace && !getModuleByNamespace(this.$store, 'mapGetters', namespace)) {\n return\n }\n if ((process.env.NODE_ENV !== 'production') && !(val in this.$store.getters)) {\n console.error((\"[vuex] unknown getter: \" + val));\n return\n }\n return this.$store.getters[val]\n };\n // mark vuex getter for devtools\n res[key].vuex = true;\n });\n return res\n});\n\n/**\n * Reduce the code which written in Vue.js for dispatch the action\n * @param {String} [namespace] - Module's namespace\n * @param {Object|Array} actions # Object's item can be a function which accept `dispatch` function as the first param, it can accept anthor params. You can dispatch action and do any other things in this function. specially, You need to pass anthor params from the mapped function.\n * @return {Object}\n */\nvar mapActions = normalizeNamespace(function (namespace, actions) {\n var res = {};\n if ((process.env.NODE_ENV !== 'production') && !isValidMap(actions)) {\n console.error('[vuex] mapActions: mapper parameter must be either an Array or an Object');\n }\n normalizeMap(actions).forEach(function (ref) {\n var key = ref.key;\n var val = ref.val;\n\n res[key] = function mappedAction () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n // get dispatch function from store\n var dispatch = this.$store.dispatch;\n if (namespace) {\n var module = getModuleByNamespace(this.$store, 'mapActions', namespace);\n if (!module) {\n return\n }\n dispatch = module.context.dispatch;\n }\n return typeof val === 'function'\n ? val.apply(this, [dispatch].concat(args))\n : dispatch.apply(this.$store, [val].concat(args))\n };\n });\n return res\n});\n\n/**\n * Rebinding namespace param for mapXXX function in special scoped, and return them by simple object\n * @param {String} namespace\n * @return {Object}\n */\nvar createNamespacedHelpers = function (namespace) { return ({\n mapState: mapState.bind(null, namespace),\n mapGetters: mapGetters.bind(null, namespace),\n mapMutations: mapMutations.bind(null, namespace),\n mapActions: mapActions.bind(null, namespace)\n}); };\n\n/**\n * Normalize the map\n * normalizeMap([1, 2, 3]) => [ { key: 1, val: 1 }, { key: 2, val: 2 }, { key: 3, val: 3 } ]\n * normalizeMap({a: 1, b: 2, c: 3}) => [ { key: 'a', val: 1 }, { key: 'b', val: 2 }, { key: 'c', val: 3 } ]\n * @param {Array|Object} map\n * @return {Object}\n */\nfunction normalizeMap (map) {\n if (!isValidMap(map)) {\n return []\n }\n return Array.isArray(map)\n ? map.map(function (key) { return ({ key: key, val: key }); })\n : Object.keys(map).map(function (key) { return ({ key: key, val: map[key] }); })\n}\n\n/**\n * Validate whether given map is valid or not\n * @param {*} map\n * @return {Boolean}\n */\nfunction isValidMap (map) {\n return Array.isArray(map) || isObject(map)\n}\n\n/**\n * Return a function expect two param contains namespace and map. it will normalize the namespace and then the param's function will handle the new namespace and the map.\n * @param {Function} fn\n * @return {Function}\n */\nfunction normalizeNamespace (fn) {\n return function (namespace, map) {\n if (typeof namespace !== 'string') {\n map = namespace;\n namespace = '';\n } else if (namespace.charAt(namespace.length - 1) !== '/') {\n namespace += '/';\n }\n return fn(namespace, map)\n }\n}\n\n/**\n * Search a special module from store by namespace. if module not exist, print error message.\n * @param {Object} store\n * @param {String} helper\n * @param {String} namespace\n * @return {Object}\n */\nfunction getModuleByNamespace (store, helper, namespace) {\n var module = store._modulesNamespaceMap[namespace];\n if ((process.env.NODE_ENV !== 'production') && !module) {\n console.error((\"[vuex] module namespace not found in \" + helper + \"(): \" + namespace));\n }\n return module\n}\n\n// Credits: borrowed code from fcomb/redux-logger\n\nfunction createLogger (ref) {\n if ( ref === void 0 ) ref = {};\n var collapsed = ref.collapsed; if ( collapsed === void 0 ) collapsed = true;\n var filter = ref.filter; if ( filter === void 0 ) filter = function (mutation, stateBefore, stateAfter) { return true; };\n var transformer = ref.transformer; if ( transformer === void 0 ) transformer = function (state) { return state; };\n var mutationTransformer = ref.mutationTransformer; if ( mutationTransformer === void 0 ) mutationTransformer = function (mut) { return mut; };\n var actionFilter = ref.actionFilter; if ( actionFilter === void 0 ) actionFilter = function (action, state) { return true; };\n var actionTransformer = ref.actionTransformer; if ( actionTransformer === void 0 ) actionTransformer = function (act) { return act; };\n var logMutations = ref.logMutations; if ( logMutations === void 0 ) logMutations = true;\n var logActions = ref.logActions; if ( logActions === void 0 ) logActions = true;\n var logger = ref.logger; if ( logger === void 0 ) logger = console;\n\n return function (store) {\n var prevState = deepCopy(store.state);\n\n if (typeof logger === 'undefined') {\n return\n }\n\n if (logMutations) {\n store.subscribe(function (mutation, state) {\n var nextState = deepCopy(state);\n\n if (filter(mutation, prevState, nextState)) {\n var formattedTime = getFormattedTime();\n var formattedMutation = mutationTransformer(mutation);\n var message = \"mutation \" + (mutation.type) + formattedTime;\n\n startMessage(logger, message, collapsed);\n logger.log('%c prev state', 'color: #9E9E9E; font-weight: bold', transformer(prevState));\n logger.log('%c mutation', 'color: #03A9F4; font-weight: bold', formattedMutation);\n logger.log('%c next state', 'color: #4CAF50; font-weight: bold', transformer(nextState));\n endMessage(logger);\n }\n\n prevState = nextState;\n });\n }\n\n if (logActions) {\n store.subscribeAction(function (action, state) {\n if (actionFilter(action, state)) {\n var formattedTime = getFormattedTime();\n var formattedAction = actionTransformer(action);\n var message = \"action \" + (action.type) + formattedTime;\n\n startMessage(logger, message, collapsed);\n logger.log('%c action', 'color: #03A9F4; font-weight: bold', formattedAction);\n endMessage(logger);\n }\n });\n }\n }\n}\n\nfunction startMessage (logger, message, collapsed) {\n var startMessage = collapsed\n ? logger.groupCollapsed\n : logger.group;\n\n // render\n try {\n startMessage.call(logger, message);\n } catch (e) {\n logger.log(message);\n }\n}\n\nfunction endMessage (logger) {\n try {\n logger.groupEnd();\n } catch (e) {\n logger.log('—— log end ——');\n }\n}\n\nfunction getFormattedTime () {\n var time = new Date();\n return (\" @ \" + (pad(time.getHours(), 2)) + \":\" + (pad(time.getMinutes(), 2)) + \":\" + (pad(time.getSeconds(), 2)) + \".\" + (pad(time.getMilliseconds(), 3)))\n}\n\nfunction repeat (str, times) {\n return (new Array(times + 1)).join(str)\n}\n\nfunction pad (num, maxLength) {\n return repeat('0', maxLength - num.toString().length) + num\n}\n\nvar index = {\n version: '4.0.2',\n Store: Store,\n storeKey: storeKey,\n createStore: createStore,\n useStore: useStore,\n mapState: mapState,\n mapMutations: mapMutations,\n mapGetters: mapGetters,\n mapActions: mapActions,\n createNamespacedHelpers: createNamespacedHelpers,\n createLogger: createLogger\n};\n\nexport default index;\nexport { Store, createLogger, createNamespacedHelpers, createStore, mapActions, mapGetters, mapMutations, mapState, storeKey, useStore };\n","import { getTarget, getDevtoolsGlobalHook, isProxyAvailable } from './env.js';\nimport { HOOK_SETUP } from './const.js';\nimport { ApiProxy } from './proxy.js';\nexport * from './api/index.js';\nexport * from './plugin.js';\nexport * from './time.js';\nexport function setupDevtoolsPlugin(pluginDescriptor, setupFn) {\n const descriptor = pluginDescriptor;\n const target = getTarget();\n const hook = getDevtoolsGlobalHook();\n const enableProxy = isProxyAvailable && descriptor.enableEarlyProxy;\n if (hook && (target.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !enableProxy)) {\n hook.emit(HOOK_SETUP, pluginDescriptor, setupFn);\n }\n else {\n const proxy = enableProxy ? new ApiProxy(descriptor, hook) : null;\n const list = target.__VUE_DEVTOOLS_PLUGINS__ = target.__VUE_DEVTOOLS_PLUGINS__ || [];\n list.push({\n pluginDescriptor: descriptor,\n setupFn,\n proxy,\n });\n if (proxy)\n setupFn(proxy.proxiedTarget);\n }\n}\n","export default () => {\n\t// https://mths.be/emoji\n\treturn /[#*0-9]\\uFE0F?\\u20E3|[\\xA9\\xAE\\u203C\\u2049\\u2122\\u2139\\u2194-\\u2199\\u21A9\\u21AA\\u231A\\u231B\\u2328\\u23CF\\u23ED-\\u23EF\\u23F1\\u23F2\\u23F8-\\u23FA\\u24C2\\u25AA\\u25AB\\u25B6\\u25C0\\u25FB\\u25FC\\u25FE\\u2600-\\u2604\\u260E\\u2611\\u2614\\u2615\\u2618\\u2620\\u2622\\u2623\\u2626\\u262A\\u262E\\u262F\\u2638-\\u263A\\u2640\\u2642\\u2648-\\u2653\\u265F\\u2660\\u2663\\u2665\\u2666\\u2668\\u267B\\u267E\\u267F\\u2692\\u2694-\\u2697\\u2699\\u269B\\u269C\\u26A0\\u26A7\\u26AA\\u26B0\\u26B1\\u26BD\\u26BE\\u26C4\\u26C8\\u26CF\\u26D1\\u26D3\\u26E9\\u26F0-\\u26F5\\u26F7\\u26F8\\u26FA\\u2702\\u2708\\u2709\\u270F\\u2712\\u2714\\u2716\\u271D\\u2721\\u2733\\u2734\\u2744\\u2747\\u2757\\u2763\\u27A1\\u2934\\u2935\\u2B05-\\u2B07\\u2B1B\\u2B1C\\u2B55\\u3030\\u303D\\u3297\\u3299]\\uFE0F?|[\\u261D\\u270C\\u270D](?:\\uFE0F|\\uD83C[\\uDFFB-\\uDFFF])?|[\\u270A\\u270B](?:\\uD83C[\\uDFFB-\\uDFFF])?|[\\u23E9-\\u23EC\\u23F0\\u23F3\\u25FD\\u2693\\u26A1\\u26AB\\u26C5\\u26CE\\u26D4\\u26EA\\u26FD\\u2705\\u2728\\u274C\\u274E\\u2753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\\uDC68\\uDC69]\\u200D\\uD83D(?:\\uDC66(?:\\u200D\\uD83D\\uDC66)?|\\uDC67(?:\\u200D\\uD83D[\\uDC66\\uDC67])?)|[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC66(?:\\u200D\\uD83D\\uDC66)?|\\uDC67(?:\\u200D\\uD83D[\\uDC66\\uDC67])?)|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C(?:\\uDFFB(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:\\uDC8B\\u200D\\uD83D)?\\uDC68\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E(?:[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD]|\\uDD1D\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFC-\\uDFFF])))?|\\uDFFC(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:\\uDC8B\\u200D\\uD83D)?\\uDC68\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E(?:[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD]|\\uDD1D\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFB\\uDFFD-\\uDFFF])))?|\\uDFFD(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:\\uDC8B\\u200D\\uD83D)?\\uDC68\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E(?:[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD]|\\uDD1D\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF])))?|\\uDFFE(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:\\uDC8B\\u200D\\uD83D)?\\uDC68\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E(?:[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD]|\\uDD1D\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFB-\\uDFFD\\uDFFF])))?|\\uDFFF(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:\\uDC8B\\u200D\\uD83D)?\\uDC68\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E(?:[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD]|\\uDD1D\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFB-\\uDFFE])))?))?|\\uDC69(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:\\uDC8B\\u200D\\uD83D)?[\\uDC68\\uDC69]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC66(?:\\u200D\\uD83D\\uDC66)?|\\uDC67(?:\\u200D\\uD83D[\\uDC66\\uDC67])?|\\uDC69\\u200D\\uD83D(?:\\uDC66(?:\\u200D\\uD83D\\uDC66)?|\\uDC67(?:\\u200D\\uD83D[\\uDC66\\uDC67])?))|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C(?:\\uDFFB(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:[\\uDC68\\uDC69]|\\uDC8B\\u200D\\uD83D[\\uDC68\\uDC69])\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E(?:[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD]|\\uDD1D\\u200D\\uD83D[\\uDC68\\uDC69]\\uD83C[\\uDFFC-\\uDFFF])))?|\\uDFFC(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:[\\uDC68\\uDC69]|\\uDC8B\\u200D\\uD83D[\\uDC68\\uDC69])\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E(?:[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD]|\\uDD1D\\u200D\\uD83D[\\uDC68\\uDC69]\\uD83C[\\uDFFB\\uDFFD-\\uDFFF])))?|\\uDFFD(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:[\\uDC68\\uDC69]|\\uDC8B\\u200D\\uD83D[\\uDC68\\uDC69])\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E(?:[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD]|\\uDD1D\\u200D\\uD83D[\\uDC68\\uDC69]\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF])))?|\\uDFFE(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:[\\uDC68\\uDC69]|\\uDC8B\\u200D\\uD83D[\\uDC68\\uDC69])\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E(?:[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD]|\\uDD1D\\u200D\\uD83D[\\uDC68\\uDC69]\\uD83C[\\uDFFB-\\uDFFD\\uDFFF])))?|\\uDFFF(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:[\\uDC68\\uDC69]|\\uDC8B\\u200D\\uD83D[\\uDC68\\uDC69])\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E(?:[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD]|\\uDD1D\\u200D\\uD83D[\\uDC68\\uDC69]\\uD83C[\\uDFFB-\\uDFFE])))?))?|\\uDC6F(?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uD83C[\\uDFFB-\\uDFFE])?))?)/g;\n};\n","const PACKET_TYPES = Object.create(null); // no Map = no polyfill\nPACKET_TYPES[\"open\"] = \"0\";\nPACKET_TYPES[\"close\"] = \"1\";\nPACKET_TYPES[\"ping\"] = \"2\";\nPACKET_TYPES[\"pong\"] = \"3\";\nPACKET_TYPES[\"message\"] = \"4\";\nPACKET_TYPES[\"upgrade\"] = \"5\";\nPACKET_TYPES[\"noop\"] = \"6\";\nconst PACKET_TYPES_REVERSE = Object.create(null);\nObject.keys(PACKET_TYPES).forEach(key => {\n PACKET_TYPES_REVERSE[PACKET_TYPES[key]] = key;\n});\nconst ERROR_PACKET = { type: \"error\", data: \"parser error\" };\nexport { PACKET_TYPES, PACKET_TYPES_REVERSE, ERROR_PACKET };\n","import { PACKET_TYPES } from \"./commons.js\";\nconst withNativeBlob = typeof Blob === \"function\" ||\n (typeof Blob !== \"undefined\" &&\n Object.prototype.toString.call(Blob) === \"[object BlobConstructor]\");\nconst withNativeArrayBuffer = typeof ArrayBuffer === \"function\";\n// ArrayBuffer.isView method is not defined in IE10\nconst isView = obj => {\n return typeof ArrayBuffer.isView === \"function\"\n ? ArrayBuffer.isView(obj)\n : obj && obj.buffer instanceof ArrayBuffer;\n};\nconst encodePacket = ({ type, data }, supportsBinary, callback) => {\n if (withNativeBlob && data instanceof Blob) {\n if (supportsBinary) {\n return callback(data);\n }\n else {\n return encodeBlobAsBase64(data, callback);\n }\n }\n else if (withNativeArrayBuffer &&\n (data instanceof ArrayBuffer || isView(data))) {\n if (supportsBinary) {\n return callback(data);\n }\n else {\n return encodeBlobAsBase64(new Blob([data]), callback);\n }\n }\n // plain string\n return callback(PACKET_TYPES[type] + (data || \"\"));\n};\nconst encodeBlobAsBase64 = (data, callback) => {\n const fileReader = new FileReader();\n fileReader.onload = function () {\n const content = fileReader.result.split(\",\")[1];\n callback(\"b\" + content);\n };\n return fileReader.readAsDataURL(data);\n};\nexport default encodePacket;\n","const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n// Use a lookup table to find the index.\nconst lookup = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);\nfor (let i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n}\nexport const encode = (arraybuffer) => {\n let bytes = new Uint8Array(arraybuffer), i, len = bytes.length, base64 = '';\n for (i = 0; i < len; i += 3) {\n base64 += chars[bytes[i] >> 2];\n base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)];\n base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)];\n base64 += chars[bytes[i + 2] & 63];\n }\n if (len % 3 === 2) {\n base64 = base64.substring(0, base64.length - 1) + '=';\n }\n else if (len % 3 === 1) {\n base64 = base64.substring(0, base64.length - 2) + '==';\n }\n return base64;\n};\nexport const decode = (base64) => {\n let bufferLength = base64.length * 0.75, len = base64.length, i, p = 0, encoded1, encoded2, encoded3, encoded4;\n if (base64[base64.length - 1] === '=') {\n bufferLength--;\n if (base64[base64.length - 2] === '=') {\n bufferLength--;\n }\n }\n const arraybuffer = new ArrayBuffer(bufferLength), bytes = new Uint8Array(arraybuffer);\n for (i = 0; i < len; i += 4) {\n encoded1 = lookup[base64.charCodeAt(i)];\n encoded2 = lookup[base64.charCodeAt(i + 1)];\n encoded3 = lookup[base64.charCodeAt(i + 2)];\n encoded4 = lookup[base64.charCodeAt(i + 3)];\n bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);\n bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);\n bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);\n }\n return arraybuffer;\n};\n","import { ERROR_PACKET, PACKET_TYPES_REVERSE } from \"./commons.js\";\nimport { decode } from \"./contrib/base64-arraybuffer.js\";\nconst withNativeArrayBuffer = typeof ArrayBuffer === \"function\";\nconst decodePacket = (encodedPacket, binaryType) => {\n if (typeof encodedPacket !== \"string\") {\n return {\n type: \"message\",\n data: mapBinary(encodedPacket, binaryType)\n };\n }\n const type = encodedPacket.charAt(0);\n if (type === \"b\") {\n return {\n type: \"message\",\n data: decodeBase64Packet(encodedPacket.substring(1), binaryType)\n };\n }\n const packetType = PACKET_TYPES_REVERSE[type];\n if (!packetType) {\n return ERROR_PACKET;\n }\n return encodedPacket.length > 1\n ? {\n type: PACKET_TYPES_REVERSE[type],\n data: encodedPacket.substring(1)\n }\n : {\n type: PACKET_TYPES_REVERSE[type]\n };\n};\nconst decodeBase64Packet = (data, binaryType) => {\n if (withNativeArrayBuffer) {\n const decoded = decode(data);\n return mapBinary(decoded, binaryType);\n }\n else {\n return { base64: true, data }; // fallback for old browsers\n }\n};\nconst mapBinary = (data, binaryType) => {\n switch (binaryType) {\n case \"blob\":\n return data instanceof ArrayBuffer ? new Blob([data]) : data;\n case \"arraybuffer\":\n default:\n return data; // assuming the data is already an ArrayBuffer\n }\n};\nexport default decodePacket;\n","import encodePacket from \"./encodePacket.js\";\nimport decodePacket from \"./decodePacket.js\";\nconst SEPARATOR = String.fromCharCode(30); // see https://en.wikipedia.org/wiki/Delimiter#ASCII_delimited_text\nconst encodePayload = (packets, callback) => {\n // some packets may be added to the array while encoding, so the initial length must be saved\n const length = packets.length;\n const encodedPackets = new Array(length);\n let count = 0;\n packets.forEach((packet, i) => {\n // force base64 encoding for binary packets\n encodePacket(packet, false, encodedPacket => {\n encodedPackets[i] = encodedPacket;\n if (++count === length) {\n callback(encodedPackets.join(SEPARATOR));\n }\n });\n });\n};\nconst decodePayload = (encodedPayload, binaryType) => {\n const encodedPackets = encodedPayload.split(SEPARATOR);\n const packets = [];\n for (let i = 0; i < encodedPackets.length; i++) {\n const decodedPacket = decodePacket(encodedPackets[i], binaryType);\n packets.push(decodedPacket);\n if (decodedPacket.type === \"error\") {\n break;\n }\n }\n return packets;\n};\nexport const protocol = 4;\nexport { encodePacket, encodePayload, decodePacket, decodePayload };\n","/**\n * Initialize a new `Emitter`.\n *\n * @api public\n */\n\nexport function Emitter(obj) {\n if (obj) return mixin(obj);\n}\n\n/**\n * Mixin the emitter properties.\n *\n * @param {Object} obj\n * @return {Object}\n * @api private\n */\n\nfunction mixin(obj) {\n for (var key in Emitter.prototype) {\n obj[key] = Emitter.prototype[key];\n }\n return obj;\n}\n\n/**\n * Listen on the given `event` with `fn`.\n *\n * @param {String} event\n * @param {Function} fn\n * @return {Emitter}\n * @api public\n */\n\nEmitter.prototype.on =\nEmitter.prototype.addEventListener = function(event, fn){\n this._callbacks = this._callbacks || {};\n (this._callbacks['$' + event] = this._callbacks['$' + event] || [])\n .push(fn);\n return this;\n};\n\n/**\n * Adds an `event` listener that will be invoked a single\n * time then automatically removed.\n *\n * @param {String} event\n * @param {Function} fn\n * @return {Emitter}\n * @api public\n */\n\nEmitter.prototype.once = function(event, fn){\n function on() {\n this.off(event, on);\n fn.apply(this, arguments);\n }\n\n on.fn = fn;\n this.on(event, on);\n return this;\n};\n\n/**\n * Remove the given callback for `event` or all\n * registered callbacks.\n *\n * @param {String} event\n * @param {Function} fn\n * @return {Emitter}\n * @api public\n */\n\nEmitter.prototype.off =\nEmitter.prototype.removeListener =\nEmitter.prototype.removeAllListeners =\nEmitter.prototype.removeEventListener = function(event, fn){\n this._callbacks = this._callbacks || {};\n\n // all\n if (0 == arguments.length) {\n this._callbacks = {};\n return this;\n }\n\n // specific event\n var callbacks = this._callbacks['$' + event];\n if (!callbacks) return this;\n\n // remove all handlers\n if (1 == arguments.length) {\n delete this._callbacks['$' + event];\n return this;\n }\n\n // remove specific handler\n var cb;\n for (var i = 0; i < callbacks.length; i++) {\n cb = callbacks[i];\n if (cb === fn || cb.fn === fn) {\n callbacks.splice(i, 1);\n break;\n }\n }\n\n // Remove event specific arrays for event types that no\n // one is subscribed for to avoid memory leak.\n if (callbacks.length === 0) {\n delete this._callbacks['$' + event];\n }\n\n return this;\n};\n\n/**\n * Emit `event` with the given args.\n *\n * @param {String} event\n * @param {Mixed} ...\n * @return {Emitter}\n */\n\nEmitter.prototype.emit = function(event){\n this._callbacks = this._callbacks || {};\n\n var args = new Array(arguments.length - 1)\n , callbacks = this._callbacks['$' + event];\n\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n\n if (callbacks) {\n callbacks = callbacks.slice(0);\n for (var i = 0, len = callbacks.length; i < len; ++i) {\n callbacks[i].apply(this, args);\n }\n }\n\n return this;\n};\n\n// alias used for reserved events (protected method)\nEmitter.prototype.emitReserved = Emitter.prototype.emit;\n\n/**\n * Return array of callbacks for `event`.\n *\n * @param {String} event\n * @return {Array}\n * @api public\n */\n\nEmitter.prototype.listeners = function(event){\n this._callbacks = this._callbacks || {};\n return this._callbacks['$' + event] || [];\n};\n\n/**\n * Check if this emitter has `event` handlers.\n *\n * @param {String} event\n * @return {Boolean}\n * @api public\n */\n\nEmitter.prototype.hasListeners = function(event){\n return !! this.listeners(event).length;\n};\n","export const globalThisShim = (() => {\n if (typeof self !== \"undefined\") {\n return self;\n }\n else if (typeof window !== \"undefined\") {\n return window;\n }\n else {\n return Function(\"return this\")();\n }\n})();\n","import { globalThisShim as globalThis } from \"./globalThis.js\";\nexport function pick(obj, ...attr) {\n return attr.reduce((acc, k) => {\n if (obj.hasOwnProperty(k)) {\n acc[k] = obj[k];\n }\n return acc;\n }, {});\n}\n// Keep a reference to the real timeout functions so they can be used when overridden\nconst NATIVE_SET_TIMEOUT = setTimeout;\nconst NATIVE_CLEAR_TIMEOUT = clearTimeout;\nexport function installTimerFunctions(obj, opts) {\n if (opts.useNativeTimers) {\n obj.setTimeoutFn = NATIVE_SET_TIMEOUT.bind(globalThis);\n obj.clearTimeoutFn = NATIVE_CLEAR_TIMEOUT.bind(globalThis);\n }\n else {\n obj.setTimeoutFn = setTimeout.bind(globalThis);\n obj.clearTimeoutFn = clearTimeout.bind(globalThis);\n }\n}\n// base64 encoded buffers are about 33% bigger (https://en.wikipedia.org/wiki/Base64)\nconst BASE64_OVERHEAD = 1.33;\n// we could also have used `new Blob([obj]).size`, but it isn't supported in IE9\nexport function byteLength(obj) {\n if (typeof obj === \"string\") {\n return utf8Length(obj);\n }\n // arraybuffer or blob\n return Math.ceil((obj.byteLength || obj.size) * BASE64_OVERHEAD);\n}\nfunction utf8Length(str) {\n let c = 0, length = 0;\n for (let i = 0, l = str.length; i < l; i++) {\n c = str.charCodeAt(i);\n if (c < 0x80) {\n length += 1;\n }\n else if (c < 0x800) {\n length += 2;\n }\n else if (c < 0xd800 || c >= 0xe000) {\n length += 3;\n }\n else {\n i++;\n length += 4;\n }\n }\n return length;\n}\n","import { decodePacket } from \"engine.io-parser\";\nimport { Emitter } from \"@socket.io/component-emitter\";\nimport { installTimerFunctions } from \"./util.js\";\nclass TransportError extends Error {\n constructor(reason, description, context) {\n super(reason);\n this.description = description;\n this.context = context;\n this.type = \"TransportError\";\n }\n}\nexport class Transport extends Emitter {\n /**\n * Transport abstract constructor.\n *\n * @param {Object} options.\n * @api private\n */\n constructor(opts) {\n super();\n this.writable = false;\n installTimerFunctions(this, opts);\n this.opts = opts;\n this.query = opts.query;\n this.readyState = \"\";\n this.socket = opts.socket;\n }\n /**\n * Emits an error.\n *\n * @param {String} reason\n * @param description\n * @param context - the error context\n * @return {Transport} for chaining\n * @api protected\n */\n onError(reason, description, context) {\n super.emitReserved(\"error\", new TransportError(reason, description, context));\n return this;\n }\n /**\n * Opens the transport.\n *\n * @api public\n */\n open() {\n if (\"closed\" === this.readyState || \"\" === this.readyState) {\n this.readyState = \"opening\";\n this.doOpen();\n }\n return this;\n }\n /**\n * Closes the transport.\n *\n * @api public\n */\n close() {\n if (\"opening\" === this.readyState || \"open\" === this.readyState) {\n this.doClose();\n this.onClose();\n }\n return this;\n }\n /**\n * Sends multiple packets.\n *\n * @param {Array} packets\n * @api public\n */\n send(packets) {\n if (\"open\" === this.readyState) {\n this.write(packets);\n }\n else {\n // this might happen if the transport was silently closed in the beforeunload event handler\n }\n }\n /**\n * Called upon open\n *\n * @api protected\n */\n onOpen() {\n this.readyState = \"open\";\n this.writable = true;\n super.emitReserved(\"open\");\n }\n /**\n * Called with data.\n *\n * @param {String} data\n * @api protected\n */\n onData(data) {\n const packet = decodePacket(data, this.socket.binaryType);\n this.onPacket(packet);\n }\n /**\n * Called with a decoded packet.\n *\n * @api protected\n */\n onPacket(packet) {\n super.emitReserved(\"packet\", packet);\n }\n /**\n * Called upon close.\n *\n * @api protected\n */\n onClose(details) {\n this.readyState = \"closed\";\n super.emitReserved(\"close\", details);\n }\n}\n","// imported from https://github.com/unshiftio/yeast\n'use strict';\nconst alphabet = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_'.split(''), length = 64, map = {};\nlet seed = 0, i = 0, prev;\n/**\n * Return a string representing the specified number.\n *\n * @param {Number} num The number to convert.\n * @returns {String} The string representation of the number.\n * @api public\n */\nexport function encode(num) {\n let encoded = '';\n do {\n encoded = alphabet[num % length] + encoded;\n num = Math.floor(num / length);\n } while (num > 0);\n return encoded;\n}\n/**\n * Return the integer value specified by the given string.\n *\n * @param {String} str The string to convert.\n * @returns {Number} The integer value represented by the string.\n * @api public\n */\nexport function decode(str) {\n let decoded = 0;\n for (i = 0; i < str.length; i++) {\n decoded = decoded * length + map[str.charAt(i)];\n }\n return decoded;\n}\n/**\n * Yeast: A tiny growing id generator.\n *\n * @returns {String} A unique id.\n * @api public\n */\nexport function yeast() {\n const now = encode(+new Date());\n if (now !== prev)\n return seed = 0, prev = now;\n return now + '.' + encode(seed++);\n}\n//\n// Map each character to its index.\n//\nfor (; i < length; i++)\n map[alphabet[i]] = i;\n","// imported from https://github.com/galkn/querystring\n/**\n * Compiles a querystring\n * Returns string representation of the object\n *\n * @param {Object}\n * @api private\n */\nexport function encode(obj) {\n let str = '';\n for (let i in obj) {\n if (obj.hasOwnProperty(i)) {\n if (str.length)\n str += '&';\n str += encodeURIComponent(i) + '=' + encodeURIComponent(obj[i]);\n }\n }\n return str;\n}\n/**\n * Parses a simple querystring into an object\n *\n * @param {String} qs\n * @api private\n */\nexport function decode(qs) {\n let qry = {};\n let pairs = qs.split('&');\n for (let i = 0, l = pairs.length; i < l; i++) {\n let pair = pairs[i].split('=');\n qry[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1]);\n }\n return qry;\n}\n","// imported from https://github.com/component/has-cors\nlet value = false;\ntry {\n value = typeof XMLHttpRequest !== 'undefined' &&\n 'withCredentials' in new XMLHttpRequest();\n}\ncatch (err) {\n // if XMLHttp support is disabled in IE then it will throw\n // when trying to create\n}\nexport const hasCORS = value;\n","// browser shim for xmlhttprequest module\nimport { hasCORS } from \"../contrib/has-cors.js\";\nimport { globalThisShim as globalThis } from \"../globalThis.js\";\nexport function XHR(opts) {\n const xdomain = opts.xdomain;\n // XMLHttpRequest can be disabled on IE\n try {\n if (\"undefined\" !== typeof XMLHttpRequest && (!xdomain || hasCORS)) {\n return new XMLHttpRequest();\n }\n }\n catch (e) { }\n if (!xdomain) {\n try {\n return new globalThis[[\"Active\"].concat(\"Object\").join(\"X\")](\"Microsoft.XMLHTTP\");\n }\n catch (e) { }\n }\n}\n","import { Transport } from \"../transport.js\";\nimport { yeast } from \"../contrib/yeast.js\";\nimport { encode } from \"../contrib/parseqs.js\";\nimport { encodePayload, decodePayload } from \"engine.io-parser\";\nimport { XHR as XMLHttpRequest } from \"./xmlhttprequest.js\";\nimport { Emitter } from \"@socket.io/component-emitter\";\nimport { installTimerFunctions, pick } from \"../util.js\";\nimport { globalThisShim as globalThis } from \"../globalThis.js\";\nfunction empty() { }\nconst hasXHR2 = (function () {\n const xhr = new XMLHttpRequest({\n xdomain: false\n });\n return null != xhr.responseType;\n})();\nexport class Polling extends Transport {\n /**\n * XHR Polling constructor.\n *\n * @param {Object} opts\n * @api public\n */\n constructor(opts) {\n super(opts);\n this.polling = false;\n if (typeof location !== \"undefined\") {\n const isSSL = \"https:\" === location.protocol;\n let port = location.port;\n // some user agents have empty `location.port`\n if (!port) {\n port = isSSL ? \"443\" : \"80\";\n }\n this.xd =\n (typeof location !== \"undefined\" &&\n opts.hostname !== location.hostname) ||\n port !== opts.port;\n this.xs = opts.secure !== isSSL;\n }\n /**\n * XHR supports binary\n */\n const forceBase64 = opts && opts.forceBase64;\n this.supportsBinary = hasXHR2 && !forceBase64;\n }\n /**\n * Transport name.\n */\n get name() {\n return \"polling\";\n }\n /**\n * Opens the socket (triggers polling). We write a PING message to determine\n * when the transport is open.\n *\n * @api private\n */\n doOpen() {\n this.poll();\n }\n /**\n * Pauses polling.\n *\n * @param {Function} callback upon buffers are flushed and transport is paused\n * @api private\n */\n pause(onPause) {\n this.readyState = \"pausing\";\n const pause = () => {\n this.readyState = \"paused\";\n onPause();\n };\n if (this.polling || !this.writable) {\n let total = 0;\n if (this.polling) {\n total++;\n this.once(\"pollComplete\", function () {\n --total || pause();\n });\n }\n if (!this.writable) {\n total++;\n this.once(\"drain\", function () {\n --total || pause();\n });\n }\n }\n else {\n pause();\n }\n }\n /**\n * Starts polling cycle.\n *\n * @api public\n */\n poll() {\n this.polling = true;\n this.doPoll();\n this.emitReserved(\"poll\");\n }\n /**\n * Overloads onData to detect payloads.\n *\n * @api private\n */\n onData(data) {\n const callback = packet => {\n // if its the first message we consider the transport open\n if (\"opening\" === this.readyState && packet.type === \"open\") {\n this.onOpen();\n }\n // if its a close packet, we close the ongoing requests\n if (\"close\" === packet.type) {\n this.onClose({ description: \"transport closed by the server\" });\n return false;\n }\n // otherwise bypass onData and handle the message\n this.onPacket(packet);\n };\n // decode payload\n decodePayload(data, this.socket.binaryType).forEach(callback);\n // if an event did not trigger closing\n if (\"closed\" !== this.readyState) {\n // if we got data we're not polling\n this.polling = false;\n this.emitReserved(\"pollComplete\");\n if (\"open\" === this.readyState) {\n this.poll();\n }\n else {\n }\n }\n }\n /**\n * For polling, send a close packet.\n *\n * @api private\n */\n doClose() {\n const close = () => {\n this.write([{ type: \"close\" }]);\n };\n if (\"open\" === this.readyState) {\n close();\n }\n else {\n // in case we're trying to close while\n // handshaking is in progress (GH-164)\n this.once(\"open\", close);\n }\n }\n /**\n * Writes a packets payload.\n *\n * @param {Array} data packets\n * @param {Function} drain callback\n * @api private\n */\n write(packets) {\n this.writable = false;\n encodePayload(packets, data => {\n this.doWrite(data, () => {\n this.writable = true;\n this.emitReserved(\"drain\");\n });\n });\n }\n /**\n * Generates uri for connection.\n *\n * @api private\n */\n uri() {\n let query = this.query || {};\n const schema = this.opts.secure ? \"https\" : \"http\";\n let port = \"\";\n // cache busting is forced\n if (false !== this.opts.timestampRequests) {\n query[this.opts.timestampParam] = yeast();\n }\n if (!this.supportsBinary && !query.sid) {\n query.b64 = 1;\n }\n // avoid port if default for schema\n if (this.opts.port &&\n ((\"https\" === schema && Number(this.opts.port) !== 443) ||\n (\"http\" === schema && Number(this.opts.port) !== 80))) {\n port = \":\" + this.opts.port;\n }\n const encodedQuery = encode(query);\n const ipv6 = this.opts.hostname.indexOf(\":\") !== -1;\n return (schema +\n \"://\" +\n (ipv6 ? \"[\" + this.opts.hostname + \"]\" : this.opts.hostname) +\n port +\n this.opts.path +\n (encodedQuery.length ? \"?\" + encodedQuery : \"\"));\n }\n /**\n * Creates a request.\n *\n * @param {String} method\n * @api private\n */\n request(opts = {}) {\n Object.assign(opts, { xd: this.xd, xs: this.xs }, this.opts);\n return new Request(this.uri(), opts);\n }\n /**\n * Sends data.\n *\n * @param {String} data to send.\n * @param {Function} called upon flush.\n * @api private\n */\n doWrite(data, fn) {\n const req = this.request({\n method: \"POST\",\n data: data\n });\n req.on(\"success\", fn);\n req.on(\"error\", (xhrStatus, context) => {\n this.onError(\"xhr post error\", xhrStatus, context);\n });\n }\n /**\n * Starts a poll cycle.\n *\n * @api private\n */\n doPoll() {\n const req = this.request();\n req.on(\"data\", this.onData.bind(this));\n req.on(\"error\", (xhrStatus, context) => {\n this.onError(\"xhr poll error\", xhrStatus, context);\n });\n this.pollXhr = req;\n }\n}\nexport class Request extends Emitter {\n /**\n * Request constructor\n *\n * @param {Object} options\n * @api public\n */\n constructor(uri, opts) {\n super();\n installTimerFunctions(this, opts);\n this.opts = opts;\n this.method = opts.method || \"GET\";\n this.uri = uri;\n this.async = false !== opts.async;\n this.data = undefined !== opts.data ? opts.data : null;\n this.create();\n }\n /**\n * Creates the XHR object and sends the request.\n *\n * @api private\n */\n create() {\n const opts = pick(this.opts, \"agent\", \"pfx\", \"key\", \"passphrase\", \"cert\", \"ca\", \"ciphers\", \"rejectUnauthorized\", \"autoUnref\");\n opts.xdomain = !!this.opts.xd;\n opts.xscheme = !!this.opts.xs;\n const xhr = (this.xhr = new XMLHttpRequest(opts));\n try {\n xhr.open(this.method, this.uri, this.async);\n try {\n if (this.opts.extraHeaders) {\n xhr.setDisableHeaderCheck && xhr.setDisableHeaderCheck(true);\n for (let i in this.opts.extraHeaders) {\n if (this.opts.extraHeaders.hasOwnProperty(i)) {\n xhr.setRequestHeader(i, this.opts.extraHeaders[i]);\n }\n }\n }\n }\n catch (e) { }\n if (\"POST\" === this.method) {\n try {\n xhr.setRequestHeader(\"Content-type\", \"text/plain;charset=UTF-8\");\n }\n catch (e) { }\n }\n try {\n xhr.setRequestHeader(\"Accept\", \"*/*\");\n }\n catch (e) { }\n // ie6 check\n if (\"withCredentials\" in xhr) {\n xhr.withCredentials = this.opts.withCredentials;\n }\n if (this.opts.requestTimeout) {\n xhr.timeout = this.opts.requestTimeout;\n }\n xhr.onreadystatechange = () => {\n if (4 !== xhr.readyState)\n return;\n if (200 === xhr.status || 1223 === xhr.status) {\n this.onLoad();\n }\n else {\n // make sure the `error` event handler that's user-set\n // does not throw in the same tick and gets caught here\n this.setTimeoutFn(() => {\n this.onError(typeof xhr.status === \"number\" ? xhr.status : 0);\n }, 0);\n }\n };\n xhr.send(this.data);\n }\n catch (e) {\n // Need to defer since .create() is called directly from the constructor\n // and thus the 'error' event can only be only bound *after* this exception\n // occurs. Therefore, also, we cannot throw here at all.\n this.setTimeoutFn(() => {\n this.onError(e);\n }, 0);\n return;\n }\n if (typeof document !== \"undefined\") {\n this.index = Request.requestsCount++;\n Request.requests[this.index] = this;\n }\n }\n /**\n * Called upon error.\n *\n * @api private\n */\n onError(err) {\n this.emitReserved(\"error\", err, this.xhr);\n this.cleanup(true);\n }\n /**\n * Cleans up house.\n *\n * @api private\n */\n cleanup(fromError) {\n if (\"undefined\" === typeof this.xhr || null === this.xhr) {\n return;\n }\n this.xhr.onreadystatechange = empty;\n if (fromError) {\n try {\n this.xhr.abort();\n }\n catch (e) { }\n }\n if (typeof document !== \"undefined\") {\n delete Request.requests[this.index];\n }\n this.xhr = null;\n }\n /**\n * Called upon load.\n *\n * @api private\n */\n onLoad() {\n const data = this.xhr.responseText;\n if (data !== null) {\n this.emitReserved(\"data\", data);\n this.emitReserved(\"success\");\n this.cleanup();\n }\n }\n /**\n * Aborts the request.\n *\n * @api public\n */\n abort() {\n this.cleanup();\n }\n}\nRequest.requestsCount = 0;\nRequest.requests = {};\n/**\n * Aborts pending requests when unloading the window. This is needed to prevent\n * memory leaks (e.g. when using IE) and to ensure that no spurious error is\n * emitted.\n */\nif (typeof document !== \"undefined\") {\n // @ts-ignore\n if (typeof attachEvent === \"function\") {\n // @ts-ignore\n attachEvent(\"onunload\", unloadHandler);\n }\n else if (typeof addEventListener === \"function\") {\n const terminationEvent = \"onpagehide\" in globalThis ? \"pagehide\" : \"unload\";\n addEventListener(terminationEvent, unloadHandler, false);\n }\n}\nfunction unloadHandler() {\n for (let i in Request.requests) {\n if (Request.requests.hasOwnProperty(i)) {\n Request.requests[i].abort();\n }\n }\n}\n","import { globalThisShim as globalThis } from \"../globalThis.js\";\nexport const nextTick = (() => {\n const isPromiseAvailable = typeof Promise === \"function\" && typeof Promise.resolve === \"function\";\n if (isPromiseAvailable) {\n return cb => Promise.resolve().then(cb);\n }\n else {\n return (cb, setTimeoutFn) => setTimeoutFn(cb, 0);\n }\n})();\nexport const WebSocket = globalThis.WebSocket || globalThis.MozWebSocket;\nexport const usingBrowserWebSocket = true;\nexport const defaultBinaryType = \"arraybuffer\";\n","import { Transport } from \"../transport.js\";\nimport { encode } from \"../contrib/parseqs.js\";\nimport { yeast } from \"../contrib/yeast.js\";\nimport { pick } from \"../util.js\";\nimport { defaultBinaryType, nextTick, usingBrowserWebSocket, WebSocket } from \"./websocket-constructor.js\";\nimport { encodePacket } from \"engine.io-parser\";\n// detect ReactNative environment\nconst isReactNative = typeof navigator !== \"undefined\" &&\n typeof navigator.product === \"string\" &&\n navigator.product.toLowerCase() === \"reactnative\";\nexport class WS extends Transport {\n /**\n * WebSocket transport constructor.\n *\n * @api {Object} connection options\n * @api public\n */\n constructor(opts) {\n super(opts);\n this.supportsBinary = !opts.forceBase64;\n }\n /**\n * Transport name.\n *\n * @api public\n */\n get name() {\n return \"websocket\";\n }\n /**\n * Opens socket.\n *\n * @api private\n */\n doOpen() {\n if (!this.check()) {\n // let probe timeout\n return;\n }\n const uri = this.uri();\n const protocols = this.opts.protocols;\n // React Native only supports the 'headers' option, and will print a warning if anything else is passed\n const opts = isReactNative\n ? {}\n : pick(this.opts, \"agent\", \"perMessageDeflate\", \"pfx\", \"key\", \"passphrase\", \"cert\", \"ca\", \"ciphers\", \"rejectUnauthorized\", \"localAddress\", \"protocolVersion\", \"origin\", \"maxPayload\", \"family\", \"checkServerIdentity\");\n if (this.opts.extraHeaders) {\n opts.headers = this.opts.extraHeaders;\n }\n try {\n this.ws =\n usingBrowserWebSocket && !isReactNative\n ? protocols\n ? new WebSocket(uri, protocols)\n : new WebSocket(uri)\n : new WebSocket(uri, protocols, opts);\n }\n catch (err) {\n return this.emitReserved(\"error\", err);\n }\n this.ws.binaryType = this.socket.binaryType || defaultBinaryType;\n this.addEventListeners();\n }\n /**\n * Adds event listeners to the socket\n *\n * @api private\n */\n addEventListeners() {\n this.ws.onopen = () => {\n if (this.opts.autoUnref) {\n this.ws._socket.unref();\n }\n this.onOpen();\n };\n this.ws.onclose = closeEvent => this.onClose({\n description: \"websocket connection closed\",\n context: closeEvent\n });\n this.ws.onmessage = ev => this.onData(ev.data);\n this.ws.onerror = e => this.onError(\"websocket error\", e);\n }\n /**\n * Writes data to socket.\n *\n * @param {Array} array of packets.\n * @api private\n */\n write(packets) {\n this.writable = false;\n // encodePacket efficient as it uses WS framing\n // no need for encodePayload\n for (let i = 0; i < packets.length; i++) {\n const packet = packets[i];\n const lastPacket = i === packets.length - 1;\n encodePacket(packet, this.supportsBinary, data => {\n // always create a new object (GH-437)\n const opts = {};\n if (!usingBrowserWebSocket) {\n if (packet.options) {\n opts.compress = packet.options.compress;\n }\n if (this.opts.perMessageDeflate) {\n const len = \n // @ts-ignore\n \"string\" === typeof data ? Buffer.byteLength(data) : data.length;\n if (len < this.opts.perMessageDeflate.threshold) {\n opts.compress = false;\n }\n }\n }\n // Sometimes the websocket has already been closed but the browser didn't\n // have a chance of informing us about it yet, in that case send will\n // throw an error\n try {\n if (usingBrowserWebSocket) {\n // TypeError is thrown when passing the second argument on Safari\n this.ws.send(data);\n }\n else {\n this.ws.send(data, opts);\n }\n }\n catch (e) {\n }\n if (lastPacket) {\n // fake drain\n // defer to next tick to allow Socket to clear writeBuffer\n nextTick(() => {\n this.writable = true;\n this.emitReserved(\"drain\");\n }, this.setTimeoutFn);\n }\n });\n }\n }\n /**\n * Closes socket.\n *\n * @api private\n */\n doClose() {\n if (typeof this.ws !== \"undefined\") {\n this.ws.close();\n this.ws = null;\n }\n }\n /**\n * Generates uri for connection.\n *\n * @api private\n */\n uri() {\n let query = this.query || {};\n const schema = this.opts.secure ? \"wss\" : \"ws\";\n let port = \"\";\n // avoid port if default for schema\n if (this.opts.port &&\n ((\"wss\" === schema && Number(this.opts.port) !== 443) ||\n (\"ws\" === schema && Number(this.opts.port) !== 80))) {\n port = \":\" + this.opts.port;\n }\n // append timestamp to URI\n if (this.opts.timestampRequests) {\n query[this.opts.timestampParam] = yeast();\n }\n // communicate binary support capabilities\n if (!this.supportsBinary) {\n query.b64 = 1;\n }\n const encodedQuery = encode(query);\n const ipv6 = this.opts.hostname.indexOf(\":\") !== -1;\n return (schema +\n \"://\" +\n (ipv6 ? \"[\" + this.opts.hostname + \"]\" : this.opts.hostname) +\n port +\n this.opts.path +\n (encodedQuery.length ? \"?\" + encodedQuery : \"\"));\n }\n /**\n * Feature detection for WebSocket.\n *\n * @return {Boolean} whether this transport is available.\n * @api public\n */\n check() {\n return !!WebSocket;\n }\n}\n","import { Polling } from \"./polling.js\";\nimport { WS } from \"./websocket.js\";\nexport const transports = {\n websocket: WS,\n polling: Polling\n};\n","// imported from https://github.com/galkn/parseuri\n/**\n * Parses an URI\n *\n * @author Steven Levithan <stevenlevithan.com> (MIT license)\n * @api private\n */\nconst re = /^(?:(?![^:@]+:[^:@\\/]*@)(http|https|ws|wss):\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/;\nconst parts = [\n 'source', 'protocol', 'authority', 'userInfo', 'user', 'password', 'host', 'port', 'relative', 'path', 'directory', 'file', 'query', 'anchor'\n];\nexport function parse(str) {\n const src = str, b = str.indexOf('['), e = str.indexOf(']');\n if (b != -1 && e != -1) {\n str = str.substring(0, b) + str.substring(b, e).replace(/:/g, ';') + str.substring(e, str.length);\n }\n let m = re.exec(str || ''), uri = {}, i = 14;\n while (i--) {\n uri[parts[i]] = m[i] || '';\n }\n if (b != -1 && e != -1) {\n uri.source = src;\n uri.host = uri.host.substring(1, uri.host.length - 1).replace(/;/g, ':');\n uri.authority = uri.authority.replace('[', '').replace(']', '').replace(/;/g, ':');\n uri.ipv6uri = true;\n }\n uri.pathNames = pathNames(uri, uri['path']);\n uri.queryKey = queryKey(uri, uri['query']);\n return uri;\n}\nfunction pathNames(obj, path) {\n const regx = /\\/{2,9}/g, names = path.replace(regx, \"/\").split(\"/\");\n if (path.slice(0, 1) == '/' || path.length === 0) {\n names.splice(0, 1);\n }\n if (path.slice(-1) == '/') {\n names.splice(names.length - 1, 1);\n }\n return names;\n}\nfunction queryKey(uri, query) {\n const data = {};\n query.replace(/(?:^|&)([^&=]*)=?([^&]*)/g, function ($0, $1, $2) {\n if ($1) {\n data[$1] = $2;\n }\n });\n return data;\n}\n","import { transports } from \"./transports/index.js\";\nimport { installTimerFunctions, byteLength } from \"./util.js\";\nimport { decode } from \"./contrib/parseqs.js\";\nimport { parse } from \"./contrib/parseuri.js\";\nimport { Emitter } from \"@socket.io/component-emitter\";\nimport { protocol } from \"engine.io-parser\";\nexport class Socket extends Emitter {\n /**\n * Socket constructor.\n *\n * @param {String|Object} uri or options\n * @param {Object} opts - options\n * @api public\n */\n constructor(uri, opts = {}) {\n super();\n if (uri && \"object\" === typeof uri) {\n opts = uri;\n uri = null;\n }\n if (uri) {\n uri = parse(uri);\n opts.hostname = uri.host;\n opts.secure = uri.protocol === \"https\" || uri.protocol === \"wss\";\n opts.port = uri.port;\n if (uri.query)\n opts.query = uri.query;\n }\n else if (opts.host) {\n opts.hostname = parse(opts.host).host;\n }\n installTimerFunctions(this, opts);\n this.secure =\n null != opts.secure\n ? opts.secure\n : typeof location !== \"undefined\" && \"https:\" === location.protocol;\n if (opts.hostname && !opts.port) {\n // if no port is specified manually, use the protocol default\n opts.port = this.secure ? \"443\" : \"80\";\n }\n this.hostname =\n opts.hostname ||\n (typeof location !== \"undefined\" ? location.hostname : \"localhost\");\n this.port =\n opts.port ||\n (typeof location !== \"undefined\" && location.port\n ? location.port\n : this.secure\n ? \"443\"\n : \"80\");\n this.transports = opts.transports || [\"polling\", \"websocket\"];\n this.readyState = \"\";\n this.writeBuffer = [];\n this.prevBufferLen = 0;\n this.opts = Object.assign({\n path: \"/engine.io\",\n agent: false,\n withCredentials: false,\n upgrade: true,\n timestampParam: \"t\",\n rememberUpgrade: false,\n rejectUnauthorized: true,\n perMessageDeflate: {\n threshold: 1024\n },\n transportOptions: {},\n closeOnBeforeunload: true\n }, opts);\n this.opts.path = this.opts.path.replace(/\\/$/, \"\") + \"/\";\n if (typeof this.opts.query === \"string\") {\n this.opts.query = decode(this.opts.query);\n }\n // set on handshake\n this.id = null;\n this.upgrades = null;\n this.pingInterval = null;\n this.pingTimeout = null;\n // set on heartbeat\n this.pingTimeoutTimer = null;\n if (typeof addEventListener === \"function\") {\n if (this.opts.closeOnBeforeunload) {\n // Firefox closes the connection when the \"beforeunload\" event is emitted but not Chrome. This event listener\n // ensures every browser behaves the same (no \"disconnect\" event at the Socket.IO level when the page is\n // closed/reloaded)\n this.beforeunloadEventListener = () => {\n if (this.transport) {\n // silently close the transport\n this.transport.removeAllListeners();\n this.transport.close();\n }\n };\n addEventListener(\"beforeunload\", this.beforeunloadEventListener, false);\n }\n if (this.hostname !== \"localhost\") {\n this.offlineEventListener = () => {\n this.onClose(\"transport close\", {\n description: \"network connection lost\"\n });\n };\n addEventListener(\"offline\", this.offlineEventListener, false);\n }\n }\n this.open();\n }\n /**\n * Creates transport of the given type.\n *\n * @param {String} transport name\n * @return {Transport}\n * @api private\n */\n createTransport(name) {\n const query = Object.assign({}, this.opts.query);\n // append engine.io protocol identifier\n query.EIO = protocol;\n // transport name\n query.transport = name;\n // session id if we already have one\n if (this.id)\n query.sid = this.id;\n const opts = Object.assign({}, this.opts.transportOptions[name], this.opts, {\n query,\n socket: this,\n hostname: this.hostname,\n secure: this.secure,\n port: this.port\n });\n return new transports[name](opts);\n }\n /**\n * Initializes transport to use and starts probe.\n *\n * @api private\n */\n open() {\n let transport;\n if (this.opts.rememberUpgrade &&\n Socket.priorWebsocketSuccess &&\n this.transports.indexOf(\"websocket\") !== -1) {\n transport = \"websocket\";\n }\n else if (0 === this.transports.length) {\n // Emit error on next tick so it can be listened to\n this.setTimeoutFn(() => {\n this.emitReserved(\"error\", \"No transports available\");\n }, 0);\n return;\n }\n else {\n transport = this.transports[0];\n }\n this.readyState = \"opening\";\n // Retry with the next transport if the transport is disabled (jsonp: false)\n try {\n transport = this.createTransport(transport);\n }\n catch (e) {\n this.transports.shift();\n this.open();\n return;\n }\n transport.open();\n this.setTransport(transport);\n }\n /**\n * Sets the current transport. Disables the existing one (if any).\n *\n * @api private\n */\n setTransport(transport) {\n if (this.transport) {\n this.transport.removeAllListeners();\n }\n // set up transport\n this.transport = transport;\n // set up transport listeners\n transport\n .on(\"drain\", this.onDrain.bind(this))\n .on(\"packet\", this.onPacket.bind(this))\n .on(\"error\", this.onError.bind(this))\n .on(\"close\", reason => this.onClose(\"transport close\", reason));\n }\n /**\n * Probes a transport.\n *\n * @param {String} transport name\n * @api private\n */\n probe(name) {\n let transport = this.createTransport(name);\n let failed = false;\n Socket.priorWebsocketSuccess = false;\n const onTransportOpen = () => {\n if (failed)\n return;\n transport.send([{ type: \"ping\", data: \"probe\" }]);\n transport.once(\"packet\", msg => {\n if (failed)\n return;\n if (\"pong\" === msg.type && \"probe\" === msg.data) {\n this.upgrading = true;\n this.emitReserved(\"upgrading\", transport);\n if (!transport)\n return;\n Socket.priorWebsocketSuccess = \"websocket\" === transport.name;\n this.transport.pause(() => {\n if (failed)\n return;\n if (\"closed\" === this.readyState)\n return;\n cleanup();\n this.setTransport(transport);\n transport.send([{ type: \"upgrade\" }]);\n this.emitReserved(\"upgrade\", transport);\n transport = null;\n this.upgrading = false;\n this.flush();\n });\n }\n else {\n const err = new Error(\"probe error\");\n // @ts-ignore\n err.transport = transport.name;\n this.emitReserved(\"upgradeError\", err);\n }\n });\n };\n function freezeTransport() {\n if (failed)\n return;\n // Any callback called by transport should be ignored since now\n failed = true;\n cleanup();\n transport.close();\n transport = null;\n }\n // Handle any error that happens while probing\n const onerror = err => {\n const error = new Error(\"probe error: \" + err);\n // @ts-ignore\n error.transport = transport.name;\n freezeTransport();\n this.emitReserved(\"upgradeError\", error);\n };\n function onTransportClose() {\n onerror(\"transport closed\");\n }\n // When the socket is closed while we're probing\n function onclose() {\n onerror(\"socket closed\");\n }\n // When the socket is upgraded while we're probing\n function onupgrade(to) {\n if (transport && to.name !== transport.name) {\n freezeTransport();\n }\n }\n // Remove all listeners on the transport and on self\n const cleanup = () => {\n transport.removeListener(\"open\", onTransportOpen);\n transport.removeListener(\"error\", onerror);\n transport.removeListener(\"close\", onTransportClose);\n this.off(\"close\", onclose);\n this.off(\"upgrading\", onupgrade);\n };\n transport.once(\"open\", onTransportOpen);\n transport.once(\"error\", onerror);\n transport.once(\"close\", onTransportClose);\n this.once(\"close\", onclose);\n this.once(\"upgrading\", onupgrade);\n transport.open();\n }\n /**\n * Called when connection is deemed open.\n *\n * @api private\n */\n onOpen() {\n this.readyState = \"open\";\n Socket.priorWebsocketSuccess = \"websocket\" === this.transport.name;\n this.emitReserved(\"open\");\n this.flush();\n // we check for `readyState` in case an `open`\n // listener already closed the socket\n if (\"open\" === this.readyState &&\n this.opts.upgrade &&\n this.transport.pause) {\n let i = 0;\n const l = this.upgrades.length;\n for (; i < l; i++) {\n this.probe(this.upgrades[i]);\n }\n }\n }\n /**\n * Handles a packet.\n *\n * @api private\n */\n onPacket(packet) {\n if (\"opening\" === this.readyState ||\n \"open\" === this.readyState ||\n \"closing\" === this.readyState) {\n this.emitReserved(\"packet\", packet);\n // Socket is live - any packet counts\n this.emitReserved(\"heartbeat\");\n switch (packet.type) {\n case \"open\":\n this.onHandshake(JSON.parse(packet.data));\n break;\n case \"ping\":\n this.resetPingTimeout();\n this.sendPacket(\"pong\");\n this.emitReserved(\"ping\");\n this.emitReserved(\"pong\");\n break;\n case \"error\":\n const err = new Error(\"server error\");\n // @ts-ignore\n err.code = packet.data;\n this.onError(err);\n break;\n case \"message\":\n this.emitReserved(\"data\", packet.data);\n this.emitReserved(\"message\", packet.data);\n break;\n }\n }\n else {\n }\n }\n /**\n * Called upon handshake completion.\n *\n * @param {Object} data - handshake obj\n * @api private\n */\n onHandshake(data) {\n this.emitReserved(\"handshake\", data);\n this.id = data.sid;\n this.transport.query.sid = data.sid;\n this.upgrades = this.filterUpgrades(data.upgrades);\n this.pingInterval = data.pingInterval;\n this.pingTimeout = data.pingTimeout;\n this.maxPayload = data.maxPayload;\n this.onOpen();\n // In case open handler closes socket\n if (\"closed\" === this.readyState)\n return;\n this.resetPingTimeout();\n }\n /**\n * Sets and resets ping timeout timer based on server pings.\n *\n * @api private\n */\n resetPingTimeout() {\n this.clearTimeoutFn(this.pingTimeoutTimer);\n this.pingTimeoutTimer = this.setTimeoutFn(() => {\n this.onClose(\"ping timeout\");\n }, this.pingInterval + this.pingTimeout);\n if (this.opts.autoUnref) {\n this.pingTimeoutTimer.unref();\n }\n }\n /**\n * Called on `drain` event\n *\n * @api private\n */\n onDrain() {\n this.writeBuffer.splice(0, this.prevBufferLen);\n // setting prevBufferLen = 0 is very important\n // for example, when upgrading, upgrade packet is sent over,\n // and a nonzero prevBufferLen could cause problems on `drain`\n this.prevBufferLen = 0;\n if (0 === this.writeBuffer.length) {\n this.emitReserved(\"drain\");\n }\n else {\n this.flush();\n }\n }\n /**\n * Flush write buffers.\n *\n * @api private\n */\n flush() {\n if (\"closed\" !== this.readyState &&\n this.transport.writable &&\n !this.upgrading &&\n this.writeBuffer.length) {\n const packets = this.getWritablePackets();\n this.transport.send(packets);\n // keep track of current length of writeBuffer\n // splice writeBuffer and callbackBuffer on `drain`\n this.prevBufferLen = packets.length;\n this.emitReserved(\"flush\");\n }\n }\n /**\n * Ensure the encoded size of the writeBuffer is below the maxPayload value sent by the server (only for HTTP\n * long-polling)\n *\n * @private\n */\n getWritablePackets() {\n const shouldCheckPayloadSize = this.maxPayload &&\n this.transport.name === \"polling\" &&\n this.writeBuffer.length > 1;\n if (!shouldCheckPayloadSize) {\n return this.writeBuffer;\n }\n let payloadSize = 1; // first packet type\n for (let i = 0; i < this.writeBuffer.length; i++) {\n const data = this.writeBuffer[i].data;\n if (data) {\n payloadSize += byteLength(data);\n }\n if (i > 0 && payloadSize > this.maxPayload) {\n return this.writeBuffer.slice(0, i);\n }\n payloadSize += 2; // separator + packet type\n }\n return this.writeBuffer;\n }\n /**\n * Sends a message.\n *\n * @param {String} message.\n * @param {Function} callback function.\n * @param {Object} options.\n * @return {Socket} for chaining.\n * @api public\n */\n write(msg, options, fn) {\n this.sendPacket(\"message\", msg, options, fn);\n return this;\n }\n send(msg, options, fn) {\n this.sendPacket(\"message\", msg, options, fn);\n return this;\n }\n /**\n * Sends a packet.\n *\n * @param {String} packet type.\n * @param {String} data.\n * @param {Object} options.\n * @param {Function} callback function.\n * @api private\n */\n sendPacket(type, data, options, fn) {\n if (\"function\" === typeof data) {\n fn = data;\n data = undefined;\n }\n if (\"function\" === typeof options) {\n fn = options;\n options = null;\n }\n if (\"closing\" === this.readyState || \"closed\" === this.readyState) {\n return;\n }\n options = options || {};\n options.compress = false !== options.compress;\n const packet = {\n type: type,\n data: data,\n options: options\n };\n this.emitReserved(\"packetCreate\", packet);\n this.writeBuffer.push(packet);\n if (fn)\n this.once(\"flush\", fn);\n this.flush();\n }\n /**\n * Closes the connection.\n *\n * @api public\n */\n close() {\n const close = () => {\n this.onClose(\"forced close\");\n this.transport.close();\n };\n const cleanupAndClose = () => {\n this.off(\"upgrade\", cleanupAndClose);\n this.off(\"upgradeError\", cleanupAndClose);\n close();\n };\n const waitForUpgrade = () => {\n // wait for upgrade to finish since we can't send packets while pausing a transport\n this.once(\"upgrade\", cleanupAndClose);\n this.once(\"upgradeError\", cleanupAndClose);\n };\n if (\"opening\" === this.readyState || \"open\" === this.readyState) {\n this.readyState = \"closing\";\n if (this.writeBuffer.length) {\n this.once(\"drain\", () => {\n if (this.upgrading) {\n waitForUpgrade();\n }\n else {\n close();\n }\n });\n }\n else if (this.upgrading) {\n waitForUpgrade();\n }\n else {\n close();\n }\n }\n return this;\n }\n /**\n * Called upon transport error\n *\n * @api private\n */\n onError(err) {\n Socket.priorWebsocketSuccess = false;\n this.emitReserved(\"error\", err);\n this.onClose(\"transport error\", err);\n }\n /**\n * Called upon transport close.\n *\n * @api private\n */\n onClose(reason, description) {\n if (\"opening\" === this.readyState ||\n \"open\" === this.readyState ||\n \"closing\" === this.readyState) {\n // clear timers\n this.clearTimeoutFn(this.pingTimeoutTimer);\n // stop event from firing again for transport\n this.transport.removeAllListeners(\"close\");\n // ensure transport won't stay open\n this.transport.close();\n // ignore further transport communication\n this.transport.removeAllListeners();\n if (typeof removeEventListener === \"function\") {\n removeEventListener(\"beforeunload\", this.beforeunloadEventListener, false);\n removeEventListener(\"offline\", this.offlineEventListener, false);\n }\n // set ready state\n this.readyState = \"closed\";\n // clear session id\n this.id = null;\n // emit close event\n this.emitReserved(\"close\", reason, description);\n // clean buffers after, so users can still\n // grab the buffers on `close` event\n this.writeBuffer = [];\n this.prevBufferLen = 0;\n }\n }\n /**\n * Filters upgrades, returning only those matching client transports.\n *\n * @param {Array} server upgrades\n * @api private\n *\n */\n filterUpgrades(upgrades) {\n const filteredUpgrades = [];\n let i = 0;\n const j = upgrades.length;\n for (; i < j; i++) {\n if (~this.transports.indexOf(upgrades[i]))\n filteredUpgrades.push(upgrades[i]);\n }\n return filteredUpgrades;\n }\n}\nSocket.protocol = protocol;\n","import { Socket } from \"./socket.js\";\nexport { Socket };\nexport const protocol = Socket.protocol;\nexport { Transport } from \"./transport.js\";\nexport { transports } from \"./transports/index.js\";\nexport { installTimerFunctions } from \"./util.js\";\nexport { parse } from \"./contrib/parseuri.js\";\nexport { nextTick } from \"./transports/websocket-constructor.js\";\n","const withNativeArrayBuffer = typeof ArrayBuffer === \"function\";\nconst isView = (obj) => {\n return typeof ArrayBuffer.isView === \"function\"\n ? ArrayBuffer.isView(obj)\n : obj.buffer instanceof ArrayBuffer;\n};\nconst toString = Object.prototype.toString;\nconst withNativeBlob = typeof Blob === \"function\" ||\n (typeof Blob !== \"undefined\" &&\n toString.call(Blob) === \"[object BlobConstructor]\");\nconst withNativeFile = typeof File === \"function\" ||\n (typeof File !== \"undefined\" &&\n toString.call(File) === \"[object FileConstructor]\");\n/**\n * Returns true if obj is a Buffer, an ArrayBuffer, a Blob or a File.\n *\n * @private\n */\nexport function isBinary(obj) {\n return ((withNativeArrayBuffer && (obj instanceof ArrayBuffer || isView(obj))) ||\n (withNativeBlob && obj instanceof Blob) ||\n (withNativeFile && obj instanceof File));\n}\nexport function hasBinary(obj, toJSON) {\n if (!obj || typeof obj !== \"object\") {\n return false;\n }\n if (Array.isArray(obj)) {\n for (let i = 0, l = obj.length; i < l; i++) {\n if (hasBinary(obj[i])) {\n return true;\n }\n }\n return false;\n }\n if (isBinary(obj)) {\n return true;\n }\n if (obj.toJSON &&\n typeof obj.toJSON === \"function\" &&\n arguments.length === 1) {\n return hasBinary(obj.toJSON(), true);\n }\n for (const key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key) && hasBinary(obj[key])) {\n return true;\n }\n }\n return false;\n}\n","import { isBinary } from \"./is-binary.js\";\n/**\n * Replaces every Buffer | ArrayBuffer | Blob | File in packet with a numbered placeholder.\n *\n * @param {Object} packet - socket.io event packet\n * @return {Object} with deconstructed packet and list of buffers\n * @public\n */\nexport function deconstructPacket(packet) {\n const buffers = [];\n const packetData = packet.data;\n const pack = packet;\n pack.data = _deconstructPacket(packetData, buffers);\n pack.attachments = buffers.length; // number of binary 'attachments'\n return { packet: pack, buffers: buffers };\n}\nfunction _deconstructPacket(data, buffers) {\n if (!data)\n return data;\n if (isBinary(data)) {\n const placeholder = { _placeholder: true, num: buffers.length };\n buffers.push(data);\n return placeholder;\n }\n else if (Array.isArray(data)) {\n const newData = new Array(data.length);\n for (let i = 0; i < data.length; i++) {\n newData[i] = _deconstructPacket(data[i], buffers);\n }\n return newData;\n }\n else if (typeof data === \"object\" && !(data instanceof Date)) {\n const newData = {};\n for (const key in data) {\n if (Object.prototype.hasOwnProperty.call(data, key)) {\n newData[key] = _deconstructPacket(data[key], buffers);\n }\n }\n return newData;\n }\n return data;\n}\n/**\n * Reconstructs a binary packet from its placeholder packet and buffers\n *\n * @param {Object} packet - event packet with placeholders\n * @param {Array} buffers - binary buffers to put in placeholder positions\n * @return {Object} reconstructed packet\n * @public\n */\nexport function reconstructPacket(packet, buffers) {\n packet.data = _reconstructPacket(packet.data, buffers);\n delete packet.attachments; // no longer useful\n return packet;\n}\nfunction _reconstructPacket(data, buffers) {\n if (!data)\n return data;\n if (data && data._placeholder === true) {\n const isIndexValid = typeof data.num === \"number\" &&\n data.num >= 0 &&\n data.num < buffers.length;\n if (isIndexValid) {\n return buffers[data.num]; // appropriate buffer (should be natural order anyway)\n }\n else {\n throw new Error(\"illegal attachments\");\n }\n }\n else if (Array.isArray(data)) {\n for (let i = 0; i < data.length; i++) {\n data[i] = _reconstructPacket(data[i], buffers);\n }\n }\n else if (typeof data === \"object\") {\n for (const key in data) {\n if (Object.prototype.hasOwnProperty.call(data, key)) {\n data[key] = _reconstructPacket(data[key], buffers);\n }\n }\n }\n return data;\n}\n","import { Emitter } from \"@socket.io/component-emitter\";\nimport { deconstructPacket, reconstructPacket } from \"./binary.js\";\nimport { isBinary, hasBinary } from \"./is-binary.js\";\n/**\n * Protocol version.\n *\n * @public\n */\nexport const protocol = 5;\nexport var PacketType;\n(function (PacketType) {\n PacketType[PacketType[\"CONNECT\"] = 0] = \"CONNECT\";\n PacketType[PacketType[\"DISCONNECT\"] = 1] = \"DISCONNECT\";\n PacketType[PacketType[\"EVENT\"] = 2] = \"EVENT\";\n PacketType[PacketType[\"ACK\"] = 3] = \"ACK\";\n PacketType[PacketType[\"CONNECT_ERROR\"] = 4] = \"CONNECT_ERROR\";\n PacketType[PacketType[\"BINARY_EVENT\"] = 5] = \"BINARY_EVENT\";\n PacketType[PacketType[\"BINARY_ACK\"] = 6] = \"BINARY_ACK\";\n})(PacketType || (PacketType = {}));\n/**\n * A socket.io Encoder instance\n */\nexport class Encoder {\n /**\n * Encoder constructor\n *\n * @param {function} replacer - custom replacer to pass down to JSON.parse\n */\n constructor(replacer) {\n this.replacer = replacer;\n }\n /**\n * Encode a packet as a single string if non-binary, or as a\n * buffer sequence, depending on packet type.\n *\n * @param {Object} obj - packet object\n */\n encode(obj) {\n if (obj.type === PacketType.EVENT || obj.type === PacketType.ACK) {\n if (hasBinary(obj)) {\n return this.encodeAsBinary({\n type: obj.type === PacketType.EVENT\n ? PacketType.BINARY_EVENT\n : PacketType.BINARY_ACK,\n nsp: obj.nsp,\n data: obj.data,\n id: obj.id,\n });\n }\n }\n return [this.encodeAsString(obj)];\n }\n /**\n * Encode packet as string.\n */\n encodeAsString(obj) {\n // first is type\n let str = \"\" + obj.type;\n // attachments if we have them\n if (obj.type === PacketType.BINARY_EVENT ||\n obj.type === PacketType.BINARY_ACK) {\n str += obj.attachments + \"-\";\n }\n // if we have a namespace other than `/`\n // we append it followed by a comma `,`\n if (obj.nsp && \"/\" !== obj.nsp) {\n str += obj.nsp + \",\";\n }\n // immediately followed by the id\n if (null != obj.id) {\n str += obj.id;\n }\n // json data\n if (null != obj.data) {\n str += JSON.stringify(obj.data, this.replacer);\n }\n return str;\n }\n /**\n * Encode packet as 'buffer sequence' by removing blobs, and\n * deconstructing packet into object with placeholders and\n * a list of buffers.\n */\n encodeAsBinary(obj) {\n const deconstruction = deconstructPacket(obj);\n const pack = this.encodeAsString(deconstruction.packet);\n const buffers = deconstruction.buffers;\n buffers.unshift(pack); // add packet info to beginning of data list\n return buffers; // write all the buffers\n }\n}\n/**\n * A socket.io Decoder instance\n *\n * @return {Object} decoder\n */\nexport class Decoder extends Emitter {\n /**\n * Decoder constructor\n *\n * @param {function} reviver - custom reviver to pass down to JSON.stringify\n */\n constructor(reviver) {\n super();\n this.reviver = reviver;\n }\n /**\n * Decodes an encoded packet string into packet JSON.\n *\n * @param {String} obj - encoded packet\n */\n add(obj) {\n let packet;\n if (typeof obj === \"string\") {\n if (this.reconstructor) {\n throw new Error(\"got plaintext data when reconstructing a packet\");\n }\n packet = this.decodeString(obj);\n const isBinaryEvent = packet.type === PacketType.BINARY_EVENT;\n if (isBinaryEvent || packet.type === PacketType.BINARY_ACK) {\n packet.type = isBinaryEvent ? PacketType.EVENT : PacketType.ACK;\n // binary packet's json\n this.reconstructor = new BinaryReconstructor(packet);\n // no attachments, labeled binary but no binary data to follow\n if (packet.attachments === 0) {\n super.emitReserved(\"decoded\", packet);\n }\n }\n else {\n // non-binary full packet\n super.emitReserved(\"decoded\", packet);\n }\n }\n else if (isBinary(obj) || obj.base64) {\n // raw binary data\n if (!this.reconstructor) {\n throw new Error(\"got binary data when not reconstructing a packet\");\n }\n else {\n packet = this.reconstructor.takeBinaryData(obj);\n if (packet) {\n // received final buffer\n this.reconstructor = null;\n super.emitReserved(\"decoded\", packet);\n }\n }\n }\n else {\n throw new Error(\"Unknown type: \" + obj);\n }\n }\n /**\n * Decode a packet String (JSON data)\n *\n * @param {String} str\n * @return {Object} packet\n */\n decodeString(str) {\n let i = 0;\n // look up type\n const p = {\n type: Number(str.charAt(0)),\n };\n if (PacketType[p.type] === undefined) {\n throw new Error(\"unknown packet type \" + p.type);\n }\n // look up attachments if type binary\n if (p.type === PacketType.BINARY_EVENT ||\n p.type === PacketType.BINARY_ACK) {\n const start = i + 1;\n while (str.charAt(++i) !== \"-\" && i != str.length) { }\n const buf = str.substring(start, i);\n if (buf != Number(buf) || str.charAt(i) !== \"-\") {\n throw new Error(\"Illegal attachments\");\n }\n p.attachments = Number(buf);\n }\n // look up namespace (if any)\n if (\"/\" === str.charAt(i + 1)) {\n const start = i + 1;\n while (++i) {\n const c = str.charAt(i);\n if (\",\" === c)\n break;\n if (i === str.length)\n break;\n }\n p.nsp = str.substring(start, i);\n }\n else {\n p.nsp = \"/\";\n }\n // look up id\n const next = str.charAt(i + 1);\n if (\"\" !== next && Number(next) == next) {\n const start = i + 1;\n while (++i) {\n const c = str.charAt(i);\n if (null == c || Number(c) != c) {\n --i;\n break;\n }\n if (i === str.length)\n break;\n }\n p.id = Number(str.substring(start, i + 1));\n }\n // look up json data\n if (str.charAt(++i)) {\n const payload = this.tryParse(str.substr(i));\n if (Decoder.isPayloadValid(p.type, payload)) {\n p.data = payload;\n }\n else {\n throw new Error(\"invalid payload\");\n }\n }\n return p;\n }\n tryParse(str) {\n try {\n return JSON.parse(str, this.reviver);\n }\n catch (e) {\n return false;\n }\n }\n static isPayloadValid(type, payload) {\n switch (type) {\n case PacketType.CONNECT:\n return typeof payload === \"object\";\n case PacketType.DISCONNECT:\n return payload === undefined;\n case PacketType.CONNECT_ERROR:\n return typeof payload === \"string\" || typeof payload === \"object\";\n case PacketType.EVENT:\n case PacketType.BINARY_EVENT:\n return (Array.isArray(payload) &&\n (typeof payload[0] === \"string\" || typeof payload[0] === \"number\"));\n case PacketType.ACK:\n case PacketType.BINARY_ACK:\n return Array.isArray(payload);\n }\n }\n /**\n * Deallocates a parser's resources\n */\n destroy() {\n if (this.reconstructor) {\n this.reconstructor.finishedReconstruction();\n this.reconstructor = null;\n }\n }\n}\n/**\n * A manager of a binary event's 'buffer sequence'. Should\n * be constructed whenever a packet of type BINARY_EVENT is\n * decoded.\n *\n * @param {Object} packet\n * @return {BinaryReconstructor} initialized reconstructor\n */\nclass BinaryReconstructor {\n constructor(packet) {\n this.packet = packet;\n this.buffers = [];\n this.reconPack = packet;\n }\n /**\n * Method to be called when binary data received from connection\n * after a BINARY_EVENT packet.\n *\n * @param {Buffer | ArrayBuffer} binData - the raw binary data received\n * @return {null | Object} returns null if more binary data is expected or\n * a reconstructed packet object if all buffers have been received.\n */\n takeBinaryData(binData) {\n this.buffers.push(binData);\n if (this.buffers.length === this.reconPack.attachments) {\n // done with buffer list\n const packet = reconstructPacket(this.reconPack, this.buffers);\n this.finishedReconstruction();\n return packet;\n }\n return null;\n }\n /**\n * Cleans up binary packet reconstruction variables.\n */\n finishedReconstruction() {\n this.reconPack = null;\n this.buffers = [];\n }\n}\n","export function on(obj, ev, fn) {\n obj.on(ev, fn);\n return function subDestroy() {\n obj.off(ev, fn);\n };\n}\n","import { PacketType } from \"socket.io-parser\";\nimport { on } from \"./on.js\";\nimport { Emitter, } from \"@socket.io/component-emitter\";\n/**\n * Internal events.\n * These events can't be emitted by the user.\n */\nconst RESERVED_EVENTS = Object.freeze({\n connect: 1,\n connect_error: 1,\n disconnect: 1,\n disconnecting: 1,\n // EventEmitter reserved events: https://nodejs.org/api/events.html#events_event_newlistener\n newListener: 1,\n removeListener: 1,\n});\nexport class Socket extends Emitter {\n /**\n * `Socket` constructor.\n *\n * @public\n */\n constructor(io, nsp, opts) {\n super();\n this.connected = false;\n this.receiveBuffer = [];\n this.sendBuffer = [];\n this.ids = 0;\n this.acks = {};\n this.flags = {};\n this.io = io;\n this.nsp = nsp;\n if (opts && opts.auth) {\n this.auth = opts.auth;\n }\n if (this.io._autoConnect)\n this.open();\n }\n /**\n * Whether the socket is currently disconnected\n */\n get disconnected() {\n return !this.connected;\n }\n /**\n * Subscribe to open, close and packet events\n *\n * @private\n */\n subEvents() {\n if (this.subs)\n return;\n const io = this.io;\n this.subs = [\n on(io, \"open\", this.onopen.bind(this)),\n on(io, \"packet\", this.onpacket.bind(this)),\n on(io, \"error\", this.onerror.bind(this)),\n on(io, \"close\", this.onclose.bind(this)),\n ];\n }\n /**\n * Whether the Socket will try to reconnect when its Manager connects or reconnects\n */\n get active() {\n return !!this.subs;\n }\n /**\n * \"Opens\" the socket.\n *\n * @public\n */\n connect() {\n if (this.connected)\n return this;\n this.subEvents();\n if (!this.io[\"_reconnecting\"])\n this.io.open(); // ensure open\n if (\"open\" === this.io._readyState)\n this.onopen();\n return this;\n }\n /**\n * Alias for connect()\n */\n open() {\n return this.connect();\n }\n /**\n * Sends a `message` event.\n *\n * @return self\n * @public\n */\n send(...args) {\n args.unshift(\"message\");\n this.emit.apply(this, args);\n return this;\n }\n /**\n * Override `emit`.\n * If the event is in `events`, it's emitted normally.\n *\n * @return self\n * @public\n */\n emit(ev, ...args) {\n if (RESERVED_EVENTS.hasOwnProperty(ev)) {\n throw new Error('\"' + ev + '\" is a reserved event name');\n }\n args.unshift(ev);\n const packet = {\n type: PacketType.EVENT,\n data: args,\n };\n packet.options = {};\n packet.options.compress = this.flags.compress !== false;\n // event ack callback\n if (\"function\" === typeof args[args.length - 1]) {\n const id = this.ids++;\n const ack = args.pop();\n this._registerAckCallback(id, ack);\n packet.id = id;\n }\n const isTransportWritable = this.io.engine &&\n this.io.engine.transport &&\n this.io.engine.transport.writable;\n const discardPacket = this.flags.volatile && (!isTransportWritable || !this.connected);\n if (discardPacket) {\n }\n else if (this.connected) {\n this.notifyOutgoingListeners(packet);\n this.packet(packet);\n }\n else {\n this.sendBuffer.push(packet);\n }\n this.flags = {};\n return this;\n }\n /**\n * @private\n */\n _registerAckCallback(id, ack) {\n const timeout = this.flags.timeout;\n if (timeout === undefined) {\n this.acks[id] = ack;\n return;\n }\n // @ts-ignore\n const timer = this.io.setTimeoutFn(() => {\n delete this.acks[id];\n for (let i = 0; i < this.sendBuffer.length; i++) {\n if (this.sendBuffer[i].id === id) {\n this.sendBuffer.splice(i, 1);\n }\n }\n ack.call(this, new Error(\"operation has timed out\"));\n }, timeout);\n this.acks[id] = (...args) => {\n // @ts-ignore\n this.io.clearTimeoutFn(timer);\n ack.apply(this, [null, ...args]);\n };\n }\n /**\n * Sends a packet.\n *\n * @param packet\n * @private\n */\n packet(packet) {\n packet.nsp = this.nsp;\n this.io._packet(packet);\n }\n /**\n * Called upon engine `open`.\n *\n * @private\n */\n onopen() {\n if (typeof this.auth == \"function\") {\n this.auth((data) => {\n this.packet({ type: PacketType.CONNECT, data });\n });\n }\n else {\n this.packet({ type: PacketType.CONNECT, data: this.auth });\n }\n }\n /**\n * Called upon engine or manager `error`.\n *\n * @param err\n * @private\n */\n onerror(err) {\n if (!this.connected) {\n this.emitReserved(\"connect_error\", err);\n }\n }\n /**\n * Called upon engine `close`.\n *\n * @param reason\n * @param description\n * @private\n */\n onclose(reason, description) {\n this.connected = false;\n delete this.id;\n this.emitReserved(\"disconnect\", reason, description);\n }\n /**\n * Called with socket packet.\n *\n * @param packet\n * @private\n */\n onpacket(packet) {\n const sameNamespace = packet.nsp === this.nsp;\n if (!sameNamespace)\n return;\n switch (packet.type) {\n case PacketType.CONNECT:\n if (packet.data && packet.data.sid) {\n const id = packet.data.sid;\n this.onconnect(id);\n }\n else {\n this.emitReserved(\"connect_error\", new Error(\"It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)\"));\n }\n break;\n case PacketType.EVENT:\n case PacketType.BINARY_EVENT:\n this.onevent(packet);\n break;\n case PacketType.ACK:\n case PacketType.BINARY_ACK:\n this.onack(packet);\n break;\n case PacketType.DISCONNECT:\n this.ondisconnect();\n break;\n case PacketType.CONNECT_ERROR:\n this.destroy();\n const err = new Error(packet.data.message);\n // @ts-ignore\n err.data = packet.data.data;\n this.emitReserved(\"connect_error\", err);\n break;\n }\n }\n /**\n * Called upon a server event.\n *\n * @param packet\n * @private\n */\n onevent(packet) {\n const args = packet.data || [];\n if (null != packet.id) {\n args.push(this.ack(packet.id));\n }\n if (this.connected) {\n this.emitEvent(args);\n }\n else {\n this.receiveBuffer.push(Object.freeze(args));\n }\n }\n emitEvent(args) {\n if (this._anyListeners && this._anyListeners.length) {\n const listeners = this._anyListeners.slice();\n for (const listener of listeners) {\n listener.apply(this, args);\n }\n }\n super.emit.apply(this, args);\n }\n /**\n * Produces an ack callback to emit with an event.\n *\n * @private\n */\n ack(id) {\n const self = this;\n let sent = false;\n return function (...args) {\n // prevent double callbacks\n if (sent)\n return;\n sent = true;\n self.packet({\n type: PacketType.ACK,\n id: id,\n data: args,\n });\n };\n }\n /**\n * Called upon a server acknowlegement.\n *\n * @param packet\n * @private\n */\n onack(packet) {\n const ack = this.acks[packet.id];\n if (\"function\" === typeof ack) {\n ack.apply(this, packet.data);\n delete this.acks[packet.id];\n }\n else {\n }\n }\n /**\n * Called upon server connect.\n *\n * @private\n */\n onconnect(id) {\n this.id = id;\n this.connected = true;\n this.emitBuffered();\n this.emitReserved(\"connect\");\n }\n /**\n * Emit buffered events (received and emitted).\n *\n * @private\n */\n emitBuffered() {\n this.receiveBuffer.forEach((args) => this.emitEvent(args));\n this.receiveBuffer = [];\n this.sendBuffer.forEach((packet) => {\n this.notifyOutgoingListeners(packet);\n this.packet(packet);\n });\n this.sendBuffer = [];\n }\n /**\n * Called upon server disconnect.\n *\n * @private\n */\n ondisconnect() {\n this.destroy();\n this.onclose(\"io server disconnect\");\n }\n /**\n * Called upon forced client/server side disconnections,\n * this method ensures the manager stops tracking us and\n * that reconnections don't get triggered for this.\n *\n * @private\n */\n destroy() {\n if (this.subs) {\n // clean subscriptions to avoid reconnections\n this.subs.forEach((subDestroy) => subDestroy());\n this.subs = undefined;\n }\n this.io[\"_destroy\"](this);\n }\n /**\n * Disconnects the socket manually.\n *\n * @return self\n * @public\n */\n disconnect() {\n if (this.connected) {\n this.packet({ type: PacketType.DISCONNECT });\n }\n // remove socket from pool\n this.destroy();\n if (this.connected) {\n // fire events\n this.onclose(\"io client disconnect\");\n }\n return this;\n }\n /**\n * Alias for disconnect()\n *\n * @return self\n * @public\n */\n close() {\n return this.disconnect();\n }\n /**\n * Sets the compress flag.\n *\n * @param compress - if `true`, compresses the sending data\n * @return self\n * @public\n */\n compress(compress) {\n this.flags.compress = compress;\n return this;\n }\n /**\n * Sets a modifier for a subsequent event emission that the event message will be dropped when this socket is not\n * ready to send messages.\n *\n * @returns self\n * @public\n */\n get volatile() {\n this.flags.volatile = true;\n return this;\n }\n /**\n * Sets a modifier for a subsequent event emission that the callback will be called with an error when the\n * given number of milliseconds have elapsed without an acknowledgement from the server:\n *\n * ```\n * socket.timeout(5000).emit(\"my-event\", (err) => {\n * if (err) {\n * // the server did not acknowledge the event in the given delay\n * }\n * });\n * ```\n *\n * @returns self\n * @public\n */\n timeout(timeout) {\n this.flags.timeout = timeout;\n return this;\n }\n /**\n * Adds a listener that will be fired when any event is emitted. The event name is passed as the first argument to the\n * callback.\n *\n * @param listener\n * @public\n */\n onAny(listener) {\n this._anyListeners = this._anyListeners || [];\n this._anyListeners.push(listener);\n return this;\n }\n /**\n * Adds a listener that will be fired when any event is emitted. The event name is passed as the first argument to the\n * callback. The listener is added to the beginning of the listeners array.\n *\n * @param listener\n * @public\n */\n prependAny(listener) {\n this._anyListeners = this._anyListeners || [];\n this._anyListeners.unshift(listener);\n return this;\n }\n /**\n * Removes the listener that will be fired when any event is emitted.\n *\n * @param listener\n * @public\n */\n offAny(listener) {\n if (!this._anyListeners) {\n return this;\n }\n if (listener) {\n const listeners = this._anyListeners;\n for (let i = 0; i < listeners.length; i++) {\n if (listener === listeners[i]) {\n listeners.splice(i, 1);\n return this;\n }\n }\n }\n else {\n this._anyListeners = [];\n }\n return this;\n }\n /**\n * Returns an array of listeners that are listening for any event that is specified. This array can be manipulated,\n * e.g. to remove listeners.\n *\n * @public\n */\n listenersAny() {\n return this._anyListeners || [];\n }\n /**\n * Adds a listener that will be fired when any event is emitted. The event name is passed as the first argument to the\n * callback.\n *\n * @param listener\n *\n * <pre><code>\n *\n * socket.onAnyOutgoing((event, ...args) => {\n * console.log(event);\n * });\n *\n * </pre></code>\n *\n * @public\n */\n onAnyOutgoing(listener) {\n this._anyOutgoingListeners = this._anyOutgoingListeners || [];\n this._anyOutgoingListeners.push(listener);\n return this;\n }\n /**\n * Adds a listener that will be fired when any event is emitted. The event name is passed as the first argument to the\n * callback. The listener is added to the beginning of the listeners array.\n *\n * @param listener\n *\n * <pre><code>\n *\n * socket.prependAnyOutgoing((event, ...args) => {\n * console.log(event);\n * });\n *\n * </pre></code>\n *\n * @public\n */\n prependAnyOutgoing(listener) {\n this._anyOutgoingListeners = this._anyOutgoingListeners || [];\n this._anyOutgoingListeners.unshift(listener);\n return this;\n }\n /**\n * Removes the listener that will be fired when any event is emitted.\n *\n * @param listener\n *\n * <pre><code>\n *\n * const handler = (event, ...args) => {\n * console.log(event);\n * }\n *\n * socket.onAnyOutgoing(handler);\n *\n * // then later\n * socket.offAnyOutgoing(handler);\n *\n * </pre></code>\n *\n * @public\n */\n offAnyOutgoing(listener) {\n if (!this._anyOutgoingListeners) {\n return this;\n }\n if (listener) {\n const listeners = this._anyOutgoingListeners;\n for (let i = 0; i < listeners.length; i++) {\n if (listener === listeners[i]) {\n listeners.splice(i, 1);\n return this;\n }\n }\n }\n else {\n this._anyOutgoingListeners = [];\n }\n return this;\n }\n /**\n * Returns an array of listeners that are listening for any event that is specified. This array can be manipulated,\n * e.g. to remove listeners.\n *\n * @public\n */\n listenersAnyOutgoing() {\n return this._anyOutgoingListeners || [];\n }\n /**\n * Notify the listeners for each packet sent\n *\n * @param packet\n *\n * @private\n */\n notifyOutgoingListeners(packet) {\n if (this._anyOutgoingListeners && this._anyOutgoingListeners.length) {\n const listeners = this._anyOutgoingListeners.slice();\n for (const listener of listeners) {\n listener.apply(this, packet.data);\n }\n }\n }\n}\n","/**\n * Initialize backoff timer with `opts`.\n *\n * - `min` initial timeout in milliseconds [100]\n * - `max` max timeout [10000]\n * - `jitter` [0]\n * - `factor` [2]\n *\n * @param {Object} opts\n * @api public\n */\nexport function Backoff(opts) {\n opts = opts || {};\n this.ms = opts.min || 100;\n this.max = opts.max || 10000;\n this.factor = opts.factor || 2;\n this.jitter = opts.jitter > 0 && opts.jitter <= 1 ? opts.jitter : 0;\n this.attempts = 0;\n}\n/**\n * Return the backoff duration.\n *\n * @return {Number}\n * @api public\n */\nBackoff.prototype.duration = function () {\n var ms = this.ms * Math.pow(this.factor, this.attempts++);\n if (this.jitter) {\n var rand = Math.random();\n var deviation = Math.floor(rand * this.jitter * ms);\n ms = (Math.floor(rand * 10) & 1) == 0 ? ms - deviation : ms + deviation;\n }\n return Math.min(ms, this.max) | 0;\n};\n/**\n * Reset the number of attempts.\n *\n * @api public\n */\nBackoff.prototype.reset = function () {\n this.attempts = 0;\n};\n/**\n * Set the minimum duration\n *\n * @api public\n */\nBackoff.prototype.setMin = function (min) {\n this.ms = min;\n};\n/**\n * Set the maximum duration\n *\n * @api public\n */\nBackoff.prototype.setMax = function (max) {\n this.max = max;\n};\n/**\n * Set the jitter\n *\n * @api public\n */\nBackoff.prototype.setJitter = function (jitter) {\n this.jitter = jitter;\n};\n","import { Socket as Engine, installTimerFunctions, } from \"engine.io-client\";\nimport { Socket } from \"./socket.js\";\nimport * as parser from \"socket.io-parser\";\nimport { on } from \"./on.js\";\nimport { Backoff } from \"./contrib/backo2.js\";\nimport { Emitter, } from \"@socket.io/component-emitter\";\nexport class Manager extends Emitter {\n constructor(uri, opts) {\n var _a;\n super();\n this.nsps = {};\n this.subs = [];\n if (uri && \"object\" === typeof uri) {\n opts = uri;\n uri = undefined;\n }\n opts = opts || {};\n opts.path = opts.path || \"/socket.io\";\n this.opts = opts;\n installTimerFunctions(this, opts);\n this.reconnection(opts.reconnection !== false);\n this.reconnectionAttempts(opts.reconnectionAttempts || Infinity);\n this.reconnectionDelay(opts.reconnectionDelay || 1000);\n this.reconnectionDelayMax(opts.reconnectionDelayMax || 5000);\n this.randomizationFactor((_a = opts.randomizationFactor) !== null && _a !== void 0 ? _a : 0.5);\n this.backoff = new Backoff({\n min: this.reconnectionDelay(),\n max: this.reconnectionDelayMax(),\n jitter: this.randomizationFactor(),\n });\n this.timeout(null == opts.timeout ? 20000 : opts.timeout);\n this._readyState = \"closed\";\n this.uri = uri;\n const _parser = opts.parser || parser;\n this.encoder = new _parser.Encoder();\n this.decoder = new _parser.Decoder();\n this._autoConnect = opts.autoConnect !== false;\n if (this._autoConnect)\n this.open();\n }\n reconnection(v) {\n if (!arguments.length)\n return this._reconnection;\n this._reconnection = !!v;\n return this;\n }\n reconnectionAttempts(v) {\n if (v === undefined)\n return this._reconnectionAttempts;\n this._reconnectionAttempts = v;\n return this;\n }\n reconnectionDelay(v) {\n var _a;\n if (v === undefined)\n return this._reconnectionDelay;\n this._reconnectionDelay = v;\n (_a = this.backoff) === null || _a === void 0 ? void 0 : _a.setMin(v);\n return this;\n }\n randomizationFactor(v) {\n var _a;\n if (v === undefined)\n return this._randomizationFactor;\n this._randomizationFactor = v;\n (_a = this.backoff) === null || _a === void 0 ? void 0 : _a.setJitter(v);\n return this;\n }\n reconnectionDelayMax(v) {\n var _a;\n if (v === undefined)\n return this._reconnectionDelayMax;\n this._reconnectionDelayMax = v;\n (_a = this.backoff) === null || _a === void 0 ? void 0 : _a.setMax(v);\n return this;\n }\n timeout(v) {\n if (!arguments.length)\n return this._timeout;\n this._timeout = v;\n return this;\n }\n /**\n * Starts trying to reconnect if reconnection is enabled and we have not\n * started reconnecting yet\n *\n * @private\n */\n maybeReconnectOnOpen() {\n // Only try to reconnect if it's the first time we're connecting\n if (!this._reconnecting &&\n this._reconnection &&\n this.backoff.attempts === 0) {\n // keeps reconnection from firing twice for the same reconnection loop\n this.reconnect();\n }\n }\n /**\n * Sets the current transport `socket`.\n *\n * @param {Function} fn - optional, callback\n * @return self\n * @public\n */\n open(fn) {\n if (~this._readyState.indexOf(\"open\"))\n return this;\n this.engine = new Engine(this.uri, this.opts);\n const socket = this.engine;\n const self = this;\n this._readyState = \"opening\";\n this.skipReconnect = false;\n // emit `open`\n const openSubDestroy = on(socket, \"open\", function () {\n self.onopen();\n fn && fn();\n });\n // emit `error`\n const errorSub = on(socket, \"error\", (err) => {\n self.cleanup();\n self._readyState = \"closed\";\n this.emitReserved(\"error\", err);\n if (fn) {\n fn(err);\n }\n else {\n // Only do this if there is no fn to handle the error\n self.maybeReconnectOnOpen();\n }\n });\n if (false !== this._timeout) {\n const timeout = this._timeout;\n if (timeout === 0) {\n openSubDestroy(); // prevents a race condition with the 'open' event\n }\n // set timer\n const timer = this.setTimeoutFn(() => {\n openSubDestroy();\n socket.close();\n // @ts-ignore\n socket.emit(\"error\", new Error(\"timeout\"));\n }, timeout);\n if (this.opts.autoUnref) {\n timer.unref();\n }\n this.subs.push(function subDestroy() {\n clearTimeout(timer);\n });\n }\n this.subs.push(openSubDestroy);\n this.subs.push(errorSub);\n return this;\n }\n /**\n * Alias for open()\n *\n * @return self\n * @public\n */\n connect(fn) {\n return this.open(fn);\n }\n /**\n * Called upon transport open.\n *\n * @private\n */\n onopen() {\n // clear old subs\n this.cleanup();\n // mark as open\n this._readyState = \"open\";\n this.emitReserved(\"open\");\n // add new subs\n const socket = this.engine;\n this.subs.push(on(socket, \"ping\", this.onping.bind(this)), on(socket, \"data\", this.ondata.bind(this)), on(socket, \"error\", this.onerror.bind(this)), on(socket, \"close\", this.onclose.bind(this)), on(this.decoder, \"decoded\", this.ondecoded.bind(this)));\n }\n /**\n * Called upon a ping.\n *\n * @private\n */\n onping() {\n this.emitReserved(\"ping\");\n }\n /**\n * Called with data.\n *\n * @private\n */\n ondata(data) {\n this.decoder.add(data);\n }\n /**\n * Called when parser fully decodes a packet.\n *\n * @private\n */\n ondecoded(packet) {\n this.emitReserved(\"packet\", packet);\n }\n /**\n * Called upon socket error.\n *\n * @private\n */\n onerror(err) {\n this.emitReserved(\"error\", err);\n }\n /**\n * Creates a new socket for the given `nsp`.\n *\n * @return {Socket}\n * @public\n */\n socket(nsp, opts) {\n let socket = this.nsps[nsp];\n if (!socket) {\n socket = new Socket(this, nsp, opts);\n this.nsps[nsp] = socket;\n }\n return socket;\n }\n /**\n * Called upon a socket close.\n *\n * @param socket\n * @private\n */\n _destroy(socket) {\n const nsps = Object.keys(this.nsps);\n for (const nsp of nsps) {\n const socket = this.nsps[nsp];\n if (socket.active) {\n return;\n }\n }\n this._close();\n }\n /**\n * Writes a packet.\n *\n * @param packet\n * @private\n */\n _packet(packet) {\n const encodedPackets = this.encoder.encode(packet);\n for (let i = 0; i < encodedPackets.length; i++) {\n this.engine.write(encodedPackets[i], packet.options);\n }\n }\n /**\n * Clean up transport subscriptions and packet buffer.\n *\n * @private\n */\n cleanup() {\n this.subs.forEach((subDestroy) => subDestroy());\n this.subs.length = 0;\n this.decoder.destroy();\n }\n /**\n * Close the current socket.\n *\n * @private\n */\n _close() {\n this.skipReconnect = true;\n this._reconnecting = false;\n this.onclose(\"forced close\");\n if (this.engine)\n this.engine.close();\n }\n /**\n * Alias for close()\n *\n * @private\n */\n disconnect() {\n return this._close();\n }\n /**\n * Called upon engine close.\n *\n * @private\n */\n onclose(reason, description) {\n this.cleanup();\n this.backoff.reset();\n this._readyState = \"closed\";\n this.emitReserved(\"close\", reason, description);\n if (this._reconnection && !this.skipReconnect) {\n this.reconnect();\n }\n }\n /**\n * Attempt a reconnection.\n *\n * @private\n */\n reconnect() {\n if (this._reconnecting || this.skipReconnect)\n return this;\n const self = this;\n if (this.backoff.attempts >= this._reconnectionAttempts) {\n this.backoff.reset();\n this.emitReserved(\"reconnect_failed\");\n this._reconnecting = false;\n }\n else {\n const delay = this.backoff.duration();\n this._reconnecting = true;\n const timer = this.setTimeoutFn(() => {\n if (self.skipReconnect)\n return;\n this.emitReserved(\"reconnect_attempt\", self.backoff.attempts);\n // check again for the case socket closed in above events\n if (self.skipReconnect)\n return;\n self.open((err) => {\n if (err) {\n self._reconnecting = false;\n self.reconnect();\n this.emitReserved(\"reconnect_error\", err);\n }\n else {\n self.onreconnect();\n }\n });\n }, delay);\n if (this.opts.autoUnref) {\n timer.unref();\n }\n this.subs.push(function subDestroy() {\n clearTimeout(timer);\n });\n }\n }\n /**\n * Called upon successful reconnect.\n *\n * @private\n */\n onreconnect() {\n const attempt = this.backoff.attempts;\n this._reconnecting = false;\n this.backoff.reset();\n this.emitReserved(\"reconnect\", attempt);\n }\n}\n","import { url } from \"./url.js\";\nimport { Manager } from \"./manager.js\";\nimport { Socket } from \"./socket.js\";\n/**\n * Managers cache.\n */\nconst cache = {};\nfunction lookup(uri, opts) {\n if (typeof uri === \"object\") {\n opts = uri;\n uri = undefined;\n }\n opts = opts || {};\n const parsed = url(uri, opts.path || \"/socket.io\");\n const source = parsed.source;\n const id = parsed.id;\n const path = parsed.path;\n const sameNamespace = cache[id] && path in cache[id][\"nsps\"];\n const newConnection = opts.forceNew ||\n opts[\"force new connection\"] ||\n false === opts.multiplex ||\n sameNamespace;\n let io;\n if (newConnection) {\n io = new Manager(source, opts);\n }\n else {\n if (!cache[id]) {\n cache[id] = new Manager(source, opts);\n }\n io = cache[id];\n }\n if (parsed.query && !opts.query) {\n opts.query = parsed.queryKey;\n }\n return io.socket(parsed.path, opts);\n}\n// so that \"lookup\" can be used both as a function (e.g. `io(...)`) and as a\n// namespace (e.g. `io.connect(...)`), for backward compatibility\nObject.assign(lookup, {\n Manager,\n Socket,\n io: lookup,\n connect: lookup,\n});\n/**\n * Protocol version.\n *\n * @public\n */\nexport { protocol } from \"socket.io-parser\";\n/**\n * Expose constructors for standalone build.\n *\n * @public\n */\nexport { Manager, Socket, lookup as io, lookup as connect, lookup as default, };\n","import { parse } from \"engine.io-client\";\n/**\n * URL parser.\n *\n * @param uri - url\n * @param path - the request path of the connection\n * @param loc - An object meant to mimic window.location.\n * Defaults to window.location.\n * @public\n */\nexport function url(uri, path = \"\", loc) {\n let obj = uri;\n // default to window.location\n loc = loc || (typeof location !== \"undefined\" && location);\n if (null == uri)\n uri = loc.protocol + \"//\" + loc.host;\n // relative path support\n if (typeof uri === \"string\") {\n if (\"/\" === uri.charAt(0)) {\n if (\"/\" === uri.charAt(1)) {\n uri = loc.protocol + uri;\n }\n else {\n uri = loc.host + uri;\n }\n }\n if (!/^(https?|wss?):\\/\\//.test(uri)) {\n if (\"undefined\" !== typeof loc) {\n uri = loc.protocol + \"//\" + uri;\n }\n else {\n uri = \"https://\" + uri;\n }\n }\n // parse\n obj = parse(uri);\n }\n // make sure we treat `localhost:80` and `localhost` equally\n if (!obj.port) {\n if (/^(http|ws)$/.test(obj.protocol)) {\n obj.port = \"80\";\n }\n else if (/^(http|ws)s$/.test(obj.protocol)) {\n obj.port = \"443\";\n }\n }\n obj.path = obj.path || \"/\";\n const ipv6 = obj.host.indexOf(\":\") !== -1;\n const host = ipv6 ? \"[\" + obj.host + \"]\" : obj.host;\n // define unique id\n obj.id = obj.protocol + \"://\" + host + \":\" + obj.port + path;\n // define href\n obj.href =\n obj.protocol +\n \"://\" +\n host +\n (loc && loc.port === obj.port ? \"\" : \":\" + obj.port);\n return obj;\n}\n","function update(el, headToCursor, cursorToTail) {\r\n const curr = el.value; // strA + strB1 + strC\r\n const next = headToCursor + (cursorToTail || \"\"); // strA + strB2 + strC\r\n const activeElement = document.activeElement;\r\n // Calculate length of strA and strC\r\n let aLength = 0;\r\n let cLength = 0;\r\n while (aLength < curr.length && aLength < next.length && curr[aLength] === next[aLength]) {\r\n aLength++;\r\n }\r\n while (curr.length - cLength - 1 >= 0 &&\r\n next.length - cLength - 1 >= 0 &&\r\n curr[curr.length - cLength - 1] === next[next.length - cLength - 1]) {\r\n cLength++;\r\n }\r\n aLength = Math.min(aLength, Math.min(curr.length, next.length) - cLength);\r\n // Select strB1\r\n el.setSelectionRange(aLength, curr.length - cLength);\r\n // Get strB2\r\n const strB2 = next.substring(aLength, next.length - cLength);\r\n // Replace strB1 with strB2\r\n el.focus();\r\n if (!document.execCommand(\"insertText\", false, strB2)) {\r\n // Document.execCommand returns false if the command is not supported.\r\n // Firefox and IE returns false in this case.\r\n el.value = next;\r\n // Dispatch input event. Note that `new Event(\"input\")` throws an error on IE11\r\n const event = document.createEvent(\"Event\");\r\n event.initEvent(\"input\", true, true);\r\n el.dispatchEvent(event);\r\n }\r\n // Move cursor to the end of headToCursor\r\n el.setSelectionRange(headToCursor.length, headToCursor.length);\r\n activeElement.focus();\r\n return el;\r\n}\n\nfunction wrapCursor(el, before, after) {\r\n const initEnd = el.selectionEnd;\r\n const headToCursor = el.value.substr(0, el.selectionStart) + before;\r\n const cursorToTail = el.value.substring(el.selectionStart, initEnd) + (after || \"\") + el.value.substr(initEnd);\r\n update(el, headToCursor, cursorToTail);\r\n el.selectionEnd = initEnd + before.length;\r\n return el;\r\n}\n\nexport { update, wrapCursor };\n//# sourceMappingURL=index.mjs.map\n"],"names":["Object","defineProperty","exports","value","Completer","eventemitter3_1","Strategy_1","EventEmitter","constructor","strategyPropsList","super","this","handleQueryResult","searchResults","emit","strategies","map","p","Strategy","destroy","forEach","s","run","beforeCursor","strategy","execute","Dropdown","DEFAULT_DROPDOWN_ITEM_ACTIVE_CLASS_NAME","DEFAULT_DROPDOWN_ITEM_CLASS_NAME","DEFAULT_DROPDOWN_CLASS_NAME","DEFAULT_DROPDOWN_PLACEMENT","DEFAULT_DROPDOWN_MAX_COUNT","utils_1","el","option","shown","items","activeIndex","create","ul","document","createElement","className","assign","style","display","position","zIndex","parent","body","appendChild","render","cursorOffset","event","createCustomEvent","cancelable","defaultPrevented","clear","length","hide","slice","maxCount","r","index","_a","DropdownItem","item","setStrategyId","renderEdge","renderItems","show","setOffset","activate","parentNode","removeChild","select","detail","searchResult","i","innerHTML","up","e","moveActiveItem","down","direction","getNextActiveIndex","getPrevActiveIndex","preventDefault","deactivate","isShown","getActiveItem","doc","documentElement","elementWidth","offsetWidth","left","browserWidth","dynamicWidth","scrollWidth","clientWidth","right","forceTop","placement","dropdownHeight","lineHeight","clientTop","clientHeight","bottom","top","Error","rotate","fragment","createDocumentFragment","id","getStrategyId","dataset","type","li","data","dropdown","props","active","onClick","activeClassName","span","tabIndex","addEventListener","removeEventListener","scrollTop","offsetTop","Editor","applySearchResult","_searchResult","getCursorOffset","getBeforeCursor","emitMoveEvent","code","moveEvent","emitEnterEvent","enterEvent","emitChangeEvent","changeEvent","emitEscEvent","escEvent","getCode","keyCode","ctrlKey","SearchResult","MAIN","PLACE","term","getReplacementData","result","replace","afterCursor","Array","isArray","match","replacement","_","parseInt","start","end","join","renderTemplate","getId","DEFAULT_INDEX","SearchResult_1","cache","callback","matchWithContext","search","results","template","text","searchWithCach","context","Textcomplete","Dropdown_1","Completer_1","PASSTHOUGH_EVENT_NAMES","editor","isQueryInFlight","nextPendingQuery","handleHit","trigger","handleMove","handleEnter","activeItem","handleEsc","handleChange","handleSelect","selectEvent","handleResize","completer","startListening","destroyEditor","stopListening","on","eventName","ownerDocument","defaultView","removeAllListeners","removeListener","__createBinding","o","m","k","k2","undefined","enumerable","get","__exportStar","prototype","hasOwnProperty","call","isCustomEventSupported","window","CustomEvent","options","createEvent","initCustomEvent","__importDefault","mod","__esModule","TextareaEditor","undate_1","textarea_caret_1","core_1","onInput","onKeydown","getAfterCursor","focus","update","dispatchEvent","elOffset","calculateElementOffset","elScroll","getElScroll","cursorPosition","getCursorPosition","getLineHeightPx","getBoundingClientRect","dir","selectionStart","selectionEnd","substring","scrollLeft","default","TextareaEditor_1","rect","owner","offset","pageYOffset","pageXOffset","clientLeft","CHAR_CODE_ZERO","charCodeAt","CHAR_CODE_NINE","isDigit","charCode","computedStyle","getComputedStyle","floatLineHeight","parseFloat","fontSize","calculateLineHeightPx","nodeName","tempNode","fontFamily","padding","HTMLTextAreaElement","rows","height","offsetHeight","desc","getOwnPropertyDescriptor","writable","configurable","isSafari","test","navigator","userAgent","makeMap","str","expectsLowerCase","list","split","val","toLowerCase","isGloballyWhitelisted","isSpecialBooleanAttr","includeBooleanAttr","normalizeStyle","res","normalized","isString","parseStringStyle","key","isObject","listDelimiterRE","propertyDelimiterRE","cssText","ret","tmp","trim","normalizeClass","name","looseEqual","a","b","aValidType","isDate","bValidType","getTime","isSymbol","equal","looseCompareArrays","keys","aHasKey","bHasKey","String","looseIndexOf","arr","findIndex","toDisplayString","toString","objectToString","isFunction","JSON","stringify","replacer","_key","__v_isRef","isMap","size","entries","reduce","isSet","values","isPlainObject","EMPTY_OBJ","EMPTY_ARR","NOOP","NO","onRE","isOn","isModelListener","startsWith","extend","remove","indexOf","splice","hasOwn","toTypeString","isPromise","then","catch","toRawType","isIntegerKey","isReservedProp","cacheStringFunction","fn","camelizeRE","camelize","c","toUpperCase","hyphenateRE","hyphenate","capitalize","charAt","toHandlerKey","hasChanged","oldValue","is","invokeArrayFns","fns","arg","def","obj","toNumber","n","isNaN","_globalThis","getGlobalThis","globalThis","self","g","module","u","f","h","d","$","l","y","M","weekdays","months","t","z","utcOffset","Math","abs","floor","date","year","month","clone","add","ceil","w","D","ms","Q","v","S","args","arguments","O","locale","$L","utc","$u","x","$x","$offset","parse","$d","Date","NaN","UTC","init","$y","getFullYear","$M","getMonth","$D","getDate","$W","getDay","$H","getHours","$m","getMinutes","$s","getSeconds","$ms","getMilliseconds","$utils","isValid","isSame","startOf","endOf","isAfter","isBefore","$g","set","unix","valueOf","toDate","apply","$locale","weekStart","$set","min","daysInMonth","Number","round","subtract","format","invalidDate","substr","meridiem","YY","YYYY","MM","MMM","monthsShort","MMMM","DD","dd","weekdaysMin","ddd","weekdaysShort","dddd","H","HH","hh","A","mm","ss","SSS","Z","getTimezoneOffset","diff","toJSON","toISOString","toUTCString","$i","isDayjs","en","Ls","lastDay","sameDay","nextDay","nextWeek","lastWeek","sameElse","calendar","future","past","yy","fromToBase","relativeTime","thresholds","rounding","to","from","toNow","fromNow","has","prefix","Events","EE","once","addListener","emitter","TypeError","listener","evt","_events","push","_eventsCount","clearEvent","__proto__","eventNames","events","names","getOwnPropertySymbols","concat","listeners","handlers","ee","listenerCount","a1","a2","a3","a4","a5","len","j","off","prefixed","fuzzy","simpleFilter","pattern","array","filter","opts","ch","patternIdx","totalScore","currScore","pre","post","compareString","caseSensitive","idx","Infinity","rendered","score","prev","element","extract","string","original","sort","source","_class","escapeRE","defaultOptions","fuzzyLink","fuzzyEmail","fuzzyIP","defaultSchemas","validate","pos","tail","re","http","RegExp","src_auth","src_host_port_strict","src_path","no_http","src_domain","src_domain_root","src_port","src_host_terminator","mailto","src_email_name","src_host_strict","tlds_2ch_src_re","tlds_default","compile","__opts__","tlds","__tlds__","untpl","tpl","src_tlds","onCompile","__tlds_replaced__","src_xn","email_fuzzy","tpl_email_fuzzy","link_fuzzy","tpl_link_fuzzy","link_no_ip_fuzzy","tpl_link_no_ip_fuzzy","host_fuzzy_test","tpl_host_fuzzy_test","aliases","schemaError","__compiled__","__schemas__","compiled","link","createValidator","normalize","alias","slist","schema_test","src_ZPCc","schema_search","pretest","__index__","__text_cache__","resetScanCache","Match","shift","__last_index__","schema","__schema__","lastIndex","raw","url","createMatch","LinkifyIt","schemas","acc","definition","ml","me","next","tld_pos","exec","testSchemaAt","keepOld","reverse","src_Any","src_Cc","src_Z","src_P","src_ZCc","src_pseudo_letter","src_ip4","src_host","tpl_host_fuzzy","tpl_host_no_ip_fuzzy","tpl_host_fuzzy_strict","tpl_host_port_fuzzy_strict","tpl_host_port_no_ip_fuzzy_strict","Symbol","iteratee","getRawTag","symToStringTag","toStringTag","arrayMap","symbolProto","symbolToString","baseToString","trimmedEndIndex","reTrimStart","freeGlobal","objectProto","nativeObjectToString","isOwn","tag","unmasked","freeSelf","root","Function","reWhitespace","now","nativeMax","max","nativeMin","func","wait","lastArgs","lastThis","maxWait","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","invokeFunc","time","thisArg","shouldInvoke","timeSinceLastCall","timerExpired","trailingEdge","setTimeout","timeWaiting","remainingWait","debounced","isInvoking","leadingEdge","clearTimeout","cancel","flush","reRegExpChar","reHasRegExpChar","baseGetTag","isObjectLike","debounce","baseTrim","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","other","isBinary","_REVERSE_MAP","_MAP","_KEYCODE_MAP","_SHIFT_MAP","_SPECIAL_ALIASES","platform","Mousetrap","bind","action","_bindMultiple","unbind","_directMap","reset","_callbacks","stopCallback","_belongsTo","target","composedPath","initialEventTarget","tagName","isContentEditable","handleKey","_handleKey","addKeycodes","object","documentMousetrap","method","_addEvent","attachEvent","_characterFromEvent","character","fromCharCode","which","shiftKey","_isModifier","_pickBestAction","modifiers","_getReverseMap","_getKeyInfo","combination","_keysFromString","ancestor","targetElement","_resetTimer","_sequenceLevels","_ignoreNextKeyup","_ignoreNextKeypress","_nextExpectedAction","_resetSequences","doNotReset","activeSequences","_getMatches","sequenceName","level","modifiers1","modifiers2","matches","seq","metaKey","deleteCombo","combo","deleteSequence","_fireCallback","sequence","srcElement","returnValue","_preventDefault","stopPropagation","cancelBubble","_stopPropagation","_handleKeyEvent","altKey","_eventModifiers","_bindSingle","info","_increaseSequence","nextAction","_callbackAndReset","wrappedCallback","_bindSequence","callbacks","maxLevel","processedSequenceCallback","ignoreThisKeypress","combinations","ownKeys","enumerableOnly","symbols","sym","_objectSpread2","_defineProperty","getOwnPropertyDescriptors","defineProperties","_typeof","iterator","_extends","IE11OrLess","Edge","FireFox","Safari","IOS","ChromeForAndroid","captureMode","capture","passive","selector","msMatchesSelector","webkitMatchesSelector","getParentOrHost","host","nodeType","closest","ctx","includeCTX","_throttleTimeout","R_SPACE","toggleClass","state","classList","css","prop","currentStyle","matrix","selfOnly","appliedTransforms","transform","matrixFn","DOMMatrix","WebKitCSSMatrix","CSSMatrix","MSCSSMatrix","find","getElementsByTagName","getWindowScrollingElement","scrollingElement","getRect","relativeToContainingBlock","relativeToNonStaticParent","undoScale","container","elRect","width","innerHeight","innerWidth","containerRect","elMatrix","scaleX","scaleY","isScrolledPast","elSide","parentSide","getParentAutoScrollElement","elSideVal","parentSideVal","getChild","childNum","includeDragEl","currentChild","children","Sortable","ghost","dragged","draggable","lastChild","last","lastElementChild","previousElementSibling","getRelativeScrollOffset","offsetLeft","winScroller","includeSelf","elem","gotSelf","scrollHeight","elemCSS","overflowX","overflowY","isRectEqual","rect1","rect2","throttle","scrollBy","Polymer","jQuery","Zepto","dom","cloneNode","getChildContainingRectFromElement","ghostEl","child","_rect$left","_rect$top","_rect$right","_rect$bottom","animated","childRect","expando","plugins","defaults","initializeByDefault","PluginManager","mount","plugin","pluginName","pluginEvent","sortable","_this","eventCanceled","eventNameGlobal","initializePlugins","initialized","modified","modifyOption","getEventProperties","eventProperties","modifiedValue","optionListeners","_excluded","_ref","originalEvent","excluded","sourceKeys","_objectWithoutPropertiesLoose","sourceSymbolKeys","propertyIsEnumerable","_objectWithoutProperties","dragEl","parentEl","rootEl","nextEl","lastDownEl","cloneEl","cloneHidden","dragStarted","moved","putSortable","activeSortable","oldIndex","oldDraggableIndex","newIndex","newDraggableIndex","hideGhostForTarget","_hideGhostForTarget","unhideGhostForTarget","_unhideGhostForTarget","cloneNowHidden","cloneNowShown","dispatchSortableEvent","_dispatchEvent","targetEl","toEl","fromEl","extraEventProperties","onName","initEvent","bubbles","pullMode","lastPutMode","allEventProperties","activeGroup","tapEvt","touchEvt","lastDx","lastDy","tapDistanceLeft","tapDistanceTop","lastTarget","lastDirection","targetMoveDistance","ghostRelativeParent","awaitingDragStarted","ignoreNextClick","sortables","pastFirstInvertThresh","isCircumstantialInvert","ghostRelativeParentInitialScroll","_silent","savedInputChecked","documentExists","PositionGhostAbsolutely","CSSFloatProperty","supportDraggable","supportCssPointerEvents","pointerEvents","_detectDirection","elCSS","elWidth","paddingLeft","paddingRight","borderLeftWidth","borderRightWidth","child1","child2","firstChildCSS","secondChildCSS","firstChildWidth","marginLeft","marginRight","secondChildWidth","flexDirection","gridTemplateColumns","touchingSideChild2","_prepareGroup","toFn","pull","sameGroup","group","otherGroup","originalGroup","checkPull","checkPut","put","revertClone","stopImmediatePropagation","nearestEmptyInsertDetectEvent","touches","nearest","clientX","clientY","some","threshold","emptyInsertThreshold","insideHorizontally","insideVertically","_onDragOver","_checkOutsideTargetEl","_isOutsideThisEl","animationCallbackId","animationStates","disabled","store","handle","swapThreshold","invertSwap","invertedSwapThreshold","removeCloneOnHide","ghostClass","chosenClass","dragClass","ignore","preventOnFilter","animation","easing","setData","dataTransfer","textContent","dropBubble","dragoverBubble","dataIdAttr","delay","delayOnTouchOnly","touchStartThreshold","devicePixelRatio","forceFallback","fallbackClass","fallbackOnBody","fallbackTolerance","fallbackOffset","supportPointer","nativeDraggable","_onTapStart","captureAnimationState","fromRect","thisAnimationDuration","childMatrix","addAnimationState","removeAnimationState","indexOfObject","animateAll","animating","animationTime","toRect","prevFromRect","prevToRect","animatingRect","targetMatrix","sqrt","pow","calculateRealTime","animate","animationResetTimer","currentRect","duration","translateX","translateY","animatingX","animatingY","forRepaintDummy","repaint","_onMove","dragRect","targetRect","willInsertAfter","retVal","onMoveFn","onMove","draggedRect","related","relatedRect","_disableDraggable","_unsilent","_generateId","src","href","sum","_nextTick","_cancelNextTick","contains","_getDirection","touch","pointerType","originalTarget","shadowRoot","path","inputs","checked","_saveInputCheckedState","button","criteria","_prepareDragStart","dragStartFn","nextSibling","_lastX","_lastY","_onDrop","_disableDelayedDragEvents","_triggerDragStart","_disableDelayedDrag","_delayedDragTouchMoveHandler","_dragStartTimer","_onTouchMove","_onDragStart","selection","empty","getSelection","removeAllRanges","err","_dragStarted","fallback","_appendGhost","_nulling","_emulateDragOver","elementFromPoint","ghostMatrix","relativeScrollOffset","dx","dy","cssMatrix","removeAttribute","_hideClone","cloneId","insertBefore","_loopId","setInterval","effectAllowed","_dragStartId","revert","vertical","isOwner","canSort","fromSortable","completedFired","dragOverEvent","_ignoreWhileAnimating","completed","elLastChild","lastElRect","childContainingRect","_ghostIsLast","changed","firstElRect","_ghostIsFirst","firstChild","targetBeforeFirstSwap","sibling","differentLevel","differentRowCol","dragElS1Opp","dragElS2Opp","dragElOppLength","targetS1Opp","targetS2Opp","targetOppLength","_dragElInRowColumn","side1","scrolledPastTop","scrollBefore","isLastTarget","mouseOnAxis","targetLength","targetS1","targetS2","invert","_getInsertDirection","_getSwapDirection","dragIndex","nextElementSibling","after","moveVector","extra","axis","insertion","_showClone","_offMoveEvents","_offUpEvents","clearInterval","save","handleEvent","dropEffect","_globalDragOver","toArray","order","getAttribute","useAnimation","querySelectorAll","utils","dst","nextTick","cancelNextTick","detectDirection","_len","version","scrollEl","scrollRootEl","lastAutoScrollX","lastAutoScrollY","touchEvt$1","pointerElemChangedInterval","autoScrolls","scrolling","clearAutoScrolls","autoScroll","pid","clearPointerElemChangedInterval","isFallback","scroll","scrollCustomFn","sens","scrollSensitivity","speed","scrollSpeed","scrollThisInstance","scrollFn","layersOut","currentParent","canScrollX","canScrollY","scrollPosX","scrollPosY","vx","vy","layer","scrollOffsetY","scrollOffsetX","bubbleScroll","drop","toSortable","changedTouches","onSpill","Revert","Remove","startIndex","dragStart","_ref2","_ref3","_ref4","parentSortable","AutoScroll","forceAutoScrollFallback","_handleAutoScroll","_handleFallbackAutoScroll","dragOverCompleted","dragOverBubble","nulling","ogElemScroller","newElem","properties","isBrowser","isFirefox","mozInnerScreenX","getCaretCoordinates","debug","querySelector","div","computed","isInput","whiteSpace","wordWrap","visibility","overflow","coordinates","backgroundColor","sfc","__vccOpts","hasSymbol","PolySymbol","matchedRouteKey","viewDepthKey","routerKey","routeLocationKey","routerViewLocationKey","applyToParams","params","newParams","noop","TRAILING_SLASH_RE","removeTrailingSlash","parseURL","parseQuery","location","currentLocation","query","searchString","hash","searchPos","hashPos","fromSegments","toSegments","toPosition","segment","resolveRelativePath","fullPath","stripBase","pathname","base","isSameRouteRecord","aliasOf","isSameRouteLocationParams","isSameRouteLocationParamsValue","isEquivalentArray","every","NavigationType","NavigationDirection","BEFORE_HASH_RE","createHref","computeScrollPosition","getScrollKey","delta","history","scrollPositions","Map","createBaseLocation","protocol","createCurrentLocation","slicePos","includes","pathFromHash","buildState","back","current","forward","replaced","computeScroll","createWebHistory","historyNavigation","historyState","changeLocation","hashIndex","console","error","currentState","useHistoryStateNavigation","baseEl","normalizeBase","historyListeners","teardowns","pauseState","popStateHandler","fromState","pop","unknown","beforeUnloadListener","replaceState","pauseListeners","listen","teardown","useHistoryListeners","routerHistory","go","triggerListeners","createWebHashHistory","isRouteName","START_LOCATION_NORMALIZED","matched","meta","redirectedFrom","NavigationFailureSymbol","NavigationFailureType","createRouterError","isNavigationFailure","BASE_PARAM_PATTERN","BASE_PATH_PARSER_OPTIONS","sensitive","strict","REGEX_CHARS_RE","compareScoreArray","comparePathParserScore","aScore","bScore","comp","ROOT_TOKEN","VALID_PARAM_RE","createRouteRecordMatcher","record","parser","segments","extraOptions","segmentScores","tokenIndex","token","subSegmentScore","repeatable","optional","regexp","message","subPattern","avoidDuplicatedSlash","endsWith","param","tokensToParser","crash","buffer","previousState","tokens","finalizeSegment","char","customRe","consumeBuffer","addCharToBuffer","tokenizePath","matcher","normalizeRecordProps","propsObject","components","isAliasRecord","mergeMetaFields","mergeOptions","partialOptions","isRecordChildOf","HASH_RE","AMPERSAND_RE","SLASH_RE","EQUAL_RE","IM_RE","PLUS_RE","ENC_BRACKET_OPEN_RE","ENC_BRACKET_CLOSE_RE","ENC_CARET_RE","ENC_BACKTICK_RE","ENC_CURLY_OPEN_RE","ENC_PIPE_RE","ENC_CURLY_CLOSE_RE","ENC_SPACE_RE","commonEncode","encodeURI","encodeQueryValue","encodeParam","encodePath","decode","decodeURIComponent","searchParams","searchParam","eqPos","currentValue","stringifyQuery","normalizeQuery","normalizedQuery","useCallbacks","handler","onBeforeRouteUpdate","updateGuard","activeRecord","guard","removeFromList","delete","registerGuard","guardToPromiseFn","enterCallbackArray","enterCallbacks","Promise","resolve","reject","valid","route","guardReturn","instances","guardCall","extractComponentsGuards","guardType","guards","rawComponent","component","componentPromise","resolved","resolvedComponent","useLink","router","currentRoute","activeRecordIndex","routeMatched","currentMatched","parentRecordPath","getOriginalPath","isActive","outer","inner","innerValue","outerValue","includesParams","isExactActive","navigate","currentTarget","guardEvent","RouterLink","required","Boolean","activeClass","exactActiveClass","custom","ariaCurrentValue","setup","slots","elClass","getLinkClass","linkActiveClass","linkExactActiveClass","class","propClass","globalClass","defaultClass","normalizeSlot","slot","slotContent","RouterView","inheritAttrs","compatConfig","MODE","attrs","injectedRoute","routeToDisplay","depth","matchedRouteRef","viewRef","instance","oldInstance","oldName","leaveGuards","updateGuards","matchedRoute","ViewComponent","currentName","Component","routePropsOption","routeProps","onVnodeUnmounted","vnode","isUnmounted","ref","createRouter","routes","globalOptions","matchers","matcherMap","addRoute","originalRecord","isRootAdd","mainNormalizedRecord","redirect","beforeEnter","Set","normalizeRouteRecord","normalizedRecords","originalMatcher","normalizedRecord","parentPath","connectingSlash","removeRoute","insertMatcher","matcherRef","paramsFromLocation","parentMatcher","unshift","getRoutes","getRecordMatcher","createRouterMatcher","parseQuery$1","stringifyQuery$1","beforeGuards","beforeResolveGuards","afterGuards","pendingLocation","scrollBehavior","scrollRestoration","normalizeParams","paramValue","encodeParams","decodeParams","rawLocation","locationNormalized","matcherLocation","targetParams","stringifyURL","locationAsObject","checkCanceledNavigation","pushWithRedirect","handleRedirectRecord","lastMatched","newTargetLocation","targetLocation","force","shouldRedirect","toLocation","failure","aLastIndex","bLastIndex","isSameRouteLocation","handleScroll","markAsReady","triggerError","finalizeNavigation","triggerAfterEach","checkCanceledNavigationAndReject","leavingRecords","updatingRecords","enteringRecords","recordFrom","recordTo","extractChangingRecords","canceledNavigationCheck","runGuardQueue","isPush","isFirstNavigation","removeHistoryListener","ready","readyHandlers","errorHandlers","_from","scrollPosition","getSavedScrollPosition","scrollToOptions","positionEl","isIdSelector","getElementById","docRect","behavior","getElementPosition","scrollTo","scrollToPosition","started","installedApps","parentOrRoute","recordMatcher","hasRoute","routeMatcher","beforeEach","beforeResolve","afterEach","onError","isReady","install","app","config","globalProperties","$router","reactiveRoute","provide","unmountApp","unmount","promise","useRouter","useRoute","activeEffectScope","EffectScope","detached","effects","cleanups","scopes","currentEffectScope","stop","fromParent","createDep","dep","wasTracked","trackOpBit","newTracked","targetMap","WeakMap","effectTrackDepth","maxMarkerBits","activeEffect","ITERATE_KEY","MAP_KEY_ITERATE_KEY","ReactiveEffect","scheduler","scope","deps","effect","recordEffectScope","lastShouldTrack","shouldTrack","initDepMarkers","cleanupEffect","ptr","finalizeDepMarkers","deferStop","onStop","trackStack","pauseTracking","resetTracking","track","depsMap","trackEffects","debuggerEventExtraInfo","newValue","oldTarget","triggerEffects","triggerEffect","allowRecurse","isNonTrackableKeys","builtInSymbols","getOwnPropertyNames","createGetter","shallowGet","readonlyGet","arrayInstrumentations","createArrayInstrumentations","instrumentations","toRaw","isReadonly","shallow","receiver","shallowReadonlyMap","readonlyMap","shallowReactiveMap","reactiveMap","targetIsArray","Reflect","isRef","readonly","reactive","createSetter","shallowSet","isShallow","hadKey","mutableHandlers","deleteProperty","readonlyHandlers","shallowReactiveHandlers","toShallow","getProto","getPrototypeOf","get$1","rawTarget","rawKey","wrap","toReadonly","toReactive","has$1","set$1","deleteEntry","hadItems","createForEach","observed","createIterableMethod","targetIsMap","isPair","isKeyOnly","innerIterator","done","createReadonlyMethod","createInstrumentations","mutableInstrumentations","shallowInstrumentations","readonlyInstrumentations","shallowReadonlyInstrumentations","createInstrumentationGetter","mutableCollectionHandlers","shallowCollectionHandlers","readonlyCollectionHandlers","createReactiveObject","shallowReactive","baseHandlers","collectionHandlers","proxyMap","existingProxy","targetType","isExtensible","rawType","targetTypeMap","proxy","Proxy","isReactive","isProxy","markRaw","trackRefValue","triggerRefValue","newVal","createRef","shallowRef","rawValue","RefImpl","__v_isShallow","_rawValue","_value","unref","shallowUnwrapHandlers","proxyRefs","objectWithRefs","ComputedRefImpl","getter","_setter","isSSR","_dirty","_cacheable","getterOrOptions","debugOptions","setter","onlyGetter","callWithErrorHandling","handleError","callWithAsyncErrorHandling","throwInDev","cur","exposedInstance","errorInfo","errorCapturedHooks","ec","appErrorHandler","appContext","errorHandler","logError","isFlushing","isFlushPending","queue","flushIndex","pendingPreFlushCbs","activePreFlushCbs","preFlushIndex","pendingPostFlushCbs","activePostFlushCbs","postFlushIndex","resolvedPromise","currentFlushPromise","currentPreFlushParentJob","queueJob","job","middle","findInsertionIndex","queueFlush","flushJobs","queueCb","cb","activeQueue","pendingQueue","flushPreFlushCbs","seen","parentJob","flushPostFlushCbs","deduped","emit$1","rawArgs","modelArg","modifiersKey","number","handlerName","onceHandler","emitted","normalizeEmitsOptions","asMixin","emitsCache","cached","emits","isEmitListener","currentRenderingInstance","currentScopeId","setCurrentRenderingInstance","__scopeId","withCtx","isNonScopedSlot","_n","renderFnWithContext","_d","setBlockTracking","prevInstance","_c","renderComponentRoot","withProxy","propsOptions","renderCache","setupState","fallthroughAttrs","shapeFlag","proxyToUse","normalizeVNode","getFunctionalFallthrough","blockStack","createVNode","Comment","filterModelListeners","cloneVNode","dirs","transition","hasPropsChanged","prevProps","nextProps","emitsOptions","nextKeys","currentInstance","provides","parentProvides","inject","defaultValue","treatDefaultAsFactory","INITIAL_WATCHER_VALUE","watch","immediate","deep","onTrack","onTrigger","cleanup","forceTrigger","isMultiSource","traverse","onCleanup","baseGetter","isInSSRComponentSetup","queuePostRenderEffect","suspense","queuePreFlushCb","doWatch","useTransitionState","isMounted","isLeaving","isUnmounting","leavingVNodes","onMounted","onBeforeUnmount","TransitionHookValidator","BaseTransition","mode","appear","persisted","onBeforeEnter","onEnter","onAfterEnter","onEnterCancelled","onBeforeLeave","onLeave","onAfterLeave","onLeaveCancelled","onBeforeAppear","onAppear","onAfterAppear","onAppearCancelled","getCurrentInstance","prevTransitionKey","getTransitionRawChildren","hasFound","rawProps","emptyPlaceholder","innerChild","getKeepAliveChild","enterHooks","resolveTransitionHooks","setTransitionHooks","oldChild","subTree","oldInnerChild","transitionKeyChanged","getTransitionKey","isSameVNodeType","leavingHooks","afterLeave","delayLeave","earlyRemove","delayedLeave","getLeavingNodesForType","_leaveCb","leavingVNodesCache","callHook","hook","callAsyncHook","hooks","leavingVNode","enter","afterHook","cancelHook","called","_enterCb","cancelled","leave","isKeepAlive","ssContent","ssFallback","keepComment","parentKey","keyedFragmentCount","Fragment","patchFlag","defineComponent","isAsyncWrapper","__asyncLoader","__isKeepAlive","onActivated","registerKeepAliveHook","onDeactivated","wrappedHook","__wdc","isDeactivated","injectHook","injectToKeepAliveRoot","keepAliveRoot","injected","onUnmounted","prepend","__weh","setCurrentInstance","unsetCurrentInstance","createHook","lifecycle","onBeforeUpdate","onUpdated","withDirectives","directives","internalInstance","getExposeProxy","bindings","mounted","updated","invokeDirectiveHook","prevVNode","oldBindings","binding","COMPONENTS","DIRECTIVES","resolveComponent","maybeSelfReference","resolveAsset","NULL_DYNAMIC_COMPONENT","resolveDynamicComponent","resolveDirective","warnMissing","selfName","displayName","getComponentName","registry","renderList","renderItem","renderSlot","noSlotted","isCE","openBlock","validSlotContent","ensureValidVNode","createBlock","scopeId","slotScopeIds","vnodes","isVNode","toHandlers","getPublicInstance","isStatefulComponent","publicPropertiesMap","$el","$data","$props","$attrs","$slots","$refs","refs","$parent","$root","$emit","$options","$forceUpdate","$nextTick","$watch","PublicInstanceProxyHandlers","accessCache","normalizedProps","publicGetter","cssModule","__cssModules","descriptor","setFullProps","needCastKeys","rawCastValues","hasAttrsChanged","camelKey","rawCurrentProps","castValues","resolvePropValue","isAbsent","opt","hasDefault","propsDefaults","normalizePropsOptions","propsCache","normalizedKey","validatePropName","booleanIndex","getTypeIndex","stringIndex","getType","ctor","isSameType","expectedTypes","isInternalKey","normalizeSlotValue","rawSlot","normalizeObjectSlots","rawSlots","_ctx","normalizeVNodeSlots","initSlots","InternalObjectKey","updateSlots","optimized","needDeletionCheck","deletionComparisonTarget","$stable","createAppContext","isNativeTag","performance","optionMergeStrategies","warnHandler","compilerOptions","mixins","optionsCache","uid","createAppAPI","hydrate","rootComponent","rootProps","installedPlugins","_uid","_component","_props","_container","_context","_instance","use","mixin","directive","rootContainer","isHydrate","isSVG","__vue_app__","setRef","rawRef","oldRawRef","parentSuspense","isUnmount","refValue","oldRef","_isString","_isRef","doSet","existing","pendingBranch","createRenderer","createHydrationFns","__VUE__","insert","hostInsert","hostRemove","patchProp","hostPatchProp","hostCreateElement","createText","hostCreateText","createComment","hostCreateComment","setText","hostSetText","setElementText","hostSetElementText","hostParentNode","hostNextSibling","setScopeId","hostSetScopeId","hostCloneNode","insertStaticContent","hostInsertStaticContent","patch","n1","n2","anchor","parentComponent","dynamicChildren","getNextHostNode","Text","processText","processCommentNode","Static","mountStaticNode","processFragment","processElement","processComponent","process","internals","removeStaticNode","mountElement","patchElement","vnodeHook","mountChildren","unmountChildren","onVnodeBeforeMount","invokeVNodeHook","needCallTransitionHooks","onVnodeMounted","parentVNode","cloneIfMounted","oldProps","newProps","toggleRecurse","onVnodeBeforeUpdate","areChildrenSVG","patchBlockChildren","patchChildren","patchProps","propsToUpdate","dynamicProps","onVnodeUpdated","oldChildren","newChildren","fallbackContainer","oldVNode","newVNode","fragmentStartAnchor","fragmentEndAnchor","fragmentSlotScopeIds","traverseStaticChildren","mountComponent","updateComponent","initialVNode","emptyAppContext","uid$1","exposed","exposeProxy","setupContext","suspenseId","pendingId","asyncDep","asyncResolved","bc","bm","bu","um","bum","da","rtg","rtc","sp","ce","createComponentInstance","renderer","isStateful","initProps","setupResult","expose","createAttrsProxy","createSetupContext","resolvedResult","handleSetupResult","finishComponentSetup","setupStatefulComponent","setupComponent","registerDep","setupRenderEffect","placeholder","nextVNode","prevChildren","nextChildren","shouldUpdateComponent","updateComponentPreRender","invalidateJob","originNext","nextTree","prevTree","updateHOCHostEl","isAsyncWrapperVNode","hydrateNode","hydrateSubTree","scopedInitialVNode","rawPrevProps","kebabKey","camelizedKey","updateProps","c1","prevShapeFlag","c2","patchKeyedChildren","patchUnkeyedChildren","oldLength","newLength","commonLength","nextChild","parentAnchor","l2","e1","e2","nextPos","s1","s2","keyToNewIndexMap","patched","toBePatched","maxNewIndexSoFar","newIndexToOldIndexMap","prevChild","increasingNewIndexSequence","arrI","getSequence","nextIndex","move","moveType","performLeave","moveStaticNode","doRemove","shouldInvokeDirs","shouldInvokeVnodeHook","onVnodeBeforeUnmount","unmountComponent","removeFragment","performRemove","_vnode","mt","mc","pc","pbc","createApp","baseCreateRenderer","allowed","ch1","ch2","currentBlock","disableTracking","isBlockTreeEnabled","setupBlock","createElementBlock","createBaseVNode","__v_isVNode","normalizeKey","normalizeRef","ref_key","ref_for","isBlockNode","needFullChildrenNormalization","__v_skip","targetAnchor","staticCount","normalizeChildren","cloned","guardReactiveProps","klass","__isSuspense","isSuspense","__isTeleport","isTeleport","extraProps","mergeRef","mergedProps","mergeProps","createTextVNode","flag","createStaticVNode","content","numberOfNodes","createCommentVNode","asBlock","memo","slotFlag","toMerge","incoming","installWithProxy","__ssrInlineRender","ssrRender","skipOptions","isCustomElement","delimiters","componentCompilerOptions","finalCompilerOptions","propsOrChildren","templateContainer","nodeOps","createElementNS","multiple","setAttribute","createTextNode","node","nodeValue","before","previousSibling","wrapper","importantRE","setStyle","setProperty","rawName","prefixCache","prefixes","autoPrefix","xlinkNS","_getNow","skipTimestampCheck","timeStamp","ffMatch","cachedNow","patchEvent","prevValue","nextValue","invokers","_vei","existingInvoker","optionsModifierRE","parseName","invoker","initialValue","attached","originalStop","_stopped","patchStopImmediatePropagation","createInvoker","nativeOnRE","HTMLElement","TRANSITION","ANIMATION","Transition","baseProps","DOMTransitionPropsValidators","enterFromClass","enterActiveClass","enterToClass","appearFromClass","appearActiveClass","appearToClass","leaveFromClass","leaveActiveClass","leaveToClass","durations","NumberOf","normalizeDuration","enterDuration","leaveDuration","finishEnter","isAppear","removeTransitionClass","finishLeave","makeEnterHook","nextFrame","addTransitionClass","hasExplicitCallback","whenTransitionEnds","resolveTransitionProps","cls","_vtc","requestAnimationFrame","endId","expectedType","explicitTimeout","_endId","resolveIfNotStale","timeout","propCount","styles","getStyleProperties","transitionDelays","transitionDurations","transitionTimeout","getTimeout","animationDelays","animationDurations","animationTimeout","hasTransform","getTransitionInfo","endEvent","ended","onEnd","delays","toMs","getModelAssigner","onCompositionStart","composing","onCompositionEnd","Event","vModelText","created","lazy","_assign","castToNumber","domValue","beforeUpdate","activeElement","vModelCheckbox","modelValue","_modelValue","elementValue","getValue","found","filtered","getCheckboxValue","setChecked","vModelRadio","vModelSelect","isSetModel","selectedVal","selected","setSelected","_binding","isMultiple","optionValue","selectedIndex","vModelDynamic","callModelHook","resolveDynamicModel","systemModifiers","modifierGuards","prevent","ctrl","alt","exact","withModifiers","keyNames","esc","space","withKeys","eventKey","vShow","beforeMount","_vod","setDisplay","beforeUnmount","rendererOptions","transitionClasses","patchClass","isCssString","currentDisplay","patchStyle","shouldSetAsProp","needRemove","patchDOMProp","_trueValue","_falseValue","removeAttributeNS","setAttributeNS","isBoolean","patchAttr","containerOrSelector","normalizeContainer","SVGElement","Element","getTarget","isProxyAvailable","HOOK_SETUP","supported","perf","ApiProxy","targetQueue","onQueue","defaultSettings","settings","localSettingsSaveId","currentSettings","localStorage","getItem","fallbacks","getSettings","setSettings","setItem","perf_hooks","pluginId","proxiedOn","_target","proxiedTarget","setRealTarget","storeKey","useStore","forEachValue","genericSubscribe","subs","resetStore","hot","_actions","_mutations","_wrappedGetters","_modulesNamespaceMap","installModule","_modules","resetStoreState","oldState","_state","getters","_makeLocalGettersCache","wrappedGetters","computedObj","partial","enableStrictMode","_withCommit","rootState","isRoot","namespace","getNamespace","namespaced","parentState","getNestedState","moduleName","local","noNamespace","dispatch","_type","_payload","_options","unifyObjectStyle","payload","commit","makeLocalGetters","makeLocalContext","forEachMutation","mutation","registerMutation","forEachAction","rootGetters","_devtoolHook","registerAction","forEachGetter","rawGetter","registerGetter","forEachChild","gettersProxy","splitPos","localType","MUTATIONS_LAYER_ID","ACTIONS_LAYER_ID","INSPECTOR_ID","actionId","addDevtools","pluginDescriptor","setupFn","__VUE_DEVTOOLS_GLOBAL_HOOK__","enableProxy","enableEarlyProxy","__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__","__VUE_DEVTOOLS_PLUGINS__","setupDevtoolsPlugin","label","homepage","logo","packageName","componentStateTypes","api","addTimelineLayer","color","COLOR_LIME_500","addInspector","icon","treeFilterPlaceholder","getInspectorTree","inspectorId","nodes","flattenStoreForInspectorTree","rootNodes","formatStoreForInspectorTree","getInspectorState","modulePath","nodeId","gettersKeys","storeState","editable","tree","leafKey","_custom","tooltip","abstract","canThrow","transformPathsToObjectTree","extractNameFromPath","formatStoreForInspectorState","moduleMap","_children","editInspectorState","subscribe","notifyComponentUpdate","sendInspectorTree","sendInspectorState","addTimelineEvent","layerId","title","subscribeAction","_id","_time","groupId","subtitle","TAG_NAMESPACED","textColor","tags","Module","rawModule","runtime","_rawModule","rawState","prototypeAccessors$1","addChild","hasChild","actions","mutations","ModuleCollection","rawRootModule","register","targetModule","newModule","modules","createStore","Store","this$1$1","rawChildModule","unregister","isRegistered","devtools","_committing","_actionSubscribers","_subscribers","_devtools","prototypeAccessors","normalizeMap","isValidMap","normalizeNamespace","getModuleByNamespace","helper","injectKey","$store","entry","sub","all","registerModule","preserveState","unregisterModule","hasModule","hotUpdate","newOptions","committing","states","vuex","PACKET_TYPES","PACKET_TYPES_REVERSE","ERROR_PACKET","withNativeBlob","Blob","withNativeArrayBuffer","ArrayBuffer","encodeBlobAsBase64","fileReader","FileReader","onload","readAsDataURL","supportsBinary","isView","lookup","Uint8Array","chars","decodeBase64Packet","binaryType","decoded","base64","encoded1","encoded2","encoded3","encoded4","bufferLength","arraybuffer","bytes","mapBinary","encodedPacket","SEPARATOR","Emitter","emitReserved","hasListeners","globalThisShim","pick","attr","NATIVE_SET_TIMEOUT","NATIVE_CLEAR_TIMEOUT","installTimerFunctions","useNativeTimers","setTimeoutFn","clearTimeoutFn","TransportError","reason","description","Transport","readyState","socket","open","doOpen","close","doClose","onClose","send","packets","write","onOpen","onData","packet","onPacket","details","alphabet","seed","num","encoded","yeast","encodeURIComponent","XMLHttpRequest","hasCORS","XHR","xdomain","hasXHR2","responseType","Request","uri","async","xd","xscheme","xs","xhr","extraHeaders","setDisableHeaderCheck","setRequestHeader","withCredentials","requestTimeout","onreadystatechange","status","onLoad","requestsCount","requests","fromError","abort","responseText","unloadHandler","WebSocket","MozWebSocket","isReactNative","product","transports","websocket","forceBase64","check","protocols","headers","ws","addEventListeners","onopen","autoUnref","_socket","onclose","closeEvent","onmessage","ev","onerror","lastPacket","secure","port","timestampRequests","timestampParam","b64","encodedQuery","hostname","polling","isSSL","poll","pause","onPause","total","doPoll","encodedPayload","encodedPackets","decodedPacket","decodePayload","count","encodePayload","doWrite","sid","request","req","xhrStatus","pollXhr","parts","authority","ipv6uri","pathNames","queryKey","$0","$1","$2","Socket","writeBuffer","prevBufferLen","agent","upgrade","rememberUpgrade","rejectUnauthorized","perMessageDeflate","transportOptions","closeOnBeforeunload","qs","qry","pairs","pair","upgrades","pingInterval","pingTimeout","pingTimeoutTimer","beforeunloadEventListener","transport","offlineEventListener","createTransport","EIO","priorWebsocketSuccess","setTransport","onDrain","probe","failed","onTransportOpen","msg","upgrading","freezeTransport","onTransportClose","onupgrade","onHandshake","resetPingTimeout","sendPacket","filterUpgrades","maxPayload","getWritablePackets","payloadSize","utf8Length","byteLength","compress","cleanupAndClose","waitForUpgrade","filteredUpgrades","withNativeFile","File","hasBinary","deconstructPacket","buffers","packetData","pack","_deconstructPacket","attachments","_placeholder","newData","reconstructPacket","_reconstructPacket","PacketType","Encoder","encode","EVENT","ACK","encodeAsString","encodeAsBinary","BINARY_EVENT","BINARY_ACK","nsp","deconstruction","Decoder","reviver","reconstructor","decodeString","isBinaryEvent","BinaryReconstructor","takeBinaryData","buf","tryParse","isPayloadValid","CONNECT","DISCONNECT","CONNECT_ERROR","finishedReconstruction","reconPack","binData","RESERVED_EVENTS","freeze","connect","connect_error","disconnect","disconnecting","newListener","io","connected","receiveBuffer","sendBuffer","ids","acks","flags","auth","_autoConnect","disconnected","subEvents","onpacket","_readyState","ack","_registerAckCallback","isTransportWritable","engine","volatile","notifyOutgoingListeners","timer","_packet","onconnect","onevent","onack","ondisconnect","emitEvent","_anyListeners","sent","emitBuffered","subDestroy","onAny","prependAny","offAny","listenersAny","onAnyOutgoing","_anyOutgoingListeners","prependAnyOutgoing","offAnyOutgoing","listenersAnyOutgoing","Backoff","factor","jitter","attempts","rand","random","deviation","setMin","setMax","setJitter","Manager","nsps","reconnection","reconnectionAttempts","reconnectionDelay","reconnectionDelayMax","randomizationFactor","backoff","_parser","encoder","decoder","autoConnect","_reconnection","_reconnectionAttempts","_reconnectionDelay","_randomizationFactor","_reconnectionDelayMax","_timeout","maybeReconnectOnOpen","_reconnecting","reconnect","skipReconnect","openSubDestroy","errorSub","onping","ondata","ondecoded","_destroy","_close","onreconnect","attempt","parsed","loc","sameNamespace","forceNew","multiplex","headToCursor","cursorToTail","curr","aLength","cLength","setSelectionRange","strB2","execCommand","wrapCursor","initEnd"],"sourceRoot":""}