{"version":3,"file":"main.js","sources":["../node_modules/@vue/shared/dist/shared.esm-bundler.js","../node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js","../node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js","../node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js","../node_modules/@vue/devtools-api/lib/esm/env.js","../node_modules/@vue/devtools-api/lib/esm/const.js","../node_modules/@vue/devtools-api/lib/esm/time.js","../node_modules/@vue/devtools-api/lib/esm/proxy.js","../node_modules/@vue/devtools-api/lib/esm/index.js","../node_modules/vue-router/dist/vue-router.mjs","../node_modules/vuex/dist/vuex.esm-bundler.js","../src/debug.js","../node_modules/axios/lib/helpers/bind.js","../node_modules/axios/lib/utils.js","../node_modules/axios/lib/helpers/buildURL.js","../node_modules/axios/lib/core/InterceptorManager.js","../node_modules/axios/lib/core/transformData.js","../node_modules/axios/lib/cancel/isCancel.js","../node_modules/axios/lib/helpers/normalizeHeaderName.js","../node_modules/axios/lib/core/enhanceError.js","../node_modules/axios/lib/core/createError.js","../node_modules/axios/lib/core/settle.js","../node_modules/axios/lib/helpers/isAbsoluteURL.js","../node_modules/axios/lib/helpers/combineURLs.js","../node_modules/axios/lib/core/buildFullPath.js","../node_modules/axios/lib/helpers/parseHeaders.js","../node_modules/axios/lib/helpers/isURLSameOrigin.js","../node_modules/axios/lib/helpers/cookies.js","../node_modules/axios/lib/adapters/xhr.js","../node_modules/axios/lib/defaults.js","../node_modules/axios/lib/core/dispatchRequest.js","../node_modules/axios/lib/core/mergeConfig.js","../node_modules/axios/lib/core/Axios.js","../node_modules/axios/lib/cancel/Cancel.js","../node_modules/axios/lib/cancel/CancelToken.js","../node_modules/axios/lib/helpers/spread.js","../node_modules/axios/lib/axios.js","../node_modules/axios/index.js","../src/api/client.js","../src/api/auth.js","../src/store/modules/auth.js","../src/store/modules/player.js","../src/api/archive.js","../src/store/modules/annotation.js","../src/store/modules/stereometry.js","../src/store/modules/monthview.js","../src/store/index.js","../plugin-vue:export-helper","../src/components/icons/Whale.vue","../node_modules/@css-render/plugin-bem/esm/index.js","../node_modules/css-render/esm/parse.js","../node_modules/css-render/esm/utils.js","../node_modules/css-render/esm/render.js","../node_modules/@emotion/hash/dist/hash.browser.esm.js","../node_modules/css-render/esm/mount.js","../node_modules/css-render/esm/c.js","../node_modules/css-render/esm/CssRender.js","../node_modules/css-render/esm/exists.js","../node_modules/naive-ui/es/_utils/cssr/index.mjs","../node_modules/seemly/es/animation/next-frame-once.js","../node_modules/seemly/es/dom/happens-in.js","../node_modules/seemly/es/dom/get-precise-event-target.js","../node_modules/seemly/es/css/responsive.js","../node_modules/seemly/es/css/index.js","../node_modules/seemly/es/color/colors.js","../node_modules/seemly/es/color/convert.js","../node_modules/seemly/es/color/index.js","../node_modules/seemly/es/misc/index.js","../node_modules/evtd/es/utils.js","../node_modules/evtd/es/traps.js","../node_modules/evtd/es/delegate.js","../node_modules/vooks/es/use-false-until-truthy.js","../node_modules/vooks/es/use-memo.js","../node_modules/vooks/es/utils.js","../node_modules/vooks/es/on-fonts-ready.js","../node_modules/vooks/es/use-click-position.js","../node_modules/vooks/es/use-clicked.js","../node_modules/vooks/es/use-merged-state.js","../node_modules/vooks/es/life-cycle/use-is-mounted.js","../node_modules/vooks/es/use-compitable.js","../node_modules/vooks/es/use-is-ios.js","../node_modules/vooks/es/use-breakpoints.js","../node_modules/vooks/es/use-keyboard.js","../node_modules/naive-ui/es/_internal/select-menu/src/interface.mjs","../node_modules/naive-ui/es/drawer/src/interface.mjs","../node_modules/naive-ui/es/modal/src/interface.mjs","../node_modules/naive-ui/es/popover/src/interface.mjs","../node_modules/naive-ui/es/_utils/composable/use-adjusted-to.mjs","../node_modules/naive-ui/es/_utils/composable/use-collection.mjs","../node_modules/naive-ui/es/_utils/composable/use-deferred-true.mjs","../node_modules/naive-ui/es/_utils/env/is-browser.mjs","../node_modules/naive-ui/es/_utils/composable/use-is-composing.mjs","../node_modules/naive-ui/es/_utils/composable/use-lock-html-scroll.mjs","../node_modules/naive-ui/es/_utils/composable/use-reactivated.mjs","../node_modules/vueuc/es/shared/v-node.js","../node_modules/vueuc/es/binder/src/utils.js","../node_modules/vueuc/es/binder/src/Binder.js","../node_modules/vueuc/es/binder/src/Target.js","../node_modules/vdirs/es/mousemoveoutside.js","../node_modules/vdirs/es/clickoutside.js","../node_modules/vdirs/es/utils.js","../node_modules/vdirs/es/zindexable/z-index-manager.js","../node_modules/vdirs/es/zindexable/index.js","../node_modules/@css-render/vue3-ssr/esm/index.js","../node_modules/vueuc/es/shared/warn.js","../node_modules/vueuc/es/shared/cssr.js","../node_modules/vueuc/es/shared/finweck-tree.js","../node_modules/vueuc/es/shared/resolve-to.js","../node_modules/vueuc/es/lazy-teleport/src/index.js","../node_modules/vueuc/es/binder/src/get-placement-style.js","../node_modules/vueuc/es/binder/src/Follower.js","../node_modules/@juggle/resize-observer/lib/utils/resizeObservers.js","../node_modules/@juggle/resize-observer/lib/algorithms/hasActiveObservations.js","../node_modules/@juggle/resize-observer/lib/algorithms/hasSkippedObservations.js","../node_modules/@juggle/resize-observer/lib/algorithms/deliverResizeLoopError.js","../node_modules/@juggle/resize-observer/lib/ResizeObserverBoxOptions.js","../node_modules/@juggle/resize-observer/lib/utils/freeze.js","../node_modules/@juggle/resize-observer/lib/ResizeObserverSize.js","../node_modules/@juggle/resize-observer/lib/DOMRectReadOnly.js","../node_modules/@juggle/resize-observer/lib/utils/element.js","../node_modules/@juggle/resize-observer/lib/utils/global.js","../node_modules/@juggle/resize-observer/lib/algorithms/calculateBoxSize.js","../node_modules/@juggle/resize-observer/lib/ResizeObserverEntry.js","../node_modules/@juggle/resize-observer/lib/algorithms/calculateDepthForNode.js","../node_modules/@juggle/resize-observer/lib/algorithms/broadcastActiveObservations.js","../node_modules/@juggle/resize-observer/lib/algorithms/gatherActiveObservationsAtDepth.js","../node_modules/@juggle/resize-observer/lib/utils/process.js","../node_modules/@juggle/resize-observer/lib/utils/queueMicroTask.js","../node_modules/@juggle/resize-observer/lib/utils/queueResizeObserver.js","../node_modules/@juggle/resize-observer/lib/utils/scheduler.js","../node_modules/@juggle/resize-observer/lib/ResizeObservation.js","../node_modules/@juggle/resize-observer/lib/ResizeObserverDetail.js","../node_modules/@juggle/resize-observer/lib/ResizeObserverController.js","../node_modules/@juggle/resize-observer/lib/ResizeObserver.js","../node_modules/vueuc/es/resize-observer/src/delegate.js","../node_modules/vueuc/es/resize-observer/src/VResizeObserver.js","../node_modules/vueuc/es/virtual-list/src/config.js","../node_modules/vueuc/es/virtual-list/src/context.js","../node_modules/vueuc/es/virtual-list/src/xScroll.js","../node_modules/vueuc/es/virtual-list/src/VirtualListRow.js","../node_modules/vueuc/es/virtual-list/src/VirtualList.js","../node_modules/vueuc/es/x-scroll/src/index.js","../node_modules/vueuc/es/overflow/src/index.js","../node_modules/vueuc/es/focus-trap/src/utils.js","../node_modules/vueuc/es/focus-trap/src/index.js","../node_modules/naive-ui/es/_utils/composable/use-resize.mjs","../node_modules/naive-ui/es/_utils/css/color-to-class.mjs","../node_modules/naive-ui/es/_utils/css/format-length.mjs","../node_modules/naive-ui/es/_utils/css/rtl-inset.mjs","../node_modules/naive-ui/es/_utils/dom/download.mjs","../node_modules/naive-ui/es/_utils/env/is-jsdom.mjs","../node_modules/naive-ui/es/_utils/event/index.mjs","../node_modules/naive-ui/es/_utils/naive/attribute.mjs","../node_modules/naive-ui/es/_utils/naive/prop.mjs","../node_modules/naive-ui/es/_utils/naive/warn.mjs","../node_modules/naive-ui/es/_utils/vue/call.mjs","../node_modules/naive-ui/es/_utils/vue/create-ref-setter.mjs","../node_modules/naive-ui/es/_utils/vue/flatten.mjs","../node_modules/naive-ui/es/_utils/vue/get-first-slot-vnode.mjs","../node_modules/naive-ui/es/_utils/vue/get-slot.mjs","../node_modules/naive-ui/es/_utils/vue/is-node-v-show-false.mjs","../node_modules/naive-ui/es/_utils/vue/keep.mjs","../node_modules/naive-ui/es/_utils/vue/keysOf.mjs","../node_modules/naive-ui/es/_utils/vue/merge-handlers.mjs","../node_modules/naive-ui/es/_utils/vue/omit.mjs","../node_modules/naive-ui/es/_utils/vue/render.mjs","../node_modules/naive-ui/es/_utils/vue/resolve-slot.mjs","../node_modules/naive-ui/es/_utils/vue/wrapper.mjs","../node_modules/naive-ui/es/config-provider/src/context.mjs","../node_modules/naive-ui/es/_mixins/use-config.mjs","../node_modules/naive-ui/es/_mixins/use-css-vars-class.mjs","../node_modules/naive-ui/es/_mixins/use-form-item.mjs","../node_modules/naive-ui/es/locales/common/enUS.mjs","../node_modules/date-fns/locale/_lib/buildFormatLongFn.mjs","../node_modules/date-fns/locale/_lib/buildLocalizeFn.mjs","../node_modules/date-fns/locale/_lib/buildMatchFn.mjs","../node_modules/date-fns/locale/_lib/buildMatchPatternFn.mjs","../node_modules/date-fns/locale/en-US/_lib/formatDistance.mjs","../node_modules/date-fns/locale/en-US/_lib/formatRelative.mjs","../node_modules/date-fns/locale/en-US/_lib/localize.mjs","../node_modules/date-fns/locale/en-US/_lib/match.mjs","../node_modules/date-fns/locale/en-US/_lib/formatLong.mjs","../node_modules/date-fns/locale/en-US.mjs","../node_modules/naive-ui/es/locales/date/enUS.mjs","../node_modules/lodash-es/_freeGlobal.js","../node_modules/lodash-es/_root.js","../node_modules/lodash-es/_Symbol.js","../node_modules/lodash-es/_getRawTag.js","../node_modules/lodash-es/_objectToString.js","../node_modules/lodash-es/_baseGetTag.js","../node_modules/lodash-es/isObjectLike.js","../node_modules/lodash-es/isSymbol.js","../node_modules/lodash-es/_arrayMap.js","../node_modules/lodash-es/isArray.js","../node_modules/lodash-es/_baseToString.js","../node_modules/lodash-es/_trimmedEndIndex.js","../node_modules/lodash-es/_baseTrim.js","../node_modules/lodash-es/isObject.js","../node_modules/lodash-es/toNumber.js","../node_modules/lodash-es/identity.js","../node_modules/lodash-es/isFunction.js","../node_modules/lodash-es/_coreJsData.js","../node_modules/lodash-es/_isMasked.js","../node_modules/lodash-es/_toSource.js","../node_modules/lodash-es/_baseIsNative.js","../node_modules/lodash-es/_getValue.js","../node_modules/lodash-es/_getNative.js","../node_modules/lodash-es/_WeakMap.js","../node_modules/lodash-es/_baseCreate.js","../node_modules/lodash-es/_apply.js","../node_modules/lodash-es/_copyArray.js","../node_modules/lodash-es/_shortOut.js","../node_modules/lodash-es/constant.js","../node_modules/lodash-es/_defineProperty.js","../node_modules/lodash-es/_baseSetToString.js","../node_modules/lodash-es/_setToString.js","../node_modules/lodash-es/_isIndex.js","../node_modules/lodash-es/_baseAssignValue.js","../node_modules/lodash-es/eq.js","../node_modules/lodash-es/_assignValue.js","../node_modules/lodash-es/_copyObject.js","../node_modules/lodash-es/_overRest.js","../node_modules/lodash-es/_baseRest.js","../node_modules/lodash-es/isLength.js","../node_modules/lodash-es/isArrayLike.js","../node_modules/lodash-es/_isIterateeCall.js","../node_modules/lodash-es/_createAssigner.js","../node_modules/lodash-es/_isPrototype.js","../node_modules/lodash-es/_baseTimes.js","../node_modules/lodash-es/_baseIsArguments.js","../node_modules/lodash-es/isArguments.js","../node_modules/lodash-es/stubFalse.js","../node_modules/lodash-es/isBuffer.js","../node_modules/lodash-es/_baseIsTypedArray.js","../node_modules/lodash-es/_baseUnary.js","../node_modules/lodash-es/_nodeUtil.js","../node_modules/lodash-es/isTypedArray.js","../node_modules/lodash-es/_arrayLikeKeys.js","../node_modules/lodash-es/_overArg.js","../node_modules/lodash-es/_nativeKeys.js","../node_modules/lodash-es/_baseKeys.js","../node_modules/lodash-es/keys.js","../node_modules/lodash-es/_nativeKeysIn.js","../node_modules/lodash-es/_baseKeysIn.js","../node_modules/lodash-es/keysIn.js","../node_modules/lodash-es/_isKey.js","../node_modules/lodash-es/_nativeCreate.js","../node_modules/lodash-es/_hashClear.js","../node_modules/lodash-es/_hashDelete.js","../node_modules/lodash-es/_hashGet.js","../node_modules/lodash-es/_hashHas.js","../node_modules/lodash-es/_hashSet.js","../node_modules/lodash-es/_Hash.js","../node_modules/lodash-es/_listCacheClear.js","../node_modules/lodash-es/_assocIndexOf.js","../node_modules/lodash-es/_listCacheDelete.js","../node_modules/lodash-es/_listCacheGet.js","../node_modules/lodash-es/_listCacheHas.js","../node_modules/lodash-es/_listCacheSet.js","../node_modules/lodash-es/_ListCache.js","../node_modules/lodash-es/_Map.js","../node_modules/lodash-es/_mapCacheClear.js","../node_modules/lodash-es/_isKeyable.js","../node_modules/lodash-es/_getMapData.js","../node_modules/lodash-es/_mapCacheDelete.js","../node_modules/lodash-es/_mapCacheGet.js","../node_modules/lodash-es/_mapCacheHas.js","../node_modules/lodash-es/_mapCacheSet.js","../node_modules/lodash-es/_MapCache.js","../node_modules/lodash-es/memoize.js","../node_modules/lodash-es/_memoizeCapped.js","../node_modules/lodash-es/_stringToPath.js","../node_modules/lodash-es/toString.js","../node_modules/lodash-es/_castPath.js","../node_modules/lodash-es/_toKey.js","../node_modules/lodash-es/_baseGet.js","../node_modules/lodash-es/get.js","../node_modules/lodash-es/_arrayPush.js","../node_modules/lodash-es/_getPrototype.js","../node_modules/lodash-es/isPlainObject.js","../node_modules/lodash-es/_baseSlice.js","../node_modules/lodash-es/_castSlice.js","../node_modules/lodash-es/_hasUnicode.js","../node_modules/lodash-es/_asciiToArray.js","../node_modules/lodash-es/_unicodeToArray.js","../node_modules/lodash-es/_stringToArray.js","../node_modules/lodash-es/_createCaseFirst.js","../node_modules/lodash-es/upperFirst.js","../node_modules/lodash-es/_arrayReduce.js","../node_modules/lodash-es/_basePropertyOf.js","../node_modules/lodash-es/_deburrLetter.js","../node_modules/lodash-es/deburr.js","../node_modules/lodash-es/_asciiWords.js","../node_modules/lodash-es/_hasUnicodeWord.js","../node_modules/lodash-es/_unicodeWords.js","../node_modules/lodash-es/words.js","../node_modules/lodash-es/_createCompounder.js","../node_modules/lodash-es/_stackClear.js","../node_modules/lodash-es/_stackDelete.js","../node_modules/lodash-es/_stackGet.js","../node_modules/lodash-es/_stackHas.js","../node_modules/lodash-es/_stackSet.js","../node_modules/lodash-es/_Stack.js","../node_modules/lodash-es/_cloneBuffer.js","../node_modules/lodash-es/_arrayFilter.js","../node_modules/lodash-es/stubArray.js","../node_modules/lodash-es/_getSymbols.js","../node_modules/lodash-es/_baseGetAllKeys.js","../node_modules/lodash-es/_getAllKeys.js","../node_modules/lodash-es/_DataView.js","../node_modules/lodash-es/_Promise.js","../node_modules/lodash-es/_Set.js","../node_modules/lodash-es/_getTag.js","../node_modules/lodash-es/_Uint8Array.js","../node_modules/lodash-es/_cloneArrayBuffer.js","../node_modules/lodash-es/_cloneTypedArray.js","../node_modules/lodash-es/_initCloneObject.js","../node_modules/lodash-es/_setCacheAdd.js","../node_modules/lodash-es/_setCacheHas.js","../node_modules/lodash-es/_SetCache.js","../node_modules/lodash-es/_arraySome.js","../node_modules/lodash-es/_cacheHas.js","../node_modules/lodash-es/_equalArrays.js","../node_modules/lodash-es/_mapToArray.js","../node_modules/lodash-es/_setToArray.js","../node_modules/lodash-es/_equalByTag.js","../node_modules/lodash-es/_equalObjects.js","../node_modules/lodash-es/_baseIsEqualDeep.js","../node_modules/lodash-es/_baseIsEqual.js","../node_modules/lodash-es/_baseIsMatch.js","../node_modules/lodash-es/_isStrictComparable.js","../node_modules/lodash-es/_getMatchData.js","../node_modules/lodash-es/_matchesStrictComparable.js","../node_modules/lodash-es/_baseMatches.js","../node_modules/lodash-es/_baseHasIn.js","../node_modules/lodash-es/_hasPath.js","../node_modules/lodash-es/hasIn.js","../node_modules/lodash-es/_baseMatchesProperty.js","../node_modules/lodash-es/_baseProperty.js","../node_modules/lodash-es/_basePropertyDeep.js","../node_modules/lodash-es/property.js","../node_modules/lodash-es/_baseIteratee.js","../node_modules/lodash-es/_createBaseFor.js","../node_modules/lodash-es/_baseFor.js","../node_modules/lodash-es/_baseForOwn.js","../node_modules/lodash-es/_createBaseEach.js","../node_modules/lodash-es/_baseEach.js","../node_modules/lodash-es/now.js","../node_modules/lodash-es/debounce.js","../node_modules/lodash-es/_assignMergeValue.js","../node_modules/lodash-es/isArrayLikeObject.js","../node_modules/lodash-es/_safeGet.js","../node_modules/lodash-es/toPlainObject.js","../node_modules/lodash-es/_baseMergeDeep.js","../node_modules/lodash-es/_baseMerge.js","../node_modules/lodash-es/_baseMap.js","../node_modules/lodash-es/map.js","../node_modules/lodash-es/kebabCase.js","../node_modules/lodash-es/merge.js","../node_modules/lodash-es/throttle.js","../node_modules/naive-ui/es/_mixins/use-locale.mjs","../node_modules/naive-ui/es/_mixins/common.mjs","../node_modules/naive-ui/es/_mixins/use-rtl.mjs","../node_modules/naive-ui/es/_styles/common/_common.mjs","../node_modules/naive-ui/es/_styles/global/index.cssr.mjs","../node_modules/naive-ui/es/_mixins/use-style.mjs","../node_modules/naive-ui/es/_mixins/use-theme.mjs","../node_modules/naive-ui/es/_internal/icon/src/styles/index.cssr.mjs","../node_modules/naive-ui/es/_internal/icon/src/Icon.mjs","../node_modules/naive-ui/es/_internal/icon-switch-transition/src/IconSwitchTransition.mjs","../node_modules/naive-ui/es/_internal/icons/Add.mjs","../node_modules/naive-ui/es/_internal/icons/replaceable.mjs","../node_modules/naive-ui/es/_internal/icons/Backward.mjs","../node_modules/naive-ui/es/_internal/icons/Checkmark.mjs","../node_modules/naive-ui/es/_internal/icons/ChevronDown.mjs","../node_modules/naive-ui/es/_internal/icons/ChevronDownFilled.mjs","../node_modules/naive-ui/es/_internal/icons/ChevronRight.mjs","../node_modules/naive-ui/es/_internal/icons/Clear.mjs","../node_modules/naive-ui/es/_internal/icons/Close.mjs","../node_modules/naive-ui/es/_internal/icons/Download.mjs","../node_modules/naive-ui/es/_internal/icons/Empty.mjs","../node_modules/naive-ui/es/_internal/icons/Error.mjs","../node_modules/naive-ui/es/_internal/icons/Eye.mjs","../node_modules/naive-ui/es/_internal/icons/EyeOff.mjs","../node_modules/naive-ui/es/_internal/icons/FastBackward.mjs","../node_modules/naive-ui/es/_internal/icons/FastForward.mjs","../node_modules/naive-ui/es/_internal/icons/Forward.mjs","../node_modules/naive-ui/es/_internal/icons/Info.mjs","../node_modules/naive-ui/es/_internal/icons/More.mjs","../node_modules/naive-ui/es/_internal/icons/Remove.mjs","../node_modules/naive-ui/es/_internal/icons/ResizeSmall.mjs","../node_modules/naive-ui/es/_internal/icons/RotateClockwise.mjs","../node_modules/naive-ui/es/_internal/icons/RotateCounterclockwise.mjs","../node_modules/naive-ui/es/_internal/icons/Success.mjs","../node_modules/naive-ui/es/_internal/icons/Warning.mjs","../node_modules/naive-ui/es/_internal/icons/ZoomIn.mjs","../node_modules/naive-ui/es/_internal/icons/ZoomOut.mjs","../node_modules/naive-ui/es/_styles/transitions/icon-switch.cssr.mjs","../node_modules/naive-ui/es/_internal/clear/src/styles/index.cssr.mjs","../node_modules/naive-ui/es/_internal/clear/src/Clear.mjs","../node_modules/naive-ui/es/_internal/close/src/styles/index.cssr.mjs","../node_modules/naive-ui/es/_internal/close/src/Close.mjs","../node_modules/naive-ui/es/_internal/fade-in-expand-transition/src/FadeInExpandTransition.mjs","../node_modules/naive-ui/es/_internal/focus-detector/src/FocusDetector.mjs","../node_modules/naive-ui/es/_internal/loading/src/styles/index.cssr.mjs","../node_modules/naive-ui/es/_internal/loading/src/Loading.mjs","../node_modules/naive-ui/es/_styles/transitions/fade-in.cssr.mjs","../node_modules/naive-ui/es/_styles/common/dark.mjs","../node_modules/naive-ui/es/_styles/common/light.mjs","../node_modules/naive-ui/es/_internal/scrollbar/styles/common.mjs","../node_modules/naive-ui/es/_internal/scrollbar/styles/light.mjs","../node_modules/naive-ui/es/_internal/scrollbar/styles/dark.mjs","../node_modules/naive-ui/es/_internal/scrollbar/src/styles/index.cssr.mjs","../node_modules/naive-ui/es/_internal/scrollbar/src/Scrollbar.mjs","../node_modules/treemate/es/utils.js","../node_modules/treemate/es/check.js","../node_modules/treemate/es/path.js","../node_modules/treemate/es/move.js","../node_modules/treemate/es/flatten.js","../node_modules/treemate/es/contains.js","../node_modules/treemate/es/create.js","../node_modules/naive-ui/es/empty/styles/_common.mjs","../node_modules/naive-ui/es/empty/styles/light.mjs","../node_modules/naive-ui/es/empty/styles/dark.mjs","../node_modules/naive-ui/es/empty/src/styles/index.cssr.mjs","../node_modules/naive-ui/es/empty/src/Empty.mjs","../node_modules/naive-ui/es/_internal/select-menu/styles/_common.mjs","../node_modules/naive-ui/es/_internal/select-menu/styles/light.mjs","../node_modules/naive-ui/es/_internal/select-menu/styles/dark.mjs","../node_modules/naive-ui/es/_internal/select-menu/src/SelectGroupHeader.mjs","../node_modules/naive-ui/es/_internal/select-menu/src/SelectOption.mjs","../node_modules/naive-ui/es/_styles/transitions/fade-in-scale-up.cssr.mjs","../node_modules/naive-ui/es/_internal/select-menu/src/styles/index.cssr.mjs","../node_modules/naive-ui/es/_internal/select-menu/src/SelectMenu.mjs","../node_modules/naive-ui/es/popover/styles/_common.mjs","../node_modules/naive-ui/es/popover/styles/light.mjs","../node_modules/naive-ui/es/popover/styles/dark.mjs","../node_modules/naive-ui/es/popover/src/styles/index.cssr.mjs","../node_modules/naive-ui/es/popover/src/PopoverBody.mjs","../node_modules/naive-ui/es/popover/src/Popover.mjs","../node_modules/naive-ui/es/tag/styles/_common.mjs","../node_modules/naive-ui/es/tag/styles/dark.mjs","../node_modules/naive-ui/es/tag/styles/light.mjs","../node_modules/naive-ui/es/tag/src/common-props.mjs","../node_modules/naive-ui/es/tag/src/styles/index.cssr.mjs","../node_modules/naive-ui/es/tag/src/Tag.mjs","../node_modules/naive-ui/es/_internal/suffix/src/Suffix.mjs","../node_modules/naive-ui/es/_internal/selection/styles/_common.mjs","../node_modules/naive-ui/es/_internal/selection/styles/dark.mjs","../node_modules/naive-ui/es/_internal/selection/styles/light.mjs","../node_modules/naive-ui/es/_internal/selection/src/styles/index.cssr.mjs","../node_modules/naive-ui/es/_internal/selection/src/Selection.mjs","../node_modules/naive-ui/es/_styles/transitions/fade-in-width-expand.cssr.mjs","../node_modules/naive-ui/es/_internal/wave/src/styles/index.cssr.mjs","../node_modules/naive-ui/es/_internal/wave/src/Wave.mjs","../node_modules/naive-ui/es/alert/styles/_common.mjs","../node_modules/naive-ui/es/alert/styles/dark.mjs","../node_modules/naive-ui/es/alert/styles/light.mjs","../node_modules/naive-ui/es/_styles/transitions/fade-in-height-expand.cssr.mjs","../node_modules/naive-ui/es/alert/src/styles/index.cssr.mjs","../node_modules/naive-ui/es/alert/src/Alert.mjs","../node_modules/naive-ui/es/anchor/styles/_common.mjs","../node_modules/naive-ui/es/anchor/styles/light.mjs","../node_modules/naive-ui/es/anchor/styles/dark.mjs","../node_modules/naive-ui/es/_utils/env/browser.mjs","../node_modules/naive-ui/es/input/styles/_common.mjs","../node_modules/naive-ui/es/input/styles/dark.mjs","../node_modules/naive-ui/es/input/styles/light.mjs","../node_modules/naive-ui/es/input/src/interface.mjs","../node_modules/naive-ui/es/input/src/styles/input.cssr.mjs","../node_modules/naive-ui/es/input/src/utils.mjs","../node_modules/naive-ui/es/input/src/WordCount.mjs","../node_modules/naive-ui/es/input/src/Input.mjs","../node_modules/naive-ui/es/input/src/styles/input-group.cssr.mjs","../node_modules/naive-ui/es/input/src/InputGroup.mjs","../node_modules/naive-ui/es/select/src/utils.mjs","../node_modules/naive-ui/es/auto-complete/styles/light.mjs","../node_modules/naive-ui/es/auto-complete/styles/dark.mjs","../node_modules/naive-ui/es/_utils/env/is-native-lazy-load.mjs","../node_modules/naive-ui/es/image/src/utils.mjs","../node_modules/naive-ui/es/avatar/styles/light.mjs","../node_modules/naive-ui/es/avatar/styles/dark.mjs","../node_modules/naive-ui/es/avatar-group/styles/light.mjs","../node_modules/naive-ui/es/avatar-group/styles/dark.mjs","../node_modules/naive-ui/es/back-top/styles/_common.mjs","../node_modules/naive-ui/es/back-top/styles/dark.mjs","../node_modules/naive-ui/es/badge/styles/dark.mjs","../node_modules/naive-ui/es/breadcrumb/styles/_common.mjs","../node_modules/naive-ui/es/breadcrumb/styles/light.mjs","../node_modules/naive-ui/es/breadcrumb/styles/dark.mjs","../node_modules/naive-ui/es/_utils/color/index.mjs","../node_modules/naive-ui/es/button-group/src/context.mjs","../node_modules/naive-ui/es/button/styles/_common.mjs","../node_modules/naive-ui/es/button/styles/light.mjs","../node_modules/naive-ui/es/button/styles/dark.mjs","../node_modules/naive-ui/es/button/src/styles/index.cssr.mjs","../node_modules/naive-ui/es/button/src/Button.mjs","../node_modules/naive-ui/es/button-group/src/styles/index.cssr.mjs","../node_modules/naive-ui/es/button-group/src/ButtonGroup.mjs","../node_modules/naive-ui/es/calendar/styles/_common.mjs","../node_modules/naive-ui/es/calendar/styles/light.mjs","../node_modules/naive-ui/es/calendar/styles/dark.mjs","../node_modules/naive-ui/es/card/styles/_common.mjs","../node_modules/naive-ui/es/card/styles/light.mjs","../node_modules/naive-ui/es/card/styles/dark.mjs","../node_modules/naive-ui/es/card/src/styles/index.cssr.mjs","../node_modules/naive-ui/es/card/src/Card.mjs","../node_modules/naive-ui/es/carousel/styles/light.mjs","../node_modules/naive-ui/es/carousel/styles/dark.mjs","../node_modules/naive-ui/es/checkbox/styles/_common.mjs","../node_modules/naive-ui/es/checkbox/styles/light.mjs","../node_modules/naive-ui/es/checkbox/styles/dark.mjs","../node_modules/naive-ui/es/cascader/styles/light.mjs","../node_modules/naive-ui/es/cascader/styles/dark.mjs","../node_modules/naive-ui/es/code/styles/dark.mjs","../node_modules/naive-ui/es/collapse/styles/light.mjs","../node_modules/naive-ui/es/collapse/styles/dark.mjs","../node_modules/naive-ui/es/collapse-transition/styles/light.mjs","../node_modules/naive-ui/es/collapse-transition/styles/dark.mjs","../node_modules/naive-ui/es/color-picker/styles/light.mjs","../node_modules/naive-ui/es/color-picker/styles/dark.mjs","../node_modules/naive-ui/es/config-provider/src/ConfigProvider.mjs","../node_modules/naive-ui/es/popselect/styles/dark.mjs","../node_modules/naive-ui/es/popselect/styles/light.mjs","../node_modules/naive-ui/es/popselect/src/interface.mjs","../node_modules/naive-ui/es/popselect/src/styles/index.cssr.mjs","../node_modules/naive-ui/es/popselect/src/PopselectPanel.mjs","../node_modules/naive-ui/es/popselect/src/Popselect.mjs","../node_modules/naive-ui/es/select/styles/light.mjs","../node_modules/naive-ui/es/select/styles/dark.mjs","../node_modules/naive-ui/es/select/src/styles/index.cssr.mjs","../node_modules/naive-ui/es/select/src/Select.mjs","../node_modules/naive-ui/es/pagination/styles/_common.mjs","../node_modules/naive-ui/es/pagination/styles/light.mjs","../node_modules/naive-ui/es/pagination/styles/dark.mjs","../node_modules/naive-ui/es/pagination/src/styles/index.cssr.mjs","../node_modules/naive-ui/es/pagination/src/utils.mjs","../node_modules/naive-ui/es/pagination/src/Pagination.mjs","../node_modules/naive-ui/es/dropdown/styles/_common.mjs","../node_modules/naive-ui/es/dropdown/styles/light.mjs","../node_modules/naive-ui/es/dropdown/styles/dark.mjs","../node_modules/naive-ui/es/tooltip/styles/_common.mjs","../node_modules/naive-ui/es/tooltip/styles/dark.mjs","../node_modules/naive-ui/es/tooltip/styles/light.mjs","../node_modules/naive-ui/es/ellipsis/styles/dark.mjs","../node_modules/naive-ui/es/ellipsis/styles/light.mjs","../node_modules/naive-ui/es/radio/styles/_common.mjs","../node_modules/naive-ui/es/radio/styles/dark.mjs","../node_modules/naive-ui/es/radio/styles/light.mjs","../node_modules/naive-ui/es/data-table/styles/_common.mjs","../node_modules/naive-ui/es/data-table/styles/light.mjs","../node_modules/naive-ui/es/data-table/styles/dark.mjs","../node_modules/naive-ui/es/radio/src/use-radio.mjs","../node_modules/naive-ui/es/radio/src/RadioButton.mjs","../node_modules/naive-ui/es/radio/src/styles/radio-group.cssr.mjs","../node_modules/naive-ui/es/radio/src/RadioGroup.mjs","../node_modules/naive-ui/es/tooltip/src/Tooltip.mjs","../node_modules/naive-ui/es/ellipsis/src/styles/index.cssr.mjs","../node_modules/naive-ui/es/ellipsis/src/Ellipsis.mjs","../node_modules/naive-ui/es/dropdown/src/context.mjs","../node_modules/naive-ui/es/dropdown/src/DropdownDivider.mjs","../node_modules/naive-ui/es/dropdown/src/DropdownGroupHeader.mjs","../node_modules/naive-ui/es/icon/styles/light.mjs","../node_modules/naive-ui/es/icon/styles/dark.mjs","../node_modules/naive-ui/es/icon/src/styles/index.cssr.mjs","../node_modules/naive-ui/es/icon/src/Icon.mjs","../node_modules/naive-ui/es/dropdown/src/utils.mjs","../node_modules/naive-ui/es/dropdown/src/DropdownOption.mjs","../node_modules/naive-ui/es/dropdown/src/DropdownGroup.mjs","../node_modules/naive-ui/es/dropdown/src/DropdownRenderOption.mjs","../node_modules/naive-ui/es/dropdown/src/DropdownMenu.mjs","../node_modules/naive-ui/es/dropdown/src/styles/index.cssr.mjs","../node_modules/naive-ui/es/dropdown/src/Dropdown.mjs","../node_modules/naive-ui/es/time-picker/styles/_common.mjs","../node_modules/naive-ui/es/time-picker/styles/light.mjs","../node_modules/naive-ui/es/time-picker/styles/dark.mjs","../node_modules/naive-ui/es/date-picker/styles/_common.mjs","../node_modules/naive-ui/es/date-picker/styles/light.mjs","../node_modules/naive-ui/es/date-picker/styles/dark.mjs","../node_modules/naive-ui/es/descriptions/styles/_common.mjs","../node_modules/naive-ui/es/descriptions/styles/light.mjs","../node_modules/naive-ui/es/descriptions/styles/dark.mjs","../node_modules/naive-ui/es/dialog/src/context.mjs","../node_modules/naive-ui/es/dialog/styles/_common.mjs","../node_modules/naive-ui/es/dialog/styles/light.mjs","../node_modules/naive-ui/es/dialog/styles/dark.mjs","../node_modules/naive-ui/es/dialog/src/dialogProps.mjs","../node_modules/naive-ui/es/dialog/src/styles/index.cssr.mjs","../node_modules/naive-ui/es/dialog/src/Dialog.mjs","../node_modules/naive-ui/es/modal/styles/light.mjs","../node_modules/naive-ui/es/modal/styles/dark.mjs","../node_modules/naive-ui/es/modal/src/composables.mjs","../node_modules/naive-ui/es/modal/src/presetProps.mjs","../node_modules/naive-ui/es/modal/src/BodyWrapper.mjs","../node_modules/naive-ui/es/modal/src/styles/index.cssr.mjs","../node_modules/naive-ui/es/modal/src/Modal.mjs","../node_modules/naive-ui/es/loading-bar/src/context.mjs","../node_modules/naive-ui/es/loading-bar/styles/dark.mjs","../node_modules/naive-ui/es/loading-bar/styles/light.mjs","../node_modules/naive-ui/es/loading-bar/src/styles/index.cssr.mjs","../node_modules/naive-ui/es/loading-bar/src/LoadingBar.mjs","../node_modules/naive-ui/es/loading-bar/src/LoadingBarProvider.mjs","../node_modules/naive-ui/es/message/styles/_common.mjs","../node_modules/naive-ui/es/message/styles/light.mjs","../node_modules/naive-ui/es/message/styles/dark.mjs","../node_modules/naive-ui/es/notification/styles/_common.mjs","../node_modules/naive-ui/es/notification/styles/light.mjs","../node_modules/naive-ui/es/notification/styles/dark.mjs","../node_modules/naive-ui/es/divider/styles/light.mjs","../node_modules/naive-ui/es/divider/styles/dark.mjs","../node_modules/naive-ui/es/drawer/styles/light.mjs","../node_modules/naive-ui/es/drawer/styles/dark.mjs","../node_modules/naive-ui/es/drawer/src/DrawerBodyWrapper.mjs","../node_modules/naive-ui/es/_styles/transitions/slide-in-from-bottom.mjs","../node_modules/naive-ui/es/_styles/transitions/slide-in-from-left.mjs","../node_modules/naive-ui/es/_styles/transitions/slide-in-from-right.mjs","../node_modules/naive-ui/es/_styles/transitions/slide-in-from-top.mjs","../node_modules/naive-ui/es/drawer/src/styles/index.cssr.mjs","../node_modules/naive-ui/es/drawer/src/Drawer.mjs","../node_modules/naive-ui/es/drawer/src/DrawerContent.mjs","../node_modules/naive-ui/es/dynamic-input/styles/_common.mjs","../node_modules/naive-ui/es/dynamic-input/styles/dark.mjs","../node_modules/naive-ui/es/space/styles/_common.mjs","../node_modules/naive-ui/es/space/styles/dark.mjs","../node_modules/naive-ui/es/space/styles/light.mjs","../node_modules/naive-ui/es/space/src/utils.mjs","../node_modules/naive-ui/es/space/src/Space.mjs","../node_modules/naive-ui/es/dynamic-tags/styles/dark.mjs","../node_modules/naive-ui/es/element/styles/dark.mjs","../node_modules/naive-ui/es/flex/styles/_common.mjs","../node_modules/naive-ui/es/flex/styles/dark.mjs","../node_modules/naive-ui/es/button-group/styles/dark.mjs","../node_modules/naive-ui/es/form/styles/_common.mjs","../node_modules/naive-ui/es/form/styles/light.mjs","../node_modules/naive-ui/es/form/styles/dark.mjs","../node_modules/naive-ui/es/gradient-text/styles/dark.mjs","../node_modules/naive-ui/es/input-number/styles/dark.mjs","../node_modules/naive-ui/es/input-number/styles/light.mjs","../node_modules/naive-ui/es/input-otp/styles/light.mjs","../node_modules/naive-ui/es/input-otp/styles/dark.mjs","../node_modules/naive-ui/es/layout/styles/dark.mjs","../node_modules/naive-ui/es/legacy-grid/styles/dark.mjs","../node_modules/naive-ui/es/list/styles/light.mjs","../node_modules/naive-ui/es/list/styles/dark.mjs","../node_modules/naive-ui/es/log/styles/dark.mjs","../node_modules/naive-ui/es/mention/styles/dark.mjs","../node_modules/naive-ui/es/menu/styles/light.mjs","../node_modules/naive-ui/es/menu/styles/dark.mjs","../node_modules/naive-ui/es/page-header/styles/_common.mjs","../node_modules/naive-ui/es/page-header/styles/light.mjs","../node_modules/naive-ui/es/page-header/styles/dark.mjs","../node_modules/naive-ui/es/popconfirm/styles/_common.mjs","../node_modules/naive-ui/es/popconfirm/styles/light.mjs","../node_modules/naive-ui/es/popconfirm/styles/dark.mjs","../node_modules/naive-ui/es/progress/styles/light.mjs","../node_modules/naive-ui/es/progress/styles/dark.mjs","../node_modules/naive-ui/es/rate/styles/dark.mjs","../node_modules/naive-ui/es/result/styles/_common.mjs","../node_modules/naive-ui/es/result/styles/light.mjs","../node_modules/naive-ui/es/result/styles/dark.mjs","../node_modules/naive-ui/es/slider/styles/_common.mjs","../node_modules/naive-ui/es/slider/styles/dark.mjs","../node_modules/naive-ui/es/spin/styles/light.mjs","../node_modules/naive-ui/es/spin/styles/dark.mjs","../node_modules/naive-ui/es/statistic/styles/light.mjs","../node_modules/naive-ui/es/statistic/styles/dark.mjs","../node_modules/naive-ui/es/steps/styles/_common.mjs","../node_modules/naive-ui/es/steps/styles/light.mjs","../node_modules/naive-ui/es/steps/styles/dark.mjs","../node_modules/naive-ui/es/switch/styles/_common.mjs","../node_modules/naive-ui/es/switch/styles/dark.mjs","../node_modules/naive-ui/es/switch/styles/light.mjs","../node_modules/naive-ui/es/table/styles/_common.mjs","../node_modules/naive-ui/es/table/styles/light.mjs","../node_modules/naive-ui/es/table/styles/dark.mjs","../node_modules/naive-ui/es/tabs/styles/_common.mjs","../node_modules/naive-ui/es/tabs/styles/light.mjs","../node_modules/naive-ui/es/tabs/styles/dark.mjs","../node_modules/naive-ui/es/thing/styles/light.mjs","../node_modules/naive-ui/es/thing/styles/dark.mjs","../node_modules/naive-ui/es/timeline/styles/_common.mjs","../node_modules/naive-ui/es/timeline/styles/dark.mjs","../node_modules/naive-ui/es/transfer/styles/_common.mjs","../node_modules/naive-ui/es/transfer/styles/dark.mjs","../node_modules/naive-ui/es/tree/styles/light.mjs","../node_modules/naive-ui/es/tree/styles/dark.mjs","../node_modules/naive-ui/es/tree-select/styles/dark.mjs","../node_modules/naive-ui/es/typography/styles/_common.mjs","../node_modules/naive-ui/es/typography/styles/light.mjs","../node_modules/naive-ui/es/typography/styles/dark.mjs","../node_modules/naive-ui/es/upload/styles/light.mjs","../node_modules/naive-ui/es/upload/styles/dark.mjs","../node_modules/naive-ui/es/watermark/styles/dark.mjs","../node_modules/naive-ui/es/float-button/styles/dark.mjs","../node_modules/naive-ui/es/form/src/context.mjs","../node_modules/naive-ui/es/form/src/styles/form.cssr.mjs","../node_modules/naive-ui/es/form/src/Form.mjs","../node_modules/async-validator/dist-web/index.js","../node_modules/naive-ui/es/_styles/transitions/fade-down.cssr.mjs","../node_modules/naive-ui/es/form/src/styles/form-item.cssr.mjs","../node_modules/naive-ui/es/form/src/utils.mjs","../node_modules/naive-ui/es/form/src/FormItem.mjs","../node_modules/naive-ui/es/grid/src/config.mjs","../node_modules/naive-ui/es/grid/src/GridItem.mjs","../node_modules/naive-ui/es/global-style/src/GlobalStyle.mjs","../node_modules/naive-ui/es/config-provider/src/config.mjs","../node_modules/naive-ui/es/grid/src/Grid.mjs","../node_modules/naive-ui/es/icon-wrapper/styles/light.mjs","../node_modules/naive-ui/es/icon-wrapper/styles/dark.mjs","../node_modules/naive-ui/es/image/styles/dark.mjs","../node_modules/naive-ui/es/image/styles/light.mjs","../node_modules/naive-ui/es/image/src/icons.mjs","../node_modules/naive-ui/es/image/src/interface.mjs","../node_modules/naive-ui/es/image/src/styles/index.cssr.mjs","../node_modules/naive-ui/es/image/src/ImagePreview.mjs","../node_modules/naive-ui/es/image/src/ImageGroup.mjs","../node_modules/naive-ui/es/image/src/Image.mjs","../node_modules/naive-ui/es/input-number/src/styles/input-number.cssr.mjs","../node_modules/naive-ui/es/input-number/src/utils.mjs","../node_modules/naive-ui/es/input-number/src/InputNumber.mjs","../node_modules/naive-ui/es/layout/src/interface.mjs","../node_modules/naive-ui/es/legacy-transfer/styles/_common.mjs","../node_modules/naive-ui/es/legacy-transfer/styles/dark.mjs","../node_modules/naive-ui/es/marquee/styles/light.mjs","../node_modules/naive-ui/es/marquee/styles/dark.mjs","../node_modules/naive-ui/es/menu/src/context.mjs","../node_modules/naive-ui/es/menu/src/styles/index.cssr.mjs","../node_modules/naive-ui/es/menu/src/MenuOptionContent.mjs","../node_modules/naive-ui/es/menu/src/use-menu-child.mjs","../node_modules/naive-ui/es/menu/src/use-menu-child-props.mjs","../node_modules/naive-ui/es/menu/src/MenuDivider.mjs","../node_modules/naive-ui/es/menu/src/MenuOption.mjs","../node_modules/naive-ui/es/menu/src/MenuOptionGroup.mjs","../node_modules/naive-ui/es/menu/src/utils.mjs","../node_modules/naive-ui/es/menu/src/Submenu.mjs","../node_modules/naive-ui/es/menu/src/Menu.mjs","../node_modules/naive-ui/es/popconfirm/src/interface.mjs","../node_modules/naive-ui/es/popconfirm/src/PopconfirmPanel.mjs","../node_modules/naive-ui/es/popconfirm/src/styles/index.cssr.mjs","../node_modules/naive-ui/es/popconfirm/src/Popconfirm.mjs","../node_modules/naive-ui/es/qr-code/styles/dark.mjs","../node_modules/naive-ui/es/skeleton/styles/dark.mjs","../node_modules/naive-ui/es/split/styles/dark.mjs","../node_modules/naive-ui/es/switch/src/styles/index.cssr.mjs","../node_modules/naive-ui/es/switch/src/Switch.mjs","../node_modules/naive-ui/es/tabs/src/interface.mjs","../node_modules/naive-ui/es/tabs/src/TabPane.mjs","../node_modules/naive-ui/es/tabs/src/Tab.mjs","../node_modules/naive-ui/es/tabs/src/styles/index.cssr.mjs","../node_modules/naive-ui/es/tabs/src/Tabs.mjs","../node_modules/naive-ui/es/composables/use-theme-vars.mjs","../node_modules/naive-ui/es/equation/styles/light.mjs","../node_modules/naive-ui/es/equation/styles/dark.mjs","../node_modules/naive-ui/es/float-button-group/styles/dark.mjs","../node_modules/naive-ui/es/themes/dark.mjs","../node_modules/luxon/src/errors.js","../node_modules/luxon/src/impl/formats.js","../node_modules/luxon/src/impl/util.js","../node_modules/luxon/src/impl/english.js","../node_modules/luxon/src/impl/formatter.js","../node_modules/luxon/src/impl/invalid.js","../node_modules/luxon/src/zone.js","../node_modules/luxon/src/zones/systemZone.js","../node_modules/luxon/src/zones/IANAZone.js","../node_modules/luxon/src/zones/fixedOffsetZone.js","../node_modules/luxon/src/zones/invalidZone.js","../node_modules/luxon/src/impl/zoneUtil.js","../node_modules/luxon/src/settings.js","../node_modules/luxon/src/impl/locale.js","../node_modules/luxon/src/impl/regexParser.js","../node_modules/luxon/src/duration.js","../node_modules/luxon/src/interval.js","../node_modules/luxon/src/info.js","../node_modules/luxon/src/impl/diff.js","../node_modules/luxon/src/impl/digits.js","../node_modules/luxon/src/impl/tokenParser.js","../node_modules/luxon/src/impl/conversions.js","../node_modules/luxon/src/datetime.js","../src/views/YearView.vue","../node_modules/@vicons/fluent/es/Add20Regular.js","../node_modules/@vicons/fluent/es/ArrowDownload20Regular.js","../node_modules/@vicons/fluent/es/ArrowLeft12Regular.js","../node_modules/@vicons/fluent/es/ArrowNext20Regular.js","../node_modules/@vicons/fluent/es/ArrowPrevious20Regular.js","../node_modules/@vicons/fluent/es/Comment20Regular.js","../node_modules/@vicons/fluent/es/Delete16Regular.js","../node_modules/@vicons/fluent/es/Eye16Regular.js","../node_modules/@vicons/fluent/es/EyeOff16Regular.js","../node_modules/@vicons/fluent/es/Image20Regular.js","../node_modules/@vicons/fluent/es/Pause20Regular.js","../node_modules/@vicons/fluent/es/Play20Regular.js","../node_modules/@vicons/fluent/es/WeatherMoon16Filled.js","../node_modules/@vicons/fluent/es/WeatherSunny16Regular.js","../node_modules/@vicons/fluent/es/ZoomIn20Regular.js","../node_modules/@vicons/fluent/es/ZoomOut20Regular.js","../src/views/Loading.vue","../src/views/MonthItemView.vue","../src/views/MonthView.vue","../src/views/DayView.vue","../node_modules/konva/lib/Global.js","../node_modules/konva/lib/Util.js","../node_modules/konva/lib/Validators.js","../node_modules/konva/lib/Factory.js","../node_modules/konva/lib/Context.js","../node_modules/konva/lib/Canvas.js","../node_modules/konva/lib/DragAndDrop.js","../node_modules/konva/lib/Node.js","../node_modules/konva/lib/Container.js","../node_modules/konva/lib/PointerEvents.js","../node_modules/konva/lib/Stage.js","../node_modules/konva/lib/Shape.js","../node_modules/konva/lib/Layer.js","../node_modules/konva/lib/FastLayer.js","../node_modules/konva/lib/Group.js","../node_modules/konva/lib/Animation.js","../node_modules/konva/lib/Tween.js","../node_modules/konva/lib/_CoreInternals.js","../node_modules/konva/lib/Core.js","../node_modules/konva/lib/shapes/Line.js","../node_modules/konva/lib/shapes/Rect.js","../node_modules/konva/lib/shapes/Text.js","../node_modules/konva/lib/shapes/Image.js","../node_modules/waveform-data/dist/waveform-data.esm.js","../src/3rd_party/peaks.esm.js","../src/components/colors.js","../src/components/peaks-options.js","../src/components/Peaks.vue","../src/components/Annotation.vue","../src/api/classification.js","../src/components/AnnotationEditor.vue","../src/views/AnnotationListView.vue","../src/components/stereometry/StereometryCart.vue","../src/components/stereometry/StereometryModal.vue","../src/components/Player.vue","../src/api/faq.js","../src/views/FaqView.vue","../src/components/Link.vue","../src/api/member.js","../src/views/ProfileView.vue","../src/views/LoginView.vue","../src/views/AnnotationView.vue","../src/api/thumbs.js","../src/views/StereometryView.vue","../src/router.js","../src/assets/ZHdK_Logo.svg","../src/assets/SNF_logo_standard_web_sw_pos_e.svg","../src/App.vue","../src/main.js"],"sourcesContent":["/**\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 /* PatchFlags.TEXT */]: `TEXT`,\r\n    [2 /* PatchFlags.CLASS */]: `CLASS`,\r\n    [4 /* PatchFlags.STYLE */]: `STYLE`,\r\n    [8 /* PatchFlags.PROPS */]: `PROPS`,\r\n    [16 /* PatchFlags.FULL_PROPS */]: `FULL_PROPS`,\r\n    [32 /* PatchFlags.HYDRATE_EVENTS */]: `HYDRATE_EVENTS`,\r\n    [64 /* PatchFlags.STABLE_FRAGMENT */]: `STABLE_FRAGMENT`,\r\n    [128 /* PatchFlags.KEYED_FRAGMENT */]: `KEYED_FRAGMENT`,\r\n    [256 /* PatchFlags.UNKEYED_FRAGMENT */]: `UNKEYED_FRAGMENT`,\r\n    [512 /* PatchFlags.NEED_PATCH */]: `NEED_PATCH`,\r\n    [1024 /* PatchFlags.DYNAMIC_SLOTS */]: `DYNAMIC_SLOTS`,\r\n    [2048 /* PatchFlags.DEV_ROOT_FRAGMENT */]: `DEV_ROOT_FRAGMENT`,\r\n    [-1 /* PatchFlags.HOISTED */]: `HOISTED`,\r\n    [-2 /* PatchFlags.BAIL */]: `BAIL`\r\n};\n\n/**\r\n * Dev only\r\n */\r\nconst slotFlagsText = {\r\n    [1 /* SlotFlags.STABLE */]: 'STABLE',\r\n    [2 /* SlotFlags.DYNAMIC */]: 'DYNAMIC',\r\n    [3 /* SlotFlags.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","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\" /* TriggerOpTypes.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\" /* TriggerOpTypes.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\" /* TriggerOpTypes.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\" /* TriggerOpTypes.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\" /* TrackOpTypes.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\" /* ReactiveFlags.IS_REACTIVE */) {\r\n            return !isReadonly;\r\n        }\r\n        else if (key === \"__v_isReadonly\" /* ReactiveFlags.IS_READONLY */) {\r\n            return isReadonly;\r\n        }\r\n        else if (key === \"__v_isShallow\" /* ReactiveFlags.IS_SHALLOW */) {\r\n            return shallow;\r\n        }\r\n        else if (key === \"__v_raw\" /* ReactiveFlags.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\" /* TrackOpTypes.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) {\r\n            if (!isShallow(value) && !isReadonly(value)) {\r\n                oldValue = toRaw(oldValue);\r\n                value = toRaw(value);\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\" /* TriggerOpTypes.ADD */, key, value);\r\n            }\r\n            else if (hasChanged(value, oldValue)) {\r\n                trigger(target, \"set\" /* TriggerOpTypes.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\" /* TriggerOpTypes.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\" /* TrackOpTypes.HAS */, key);\r\n    }\r\n    return result;\r\n}\r\nfunction ownKeys(target) {\r\n    track(target, \"iterate\" /* TrackOpTypes.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\" /* ReactiveFlags.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\" /* TrackOpTypes.GET */, key);\r\n        }\r\n        track(rawTarget, \"get\" /* TrackOpTypes.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\" /* ReactiveFlags.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\" /* TrackOpTypes.HAS */, key);\r\n        }\r\n        track(rawTarget, \"has\" /* TrackOpTypes.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\" /* ReactiveFlags.RAW */];\r\n    !isReadonly && track(toRaw(target), \"iterate\" /* TrackOpTypes.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\" /* TriggerOpTypes.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\" /* TriggerOpTypes.ADD */, key, value);\r\n    }\r\n    else if (hasChanged(value, oldValue)) {\r\n        trigger(target, \"set\" /* TriggerOpTypes.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\" /* TriggerOpTypes.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\" /* TriggerOpTypes.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\" /* ReactiveFlags.RAW */];\r\n        const rawTarget = toRaw(target);\r\n        const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;\r\n        !isReadonly && track(rawTarget, \"iterate\" /* TrackOpTypes.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\" /* ReactiveFlags.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\" /* TrackOpTypes.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\" /* TriggerOpTypes.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\" /* TriggerOpTypes.ADD */),\r\n        set: createReadonlyMethod(\"set\" /* TriggerOpTypes.SET */),\r\n        delete: createReadonlyMethod(\"delete\" /* TriggerOpTypes.DELETE */),\r\n        clear: createReadonlyMethod(\"clear\" /* TriggerOpTypes.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\" /* TriggerOpTypes.ADD */),\r\n        set: createReadonlyMethod(\"set\" /* TriggerOpTypes.SET */),\r\n        delete: createReadonlyMethod(\"delete\" /* TriggerOpTypes.DELETE */),\r\n        clear: createReadonlyMethod(\"clear\" /* TriggerOpTypes.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\" /* ReactiveFlags.IS_REACTIVE */) {\r\n            return !isReadonly;\r\n        }\r\n        else if (key === \"__v_isReadonly\" /* ReactiveFlags.IS_READONLY */) {\r\n            return isReadonly;\r\n        }\r\n        else if (key === \"__v_raw\" /* ReactiveFlags.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 /* TargetType.COMMON */;\r\n        case 'Map':\r\n        case 'Set':\r\n        case 'WeakMap':\r\n        case 'WeakSet':\r\n            return 2 /* TargetType.COLLECTION */;\r\n        default:\r\n            return 0 /* TargetType.INVALID */;\r\n    }\r\n}\r\nfunction getTargetType(value) {\r\n    return value[\"__v_skip\" /* ReactiveFlags.SKIP */] || !Object.isExtensible(value)\r\n        ? 0 /* TargetType.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\" /* ReactiveFlags.RAW */] &&\r\n        !(isReadonly && target[\"__v_isReactive\" /* ReactiveFlags.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 /* TargetType.INVALID */) {\r\n        return target;\r\n    }\r\n    const proxy = new Proxy(target, targetType === 2 /* TargetType.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\" /* ReactiveFlags.RAW */]);\r\n    }\r\n    return !!(value && value[\"__v_isReactive\" /* ReactiveFlags.IS_REACTIVE */]);\r\n}\r\nfunction isReadonly(value) {\r\n    return !!(value && value[\"__v_isReadonly\" /* ReactiveFlags.IS_READONLY */]);\r\n}\r\nfunction isShallow(value) {\r\n    return !!(value && value[\"__v_isShallow\" /* ReactiveFlags.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\" /* ReactiveFlags.RAW */];\r\n    return raw ? toRaw(raw) : observed;\r\n}\r\nfunction markRaw(value) {\r\n    def(value, \"__v_skip\" /* ReactiveFlags.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\" /* TrackOpTypes.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\" /* TriggerOpTypes.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        const useDirectValue = this.__v_isShallow || isShallow(newVal) || isReadonly(newVal);\r\n        newVal = useDirectValue ? newVal : toRaw(newVal);\r\n        if (hasChanged(newVal, this._rawValue)) {\r\n            this._rawValue = newVal;\r\n            this._value = useDirectValue ? 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\nvar _a;\r\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[_a] = false;\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\" /* ReactiveFlags.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\n_a = \"__v_isReadonly\" /* ReactiveFlags.IS_READONLY */;\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$1;\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$1] = 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$1 = \"__v_isReadonly\" /* ReactiveFlags.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, isObject, isOn, hasOwn, isModelListener, hasChanged, remove, 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 /* ErrorCodes.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\" /* LifecycleHooks.SERVER_PREFETCH */]: 'serverPrefetch hook',\r\n    [\"bc\" /* LifecycleHooks.BEFORE_CREATE */]: 'beforeCreate hook',\r\n    [\"c\" /* LifecycleHooks.CREATED */]: 'created hook',\r\n    [\"bm\" /* LifecycleHooks.BEFORE_MOUNT */]: 'beforeMount hook',\r\n    [\"m\" /* LifecycleHooks.MOUNTED */]: 'mounted hook',\r\n    [\"bu\" /* LifecycleHooks.BEFORE_UPDATE */]: 'beforeUpdate hook',\r\n    [\"u\" /* LifecycleHooks.UPDATED */]: 'updated',\r\n    [\"bum\" /* LifecycleHooks.BEFORE_UNMOUNT */]: 'beforeUnmount hook',\r\n    [\"um\" /* LifecycleHooks.UNMOUNTED */]: 'unmounted hook',\r\n    [\"a\" /* LifecycleHooks.ACTIVATED */]: 'activated hook',\r\n    [\"da\" /* LifecycleHooks.DEACTIVATED */]: 'deactivated hook',\r\n    [\"ec\" /* LifecycleHooks.ERROR_CAPTURED */]: 'errorCaptured hook',\r\n    [\"rtc\" /* LifecycleHooks.RENDER_TRACKED */]: 'renderTracked hook',\r\n    [\"rtg\" /* LifecycleHooks.RENDER_TRIGGERED */]: 'renderTriggered hook',\r\n    [0 /* ErrorCodes.SETUP_FUNCTION */]: 'setup function',\r\n    [1 /* ErrorCodes.RENDER_FUNCTION */]: 'render function',\r\n    [2 /* ErrorCodes.WATCH_GETTER */]: 'watcher getter',\r\n    [3 /* ErrorCodes.WATCH_CALLBACK */]: 'watcher callback',\r\n    [4 /* ErrorCodes.WATCH_CLEANUP */]: 'watcher cleanup function',\r\n    [5 /* ErrorCodes.NATIVE_EVENT_HANDLER */]: 'native event handler',\r\n    [6 /* ErrorCodes.COMPONENT_EVENT_HANDLER */]: 'component event handler',\r\n    [7 /* ErrorCodes.VNODE_HOOK */]: 'vnode hook',\r\n    [8 /* ErrorCodes.DIRECTIVE_HOOK */]: 'directive hook',\r\n    [9 /* ErrorCodes.TRANSITION_HOOK */]: 'transition hook',\r\n    [10 /* ErrorCodes.APP_ERROR_HANDLER */]: 'app errorHandler',\r\n    [11 /* ErrorCodes.APP_WARN_HANDLER */]: 'app warnHandler',\r\n    [12 /* ErrorCodes.FUNCTION_REF */]: 'ref function',\r\n    [13 /* ErrorCodes.ASYNC_COMPONENT_LOADER */]: 'async component loader',\r\n    [14 /* ErrorCodes.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 /* ErrorCodes.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 pendingPostFlushCbs = [];\r\nlet activePostFlushCbs = null;\r\nlet postFlushIndex = 0;\r\nconst resolvedPromise = /*#__PURE__*/ Promise.resolve();\r\nlet currentFlushPromise = 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        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 queuePostFlushCb(cb) {\r\n    if (!isArray(cb)) {\r\n        if (!activePostFlushCbs ||\r\n            !activePostFlushCbs.includes(cb, cb.allowRecurse ? postFlushIndex + 1 : postFlushIndex)) {\r\n            pendingPostFlushCbs.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        pendingPostFlushCbs.push(...cb);\r\n    }\r\n    queueFlush();\r\n}\r\nfunction flushPreFlushCbs(seen, i = flushIndex) {\r\n    if ((process.env.NODE_ENV !== 'production')) {\r\n        seen = seen || new Map();\r\n    }\r\n    for (; i < queue.length; i++) {\r\n        const cb = queue[i];\r\n        if (cb && cb.pre) {\r\n            if ((process.env.NODE_ENV !== 'production') && checkRecursiveUpdates(seen, cb)) {\r\n                continue;\r\n            }\r\n            queue.splice(i, 1);\r\n            i--;\r\n            cb();\r\n        }\r\n    }\r\n}\r\nfunction flushPostFlushCbs(seen) {\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\nconst comparator = (a, b) => {\r\n    const diff = getId(a) - getId(b);\r\n    if (diff === 0) {\r\n        if (a.pre && !b.pre)\r\n            return -1;\r\n        if (b.pre && !a.pre)\r\n            return 1;\r\n    }\r\n    return diff;\r\n};\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    // 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(comparator);\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 /* ErrorCodes.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 || 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\" /* DevtoolsHooks.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\" /* DevtoolsHooks.APP_UNMOUNT */, app);\r\n}\r\nconst devtoolsComponentAdded = /*#__PURE__*/ createDevtoolsComponentHook(\"component:added\" /* DevtoolsHooks.COMPONENT_ADDED */);\r\nconst devtoolsComponentUpdated = \r\n/*#__PURE__*/ createDevtoolsComponentHook(\"component:updated\" /* DevtoolsHooks.COMPONENT_UPDATED */);\r\nconst devtoolsComponentRemoved = \r\n/*#__PURE__*/ createDevtoolsComponentHook(\"component:removed\" /* DevtoolsHooks.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\" /* DevtoolsHooks.PERFORMANCE_START */);\r\nconst devtoolsPerfEnd = /*#__PURE__*/ createDevtoolsPerformanceHook(\"perf:end\" /* DevtoolsHooks.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\" /* DevtoolsHooks.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 /* ErrorCodes.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 /* ErrorCodes.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        if (isObject(comp)) {\r\n            cache.set(comp, null);\r\n        }\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    if (isObject(comp)) {\r\n        cache.set(comp, normalized);\r\n    }\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 /* ShapeFlags.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 /* ErrorCodes.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 /* PatchFlags.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 /* ShapeFlags.ELEMENT */ | 6 /* ShapeFlags.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 /* ShapeFlags.COMPONENT */ | 1 /* ShapeFlags.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 /* PatchFlags.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 /* PatchFlags.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 /* PatchFlags.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 /* MoveType.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 /* MoveType.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 /* ErrorCodes.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 /* ShapeFlags.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 /* ErrorCodes.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 /* ErrorCodes.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 /* ErrorCodes.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 /* ErrorCodes.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 /* ErrorCodes.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 /* ErrorCodes.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        job.pre = true;\r\n        if (instance)\r\n            job.id = instance.uid;\r\n        scheduler = () => queueJob(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\" /* ReactiveFlags.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 /* ErrorCodes.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 /* ShapeFlags.COMPONENT */ && vnode.component) {\r\n        setTransitionHooks(vnode.component.subTree, hooks);\r\n    }\r\n    else if (vnode.shapeFlag & 128 /* ShapeFlags.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 /* PatchFlags.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 /* PatchFlags.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 /* ErrorCodes.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 /* MoveType.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 /* MoveType.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 /* ShapeFlags.STATEFUL_COMPONENT */) &&\r\n                    !(rawVNode.shapeFlag & 128 /* ShapeFlags.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 /* ShapeFlags.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 /* ShapeFlags.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 /* ShapeFlags.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\" /* LifecycleHooks.ACTIVATED */, target);\r\n}\r\nfunction onDeactivated(hook, target) {\r\n    registerKeepAliveHook(hook, \"da\" /* LifecycleHooks.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 /* ShapeFlags.COMPONENT_SHOULD_KEEP_ALIVE */) {\r\n        shapeFlag -= 256 /* ShapeFlags.COMPONENT_SHOULD_KEEP_ALIVE */;\r\n    }\r\n    if (shapeFlag & 512 /* ShapeFlags.COMPONENT_KEPT_ALIVE */) {\r\n        shapeFlag -= 512 /* ShapeFlags.COMPONENT_KEPT_ALIVE */;\r\n    }\r\n    vnode.shapeFlag = shapeFlag;\r\n}\r\nfunction getInnerChild(vnode) {\r\n    return vnode.shapeFlag & 128 /* ShapeFlags.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\" /* LifecycleHooks.SERVER_PREFETCH */) &&\r\n    injectHook(lifecycle, hook, target);\r\nconst onBeforeMount = createHook(\"bm\" /* LifecycleHooks.BEFORE_MOUNT */);\r\nconst onMounted = createHook(\"m\" /* LifecycleHooks.MOUNTED */);\r\nconst onBeforeUpdate = createHook(\"bu\" /* LifecycleHooks.BEFORE_UPDATE */);\r\nconst onUpdated = createHook(\"u\" /* LifecycleHooks.UPDATED */);\r\nconst onBeforeUnmount = createHook(\"bum\" /* LifecycleHooks.BEFORE_UNMOUNT */);\r\nconst onUnmounted = createHook(\"um\" /* LifecycleHooks.UNMOUNTED */);\r\nconst onServerPrefetch = createHook(\"sp\" /* LifecycleHooks.SERVER_PREFETCH */);\r\nconst onRenderTriggered = createHook(\"rtg\" /* LifecycleHooks.RENDER_TRIGGERED */);\r\nconst onRenderTracked = createHook(\"rtc\" /* LifecycleHooks.RENDER_TRACKED */);\r\nfunction onErrorCaptured(hook, target = currentInstance) {\r\n    injectHook(\"ec\" /* LifecycleHooks.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 /* ErrorCodes.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, false /* do not include inferred name to avoid breaking existing code */);\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.key\r\n                ? (...args) => {\r\n                    const res = slot.fn(...args);\r\n                    res.key = slot.key;\r\n                    return res;\r\n                }\r\n                : 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, {\r\n        key: props.key ||\r\n            // slot content array of a dynamic conditional slot may have a branch\r\n            // key attached in the `createSlots` helper, respect that\r\n            (validSlotContent && validSlotContent.key) ||\r\n            `_${name}`\r\n    }, validSlotContent || (fallback ? fallback() : []), validSlotContent && slots._ === 1 /* SlotFlags.STABLE */\r\n        ? 64 /* PatchFlags.STABLE_FRAGMENT */\r\n        : -2 /* PatchFlags.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, preserveCaseIfNecessary) {\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[preserveCaseIfNecessary && /[A-Z]/.test(key)\r\n            ? `on:${key}`\r\n            : 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 /* AccessTypes.SETUP */:\r\n                        return setupState[key];\r\n                    case 2 /* AccessTypes.DATA */:\r\n                        return data[key];\r\n                    case 4 /* AccessTypes.CONTEXT */:\r\n                        return ctx[key];\r\n                    case 3 /* AccessTypes.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 /* AccessTypes.SETUP */;\r\n                return setupState[key];\r\n            }\r\n            else if (data !== EMPTY_OBJ && hasOwn(data, key)) {\r\n                accessCache[key] = 2 /* AccessTypes.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 /* AccessTypes.PROPS */;\r\n                return props[key];\r\n            }\r\n            else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {\r\n                accessCache[key] = 4 /* AccessTypes.CONTEXT */;\r\n                return ctx[key];\r\n            }\r\n            else if (!__VUE_OPTIONS_API__ || shouldCacheAccess) {\r\n                accessCache[key] = 0 /* AccessTypes.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\" /* TrackOpTypes.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 /* AccessTypes.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\" /* LifecycleHooks.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\" /* OptionTypes.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\" /* OptionTypes.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\" /* OptionTypes.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\" /* OptionTypes.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\" /* LifecycleHooks.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\" /* OptionTypes.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    if (isObject(base)) {\r\n        cache.set(base, resolved);\r\n    }\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 isInHmrContext(instance) {\r\n    while (instance) {\r\n        if (instance.type.__hmrId)\r\n            return true;\r\n        instance = instance.parent;\r\n    }\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') && isInHmrContext(instance)) &&\r\n        (optimized || patchFlag > 0) &&\r\n        !(patchFlag & 16 /* PatchFlags.FULL_PROPS */)) {\r\n        if (patchFlag & 8 /* PatchFlags.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\" /* TriggerOpTypes.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 /* BooleanFlags.shouldCast */]) {\r\n            if (isAbsent && !hasDefault) {\r\n                value = false;\r\n            }\r\n            else if (opt[1 /* BooleanFlags.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        if (isObject(comp)) {\r\n            cache.set(comp, EMPTY_ARR);\r\n        }\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 /* BooleanFlags.shouldCast */] = booleanIndex > -1;\r\n                    prop[1 /* BooleanFlags.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    if (isObject(comp)) {\r\n        cache.set(comp, res);\r\n    }\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 /* ShapeFlags.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 /* ShapeFlags.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 /* SlotFlags.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 /* SlotFlags.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 /* ShapeFlags.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 /* ErrorCodes.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) {\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 /* DOMNodeTypes.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            container._vnode = vnode;\r\n            return;\r\n        }\r\n        hasMismatch = false;\r\n        hydrateNode(container.firstChild, vnode, null, null, null);\r\n        flushPostFlushCbs();\r\n        container._vnode = vnode;\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 /* PatchFlags.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 /* DOMNodeTypes.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 /* DOMNodeTypes.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 /* DOMNodeTypes.ELEMENT */ && domType !== 3 /* DOMNodeTypes.TEXT */) {\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 +=\r\n                                nextNode.nodeType === 1 /* DOMNodeTypes.ELEMENT */\r\n                                    ? nextNode.outerHTML\r\n                                    : nextNode.data;\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 /* ShapeFlags.ELEMENT */) {\r\n                    if (domType !== 1 /* DOMNodeTypes.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 /* ShapeFlags.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 /* ShapeFlags.TELEPORT */) {\r\n                    if (domType !== 8 /* DOMNodeTypes.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 /* ShapeFlags.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 /* PatchFlags.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 /* PatchFlags.FULL_PROPS */ | 32 /* PatchFlags.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 /* ShapeFlags.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 /* ShapeFlags.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 /* DOMNodeTypes.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 /* PatchFlags.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 /* ShapeFlags.ELEMENT */) {\r\n                    processElement(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);\r\n                }\r\n                else if (shapeFlag & 6 /* ShapeFlags.COMPONENT */) {\r\n                    processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);\r\n                }\r\n                else if (shapeFlag & 64 /* ShapeFlags.TELEPORT */) {\r\n                    type.process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals);\r\n                }\r\n                else if (shapeFlag & 128 /* ShapeFlags.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 /* PatchFlags.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 /* ShapeFlags.TEXT_CHILDREN */) {\r\n                hostSetElementText(el, vnode.children);\r\n            }\r\n            else if (shapeFlag & 16 /* ShapeFlags.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 /* PatchFlags.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 /* PatchFlags.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 /* PatchFlags.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 /* PatchFlags.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 /* PatchFlags.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 /* PatchFlags.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 /* PatchFlags.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 /* ShapeFlags.COMPONENT */ | 64 /* ShapeFlags.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 /* PatchFlags.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 /* PatchFlags.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 /* ShapeFlags.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 /* ShapeFlags.COMPONENT_SHOULD_KEEP_ALIVE */ ||\r\n                    (parent &&\r\n                        isAsyncWrapper(parent.vnode) &&\r\n                        parent.vnode.shapeFlag & 256 /* ShapeFlags.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();\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 /* PatchFlags.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 /* PatchFlags.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 /* ShapeFlags.TEXT_CHILDREN */) {\r\n            // text children fast path\r\n            if (prevShapeFlag & 16 /* ShapeFlags.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 /* ShapeFlags.ARRAY_CHILDREN */) {\r\n                // prev children was array\r\n                if (shapeFlag & 16 /* ShapeFlags.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 /* ShapeFlags.TEXT_CHILDREN */) {\r\n                    hostSetElementText(container, '');\r\n                }\r\n                // mount new if array\r\n                if (shapeFlag & 16 /* ShapeFlags.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 /* MoveType.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 /* ShapeFlags.COMPONENT */) {\r\n            move(vnode.component.subTree, container, anchor, moveType);\r\n            return;\r\n        }\r\n        if (shapeFlag & 128 /* ShapeFlags.SUSPENSE */) {\r\n            vnode.suspense.move(container, anchor, moveType);\r\n            return;\r\n        }\r\n        if (shapeFlag & 64 /* ShapeFlags.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 /* MoveType.REORDER */ &&\r\n            shapeFlag & 1 /* ShapeFlags.ELEMENT */ &&\r\n            transition;\r\n        if (needTransition) {\r\n            if (moveType === 0 /* MoveType.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 /* ShapeFlags.COMPONENT_SHOULD_KEEP_ALIVE */) {\r\n            parentComponent.ctx.deactivate(vnode);\r\n            return;\r\n        }\r\n        const shouldInvokeDirs = shapeFlag & 1 /* ShapeFlags.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 /* ShapeFlags.COMPONENT */) {\r\n            unmountComponent(vnode.component, parentSuspense, doRemove);\r\n        }\r\n        else {\r\n            if (shapeFlag & 128 /* ShapeFlags.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 /* ShapeFlags.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 /* PatchFlags.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 /* PatchFlags.KEYED_FRAGMENT */ | 256 /* PatchFlags.UNKEYED_FRAGMENT */)) ||\r\n                (!optimized && shapeFlag & 16 /* ShapeFlags.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 /* PatchFlags.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 /* ShapeFlags.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 /* ShapeFlags.COMPONENT */) {\r\n            return getNextHostNode(vnode.component.subTree);\r\n        }\r\n        if (vnode.shapeFlag & 128 /* ShapeFlags.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        flushPreFlushCbs();\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 /* ShapeFlags.ELEMENT */ && !c2.dynamicChildren) {\r\n                if (c2.patchFlag <= 0 || c2.patchFlag === 32 /* PatchFlags.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 /* ShapeFlags.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 /* TeleportMoveTypes.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 /* TeleportMoveTypes.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 /* TeleportMoveTypes.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 /* ShapeFlags.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 /* TeleportMoveTypes.REORDER */) {\r\n    // move target anchor if this is a target change.\r\n    if (moveType === 0 /* TeleportMoveTypes.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 /* TeleportMoveTypes.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 /* ShapeFlags.ARRAY_CHILDREN */) {\r\n            for (let i = 0; i < children.length; i++) {\r\n                move(children[i], container, parentAnchor, 2 /* MoveType.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 /* ShapeFlags.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 /* ShapeFlags.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 /* ShapeFlags.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 /* ShapeFlags.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 /* ShapeFlags.TEXT_CHILDREN */\r\n            : 16 /* ShapeFlags.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 /* ShapeFlags.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 /* PatchFlags.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 /* ShapeFlags.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 /* PatchFlags.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 /* ShapeFlags.ELEMENT */\r\n        : isSuspense(type)\r\n            ? 128 /* ShapeFlags.SUSPENSE */\r\n            : isTeleport(type)\r\n                ? 64 /* ShapeFlags.TELEPORT */\r\n                : isObject(type)\r\n                    ? 4 /* ShapeFlags.STATEFUL_COMPONENT */\r\n                    : isFunction(type)\r\n                        ? 2 /* ShapeFlags.FUNCTIONAL_COMPONENT */\r\n                        : 0;\r\n    if ((process.env.NODE_ENV !== 'production') && shapeFlag & 4 /* ShapeFlags.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 /* PatchFlags.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 /* PatchFlags.FULL_PROPS */\r\n                : patchFlag | 16 /* PatchFlags.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 /* ShapeFlags.ARRAY_CHILDREN */;\r\n    }\r\n    else if (typeof children === 'object') {\r\n        if (shapeFlag & (1 /* ShapeFlags.ELEMENT */ | 64 /* ShapeFlags.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 /* ShapeFlags.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 /* SlotFlags.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 /* SlotFlags.STABLE */) {\r\n                    children._ = 1 /* SlotFlags.STABLE */;\r\n                }\r\n                else {\r\n                    children._ = 2 /* SlotFlags.DYNAMIC */;\r\n                    vnode.patchFlag |= 1024 /* PatchFlags.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 /* ShapeFlags.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 /* ShapeFlags.TELEPORT */) {\r\n            type = 16 /* ShapeFlags.ARRAY_CHILDREN */;\r\n            children = [createTextVNode(children)];\r\n        }\r\n        else {\r\n            type = 8 /* ShapeFlags.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 /* ErrorCodes.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 /* ShapeFlags.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 /* ErrorCodes.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 /* ErrorCodes.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\" /* TrackOpTypes.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\" /* TrackOpTypes.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, includeInferred = true) {\r\n    return isFunction(Component)\r\n        ? Component.displayName || Component.name\r\n        : Component.name || (includeInferred && 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\" /* ReactiveFlags.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.38\";\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 ssr-possible 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.bind(performance);\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    const event = name[2] === ':' ? name.slice(3) : hyphenate(name.slice(2));\r\n    return [event, 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 /* ErrorCodes.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 /* ShapeFlags.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 /* ShapeFlags.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    const finishLeave = (el, done) => {\r\n        el._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            el._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 (!el._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","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","/*!\n  * vue-router v4.1.5\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 isBrowser = typeof window !== 'undefined';\n\nfunction isESModule(obj) {\r\n    return obj.__esModule || 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] = isArray(value)\r\n            ? value.map(fn)\r\n            : fn(value);\r\n    }\r\n    return newParams;\r\n}\r\nconst noop = () => { };\r\n/**\r\n * Typesafe alternative to Array.isArray\r\n * https://github.com/microsoft/TypeScript/pull/48228\r\n */\r\nconst isArray = Array.isArray;\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 a 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    // TODO: move to new URL()\r\n    const hashPos = location.indexOf('#');\r\n    let searchPos = location.indexOf('?');\r\n    // the hash appears before the search, so it's not part of the search string\r\n    if (hashPos < searchPos && hashPos >= 0) {\r\n        searchPos = -1;\r\n    }\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-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 isArray(a)\r\n        ? isEquivalentArray(a, b)\r\n        : 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 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        // we stay on the same position\r\n        if (segment === '.')\r\n            continue;\r\n        // go up in the from array\r\n        if (segment === '..') {\r\n            // we can't go below zero, but we still need to increment toPosition\r\n            if (position > 1)\r\n                position--;\r\n            // continue\r\n        }\r\n        // we reached a non-relative path, we stop here\r\n        else\r\n            break;\r\n    }\r\n    return (fromSegments.slice(0, position).join('/') +\r\n        '/' +\r\n        toSegments\r\n            // ensure we use at least the last element in the 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        // set up 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    // set up 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 an 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. `file://`) or when configuring a server to\r\n * handle any URL is not possible.\r\n *\r\n * @param base - optional base to provide. Defaults to `location.pathname + location.search` If there is a `<base>` tag\r\n * in the `head`, its value will be ignored in favor of this parameter **but note it affects all the history.pushState()\r\n * calls**, meaning that if you use a `<base>` tag, it's `href` value **has to match this parameter** (ignoring anything\r\n * after the `#`).\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 = Symbol((process.env.NODE_ENV !== 'production') ? 'navigation failure' : '');\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 /* ErrorTypes.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 /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */]({ from, to, }) {\r\n        return `Redirected from \"${from.fullPath}\" to \"${stringifyRoute(to)}\" via a navigation guard.`;\r\n    },\r\n    [4 /* ErrorTypes.NAVIGATION_ABORTED */]({ from, to }) {\r\n        return `Navigation aborted from \"${from.fullPath}\" to \"${to.fullPath}\" via a navigation guard.`;\r\n    },\r\n    [8 /* ErrorTypes.NAVIGATION_CANCELLED */]({ from, to }) {\r\n        return `Navigation cancelled from \"${from.fullPath}\" to \"${to.fullPath}\" with a new navigation.`;\r\n    },\r\n    [16 /* ErrorTypes.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 /* PathScore.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 /* PathScore.Segment */ +\r\n                (options.sensitive ? 0.25 /* PathScore.BonusCaseSensitive */ : 0);\r\n            if (token.type === 0 /* TokenType.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 /* PathScore.Static */;\r\n            }\r\n            else if (token.type === 1 /* TokenType.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 /* PathScore.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 /* PathScore.Dynamic */;\r\n                if (optional)\r\n                    subSegmentScore += -8 /* PathScore.BonusOptional */;\r\n                if (repeatable)\r\n                    subSegmentScore += -20 /* PathScore.BonusRepeatable */;\r\n                if (re === '.*')\r\n                    subSegmentScore += -50 /* PathScore.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 /* PathScore.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 /* TokenType.Static */) {\r\n                    path += token.value;\r\n                }\r\n                else if (token.type === 1 /* TokenType.Param */) {\r\n                    const { value, repeatable, optional } = token;\r\n                    const param = value in params ? params[value] : '';\r\n                    if (isArray(param) && !repeatable) {\r\n                        throw new Error(`Provided param \"${value}\" is an array but it is not repeatable (* or + modifiers)`);\r\n                    }\r\n                    const text = isArray(param)\r\n                        ? param.join('/')\r\n                        : param;\r\n                    if (!text) {\r\n                        if (optional) {\r\n                            // if we have more than one optional param like /:a?-static we don't need to care about the optional param\r\n                            if (segment.length < 2) {\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        // avoid empty path when we have multiple optional params\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 /* PathScore.Static */ + 40 /* PathScore.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 /* PathScore.Static */ + 40 /* PathScore.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 (Math.abs(bScore.length - aScore.length) === 1) {\r\n        if (isLastScoreNegative(aScore))\r\n            return 1;\r\n        if (isLastScoreNegative(bScore))\r\n            return -1;\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}\r\n/**\r\n * This allows detecting splats at the end of a path: /home/:id(.*)*\r\n *\r\n * @param score - score to check\r\n * @returns true if the last entry is negative\r\n */\r\nfunction isLastScoreNegative(score) {\r\n    const last = score[score.length - 1];\r\n    return score.length > 0 && last[last.length - 1] < 0;\r\n}\n\nconst ROOT_TOKEN = {\r\n    type: 0 /* TokenType.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 /* TokenizerState.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 /* TokenizerState.Static */) {\r\n            segment.push({\r\n                type: 0 /* TokenType.Static */,\r\n                value: buffer,\r\n            });\r\n        }\r\n        else if (state === 1 /* TokenizerState.Param */ ||\r\n            state === 2 /* TokenizerState.ParamRegExp */ ||\r\n            state === 3 /* TokenizerState.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 /* TokenType.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 /* TokenizerState.ParamRegExp */) {\r\n            previousState = state;\r\n            state = 4 /* TokenizerState.EscapeNext */;\r\n            continue;\r\n        }\r\n        switch (state) {\r\n            case 0 /* TokenizerState.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 /* TokenizerState.Param */;\r\n                }\r\n                else {\r\n                    addCharToBuffer();\r\n                }\r\n                break;\r\n            case 4 /* TokenizerState.EscapeNext */:\r\n                addCharToBuffer();\r\n                state = previousState;\r\n                break;\r\n            case 1 /* TokenizerState.Param */:\r\n                if (char === '(') {\r\n                    state = 2 /* TokenizerState.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 /* TokenizerState.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 /* TokenizerState.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 /* TokenizerState.ParamRegExpEnd */;\r\n                }\r\n                else {\r\n                    customRe += char;\r\n                }\r\n                break;\r\n            case 3 /* TokenizerState.ParamRegExpEnd */:\r\n                // same as finalizing a param\r\n                consumeBuffer();\r\n                state = 0 /* TokenizerState.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 /* TokenizerState.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        if ((process.env.NODE_ENV !== 'production')) {\r\n            checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent);\r\n        }\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 beforehand, 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 (mainNormalizedRecord.children) {\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 aliases (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 /* ErrorTypes.MATCHER_NOT_FOUND */, {\r\n                    location,\r\n                });\r\n            // warn if the user is passing invalid params so they can debug it better when they get removed\r\n            if ((process.env.NODE_ENV !== 'production')) {\r\n                const invalidParams = Object.keys(location.params || {}).filter(paramName => !matcher.keys.find(k => k.name === paramName));\r\n                if (invalidParams.length) {\r\n                    warn(`Discarded invalid param(s) \"${invalidParams.join('\", \"')}\" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`);\r\n                }\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)), \r\n            // discard any existing params in the current location that do not exist here\r\n            // #1497 this ensures better active/exact matching\r\n            location.params &&\r\n                paramsFromLocation(location.params, matcher.keys.map(k => k.name)));\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                // 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 /* ErrorTypes.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 || null\r\n            : record.component && { 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}\" must 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}\" must have the exact same param named \"${key.name}\"`);\r\n    }\r\n}\r\n/**\r\n * A route with a name and a child with an empty path without a name should warn when adding the route\r\n *\r\n * @param mainNormalizedRecord - RouteRecordNormalized\r\n * @param parent - RouteRecordMatcher\r\n */\r\nfunction checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent) {\r\n    if (parent &&\r\n        parent.record.name &&\r\n        !mainNormalizedRecord.name &&\r\n        !mainNormalizedRecord.path) {\r\n        warn(`The route named \"${String(parent.record.name)}\" has a child without a name and an empty path. Using that name won't render the empty path child so you probably want to move the name to the child instead. If this is intentional, add a name to the child route to remove the warning.`);\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}\" must 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 un-encoded 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 (!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 = 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] = 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 * 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 = Symbol((process.env.NODE_ENV !== 'production') ? 'router view location matched' : '');\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 = Symbol((process.env.NODE_ENV !== 'production') ? 'router view depth' : '');\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 = Symbol((process.env.NODE_ENV !== 'production') ? 'router' : '');\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 = Symbol((process.env.NODE_ENV !== 'production') ? 'route location' : '');\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 = Symbol((process.env.NODE_ENV !== 'production') ? 'router view location' : '');\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 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 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 /* ErrorTypes.NAVIGATION_ABORTED */, {\r\n                    from,\r\n                    to,\r\n                }));\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 /* ErrorTypes.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                }\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            }\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        if ((process.env.NODE_ENV !== 'production') && !record.components && !record.children.length) {\r\n            warn(`Record with path \"${record.path}\" is either missing a \"component(s)\"` +\r\n                ` or \"children\" property.`);\r\n        }\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                    // cannot be null or undefined because we went into the for loop\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 * @internal\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}\r\n/**\r\n * Ensures a route is loaded, so it can be passed as o prop to `<RouterView>`.\r\n *\r\n * @param route - resolved route to load\r\n */\r\nfunction loadRouteLocation(route) {\r\n    return route.matched.every(record => record.redirect)\r\n        ? Promise.reject(new Error('Cannot load a route that redirects.'))\r\n        : Promise.all(route.matched.map(record => record.components &&\r\n            Promise.all(Object.keys(record.components).reduce((promises, name) => {\r\n                const rawComponent = record.components[name];\r\n                if (typeof rawComponent === 'function' &&\r\n                    !('displayName' in rawComponent)) {\r\n                    promises.push(rawComponent().then(resolved => {\r\n                        if (!resolved)\r\n                            return Promise.reject(new Error(`Couldn't resolve component \"${name}\" at \"${record.path}\". Ensure you passed a function that returns a promise.`));\r\n                        const resolvedComponent = isESModule(resolved)\r\n                            ? resolved.default\r\n                            : resolved;\r\n                        // replace the function with the resolved component\r\n                        // cannot be null or undefined because we went into the for loop\r\n                        record.components[name] = resolvedComponent;\r\n                        return;\r\n                    }));\r\n                }\r\n                return promises;\r\n            }, [])))).then(() => route);\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    compatConfig: { MODE: 3 },\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 (!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 injectedDepth = inject(viewDepthKey, 0);\r\n        // The depth changes based on empty components option, which allows passthrough routes e.g. routes with children\r\n        // that are used to reuse the `path` property\r\n        const depth = computed(() => {\r\n            let initialDepth = unref(injectedDepth);\r\n            const { matched } = routeToDisplay.value;\r\n            let matchedRoute;\r\n            while ((matchedRoute = matched[initialDepth]) &&\r\n                !matchedRoute.components) {\r\n                initialDepth++;\r\n            }\r\n            return initialDepth;\r\n        });\r\n        const matchedRouteRef = computed(() => routeToDisplay.value.matched[depth.value]);\r\n        provide(viewDepthKey, computed(() => depth.value + 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            // 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            const matchedRoute = matchedRouteRef.value;\r\n            const ViewComponent = matchedRoute && matchedRoute.components[currentName];\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[currentName];\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: depth.value,\r\n                    name: matchedRoute.name,\r\n                    path: matchedRoute.path,\r\n                    meta: matchedRoute.meta,\r\n                };\r\n                const internalInstances = 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\n/**\r\n * Copies a route location and removes any problematic properties that cannot be shown in devtools (e.g. Vue instances).\r\n *\r\n * @param routeLocation - routeLocation to format\r\n * @param tooltip - optional tooltip\r\n * @returns a copy of the routeLocation\r\n */\r\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        if (typeof api.now !== 'function') {\r\n            console.warn('[Vue Router]: You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html.');\r\n        }\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 (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    if (Object.keys(route.record.meta).length) {\r\n        fields.push({\r\n            editable: false,\r\n            key: 'meta',\r\n            value: route.record.meta,\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: typeof record.redirect === 'string'\r\n                ? `redirect: ${record.redirect}`\r\n                : 'redirects',\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        // 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 /* ErrorTypes.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                // avoid transferring params if the redirect has a path\r\n                params: 'path' in newTargetLocation ? {} : 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: typeof shouldRedirect === 'object'\r\n                    ? assign({}, data, shouldRedirect.state)\r\n                    : 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 /* ErrorTypes.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 /* ErrorTypes.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 /* ErrorTypes.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({\r\n                        // preserve an existing replacement but allow the redirect to override it\r\n                        replace,\r\n                    }, locationAsObject(failure.to), {\r\n                        state: typeof failure.to === 'object'\r\n                            ? assign({}, data, failure.to.state)\r\n                            : data,\r\n                        force,\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 (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 /* ErrorTypes.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            if (!router.listening)\r\n                return;\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 /* ErrorTypes.NAVIGATION_ABORTED */ | 8 /* ErrorTypes.NAVIGATION_CANCELLED */)) {\r\n                    return error;\r\n                }\r\n                if (isNavigationFailure(error, 2 /* ErrorTypes.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 no 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 /* ErrorTypes.NAVIGATION_ABORTED */ |\r\n                            16 /* ErrorTypes.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                }\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                        // a new navigation has been triggered, so we do not want to revert, that will change the current history\r\n                        // entry while a different route is displayed\r\n                        !isNavigationFailure(failure, 8 /* ErrorTypes.NAVIGATION_CANCELLED */)) {\r\n                        routerHistory.go(-info.delta, false);\r\n                    }\r\n                    else if (info.type === NavigationType.pop &&\r\n                        isNavigationFailure(failure, 4 /* ErrorTypes.NAVIGATION_ABORTED */ | 16 /* ErrorTypes.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        listening: true,\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            // TODO: this probably needs to be updated so it can be used by vue-termui\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, loadRouteLocation, matchedRouteKey, onBeforeRouteLeave, onBeforeRouteUpdate, parseQuery, routeLocationKey, routerKey, routerViewLocationKey, stringifyQuery, useLink, useRoute, useRouter, viewDepthKey };\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","const debug = !import.meta.env.PROD;\nexport default debug;\n","'use strict';\n\nmodule.exports = function bind(fn, thisArg) {\n  return function wrap() {\n    var args = new Array(arguments.length);\n    for (var i = 0; i < args.length; i++) {\n      args[i] = arguments[i];\n    }\n    return fn.apply(thisArg, args);\n  };\n};\n","'use strict';\n\nvar bind = require('./helpers/bind');\n\n/*global toString:true*/\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n  return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n  return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n  return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n    && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n  return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n  return (typeof FormData !== 'undefined') && (val instanceof FormData);\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n  var result;\n  if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n    result = ArrayBuffer.isView(val);\n  } else {\n    result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n  }\n  return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n  return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n  return typeof val === 'number';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n  return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n  return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n  return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n  return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n  return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n  return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n  return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n  return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n *  typeof window -> undefined\n *  typeof document -> undefined\n *\n * react-native:\n *  navigator.product -> 'ReactNative'\n * nativescript\n *  navigator.product -> 'NativeScript' or 'NS'\n */\nfunction isStandardBrowserEnv() {\n  if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n                                           navigator.product === 'NativeScript' ||\n                                           navigator.product === 'NS')) {\n    return false;\n  }\n  return (\n    typeof window !== 'undefined' &&\n    typeof document !== 'undefined'\n  );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n  // Don't bother if no value provided\n  if (obj === null || typeof obj === 'undefined') {\n    return;\n  }\n\n  // Force an array if not already something iterable\n  if (typeof obj !== 'object') {\n    /*eslint no-param-reassign:0*/\n    obj = [obj];\n  }\n\n  if (isArray(obj)) {\n    // Iterate over array values\n    for (var i = 0, l = obj.length; i < l; i++) {\n      fn.call(null, obj[i], i, obj);\n    }\n  } else {\n    // Iterate over object keys\n    for (var key in obj) {\n      if (Object.prototype.hasOwnProperty.call(obj, key)) {\n        fn.call(null, obj[key], key, obj);\n      }\n    }\n  }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n  var result = {};\n  function assignValue(val, key) {\n    if (typeof result[key] === 'object' && typeof val === 'object') {\n      result[key] = merge(result[key], val);\n    } else {\n      result[key] = val;\n    }\n  }\n\n  for (var i = 0, l = arguments.length; i < l; i++) {\n    forEach(arguments[i], assignValue);\n  }\n  return result;\n}\n\n/**\n * Function equal to merge with the difference being that no reference\n * to original objects is kept.\n *\n * @see merge\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction deepMerge(/* obj1, obj2, obj3, ... */) {\n  var result = {};\n  function assignValue(val, key) {\n    if (typeof result[key] === 'object' && typeof val === 'object') {\n      result[key] = deepMerge(result[key], val);\n    } else if (typeof val === 'object') {\n      result[key] = deepMerge({}, val);\n    } else {\n      result[key] = val;\n    }\n  }\n\n  for (var i = 0, l = arguments.length; i < l; i++) {\n    forEach(arguments[i], assignValue);\n  }\n  return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n  forEach(b, function assignValue(val, key) {\n    if (thisArg && typeof val === 'function') {\n      a[key] = bind(val, thisArg);\n    } else {\n      a[key] = val;\n    }\n  });\n  return a;\n}\n\nmodule.exports = {\n  isArray: isArray,\n  isArrayBuffer: isArrayBuffer,\n  isBuffer: isBuffer,\n  isFormData: isFormData,\n  isArrayBufferView: isArrayBufferView,\n  isString: isString,\n  isNumber: isNumber,\n  isObject: isObject,\n  isUndefined: isUndefined,\n  isDate: isDate,\n  isFile: isFile,\n  isBlob: isBlob,\n  isFunction: isFunction,\n  isStream: isStream,\n  isURLSearchParams: isURLSearchParams,\n  isStandardBrowserEnv: isStandardBrowserEnv,\n  forEach: forEach,\n  merge: merge,\n  deepMerge: deepMerge,\n  extend: extend,\n  trim: trim\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction encode(val) {\n  return encodeURIComponent(val).\n    replace(/%40/gi, '@').\n    replace(/%3A/gi, ':').\n    replace(/%24/g, '$').\n    replace(/%2C/gi, ',').\n    replace(/%20/g, '+').\n    replace(/%5B/gi, '[').\n    replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n  /*eslint no-param-reassign:0*/\n  if (!params) {\n    return url;\n  }\n\n  var serializedParams;\n  if (paramsSerializer) {\n    serializedParams = paramsSerializer(params);\n  } else if (utils.isURLSearchParams(params)) {\n    serializedParams = params.toString();\n  } else {\n    var parts = [];\n\n    utils.forEach(params, function serialize(val, key) {\n      if (val === null || typeof val === 'undefined') {\n        return;\n      }\n\n      if (utils.isArray(val)) {\n        key = key + '[]';\n      } else {\n        val = [val];\n      }\n\n      utils.forEach(val, function parseValue(v) {\n        if (utils.isDate(v)) {\n          v = v.toISOString();\n        } else if (utils.isObject(v)) {\n          v = JSON.stringify(v);\n        }\n        parts.push(encode(key) + '=' + encode(v));\n      });\n    });\n\n    serializedParams = parts.join('&');\n  }\n\n  if (serializedParams) {\n    var hashmarkIndex = url.indexOf('#');\n    if (hashmarkIndex !== -1) {\n      url = url.slice(0, hashmarkIndex);\n    }\n\n    url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n  }\n\n  return url;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction InterceptorManager() {\n  this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected) {\n  this.handlers.push({\n    fulfilled: fulfilled,\n    rejected: rejected\n  });\n  return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n  if (this.handlers[id]) {\n    this.handlers[id] = null;\n  }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n  utils.forEach(this.handlers, function forEachHandler(h) {\n    if (h !== null) {\n      fn(h);\n    }\n  });\n};\n\nmodule.exports = InterceptorManager;\n","'use strict';\n\nvar utils = require('./../utils');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n  /*eslint no-param-reassign:0*/\n  utils.forEach(fns, function transform(fn) {\n    data = fn(data, headers);\n  });\n\n  return data;\n};\n","'use strict';\n\nmodule.exports = function isCancel(value) {\n  return !!(value && value.__CANCEL__);\n};\n","'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n  utils.forEach(headers, function processHeader(value, name) {\n    if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n      headers[normalizedName] = value;\n      delete headers[name];\n    }\n  });\n};\n","'use strict';\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n  error.config = config;\n  if (code) {\n    error.code = code;\n  }\n\n  error.request = request;\n  error.response = response;\n  error.isAxiosError = true;\n\n  error.toJSON = function() {\n    return {\n      // Standard\n      message: this.message,\n      name: this.name,\n      // Microsoft\n      description: this.description,\n      number: this.number,\n      // Mozilla\n      fileName: this.fileName,\n      lineNumber: this.lineNumber,\n      columnNumber: this.columnNumber,\n      stack: this.stack,\n      // Axios\n      config: this.config,\n      code: this.code\n    };\n  };\n  return error;\n};\n","'use strict';\n\nvar enhanceError = require('./enhanceError');\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n  var error = new Error(message);\n  return enhanceError(error, config, code, request, response);\n};\n","'use strict';\n\nvar createError = require('./createError');\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n  var validateStatus = response.config.validateStatus;\n  if (!validateStatus || validateStatus(response.status)) {\n    resolve(response);\n  } else {\n    reject(createError(\n      'Request failed with status code ' + response.status,\n      response.config,\n      null,\n      response.request,\n      response\n    ));\n  }\n};\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n  // A URL is considered absolute if it begins with \"<scheme>://\" or \"//\" (protocol-relative URL).\n  // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n  // by any combination of letters, digits, plus, period, or hyphen.\n  return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n};\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n  return relativeURL\n    ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n    : baseURL;\n};\n","'use strict';\n\nvar isAbsoluteURL = require('../helpers/isAbsoluteURL');\nvar combineURLs = require('../helpers/combineURLs');\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n * @returns {string} The combined full path\n */\nmodule.exports = function buildFullPath(baseURL, requestedURL) {\n  if (baseURL && !isAbsoluteURL(requestedURL)) {\n    return combineURLs(baseURL, requestedURL);\n  }\n  return requestedURL;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n  'age', 'authorization', 'content-length', 'content-type', 'etag',\n  'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n  'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n  'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n  var parsed = {};\n  var key;\n  var val;\n  var i;\n\n  if (!headers) { return parsed; }\n\n  utils.forEach(headers.split('\\n'), function parser(line) {\n    i = line.indexOf(':');\n    key = utils.trim(line.substr(0, i)).toLowerCase();\n    val = utils.trim(line.substr(i + 1));\n\n    if (key) {\n      if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n        return;\n      }\n      if (key === 'set-cookie') {\n        parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n      } else {\n        parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n      }\n    }\n  });\n\n  return parsed;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n  utils.isStandardBrowserEnv() ?\n\n  // Standard browser envs have full support of the APIs needed to test\n  // whether the request URL is of the same origin as current location.\n    (function standardBrowserEnv() {\n      var msie = /(msie|trident)/i.test(navigator.userAgent);\n      var urlParsingNode = document.createElement('a');\n      var originURL;\n\n      /**\n    * Parse a URL to discover it's components\n    *\n    * @param {String} url The URL to be parsed\n    * @returns {Object}\n    */\n      function resolveURL(url) {\n        var href = url;\n\n        if (msie) {\n        // IE needs attribute set twice to normalize properties\n          urlParsingNode.setAttribute('href', href);\n          href = urlParsingNode.href;\n        }\n\n        urlParsingNode.setAttribute('href', href);\n\n        // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n        return {\n          href: urlParsingNode.href,\n          protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n          host: urlParsingNode.host,\n          search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n          hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n          hostname: urlParsingNode.hostname,\n          port: urlParsingNode.port,\n          pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n            urlParsingNode.pathname :\n            '/' + urlParsingNode.pathname\n        };\n      }\n\n      originURL = resolveURL(window.location.href);\n\n      /**\n    * Determine if a URL shares the same origin as the current location\n    *\n    * @param {String} requestURL The URL to test\n    * @returns {boolean} True if URL shares the same origin, otherwise false\n    */\n      return function isURLSameOrigin(requestURL) {\n        var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n        return (parsed.protocol === originURL.protocol &&\n            parsed.host === originURL.host);\n      };\n    })() :\n\n  // Non standard browser envs (web workers, react-native) lack needed support.\n    (function nonStandardBrowserEnv() {\n      return function isURLSameOrigin() {\n        return true;\n      };\n    })()\n);\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n  utils.isStandardBrowserEnv() ?\n\n  // Standard browser envs support document.cookie\n    (function standardBrowserEnv() {\n      return {\n        write: function write(name, value, expires, path, domain, secure) {\n          var cookie = [];\n          cookie.push(name + '=' + encodeURIComponent(value));\n\n          if (utils.isNumber(expires)) {\n            cookie.push('expires=' + new Date(expires).toGMTString());\n          }\n\n          if (utils.isString(path)) {\n            cookie.push('path=' + path);\n          }\n\n          if (utils.isString(domain)) {\n            cookie.push('domain=' + domain);\n          }\n\n          if (secure === true) {\n            cookie.push('secure');\n          }\n\n          document.cookie = cookie.join('; ');\n        },\n\n        read: function read(name) {\n          var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n          return (match ? decodeURIComponent(match[3]) : null);\n        },\n\n        remove: function remove(name) {\n          this.write(name, '', Date.now() - 86400000);\n        }\n      };\n    })() :\n\n  // Non standard browser env (web workers, react-native) lack needed support.\n    (function nonStandardBrowserEnv() {\n      return {\n        write: function write() {},\n        read: function read() { return null; },\n        remove: function remove() {}\n      };\n    })()\n);\n","'use strict';\n\nvar utils = require('./../utils');\nvar settle = require('./../core/settle');\nvar buildURL = require('./../helpers/buildURL');\nvar buildFullPath = require('../core/buildFullPath');\nvar parseHeaders = require('./../helpers/parseHeaders');\nvar isURLSameOrigin = require('./../helpers/isURLSameOrigin');\nvar createError = require('../core/createError');\n\nmodule.exports = function xhrAdapter(config) {\n  return new Promise(function dispatchXhrRequest(resolve, reject) {\n    var requestData = config.data;\n    var requestHeaders = config.headers;\n\n    if (utils.isFormData(requestData)) {\n      delete requestHeaders['Content-Type']; // Let the browser set it\n    }\n\n    var request = new XMLHttpRequest();\n\n    // HTTP basic authentication\n    if (config.auth) {\n      var username = config.auth.username || '';\n      var password = config.auth.password || '';\n      requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n    }\n\n    var fullPath = buildFullPath(config.baseURL, config.url);\n    request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n    // Set the request timeout in MS\n    request.timeout = config.timeout;\n\n    // Listen for ready state\n    request.onreadystatechange = function handleLoad() {\n      if (!request || request.readyState !== 4) {\n        return;\n      }\n\n      // The request errored out and we didn't get a response, this will be\n      // handled by onerror instead\n      // With one exception: request that using file: protocol, most browsers\n      // will return status as 0 even though it's a successful request\n      if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n        return;\n      }\n\n      // Prepare the response\n      var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n      var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;\n      var response = {\n        data: responseData,\n        status: request.status,\n        statusText: request.statusText,\n        headers: responseHeaders,\n        config: config,\n        request: request\n      };\n\n      settle(resolve, reject, response);\n\n      // Clean up request\n      request = null;\n    };\n\n    // Handle browser request cancellation (as opposed to a manual cancellation)\n    request.onabort = function handleAbort() {\n      if (!request) {\n        return;\n      }\n\n      reject(createError('Request aborted', config, 'ECONNABORTED', request));\n\n      // Clean up request\n      request = null;\n    };\n\n    // Handle low level network errors\n    request.onerror = function handleError() {\n      // Real errors are hidden from us by the browser\n      // onerror should only fire if it's a network error\n      reject(createError('Network Error', config, null, request));\n\n      // Clean up request\n      request = null;\n    };\n\n    // Handle timeout\n    request.ontimeout = function handleTimeout() {\n      var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';\n      if (config.timeoutErrorMessage) {\n        timeoutErrorMessage = config.timeoutErrorMessage;\n      }\n      reject(createError(timeoutErrorMessage, config, 'ECONNABORTED',\n        request));\n\n      // Clean up request\n      request = null;\n    };\n\n    // Add xsrf header\n    // This is only done if running in a standard browser environment.\n    // Specifically not if we're in a web worker, or react-native.\n    if (utils.isStandardBrowserEnv()) {\n      var cookies = require('./../helpers/cookies');\n\n      // Add xsrf header\n      var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?\n        cookies.read(config.xsrfCookieName) :\n        undefined;\n\n      if (xsrfValue) {\n        requestHeaders[config.xsrfHeaderName] = xsrfValue;\n      }\n    }\n\n    // Add headers to the request\n    if ('setRequestHeader' in request) {\n      utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n        if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n          // Remove Content-Type if data is undefined\n          delete requestHeaders[key];\n        } else {\n          // Otherwise add header to the request\n          request.setRequestHeader(key, val);\n        }\n      });\n    }\n\n    // Add withCredentials to request if needed\n    if (!utils.isUndefined(config.withCredentials)) {\n      request.withCredentials = !!config.withCredentials;\n    }\n\n    // Add responseType to request if needed\n    if (config.responseType) {\n      try {\n        request.responseType = config.responseType;\n      } catch (e) {\n        // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.\n        // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.\n        if (config.responseType !== 'json') {\n          throw e;\n        }\n      }\n    }\n\n    // Handle progress if needed\n    if (typeof config.onDownloadProgress === 'function') {\n      request.addEventListener('progress', config.onDownloadProgress);\n    }\n\n    // Not all browsers support upload events\n    if (typeof config.onUploadProgress === 'function' && request.upload) {\n      request.upload.addEventListener('progress', config.onUploadProgress);\n    }\n\n    if (config.cancelToken) {\n      // Handle cancellation\n      config.cancelToken.promise.then(function onCanceled(cancel) {\n        if (!request) {\n          return;\n        }\n\n        request.abort();\n        reject(cancel);\n        // Clean up request\n        request = null;\n      });\n    }\n\n    if (requestData === undefined) {\n      requestData = null;\n    }\n\n    // Send the request\n    request.send(requestData);\n  });\n};\n","'use strict';\n\nvar utils = require('./utils');\nvar normalizeHeaderName = require('./helpers/normalizeHeaderName');\n\nvar DEFAULT_CONTENT_TYPE = {\n  'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n  if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n    headers['Content-Type'] = value;\n  }\n}\n\nfunction getDefaultAdapter() {\n  var adapter;\n  if (typeof XMLHttpRequest !== 'undefined') {\n    // For browsers use XHR adapter\n    adapter = require('./adapters/xhr');\n  } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\n    // For node use HTTP adapter\n    adapter = require('./adapters/http');\n  }\n  return adapter;\n}\n\nvar defaults = {\n  adapter: getDefaultAdapter(),\n\n  transformRequest: [function transformRequest(data, headers) {\n    normalizeHeaderName(headers, 'Accept');\n    normalizeHeaderName(headers, 'Content-Type');\n    if (utils.isFormData(data) ||\n      utils.isArrayBuffer(data) ||\n      utils.isBuffer(data) ||\n      utils.isStream(data) ||\n      utils.isFile(data) ||\n      utils.isBlob(data)\n    ) {\n      return data;\n    }\n    if (utils.isArrayBufferView(data)) {\n      return data.buffer;\n    }\n    if (utils.isURLSearchParams(data)) {\n      setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n      return data.toString();\n    }\n    if (utils.isObject(data)) {\n      setContentTypeIfUnset(headers, 'application/json;charset=utf-8');\n      return JSON.stringify(data);\n    }\n    return data;\n  }],\n\n  transformResponse: [function transformResponse(data) {\n    /*eslint no-param-reassign:0*/\n    if (typeof data === 'string') {\n      try {\n        data = JSON.parse(data);\n      } catch (e) { /* Ignore */ }\n    }\n    return data;\n  }],\n\n  /**\n   * A timeout in milliseconds to abort a request. If set to 0 (default) a\n   * timeout is not created.\n   */\n  timeout: 0,\n\n  xsrfCookieName: 'XSRF-TOKEN',\n  xsrfHeaderName: 'X-XSRF-TOKEN',\n\n  maxContentLength: -1,\n\n  validateStatus: function validateStatus(status) {\n    return status >= 200 && status < 300;\n  }\n};\n\ndefaults.headers = {\n  common: {\n    'Accept': 'application/json, text/plain, */*'\n  }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n  defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n  defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n","'use strict';\n\nvar utils = require('./../utils');\nvar transformData = require('./transformData');\nvar isCancel = require('../cancel/isCancel');\nvar defaults = require('../defaults');\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n  if (config.cancelToken) {\n    config.cancelToken.throwIfRequested();\n  }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n  throwIfCancellationRequested(config);\n\n  // Ensure headers exist\n  config.headers = config.headers || {};\n\n  // Transform request data\n  config.data = transformData(\n    config.data,\n    config.headers,\n    config.transformRequest\n  );\n\n  // Flatten headers\n  config.headers = utils.merge(\n    config.headers.common || {},\n    config.headers[config.method] || {},\n    config.headers\n  );\n\n  utils.forEach(\n    ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n    function cleanHeaderConfig(method) {\n      delete config.headers[method];\n    }\n  );\n\n  var adapter = config.adapter || defaults.adapter;\n\n  return adapter(config).then(function onAdapterResolution(response) {\n    throwIfCancellationRequested(config);\n\n    // Transform response data\n    response.data = transformData(\n      response.data,\n      response.headers,\n      config.transformResponse\n    );\n\n    return response;\n  }, function onAdapterRejection(reason) {\n    if (!isCancel(reason)) {\n      throwIfCancellationRequested(config);\n\n      // Transform response data\n      if (reason && reason.response) {\n        reason.response.data = transformData(\n          reason.response.data,\n          reason.response.headers,\n          config.transformResponse\n        );\n      }\n    }\n\n    return Promise.reject(reason);\n  });\n};\n","'use strict';\n\nvar utils = require('../utils');\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n * @returns {Object} New object resulting from merging config2 to config1\n */\nmodule.exports = function mergeConfig(config1, config2) {\n  // eslint-disable-next-line no-param-reassign\n  config2 = config2 || {};\n  var config = {};\n\n  var valueFromConfig2Keys = ['url', 'method', 'params', 'data'];\n  var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy'];\n  var defaultToConfig2Keys = [\n    'baseURL', 'url', 'transformRequest', 'transformResponse', 'paramsSerializer',\n    'timeout', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',\n    'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress',\n    'maxContentLength', 'validateStatus', 'maxRedirects', 'httpAgent',\n    'httpsAgent', 'cancelToken', 'socketPath'\n  ];\n\n  utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {\n    if (typeof config2[prop] !== 'undefined') {\n      config[prop] = config2[prop];\n    }\n  });\n\n  utils.forEach(mergeDeepPropertiesKeys, function mergeDeepProperties(prop) {\n    if (utils.isObject(config2[prop])) {\n      config[prop] = utils.deepMerge(config1[prop], config2[prop]);\n    } else if (typeof config2[prop] !== 'undefined') {\n      config[prop] = config2[prop];\n    } else if (utils.isObject(config1[prop])) {\n      config[prop] = utils.deepMerge(config1[prop]);\n    } else if (typeof config1[prop] !== 'undefined') {\n      config[prop] = config1[prop];\n    }\n  });\n\n  utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {\n    if (typeof config2[prop] !== 'undefined') {\n      config[prop] = config2[prop];\n    } else if (typeof config1[prop] !== 'undefined') {\n      config[prop] = config1[prop];\n    }\n  });\n\n  var axiosKeys = valueFromConfig2Keys\n    .concat(mergeDeepPropertiesKeys)\n    .concat(defaultToConfig2Keys);\n\n  var otherKeys = Object\n    .keys(config2)\n    .filter(function filterAxiosKeys(key) {\n      return axiosKeys.indexOf(key) === -1;\n    });\n\n  utils.forEach(otherKeys, function otherKeysDefaultToConfig2(prop) {\n    if (typeof config2[prop] !== 'undefined') {\n      config[prop] = config2[prop];\n    } else if (typeof config1[prop] !== 'undefined') {\n      config[prop] = config1[prop];\n    }\n  });\n\n  return config;\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar buildURL = require('../helpers/buildURL');\nvar InterceptorManager = require('./InterceptorManager');\nvar dispatchRequest = require('./dispatchRequest');\nvar mergeConfig = require('./mergeConfig');\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n  this.defaults = instanceConfig;\n  this.interceptors = {\n    request: new InterceptorManager(),\n    response: new InterceptorManager()\n  };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n  /*eslint no-param-reassign:0*/\n  // Allow for axios('example/url'[, config]) a la fetch API\n  if (typeof config === 'string') {\n    config = arguments[1] || {};\n    config.url = arguments[0];\n  } else {\n    config = config || {};\n  }\n\n  config = mergeConfig(this.defaults, config);\n\n  // Set config.method\n  if (config.method) {\n    config.method = config.method.toLowerCase();\n  } else if (this.defaults.method) {\n    config.method = this.defaults.method.toLowerCase();\n  } else {\n    config.method = 'get';\n  }\n\n  // Hook up interceptors middleware\n  var chain = [dispatchRequest, undefined];\n  var promise = Promise.resolve(config);\n\n  this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n    chain.unshift(interceptor.fulfilled, interceptor.rejected);\n  });\n\n  this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n    chain.push(interceptor.fulfilled, interceptor.rejected);\n  });\n\n  while (chain.length) {\n    promise = promise.then(chain.shift(), chain.shift());\n  }\n\n  return promise;\n};\n\nAxios.prototype.getUri = function getUri(config) {\n  config = mergeConfig(this.defaults, config);\n  return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\\?/, '');\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n  /*eslint func-names:0*/\n  Axios.prototype[method] = function(url, config) {\n    return this.request(utils.merge(config || {}, {\n      method: method,\n      url: url\n    }));\n  };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n  /*eslint func-names:0*/\n  Axios.prototype[method] = function(url, data, config) {\n    return this.request(utils.merge(config || {}, {\n      method: method,\n      url: url,\n      data: data\n    }));\n  };\n});\n\nmodule.exports = Axios;\n","'use strict';\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n  this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n  return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n","'use strict';\n\nvar Cancel = require('./Cancel');\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n  if (typeof executor !== 'function') {\n    throw new TypeError('executor must be a function.');\n  }\n\n  var resolvePromise;\n  this.promise = new Promise(function promiseExecutor(resolve) {\n    resolvePromise = resolve;\n  });\n\n  var token = this;\n  executor(function cancel(message) {\n    if (token.reason) {\n      // Cancellation has already been requested\n      return;\n    }\n\n    token.reason = new Cancel(message);\n    resolvePromise(token.reason);\n  });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n  if (this.reason) {\n    throw this.reason;\n  }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n  var cancel;\n  var token = new CancelToken(function executor(c) {\n    cancel = c;\n  });\n  return {\n    token: token,\n    cancel: cancel\n  };\n};\n\nmodule.exports = CancelToken;\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n *  ```js\n *  function f(x, y, z) {}\n *  var args = [1, 2, 3];\n *  f.apply(null, args);\n *  ```\n *\n * With `spread` this example can be re-written.\n *\n *  ```js\n *  spread(function(x, y, z) {})([1, 2, 3]);\n *  ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n  return function wrap(arr) {\n    return callback.apply(null, arr);\n  };\n};\n","'use strict';\n\nvar utils = require('./utils');\nvar bind = require('./helpers/bind');\nvar Axios = require('./core/Axios');\nvar mergeConfig = require('./core/mergeConfig');\nvar defaults = require('./defaults');\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n  var context = new Axios(defaultConfig);\n  var instance = bind(Axios.prototype.request, context);\n\n  // Copy axios.prototype to instance\n  utils.extend(instance, Axios.prototype, context);\n\n  // Copy context to instance\n  utils.extend(instance, context);\n\n  return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Factory for creating new instances\naxios.create = function create(instanceConfig) {\n  return createInstance(mergeConfig(axios.defaults, instanceConfig));\n};\n\n// Expose Cancel & CancelToken\naxios.Cancel = require('./cancel/Cancel');\naxios.CancelToken = require('./cancel/CancelToken');\naxios.isCancel = require('./cancel/isCancel');\n\n// Expose all/spread\naxios.all = function all(promises) {\n  return Promise.all(promises);\n};\naxios.spread = require('./helpers/spread');\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n","module.exports = require('./lib/axios');","import axios from 'axios';\nimport store from '@/store';\nimport debug from '@/debug';\n\nconst client = axios.create({\n  baseURL: document.settings.api_url,\n  withCredentials: true,\n  xsrfHeaderName: 'X-CSRFToken',\n  xsrfCookieName: 'csrftoken',\n  timeout: 30000,\n  headers: {\n    'X-Requested-With': 'XMLHttpRequest',\n  },\n});\n\nclient.interceptors.request.use(\n  (config) => {\n    config.headers.Authorization = store.getters['auth/token'];\n    return config;\n  },\n  (error) => {\n    return Promise.reject(error);\n  }\n);\n\n// throttle feature\nconst throttle = false;\nconst delayMs = 2000;\nconst wait = (ms) => {\n  return new Promise((resolve) => {\n    setTimeout(resolve, ms);\n  });\n};\nif (throttle === true) {\n  client.interceptors.response.use(\n    async (response) => {\n      await wait(delayMs);\n      return response;\n    },\n    (error) => {\n      console.error(error);\n      return Promise.reject(error);\n    }\n  );\n}\n\n// error handling\nfunction handleError(error) {\n  if (debug) {\n    if (error.response) {\n      // The request was made and the server responded with a status code\n      // that falls out of the range of 2xx\n      console.log(error.response.data);\n      console.log(error.response.status);\n      console.log(error.response.headers);\n    } else if (error.request) {\n      // `error.request` is an instance of XMLHttpRequest\n      console.log(error.request);\n    } else {\n      // Something happened in setting up the request that triggered an Error\n      console.log('Error', error.message);\n    }\n    console.log(error.config);\n  }\n  throw error;\n}\n\nexport { client, handleError };\n","import { client } from './client';\n\nconst Auth = {\n  async login(data, resolve, reject) {\n    client\n      .post('token/', data)\n      .then((response) => {\n        resolve(response.data);\n      })\n      .catch((error) => {\n        reject(error);\n      });\n  },\n};\n\nexport default Auth;\n","/* eslint-disable no-shadow */\nimport Auth from '@/api/auth';\n\nimport debug from '@/debug';\n\nconst state = {\n  token: null,\n};\nconst getters = {\n  authenticated: (state) => {\n    return state.token !== null;\n  },\n  token: (state) => {\n    return state.token;\n  },\n};\nconst actions = {\n  login(context, data) {\n    return new Promise((resolve, reject) => {\n      Auth.login(\n        data,\n        (token) => {\n          const accessToken = `Bearer ${token.access}`;\n          // commit to store\n          context.commit('authenticate', accessToken);\n          resolve(token);\n        },\n        (error) => {\n          if (debug) {\n            console.log('error', error);\n          }\n          reject(error);\n        }\n      );\n    });\n  },\n  logout(context) {\n    context.commit('logout');\n  },\n};\nconst mutations = {\n  authenticate(state, token) {\n    state.token = token;\n  },\n  logout(state) {\n    state.token = null;\n  },\n};\n\nexport default {\n  namespaced: true,\n  state,\n  getters,\n  actions,\n  mutations,\n};\n","/* eslint-disable no-shadow */\nconst PAUSED = 0;\nconst PLAYING = 1;\n\nconst ZOOM_LEVEL_MIN_SECONDS = 10;\nconst ZOOM_LEVEL_MAX_SECONDS = 60 * 60;\nconst ZOOM_LEVEL_INITIAL_SECONDS = 10 * 60;\n\nconst state = {\n  audioState: PAUSED,\n  zoomLevel: ZOOM_LEVEL_INITIAL_SECONDS,\n  offsetSeconds: 0,\n  seek: null,\n  waveformEnabled: true,\n  spectrogramEnabled: true,\n};\nconst getters = {\n  isPlaying: (state) => {\n    return state.audioState === PLAYING;\n  },\n  zoomLevel: (state) => {\n    return state.zoomLevel;\n  },\n  offsetSeconds: (state) => {\n    return state.offsetSeconds;\n  },\n  doSeek: (state) => {\n    return state.seek;\n  },\n  waveformEnabled: (state) => {\n    return state.waveformEnabled;\n  },\n  spectrogramEnabled: (state) => {\n    return state.spectrogramEnabled;\n  },\n};\nconst actions = {\n  playPause(context) {\n    if (context.state.audioState === PLAYING) {\n      context.commit('setAudioState', PAUSED);\n    } else if (context.state.audioState === PAUSED) {\n      context.commit('setAudioState', PLAYING);\n    }\n  },\n  play(context) {\n    context.commit('setAudioState', PLAYING);\n  },\n  pause(context) {\n    context.commit('setAudioState', PAUSED);\n  },\n  toggleWaveform(context) {\n    context.commit('toggleWaveform');\n  },\n  toggleSpectrogram(context) {\n    context.commit('toggleSpectrogram');\n  },\n};\nconst mutations = {\n  setAudioState(state, audioState) {\n    state.audioState = audioState;\n  },\n  zoom(state, direction) {\n    state.zoomLevel -= direction;\n    state.zoomLevel = Math.min(\n      Math.max(state.zoomLevel, ZOOM_LEVEL_MIN_SECONDS),\n      ZOOM_LEVEL_MAX_SECONDS\n    );\n  },\n  setOffsetSeconds(state, seconds) {\n    state.offsetSeconds = seconds;\n  },\n  doSeek(state, seconds) {\n    state.seek = seconds;\n  },\n  toggleWaveform(state) {\n    state.waveformEnabled = !state.waveformEnabled;\n  },\n  toggleSpectrogram(state) {\n    state.spectrogramEnabled = !state.spectrogramEnabled;\n  },\n};\n\nexport default {\n  namespaced: true,\n  state,\n  getters,\n  actions,\n  mutations,\n};\n","import { client, handleError } from './client';\n\nconst Annotation = {\n  async forAudio(uuid, params) {\n    try {\n      const response = await client.get(`archive/audio/${uuid}/annotation/`, {\n        params,\n      });\n      return response.data;\n    } catch (error) {\n      return handleError(error);\n    }\n  },\n  async filter(params) {\n    try {\n      const response = await client.get('archive/annotation/', {\n        params,\n      });\n      return response.data.results;\n    } catch (error) {\n      return handleError(error);\n    }\n  },\n  async detail(uuid, params) {\n    try {\n      const response = await client.get(`archive/annotation/${uuid}/`, {\n        params,\n      });\n      return response.data;\n    } catch (error) {\n      return handleError(error);\n    }\n  },\n  async detailFromUrl(url, params) {\n    try {\n      const response = await client.get(`${url}`, {\n        params,\n      });\n      return response.data;\n    } catch (error) {\n      return handleError(error);\n    }\n  },\n  async save(data, uuid = null) {\n    try {\n      let response = null;\n      if (uuid !== null) {\n        response = await client.put(`archive/annotation/${uuid}/`, data);\n      } else {\n        response = await client.post(`archive/annotation/`, data);\n      }\n      return response.data;\n    } catch (error) {\n      return handleError(error);\n    }\n  },\n  async delete(uuid, params = {}) {\n    try {\n      const response = await client.delete(`archive/annotation/${uuid}/`, {\n        params,\n      });\n      return response.data;\n    } catch (error) {\n      return handleError(error);\n    }\n  },\n};\n\nconst Recording = {\n  // list\n  async filter(params) {\n    try {\n      const response = await client.get('archive/recording/', {\n        params,\n      });\n      return response.data.results;\n    } catch (error) {\n      return handleError(error);\n    }\n  },\n  // list\n  async annotation(params) {\n    try {\n      const response = await client.get('archive/recording/annotation/', {\n        params,\n      });\n      return response.data;\n    } catch (error) {\n      return handleError(error);\n    }\n  },\n  // detail\n  async detail(uuid, params) {\n    try {\n      const response = await client.get(`archive/recording/${uuid}/`, {\n        params,\n      });\n      return response.data;\n    } catch (error) {\n      return handleError(error);\n    }\n  },\n  async detailFomUrl(url) {\n    try {\n      const response = await client.get(`${url}`);\n      return response.data;\n    } catch (error) {\n      return handleError(error);\n    }\n  },\n  // actions\n  async dates(params) {\n    try {\n      const response = await client.get('archive/recording/dates/', {\n        params,\n      });\n      return response.data;\n    } catch (error) {\n      return handleError(error);\n    }\n  },\n  async spectrogram(params) {\n    try {\n      const response = await client.get('archive/recording/spectrogram/', {\n        params,\n      });\n      return response.data;\n    } catch (error) {\n      return handleError(error);\n    }\n  },\n  async signals(params) {\n    try {\n      const response = await client.get('archive/recording/signals/', {\n        params,\n      });\n      return response.data;\n    } catch (error) {\n      return handleError(error);\n    }\n  },\n};\n\nexport { Annotation, Recording };\n","/* eslint-disable no-shadow */\nimport { Annotation } from '@/api/archive';\n\nconst state = {\n  annotations: [],\n  currentAnnotation: null,\n  segments: [], // LIFO\n  visibleSegmentUuid: null,\n  editor: null,\n};\nconst getters = {\n  annotations: (state) => {\n    return state.annotations;\n  },\n  currentAnnotation: (state) => {\n    if (state.segments.length === 0) {\n      return null;\n    }\n    const { uuid } = state.segments.at(-1);\n    const filtered = state.annotations.filter((a) => a.uuid === uuid);\n    if (filtered.length > 0) {\n      return filtered[0];\n    }\n    return null;\n  },\n  editor: (state) => {\n    return state.editor;\n  },\n};\nconst actions = {\n  async fetchAnnotations({ commit }, audioUuid) {\n    const annotations = await Annotation.forAudio(audioUuid);\n    commit('setAnnotations', { annotations });\n  },\n  // eslint-disable-next-line no-unused-vars\n  async saveAnnotation({ commit, state }, { content, categories, keywords }) {\n    const data = {\n      content,\n      categories,\n      keywords,\n      start: state.editor.start,\n      end: state.editor.end,\n      audio: state.editor.audio,\n    };\n    let { uuid } = state.editor;\n    if (uuid === 'NEW_ITEM') {\n      uuid = null;\n    }\n    return Annotation.save(data, uuid);\n  },\n  // eslint-disable-next-line no-unused-vars\n  async deleteAnnotation({ commit, state }) {\n    return Annotation.delete(state.editor.uuid);\n  },\n};\nconst mutations = {\n  setAnnotations(state, { annotations }) {\n    state.annotations = annotations;\n  },\n  resetSegments(state) {\n    state.segments = [];\n  },\n  addSegment(state, value) {\n    state.segments.push(value);\n  },\n  removeSegment(state, value) {\n    state.segments = state.segments.filter((s) => s.uuid !== value.uuid);\n  },\n  // editor\n  onSegmentDragEnd(state, ev) {\n    state.editor.start = ev.segment.startTime;\n    state.editor.end = ev.segment.endTime;\n  },\n  resetEditor(state) {\n    state.editor = null;\n  },\n  setEditor(\n    state,\n    {\n      uuid = null,\n      audio = null,\n      content = '',\n      categories = null,\n      keywords = null,\n      start = null,\n      end = null,\n    }\n  ) {\n    if (state.editor === null) {\n      state.editor = {};\n    }\n    state.editor.uuid = uuid;\n    state.editor.audio = audio;\n    state.editor.content = content;\n    state.editor.categories = categories;\n    state.editor.keywords = keywords;\n    state.editor.start = start;\n    state.editor.end = end;\n  },\n};\n\nexport default {\n  namespaced: true,\n  state,\n  getters,\n  actions,\n  mutations,\n};\n","/* eslint-disable no-shadow */\n// stereometry download cart\n\nconst state = {\n  thumbnails: [],\n};\n\nconst getters = {\n  thumbnails: (state) => state.thumbnails,\n};\n\nconst actions = {\n  addThumbnail: ({ commit }, thumbnail) => {\n    commit('pushThumbnail', thumbnail);\n  },\n  removeThumbnail: ({ commit }, thumbnail) => {\n    commit('removeThumbnail', thumbnail);\n  },\n  removeAllThumbnails: ({ commit }) => {\n    commit('removeAllThumbnails');\n  },\n};\n\nconst mutations = {\n  pushThumbnail: (state, id) => {\n    if (!state.thumbnails.includes(id)) {\n      state.thumbnails.push(id);\n    }\n  },\n  removeThumbnail: (state, id) => {\n    state.thumbnails = state.thumbnails.filter((item) => item !== id);\n  },\n  removeAllThumbnails: (state) => {\n    state.thumbnails = [];\n  },\n};\n\nexport default {\n  namespaced: true,\n  state,\n  getters,\n  actions,\n  mutations,\n};\n","/* eslint-disable no-shadow */\nconst state = {\n  mouseover: null,\n  cursor: null,\n};\nconst getters = {\n  mouseover: (state) => {\n    return state.mouseover;\n  },\n  cursor: (state) => {\n    return state.cursor;\n  },\n};\nconst mutations = {\n  mouseover(state, value) {\n    state.mouseover = value;\n  },\n  cursor(state, value) {\n    state.cursor = value;\n  },\n};\n\nexport default {\n  namespaced: true,\n  state,\n  getters,\n  mutations,\n};\n","import { createStore } from 'vuex';\n\nimport debug from '@/debug';\nimport auth from './modules/auth';\nimport player from './modules/player';\nimport annotation from './modules/annotation';\nimport stereometry from './modules/stereometry';\nimport monthview from './modules/monthview';\n\nexport default createStore({\n  modules: {\n    auth,\n    player,\n    annotation,\n    stereometry,\n    monthview,\n  },\n  mutations: {\n    initialiseStore(state) {\n      // Replace the state object with the stored item\n      if (localStorage.getItem('store')) {\n        if (debug) {\n          console.log('initialize store');\n        }\n        const cached = JSON.parse(localStorage.getItem('store'));\n        this.replaceState(Object.assign(state, cached));\n        if (debug) {\n          console.log('initialized store', this.state);\n        }\n      }\n    },\n  },\n  strict: debug,\n});\n","\nexport 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","<template>\n  <svg xmlns=\"http://www.w3.org/2000/svg\"\n       width=\"540pt\"\n       height=\"106.56pt\"\n  >\n    <title>{{title}}</title>\n    <g id=\"layer1\" transform=\"matrix(0.72 0 0 0.72 839.986344 -131.0444352)\" fill=\"none\">\n      <g id=\"g5970\" transform=\"matrix(2.0922972 0 0 2.0922972 6641.3571 3129.071)\" fill=\"none\">\n        <path id=\"path4374\" transform=\"translate(-3426.5179, -1389.6021)\" fill=\"none\" stroke=\"#ffffff\"\n              stroke-width=\"1.16058433\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M0 0L0 7.8571\"/>\n        <path id=\"path4376\" transform=\"translate(-3424.9108, -1389.6021)\" fill=\"none\" stroke=\"#ffffff\"\n              stroke-width=\"1.16058433\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M0 0L0 7.8571\"/>\n        <path id=\"path4378\" transform=\"translate(-3423.0804, -1389.6021)\" fill=\"none\" stroke=\"#ffffff\"\n              stroke-width=\"1.16058433\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M0 0L0 7.8571\"/>\n        <path id=\"path4380\" transform=\"translate(-3421.4733, -1389.6021)\" fill=\"none\" stroke=\"#ffffff\"\n              stroke-width=\"1.16058433\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M0 0L0 7.8571\"/>\n        <path id=\"path4382\" transform=\"translate(-3419.7322, -1389.6021)\" fill=\"none\" stroke=\"#ffffff\"\n              stroke-width=\"1.16058433\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M0 0L0 7.8571\"/>\n        <path id=\"path4384\" transform=\"translate(-3418.1251, -1389.6021)\" fill=\"none\" stroke=\"#ffffff\"\n              stroke-width=\"1.16058433\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M0 0L0 7.8571\"/>\n        <path id=\"path4386\" transform=\"translate(-3416.2947, -1389.6021)\" fill=\"none\" stroke=\"#ffffff\"\n              stroke-width=\"1.16058433\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M0 0L0 7.8571\"/>\n        <path id=\"path4388\" transform=\"translate(-3414.6876, -1389.6021)\" fill=\"none\" stroke=\"#ffffff\"\n              stroke-width=\"1.16058433\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M0 0L0 7.8571\"/>\n        <path id=\"path4390\" transform=\"translate(-3412.8572, -1391.8342)\" fill=\"none\" stroke=\"#ffffff\"\n              stroke-width=\"1.16058433\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M0 0L0 7.8571\"/>\n        <path id=\"path4392\" transform=\"translate(-3411.2501, -1391.8342)\" fill=\"none\" stroke=\"#ffffff\"\n              stroke-width=\"1.16058433\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M0 0L0 7.8571\"/>\n        <path id=\"path4394\" transform=\"translate(-3409.4197, -1391.8342)\" fill=\"none\" stroke=\"#ffffff\"\n              stroke-width=\"1.16058433\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M0 0L0 7.8571\"/>\n        <path id=\"path4396\" transform=\"translate(-3407.8126, -1391.8342)\" fill=\"none\" stroke=\"#ffffff\"\n              stroke-width=\"1.16058433\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M0 0L0 7.8571\"/>\n        <path id=\"path4398\" transform=\"translate(-3406.0715, -1391.8342)\" fill=\"none\" stroke=\"#ffffff\"\n              stroke-width=\"1.16058433\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M0 0L0 7.8571\"/>\n        <path id=\"path4400\" transform=\"translate(-3404.4644, -1391.8342)\" fill=\"none\" stroke=\"#ffffff\"\n              stroke-width=\"1.16058433\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M0 0L0 7.8571\"/>\n        <path id=\"path4402\" transform=\"translate(-3402.634, -1391.8342)\" fill=\"none\" stroke=\"#ffffff\"\n              stroke-width=\"1.16058433\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M0 0L0 7.8571\"/>\n        <path id=\"path4404\" transform=\"translate(-3401.0269, -1391.8342)\" fill=\"none\" stroke=\"#ffffff\"\n              stroke-width=\"1.16058433\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M0 0L0 7.8571\"/>\n        <path id=\"path4406\" transform=\"translate(-3399.4643, -1392.7271)\" fill=\"none\" stroke=\"#ffffff\"\n              stroke-width=\"1.16058433\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M0 0L0 7.8571\"/>\n        <path id=\"path4408\" transform=\"translate(-3397.8572, -1392.7271)\" fill=\"none\" stroke=\"#ffffff\"\n              stroke-width=\"1.16058433\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M0 0L0 7.8571\"/>\n        <path id=\"path4410\" transform=\"translate(-3396.0268, -1392.7271)\" fill=\"none\" stroke=\"#ffffff\"\n              stroke-width=\"1.16058433\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M0 0L0 7.8571\"/>\n        <path id=\"path4412\" transform=\"translate(-3394.4197, -1392.7271)\" fill=\"none\" stroke=\"#ffffff\"\n              stroke-width=\"1.16058433\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M0 0L0 7.8571\"/>\n        <path id=\"path4414\" transform=\"translate(-3392.6786, -1392.7271)\" fill=\"none\" stroke=\"#ffffff\"\n              stroke-width=\"1.16058433\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M0 0L0 7.8571\"/>\n        <path id=\"path4416\" transform=\"translate(-3391.0715, -1392.7271)\" fill=\"none\" stroke=\"#ffffff\"\n              stroke-width=\"1.16058433\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M0 0L0 7.8571\"/>\n        <path id=\"path4418\" transform=\"translate(-3389.2411, -1392.7271)\" fill=\"none\" stroke=\"#ffffff\"\n              stroke-width=\"1.16058433\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M0 0L0 7.8571\"/>\n        <path id=\"path4420\" transform=\"translate(-3387.634, -1392.7271)\" fill=\"none\" stroke=\"#ffffff\"\n              stroke-width=\"1.16058433\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M0 0L0 7.8571\"/>\n        <path id=\"path4422\" transform=\"translate(-3385.8929, -1394.3342)\" fill=\"none\" stroke=\"#ffffff\"\n              stroke-width=\"1.16058433\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M0 0L0 7.8571\"/>\n        <path id=\"path4424\" transform=\"translate(-3384.2858, -1394.3342)\" fill=\"none\" stroke=\"#ffffff\"\n              stroke-width=\"1.16058433\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M0 0L0 7.8571\"/>\n        <path id=\"path4426\" transform=\"translate(-3382.4554, -1394.3342)\" fill=\"none\" stroke=\"#ffffff\"\n              stroke-width=\"1.16058433\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M0 0L0 7.8571\"/>\n        <path id=\"path4428\" transform=\"translate(-3380.8483, -1394.3342)\" fill=\"none\" stroke=\"#ffffff\"\n              stroke-width=\"1.16058433\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M0 0L0 7.8571\"/>\n        <path id=\"path4430\" transform=\"translate(-3379.1072, -1394.7133)\" fill=\"none\" stroke=\"#ffffff\"\n              stroke-width=\"1.1866163\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M0 0L0 8.2135\"/>\n        <path id=\"path4432\" transform=\"translate(-3377.634, -1395.1565)\" fill=\"none\" stroke=\"#ffffff\"\n              stroke-width=\"1.23977876\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M0 0L0 8.9659\"/>\n        <path id=\"path4358\" transform=\"translate(-3731.7857, -1408.5307)\" :fill=\"color\" stroke=\"#000000\"\n              stroke-opacity=\"0\" stroke-width=\"0\" stroke-linecap=\"square\" stroke-linejoin=\"bevel\"\n              d=\"M0 35C0 35 5.9375 32.1391 8.3928 30C11.8413 26.9957 13.4433 22.2048 16.9643 19.2857C18.6247 17.9091 22.6785 16.25 22.6785 16.25C22.6785 16.25 22.2078 13.4724 22.8571 11.7857C24.1994 8.2988 28.2841 8.1951 30.7143 5.3572C31.9653 3.8964 32.8571 0 32.8571 0C46.6584 4.2732 57.1088 9.3669 47.8571 19.2857C47.8571 19.2857 57.8741 19.523 62.8571 19.1072C72.1023 18.3358 81.129 15.7755 90.3571 14.8215C106.483 13.1544 122.773 13.6705 138.929 12.3215C153.379 11.1149 167.69 8.5051 182.143 7.3215C199.367 5.9109 216.648 4.6404 233.929 4.8215C245.981 4.9478 259.463 6.6417 271.515 6.6902C283.204 6.7372 292.078 4.7307 303.75 5.3572C315.808 6.0044 328.747 9.6364 340.714 11.25C345.457 11.8895 355 12.6786 355 12.6786C355 12.6786 347.335 16.3253 343.214 17.1429C336.322 18.5105 329.099 16.7758 322.143 17.7679C316.39 18.5883 310.824 20.4421 305.268 22.1429C302.369 23.03 296.696 25.1786 296.696 25.1786C296.696 25.1786 304.565 23.3191 308.571 22.8572C312.625 22.39 316.745 22.8294 320.803 22.4107C323.266 22.1567 325.654 21.1312 328.125 20.9821C333.627 20.6502 340.004 21.7386 344.643 21.9643C345.178 21.9903 358.036 18.125 358.036 18.125C358.036 18.125 358.768 20.9411 358.303 22.2322C356.644 26.8485 352.207 30.0961 348.214 32.9464C338.512 39.8732 326.957 43.9758 315.625 47.6786C301.316 52.3543 286.34 54.9004 271.428 56.9643C243.652 60.8087 215.536 63.2253 187.5 62.6786C169.663 62.3308 151.644 61.0813 134.286 56.9643C128.348 55.5559 123.053 52.0551 117.143 50.5357C97.9183 45.594 77.2347 47.6415 58.2143 41.9643C50.9162 39.786 37.5 32.3215 37.5 32.3215C15.4493 44.969 7.4177 38.3293 0 35Z\"/>\n        <path id=\"path4360\" transform=\"translate(-3508.75, -1385.495)\" fill=\"none\" stroke=\"#ffffff\"\n              stroke-width=\"1.16058433\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\n              d=\"M0 30.3571C46.7242 28.4224 85.8005 26.7723 107.5 0\"/>\n        <path id=\"path4362\" transform=\"translate(-3511.7857, -1385.1378)\" fill=\"none\" stroke=\"#ffffff\"\n              stroke-width=\"1.16058433\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\n              d=\"M0 32.8571C56.012 29.8906 101.958 25.254 120.893 0\"/>\n        <path id=\"path4364\" transform=\"translate(-3512.3214, -1386.745)\" fill=\"none\" stroke=\"#ffffff\"\n              stroke-width=\"1.16058433\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\n              d=\"M0 38.0357C41.4562 35.6821 106.374 35.8977 131.607 0\"/>\n        <path id=\"path4366\" transform=\"translate(-3499.1072, -1384.0664)\" fill=\"none\" stroke=\"#ffffff\"\n              stroke-width=\"1.16058433\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\n              d=\"M0 24.6428C37.183 23.515 67.1192 23.0154 85.5357 0\"/>\n        <path id=\"path4368\" transform=\"translate(-3491.9643, -1383.5307)\" fill=\"none\" stroke=\"#ffffff\"\n              stroke-width=\"1.16058433\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\n              d=\"M0 19.8214C10.9631 18.7529 53.5545 22.2073 68.3929 0\"/>\n        <path id=\"path4370\" transform=\"translate(-3483.5714, -1383.3521)\" fill=\"none\" stroke=\"#ffffff\"\n              stroke-width=\"1.16058433\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\n              d=\"M0 15.8929C10.4241 15.2348 42.0136 17.0756 52.3214 0\"/>\n        <path id=\"path4372\" transform=\"translate(-3478.63552515011, -1375.495)\" :fill=\"color\" stroke=\"#ffffff\"\n              stroke-width=\"1.16058433\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\n              d=\"M15.2426 0.3572C15.2426 0.3572 2.99173 5.5166 0.599825 11.0715C-1.27477 15.425 1.78933 20.4764 2.38553 25.1786C2.86103 28.9287 0.351525 34.9122 3.81413 36.4286C8.70103 38.5687 13.7332 31.4728 16.8498 27.1429C19.8308 23.0014 19.5686 17.2949 21.3141 12.5C22.3541 9.6431 22.5476 6.0509 24.8855 4.1072C25.7295 3.4055 27.413 4.2491 28.0998 3.3929C28.8075 2.5107 28.0998 0 28.0998 0\"/>\n        <path id=\"path4438\" transform=\"translate(-3436.8751144, -1388.8878)\" sodipodi:type=\"arc\" sodipodi:rx=\"3.0357144\"\n              sodipodi:ry=\"1.25\" sodipodi:cx=\"3.0357144\" sodipodi:cy=\"1.25\" sodipodi:start=\"0\" sodipodi:end=\"0\"\n              d=\"M6.07143 1.25C6.07143 0.559644 4.71229 -1.06841e-17 3.03571 -2.22045e-16C1.35914 -4.33405e-16 6.15965e-16 0.559644 0 1.25C-6.15965e-16 1.94036 1.35914 2.5 3.03571 2.5C4.71229 2.5 6.07143 1.94036 6.07143 1.25L3.03571 1.25Z\"\n              fill=\"#000000\" stroke=\"#000000\" stroke-opacity=\"0\" stroke-width=\"0\" stroke-linecap=\"square\"\n              stroke-linejoin=\"bevel\"/>\n      </g>\n    </g>\n  </svg>\n\n</template>\n\n<script>\nexport default {\n  props: {\n    title: {\n      type: String,\n      default: 'Whale',\n    },\n    color: {\n      type: String,\n      default: '#bbffbb',\n    }\n  },\n};\n</script>","/* eslint-disable @typescript-eslint/restrict-template-expressions */\n/* eslint-disable @typescript-eslint/strict-boolean-expressions */\nfunction plugin(options) {\n    let _bPrefix = '.';\n    let _ePrefix = '__';\n    let _mPrefix = '--';\n    let c;\n    if (options) {\n        let t = options.blockPrefix;\n        if (t) {\n            _bPrefix = t;\n        }\n        t = options.elementPrefix;\n        if (t) {\n            _ePrefix = t;\n        }\n        t = options.modifierPrefix;\n        if (t) {\n            _mPrefix = t;\n        }\n    }\n    const _plugin = {\n        install(instance) {\n            c = instance.c;\n            const ctx = instance.context;\n            ctx.bem = {};\n            ctx.bem.b = null;\n            ctx.bem.els = null;\n        }\n    };\n    function b(arg) {\n        let memorizedB;\n        let memorizedE;\n        return {\n            before(ctx) {\n                memorizedB = ctx.bem.b;\n                memorizedE = ctx.bem.els;\n                ctx.bem.els = null;\n            },\n            after(ctx) {\n                ctx.bem.b = memorizedB;\n                ctx.bem.els = memorizedE;\n            },\n            $({ context, props }) {\n                arg = typeof arg === 'string' ? arg : arg({ context, props });\n                context.bem.b = arg;\n                return `${(props === null || props === void 0 ? void 0 : props.bPrefix) || _bPrefix}${context.bem.b}`;\n            }\n        };\n    }\n    function e(arg) {\n        let memorizedE;\n        return {\n            before(ctx) {\n                memorizedE = ctx.bem.els;\n            },\n            after(ctx) {\n                ctx.bem.els = memorizedE;\n            },\n            $({ context, props }) {\n                arg = typeof arg === 'string' ? arg : arg({ context, props });\n                context.bem.els = arg.split(',').map(v => v.trim());\n                return context.bem.els\n                    .map(el => `${(props === null || props === void 0 ? void 0 : props.bPrefix) || _bPrefix}${context.bem.b}${_ePrefix}${el}`).join(', ');\n            }\n        };\n    }\n    function m(arg) {\n        return {\n            $({ context, props }) {\n                arg = typeof arg === 'string' ? arg : arg({ context, props });\n                const modifiers = arg.split(',').map(v => v.trim());\n                function elementToSelector(el) {\n                    return modifiers.map(modifier => `&${(props === null || props === void 0 ? void 0 : props.bPrefix) || _bPrefix}${context.bem.b}${el !== undefined ? `${_ePrefix}${el}` : ''}${_mPrefix}${modifier}`).join(', ');\n                }\n                const els = context.bem.els;\n                if (els !== null) {\n                    if (process.env.NODE_ENV !== 'production' && els.length >= 2) {\n                        throw Error(`[css-render/plugin-bem]: m(${arg}) is invalid, using modifier inside multiple elements is not allowed`);\n                    }\n                    return elementToSelector(els[0]);\n                }\n                else {\n                    return elementToSelector();\n                }\n            }\n        };\n    }\n    function notM(arg) {\n        return {\n            $({ context, props }) {\n                arg = typeof arg === 'string' ? arg : arg({ context, props });\n                const els = context.bem.els;\n                if (process.env.NODE_ENV !== 'production' && els !== null && els.length >= 2) {\n                    throw Error(`[css-render/plugin-bem]: notM(${arg}) is invalid, using modifier inside multiple elements is not allowed`);\n                }\n                return `&:not(${(props === null || props === void 0 ? void 0 : props.bPrefix) || _bPrefix}${context.bem.b}${(els !== null && els.length > 0) ? `${_ePrefix}${els[0]}` : ''}${_mPrefix}${arg})`;\n            }\n        };\n    }\n    const cB = ((...args) => c(b(args[0]), args[1], args[2]));\n    const cE = ((...args) => c(e(args[0]), args[1], args[2]));\n    const cM = ((...args) => c(m(args[0]), args[1], args[2]));\n    const cNotM = ((...args) => c(notM(args[0]), args[1], args[2]));\n    Object.assign(_plugin, {\n        cB, cE, cM, cNotM\n    });\n    return _plugin;\n}\nexport { plugin };\nexport default plugin;\n","function ampCount(selector) {\n    let cnt = 0;\n    for (let i = 0; i < selector.length; ++i) {\n        if (selector[i] === '&')\n            ++cnt;\n    }\n    return cnt;\n}\n/**\n * Don't just use ',' to separate css selector. For example:\n * x:(a, b) {} will be split into 'x:(a' and 'b)', which is not expected.\n * Make sure comma doesn't exist inside parentheses.\n */\nconst separatorRegex = /\\s*,(?![^(]*\\))\\s*/g;\nconst extraSpaceRegex = /\\s+/g;\n/**\n * selector must includes '&'\n * selector is trimmed\n * every part of amp is trimmed\n */\nfunction resolveSelectorWithAmp(amp, selector) {\n    const nextAmp = [];\n    selector.split(separatorRegex).forEach(partialSelector => {\n        let round = ampCount(partialSelector);\n        // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n        if (!round) {\n            amp.forEach(partialAmp => {\n                nextAmp.push(\n                // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n                (partialAmp && partialAmp + ' ') + partialSelector);\n            });\n            return;\n        }\n        else if (round === 1) {\n            amp.forEach(partialAmp => {\n                nextAmp.push(partialSelector.replace('&', partialAmp));\n            });\n            return;\n        }\n        let partialNextAmp = [\n            partialSelector\n        ];\n        // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n        while (round--) {\n            const nextPartialNextAmp = [];\n            partialNextAmp.forEach(selectorItr => {\n                amp.forEach(partialAmp => {\n                    nextPartialNextAmp.push(selectorItr.replace('&', partialAmp));\n                });\n            });\n            partialNextAmp = nextPartialNextAmp;\n        }\n        partialNextAmp.forEach(part => nextAmp.push(part));\n    });\n    return nextAmp;\n}\n/**\n * selector mustn't includes '&'\n * selector is trimmed\n */\nfunction resolveSelector(amp, selector) {\n    const nextAmp = [];\n    selector.split(separatorRegex).forEach(partialSelector => {\n        amp.forEach(partialAmp => {\n            // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n            nextAmp.push(((partialAmp && partialAmp + ' ') + partialSelector));\n        });\n    });\n    return nextAmp;\n}\nexport function parseSelectorPath(selectorPaths) {\n    let amp = [''];\n    selectorPaths.forEach(selector => {\n        // eslint-disable-next-line\n        selector = selector && selector.trim();\n        if (\n        // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n        !selector) {\n            /**\n             * if it's a empty selector, do nothing\n             */\n            return;\n        }\n        // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n        if (selector.includes('&')) {\n            amp = resolveSelectorWithAmp(amp, selector);\n        }\n        else {\n            amp = resolveSelector(amp, selector);\n        }\n    });\n    return amp.join(', ').replace(extraSpaceRegex, ' ');\n}\n","export function removeElement(el) {\n    /* istanbul ignore if */\n    // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n    if (!el)\n        return;\n    const parentElement = el.parentElement;\n    /* istanbul ignore else */\n    // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n    if (parentElement)\n        parentElement.removeChild(el);\n}\nexport function queryElement(id, parent) {\n    return (parent !== null && parent !== void 0 ? parent : document.head).querySelector(`style[cssr-id=\"${id}\"]`);\n}\nexport function createElement(id) {\n    const el = document.createElement('style');\n    el.setAttribute('cssr-id', id);\n    return el;\n}\nexport function isMediaOrSupports(selector) {\n    // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n    if (!selector)\n        return false;\n    return /^\\s*@(s|m)/.test(selector);\n}\n","import { parseSelectorPath } from './parse';\nimport { isMediaOrSupports } from './utils';\nconst kebabRegex = /[A-Z]/g;\nfunction kebabCase(pattern) {\n    return pattern.replace(kebabRegex, match => '-' + match.toLowerCase());\n}\n/** TODO: refine it to solve nested object */\nfunction unwrapProperty(prop, indent = '  ') {\n    if (typeof prop === 'object' && prop !== null) {\n        return (' {\\n' +\n            Object.entries(prop).map(v => {\n                return indent + `  ${kebabCase(v[0])}: ${v[1]};`;\n            }).join('\\n') +\n            '\\n' + indent + '}');\n    }\n    return `: ${prop};`;\n}\n/** unwrap properties */\nfunction unwrapProperties(props, instance, params) {\n    if (typeof props === 'function') {\n        return props({\n            context: instance.context,\n            props: params\n        });\n    }\n    return props;\n}\nfunction createStyle(selector, props, instance, params) {\n    if (!props)\n        return '';\n    // eslint-disable-next-line\n    const unwrappedProps = unwrapProperties(props, instance, params);\n    if (!unwrappedProps)\n        return '';\n    if (typeof unwrappedProps === 'string') {\n        return `${selector} {\\n${unwrappedProps}\\n}`;\n    }\n    const propertyNames = Object.keys(unwrappedProps);\n    if (propertyNames.length === 0) {\n        if (instance.config.keepEmptyBlock)\n            return selector + ' {\\n}';\n        return '';\n    }\n    const statements = selector\n        ? [\n            selector + ' {'\n        ]\n        : [];\n    propertyNames.forEach(propertyName => {\n        const property = unwrappedProps[propertyName];\n        if (propertyName === 'raw') {\n            statements.push('\\n' + property + '\\n');\n            return;\n        }\n        propertyName = kebabCase(propertyName);\n        if (property !== null && property !== undefined) {\n            statements.push(`  ${propertyName}${unwrapProperty(property)}`);\n        }\n    });\n    if (selector) {\n        statements.push('}');\n    }\n    return statements.join('\\n');\n}\nfunction loopCNodeListWithCallback(children, options, callback) {\n    /* istanbul ignore if */\n    if (!children)\n        return;\n    children.forEach(child => {\n        if (Array.isArray(child)) {\n            loopCNodeListWithCallback(child, options, callback);\n        }\n        else if (typeof child === 'function') {\n            const grandChildren = child(options);\n            if (Array.isArray(grandChildren)) {\n                loopCNodeListWithCallback(grandChildren, options, callback);\n            }\n            else if (grandChildren) {\n                callback(grandChildren);\n            }\n        }\n        else if (child) {\n            callback(child);\n        }\n    });\n}\nfunction traverseCNode(node, selectorPaths, styles, instance, params) {\n    const $ = node.$;\n    let blockSelector = '';\n    if (!$ || typeof $ === 'string') {\n        if (isMediaOrSupports($)) {\n            blockSelector = $;\n        }\n        else {\n            // as a string selector\n            selectorPaths.push($);\n        }\n    }\n    else if (typeof $ === 'function') {\n        const selector = $({\n            context: instance.context,\n            props: params\n        });\n        if (isMediaOrSupports(selector)) {\n            blockSelector = selector;\n        }\n        else {\n            // as a lazy selector\n            selectorPaths.push(selector);\n        }\n    }\n    else { // as a option selector\n        if ($.before)\n            $.before(instance.context);\n        if (!$.$ || typeof $.$ === 'string') {\n            if (isMediaOrSupports($.$)) {\n                blockSelector = $.$;\n            }\n            else {\n                // as a string selector\n                selectorPaths.push($.$);\n            }\n        }\n        else /* istanbul ignore else */ if ($.$) {\n            const selector = $.$({\n                context: instance.context,\n                props: params\n            });\n            if (isMediaOrSupports(selector)) {\n                blockSelector = selector;\n            }\n            else {\n                // as a lazy selector\n                selectorPaths.push(selector);\n            }\n        }\n    }\n    const selector = parseSelectorPath(selectorPaths);\n    const style = createStyle(selector, node.props, instance, params);\n    if (blockSelector) {\n        styles.push(`${blockSelector} {`);\n    }\n    else if (style.length) {\n        styles.push(style);\n    }\n    if (node.children) {\n        loopCNodeListWithCallback(node.children, {\n            context: instance.context,\n            props: params\n        }, childNode => {\n            if (typeof childNode === 'string') {\n                const style = createStyle(selector, { raw: childNode }, instance, params);\n                styles.push(style);\n            }\n            else {\n                traverseCNode(childNode, selectorPaths, styles, instance, params);\n            }\n        });\n    }\n    selectorPaths.pop();\n    if (blockSelector) {\n        styles.push('}');\n    }\n    if ($ && $.after)\n        $.after(instance.context);\n}\nexport function render(node, instance, props) {\n    const styles = [];\n    traverseCNode(node, [], styles, instance, props);\n    return styles.join('\\n\\n');\n}\n","/* eslint-disable */\n// Inspired by https://github.com/garycourt/murmurhash-js\n// Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86\nfunction murmur2(str) {\n  // 'm' and 'r' are mixing constants generated offline.\n  // They're not really 'magic', they just happen to work well.\n  // const m = 0x5bd1e995;\n  // const r = 24;\n  // Initialize the hash\n  var h = 0; // Mix 4 bytes at a time into the hash\n\n  var k,\n      i = 0,\n      len = str.length;\n\n  for (; len >= 4; ++i, len -= 4) {\n    k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;\n    k =\n    /* Math.imul(k, m): */\n    (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16);\n    k ^=\n    /* k >>> r: */\n    k >>> 24;\n    h =\n    /* Math.imul(k, m): */\n    (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16) ^\n    /* Math.imul(h, m): */\n    (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n  } // Handle the last few bytes of the input array\n\n\n  switch (len) {\n    case 3:\n      h ^= (str.charCodeAt(i + 2) & 0xff) << 16;\n\n    case 2:\n      h ^= (str.charCodeAt(i + 1) & 0xff) << 8;\n\n    case 1:\n      h ^= str.charCodeAt(i) & 0xff;\n      h =\n      /* Math.imul(h, m): */\n      (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n  } // Do a few final mixes of the hash to ensure the last few\n  // bytes are well-incorporated.\n\n\n  h ^= h >>> 13;\n  h =\n  /* Math.imul(h, m): */\n  (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n  return ((h ^ h >>> 15) >>> 0).toString(36);\n}\n\nexport default murmur2;\n","/* eslint-disable @typescript-eslint/prefer-ts-expect-error */\n/* eslint-disable @typescript-eslint/strict-boolean-expressions */\nimport hash from './hash';\nimport { createElement, queryElement, removeElement } from './utils';\nif (typeof window !== 'undefined') {\n    window.__cssrContext = {};\n}\nexport function unmount(instance, node, id, parent) {\n    const { els } = node;\n    // If id is undefined, unmount all styles\n    if (id === undefined) {\n        els.forEach(removeElement);\n        node.els = [];\n    }\n    else {\n        const target = queryElement(id, parent);\n        // eslint-disable-next-line\n        if (target && els.includes(target)) {\n            removeElement(target);\n            node.els = els.filter((el) => el !== target);\n        }\n    }\n}\nfunction addElementToList(els, target) {\n    els.push(target);\n}\nfunction mount(instance, node, id, props, head, force, anchorMetaName, parent, ssrAdapter\n// eslint-disable-next-line @typescript-eslint/no-invalid-void-type\n) {\n    let style;\n    if (id === undefined) {\n        style = node.render(props);\n        id = hash(style);\n    }\n    if (ssrAdapter) {\n        ssrAdapter.adapter(id, style !== null && style !== void 0 ? style : node.render(props));\n        return;\n    }\n    if (parent === undefined) {\n        parent = document.head;\n    }\n    const queriedTarget = queryElement(id, parent);\n    if (queriedTarget !== null && !force) {\n        return queriedTarget;\n    }\n    const target = queriedTarget !== null && queriedTarget !== void 0 ? queriedTarget : createElement(id);\n    if (style === undefined)\n        style = node.render(props);\n    target.textContent = style;\n    if (queriedTarget !== null)\n        return queriedTarget;\n    if (anchorMetaName) {\n        const anchorMetaEl = parent.querySelector(`meta[name=\"${anchorMetaName}\"]`);\n        if (anchorMetaEl) {\n            parent.insertBefore(target, anchorMetaEl);\n            addElementToList(node.els, target);\n            return target;\n        }\n    }\n    if (head) {\n        parent.insertBefore(target, parent.querySelector('style, link'));\n    }\n    else {\n        parent.appendChild(target);\n    }\n    addElementToList(node.els, target);\n    return target;\n}\nexport { mount };\n","import { render } from './render';\nimport { mount, unmount } from './mount';\nfunction wrappedRender(props) {\n    return render(this, this.instance, props);\n}\n// do not guard node calling, it should throw an error.\nfunction wrappedMount(options = {}\n// eslint-disable-next-line @typescript-eslint/no-invalid-void-type\n) {\n    const { id, ssr, props, head = false, force = false, anchorMetaName, parent } = options;\n    const targetElement = mount(this.instance, this, id, props, head, force, anchorMetaName, parent, ssr);\n    return targetElement;\n}\nfunction wrappedUnmount(options = {}) {\n    /* istanbul ignore next */\n    // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n    const { id, parent } = options;\n    unmount(this.instance, this, id, parent);\n}\nconst createCNode = function (instance, $, props, children) {\n    return {\n        instance,\n        $,\n        props,\n        children,\n        els: [],\n        render: wrappedRender,\n        mount: wrappedMount,\n        unmount: wrappedUnmount\n    };\n};\nexport const c = function (instance, $, props, children) {\n    if (Array.isArray($)) {\n        return createCNode(instance, { $: null }, null, $);\n    }\n    else if (Array.isArray(props)) {\n        return createCNode(instance, $, null, props);\n    }\n    else if (Array.isArray(children)) {\n        return createCNode(instance, $, props, children);\n    }\n    else {\n        return createCNode(instance, $, props, null);\n    }\n};\n","import { c } from './c';\nimport { queryElement } from './utils';\nexport function CssRender(config = {}) {\n    const cssr = {\n        c: ((...args) => c(cssr, ...args)),\n        use: (plugin, ...args) => plugin.install(cssr, ...args),\n        find: queryElement,\n        context: {},\n        config\n    };\n    return cssr;\n}\n","import { queryElement } from './utils';\nexport function exists(id, ssr) {\n    if (id === undefined)\n        return false;\n    if (ssr) {\n        const { context: { ids } } = ssr;\n        return ids.has(id);\n    }\n    return queryElement(id) !== null;\n}\n","import { plugin as BemPlugin } from '@css-render/plugin-bem';\nimport { CssRender } from 'css-render';\nconst namespace = 'n';\nconst prefix = `.${namespace}-`;\nconst elementPrefix = '__';\nconst modifierPrefix = '--';\nconst cssr = CssRender();\nconst plugin = BemPlugin({\n  blockPrefix: prefix,\n  elementPrefix,\n  modifierPrefix\n});\ncssr.use(plugin);\nconst {\n  c,\n  find\n} = cssr;\nconst {\n  cB,\n  cE,\n  cM,\n  cNotM\n} = plugin;\nfunction insideModal(style) {\n  return c(({\n    props: {\n      bPrefix\n    }\n  }) => `${bPrefix || prefix}modal, ${bPrefix || prefix}drawer`, [style]);\n}\nfunction insidePopover(style) {\n  return c(({\n    props: {\n      bPrefix\n    }\n  }) => `${bPrefix || prefix}popover`, [style]);\n}\nfunction asModal(style) {\n  return c(({\n    props: {\n      bPrefix\n    }\n  }) => `&${bPrefix || prefix}modal`, style);\n}\n// child block\nconst cCB = (...args) => {\n  return c('>', [cB(...args)]);\n};\nfunction createKey(prefix, suffix) {\n  return prefix + (suffix === 'default' ? '' : suffix.replace(/^[a-z]/, startChar => startChar.toUpperCase()));\n}\nexport { asModal, c, cB, cCB, cE, cM, cNotM, createKey, find, insideModal, insidePopover, namespace, prefix };","let onceCbs = [];\nconst paramsMap = new WeakMap();\nfunction flushOnceCallbacks() {\n    onceCbs.forEach((cb) => cb(...paramsMap.get(cb)));\n    onceCbs = [];\n}\nfunction beforeNextFrameOnce(cb, ...params) {\n    paramsMap.set(cb, params);\n    if (onceCbs.includes(cb))\n        return;\n    onceCbs.push(cb) === 1 && requestAnimationFrame(flushOnceCallbacks);\n}\nexport { beforeNextFrameOnce };\n","export function happensIn(e, dataSetPropName) {\n    let { target } = e;\n    while (target) {\n        if (target.dataset) {\n            if (target.dataset[dataSetPropName] !== undefined)\n                return true;\n        }\n        target = target.parentElement;\n    }\n    return false;\n}\n","export function getPreciseEventTarget(event) {\n    return event.composedPath()[0] || null;\n}\n","export function parseResponsiveProp(reponsiveProp) {\n    if (typeof reponsiveProp === \"number\") {\n        return {\n            '': reponsiveProp.toString()\n        };\n    }\n    const params = {};\n    reponsiveProp.split(/ +/).forEach((pairLiteral) => {\n        if (pairLiteral === '')\n            return;\n        const [prefix, value] = pairLiteral.split(':');\n        if (value === undefined) {\n            params[''] = prefix;\n        }\n        else {\n            params[prefix] = value;\n        }\n    });\n    return params;\n}\nfunction parseResponsivePropValue(reponsiveProp, activeKeyOrSize) {\n    var _a;\n    if (reponsiveProp === undefined || reponsiveProp === null)\n        return undefined;\n    const classObj = parseResponsiveProp(reponsiveProp);\n    if (activeKeyOrSize === undefined)\n        return classObj[''];\n    if (typeof activeKeyOrSize === 'string') {\n        return (_a = classObj[activeKeyOrSize]) !== null && _a !== void 0 ? _a : classObj[''];\n    }\n    else if (Array.isArray(activeKeyOrSize)) {\n        for (let i = activeKeyOrSize.length - 1; i >= 0; --i) {\n            const key = activeKeyOrSize[i];\n            if (key in classObj)\n                return classObj[key];\n        }\n        return classObj[''];\n    }\n    else {\n        // Here we suppose all the keys are number formatted\n        let activeValue = undefined;\n        let activeKey = -1;\n        Object.keys(classObj).forEach((key) => {\n            const keyAsNum = Number(key);\n            if (!Number.isNaN(keyAsNum) &&\n                activeKeyOrSize >= keyAsNum &&\n                keyAsNum >= activeKey) {\n                activeKey = keyAsNum;\n                activeValue = classObj[key];\n            }\n        });\n        return activeValue;\n    }\n}\nexport { parseResponsivePropValue };\n","export function depx(value) {\n    if (typeof value === 'string') {\n        if (value.endsWith('px')) {\n            return Number(value.slice(0, value.length - 2));\n        }\n        return Number(value);\n    }\n    return value;\n}\nfunction pxfy(value) {\n    if (value === undefined || value === null)\n        return undefined;\n    if (typeof value === 'number')\n        return `${value}px`;\n    if (value.endsWith('px'))\n        return value;\n    return `${value}px`;\n}\nexport { pxfy };\nfunction getMargin(value, position) {\n    const parts = value.trim().split(/\\s+/g);\n    const margin = {\n        top: parts[0]\n    };\n    switch (parts.length) {\n        case 1:\n            margin.right = parts[0];\n            margin.bottom = parts[0];\n            margin.left = parts[0];\n            break;\n        case 2:\n            margin.right = parts[1];\n            margin.left = parts[1];\n            margin.bottom = parts[0];\n            break;\n        case 3:\n            margin.right = parts[1];\n            margin.bottom = parts[2];\n            margin.left = parts[1];\n            break;\n        case 4:\n            margin.right = parts[1];\n            margin.bottom = parts[2];\n            margin.left = parts[3];\n            break;\n        default:\n            throw new Error('[seemly/getMargin]:' + value + ' is not a valid value.');\n    }\n    if (position === undefined)\n        return margin;\n    return margin[position];\n}\nfunction getGap(value, orient) {\n    const [rowGap, colGap] = value.split(' ');\n    if (!orient)\n        return {\n            row: rowGap,\n            col: colGap || rowGap\n        };\n    return orient === 'row' ? rowGap : colGap;\n}\nexport { getMargin, getMargin as getPadding, getGap };\nexport { parseResponsiveProp, parseResponsivePropValue } from './responsive';\n","// src: https://www.w3schools.com/colors/colors_names.asp\nexport default {\n    aliceblue: \"#F0F8FF\",\n    antiquewhite: \"#FAEBD7\",\n    aqua: \"#0FF\",\n    aquamarine: \"#7FFFD4\",\n    azure: \"#F0FFFF\",\n    beige: \"#F5F5DC\",\n    bisque: \"#FFE4C4\",\n    black: \"#000\",\n    blanchedalmond: \"#FFEBCD\",\n    blue: \"#00F\",\n    blueviolet: \"#8A2BE2\",\n    brown: \"#A52A2A\",\n    burlywood: \"#DEB887\",\n    cadetblue: \"#5F9EA0\",\n    chartreuse: \"#7FFF00\",\n    chocolate: \"#D2691E\",\n    coral: \"#FF7F50\",\n    cornflowerblue: \"#6495ED\",\n    cornsilk: \"#FFF8DC\",\n    crimson: \"#DC143C\",\n    cyan: \"#0FF\",\n    darkblue: \"#00008B\",\n    darkcyan: \"#008B8B\",\n    darkgoldenrod: \"#B8860B\",\n    darkgray: \"#A9A9A9\",\n    darkgrey: \"#A9A9A9\",\n    darkgreen: \"#006400\",\n    darkkhaki: \"#BDB76B\",\n    darkmagenta: \"#8B008B\",\n    darkolivegreen: \"#556B2F\",\n    darkorange: \"#FF8C00\",\n    darkorchid: \"#9932CC\",\n    darkred: \"#8B0000\",\n    darksalmon: \"#E9967A\",\n    darkseagreen: \"#8FBC8F\",\n    darkslateblue: \"#483D8B\",\n    darkslategray: \"#2F4F4F\",\n    darkslategrey: \"#2F4F4F\",\n    darkturquoise: \"#00CED1\",\n    darkviolet: \"#9400D3\",\n    deeppink: \"#FF1493\",\n    deepskyblue: \"#00BFFF\",\n    dimgray: \"#696969\",\n    dimgrey: \"#696969\",\n    dodgerblue: \"#1E90FF\",\n    firebrick: \"#B22222\",\n    floralwhite: \"#FFFAF0\",\n    forestgreen: \"#228B22\",\n    fuchsia: \"#F0F\",\n    gainsboro: \"#DCDCDC\",\n    ghostwhite: \"#F8F8FF\",\n    gold: \"#FFD700\",\n    goldenrod: \"#DAA520\",\n    gray: \"#808080\",\n    grey: \"#808080\",\n    green: \"#008000\",\n    greenyellow: \"#ADFF2F\",\n    honeydew: \"#F0FFF0\",\n    hotpink: \"#FF69B4\",\n    indianred: \"#CD5C5C\",\n    indigo: \"#4B0082\",\n    ivory: \"#FFFFF0\",\n    khaki: \"#F0E68C\",\n    lavender: \"#E6E6FA\",\n    lavenderblush: \"#FFF0F5\",\n    lawngreen: \"#7CFC00\",\n    lemonchiffon: \"#FFFACD\",\n    lightblue: \"#ADD8E6\",\n    lightcoral: \"#F08080\",\n    lightcyan: \"#E0FFFF\",\n    lightgoldenrodyellow: \"#FAFAD2\",\n    lightgray: \"#D3D3D3\",\n    lightgrey: \"#D3D3D3\",\n    lightgreen: \"#90EE90\",\n    lightpink: \"#FFB6C1\",\n    lightsalmon: \"#FFA07A\",\n    lightseagreen: \"#20B2AA\",\n    lightskyblue: \"#87CEFA\",\n    lightslategray: \"#778899\",\n    lightslategrey: \"#778899\",\n    lightsteelblue: \"#B0C4DE\",\n    lightyellow: \"#FFFFE0\",\n    lime: \"#0F0\",\n    limegreen: \"#32CD32\",\n    linen: \"#FAF0E6\",\n    magenta: \"#F0F\",\n    maroon: \"#800000\",\n    mediumaquamarine: \"#66CDAA\",\n    mediumblue: \"#0000CD\",\n    mediumorchid: \"#BA55D3\",\n    mediumpurple: \"#9370DB\",\n    mediumseagreen: \"#3CB371\",\n    mediumslateblue: \"#7B68EE\",\n    mediumspringgreen: \"#00FA9A\",\n    mediumturquoise: \"#48D1CC\",\n    mediumvioletred: \"#C71585\",\n    midnightblue: \"#191970\",\n    mintcream: \"#F5FFFA\",\n    mistyrose: \"#FFE4E1\",\n    moccasin: \"#FFE4B5\",\n    navajowhite: \"#FFDEAD\",\n    navy: \"#000080\",\n    oldlace: \"#FDF5E6\",\n    olive: \"#808000\",\n    olivedrab: \"#6B8E23\",\n    orange: \"#FFA500\",\n    orangered: \"#FF4500\",\n    orchid: \"#DA70D6\",\n    palegoldenrod: \"#EEE8AA\",\n    palegreen: \"#98FB98\",\n    paleturquoise: \"#AFEEEE\",\n    palevioletred: \"#DB7093\",\n    papayawhip: \"#FFEFD5\",\n    peachpuff: \"#FFDAB9\",\n    peru: \"#CD853F\",\n    pink: \"#FFC0CB\",\n    plum: \"#DDA0DD\",\n    powderblue: \"#B0E0E6\",\n    purple: \"#800080\",\n    rebeccapurple: \"#663399\",\n    red: \"#F00\",\n    rosybrown: \"#BC8F8F\",\n    royalblue: \"#4169E1\",\n    saddlebrown: \"#8B4513\",\n    salmon: \"#FA8072\",\n    sandybrown: \"#F4A460\",\n    seagreen: \"#2E8B57\",\n    seashell: \"#FFF5EE\",\n    sienna: \"#A0522D\",\n    silver: \"#C0C0C0\",\n    skyblue: \"#87CEEB\",\n    slateblue: \"#6A5ACD\",\n    slategray: \"#708090\",\n    slategrey: \"#708090\",\n    snow: \"#FFFAFA\",\n    springgreen: \"#00FF7F\",\n    steelblue: \"#4682B4\",\n    tan: \"#D2B48C\",\n    teal: \"#008080\",\n    thistle: \"#D8BFD8\",\n    tomato: \"#FF6347\",\n    turquoise: \"#40E0D0\",\n    violet: \"#EE82EE\",\n    wheat: \"#F5DEB3\",\n    white: \"#FFF\",\n    whitesmoke: \"#F5F5F5\",\n    yellow: \"#FF0\",\n    yellowgreen: \"#9ACD32\",\n    transparent: \"#0000\"\n};\n","// All the algorithms credit to https://stackoverflow.com/questions/36721830/convert-hsl-to-rgb-and-hex/54014428#54014428\n// original author: Kamil Kiełczewski\n/**\n * @param h 360\n * @param s 100\n * @param l 100\n * @returns [h, s, v] 360, 100, 100\n */\nexport function hsl2hsv(h, s, l) {\n    s /= 100;\n    l /= 100;\n    const v = s * Math.min(l, 1 - l) + l;\n    return [h, v ? (2 - (2 * l) / v) * 100 : 0, v * 100];\n}\n/**\n * @param h 360\n * @param s 100\n * @param v 100\n * @returns [h, s, l] 360, 100, 100\n */\nexport function hsv2hsl(h, s, v) {\n    s /= 100;\n    v /= 100;\n    const l = v - (v * s) / 2;\n    const m = Math.min(l, 1 - l);\n    return [h, m ? ((v - l) / m) * 100 : 0, l * 100];\n}\n/**\n * @param h 360\n * @param s 100\n * @param v 100\n * @returns [r, g, b] 255, 255, 255\n */\nexport function hsv2rgb(h, s, v) {\n    s /= 100;\n    v /= 100;\n    let f = (n, k = (n + h / 60) % 6) => v - v * s * Math.max(Math.min(k, 4 - k, 1), 0);\n    return [f(5) * 255, f(3) * 255, f(1) * 255];\n}\n/**\n * @param r 255\n * @param g 255\n * @param b 255\n * @returns [360, 100, 100]\n */\nexport function rgb2hsv(r, g, b) {\n    r /= 255;\n    g /= 255;\n    b /= 255;\n    let v = Math.max(r, g, b), c = v - Math.min(r, g, b);\n    let h = c && (v == r ? (g - b) / c : v == g ? 2 + (b - r) / c : 4 + (r - g) / c);\n    return [60 * (h < 0 ? h + 6 : h), v && (c / v) * 100, v * 100];\n}\n/**\n * @param r 255\n * @param g 255\n * @param b 255\n * @returns [360, 100, 100]\n */\nexport function rgb2hsl(r, g, b) {\n    r /= 255;\n    g /= 255;\n    b /= 255;\n    let v = Math.max(r, g, b), c = v - Math.min(r, g, b), f = 1 - Math.abs(v + v - c - 1);\n    let h = c && (v == r ? (g - b) / c : v == g ? 2 + (b - r) / c : 4 + (r - g) / c);\n    return [60 * (h < 0 ? h + 6 : h), f ? (c / f) * 100 : 0, (v + v - c) * 50];\n}\n/**\n * @param h 360\n * @param s 100\n * @param l 100\n * @returns [255, 255, 255]\n */\nexport function hsl2rgb(h, s, l) {\n    s /= 100;\n    l /= 100;\n    let a = s * Math.min(l, 1 - l);\n    let f = (n, k = (n + h / 30) % 12) => l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);\n    return [f(0) * 255, f(8) * 255, f(4) * 255];\n}\n","import colors from './colors';\nimport { hsl2rgb, hsv2rgb } from './convert';\nconst prefix = '^\\\\s*';\nconst suffix = '\\\\s*$';\nconst percent = '\\\\s*((\\\\.\\\\d+)|(\\\\d+(\\\\.\\\\d*)?))%\\\\s*'; // 4 offset\nconst float = '\\\\s*((\\\\.\\\\d+)|(\\\\d+(\\\\.\\\\d*)?))\\\\s*'; // 4 offset\nconst hex = '([0-9A-Fa-f])';\nconst dhex = '([0-9A-Fa-f]{2})';\nconst hslRegex = new RegExp(`${prefix}hsl\\\\s*\\\\(${float},${percent},${percent}\\\\)${suffix}`);\nconst hsvRegex = new RegExp(`${prefix}hsv\\\\s*\\\\(${float},${percent},${percent}\\\\)${suffix}`);\nconst hslaRegex = new RegExp(`${prefix}hsla\\\\s*\\\\(${float},${percent},${percent},${float}\\\\)${suffix}`);\nconst hsvaRegex = new RegExp(`${prefix}hsva\\\\s*\\\\(${float},${percent},${percent},${float}\\\\)${suffix}`);\nconst rgbRegex = new RegExp(`${prefix}rgb\\\\s*\\\\(${float},${float},${float}\\\\)${suffix}`);\nconst rgbaRegex = new RegExp(`${prefix}rgba\\\\s*\\\\(${float},${float},${float},${float}\\\\)${suffix}`);\nconst sHexRegex = new RegExp(`${prefix}#${hex}${hex}${hex}${suffix}`);\nconst hexRegex = new RegExp(`${prefix}#${dhex}${dhex}${dhex}${suffix}`);\nconst sHexaRegex = new RegExp(`${prefix}#${hex}${hex}${hex}${hex}${suffix}`);\nconst hexaRegex = new RegExp(`${prefix}#${dhex}${dhex}${dhex}${dhex}${suffix}`);\nfunction parseHex(value) {\n    return parseInt(value, 16);\n}\n/**\n * Convert color string to hsla array\n * @param color format like hsl(180, 100%, 100%), hsla(180, 100%, 100%, 1)\n * @returns\n */\nexport function hsla(color) {\n    try {\n        let i;\n        if ((i = hslaRegex.exec(color))) {\n            return [\n                roundDeg(i[1]),\n                roundPercent(i[5]),\n                roundPercent(i[9]),\n                roundAlpha(i[13])\n            ];\n        }\n        else if ((i = hslRegex.exec(color))) {\n            return [roundDeg(i[1]), roundPercent(i[5]), roundPercent(i[9]), 1];\n        }\n        throw new Error(`[seemly/hsla]: Invalid color value ${color}.`);\n    }\n    catch (e) {\n        throw e;\n    }\n}\n/**\n * Convert color string to hsva array\n * @param color format like hsv(180, 100%, 100%), hsva(180, 100%, 100%, 1)\n * @returns\n */\nexport function hsva(color) {\n    try {\n        let i;\n        if ((i = hsvaRegex.exec(color))) {\n            return [\n                roundDeg(i[1]),\n                roundPercent(i[5]),\n                roundPercent(i[9]),\n                roundAlpha(i[13])\n            ];\n        }\n        else if ((i = hsvRegex.exec(color))) {\n            return [roundDeg(i[1]), roundPercent(i[5]), roundPercent(i[9]), 1];\n        }\n        throw new Error(`[seemly/hsva]: Invalid color value ${color}.`);\n    }\n    catch (e) {\n        throw e;\n    }\n}\n/**\n * Convert color string to rgba array.\n * @param color format like #000[0], #000000[00], rgb(0, 0, 0),\n * rgba(0, 0, 0, 0), hsl(a) color, hsv(a) color and color keywords and\n * transparent\n * @returns\n */\nexport function rgba(color) {\n    try {\n        let i;\n        if ((i = hexRegex.exec(color))) {\n            return [parseHex(i[1]), parseHex(i[2]), parseHex(i[3]), 1];\n        }\n        else if ((i = rgbRegex.exec(color))) {\n            return [roundChannel(i[1]), roundChannel(i[5]), roundChannel(i[9]), 1];\n        }\n        else if ((i = rgbaRegex.exec(color))) {\n            return [\n                roundChannel(i[1]),\n                roundChannel(i[5]),\n                roundChannel(i[9]),\n                roundAlpha(i[13])\n            ];\n        }\n        else if ((i = sHexRegex.exec(color))) {\n            return [\n                parseHex(i[1] + i[1]),\n                parseHex(i[2] + i[2]),\n                parseHex(i[3] + i[3]),\n                1\n            ];\n        }\n        else if ((i = hexaRegex.exec(color))) {\n            return [\n                parseHex(i[1]),\n                parseHex(i[2]),\n                parseHex(i[3]),\n                roundAlpha(parseHex(i[4]) / 255)\n            ];\n        }\n        else if ((i = sHexaRegex.exec(color))) {\n            return [\n                parseHex(i[1] + i[1]),\n                parseHex(i[2] + i[2]),\n                parseHex(i[3] + i[3]),\n                roundAlpha(parseHex(i[4] + i[4]) / 255)\n            ];\n        }\n        else if (color in colors) {\n            return rgba(colors[color]);\n        }\n        else if (hslRegex.test(color) || hslaRegex.test(color)) {\n            const [h, s, l, a] = hsla(color);\n            return [...hsl2rgb(h, s, l), a];\n        }\n        else if (hsvRegex.test(color) || hsvaRegex.test(color)) {\n            const [h, s, v, a] = hsva(color);\n            return [...hsv2rgb(h, s, v), a];\n        }\n        throw new Error(`[seemly/rgba]: Invalid color value ${color}.`);\n    }\n    catch (e) {\n        throw e;\n    }\n}\nfunction normalizeAlpha(alphaValue) {\n    return alphaValue > 1 ? 1 : alphaValue < 0 ? 0 : alphaValue;\n}\nfunction stringifyRgb(r, g, b) {\n    return `rgb(${roundChannel(r)}, ${roundChannel(g)}, ${roundChannel(b)})`;\n}\nfunction stringifyRgba(r, g, b, a) {\n    return `rgba(${roundChannel(r)}, ${roundChannel(g)}, ${roundChannel(b)}, ${normalizeAlpha(a)})`;\n}\nfunction compositeChannel(v1, a1, v2, a2, a) {\n    return roundChannel((v1 * a1 * (1 - a2) + v2 * a2) / a);\n}\nexport function composite(background, overlay) {\n    if (!Array.isArray(background))\n        background = rgba(background);\n    if (!Array.isArray(overlay))\n        overlay = rgba(overlay);\n    const a1 = background[3];\n    const a2 = overlay[3];\n    const alpha = roundAlpha(a1 + a2 - a1 * a2);\n    return stringifyRgba(compositeChannel(background[0], a1, overlay[0], a2, alpha), compositeChannel(background[1], a1, overlay[1], a2, alpha), compositeChannel(background[2], a1, overlay[2], a2, alpha), alpha);\n}\nexport function changeColor(base, options) {\n    const [r, g, b, a = 1] = Array.isArray(base) ? base : rgba(base);\n    if (typeof options.alpha === 'number') {\n        return stringifyRgba(r, g, b, options.alpha);\n    }\n    return stringifyRgba(r, g, b, a);\n}\nexport function scaleColor(base, options) {\n    const [r, g, b, a = 1] = Array.isArray(base) ? base : rgba(base);\n    const { lightness = 1, alpha = 1 } = options;\n    return toRgbaString([r * lightness, g * lightness, b * lightness, a * alpha]);\n}\nexport function getAlpha(base) {\n    var _a;\n    const alpha = (_a = (Array.isArray(base) ? base : rgba(base))[3]) !== null && _a !== void 0 ? _a : 1;\n    return alpha;\n}\nexport function getAlphaString(base) {\n    return `${getAlpha(base)}`;\n}\nexport function roundAlpha(value) {\n    const v = Math.round(Number(value) * 100) / 100;\n    if (v > 1)\n        return 1;\n    if (v < 0)\n        return 0;\n    return v;\n}\nexport function roundDeg(value) {\n    const v = Math.round(Number(value));\n    if (v >= 360)\n        return 0;\n    if (v < 0)\n        return 0;\n    return v;\n}\nexport function roundChannel(value) {\n    const v = Math.round(Number(value));\n    if (v > 255)\n        return 255;\n    if (v < 0)\n        return 0;\n    return v;\n}\nexport function roundPercent(value) {\n    const v = Math.round(Number(value));\n    if (v > 100)\n        return 100;\n    if (v < 0)\n        return 0;\n    return v;\n}\nexport function toRgbString(base) {\n    const [r, g, b] = Array.isArray(base) ? base : rgba(base);\n    return stringifyRgb(r, g, b);\n}\nexport function toRgbaString(base) {\n    const [r, g, b] = base;\n    if (3 in base) {\n        return `rgba(${roundChannel(r)}, ${roundChannel(g)}, ${roundChannel(b)}, ${roundAlpha(base[3])})`;\n    }\n    return `rgba(${roundChannel(r)}, ${roundChannel(g)}, ${roundChannel(b)}, 1)`;\n}\nexport function toHsvString(base) {\n    return `hsv(${roundDeg(base[0])}, ${roundPercent(base[1])}%, ${roundPercent(base[2])}%)`;\n}\nexport function toHsvaString(base) {\n    const [h, s, v] = base;\n    if (3 in base) {\n        return `hsva(${roundDeg(h)}, ${roundPercent(s)}%, ${roundPercent(v)}%, ${roundAlpha(base[3])})`;\n    }\n    return `hsva(${roundDeg(h)}, ${roundPercent(s)}%, ${roundPercent(v)}%, 1)`;\n}\nexport function toHslString(base) {\n    return `hsl(${roundDeg(base[0])}, ${roundPercent(base[1])}%, ${roundPercent(base[2])}%)`;\n}\nexport function toHslaString(base) {\n    const [h, s, l] = base;\n    if (3 in base) {\n        return `hsla(${roundDeg(h)}, ${roundPercent(s)}%, ${roundPercent(l)}%, ${roundAlpha(base[3])})`;\n    }\n    return `hsla(${roundDeg(h)}, ${roundPercent(s)}%, ${roundPercent(l)}%, 1)`;\n}\n/**\n *\n * @param base [255, 255, 255, 255], [255, 255, 255], any hex string\n * @returns\n */\nexport function toHexaString(base) {\n    if (typeof base === 'string') {\n        let i;\n        if (i = hexRegex.exec(base)) {\n            return `${i[0]}FF`;\n        }\n        else if (i = hexaRegex.exec(base)) {\n            return i[0];\n        }\n        else if (i = sHexRegex.exec(base)) {\n            return `#${i[1]}${i[1]}${i[2]}${i[2]}${i[3]}${i[3]}FF`;\n        }\n        else if (i = sHexaRegex.exec(base)) {\n            return `#${i[1]}${i[1]}${i[2]}${i[2]}${i[3]}${i[3]}${i[4]}${i[4]}`;\n        }\n        throw new Error(`[seemly/toHexString]: Invalid hex value ${base}.`);\n    }\n    const hex = `#${base\n        .slice(0, 3)\n        .map((unit) => roundChannel(unit).toString(16).toUpperCase().padStart(2, '0'))\n        .join('')}`;\n    const a = base.length === 3\n        ? 'FF'\n        : roundChannel(base[3] * 255)\n            .toString(16)\n            .padStart(2, '0')\n            .toUpperCase();\n    return hex + a;\n}\n/**\n *\n * @param base [255, 255, 255, 255], [255, 255, 255], any hex string\n * @returns\n */\nexport function toHexString(base) {\n    if (typeof base === 'string') {\n        let i;\n        if (i = hexRegex.exec(base)) {\n            return i[0];\n        }\n        else if (i = hexaRegex.exec(base)) {\n            return i[0].slice(0, 7);\n        }\n        else if (i = (sHexRegex.exec(base) || sHexaRegex.exec(base))) {\n            return `#${i[1]}${i[1]}${i[2]}${i[2]}${i[3]}${i[3]}`;\n        }\n        throw new Error(`[seemly/toHexString]: Invalid hex value ${base}.`);\n    }\n    return `#${base\n        .slice(0, 3)\n        .map((unit) => roundChannel(unit).toString(16).toUpperCase().padStart(2, '0'))\n        .join('')}`;\n}\nexport { hsl2hsv, hsv2hsl, hsv2rgb, rgb2hsv, rgb2hsl, hsl2rgb } from './convert';\n","export function createId(length = 8) {\n    return Math.random()\n        .toString(16)\n        .slice(2, 2 + length);\n}\nexport function repeat(count, v) {\n    const ret = [];\n    for (let i = 0; i < count; ++i) {\n        ret.push(v);\n    }\n    return ret;\n}\nfunction indexMap(count, createValue) {\n    const ret = [];\n    if (!createValue) {\n        for (let i = 0; i < count; ++i) {\n            ret.push(i);\n        }\n        return ret;\n    }\n    for (let i = 0; i < count; ++i) {\n        ret.push(createValue(i));\n    }\n    return ret;\n}\nexport { indexMap };\nexport async function sleep(ms) {\n    return new Promise(resolve => {\n        setTimeout(resolve, ms);\n    });\n}\n","export function getEventTarget(e) {\n    const path = e.composedPath();\n    return path[0];\n}\n","import { on, off } from './delegate';\nimport { getEventTarget } from './utils';\nconst traps = {\n    mousemoveoutside: new WeakMap(),\n    clickoutside: new WeakMap()\n};\nfunction createTrapHandler(name, el, originalHandler) {\n    if (name === 'mousemoveoutside') {\n        const moveHandler = (e) => {\n            if (el.contains(getEventTarget(e)))\n                return;\n            originalHandler(e);\n        };\n        return {\n            mousemove: moveHandler,\n            touchstart: moveHandler\n        };\n    }\n    else if (name === 'clickoutside') {\n        let mouseDownOutside = false;\n        const downHandler = (e) => {\n            mouseDownOutside = !el.contains(getEventTarget(e));\n        };\n        const upHanlder = (e) => {\n            if (!mouseDownOutside)\n                return;\n            if (el.contains(getEventTarget(e)))\n                return;\n            originalHandler(e);\n        };\n        return {\n            mousedown: downHandler,\n            mouseup: upHanlder,\n            touchstart: downHandler,\n            touchend: upHanlder\n        };\n    }\n    console.error(\n    // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n    `[evtd/create-trap-handler]: name \\`${name}\\` is invalid. This could be a bug of evtd.`);\n    return {};\n}\nfunction ensureTrapHandlers(name, el, handler) {\n    const handlers = traps[name];\n    let elHandlers = handlers.get(el);\n    if (elHandlers === undefined) {\n        handlers.set(el, (elHandlers = new WeakMap()));\n    }\n    let trapHandler = elHandlers.get(handler);\n    if (trapHandler === undefined) {\n        elHandlers.set(handler, (trapHandler = createTrapHandler(name, el, handler)));\n    }\n    return trapHandler;\n}\nfunction trapOn(name, el, handler, options) {\n    if (name === 'mousemoveoutside' || name === 'clickoutside') {\n        const trapHandlers = ensureTrapHandlers(name, el, handler);\n        Object.keys(trapHandlers).forEach((key) => {\n            on(key, document, trapHandlers[key], options);\n        });\n        return true;\n    }\n    return false;\n}\nfunction trapOff(name, el, handler, options) {\n    if (name === 'mousemoveoutside' || name === 'clickoutside') {\n        const trapHandlers = ensureTrapHandlers(name, el, handler);\n        Object.keys(trapHandlers).forEach((key) => {\n            off(key, document, trapHandlers[key], options);\n        });\n        return true;\n    }\n    return false;\n}\nexport { trapOff, trapOn };\n","import { trapOn, trapOff } from './traps';\nimport { getEventTarget } from './utils';\n// currently `once` and `passive` is not supported\nfunction createDelegate() {\n    if (typeof window === 'undefined') {\n        return {\n            on: () => { },\n            off: () => { }\n        };\n    }\n    const propagationStopped = new WeakMap();\n    const immediatePropagationStopped = new WeakMap();\n    function trackPropagation() {\n        propagationStopped.set(this, true);\n    }\n    function trackImmediate() {\n        propagationStopped.set(this, true);\n        immediatePropagationStopped.set(this, true);\n    }\n    function spy(event, propName, fn) {\n        const source = event[propName];\n        event[propName] = function () {\n            fn.apply(event, arguments);\n            return source.apply(event, arguments);\n        };\n        return event;\n    }\n    function unspy(event, propName) {\n        event[propName] = Event.prototype[propName];\n    }\n    const currentTargets = new WeakMap();\n    const currentTargetDescriptor = Object.getOwnPropertyDescriptor(Event.prototype, 'currentTarget');\n    function getCurrentTarget() {\n        var _a;\n        return (_a = currentTargets.get(this)) !== null && _a !== void 0 ? _a : null;\n    }\n    function defineCurrentTarget(event, getter) {\n        if (currentTargetDescriptor === undefined)\n            return;\n        Object.defineProperty(event, 'currentTarget', {\n            configurable: true,\n            enumerable: true,\n            get: getter !== null && getter !== void 0 ? getter : currentTargetDescriptor.get\n        });\n    }\n    const phaseToTypeToElToHandlers = {\n        bubble: {},\n        capture: {}\n    };\n    const typeToWindowEventHandlers = {};\n    function createUnifiedHandler() {\n        const delegeteHandler = function (e) {\n            const { type, eventPhase, bubbles } = e;\n            const target = getEventTarget(e);\n            if (eventPhase === 2)\n                return;\n            const phase = eventPhase === 1 ? 'capture' : 'bubble';\n            let cursor = target;\n            const path = [];\n            // collecting bubble path\n            while (true) {\n                if (cursor === null)\n                    cursor = window;\n                path.push(cursor);\n                if (cursor === window) {\n                    break;\n                }\n                // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n                cursor = (cursor.parentNode || null);\n            }\n            const captureElToHandlers = phaseToTypeToElToHandlers.capture[type];\n            const bubbleElToHandlers = phaseToTypeToElToHandlers.bubble[type];\n            spy(e, 'stopPropagation', trackPropagation);\n            spy(e, 'stopImmediatePropagation', trackImmediate);\n            defineCurrentTarget(e, getCurrentTarget);\n            if (phase === 'capture') {\n                if (captureElToHandlers === undefined)\n                    return;\n                // capture\n                for (let i = path.length - 1; i >= 0; --i) {\n                    if (propagationStopped.has(e))\n                        break;\n                    const target = path[i];\n                    const handlers = captureElToHandlers.get(target);\n                    if (handlers !== undefined) {\n                        currentTargets.set(e, target);\n                        for (const handler of handlers) {\n                            if (immediatePropagationStopped.has(e))\n                                break;\n                            handler(e);\n                        }\n                    }\n                    if (i === 0 && !bubbles && bubbleElToHandlers !== undefined) {\n                        const bubbleHandlers = bubbleElToHandlers.get(target);\n                        if (bubbleHandlers !== undefined) {\n                            for (const handler of bubbleHandlers) {\n                                if (immediatePropagationStopped.has(e))\n                                    break;\n                                handler(e);\n                            }\n                        }\n                    }\n                }\n            }\n            else if (phase === 'bubble') {\n                if (bubbleElToHandlers === undefined)\n                    return;\n                // bubble\n                for (let i = 0; i < path.length; ++i) {\n                    if (propagationStopped.has(e))\n                        break;\n                    const target = path[i];\n                    const handlers = bubbleElToHandlers.get(target);\n                    if (handlers !== undefined) {\n                        currentTargets.set(e, target);\n                        for (const handler of handlers) {\n                            if (immediatePropagationStopped.has(e))\n                                break;\n                            handler(e);\n                        }\n                    }\n                }\n            }\n            unspy(e, 'stopPropagation');\n            unspy(e, 'stopImmediatePropagation');\n            defineCurrentTarget(e);\n        };\n        delegeteHandler.displayName = 'evtdUnifiedHandler';\n        return delegeteHandler;\n    }\n    function createUnifiedWindowEventHandler() {\n        const delegateHandler = function (e) {\n            const { type, eventPhase } = e;\n            if (eventPhase !== 2)\n                return;\n            const handlers = typeToWindowEventHandlers[type];\n            if (handlers === undefined)\n                return;\n            handlers.forEach((handler) => handler(e));\n        };\n        delegateHandler.displayName = 'evtdUnifiedWindowEventHandler';\n        return delegateHandler;\n    }\n    const unifiedHandler = createUnifiedHandler();\n    const unfiendWindowEventHandler = createUnifiedWindowEventHandler();\n    function ensureElToHandlers(phase, type) {\n        const phaseHandlers = phaseToTypeToElToHandlers[phase];\n        if (phaseHandlers[type] === undefined) {\n            phaseHandlers[type] = new Map();\n            window.addEventListener(type, unifiedHandler, phase === 'capture');\n        }\n        return phaseHandlers[type];\n    }\n    function ensureWindowEventHandlers(type) {\n        const windowEventHandlers = typeToWindowEventHandlers[type];\n        if (windowEventHandlers === undefined) {\n            typeToWindowEventHandlers[type] = new Set();\n            window.addEventListener(type, unfiendWindowEventHandler);\n        }\n        return typeToWindowEventHandlers[type];\n    }\n    function ensureHandlers(elToHandlers, el) {\n        let elHandlers = elToHandlers.get(el);\n        if (elHandlers === undefined) {\n            elToHandlers.set(el, (elHandlers = new Set()));\n        }\n        return elHandlers;\n    }\n    function handlerExist(el, phase, type, handler) {\n        const elToHandlers = phaseToTypeToElToHandlers[phase][type];\n        // phase ${type} event has handlers\n        if (elToHandlers !== undefined) {\n            const handlers = elToHandlers.get(el);\n            // phase using el with ${type} event has handlers\n            if (handlers !== undefined) {\n                if (handlers.has(handler))\n                    return true;\n            }\n        }\n        return false;\n    }\n    function windowEventHandlerExist(type, handler) {\n        const handlers = typeToWindowEventHandlers[type];\n        if (handlers !== undefined) {\n            if (handlers.has(handler)) {\n                return true;\n            }\n        }\n        return false;\n    }\n    function on(type, el, handler, options) {\n        let mergedHandler;\n        if (typeof options === 'object' && options.once === true) {\n            mergedHandler = (e) => {\n                off(type, el, mergedHandler, options);\n                handler(e);\n            };\n        }\n        else {\n            mergedHandler = handler;\n        }\n        const trapped = trapOn(type, el, mergedHandler, options);\n        if (trapped)\n            return;\n        const phase = options === true ||\n            (typeof options === 'object' && options.capture === true)\n            ? 'capture'\n            : 'bubble';\n        const elToHandlers = ensureElToHandlers(phase, type);\n        const handlers = ensureHandlers(elToHandlers, el);\n        if (!handlers.has(mergedHandler))\n            handlers.add(mergedHandler);\n        if (el === window) {\n            const windowEventHandlers = ensureWindowEventHandlers(type);\n            if (!windowEventHandlers.has(mergedHandler)) {\n                windowEventHandlers.add(mergedHandler);\n            }\n        }\n    }\n    function off(type, el, handler, options) {\n        const trapped = trapOff(type, el, handler, options);\n        if (trapped)\n            return;\n        const capture = options === true ||\n            (typeof options === 'object' && options.capture === true);\n        const phase = capture ? 'capture' : 'bubble';\n        const elToHandlers = ensureElToHandlers(phase, type);\n        const handlers = ensureHandlers(elToHandlers, el);\n        if (el === window) {\n            const mirrorPhase = capture ? 'bubble' : 'capture';\n            if (!handlerExist(el, mirrorPhase, type, handler) &&\n                windowEventHandlerExist(type, handler)) {\n                // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n                const windowEventHandlers = typeToWindowEventHandlers[type];\n                windowEventHandlers.delete(handler);\n                if (windowEventHandlers.size === 0) {\n                    window.removeEventListener(type, unfiendWindowEventHandler);\n                    typeToWindowEventHandlers[type] = undefined;\n                }\n            }\n        }\n        if (handlers.has(handler))\n            handlers.delete(handler);\n        if (handlers.size === 0) {\n            elToHandlers.delete(el);\n        }\n        if (elToHandlers.size === 0) {\n            window.removeEventListener(type, unifiedHandler, phase === 'capture');\n            phaseToTypeToElToHandlers[phase][type] = undefined;\n        }\n    }\n    return {\n        on: on,\n        off: off\n    };\n}\nconst { on, off } = createDelegate();\nexport { on, off };\n","import { ref, readonly, watch } from 'vue';\nexport default function useFalseUntilTruthy(originalRef) {\n    const currentRef = ref(!!originalRef.value);\n    if (currentRef.value)\n        return readonly(currentRef);\n    const stop = watch(originalRef, (value) => {\n        if (value) {\n            currentRef.value = true;\n            stop();\n        }\n    });\n    return readonly(currentRef);\n}\n","import { computed, ref, watch } from 'vue';\nfunction useMemo(getterOrOptions) {\n    const computedValueRef = computed(getterOrOptions);\n    // Maybe it's not possible to lazy evaluate the value, since we can't make\n    // render phase capture the deps behind useMemo\n    const valueRef = ref(computedValueRef.value);\n    watch(computedValueRef, (value) => {\n        valueRef.value = value;\n    });\n    if (typeof getterOrOptions === 'function') {\n        return valueRef;\n    }\n    else {\n        return {\n            __v_isRef: true,\n            get value() {\n                return valueRef.value;\n            },\n            set value(v) {\n                getterOrOptions.set(v);\n            }\n        };\n    }\n}\nexport default useMemo;\n","import { getCurrentInstance } from 'vue';\nexport function hasInstance() {\n    return getCurrentInstance() !== null;\n}\nexport const isBrowser = typeof window !== 'undefined';\n","import { onMounted, onBeforeUnmount } from 'vue';\nimport { isBrowser } from './utils';\nlet fontsReady;\nlet isFontReady;\nconst init = () => {\n    var _a, _b;\n    fontsReady = isBrowser ? (_b = (_a = document) === null || _a === void 0 ? void 0 : _a.fonts) === null || _b === void 0 ? void 0 : _b.ready : undefined;\n    isFontReady = false;\n    /* istanbul ignore if */\n    if (fontsReady !== undefined) {\n        void fontsReady.then(() => {\n            isFontReady = true;\n        });\n    }\n    else {\n        isFontReady = true;\n    }\n};\ninit();\n// For testing\nexport { init };\n/**\n * Call callback on fontsReady is resolved. If fontsReady is already resolved,\n * callback won't be called.\n */\nexport default function onFontsReady(cb) {\n    /* istanbul ignore next */\n    if (isFontReady)\n        return;\n    let deactivated = false;\n    onMounted(() => {\n        /* istanbul ignore next */\n        if (!isFontReady) {\n            fontsReady === null || fontsReady === void 0 ? void 0 : fontsReady.then(() => {\n                if (deactivated)\n                    return;\n                cb();\n            });\n        }\n    });\n    onBeforeUnmount(() => {\n        deactivated = true;\n    });\n}\n","import { ref, readonly, onBeforeMount, onBeforeUnmount } from 'vue';\nimport { on, off } from 'evtd';\nimport { hasInstance, isBrowser } from './utils';\nconst mousePositionRef = ref(null);\nfunction clickHandler(e) {\n    if (e.clientX > 0 || e.clientY > 0) {\n        mousePositionRef.value = {\n            x: e.clientX,\n            y: e.clientY\n        };\n    }\n    else {\n        // x = 0 & y = 0\n        const { target } = e;\n        if (target instanceof Element) {\n            const { left, top, width, height } = target.getBoundingClientRect();\n            if (left > 0 || top > 0) {\n                // impossible to be triggered by real click\n                mousePositionRef.value = {\n                    x: left + width / 2,\n                    y: top + height / 2\n                };\n            }\n            else {\n                mousePositionRef.value = { x: 0, y: 0 };\n            }\n        }\n        else {\n            mousePositionRef.value = null;\n        }\n    }\n}\nlet usedCount = 0;\nlet managable = true;\nexport default function useClickPosition() {\n    if (!isBrowser)\n        return readonly(ref(null));\n    if (usedCount === 0)\n        on('click', document, clickHandler, true);\n    const setup = () => {\n        usedCount += 1;\n    };\n    if (managable && (managable = hasInstance())) {\n        onBeforeMount(setup);\n        onBeforeUnmount(() => {\n            usedCount -= 1;\n            if (usedCount === 0)\n                off('click', document, clickHandler, true);\n        });\n    }\n    else {\n        setup();\n    }\n    return readonly(mousePositionRef);\n}\n","import { onBeforeMount, onBeforeUnmount, ref, readonly } from 'vue';\nimport { on, off } from 'evtd';\nimport { hasInstance, isBrowser } from './utils';\nconst clickedTimeRef = ref(undefined);\nlet usedCount = 0;\nfunction handleClick() {\n    clickedTimeRef.value = Date.now();\n}\nlet managable = true;\nexport default function useClicked(timeout) {\n    if (!isBrowser)\n        return readonly(ref(false));\n    const clickedRef = ref(false);\n    let timerId = null;\n    function clearTimer() {\n        if (timerId !== null)\n            window.clearTimeout(timerId);\n    }\n    function clickedHandler() {\n        clearTimer();\n        clickedRef.value = true;\n        timerId = window.setTimeout(() => {\n            clickedRef.value = false;\n        }, timeout);\n    }\n    if (usedCount === 0) {\n        on('click', window, handleClick, true);\n    }\n    const setup = () => {\n        usedCount += 1;\n        on('click', window, clickedHandler, true);\n    };\n    if (managable && (managable = hasInstance())) {\n        onBeforeMount(setup);\n        onBeforeUnmount(() => {\n            usedCount -= 1;\n            if (usedCount === 0) {\n                off('click', window, handleClick, true);\n            }\n            off('click', window, clickedHandler, true);\n            clearTimer();\n        });\n    }\n    else {\n        setup();\n    }\n    return readonly(clickedRef);\n}\n","import { watch, computed } from 'vue';\nexport default function useMergedState(controlledStateRef, uncontrolledStateRef) {\n    watch(controlledStateRef, value => {\n        if (value !== undefined) {\n            uncontrolledStateRef.value = value;\n        }\n    });\n    return computed(() => {\n        if (controlledStateRef.value === undefined) {\n            return uncontrolledStateRef.value;\n        }\n        return controlledStateRef.value;\n    });\n}\n","import { ref, onMounted, readonly } from 'vue';\nexport default function isMounted() {\n    const isMounted = ref(false);\n    onMounted(() => { isMounted.value = true; });\n    return readonly(isMounted);\n}\n","import { computed } from 'vue';\nexport default function useCompitable(reactive, keys) {\n    // @ts-expect-error\n    return computed(() => {\n        for (const key of keys) {\n            if (reactive[key] !== undefined)\n                return reactive[key];\n        }\n        return reactive[keys[keys.length - 1]];\n    });\n}\n","export const isIos = (typeof window === 'undefined'\n    ? false\n    : /iPad|iPhone|iPod/.test(navigator.platform) ||\n        (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1)) &&\n    // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n    !window.MSStream;\nexport default function useIsIos() {\n    return isIos;\n}\n","/* eslint-disable @typescript-eslint/consistent-type-assertions */\nimport { ref, computed, onBeforeUnmount } from 'vue';\nimport { isBrowser } from './utils';\nexport const defaultBreakpointOptions = {\n    // mobile\n    // 0 ~ 640 doesn't mean it should display well in all the range,\n    // but means you should treat it like a mobile phone.)\n    xs: 0,\n    s: 640,\n    m: 1024,\n    l: 1280,\n    xl: 1536,\n    '2xl': 1920 // normal desktop display\n};\nfunction createMediaQuery(screenWidth) {\n    return `(min-width: ${screenWidth}px)`;\n}\nconst mqlMap = {};\nfunction useBreakpoints(screens = defaultBreakpointOptions) {\n    if (!isBrowser)\n        return computed(() => []);\n    // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n    if (typeof window.matchMedia !== 'function')\n        return computed(() => []);\n    const breakpointStatusRef = ref({});\n    const breakpoints = Object.keys(screens);\n    const updateBreakpoints = (e, breakpointName) => {\n        if (e.matches)\n            breakpointStatusRef.value[breakpointName] = true;\n        else\n            breakpointStatusRef.value[breakpointName] = false;\n    };\n    breakpoints.forEach((key) => {\n        const breakpointValue = screens[key];\n        let mql;\n        let cbs;\n        if (mqlMap[breakpointValue] === undefined) {\n            mql = window.matchMedia(createMediaQuery(breakpointValue));\n            // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n            if (mql.addEventListener) {\n                mql.addEventListener('change', (e) => {\n                    cbs.forEach((cb) => {\n                        cb(e, key);\n                    });\n                });\n                // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n            }\n            else if (mql.addListener) {\n                mql.addListener((e) => {\n                    cbs.forEach((cb) => {\n                        cb(e, key);\n                    });\n                });\n            }\n            cbs = new Set();\n            mqlMap[breakpointValue] = {\n                mql,\n                cbs\n            };\n        }\n        else {\n            mql = mqlMap[breakpointValue].mql;\n            cbs = mqlMap[breakpointValue].cbs;\n        }\n        cbs.add(updateBreakpoints);\n        if (mql.matches) {\n            cbs.forEach((cb) => {\n                cb(mql, key);\n            });\n        }\n    });\n    onBeforeUnmount(() => {\n        breakpoints.forEach((breakpoint) => {\n            const { cbs } = mqlMap[screens[breakpoint]];\n            if (cbs.has(updateBreakpoints)) {\n                cbs.delete(updateBreakpoints);\n            }\n        });\n    });\n    return computed(() => {\n        const { value } = breakpointStatusRef;\n        return breakpoints.filter((key) => value[key]);\n    });\n}\nexport default useBreakpoints;\n","import { onBeforeMount, onBeforeUnmount, reactive, readonly, watch } from 'vue';\nimport { on, off } from 'evtd';\nimport { hasInstance } from './utils';\nexport default function useKeyboard(options = {}, enabledRef) {\n    const state = reactive({\n        ctrl: false,\n        command: false,\n        win: false,\n        shift: false,\n        tab: false\n    });\n    const { keydown, keyup } = options;\n    const keydownHandler = (e) => {\n        switch (e.key) {\n            case 'Control':\n                state.ctrl = true;\n                break;\n            case 'Meta':\n                state.command = true;\n                state.win = true;\n                break;\n            case 'Shift':\n                state.shift = true;\n                break;\n            case 'Tab':\n                state.tab = true;\n                break;\n        }\n        if (keydown !== undefined) {\n            Object.keys(keydown).forEach(key => {\n                if (key !== e.key)\n                    return;\n                const handler = keydown[key];\n                if (typeof handler === 'function') {\n                    handler(e);\n                }\n                else {\n                    const { stop = false, prevent = false } = handler;\n                    if (stop)\n                        e.stopPropagation();\n                    if (prevent)\n                        e.preventDefault();\n                    handler.handler(e);\n                }\n            });\n        }\n    };\n    const keyupHandler = (e) => {\n        switch (e.key) {\n            case 'Control':\n                state.ctrl = false;\n                break;\n            case 'Meta':\n                state.command = false;\n                state.win = false;\n                break;\n            case 'Shift':\n                state.shift = false;\n                break;\n            case 'Tab':\n                state.tab = false;\n                break;\n        }\n        if (keyup !== undefined) {\n            Object.keys(keyup).forEach(key => {\n                if (key !== e.key)\n                    return;\n                const handler = keyup[key];\n                if (typeof handler === 'function') {\n                    handler(e);\n                }\n                else {\n                    const { stop = false, prevent = false } = handler;\n                    if (stop)\n                        e.stopPropagation();\n                    if (prevent)\n                        e.preventDefault();\n                    handler.handler(e);\n                }\n            });\n        }\n    };\n    const setup = () => {\n        if (enabledRef === undefined || enabledRef.value) {\n            on('keydown', document, keydownHandler);\n            on('keyup', document, keyupHandler);\n        }\n        if (enabledRef !== undefined) {\n            watch(enabledRef, value => {\n                if (value) {\n                    on('keydown', document, keydownHandler);\n                    on('keyup', document, keyupHandler);\n                }\n                else {\n                    off('keydown', document, keydownHandler);\n                    off('keyup', document, keyupHandler);\n                }\n            });\n        }\n    };\n    if (hasInstance()) {\n        onBeforeMount(setup);\n        onBeforeUnmount(() => {\n            if (enabledRef === undefined || enabledRef.value) {\n                off('keydown', document, keydownHandler);\n                off('keyup', document, keyupHandler);\n            }\n        });\n    }\n    else {\n        setup();\n    }\n    return readonly(state);\n}\n","import { createInjectionKey } from \"../../../_utils/vue/create-injection-key.mjs\";\nexport const internalSelectionMenuInjectionKey = createInjectionKey('n-internal-select-menu');\nexport const internalSelectionMenuBodyInjectionKey = createInjectionKey('n-internal-select-menu-body');","import { createInjectionKey } from \"../../_utils/vue/create-injection-key.mjs\";\nexport const drawerBodyInjectionKey = createInjectionKey('n-drawer-body');\nexport const drawerInjectionKey = createInjectionKey('n-drawer');","import { createInjectionKey } from \"../../_utils/vue/create-injection-key.mjs\";\nexport const modalBodyInjectionKey = createInjectionKey('n-modal-body');\nexport const modalProviderInjectionKey = createInjectionKey('n-modal-provider');\nexport const modalInjectionKey = createInjectionKey('n-modal');","import { createInjectionKey } from \"../../_utils/vue/create-injection-key.mjs\";\nexport const popoverBodyInjectionKey = createInjectionKey('n-popover-body');","import { off, on } from 'evtd';\nimport { useMemo } from 'vooks';\nimport { inject, onBeforeUnmount, onMounted, ref } from 'vue';\nimport { internalSelectionMenuBodyInjectionKey } from \"../../_internal/select-menu/src/interface.mjs\";\nimport { drawerBodyInjectionKey } from \"../../drawer/src/interface.mjs\";\nimport { modalBodyInjectionKey } from \"../../modal/src/interface.mjs\";\nimport { popoverBodyInjectionKey } from \"../../popover/src/interface.mjs\";\nconst teleportDisabled = '__disabled__';\nfunction useAdjustedTo(props) {\n  const modal = inject(modalBodyInjectionKey, null);\n  const drawer = inject(drawerBodyInjectionKey, null);\n  const popover = inject(popoverBodyInjectionKey, null);\n  const selectMenu = inject(internalSelectionMenuBodyInjectionKey, null);\n  const fullscreenElementRef = ref();\n  if (typeof document !== 'undefined') {\n    fullscreenElementRef.value = document.fullscreenElement;\n    const handleFullscreenChange = () => {\n      fullscreenElementRef.value = document.fullscreenElement;\n    };\n    onMounted(() => {\n      on('fullscreenchange', document, handleFullscreenChange);\n    });\n    onBeforeUnmount(() => {\n      off('fullscreenchange', document, handleFullscreenChange);\n    });\n  }\n  return useMemo(() => {\n    var _a;\n    const {\n      to\n    } = props;\n    if (to !== undefined) {\n      if (to === false) return teleportDisabled;\n      if (to === true) return fullscreenElementRef.value || 'body';\n      return to;\n    }\n    if (modal === null || modal === void 0 ? void 0 : modal.value) {\n      return (_a = modal.value.$el) !== null && _a !== void 0 ? _a : modal.value;\n    }\n    if (drawer === null || drawer === void 0 ? void 0 : drawer.value) return drawer.value;\n    if (popover === null || popover === void 0 ? void 0 : popover.value) return popover.value;\n    if (selectMenu === null || selectMenu === void 0 ? void 0 : selectMenu.value) return selectMenu.value;\n    return to !== null && to !== void 0 ? to : fullscreenElementRef.value || 'body';\n  });\n}\n// teleport disabled key\nuseAdjustedTo.tdkey = teleportDisabled;\nuseAdjustedTo.propTo = {\n  type: [String, Object, Boolean],\n  default: undefined\n};\nexport { useAdjustedTo };","import { getCurrentInstance, inject, onBeforeUnmount, onMounted, watch } from 'vue';\n// injection.collection {\n//   key1: [insta, instb]\n//   key2: [instc]\n// }\nexport function useInjectionInstanceCollection(injectionName, collectionKey, registerKeyRef) {\n  var _a;\n  const injection = inject(injectionName, null);\n  if (injection === null) return;\n  const vm = (_a = getCurrentInstance()) === null || _a === void 0 ? void 0 : _a.proxy;\n  watch(registerKeyRef, registerInstance);\n  registerInstance(registerKeyRef.value);\n  onBeforeUnmount(() => {\n    registerInstance(undefined, registerKeyRef.value);\n  });\n  function registerInstance(key, oldKey) {\n    if (!injection) return;\n    const collection = injection[collectionKey];\n    if (oldKey !== undefined) removeInstance(collection, oldKey);\n    if (key !== undefined) addInstance(collection, key);\n  }\n  function removeInstance(collection, key) {\n    if (!collection[key]) collection[key] = [];\n    collection[key].splice(collection[key].findIndex(instance => instance === vm), 1);\n  }\n  function addInstance(collection, key) {\n    if (!collection[key]) collection[key] = [];\n    if (!~collection[key].findIndex(instance => instance === vm)) {\n      collection[key].push(vm);\n    }\n  }\n}\n// injection.collection {\n//   key1: [insta.value, instb.value]\n//   key2: [instc.value]\n// }\nexport function useInjectionCollection(injectionName, collectionKey, valueRef) {\n  const injection = inject(injectionName, null);\n  if (injection === null) return;\n  if (!(collectionKey in injection)) {\n    injection[collectionKey] = [];\n  }\n  injection[collectionKey].push(valueRef.value);\n  watch(valueRef, (value, prevValue) => {\n    const collectionArray = injection[collectionKey];\n    const index = collectionArray.findIndex(collectionValue => collectionValue === prevValue);\n    if (~index) collectionArray.splice(index, 1);\n    collectionArray.push(value);\n  });\n  onBeforeUnmount(() => {\n    const collectionArray = injection[collectionKey];\n    const index = collectionArray.findIndex(collectionValue => collectionValue === valueRef.value);\n    if (~index) collectionArray.splice(index, 1);\n  });\n}\n// injection.collection {\n//   key1: [insta.$el, instb.$el]\n//   key2: [instc.$el]\n// }\nexport function useInjectionElementCollection(injectionName, collectionKey, getElement) {\n  const injection = inject(injectionName, null);\n  if (injection === null) return;\n  if (!(collectionKey in injection)) {\n    injection[collectionKey] = [];\n  }\n  onMounted(() => {\n    const el = getElement();\n    if (!el) return;\n    injection[collectionKey].push(el);\n  });\n  onBeforeUnmount(() => {\n    const collectionArray = injection[collectionKey];\n    const element = getElement();\n    const index = collectionArray.findIndex(collectionElement => collectionElement === element);\n    if (~index) collectionArray.splice(index, 1);\n  });\n}","import { ref, watch } from 'vue';\nexport function useDeferredTrue(valueRef, delay, shouldDelayRef) {\n  if (!delay) return valueRef;\n  const delayedRef = ref(valueRef.value);\n  let timerId = null;\n  watch(valueRef, value => {\n    if (timerId !== null) window.clearTimeout(timerId);\n    if (value === true) {\n      if (shouldDelayRef && !shouldDelayRef.value) {\n        delayedRef.value = true;\n      } else {\n        timerId = window.setTimeout(() => {\n          delayedRef.value = true;\n        }, delay);\n      }\n    } else {\n      delayedRef.value = false;\n    }\n  });\n  return delayedRef;\n}","export const isBrowser = typeof document !== 'undefined' && typeof window !== 'undefined';","import { onBeforeMount, onBeforeUnmount, ref } from 'vue';\nimport { isBrowser } from \"../env/is-browser.mjs\";\nconst isComposingRef = ref(false);\nfunction compositionStartHandler() {\n  isComposingRef.value = true;\n}\nfunction compositionEndHandler() {\n  isComposingRef.value = false;\n}\nlet mountedCount = 0;\nexport function useIsComposing() {\n  if (isBrowser) {\n    onBeforeMount(() => {\n      if (!mountedCount) {\n        window.addEventListener('compositionstart', compositionStartHandler);\n        window.addEventListener('compositionend', compositionEndHandler);\n      }\n      mountedCount++;\n    });\n    onBeforeUnmount(() => {\n      if (mountedCount <= 1) {\n        window.removeEventListener('compositionstart', compositionStartHandler);\n        window.removeEventListener('compositionend', compositionEndHandler);\n        mountedCount = 0;\n      } else {\n        mountedCount--;\n      }\n    });\n  }\n  return isComposingRef;\n}","import { onBeforeUnmount, onMounted, ref, watch } from 'vue';\nlet lockCount = 0;\nlet originalMarginRight = '';\nlet originalOverflow = '';\nlet originalOverflowX = '';\nlet originalOverflowY = '';\nexport const lockHtmlScrollRightCompensationRef = ref('0px');\nexport function useLockHtmlScroll(lockRef) {\n  // not browser\n  if (typeof document === 'undefined') return;\n  const el = document.documentElement;\n  let watchStopHandle;\n  let activated = false;\n  const unlock = () => {\n    el.style.marginRight = originalMarginRight;\n    el.style.overflow = originalOverflow;\n    el.style.overflowX = originalOverflowX;\n    el.style.overflowY = originalOverflowY;\n    lockHtmlScrollRightCompensationRef.value = '0px';\n  };\n  onMounted(() => {\n    watchStopHandle = watch(lockRef, value => {\n      if (value) {\n        if (!lockCount) {\n          const scrollbarWidth = window.innerWidth - el.offsetWidth;\n          if (scrollbarWidth > 0) {\n            originalMarginRight = el.style.marginRight;\n            el.style.marginRight = `${scrollbarWidth}px`;\n            lockHtmlScrollRightCompensationRef.value = `${scrollbarWidth}px`;\n          }\n          originalOverflow = el.style.overflow;\n          originalOverflowX = el.style.overflowX;\n          originalOverflowY = el.style.overflowY;\n          el.style.overflow = 'hidden';\n          el.style.overflowX = 'hidden';\n          el.style.overflowY = 'hidden';\n        }\n        activated = true;\n        lockCount++;\n      } else {\n        lockCount--;\n        if (!lockCount) {\n          unlock();\n        }\n        activated = false;\n      }\n    }, {\n      immediate: true\n    });\n  });\n  onBeforeUnmount(() => {\n    watchStopHandle === null || watchStopHandle === void 0 ? void 0 : watchStopHandle();\n    if (activated) {\n      lockCount--;\n      if (!lockCount) {\n        unlock();\n      }\n      activated = false;\n    }\n  });\n}","import { onActivated, onDeactivated } from 'vue';\nexport function useReactivated(callback) {\n  const isDeactivatedRef = {\n    isDeactivated: false\n  };\n  let activateStateInitialized = false;\n  onActivated(() => {\n    isDeactivatedRef.isDeactivated = false;\n    if (!activateStateInitialized) {\n      activateStateInitialized = true;\n      return;\n    }\n    callback();\n  });\n  onDeactivated(() => {\n    isDeactivatedRef.isDeactivated = true;\n    if (!activateStateInitialized) {\n      activateStateInitialized = true;\n    }\n  });\n  return isDeactivatedRef;\n}","import { Fragment, createTextVNode, Comment } from 'vue';\nexport function getSlot(scope, slots, slotName = 'default') {\n    const slot = slots[slotName];\n    if (slot === undefined) {\n        throw new Error(`[vueuc/${scope}]: slot[${slotName}] is empty.`);\n    }\n    return slot();\n}\n// o(n) flatten\nexport function flatten(vNodes, filterCommentNode = true, result = []) {\n    vNodes.forEach((vNode) => {\n        if (vNode === null)\n            return;\n        if (typeof vNode !== 'object') {\n            if (typeof vNode === 'string' || typeof vNode === 'number') {\n                result.push(createTextVNode(String(vNode)));\n            }\n            return;\n        }\n        if (Array.isArray(vNode)) {\n            flatten(vNode, filterCommentNode, result);\n            return;\n        }\n        if (vNode.type === Fragment) {\n            if (vNode.children === null)\n                return;\n            if (Array.isArray(vNode.children)) {\n                flatten(vNode.children, filterCommentNode, result);\n            }\n            // rawSlot\n        }\n        else if (vNode.type !== Comment) {\n            result.push(vNode);\n        }\n    });\n    return result;\n}\nexport function getFirstVNode(scope, slots, slotName = 'default') {\n    const slot = slots[slotName];\n    if (slot === undefined) {\n        throw new Error(`[vueuc/${scope}]: slot[${slotName}] is empty.`);\n    }\n    const content = flatten(slot());\n    // vue will normalize the slot, so slot must be an array\n    if (content.length === 1) {\n        return content[0];\n    }\n    else {\n        throw new Error(`[vueuc/${scope}]: slot[${slotName}] should have exactly one child.`);\n    }\n}\n","let viewMeasurer = null;\nexport function ensureViewBoundingRect() {\n    if (viewMeasurer === null) {\n        viewMeasurer = document.getElementById('v-binder-view-measurer');\n        if (viewMeasurer === null) {\n            viewMeasurer = document.createElement('div');\n            viewMeasurer.id = 'v-binder-view-measurer';\n            const { style } = viewMeasurer;\n            style.position = 'fixed';\n            style.left = '0';\n            style.right = '0';\n            style.top = '0';\n            style.bottom = '0';\n            style.pointerEvents = 'none';\n            style.visibility = 'hidden';\n            document.body.appendChild(viewMeasurer);\n        }\n    }\n    return viewMeasurer.getBoundingClientRect();\n}\nexport function getPointRect(x, y) {\n    const viewRect = ensureViewBoundingRect();\n    return {\n        top: y,\n        left: x,\n        height: 0,\n        width: 0,\n        right: viewRect.width - x,\n        bottom: viewRect.height - y\n    };\n}\nexport function getRect(el) {\n    const elRect = el.getBoundingClientRect();\n    const viewRect = ensureViewBoundingRect();\n    return {\n        left: elRect.left - viewRect.left,\n        top: elRect.top - viewRect.top,\n        bottom: viewRect.height + viewRect.top - elRect.bottom,\n        right: viewRect.width + viewRect.left - elRect.right,\n        width: elRect.width,\n        height: elRect.height\n    };\n}\nexport function getParentNode(node) {\n    // document type\n    if (node.nodeType === 9) {\n        return null;\n    }\n    return node.parentNode;\n}\nexport function getScrollParent(node) {\n    if (node === null)\n        return null;\n    const parentNode = getParentNode(node);\n    if (parentNode === null) {\n        return null;\n    }\n    // Document\n    if (parentNode.nodeType === 9) {\n        return document;\n    }\n    // Element\n    if (parentNode.nodeType === 1) {\n        // Firefox want us to check `-x` and `-y` variations as well\n        const { overflow, overflowX, overflowY } = getComputedStyle(parentNode);\n        if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) {\n            return parentNode;\n        }\n    }\n    return getScrollParent(parentNode);\n}\n","/* eslint-disable @typescript-eslint/no-non-null-assertion */\nimport { defineComponent, provide, ref, inject, getCurrentInstance, onBeforeUnmount } from 'vue';\nimport { beforeNextFrameOnce } from 'seemly';\nimport { on, off } from 'evtd';\nimport { getSlot } from '../../shared/v-node';\nimport { getScrollParent } from './utils';\nconst Binder = defineComponent({\n    name: 'Binder',\n    props: {\n        syncTargetWithParent: Boolean,\n        syncTarget: {\n            type: Boolean,\n            default: true\n        }\n    },\n    setup(props) {\n        var _a;\n        provide('VBinder', (_a = getCurrentInstance()) === null || _a === void 0 ? void 0 : _a.proxy);\n        const VBinder = inject('VBinder', null);\n        const targetRef = ref(null);\n        /**\n         * If there's no nested vbinder, we can simply set the target ref.\n         *\n         * However, when it comes to:\n         * <VBinder> <- syncTarget = false\n         *\n         *              Should hold target DOM ref, but can't get it directly from\n         *              its VTarget. So if there are nested VBinder, we should:\n         *              1. Stop setting target DOM from level-1 VTarget\n         *              2. Set target DOM from level-2 VTarget\n         *              For (1), we need `syncTarget` to `false`\n         *              For (2), we need to set `syncTargetWithParent` to `true` on\n         *              level-2 VBinder\n         *   <VTarget>\n         *     <VBinder> <- syncTargetWithParent = true\n         *       <VTarget>target</VTarget>\n         *     </VBinder>\n         *     <VFollower>\n         *       content1\n         *     </VFollower>\n         *   </VTarget>\n         *   <VFollower>\n         *     content2\n         *   </VFollower>\n         * </VBinder>\n         */\n        const setTargetRef = (el) => {\n            targetRef.value = el;\n            // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n            if (VBinder && props.syncTargetWithParent) {\n                VBinder.setTargetRef(el);\n            }\n        };\n        // scroll related\n        let scrollableNodes = [];\n        const ensureScrollListener = () => {\n            let cursor = targetRef.value;\n            while (true) {\n                cursor = getScrollParent(cursor);\n                if (cursor === null)\n                    break;\n                scrollableNodes.push(cursor);\n            }\n            for (const el of scrollableNodes) {\n                on('scroll', el, onScroll, true);\n            }\n        };\n        const removeScrollListeners = () => {\n            for (const el of scrollableNodes) {\n                off('scroll', el, onScroll, true);\n            }\n            scrollableNodes = [];\n        };\n        const followerScrollListeners = new Set();\n        const addScrollListener = (listener) => {\n            if (followerScrollListeners.size === 0) {\n                ensureScrollListener();\n            }\n            if (!followerScrollListeners.has(listener)) {\n                followerScrollListeners.add(listener);\n            }\n        };\n        const removeScrollListener = (listener) => {\n            if (followerScrollListeners.has(listener)) {\n                followerScrollListeners.delete(listener);\n            }\n            if (followerScrollListeners.size === 0) {\n                removeScrollListeners();\n            }\n        };\n        const onScroll = () => {\n            beforeNextFrameOnce(onScrollRaf);\n        };\n        const onScrollRaf = () => {\n            followerScrollListeners.forEach((listener) => listener());\n        };\n        // resize related\n        const followerResizeListeners = new Set();\n        const addResizeListener = (listener) => {\n            if (followerResizeListeners.size === 0) {\n                on('resize', window, onResize);\n            }\n            if (!followerResizeListeners.has(listener)) {\n                followerResizeListeners.add(listener);\n            }\n        };\n        const removeResizeListener = (listener) => {\n            if (followerResizeListeners.has(listener)) {\n                followerResizeListeners.delete(listener);\n            }\n            if (followerResizeListeners.size === 0) {\n                off('resize', window, onResize);\n            }\n        };\n        const onResize = () => {\n            followerResizeListeners.forEach((listener) => listener());\n        };\n        onBeforeUnmount(() => {\n            off('resize', window, onResize);\n            removeScrollListeners();\n        });\n        return {\n            targetRef,\n            setTargetRef,\n            addScrollListener,\n            removeScrollListener,\n            addResizeListener,\n            removeResizeListener\n        };\n    },\n    render() {\n        return getSlot('binder', this.$slots);\n    }\n});\nexport default Binder;\n","/* eslint-disable @typescript-eslint/no-non-null-assertion */\nimport { defineComponent, inject, withDirectives } from 'vue';\nimport { getFirstVNode } from '../../shared/v-node';\nexport default defineComponent({\n    name: 'Target',\n    setup() {\n        const { setTargetRef, syncTarget } = inject('VBinder');\n        const setTargetDirective = {\n            mounted: setTargetRef,\n            updated: setTargetRef\n        };\n        return {\n            syncTarget,\n            setTargetDirective\n        };\n    },\n    render() {\n        const { syncTarget, setTargetDirective } = this;\n        /**\n         * If you are using VBinder as a child of VBinder, the children wouldn't be\n         * a valid DOM or component that can be attached to by directive.\n         * So we won't sync target on those kind of situation and control the\n         * target sync logic manually.\n         */\n        if (syncTarget) {\n            return withDirectives(getFirstVNode('follower', this.$slots), [\n                [setTargetDirective]\n            ]);\n        }\n        return getFirstVNode('follower', this.$slots);\n    }\n});\n","import { on, off } from 'evtd';\nconst ctxKey = '@@mmoContext';\nconst mousemoveoutside = {\n    mounted(el, { value }) {\n        el[ctxKey] = {\n            handler: undefined\n        };\n        if (typeof value === 'function') {\n            el[ctxKey].handler = value;\n            on('mousemoveoutside', el, value);\n        }\n    },\n    updated(el, { value }) {\n        const ctx = el[ctxKey];\n        if (typeof value === 'function') {\n            if (ctx.handler) {\n                if (ctx.handler !== value) {\n                    off('mousemoveoutside', el, ctx.handler);\n                    ctx.handler = value;\n                    on('mousemoveoutside', el, value);\n                }\n            }\n            else {\n                el[ctxKey].handler = value;\n                on('mousemoveoutside', el, value);\n            }\n        }\n        else {\n            if (ctx.handler) {\n                off('mousemoveoutside', el, ctx.handler);\n                ctx.handler = undefined;\n            }\n        }\n    },\n    unmounted(el) {\n        const { handler } = el[ctxKey];\n        if (handler) {\n            off('mousemoveoutside', el, handler);\n        }\n        el[ctxKey].handler = undefined;\n    }\n};\nexport default mousemoveoutside;\n","import { on, off } from 'evtd';\nconst ctxKey = '@@coContext';\nconst clickoutside = {\n    mounted(el, { value, modifiers }) {\n        el[ctxKey] = {\n            handler: undefined\n        };\n        if (typeof value === 'function') {\n            el[ctxKey].handler = value;\n            on('clickoutside', el, value, {\n                capture: modifiers.capture\n            });\n        }\n    },\n    updated(el, { value, modifiers }) {\n        const ctx = el[ctxKey];\n        if (typeof value === 'function') {\n            if (ctx.handler) {\n                if (ctx.handler !== value) {\n                    off('clickoutside', el, ctx.handler, {\n                        capture: modifiers.capture\n                    });\n                    ctx.handler = value;\n                    on('clickoutside', el, value, {\n                        capture: modifiers.capture\n                    });\n                }\n            }\n            else {\n                el[ctxKey].handler = value;\n                on('clickoutside', el, value, {\n                    capture: modifiers.capture\n                });\n            }\n        }\n        else {\n            if (ctx.handler) {\n                off('clickoutside', el, ctx.handler, {\n                    capture: modifiers.capture\n                });\n                ctx.handler = undefined;\n            }\n        }\n    },\n    unmounted(el, { modifiers }) {\n        const { handler } = el[ctxKey];\n        if (handler) {\n            off('clickoutside', el, handler, {\n                capture: modifiers.capture\n            });\n        }\n        el[ctxKey].handler = undefined;\n    }\n};\nexport default clickoutside;\n","const warnedMessages = new Set();\nexport function warnOnce(location, message) {\n    const mergedMessage = `[vdirs/${location}]: ${message}`;\n    if (warnedMessages.has(mergedMessage))\n        return;\n    warnedMessages.add(mergedMessage);\n}\nexport function warn(location, message) {\n    console.error(`[vdirs/${location}]: ${message}`);\n}\n","import { warn } from '../utils';\nclass ZIndexManager {\n    constructor() {\n        this.elementZIndex = new Map();\n        this.nextZIndex = 2000;\n    }\n    get elementCount() {\n        return this.elementZIndex.size;\n    }\n    ensureZIndex(el, zIndex) {\n        const { elementZIndex } = this;\n        if (zIndex !== undefined) {\n            el.style.zIndex = `${zIndex}`;\n            elementZIndex.delete(el);\n            return;\n        }\n        const { nextZIndex } = this;\n        if (elementZIndex.has(el)) {\n            const currentZIndex = elementZIndex.get(el);\n            if (currentZIndex + 1 === this.nextZIndex)\n                return;\n        }\n        el.style.zIndex = `${nextZIndex}`;\n        elementZIndex.set(el, nextZIndex);\n        this.nextZIndex = nextZIndex + 1;\n        this.squashState();\n    }\n    unregister(el, zIndex) {\n        const { elementZIndex } = this;\n        if (elementZIndex.has(el)) {\n            elementZIndex.delete(el);\n        }\n        else if (zIndex === undefined) {\n            warn('z-index-manager/unregister-element', 'Element not found when unregistering.');\n        }\n        this.squashState();\n    }\n    squashState() {\n        const { elementCount } = this;\n        if (!elementCount) {\n            this.nextZIndex = 2000;\n        }\n        if (this.nextZIndex - elementCount > 2500)\n            this.rearrange();\n    }\n    rearrange() {\n        const elementZIndexPair = Array.from(this.elementZIndex.entries());\n        elementZIndexPair.sort((pair1, pair2) => {\n            return pair1[1] - pair2[1];\n        });\n        this.nextZIndex = 2000;\n        elementZIndexPair.forEach((pair) => {\n            const el = pair[0];\n            const zIndex = this.nextZIndex++;\n            if (`${zIndex}` !== el.style.zIndex)\n                el.style.zIndex = `${zIndex}`;\n        });\n    }\n}\nexport default new ZIndexManager();\n","import zIndexManager from './z-index-manager';\nconst ctx = '@@ziContext';\n// We don't expect manually bound zindex should be changed\nconst zindexable = {\n    mounted(el, bindings) {\n        const { value = {} } = bindings;\n        const { zIndex, enabled } = value;\n        el[ctx] = {\n            enabled: !!enabled,\n            initialized: false\n        };\n        if (enabled) {\n            zIndexManager.ensureZIndex(el, zIndex);\n            el[ctx].initialized = true;\n        }\n    },\n    updated(el, bindings) {\n        const { value = {} } = bindings;\n        const { zIndex, enabled } = value;\n        const cachedEnabled = el[ctx].enabled;\n        if (enabled && !cachedEnabled) {\n            zIndexManager.ensureZIndex(el, zIndex);\n            el[ctx].initialized = true;\n        }\n        el[ctx].enabled = !!enabled;\n    },\n    unmounted(el, bindings) {\n        if (!el[ctx].initialized)\n            return;\n        const { value = {} } = bindings;\n        const { zIndex } = value;\n        zIndexManager.unregister(el, zIndex);\n    }\n};\nexport default zindexable;\n","import { inject } from 'vue';\nconst ssrContextKey = '@css-render/vue3-ssr';\nfunction createStyleString(id, style) {\n    return `<style cssr-id=\"${id}\">\\n${style}\\n</style>`;\n}\nfunction ssrAdapter(id, style, ssrContext) {\n    const { styles, ids } = ssrContext;\n    // we need to impl other options to make it behaves the same as the client side\n    if (ids.has(id))\n        return;\n    if (styles !== null) {\n        ids.add(id);\n        styles.push(createStyleString(id, style));\n    }\n}\nconst isBrowser = typeof document !== 'undefined';\nexport function useSsrAdapter() {\n    if (isBrowser)\n        return undefined;\n    const context = inject(ssrContextKey, null);\n    if (context === null)\n        return undefined;\n    return {\n        adapter: (id, style) => ssrAdapter(id, style, context),\n        context\n    };\n}\nexport function setup(app) {\n    const styles = [];\n    const ssrContext = {\n        styles,\n        ids: new Set()\n    };\n    app.provide(ssrContextKey, ssrContext);\n    return {\n        collect() {\n            const res = styles.join('\\n');\n            styles.length = 0;\n            return res;\n        }\n    };\n}\n","export function warn(location, message) {\n    console.error(`[vueuc/${location}]: ${message}`);\n}\n","import { CssRender } from 'css-render';\nconst { c } = CssRender();\nexport { c };\nexport const cssrAnchorMetaName = 'vueuc-style';\n","function lowBit(n) {\n    return n & -n;\n}\nexport class FinweckTree {\n    /**\n     * @param l length of the array\n     * @param min min value of the array\n     */\n    constructor(l, min) {\n        this.l = l;\n        this.min = min;\n        const ft = new Array(l + 1);\n        for (let i = 0; i < l + 1; ++i) {\n            ft[i] = 0;\n        }\n        this.ft = ft;\n    }\n    /**\n     * Add arr[i] by n, start from 0\n     * @param i the index of the element to be added\n     * @param n the value to be added\n     */\n    add(i, n) {\n        if (n === 0)\n            return;\n        const { l, ft } = this;\n        i += 1;\n        while (i <= l) {\n            ft[i] += n;\n            i += lowBit(i);\n        }\n    }\n    /**\n     * Get the value of index i\n     * @param i index\n     * @returns value of the index\n     */\n    get(i) {\n        return this.sum(i + 1) - this.sum(i);\n    }\n    /**\n     * Get the sum of first i elements\n     * @param i count of head elements to be added\n     * @returns the sum of first i elements\n     */\n    sum(i) {\n        if (i === undefined)\n            i = this.l;\n        if (i <= 0)\n            return 0;\n        const { ft, min, l } = this;\n        if (i > l)\n            throw new Error('[FinweckTree.sum]: `i` is larger than length.');\n        let ret = i * min;\n        while (i > 0) {\n            ret += ft[i];\n            i -= lowBit(i);\n        }\n        return ret;\n    }\n    /**\n     * Get the largest count of head elements whose sum are <= threshold\n     * @param threshold\n     * @returns the largest count of head elements whose sum are <= threshold\n     */\n    getBound(threshold) {\n        let l = 0;\n        let r = this.l;\n        while (r > l) {\n            const m = Math.floor((l + r) / 2);\n            const sumM = this.sum(m);\n            if (sumM > threshold) {\n                r = m;\n                continue;\n            }\n            else if (sumM < threshold) {\n                if (l === m) {\n                    if (this.sum(l + 1) <= threshold)\n                        return l + 1;\n                    return m;\n                }\n                l = m;\n            }\n            else {\n                return m;\n            }\n        }\n        return l;\n    }\n}\n","export function resolveTo(selector) {\n    if (typeof selector === 'string') {\n        return document.querySelector(selector);\n    }\n    return selector();\n}\n","import { Teleport, h, toRef, computed, defineComponent } from 'vue';\nimport { useFalseUntilTruthy } from 'vooks';\nimport { getSlot } from '../../shared/v-node';\nexport default defineComponent({\n    name: 'LazyTeleport',\n    props: {\n        to: {\n            type: [String, Object],\n            default: undefined\n        },\n        disabled: Boolean,\n        show: {\n            type: Boolean,\n            required: true\n        }\n    },\n    setup(props) {\n        return {\n            showTeleport: useFalseUntilTruthy(toRef(props, 'show')),\n            mergedTo: computed(() => {\n                const { to } = props;\n                return to !== null && to !== void 0 ? to : 'body';\n            })\n        };\n    },\n    render() {\n        return this.showTeleport\n            ? this.disabled\n                ? getSlot('lazy-teleport', this.$slots)\n                : h(Teleport, {\n                    disabled: this.disabled,\n                    to: this.mergedTo\n                }, getSlot('lazy-teleport', this.$slots))\n            : null;\n    }\n});\n","const oppositionPositions = {\n    top: 'bottom',\n    bottom: 'top',\n    left: 'right',\n    right: 'left'\n};\nconst oppositeAligns = {\n    start: 'end',\n    center: 'center',\n    end: 'start'\n};\nconst propToCompare = {\n    top: 'height',\n    bottom: 'height',\n    left: 'width',\n    right: 'width'\n};\nconst transformOrigins = {\n    'bottom-start': 'top left',\n    bottom: 'top center',\n    'bottom-end': 'top right',\n    'top-start': 'bottom left',\n    top: 'bottom center',\n    'top-end': 'bottom right',\n    'right-start': 'top left',\n    right: 'center left',\n    'right-end': 'bottom left',\n    'left-start': 'top right',\n    left: 'center right',\n    'left-end': 'bottom right'\n};\nconst overlapTransformOrigin = {\n    'bottom-start': 'bottom left',\n    bottom: 'bottom center',\n    'bottom-end': 'bottom right',\n    'top-start': 'top left',\n    top: 'top center',\n    'top-end': 'top right',\n    'right-start': 'top right',\n    right: 'center right',\n    'right-end': 'bottom right',\n    'left-start': 'top left',\n    left: 'center left',\n    'left-end': 'bottom left'\n};\nconst oppositeAlignCssPositionProps = {\n    'bottom-start': 'right',\n    'bottom-end': 'left',\n    'top-start': 'right',\n    'top-end': 'left',\n    'right-start': 'bottom',\n    'right-end': 'top',\n    'left-start': 'bottom',\n    'left-end': 'top'\n};\nconst keepOffsetDirection = {\n    top: true,\n    bottom: false,\n    left: true,\n    right: false // left--\n};\nconst cssPositionToOppositeAlign = {\n    top: 'end',\n    bottom: 'start',\n    left: 'end',\n    right: 'start'\n};\nexport function getPlacementAndOffsetOfFollower(placement, targetRect, followerRect, shift, flip, overlap) {\n    if (!flip || overlap) {\n        return { placement: placement, top: 0, left: 0 };\n    }\n    const [position, align] = placement.split('-');\n    let properAlign = align !== null && align !== void 0 ? align : 'center';\n    let properOffset = {\n        top: 0,\n        left: 0\n    };\n    const deriveOffset = (oppositeAlignCssSizeProp, alignCssPositionProp, offsetVertically) => {\n        let left = 0;\n        let top = 0;\n        const diff = followerRect[oppositeAlignCssSizeProp] -\n            targetRect[alignCssPositionProp] -\n            targetRect[oppositeAlignCssSizeProp];\n        if (diff > 0 && shift) {\n            if (offsetVertically) {\n                //       screen border\n                // |-----------------------------------------|\n                // |                    | f  |               |\n                // |                    | o  |               |\n                // |                    | l  |               |\n                // |                    | l  |----           |\n                // |                    | o  |tar |          |\n                // |                    | w  |get |          |\n                // |                    | e  |    |          |\n                // |                    | r  |----           |\n                // |                     ----                |\n                // |-----------------------------------------|\n                top = keepOffsetDirection[alignCssPositionProp] ? diff : -diff;\n            }\n            else {\n                //       screen border\n                // |----------------------------------------|\n                // |                                        |\n                // |          ----------                    |\n                // |          | target |                    |\n                // |       ----------------------------------\n                // |       |       follower                 |\n                // |       ----------------------------------\n                // |                                        |\n                // |----------------------------------------|\n                left = keepOffsetDirection[alignCssPositionProp] ? diff : -diff;\n            }\n        }\n        return {\n            left,\n            top\n        };\n    };\n    const offsetVertically = position === 'left' || position === 'right';\n    // choose proper placement for non-center align\n    if (properAlign !== 'center') {\n        const oppositeAlignCssPositionProp = oppositeAlignCssPositionProps[placement];\n        const currentAlignCssPositionProp = oppositionPositions[oppositeAlignCssPositionProp];\n        const oppositeAlignCssSizeProp = propToCompare[oppositeAlignCssPositionProp];\n        // if follower rect is larger than target rect in align direction\n        // ----------[ target ]---------|\n        // ----------[     follower     ]\n        if (followerRect[oppositeAlignCssSizeProp] >\n            targetRect[oppositeAlignCssSizeProp]) {\n            if (\n            // current space is not enough\n            // ----------[ target ]---------|\n            // -------[     follower        ]\n            targetRect[oppositeAlignCssPositionProp] +\n                targetRect[oppositeAlignCssSizeProp] <\n                followerRect[oppositeAlignCssSizeProp]) {\n                const followerOverTargetSize = (followerRect[oppositeAlignCssSizeProp] -\n                    targetRect[oppositeAlignCssSizeProp]) /\n                    2;\n                if (targetRect[oppositeAlignCssPositionProp] < followerOverTargetSize ||\n                    targetRect[currentAlignCssPositionProp] < followerOverTargetSize) {\n                    // opposite align has larger space\n                    // -------[ target ]-----------|\n                    // -------[     follower     ]-|\n                    if (targetRect[oppositeAlignCssPositionProp] <\n                        targetRect[currentAlignCssPositionProp]) {\n                        properAlign = oppositeAligns[align];\n                        properOffset = deriveOffset(oppositeAlignCssSizeProp, currentAlignCssPositionProp, offsetVertically);\n                    }\n                    else {\n                        // ----------------[ target ]----|\n                        // --------[   follower     ]----|\n                        properOffset = deriveOffset(oppositeAlignCssSizeProp, oppositeAlignCssPositionProp, offsetVertically);\n                    }\n                }\n                else {\n                    // 'center' align is better\n                    // ------------[ target ]--------|\n                    // -------[       follower    ]--|\n                    properAlign = 'center';\n                }\n            }\n        }\n        else if (followerRect[oppositeAlignCssSizeProp] <\n            targetRect[oppositeAlignCssSizeProp]) {\n            // TODO: maybe center is better\n            if (targetRect[currentAlignCssPositionProp] < 0 &&\n                // opposite align has larger space\n                // ------------[   target   ]\n                // ----------------[follower]\n                targetRect[oppositeAlignCssPositionProp] >\n                    targetRect[currentAlignCssPositionProp]) {\n                properAlign = oppositeAligns[align];\n            }\n        }\n    }\n    else {\n        const possibleAlternativeAlignCssPositionProp1 = position === 'bottom' || position === 'top' ? 'left' : 'top';\n        const possibleAlternativeAlignCssPositionProp2 = oppositionPositions[possibleAlternativeAlignCssPositionProp1];\n        const alternativeAlignCssSizeProp = propToCompare[possibleAlternativeAlignCssPositionProp1];\n        const followerOverTargetSize = (followerRect[alternativeAlignCssSizeProp] -\n            targetRect[alternativeAlignCssSizeProp]) /\n            2;\n        if (\n        // center is not enough\n        // ----------- [ target ]--|\n        // -------[     follower     ]\n        targetRect[possibleAlternativeAlignCssPositionProp1] <\n            followerOverTargetSize ||\n            targetRect[possibleAlternativeAlignCssPositionProp2] <\n                followerOverTargetSize) {\n            // alternative 2 position's space is larger\n            if (targetRect[possibleAlternativeAlignCssPositionProp1] >\n                targetRect[possibleAlternativeAlignCssPositionProp2]) {\n                properAlign =\n                    cssPositionToOppositeAlign[possibleAlternativeAlignCssPositionProp1];\n                properOffset = deriveOffset(alternativeAlignCssSizeProp, possibleAlternativeAlignCssPositionProp1, offsetVertically);\n            }\n            else {\n                // alternative 1 position's space is larger\n                properAlign =\n                    cssPositionToOppositeAlign[possibleAlternativeAlignCssPositionProp2];\n                properOffset = deriveOffset(alternativeAlignCssSizeProp, possibleAlternativeAlignCssPositionProp2, offsetVertically);\n            }\n        }\n    }\n    let properPosition = position;\n    if (\n    // space is not enough\n    targetRect[position] < followerRect[propToCompare[position]] &&\n        // opposite position's space is larger\n        targetRect[position] < targetRect[oppositionPositions[position]]) {\n        properPosition = oppositionPositions[position];\n    }\n    return {\n        placement: properAlign !== 'center'\n            ? `${properPosition}-${properAlign}`\n            : properPosition,\n        left: properOffset.left,\n        top: properOffset.top\n    };\n}\nexport function getProperTransformOrigin(placement, overlap) {\n    if (overlap)\n        return overlapTransformOrigin[placement];\n    return transformOrigins[placement];\n}\n// ------------\n// |  offset  |\n// |          |\n// | [target] |\n// |          |\n// ------------\n// TODO: refactor it to remove dup logic\nexport function getOffset(placement, offsetRect, targetRect, offsetTopToStandardPlacement, offsetLeftToStandardPlacement, overlap) {\n    if (overlap) {\n        switch (placement) {\n            case 'bottom-start':\n                return {\n                    top: `${Math.round(targetRect.top - offsetRect.top + targetRect.height)}px`,\n                    left: `${Math.round(targetRect.left - offsetRect.left)}px`,\n                    transform: 'translateY(-100%)'\n                };\n            case 'bottom-end':\n                return {\n                    top: `${Math.round(targetRect.top - offsetRect.top + targetRect.height)}px`,\n                    left: `${Math.round(targetRect.left - offsetRect.left + targetRect.width)}px`,\n                    transform: 'translateX(-100%) translateY(-100%)'\n                };\n            case 'top-start':\n                return {\n                    top: `${Math.round(targetRect.top - offsetRect.top)}px`,\n                    left: `${Math.round(targetRect.left - offsetRect.left)}px`,\n                    transform: ''\n                };\n            case 'top-end':\n                return {\n                    top: `${Math.round(targetRect.top - offsetRect.top)}px`,\n                    left: `${Math.round(targetRect.left - offsetRect.left + targetRect.width)}px`,\n                    transform: 'translateX(-100%)'\n                };\n            case 'right-start':\n                return {\n                    top: `${Math.round(targetRect.top - offsetRect.top)}px`,\n                    left: `${Math.round(targetRect.left - offsetRect.left + targetRect.width)}px`,\n                    transform: 'translateX(-100%)'\n                };\n            case 'right-end':\n                return {\n                    top: `${Math.round(targetRect.top - offsetRect.top + targetRect.height)}px`,\n                    left: `${Math.round(targetRect.left - offsetRect.left + targetRect.width)}px`,\n                    transform: 'translateX(-100%) translateY(-100%)'\n                };\n            case 'left-start':\n                return {\n                    top: `${Math.round(targetRect.top - offsetRect.top)}px`,\n                    left: `${Math.round(targetRect.left - offsetRect.left)}px`,\n                    transform: ''\n                };\n            case 'left-end':\n                return {\n                    top: `${Math.round(targetRect.top - offsetRect.top + targetRect.height)}px`,\n                    left: `${Math.round(targetRect.left - offsetRect.left)}px`,\n                    transform: 'translateY(-100%)'\n                };\n            case 'top':\n                return {\n                    top: `${Math.round(targetRect.top - offsetRect.top)}px`,\n                    left: `${Math.round(targetRect.left - offsetRect.left + targetRect.width / 2)}px`,\n                    transform: 'translateX(-50%)'\n                };\n            case 'right':\n                return {\n                    top: `${Math.round(targetRect.top - offsetRect.top + targetRect.height / 2)}px`,\n                    left: `${Math.round(targetRect.left - offsetRect.left + targetRect.width)}px`,\n                    transform: 'translateX(-100%) translateY(-50%)'\n                };\n            case 'left':\n                return {\n                    top: `${Math.round(targetRect.top - offsetRect.top + targetRect.height / 2)}px`,\n                    left: `${Math.round(targetRect.left - offsetRect.left)}px`,\n                    transform: 'translateY(-50%)'\n                };\n            case 'bottom':\n            default:\n                return {\n                    top: `${Math.round(targetRect.top - offsetRect.top + targetRect.height)}px`,\n                    left: `${Math.round(targetRect.left - offsetRect.left + targetRect.width / 2)}px`,\n                    transform: 'translateX(-50%) translateY(-100%)'\n                };\n        }\n    }\n    switch (placement) {\n        case 'bottom-start':\n            return {\n                top: `${Math.round(targetRect.top -\n                    offsetRect.top +\n                    targetRect.height +\n                    offsetTopToStandardPlacement)}px`,\n                left: `${Math.round(targetRect.left - offsetRect.left + offsetLeftToStandardPlacement)}px`,\n                transform: ''\n            };\n        case 'bottom-end':\n            return {\n                top: `${Math.round(targetRect.top -\n                    offsetRect.top +\n                    targetRect.height +\n                    offsetTopToStandardPlacement)}px`,\n                left: `${Math.round(targetRect.left -\n                    offsetRect.left +\n                    targetRect.width +\n                    offsetLeftToStandardPlacement)}px`,\n                transform: 'translateX(-100%)'\n            };\n        case 'top-start':\n            return {\n                top: `${Math.round(targetRect.top - offsetRect.top + offsetTopToStandardPlacement)}px`,\n                left: `${Math.round(targetRect.left - offsetRect.left + offsetLeftToStandardPlacement)}px`,\n                transform: 'translateY(-100%)'\n            };\n        case 'top-end':\n            return {\n                top: `${Math.round(targetRect.top - offsetRect.top + offsetTopToStandardPlacement)}px`,\n                left: `${Math.round(targetRect.left -\n                    offsetRect.left +\n                    targetRect.width +\n                    offsetLeftToStandardPlacement)}px`,\n                transform: 'translateX(-100%) translateY(-100%)'\n            };\n        case 'right-start':\n            return {\n                top: `${Math.round(targetRect.top - offsetRect.top + offsetTopToStandardPlacement)}px`,\n                left: `${Math.round(targetRect.left -\n                    offsetRect.left +\n                    targetRect.width +\n                    offsetLeftToStandardPlacement)}px`,\n                transform: ''\n            };\n        case 'right-end':\n            return {\n                top: `${Math.round(targetRect.top -\n                    offsetRect.top +\n                    targetRect.height +\n                    offsetTopToStandardPlacement)}px`,\n                left: `${Math.round(targetRect.left -\n                    offsetRect.left +\n                    targetRect.width +\n                    offsetLeftToStandardPlacement)}px`,\n                transform: 'translateY(-100%)'\n            };\n        case 'left-start':\n            return {\n                top: `${Math.round(targetRect.top - offsetRect.top + offsetTopToStandardPlacement)}px`,\n                left: `${Math.round(targetRect.left - offsetRect.left + offsetLeftToStandardPlacement)}px`,\n                transform: 'translateX(-100%)'\n            };\n        case 'left-end':\n            return {\n                top: `${Math.round(targetRect.top -\n                    offsetRect.top +\n                    targetRect.height +\n                    offsetTopToStandardPlacement)}px`,\n                left: `${Math.round(targetRect.left - offsetRect.left + offsetLeftToStandardPlacement)}px`,\n                transform: 'translateX(-100%) translateY(-100%)'\n            };\n        case 'top':\n            return {\n                top: `${Math.round(targetRect.top - offsetRect.top + offsetTopToStandardPlacement)}px`,\n                left: `${Math.round(targetRect.left -\n                    offsetRect.left +\n                    targetRect.width / 2 +\n                    offsetLeftToStandardPlacement)}px`,\n                transform: 'translateY(-100%) translateX(-50%)'\n            };\n        case 'right':\n            return {\n                top: `${Math.round(targetRect.top -\n                    offsetRect.top +\n                    targetRect.height / 2 +\n                    offsetTopToStandardPlacement)}px`,\n                left: `${Math.round(targetRect.left -\n                    offsetRect.left +\n                    targetRect.width +\n                    offsetLeftToStandardPlacement)}px`,\n                transform: 'translateY(-50%)'\n            };\n        case 'left':\n            return {\n                top: `${Math.round(targetRect.top -\n                    offsetRect.top +\n                    targetRect.height / 2 +\n                    offsetTopToStandardPlacement)}px`,\n                left: `${Math.round(targetRect.left - offsetRect.left + offsetLeftToStandardPlacement)}px`,\n                transform: 'translateY(-50%) translateX(-100%)'\n            };\n        case 'bottom':\n        default:\n            return {\n                top: `${Math.round(targetRect.top -\n                    offsetRect.top +\n                    targetRect.height +\n                    offsetTopToStandardPlacement)}px`,\n                left: `${Math.round(targetRect.left -\n                    offsetRect.left +\n                    targetRect.width / 2 +\n                    offsetLeftToStandardPlacement)}px`,\n                transform: 'translateX(-50%)'\n            };\n    }\n}\n","/* eslint-disable @typescript-eslint/no-non-null-assertion */\nimport { h, defineComponent, inject, nextTick, watch, toRef, ref, onMounted, onBeforeUnmount, withDirectives } from 'vue';\nimport { zindexable } from 'vdirs';\nimport { useMemo, useIsMounted, onFontsReady } from 'vooks';\nimport { useSsrAdapter } from '@css-render/vue3-ssr';\nimport { c, cssrAnchorMetaName } from '../../shared';\nimport LazyTeleport from '../../lazy-teleport/src/index';\nimport { getPlacementAndOffsetOfFollower, getProperTransformOrigin, getOffset } from './get-placement-style';\nimport { getPointRect, getRect } from './utils';\nconst style = c([\n    c('.v-binder-follower-container', {\n        position: 'absolute',\n        left: '0',\n        right: '0',\n        top: '0',\n        height: '0',\n        pointerEvents: 'none',\n        zIndex: 'auto'\n    }),\n    c('.v-binder-follower-content', {\n        position: 'absolute',\n        zIndex: 'auto'\n    }, [\n        c('> *', {\n            pointerEvents: 'all'\n        })\n    ])\n]);\nexport default defineComponent({\n    name: 'Follower',\n    inheritAttrs: false,\n    props: {\n        show: Boolean,\n        enabled: {\n            type: Boolean,\n            default: undefined\n        },\n        placement: {\n            type: String,\n            default: 'bottom'\n        },\n        syncTrigger: {\n            type: Array,\n            default: ['resize', 'scroll']\n        },\n        to: [String, Object],\n        flip: {\n            type: Boolean,\n            default: true\n        },\n        internalShift: Boolean,\n        x: Number,\n        y: Number,\n        width: String,\n        minWidth: String,\n        containerClass: String,\n        teleportDisabled: Boolean,\n        zindexable: {\n            type: Boolean,\n            default: true\n        },\n        zIndex: Number,\n        overlap: Boolean\n    },\n    setup(props) {\n        const VBinder = inject('VBinder');\n        const mergedEnabledRef = useMemo(() => {\n            return props.enabled !== undefined ? props.enabled : props.show;\n        });\n        const followerRef = ref(null);\n        const offsetContainerRef = ref(null);\n        const ensureListeners = () => {\n            const { syncTrigger } = props;\n            if (syncTrigger.includes('scroll')) {\n                VBinder.addScrollListener(syncPosition);\n            }\n            if (syncTrigger.includes('resize')) {\n                VBinder.addResizeListener(syncPosition);\n            }\n        };\n        const removeListeners = () => {\n            VBinder.removeScrollListener(syncPosition);\n            VBinder.removeResizeListener(syncPosition);\n        };\n        onMounted(() => {\n            if (mergedEnabledRef.value) {\n                syncPosition();\n                ensureListeners();\n            }\n        });\n        const ssrAdapter = useSsrAdapter();\n        style.mount({\n            id: 'vueuc/binder',\n            head: true,\n            anchorMetaName: cssrAnchorMetaName,\n            ssr: ssrAdapter\n        });\n        onBeforeUnmount(() => {\n            removeListeners();\n        });\n        onFontsReady(() => {\n            if (mergedEnabledRef.value) {\n                syncPosition();\n            }\n        });\n        const syncPosition = () => {\n            if (!mergedEnabledRef.value) {\n                return;\n            }\n            const follower = followerRef.value;\n            // sometimes watched props change before its dom is ready\n            // for example: show=false, x=undefined, y=undefined\n            //              show=true,  x=0,         y=0\n            // will cause error\n            // I may optimize the watch start point later\n            if (follower === null)\n                return;\n            const target = VBinder.targetRef;\n            const { x, y, overlap } = props;\n            const targetRect = x !== undefined && y !== undefined\n                ? getPointRect(x, y)\n                : getRect(target);\n            follower.style.setProperty('--v-target-width', `${Math.round(targetRect.width)}px`);\n            follower.style.setProperty('--v-target-height', `${Math.round(targetRect.height)}px`);\n            const { width, minWidth, placement, internalShift, flip } = props;\n            follower.setAttribute('v-placement', placement);\n            if (overlap) {\n                follower.setAttribute('v-overlap', '');\n            }\n            else {\n                follower.removeAttribute('v-overlap');\n            }\n            const { style } = follower;\n            if (width === 'target') {\n                style.width = `${targetRect.width}px`;\n            }\n            else if (width !== undefined) {\n                style.width = width;\n            }\n            else {\n                style.width = '';\n            }\n            if (minWidth === 'target') {\n                style.minWidth = `${targetRect.width}px`;\n            }\n            else if (minWidth !== undefined) {\n                style.minWidth = minWidth;\n            }\n            else {\n                style.minWidth = '';\n            }\n            const followerRect = getRect(follower);\n            const offsetContainerRect = getRect(offsetContainerRef.value);\n            const { left: offsetLeftToStandardPlacement, top: offsetTopToStandardPlacement, placement: properPlacement } = getPlacementAndOffsetOfFollower(placement, targetRect, followerRect, internalShift, flip, overlap);\n            const properTransformOrigin = getProperTransformOrigin(properPlacement, overlap);\n            const { left, top, transform } = getOffset(properPlacement, offsetContainerRect, targetRect, offsetTopToStandardPlacement, offsetLeftToStandardPlacement, overlap);\n            // we assume that the content size doesn't change after flip,\n            // nor we need to make sync logic more complex\n            follower.setAttribute('v-placement', properPlacement);\n            follower.style.setProperty('--v-offset-left', `${Math.round(offsetLeftToStandardPlacement)}px`);\n            follower.style.setProperty('--v-offset-top', `${Math.round(offsetTopToStandardPlacement)}px`);\n            follower.style.transform = `translateX(${left}) translateY(${top}) ${transform}`;\n            follower.style.setProperty('--v-transform-origin', properTransformOrigin);\n            follower.style.transformOrigin = properTransformOrigin;\n        };\n        watch(mergedEnabledRef, (value) => {\n            if (value) {\n                ensureListeners();\n                syncOnNextTick();\n            }\n            else {\n                removeListeners();\n            }\n        });\n        const syncOnNextTick = () => {\n            nextTick()\n                .then(syncPosition)\n                .catch((e) => console.error(e));\n        };\n        [\n            'placement',\n            'x',\n            'y',\n            'internalShift',\n            'flip',\n            'width',\n            'overlap',\n            'minWidth'\n        ].forEach((prop) => {\n            watch(toRef(props, prop), syncPosition);\n        });\n        ['teleportDisabled'].forEach((prop) => {\n            watch(toRef(props, prop), syncOnNextTick);\n        });\n        watch(toRef(props, 'syncTrigger'), (value) => {\n            if (!value.includes('resize')) {\n                VBinder.removeResizeListener(syncPosition);\n            }\n            else {\n                VBinder.addResizeListener(syncPosition);\n            }\n            if (!value.includes('scroll')) {\n                VBinder.removeScrollListener(syncPosition);\n            }\n            else {\n                VBinder.addScrollListener(syncPosition);\n            }\n        });\n        const isMountedRef = useIsMounted();\n        const mergedToRef = useMemo(() => {\n            const { to } = props;\n            if (to !== undefined)\n                return to;\n            if (isMountedRef.value) {\n                // TODO: find proper container\n                return undefined;\n            }\n            return undefined;\n        });\n        return {\n            VBinder,\n            mergedEnabled: mergedEnabledRef,\n            offsetContainerRef,\n            followerRef,\n            mergedTo: mergedToRef,\n            syncPosition\n        };\n    },\n    render() {\n        return h(LazyTeleport, {\n            show: this.show,\n            to: this.mergedTo,\n            disabled: this.teleportDisabled\n        }, {\n            default: () => {\n                var _a, _b;\n                const vNode = h('div', {\n                    class: ['v-binder-follower-container', this.containerClass],\n                    ref: 'offsetContainerRef'\n                }, [\n                    h('div', {\n                        class: 'v-binder-follower-content',\n                        ref: 'followerRef'\n                    }, (_b = (_a = this.$slots).default) === null || _b === void 0 ? void 0 : _b.call(_a))\n                ]);\n                if (this.zindexable) {\n                    return withDirectives(vNode, [\n                        [\n                            zindexable,\n                            {\n                                enabled: this.mergedEnabled,\n                                zIndex: this.zIndex\n                            }\n                        ]\n                    ]);\n                }\n                return vNode;\n            }\n        });\n    }\n});\n","var resizeObservers = [];\nexport { resizeObservers };\n","import { resizeObservers } from '../utils/resizeObservers';\nvar hasActiveObservations = function () {\n    return resizeObservers.some(function (ro) { return ro.activeTargets.length > 0; });\n};\nexport { hasActiveObservations };\n","import { resizeObservers } from '../utils/resizeObservers';\nvar hasSkippedObservations = function () {\n    return resizeObservers.some(function (ro) { return ro.skippedTargets.length > 0; });\n};\nexport { hasSkippedObservations };\n","var msg = 'ResizeObserver loop completed with undelivered notifications.';\nvar deliverResizeLoopError = function () {\n    var event;\n    if (typeof ErrorEvent === 'function') {\n        event = new ErrorEvent('error', {\n            message: msg\n        });\n    }\n    else {\n        event = document.createEvent('Event');\n        event.initEvent('error', false, false);\n        event.message = msg;\n    }\n    window.dispatchEvent(event);\n};\nexport { deliverResizeLoopError };\n","var ResizeObserverBoxOptions;\n(function (ResizeObserverBoxOptions) {\n    ResizeObserverBoxOptions[\"BORDER_BOX\"] = \"border-box\";\n    ResizeObserverBoxOptions[\"CONTENT_BOX\"] = \"content-box\";\n    ResizeObserverBoxOptions[\"DEVICE_PIXEL_CONTENT_BOX\"] = \"device-pixel-content-box\";\n})(ResizeObserverBoxOptions || (ResizeObserverBoxOptions = {}));\nexport { ResizeObserverBoxOptions };\n","export var freeze = function (obj) { return Object.freeze(obj); };\n","import { freeze } from './utils/freeze';\nvar ResizeObserverSize = (function () {\n    function ResizeObserverSize(inlineSize, blockSize) {\n        this.inlineSize = inlineSize;\n        this.blockSize = blockSize;\n        freeze(this);\n    }\n    return ResizeObserverSize;\n}());\nexport { ResizeObserverSize };\n","import { freeze } from './utils/freeze';\nvar DOMRectReadOnly = (function () {\n    function DOMRectReadOnly(x, y, width, height) {\n        this.x = x;\n        this.y = y;\n        this.width = width;\n        this.height = height;\n        this.top = this.y;\n        this.left = this.x;\n        this.bottom = this.top + this.height;\n        this.right = this.left + this.width;\n        return freeze(this);\n    }\n    DOMRectReadOnly.prototype.toJSON = function () {\n        var _a = this, x = _a.x, y = _a.y, top = _a.top, right = _a.right, bottom = _a.bottom, left = _a.left, width = _a.width, height = _a.height;\n        return { x: x, y: y, top: top, right: right, bottom: bottom, left: left, width: width, height: height };\n    };\n    DOMRectReadOnly.fromRect = function (rectangle) {\n        return new DOMRectReadOnly(rectangle.x, rectangle.y, rectangle.width, rectangle.height);\n    };\n    return DOMRectReadOnly;\n}());\nexport { DOMRectReadOnly };\n","var isSVG = function (target) { return target instanceof SVGElement && 'getBBox' in target; };\nvar isHidden = function (target) {\n    if (isSVG(target)) {\n        var _a = target.getBBox(), width = _a.width, height = _a.height;\n        return !width && !height;\n    }\n    var _b = target, offsetWidth = _b.offsetWidth, offsetHeight = _b.offsetHeight;\n    return !(offsetWidth || offsetHeight || target.getClientRects().length);\n};\nvar isElement = function (obj) {\n    var _a;\n    if (obj instanceof Element) {\n        return true;\n    }\n    var scope = (_a = obj === null || obj === void 0 ? void 0 : obj.ownerDocument) === null || _a === void 0 ? void 0 : _a.defaultView;\n    return !!(scope && obj instanceof scope.Element);\n};\nvar isReplacedElement = function (target) {\n    switch (target.tagName) {\n        case 'INPUT':\n            if (target.type !== 'image') {\n                break;\n            }\n        case 'VIDEO':\n        case 'AUDIO':\n        case 'EMBED':\n        case 'OBJECT':\n        case 'CANVAS':\n        case 'IFRAME':\n        case 'IMG':\n            return true;\n    }\n    return false;\n};\nexport { isSVG, isHidden, isElement, isReplacedElement };\n","export var global = typeof window !== 'undefined' ? window : {};\n","import { ResizeObserverBoxOptions } from '../ResizeObserverBoxOptions';\nimport { ResizeObserverSize } from '../ResizeObserverSize';\nimport { DOMRectReadOnly } from '../DOMRectReadOnly';\nimport { isSVG, isHidden } from '../utils/element';\nimport { freeze } from '../utils/freeze';\nimport { global } from '../utils/global';\nvar cache = new WeakMap();\nvar scrollRegexp = /auto|scroll/;\nvar verticalRegexp = /^tb|vertical/;\nvar IE = (/msie|trident/i).test(global.navigator && global.navigator.userAgent);\nvar parseDimension = function (pixel) { return parseFloat(pixel || '0'); };\nvar size = function (inlineSize, blockSize, switchSizes) {\n    if (inlineSize === void 0) { inlineSize = 0; }\n    if (blockSize === void 0) { blockSize = 0; }\n    if (switchSizes === void 0) { switchSizes = false; }\n    return new ResizeObserverSize((switchSizes ? blockSize : inlineSize) || 0, (switchSizes ? inlineSize : blockSize) || 0);\n};\nvar zeroBoxes = freeze({\n    devicePixelContentBoxSize: size(),\n    borderBoxSize: size(),\n    contentBoxSize: size(),\n    contentRect: new DOMRectReadOnly(0, 0, 0, 0)\n});\nvar calculateBoxSizes = function (target, forceRecalculation) {\n    if (forceRecalculation === void 0) { forceRecalculation = false; }\n    if (cache.has(target) && !forceRecalculation) {\n        return cache.get(target);\n    }\n    if (isHidden(target)) {\n        cache.set(target, zeroBoxes);\n        return zeroBoxes;\n    }\n    var cs = getComputedStyle(target);\n    var svg = isSVG(target) && target.ownerSVGElement && target.getBBox();\n    var removePadding = !IE && cs.boxSizing === 'border-box';\n    var switchSizes = verticalRegexp.test(cs.writingMode || '');\n    var canScrollVertically = !svg && scrollRegexp.test(cs.overflowY || '');\n    var canScrollHorizontally = !svg && scrollRegexp.test(cs.overflowX || '');\n    var paddingTop = svg ? 0 : parseDimension(cs.paddingTop);\n    var paddingRight = svg ? 0 : parseDimension(cs.paddingRight);\n    var paddingBottom = svg ? 0 : parseDimension(cs.paddingBottom);\n    var paddingLeft = svg ? 0 : parseDimension(cs.paddingLeft);\n    var borderTop = svg ? 0 : parseDimension(cs.borderTopWidth);\n    var borderRight = svg ? 0 : parseDimension(cs.borderRightWidth);\n    var borderBottom = svg ? 0 : parseDimension(cs.borderBottomWidth);\n    var borderLeft = svg ? 0 : parseDimension(cs.borderLeftWidth);\n    var horizontalPadding = paddingLeft + paddingRight;\n    var verticalPadding = paddingTop + paddingBottom;\n    var horizontalBorderArea = borderLeft + borderRight;\n    var verticalBorderArea = borderTop + borderBottom;\n    var horizontalScrollbarThickness = !canScrollHorizontally ? 0 : target.offsetHeight - verticalBorderArea - target.clientHeight;\n    var verticalScrollbarThickness = !canScrollVertically ? 0 : target.offsetWidth - horizontalBorderArea - target.clientWidth;\n    var widthReduction = removePadding ? horizontalPadding + horizontalBorderArea : 0;\n    var heightReduction = removePadding ? verticalPadding + verticalBorderArea : 0;\n    var contentWidth = svg ? svg.width : parseDimension(cs.width) - widthReduction - verticalScrollbarThickness;\n    var contentHeight = svg ? svg.height : parseDimension(cs.height) - heightReduction - horizontalScrollbarThickness;\n    var borderBoxWidth = contentWidth + horizontalPadding + verticalScrollbarThickness + horizontalBorderArea;\n    var borderBoxHeight = contentHeight + verticalPadding + horizontalScrollbarThickness + verticalBorderArea;\n    var boxes = freeze({\n        devicePixelContentBoxSize: size(Math.round(contentWidth * devicePixelRatio), Math.round(contentHeight * devicePixelRatio), switchSizes),\n        borderBoxSize: size(borderBoxWidth, borderBoxHeight, switchSizes),\n        contentBoxSize: size(contentWidth, contentHeight, switchSizes),\n        contentRect: new DOMRectReadOnly(paddingLeft, paddingTop, contentWidth, contentHeight)\n    });\n    cache.set(target, boxes);\n    return boxes;\n};\nvar calculateBoxSize = function (target, observedBox, forceRecalculation) {\n    var _a = calculateBoxSizes(target, forceRecalculation), borderBoxSize = _a.borderBoxSize, contentBoxSize = _a.contentBoxSize, devicePixelContentBoxSize = _a.devicePixelContentBoxSize;\n    switch (observedBox) {\n        case ResizeObserverBoxOptions.DEVICE_PIXEL_CONTENT_BOX:\n            return devicePixelContentBoxSize;\n        case ResizeObserverBoxOptions.BORDER_BOX:\n            return borderBoxSize;\n        default:\n            return contentBoxSize;\n    }\n};\nexport { calculateBoxSize, calculateBoxSizes };\n","import { calculateBoxSizes } from './algorithms/calculateBoxSize';\nimport { freeze } from './utils/freeze';\nvar ResizeObserverEntry = (function () {\n    function ResizeObserverEntry(target) {\n        var boxes = calculateBoxSizes(target);\n        this.target = target;\n        this.contentRect = boxes.contentRect;\n        this.borderBoxSize = freeze([boxes.borderBoxSize]);\n        this.contentBoxSize = freeze([boxes.contentBoxSize]);\n        this.devicePixelContentBoxSize = freeze([boxes.devicePixelContentBoxSize]);\n    }\n    return ResizeObserverEntry;\n}());\nexport { ResizeObserverEntry };\n","import { isHidden } from '../utils/element';\nvar calculateDepthForNode = function (node) {\n    if (isHidden(node)) {\n        return Infinity;\n    }\n    var depth = 0;\n    var parent = node.parentNode;\n    while (parent) {\n        depth += 1;\n        parent = parent.parentNode;\n    }\n    return depth;\n};\nexport { calculateDepthForNode };\n","import { resizeObservers } from '../utils/resizeObservers';\nimport { ResizeObserverEntry } from '../ResizeObserverEntry';\nimport { calculateDepthForNode } from './calculateDepthForNode';\nimport { calculateBoxSize } from './calculateBoxSize';\nvar broadcastActiveObservations = function () {\n    var shallowestDepth = Infinity;\n    var callbacks = [];\n    resizeObservers.forEach(function processObserver(ro) {\n        if (ro.activeTargets.length === 0) {\n            return;\n        }\n        var entries = [];\n        ro.activeTargets.forEach(function processTarget(ot) {\n            var entry = new ResizeObserverEntry(ot.target);\n            var targetDepth = calculateDepthForNode(ot.target);\n            entries.push(entry);\n            ot.lastReportedSize = calculateBoxSize(ot.target, ot.observedBox);\n            if (targetDepth < shallowestDepth) {\n                shallowestDepth = targetDepth;\n            }\n        });\n        callbacks.push(function resizeObserverCallback() {\n            ro.callback.call(ro.observer, entries, ro.observer);\n        });\n        ro.activeTargets.splice(0, ro.activeTargets.length);\n    });\n    for (var _i = 0, callbacks_1 = callbacks; _i < callbacks_1.length; _i++) {\n        var callback = callbacks_1[_i];\n        callback();\n    }\n    return shallowestDepth;\n};\nexport { broadcastActiveObservations };\n","import { resizeObservers } from '../utils/resizeObservers';\nimport { calculateDepthForNode } from './calculateDepthForNode';\nvar gatherActiveObservationsAtDepth = function (depth) {\n    resizeObservers.forEach(function processObserver(ro) {\n        ro.activeTargets.splice(0, ro.activeTargets.length);\n        ro.skippedTargets.splice(0, ro.skippedTargets.length);\n        ro.observationTargets.forEach(function processTarget(ot) {\n            if (ot.isActive()) {\n                if (calculateDepthForNode(ot.target) > depth) {\n                    ro.activeTargets.push(ot);\n                }\n                else {\n                    ro.skippedTargets.push(ot);\n                }\n            }\n        });\n    });\n};\nexport { gatherActiveObservationsAtDepth };\n","import { hasActiveObservations } from '../algorithms/hasActiveObservations';\nimport { hasSkippedObservations } from '../algorithms/hasSkippedObservations';\nimport { deliverResizeLoopError } from '../algorithms/deliverResizeLoopError';\nimport { broadcastActiveObservations } from '../algorithms/broadcastActiveObservations';\nimport { gatherActiveObservationsAtDepth } from '../algorithms/gatherActiveObservationsAtDepth';\nvar process = function () {\n    var depth = 0;\n    gatherActiveObservationsAtDepth(depth);\n    while (hasActiveObservations()) {\n        depth = broadcastActiveObservations();\n        gatherActiveObservationsAtDepth(depth);\n    }\n    if (hasSkippedObservations()) {\n        deliverResizeLoopError();\n    }\n    return depth > 0;\n};\nexport { process };\n","var trigger;\nvar callbacks = [];\nvar notify = function () { return callbacks.splice(0).forEach(function (cb) { return cb(); }); };\nvar queueMicroTask = function (callback) {\n    if (!trigger) {\n        var toggle_1 = 0;\n        var el_1 = document.createTextNode('');\n        var config = { characterData: true };\n        new MutationObserver(function () { return notify(); }).observe(el_1, config);\n        trigger = function () { el_1.textContent = \"\".concat(toggle_1 ? toggle_1-- : toggle_1++); };\n    }\n    callbacks.push(callback);\n    trigger();\n};\nexport { queueMicroTask };\n","import { queueMicroTask } from './queueMicroTask';\nvar queueResizeObserver = function (cb) {\n    queueMicroTask(function ResizeObserver() {\n        requestAnimationFrame(cb);\n    });\n};\nexport { queueResizeObserver };\n","import { process } from './process';\nimport { global } from './global';\nimport { queueResizeObserver } from './queueResizeObserver';\nvar watching = 0;\nvar isWatching = function () { return !!watching; };\nvar CATCH_PERIOD = 250;\nvar observerConfig = { attributes: true, characterData: true, childList: true, subtree: true };\nvar events = [\n    'resize',\n    'load',\n    'transitionend',\n    'animationend',\n    'animationstart',\n    'animationiteration',\n    'keyup',\n    'keydown',\n    'mouseup',\n    'mousedown',\n    'mouseover',\n    'mouseout',\n    'blur',\n    'focus'\n];\nvar time = function (timeout) {\n    if (timeout === void 0) { timeout = 0; }\n    return Date.now() + timeout;\n};\nvar scheduled = false;\nvar Scheduler = (function () {\n    function Scheduler() {\n        var _this = this;\n        this.stopped = true;\n        this.listener = function () { return _this.schedule(); };\n    }\n    Scheduler.prototype.run = function (timeout) {\n        var _this = this;\n        if (timeout === void 0) { timeout = CATCH_PERIOD; }\n        if (scheduled) {\n            return;\n        }\n        scheduled = true;\n        var until = time(timeout);\n        queueResizeObserver(function () {\n            var elementsHaveResized = false;\n            try {\n                elementsHaveResized = process();\n            }\n            finally {\n                scheduled = false;\n                timeout = until - time();\n                if (!isWatching()) {\n                    return;\n                }\n                if (elementsHaveResized) {\n                    _this.run(1000);\n                }\n                else if (timeout > 0) {\n                    _this.run(timeout);\n                }\n                else {\n                    _this.start();\n                }\n            }\n        });\n    };\n    Scheduler.prototype.schedule = function () {\n        this.stop();\n        this.run();\n    };\n    Scheduler.prototype.observe = function () {\n        var _this = this;\n        var cb = function () { return _this.observer && _this.observer.observe(document.body, observerConfig); };\n        document.body ? cb() : global.addEventListener('DOMContentLoaded', cb);\n    };\n    Scheduler.prototype.start = function () {\n        var _this = this;\n        if (this.stopped) {\n            this.stopped = false;\n            this.observer = new MutationObserver(this.listener);\n            this.observe();\n            events.forEach(function (name) { return global.addEventListener(name, _this.listener, true); });\n        }\n    };\n    Scheduler.prototype.stop = function () {\n        var _this = this;\n        if (!this.stopped) {\n            this.observer && this.observer.disconnect();\n            events.forEach(function (name) { return global.removeEventListener(name, _this.listener, true); });\n            this.stopped = true;\n        }\n    };\n    return Scheduler;\n}());\nvar scheduler = new Scheduler();\nvar updateCount = function (n) {\n    !watching && n > 0 && scheduler.start();\n    watching += n;\n    !watching && scheduler.stop();\n};\nexport { scheduler, updateCount };\n","import { ResizeObserverBoxOptions } from './ResizeObserverBoxOptions';\nimport { calculateBoxSize } from './algorithms/calculateBoxSize';\nimport { isSVG, isReplacedElement } from './utils/element';\nvar skipNotifyOnElement = function (target) {\n    return !isSVG(target)\n        && !isReplacedElement(target)\n        && getComputedStyle(target).display === 'inline';\n};\nvar ResizeObservation = (function () {\n    function ResizeObservation(target, observedBox) {\n        this.target = target;\n        this.observedBox = observedBox || ResizeObserverBoxOptions.CONTENT_BOX;\n        this.lastReportedSize = {\n            inlineSize: 0,\n            blockSize: 0\n        };\n    }\n    ResizeObservation.prototype.isActive = function () {\n        var size = calculateBoxSize(this.target, this.observedBox, true);\n        if (skipNotifyOnElement(this.target)) {\n            this.lastReportedSize = size;\n        }\n        if (this.lastReportedSize.inlineSize !== size.inlineSize\n            || this.lastReportedSize.blockSize !== size.blockSize) {\n            return true;\n        }\n        return false;\n    };\n    return ResizeObservation;\n}());\nexport { ResizeObservation };\n","var ResizeObserverDetail = (function () {\n    function ResizeObserverDetail(resizeObserver, callback) {\n        this.activeTargets = [];\n        this.skippedTargets = [];\n        this.observationTargets = [];\n        this.observer = resizeObserver;\n        this.callback = callback;\n    }\n    return ResizeObserverDetail;\n}());\nexport { ResizeObserverDetail };\n","import { scheduler, updateCount } from './utils/scheduler';\nimport { ResizeObservation } from './ResizeObservation';\nimport { ResizeObserverDetail } from './ResizeObserverDetail';\nimport { resizeObservers } from './utils/resizeObservers';\nvar observerMap = new WeakMap();\nvar getObservationIndex = function (observationTargets, target) {\n    for (var i = 0; i < observationTargets.length; i += 1) {\n        if (observationTargets[i].target === target) {\n            return i;\n        }\n    }\n    return -1;\n};\nvar ResizeObserverController = (function () {\n    function ResizeObserverController() {\n    }\n    ResizeObserverController.connect = function (resizeObserver, callback) {\n        var detail = new ResizeObserverDetail(resizeObserver, callback);\n        observerMap.set(resizeObserver, detail);\n    };\n    ResizeObserverController.observe = function (resizeObserver, target, options) {\n        var detail = observerMap.get(resizeObserver);\n        var firstObservation = detail.observationTargets.length === 0;\n        if (getObservationIndex(detail.observationTargets, target) < 0) {\n            firstObservation && resizeObservers.push(detail);\n            detail.observationTargets.push(new ResizeObservation(target, options && options.box));\n            updateCount(1);\n            scheduler.schedule();\n        }\n    };\n    ResizeObserverController.unobserve = function (resizeObserver, target) {\n        var detail = observerMap.get(resizeObserver);\n        var index = getObservationIndex(detail.observationTargets, target);\n        var lastObservation = detail.observationTargets.length === 1;\n        if (index >= 0) {\n            lastObservation && resizeObservers.splice(resizeObservers.indexOf(detail), 1);\n            detail.observationTargets.splice(index, 1);\n            updateCount(-1);\n        }\n    };\n    ResizeObserverController.disconnect = function (resizeObserver) {\n        var _this = this;\n        var detail = observerMap.get(resizeObserver);\n        detail.observationTargets.slice().forEach(function (ot) { return _this.unobserve(resizeObserver, ot.target); });\n        detail.activeTargets.splice(0, detail.activeTargets.length);\n    };\n    return ResizeObserverController;\n}());\nexport { ResizeObserverController };\n","import { ResizeObserverController } from './ResizeObserverController';\nimport { isElement } from './utils/element';\nvar ResizeObserver = (function () {\n    function ResizeObserver(callback) {\n        if (arguments.length === 0) {\n            throw new TypeError(\"Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.\");\n        }\n        if (typeof callback !== 'function') {\n            throw new TypeError(\"Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.\");\n        }\n        ResizeObserverController.connect(this, callback);\n    }\n    ResizeObserver.prototype.observe = function (target, options) {\n        if (arguments.length === 0) {\n            throw new TypeError(\"Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.\");\n        }\n        if (!isElement(target)) {\n            throw new TypeError(\"Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element\");\n        }\n        ResizeObserverController.observe(this, target, options);\n    };\n    ResizeObserver.prototype.unobserve = function (target) {\n        if (arguments.length === 0) {\n            throw new TypeError(\"Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.\");\n        }\n        if (!isElement(target)) {\n            throw new TypeError(\"Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element\");\n        }\n        ResizeObserverController.unobserve(this, target);\n    };\n    ResizeObserver.prototype.disconnect = function () {\n        ResizeObserverController.disconnect(this);\n    };\n    ResizeObserver.toString = function () {\n        return 'function ResizeObserver () { [polyfill code] }';\n    };\n    return ResizeObserver;\n}());\nexport { ResizeObserver };\n","import { ResizeObserver as PolyfillResizeObserver } from '@juggle/resize-observer';\nclass ResizeObserverDelegate {\n    constructor() {\n        this.handleResize = this.handleResize.bind(this);\n        this.observer = new ((typeof window !== 'undefined' &&\n            window.ResizeObserver) ||\n            PolyfillResizeObserver)(this.handleResize);\n        this.elHandlersMap = new Map();\n    }\n    handleResize(entries) {\n        for (const entry of entries) {\n            const handler = this.elHandlersMap.get(entry.target);\n            if (handler !== undefined) {\n                handler(entry);\n            }\n        }\n    }\n    registerHandler(el, handler) {\n        this.elHandlersMap.set(el, handler);\n        this.observer.observe(el);\n    }\n    unregisterHandler(el) {\n        if (!this.elHandlersMap.has(el)) {\n            return;\n        }\n        this.elHandlersMap.delete(el);\n        this.observer.unobserve(el);\n    }\n}\nexport default new ResizeObserverDelegate();\n","import { defineComponent, renderSlot, getCurrentInstance, onMounted, onBeforeUnmount } from 'vue';\nimport delegate from './delegate';\nimport { warn } from '../../shared';\nexport default defineComponent({\n    name: 'ResizeObserver',\n    props: {\n        onResize: Function\n    },\n    setup(props) {\n        let registered = false;\n        // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n        const proxy = getCurrentInstance().proxy;\n        function handleResize(entry) {\n            const { onResize } = props;\n            if (onResize !== undefined)\n                onResize(entry);\n        }\n        onMounted(() => {\n            const el = proxy.$el;\n            if (el === undefined) {\n                warn('resize-observer', '$el does not exist.');\n                return;\n            }\n            if (el.nextElementSibling !== el.nextSibling) {\n                if (el.nodeType === 3 && el.nodeValue !== '') {\n                    warn('resize-observer', '$el can not be observed (it may be a text node).');\n                    return;\n                }\n            }\n            if (el.nextElementSibling !== null) {\n                delegate.registerHandler(el.nextElementSibling, handleResize);\n                registered = true;\n            }\n        });\n        onBeforeUnmount(() => {\n            if (registered) {\n                delegate.unregisterHandler(proxy.$el.nextElementSibling);\n            }\n        });\n    },\n    render() {\n        return renderSlot(this.$slots, 'default');\n    }\n});\n","let maybeTouch;\nexport function ensureMaybeTouch() {\n    if (typeof document === 'undefined')\n        return false;\n    if (maybeTouch === undefined) {\n        if ('matchMedia' in window) {\n            maybeTouch = window.matchMedia('(pointer:coarse)').matches;\n        }\n        else {\n            maybeTouch = false;\n        }\n    }\n    return maybeTouch;\n}\nlet wheelScale;\nexport function ensureWheelScale() {\n    if (typeof document === 'undefined')\n        return 1;\n    if (wheelScale === undefined) {\n        wheelScale = 'chrome' in window ? window.devicePixelRatio : 1;\n    }\n    return wheelScale;\n}\n","export const xScrollInjextionKey = 'VVirtualListXScroll';\n","import { computed, provide, ref } from 'vue';\nimport { useMemo } from 'vooks';\nimport { FinweckTree } from '../../shared';\nimport { xScrollInjextionKey } from './context';\nexport function setupXScroll({ columnsRef, renderColRef, renderItemWithColsRef }) {\n    const listWidthRef = ref(0);\n    const scrollLeftRef = ref(0);\n    const xFinweckTreeRef = computed(() => {\n        const columns = columnsRef.value;\n        if (columns.length === 0) {\n            return null;\n        }\n        const ft = new FinweckTree(columns.length, 0);\n        columns.forEach((column, index) => {\n            ft.add(index, column.width);\n        });\n        return ft;\n    });\n    const startIndexRef = useMemo(() => {\n        const xFinweckTree = xFinweckTreeRef.value;\n        if (xFinweckTree !== null) {\n            return Math.max(xFinweckTree.getBound(scrollLeftRef.value) - 1, 0);\n        }\n        else {\n            return 0;\n        }\n    });\n    const getLeft = (index) => {\n        const xFinweckTree = xFinweckTreeRef.value;\n        if (xFinweckTree !== null) {\n            return xFinweckTree.sum(index);\n        }\n        else {\n            return 0;\n        }\n    };\n    const endIndexRef = useMemo(() => {\n        const xFinweckTree = xFinweckTreeRef.value;\n        if (xFinweckTree !== null) {\n            return Math.min(xFinweckTree.getBound(scrollLeftRef.value + listWidthRef.value) + 1, columnsRef.value.length - 1);\n        }\n        else {\n            return 0;\n        }\n    });\n    provide(xScrollInjextionKey, {\n        startIndexRef,\n        endIndexRef,\n        columnsRef,\n        renderColRef,\n        renderItemWithColsRef,\n        getLeft\n    });\n    return {\n        listWidthRef,\n        scrollLeftRef\n    };\n}\n","import { defineComponent, inject } from 'vue';\nimport { xScrollInjextionKey } from './context';\nexport const VirtualListRow = defineComponent({\n    name: 'VirtualListRow',\n    props: {\n        index: { type: Number, required: true },\n        item: {\n            type: Object,\n            required: true\n        }\n    },\n    setup() {\n        const { startIndexRef, endIndexRef, columnsRef, getLeft, renderColRef, renderItemWithColsRef } = \n        // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n        inject(xScrollInjextionKey);\n        return {\n            startIndex: startIndexRef,\n            endIndex: endIndexRef,\n            columns: columnsRef,\n            renderCol: renderColRef,\n            renderItemWithCols: renderItemWithColsRef,\n            getLeft\n        };\n    },\n    render() {\n        const { startIndex, endIndex, columns, renderCol, renderItemWithCols, getLeft, item } = this;\n        if (renderItemWithCols != null) {\n            return renderItemWithCols({\n                itemIndex: this.index,\n                startColIndex: startIndex,\n                endColIndex: endIndex,\n                allColumns: columns,\n                item,\n                getLeft\n            });\n        }\n        if (renderCol != null) {\n            const items = [];\n            for (let i = startIndex; i <= endIndex; ++i) {\n                const column = columns[i];\n                items.push(renderCol({ column, left: getLeft(i), item }));\n            }\n            return items;\n        }\n        return null;\n    }\n});\n","/* eslint-disable no-void */\n/* eslint-disable @typescript-eslint/restrict-plus-operands */\nimport { mergeProps, computed, defineComponent, ref, onMounted, h, onActivated, onDeactivated, toRef } from 'vue';\nimport { beforeNextFrameOnce, depx, pxfy } from 'seemly';\nimport { useMemo } from 'vooks';\nimport { useSsrAdapter } from '@css-render/vue3-ssr';\nimport VResizeObserver from '../../resize-observer/src/VResizeObserver';\nimport { c, cssrAnchorMetaName, FinweckTree } from '../../shared';\nimport { ensureMaybeTouch, ensureWheelScale } from './config';\nimport { setupXScroll } from './xScroll';\nimport { VirtualListRow } from './VirtualListRow';\nconst styles = c('.v-vl', {\n    maxHeight: 'inherit',\n    height: '100%',\n    overflow: 'auto',\n    minWidth: '1px' // a zero width container won't be scrollable\n}, [\n    c('&:not(.v-vl--show-scrollbar)', {\n        scrollbarWidth: 'none'\n    }, [\n        c('&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb', {\n            width: 0,\n            height: 0,\n            display: 'none'\n        })\n    ])\n]);\nexport default defineComponent({\n    name: 'VirtualList',\n    inheritAttrs: false,\n    props: {\n        showScrollbar: {\n            type: Boolean,\n            default: true\n        },\n        columns: {\n            type: Array,\n            default: () => []\n        },\n        renderCol: Function,\n        renderItemWithCols: Function,\n        items: {\n            type: Array,\n            default: () => []\n        },\n        // it is suppose to be the min height\n        itemSize: {\n            type: Number,\n            required: true\n        },\n        itemResizable: Boolean,\n        itemsStyle: [String, Object],\n        visibleItemsTag: {\n            type: [String, Object],\n            default: 'div'\n        },\n        visibleItemsProps: Object,\n        ignoreItemResize: Boolean,\n        onScroll: Function,\n        onWheel: Function,\n        onResize: Function,\n        defaultScrollKey: [Number, String],\n        defaultScrollIndex: Number,\n        keyField: {\n            type: String,\n            default: 'key'\n        },\n        // Whether it is a good API?\n        // ResizeObserver + footer & header is not enough.\n        // Too complex for simple case\n        paddingTop: {\n            type: [Number, String],\n            default: 0\n        },\n        paddingBottom: {\n            type: [Number, String],\n            default: 0\n        }\n    },\n    setup(props) {\n        const ssrAdapter = useSsrAdapter();\n        styles.mount({\n            id: 'vueuc/virtual-list',\n            head: true,\n            anchorMetaName: cssrAnchorMetaName,\n            ssr: ssrAdapter\n        });\n        onMounted(() => {\n            const { defaultScrollIndex, defaultScrollKey } = props;\n            if (defaultScrollIndex !== undefined && defaultScrollIndex !== null) {\n                scrollTo({ index: defaultScrollIndex });\n            }\n            else if (defaultScrollKey !== undefined && defaultScrollKey !== null) {\n                scrollTo({ key: defaultScrollKey });\n            }\n        });\n        let isDeactivated = false;\n        let activateStateInitialized = false;\n        onActivated(() => {\n            isDeactivated = false;\n            if (!activateStateInitialized) {\n                activateStateInitialized = true;\n                return;\n            }\n            // remount\n            scrollTo({ top: scrollTopRef.value, left: scrollLeftRef.value });\n        });\n        onDeactivated(() => {\n            isDeactivated = true;\n            if (!activateStateInitialized) {\n                activateStateInitialized = true;\n            }\n        });\n        const totalWidthRef = useMemo(() => {\n            if (props.renderCol == null && props.renderItemWithCols == null) {\n                return undefined;\n            }\n            if (props.columns.length === 0)\n                return undefined;\n            let width = 0;\n            props.columns.forEach((column) => {\n                width += column.width;\n            });\n            return width;\n        });\n        const keyIndexMapRef = computed(() => {\n            const map = new Map();\n            const { keyField } = props;\n            props.items.forEach((item, index) => {\n                map.set(item[keyField], index);\n            });\n            return map;\n        });\n        const { scrollLeftRef, listWidthRef } = setupXScroll({\n            columnsRef: toRef(props, 'columns'),\n            renderColRef: toRef(props, 'renderCol'),\n            renderItemWithColsRef: toRef(props, 'renderItemWithCols')\n        });\n        const listElRef = ref(null);\n        const listHeightRef = ref(undefined);\n        const keyToHeightOffset = new Map();\n        const finweckTreeRef = computed(() => {\n            const { items, itemSize, keyField } = props;\n            const ft = new FinweckTree(items.length, itemSize);\n            items.forEach((item, index) => {\n                const key = item[keyField];\n                const heightOffset = keyToHeightOffset.get(key);\n                if (heightOffset !== undefined) {\n                    ft.add(index, heightOffset);\n                }\n            });\n            return ft;\n        });\n        const finweckTreeUpdateTrigger = ref(0);\n        const scrollTopRef = ref(0);\n        const startIndexRef = useMemo(() => {\n            return Math.max(finweckTreeRef.value.getBound(scrollTopRef.value - depx(props.paddingTop)) - 1, 0);\n        });\n        const viewportItemsRef = computed(() => {\n            const { value: listHeight } = listHeightRef;\n            if (listHeight === undefined)\n                return [];\n            const { items, itemSize } = props;\n            const startIndex = startIndexRef.value;\n            const endIndex = Math.min(startIndex + Math.ceil(listHeight / itemSize + 1), items.length - 1);\n            const viewportItems = [];\n            for (let i = startIndex; i <= endIndex; ++i) {\n                viewportItems.push(items[i]);\n            }\n            return viewportItems;\n        });\n        const scrollTo = (options, y) => {\n            if (typeof options === 'number') {\n                scrollToPosition(options, y, 'auto');\n                return;\n            }\n            const { left, top, index, key, position, behavior, debounce = true } = options;\n            if (left !== undefined || top !== undefined) {\n                scrollToPosition(left, top, behavior);\n            }\n            else if (index !== undefined) {\n                scrollToIndex(index, behavior, debounce);\n            }\n            else if (key !== undefined) {\n                const toIndex = keyIndexMapRef.value.get(key);\n                if (toIndex !== undefined)\n                    scrollToIndex(toIndex, behavior, debounce);\n            }\n            else if (position === 'bottom') {\n                scrollToPosition(0, Number.MAX_SAFE_INTEGER, behavior);\n            }\n            else if (position === 'top') {\n                scrollToPosition(0, 0, behavior);\n            }\n        };\n        let anchorIndex;\n        let anchorTimerId = null;\n        function scrollToIndex(index, behavior, debounce) {\n            const { value: ft } = finweckTreeRef;\n            const targetTop = ft.sum(index) + depx(props.paddingTop);\n            if (!debounce) {\n                listElRef.value.scrollTo({\n                    left: 0,\n                    top: targetTop,\n                    behavior\n                });\n            }\n            else {\n                anchorIndex = index;\n                if (anchorTimerId !== null) {\n                    window.clearTimeout(anchorTimerId);\n                }\n                anchorTimerId = window.setTimeout(() => {\n                    anchorIndex = undefined;\n                    anchorTimerId = null;\n                }, 16); // use 0 ms may be ealier than resize callback...\n                const { scrollTop, offsetHeight } = listElRef.value;\n                if (targetTop > scrollTop) {\n                    const itemSize = ft.get(index);\n                    if (targetTop + itemSize <= scrollTop + offsetHeight) {\n                        // do nothing\n                    }\n                    else {\n                        listElRef.value.scrollTo({\n                            left: 0,\n                            top: targetTop + itemSize - offsetHeight,\n                            behavior\n                        });\n                    }\n                }\n                else {\n                    listElRef.value.scrollTo({\n                        left: 0,\n                        top: targetTop,\n                        behavior\n                    });\n                }\n            }\n        }\n        function scrollToPosition(left, top, behavior) {\n            listElRef.value.scrollTo({\n                left,\n                top,\n                behavior\n            });\n        }\n        function handleItemResize(key, entry) {\n            var _a, _b, _c;\n            if (isDeactivated)\n                return;\n            if (props.ignoreItemResize)\n                return;\n            if (isHideByVShow(entry.target))\n                return;\n            const { value: ft } = finweckTreeRef;\n            const index = keyIndexMapRef.value.get(key);\n            const previousHeight = ft.get(index);\n            const height = (_c = (_b = (_a = entry.borderBoxSize) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.blockSize) !== null && _c !== void 0 ? _c : entry.contentRect.height;\n            if (height === previousHeight)\n                return;\n            // height offset based on itemSize\n            // used when rebuild the finweck tree\n            const offset = height - props.itemSize;\n            if (offset === 0) {\n                keyToHeightOffset.delete(key);\n            }\n            else {\n                keyToHeightOffset.set(key, height - props.itemSize);\n            }\n            // delta height based on finweck tree data\n            const delta = height - previousHeight;\n            if (delta === 0)\n                return;\n            ft.add(index, delta);\n            const listEl = listElRef.value;\n            if (listEl != null) {\n                if (anchorIndex === undefined) {\n                    const previousHeightSum = ft.sum(index);\n                    if (listEl.scrollTop > previousHeightSum) {\n                        listEl.scrollBy(0, delta);\n                    }\n                }\n                else {\n                    if (index < anchorIndex) {\n                        listEl.scrollBy(0, delta);\n                    }\n                    else if (index === anchorIndex) {\n                        const previousHeightSum = ft.sum(index);\n                        if (height + previousHeightSum >\n                            // Note, listEl shouldn't have border, nor offsetHeight won't be\n                            // correct\n                            listEl.scrollTop + listEl.offsetHeight) {\n                            listEl.scrollBy(0, delta);\n                        }\n                    }\n                }\n                syncViewport();\n            }\n            finweckTreeUpdateTrigger.value++;\n        }\n        const mayUseWheel = !ensureMaybeTouch();\n        let wheelCatched = false;\n        function handleListScroll(e) {\n            var _a;\n            (_a = props.onScroll) === null || _a === void 0 ? void 0 : _a.call(props, e);\n            if (!mayUseWheel || !wheelCatched) {\n                syncViewport();\n            }\n        }\n        function handleListWheel(e) {\n            var _a;\n            (_a = props.onWheel) === null || _a === void 0 ? void 0 : _a.call(props, e);\n            if (mayUseWheel) {\n                const listEl = listElRef.value;\n                if (listEl != null) {\n                    if (e.deltaX === 0) {\n                        if (listEl.scrollTop === 0 && e.deltaY <= 0) {\n                            return;\n                        }\n                        if (listEl.scrollTop + listEl.offsetHeight >= listEl.scrollHeight &&\n                            e.deltaY >= 0) {\n                            return;\n                        }\n                    }\n                    e.preventDefault();\n                    listEl.scrollTop += e.deltaY / ensureWheelScale();\n                    listEl.scrollLeft += e.deltaX / ensureWheelScale();\n                    syncViewport();\n                    wheelCatched = true;\n                    beforeNextFrameOnce(() => {\n                        wheelCatched = false;\n                    });\n                }\n            }\n        }\n        function handleListResize(entry) {\n            if (isDeactivated)\n                return;\n            // List is HTMLElement\n            if (isHideByVShow(entry.target))\n                return;\n            // If height is same, return\n            if (props.renderCol == null && props.renderItemWithCols == null) {\n                if (entry.contentRect.height === listHeightRef.value)\n                    return;\n            }\n            else {\n                if (entry.contentRect.height === listHeightRef.value &&\n                    entry.contentRect.width === listWidthRef.value) {\n                    return;\n                }\n            }\n            listHeightRef.value = entry.contentRect.height;\n            listWidthRef.value = entry.contentRect.width;\n            const { onResize } = props;\n            if (onResize !== undefined)\n                onResize(entry);\n        }\n        function syncViewport() {\n            const { value: listEl } = listElRef;\n            // sometime ref el can be null\n            // https://github.com/TuSimple/naive-ui/issues/811\n            if (listEl == null)\n                return;\n            scrollTopRef.value = listEl.scrollTop;\n            scrollLeftRef.value = listEl.scrollLeft;\n        }\n        function isHideByVShow(el) {\n            let cursor = el;\n            while (cursor !== null) {\n                if (cursor.style.display === 'none')\n                    return true;\n                cursor = cursor.parentElement;\n            }\n            return false;\n        }\n        return {\n            listHeight: listHeightRef,\n            listStyle: {\n                overflow: 'auto'\n            },\n            keyToIndex: keyIndexMapRef,\n            itemsStyle: computed(() => {\n                const { itemResizable } = props;\n                const height = pxfy(finweckTreeRef.value.sum());\n                // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n                finweckTreeUpdateTrigger.value;\n                return [\n                    props.itemsStyle,\n                    {\n                        boxSizing: 'content-box',\n                        width: pxfy(totalWidthRef.value),\n                        height: itemResizable ? '' : height,\n                        minHeight: itemResizable ? height : '',\n                        paddingTop: pxfy(props.paddingTop),\n                        paddingBottom: pxfy(props.paddingBottom)\n                    }\n                ];\n            }),\n            visibleItemsStyle: computed(() => {\n                // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n                finweckTreeUpdateTrigger.value;\n                return {\n                    transform: `translateY(${pxfy(finweckTreeRef.value.sum(startIndexRef.value))})`\n                };\n            }),\n            viewportItems: viewportItemsRef,\n            listElRef,\n            itemsElRef: ref(null),\n            scrollTo,\n            handleListResize,\n            handleListScroll,\n            handleListWheel,\n            handleItemResize\n        };\n    },\n    render() {\n        const { itemResizable, keyField, keyToIndex, visibleItemsTag } = this;\n        return h(VResizeObserver, {\n            onResize: this.handleListResize\n        }, {\n            default: () => {\n                var _a, _b;\n                return h('div', mergeProps(this.$attrs, {\n                    class: ['v-vl', this.showScrollbar && 'v-vl--show-scrollbar'],\n                    onScroll: this.handleListScroll,\n                    onWheel: this.handleListWheel,\n                    ref: 'listElRef'\n                }), [\n                    this.items.length !== 0\n                        ? h('div', {\n                            ref: 'itemsElRef',\n                            class: 'v-vl-items',\n                            style: this.itemsStyle\n                        }, [\n                            h(visibleItemsTag, Object.assign({\n                                class: 'v-vl-visible-items',\n                                style: this.visibleItemsStyle\n                            }, this.visibleItemsProps), {\n                                default: () => {\n                                    const { renderCol, renderItemWithCols } = this;\n                                    return this.viewportItems.map((item) => {\n                                        const key = item[keyField];\n                                        const index = keyToIndex.get(key);\n                                        const renderedCols = renderCol != null\n                                            ? h(VirtualListRow, {\n                                                index,\n                                                item\n                                            })\n                                            : undefined;\n                                        const renderedItemWithCols = renderItemWithCols != null\n                                            ? h(VirtualListRow, {\n                                                index,\n                                                item\n                                            })\n                                            : undefined;\n                                        const itemVNode = this.$slots.default({\n                                            item,\n                                            renderedCols,\n                                            renderedItemWithCols,\n                                            index\n                                        })[0];\n                                        if (itemResizable) {\n                                            return h(VResizeObserver, {\n                                                key,\n                                                onResize: (entry) => this.handleItemResize(key, entry)\n                                            }, {\n                                                default: () => itemVNode\n                                            });\n                                        }\n                                        itemVNode.key = key;\n                                        return itemVNode;\n                                    });\n                                }\n                            })\n                        ])\n                        : (_b = (_a = this.$slots).empty) === null || _b === void 0 ? void 0 : _b.call(_a)\n                ]);\n            }\n        });\n    }\n});\n","import { useSsrAdapter } from '@css-render/vue3-ssr';\nimport { defineComponent, h, ref } from 'vue';\nimport { c, cssrAnchorMetaName } from '../../shared';\nconst styles = c('.v-x-scroll', {\n    overflow: 'auto',\n    scrollbarWidth: 'none'\n}, [\n    c('&::-webkit-scrollbar', {\n        width: 0,\n        height: 0\n    })\n]);\nexport default defineComponent({\n    name: 'XScroll',\n    props: {\n        disabled: Boolean,\n        onScroll: Function\n    },\n    setup() {\n        const selfRef = ref(null);\n        function handleWheel(e) {\n            const preventYWheel = e.currentTarget.offsetWidth <\n                e.currentTarget.scrollWidth;\n            if (!preventYWheel || e.deltaY === 0)\n                return;\n            e.currentTarget.scrollLeft += e.deltaY + e.deltaX;\n            e.preventDefault();\n        }\n        const ssrAdapter = useSsrAdapter();\n        styles.mount({\n            id: 'vueuc/x-scroll',\n            head: true,\n            anchorMetaName: cssrAnchorMetaName,\n            ssr: ssrAdapter\n        });\n        const exposedMethods = {\n            scrollTo(...args) {\n                var _a;\n                (_a = selfRef.value) === null || _a === void 0 ? void 0 : _a.scrollTo(...args);\n            }\n        };\n        return Object.assign({ selfRef,\n            handleWheel }, exposedMethods);\n    },\n    render() {\n        return h('div', {\n            ref: 'selfRef',\n            onScroll: this.onScroll,\n            onWheel: this.disabled ? undefined : this.handleWheel,\n            class: 'v-x-scroll'\n        }, this.$slots);\n    }\n});\n","/* eslint-disable @typescript-eslint/strict-boolean-expressions */\nimport { defineComponent, renderSlot, h, onMounted, ref, nextTick } from 'vue';\nimport { useSsrAdapter } from '@css-render/vue3-ssr';\nimport { c, cssrAnchorMetaName } from '../../shared';\nconst hiddenAttr = 'v-hidden';\nconst style = c('[v-hidden]', {\n    display: 'none!important'\n});\nexport default defineComponent({\n    name: 'Overflow',\n    props: {\n        getCounter: Function,\n        getTail: Function,\n        updateCounter: Function,\n        onUpdateCount: Function,\n        onUpdateOverflow: Function\n    },\n    setup(props, { slots }) {\n        const selfRef = ref(null);\n        const counterRef = ref(null);\n        function deriveCounter(options) {\n            const { value: self } = selfRef;\n            const { getCounter, getTail } = props;\n            let counter;\n            if (getCounter !== undefined)\n                counter = getCounter();\n            else {\n                counter = counterRef.value;\n            }\n            if (!self || !counter)\n                return;\n            if (counter.hasAttribute(hiddenAttr)) {\n                counter.removeAttribute(hiddenAttr);\n            }\n            const { children } = self;\n            if (options.showAllItemsBeforeCalculate) {\n                for (const child of children) {\n                    if (child.hasAttribute(hiddenAttr)) {\n                        child.removeAttribute(hiddenAttr);\n                    }\n                }\n            }\n            const containerWidth = self.offsetWidth;\n            const childWidths = [];\n            const tail = slots.tail ? getTail === null || getTail === void 0 ? void 0 : getTail() : null;\n            let childWidthSum = tail ? tail.offsetWidth : 0;\n            let overflow = false;\n            const len = self.children.length - (slots.tail ? 1 : 0);\n            for (let i = 0; i < len - 1; ++i) {\n                if (i < 0)\n                    continue;\n                const child = children[i];\n                if (overflow) {\n                    if (!child.hasAttribute(hiddenAttr)) {\n                        child.setAttribute(hiddenAttr, '');\n                    }\n                    continue;\n                }\n                else if (child.hasAttribute(hiddenAttr)) {\n                    child.removeAttribute(hiddenAttr);\n                }\n                const childWidth = child.offsetWidth;\n                childWidthSum += childWidth;\n                childWidths[i] = childWidth;\n                if (childWidthSum > containerWidth) {\n                    const { updateCounter } = props;\n                    for (let j = i; j >= 0; --j) {\n                        const restCount = len - 1 - j;\n                        if (updateCounter !== undefined) {\n                            updateCounter(restCount);\n                        }\n                        else {\n                            counter.textContent = `${restCount}`;\n                        }\n                        const counterWidth = counter.offsetWidth;\n                        childWidthSum -= childWidths[j];\n                        if (childWidthSum + counterWidth <= containerWidth || j === 0) {\n                            overflow = true;\n                            i = j - 1;\n                            if (tail) {\n                                // tail too long or 1st element too long\n                                // we only consider tail now\n                                if (i === -1) {\n                                    tail.style.maxWidth = `${containerWidth - counterWidth}px`;\n                                    tail.style.boxSizing = 'border-box';\n                                }\n                                else {\n                                    tail.style.maxWidth = '';\n                                }\n                            }\n                            const { onUpdateCount } = props;\n                            if (onUpdateCount)\n                                onUpdateCount(restCount);\n                            break;\n                        }\n                    }\n                }\n            }\n            const { onUpdateOverflow } = props;\n            if (!overflow) {\n                if (onUpdateOverflow !== undefined) {\n                    onUpdateOverflow(false);\n                }\n                counter.setAttribute(hiddenAttr, '');\n            }\n            else {\n                if (onUpdateOverflow !== undefined) {\n                    onUpdateOverflow(true);\n                }\n            }\n        }\n        const ssrAdapter = useSsrAdapter();\n        style.mount({\n            id: 'vueuc/overflow',\n            head: true,\n            anchorMetaName: cssrAnchorMetaName,\n            ssr: ssrAdapter\n        });\n        onMounted(() => deriveCounter({\n            showAllItemsBeforeCalculate: false\n        }));\n        // besides onMounted, other case should be manually triggered, or we shoud watch items\n        return {\n            selfRef,\n            counterRef,\n            sync: deriveCounter\n        };\n    },\n    render() {\n        const { $slots } = this;\n        // eslint-disable-next-line @typescript-eslint/no-floating-promises\n        nextTick(() => this.sync({\n            showAllItemsBeforeCalculate: false\n        }));\n        // It shouldn't have border\n        return h('div', {\n            class: 'v-overflow',\n            ref: 'selfRef'\n        }, [\n            renderSlot($slots, 'default'),\n            // $slots.counter should only has 1 element\n            $slots.counter\n                ? $slots.counter()\n                : h('span', {\n                    style: {\n                        display: 'inline-block'\n                    },\n                    ref: 'counterRef'\n                }),\n            // $slots.tail should only has 1 element\n            $slots.tail ? $slots.tail() : null\n        ]);\n    }\n});\n","/* eslint-disable @typescript-eslint/strict-boolean-expressions */\n// ref https://www.w3.org/TR/wai-aria-practices-1.1/examples/dialog-modal/js/dialog.js\nfunction isHTMLElement(node) {\n    return node instanceof HTMLElement;\n}\nexport function focusFirstDescendant(node) {\n    for (let i = 0; i < node.childNodes.length; i++) {\n        const child = node.childNodes[i];\n        if (isHTMLElement(child)) {\n            if (attemptFocus(child) || focusFirstDescendant(child)) {\n                return true;\n            }\n        }\n    }\n    return false;\n}\nexport function focusLastDescendant(element) {\n    for (let i = element.childNodes.length - 1; i >= 0; i--) {\n        const child = element.childNodes[i];\n        if (isHTMLElement(child)) {\n            if (attemptFocus(child) || focusLastDescendant(child)) {\n                return true;\n            }\n        }\n    }\n    return false;\n}\nfunction attemptFocus(element) {\n    if (!isFocusable(element)) {\n        return false;\n    }\n    try {\n        element.focus({ preventScroll: true });\n    }\n    catch (e) { }\n    return document.activeElement === element;\n}\nfunction isFocusable(element) {\n    if (element.tabIndex > 0 ||\n        (element.tabIndex === 0 && element.getAttribute('tabIndex') !== null)) {\n        return true;\n    }\n    if (element.getAttribute('disabled')) {\n        return false;\n    }\n    switch (element.nodeName) {\n        case 'A':\n            return (!!element.href &&\n                element.rel !== 'ignore');\n        case 'INPUT':\n            return (element.type !== 'hidden' &&\n                element.type !== 'file');\n        case 'BUTTON':\n        case 'SELECT':\n        case 'TEXTAREA':\n            return true;\n        default:\n            return false;\n    }\n}\n","import { h, defineComponent, ref, Fragment, onMounted, onBeforeUnmount, watch } from 'vue';\nimport { createId, getPreciseEventTarget } from 'seemly';\nimport { on, off } from 'evtd';\nimport { focusFirstDescendant, focusLastDescendant } from './utils';\nimport { resolveTo } from '../../shared';\nlet stack = [];\nexport const FocusTrap = defineComponent({\n    name: 'FocusTrap',\n    props: {\n        disabled: Boolean,\n        active: Boolean,\n        autoFocus: {\n            type: Boolean,\n            default: true\n        },\n        onEsc: Function,\n        initialFocusTo: String,\n        finalFocusTo: String,\n        returnFocusOnDeactivated: {\n            type: Boolean,\n            default: true\n        }\n    },\n    setup(props) {\n        const id = createId();\n        const focusableStartRef = ref(null);\n        const focusableEndRef = ref(null);\n        let activated = false;\n        let ignoreInternalFocusChange = false;\n        const lastFocusedElement = typeof document === 'undefined' ? null : document.activeElement;\n        function isCurrentActive() {\n            const currentActiveId = stack[stack.length - 1];\n            return currentActiveId === id;\n        }\n        function handleDocumentKeydown(e) {\n            var _a;\n            if (e.code === 'Escape') {\n                if (isCurrentActive()) {\n                    (_a = props.onEsc) === null || _a === void 0 ? void 0 : _a.call(props, e);\n                }\n            }\n        }\n        onMounted(() => {\n            watch(() => props.active, (value) => {\n                if (value) {\n                    activate();\n                    on('keydown', document, handleDocumentKeydown);\n                }\n                else {\n                    off('keydown', document, handleDocumentKeydown);\n                    if (activated) {\n                        deactivate();\n                    }\n                }\n            }, {\n                immediate: true\n            });\n        });\n        onBeforeUnmount(() => {\n            off('keydown', document, handleDocumentKeydown);\n            if (activated)\n                deactivate();\n        });\n        function handleDocumentFocus(e) {\n            if (ignoreInternalFocusChange)\n                return;\n            if (isCurrentActive()) {\n                const mainEl = getMainEl();\n                if (mainEl === null)\n                    return;\n                if (mainEl.contains(getPreciseEventTarget(e)))\n                    return;\n                // I don't handle shift + tab status since it's too tricky to handle\n                // Not impossible but I need to sleep\n                resetFocusTo('first');\n            }\n        }\n        function getMainEl() {\n            const focusableStartEl = focusableStartRef.value;\n            if (focusableStartEl === null)\n                return null;\n            let mainEl = focusableStartEl;\n            while (true) {\n                mainEl = mainEl.nextSibling;\n                if (mainEl === null)\n                    break;\n                if (mainEl instanceof Element && mainEl.tagName === 'DIV') {\n                    break;\n                }\n            }\n            return mainEl;\n        }\n        function activate() {\n            var _a;\n            if (props.disabled)\n                return;\n            stack.push(id);\n            if (props.autoFocus) {\n                const { initialFocusTo } = props;\n                if (initialFocusTo === undefined) {\n                    resetFocusTo('first');\n                }\n                else {\n                    (_a = resolveTo(initialFocusTo)) === null || _a === void 0 ? void 0 : _a.focus({ preventScroll: true });\n                }\n            }\n            activated = true;\n            document.addEventListener('focus', handleDocumentFocus, true);\n        }\n        function deactivate() {\n            var _a;\n            if (props.disabled)\n                return;\n            document.removeEventListener('focus', handleDocumentFocus, true);\n            stack = stack.filter((idInStack) => idInStack !== id);\n            if (isCurrentActive())\n                return;\n            const { finalFocusTo } = props;\n            if (finalFocusTo !== undefined) {\n                (_a = resolveTo(finalFocusTo)) === null || _a === void 0 ? void 0 : _a.focus({ preventScroll: true });\n            }\n            else if (props.returnFocusOnDeactivated) {\n                if (lastFocusedElement instanceof HTMLElement) {\n                    ignoreInternalFocusChange = true;\n                    lastFocusedElement.focus({ preventScroll: true });\n                    ignoreInternalFocusChange = false;\n                }\n            }\n        }\n        function resetFocusTo(target) {\n            if (!isCurrentActive())\n                return;\n            if (props.active) {\n                const focusableStartEl = focusableStartRef.value;\n                const focusableEndEl = focusableEndRef.value;\n                if (focusableStartEl !== null && focusableEndEl !== null) {\n                    const mainEl = getMainEl();\n                    if (mainEl == null || mainEl === focusableEndEl) {\n                        ignoreInternalFocusChange = true;\n                        focusableStartEl.focus({ preventScroll: true });\n                        ignoreInternalFocusChange = false;\n                        return;\n                    }\n                    ignoreInternalFocusChange = true;\n                    const focused = target === 'first'\n                        ? focusFirstDescendant(mainEl)\n                        : focusLastDescendant(mainEl);\n                    ignoreInternalFocusChange = false;\n                    if (!focused) {\n                        ignoreInternalFocusChange = true;\n                        focusableStartEl.focus({ preventScroll: true });\n                        ignoreInternalFocusChange = false;\n                    }\n                }\n            }\n        }\n        function handleStartFocus(e) {\n            if (ignoreInternalFocusChange)\n                return;\n            const mainEl = getMainEl();\n            if (mainEl === null)\n                return;\n            if (e.relatedTarget !== null && mainEl.contains(e.relatedTarget)) {\n                // if it comes from inner, focus last\n                resetFocusTo('last');\n            }\n            else {\n                // otherwise focus first\n                resetFocusTo('first');\n            }\n        }\n        function handleEndFocus(e) {\n            if (ignoreInternalFocusChange)\n                return;\n            if (e.relatedTarget !== null &&\n                e.relatedTarget === focusableStartRef.value) {\n                // if it comes from first, focus last\n                resetFocusTo('last');\n            }\n            else {\n                // otherwise focus first\n                resetFocusTo('first');\n            }\n        }\n        return {\n            focusableStartRef,\n            focusableEndRef,\n            focusableStyle: 'position: absolute; height: 0; width: 0;',\n            handleStartFocus,\n            handleEndFocus\n        };\n    },\n    render() {\n        const { default: defaultSlot } = this.$slots;\n        if (defaultSlot === undefined)\n            return null;\n        if (this.disabled)\n            return defaultSlot();\n        const { active, focusableStyle } = this;\n        return h(Fragment, null, [\n            h('div', {\n                'aria-hidden': 'true',\n                tabindex: active ? '0' : '-1',\n                ref: 'focusableStartRef',\n                style: focusableStyle,\n                onFocus: this.handleStartFocus\n            }),\n            defaultSlot(),\n            h('div', {\n                'aria-hidden': 'true',\n                style: focusableStyle,\n                ref: 'focusableEndRef',\n                tabindex: active ? '0' : '-1',\n                onFocus: this.handleEndFocus\n            })\n        ]);\n    }\n});\n","import { onBeforeUnmount, onMounted, watch } from 'vue';\nimport { resizeObserverManager } from 'vueuc';\nexport function useOnResize(elRef, onResize) {\n  // it needn't be reactive since it's for internal usage\n  if (onResize) {\n    onMounted(() => {\n      const {\n        value: el\n      } = elRef;\n      if (el) {\n        resizeObserverManager.registerHandler(el, onResize);\n      }\n    });\n    // avoid memory leak\n    watch(elRef, (_, oldEl) => {\n      if (oldEl) {\n        resizeObserverManager.unregisterHandler(oldEl);\n      }\n    }, {\n      deep: false\n    });\n    onBeforeUnmount(() => {\n      const {\n        value: el\n      } = elRef;\n      if (el) {\n        resizeObserverManager.unregisterHandler(el);\n      }\n    });\n  }\n}","export function color2Class(color) {\n  return color.replace(/#|\\(|\\)|,|\\s|\\./g, '_');\n}","const pureNumberRegex = /^(\\d|\\.)+$/;\nconst numberRegex = /(\\d|\\.)+/;\nexport function formatLength(length, {\n  c = 1,\n  offset = 0,\n  attachPx = true\n} = {}) {\n  if (typeof length === 'number') {\n    const result = (length + offset) * c;\n    if (result === 0) return '0';\n    return `${result}px`;\n  } else if (typeof length === 'string') {\n    if (pureNumberRegex.test(length)) {\n      const result = (Number(length) + offset) * c;\n      if (attachPx) {\n        if (result === 0) return '0';\n        return `${result}px`;\n      } else {\n        return `${result}`;\n      }\n    } else {\n      const result = numberRegex.exec(length);\n      if (!result) return length;\n      return length.replace(numberRegex, String((Number(result[0]) + offset) * c));\n    }\n  }\n  return length;\n}","import { getPadding } from 'seemly';\nexport function rtlInset(inset) {\n  const {\n    left,\n    right,\n    top,\n    bottom\n  } = getPadding(inset);\n  return `${top} ${left} ${bottom} ${right}`;\n}","export function download(url, name) {\n  if (!url) return;\n  const a = document.createElement('a');\n  a.href = url;\n  if (name !== undefined) {\n    a.download = name;\n  }\n  document.body.appendChild(a);\n  a.click();\n  document.body.removeChild(a);\n}\nexport function publicDownload(url, name) {\n  download(url, name);\n}","let _isJsdom;\nexport function isJsdom() {\n  if (_isJsdom === undefined) {\n    _isJsdom = navigator.userAgent.includes('Node.js') || navigator.userAgent.includes('jsdom');\n  }\n  return _isJsdom;\n}","const eventSet = new WeakSet();\nexport function markEventEffectPerformed(event) {\n  eventSet.add(event);\n}\nexport function eventEffectNotPerformed(event) {\n  return !eventSet.has(event);\n}","export function getTitleAttribute(value) {\n  switch (typeof value) {\n    case 'string':\n      // The empty string should also be reset to undefined.\n      return value || undefined;\n    case 'number':\n      return String(value);\n    default:\n      return undefined;\n  }\n}","export function largerSize(size) {\n  switch (size) {\n    case 'tiny':\n      return 'small';\n    case 'small':\n      return 'medium';\n    case 'medium':\n      return 'large';\n    case 'large':\n      return 'huge';\n  }\n}\nexport function smallerSize(size) {\n  switch (size) {\n    case 'tiny':\n      return 'mini';\n    case 'small':\n      return 'tiny';\n    case 'medium':\n      return 'small';\n    case 'large':\n      return 'medium';\n    case 'huge':\n      return 'large';\n  }\n  throw new Error(`${size} has no smaller size.`);\n}","const warnedMessages = new Set();\nexport function warnOnce(location, message) {\n  const mergedMessage = `[naive/${location}]: ${message}`;\n  if (warnedMessages.has(mergedMessage)) return;\n  warnedMessages.add(mergedMessage);\n  console.error(mergedMessage);\n}\nexport function warn(location, message) {\n  console.error(`[naive/${location}]: ${message}`);\n}\nexport function error(location, message, error) {\n  console.error(`[naive/${location}]: ${message}`, error);\n}\nexport function throwError(location, message) {\n  throw new Error(`[naive/${location}]: ${message}`);\n}","function call(funcs, ...args) {\n  if (Array.isArray(funcs)) {\n    funcs.forEach(func => call(func, ...args));\n  } else {\n    return funcs(...args);\n  }\n}\nexport { call };","export function createRefSetter(ref) {\n  return inst => {\n    if (inst) {\n      ref.value = inst.$el;\n    } else {\n      ref.value = null;\n    }\n  };\n}","import { Comment, createTextVNode, Fragment } from 'vue';\n// o(n) flatten\nexport function flatten(vNodes, filterCommentNode = true, result = []) {\n  vNodes.forEach(vNode => {\n    if (vNode === null) return;\n    if (typeof vNode !== 'object') {\n      if (typeof vNode === 'string' || typeof vNode === 'number') {\n        result.push(createTextVNode(String(vNode)));\n      }\n      return;\n    }\n    if (Array.isArray(vNode)) {\n      flatten(vNode, filterCommentNode, result);\n      return;\n    }\n    if (vNode.type === Fragment) {\n      if (vNode.children === null) return;\n      if (Array.isArray(vNode.children)) {\n        flatten(vNode.children, filterCommentNode, result);\n      }\n      // rawSlot\n    } else {\n      if (vNode.type === Comment && filterCommentNode) return;\n      result.push(vNode);\n    }\n  });\n  return result;\n}","import { warn } from \"../naive/index.mjs\";\nimport { flatten } from \"./flatten.mjs\";\nexport function getFirstSlotVNode(slots, slotName = 'default', props = undefined) {\n  const slot = slots[slotName];\n  if (!slot) {\n    warn('getFirstSlotVNode', `slot[${slotName}] is empty`);\n    return null;\n  }\n  const slotContent = flatten(slot(props));\n  // vue will normalize the slot, so slot must be an array\n  if (slotContent.length === 1) {\n    return slotContent[0];\n  } else {\n    warn('getFirstSlotVNode', `slot[${slotName}] should have exactly one child`);\n    return null;\n  }\n}\nexport function getFirstSlotVNodeWithTypedProps(slotName, slot, props) {\n  if (!slot) {\n    return null;\n  }\n  const slotContent = flatten(slot(props));\n  // vue will normalize the slot, so slot must be an array\n  if (slotContent.length === 1) {\n    return slotContent[0];\n  } else {\n    warn('getFirstSlotVNode', `slot[${slotName}] should have exactly one child`);\n    return null;\n  }\n}","export function getSlot(instance, slotName = 'default', fallback = []) {\n  const slots = instance.$slots;\n  const slot = slots[slotName];\n  if (slot === undefined) return fallback;\n  return slot();\n}","import { vShow } from 'vue';\nexport function isNodeVShowFalse(vNode) {\n  var _a;\n  const showDir = (_a = vNode.dirs) === null || _a === void 0 ? void 0 : _a.find(({\n    dir\n  }) => dir === vShow);\n  return !!(showDir && showDir.value === false);\n}","export function keep(object, keys = [], rest) {\n  const keepedObject = {};\n  keys.forEach(key => {\n    keepedObject[key] = object[key];\n  });\n  return Object.assign(keepedObject, rest);\n}","export function keysOf(obj) {\n  return Object.keys(obj);\n}","export function mergeEventHandlers(handlers) {\n  const filteredHandlers = handlers.filter(handler => handler !== undefined);\n  if (filteredHandlers.length === 0) return undefined;\n  if (filteredHandlers.length === 1) return filteredHandlers[0];\n  return e => {\n    handlers.forEach(handler => {\n      if (handler) {\n        handler(e);\n      }\n    });\n  };\n}","export function omit(object, keys = [], rest) {\n  const omitedObject = {};\n  const originalKeys = Object.getOwnPropertyNames(object);\n  originalKeys.forEach(originalKey => {\n    if (!keys.includes(originalKey)) {\n      omitedObject[originalKey] = object[originalKey];\n    }\n  });\n  return Object.assign(omitedObject, rest);\n}","import { createTextVNode } from 'vue';\nexport function render(r, ...args) {\n  if (typeof r === 'function') {\n    return r(...args);\n  } else if (typeof r === 'string') {\n    return createTextVNode(r);\n  } else if (typeof r === 'number') {\n    return createTextVNode(String(r));\n  } else {\n    return null;\n  }\n}","import { Comment, Fragment, isVNode } from 'vue';\nexport function ensureValidVNode(vnodes) {\n  return vnodes.some(child => {\n    if (!isVNode(child)) {\n      return true;\n    }\n    if (child.type === Comment) {\n      return false;\n    }\n    if (child.type === Fragment && !ensureValidVNode(child.children)) {\n      return false;\n    }\n    return true;\n  }) ? vnodes : null;\n}\n/**\n * We shouldn't use the following functions with slot flags `_: 1, 2, 3`\n */\nexport function resolveSlot(slot, fallback) {\n  return slot && ensureValidVNode(slot()) || fallback();\n}\nexport function resolveSlotWithTypedProps(slot, props, fallback) {\n  return slot && ensureValidVNode(slot(props)) || fallback(props);\n}\n/**\n * Resolve slot with wrapper if content exists, no fallback\n */\nexport function resolveWrappedSlot(slot, wrapper) {\n  const children = slot && ensureValidVNode(slot());\n  return wrapper(children || null);\n}\n/*\n * Resolve slot with wrapper if content exists, no fallback\n */\nexport function resolveWrappedSlotWithProps(slot, props, wrapper) {\n  const children = slot && ensureValidVNode(slot(props));\n  return wrapper(children || null);\n}\nexport function isSlotEmpty(slot) {\n  return !(slot && ensureValidVNode(slot()));\n}","import { defineComponent } from 'vue';\nexport const Wrapper = defineComponent({\n  render() {\n    var _a, _b;\n    return (_b = (_a = this.$slots).default) === null || _b === void 0 ? void 0 : _b.call(_a);\n  }\n});","import { createInjectionKey } from \"../../_utils/index.mjs\";\nexport const configProviderInjectionKey = createInjectionKey('n-config-provider');","import { computed, inject, shallowRef } from 'vue';\nimport { configProviderInjectionKey } from \"../config-provider/src/context.mjs\";\nexport const defaultClsPrefix = 'n';\nexport default function useConfig(props = {}, options = {\n  defaultBordered: true\n}) {\n  const NConfigProvider = inject(configProviderInjectionKey, null);\n  return {\n    // NConfigProvider,\n    inlineThemeDisabled: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.inlineThemeDisabled,\n    mergedRtlRef: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedRtlRef,\n    mergedComponentPropsRef: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedComponentPropsRef,\n    mergedBreakpointsRef: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedBreakpointsRef,\n    mergedBorderedRef: computed(() => {\n      var _a, _b;\n      const {\n        bordered\n      } = props;\n      if (bordered !== undefined) return bordered;\n      return (_b = (_a = NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedBorderedRef.value) !== null && _a !== void 0 ? _a : options.defaultBordered) !== null && _b !== void 0 ? _b : true;\n    }),\n    mergedClsPrefixRef: NConfigProvider ? NConfigProvider.mergedClsPrefixRef : shallowRef(defaultClsPrefix),\n    namespaceRef: computed(() => NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedNamespaceRef.value)\n  };\n}\nexport function useMergedClsPrefix() {\n  const NConfigProvider = inject(configProviderInjectionKey, null);\n  return NConfigProvider ? NConfigProvider.mergedClsPrefixRef : shallowRef(defaultClsPrefix);\n}","import { useSsrAdapter } from '@css-render/vue3-ssr';\nimport { hash } from 'css-render';\nimport { inject, ref, watchEffect } from 'vue';\nimport { throwError } from \"../_utils/index.mjs\";\nimport { c } from \"../_utils/cssr/index.mjs\";\nimport { configProviderInjectionKey } from \"../config-provider/src/context.mjs\";\nexport function useThemeClass(componentName, hashRef, cssVarsRef, props) {\n  if (!cssVarsRef) throwError('useThemeClass', 'cssVarsRef is not passed');\n  const NConfigProvider = inject(configProviderInjectionKey, null);\n  const mergedThemeHashRef = NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedThemeHashRef;\n  const styleMountTarget = NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.styleMountTarget;\n  const themeClassRef = ref('');\n  const ssrAdapter = useSsrAdapter();\n  let renderCallback;\n  const hashClassPrefix = `__${componentName}`;\n  const mountStyle = () => {\n    let finalThemeHash = hashClassPrefix;\n    const hashValue = hashRef ? hashRef.value : undefined;\n    const themeHash = mergedThemeHashRef === null || mergedThemeHashRef === void 0 ? void 0 : mergedThemeHashRef.value;\n    if (themeHash) finalThemeHash += `-${themeHash}`;\n    if (hashValue) finalThemeHash += `-${hashValue}`;\n    const {\n      themeOverrides,\n      builtinThemeOverrides\n    } = props;\n    if (themeOverrides) {\n      finalThemeHash += `-${hash(JSON.stringify(themeOverrides))}`;\n    }\n    if (builtinThemeOverrides) {\n      finalThemeHash += `-${hash(JSON.stringify(builtinThemeOverrides))}`;\n    }\n    themeClassRef.value = finalThemeHash;\n    renderCallback = () => {\n      const cssVars = cssVarsRef.value;\n      let style = '';\n      for (const key in cssVars) {\n        style += `${key}: ${cssVars[key]};`;\n      }\n      c(`.${finalThemeHash}`, style).mount({\n        id: finalThemeHash,\n        ssr: ssrAdapter,\n        parent: styleMountTarget\n      });\n      renderCallback = undefined;\n    };\n  };\n  watchEffect(() => {\n    mountStyle();\n  });\n  return {\n    themeClass: themeClassRef,\n    onRender: () => {\n      renderCallback === null || renderCallback === void 0 ? void 0 : renderCallback();\n    }\n  };\n}","import { computed, inject, onBeforeUnmount, provide } from 'vue';\nimport { createInjectionKey } from \"../_utils/index.mjs\";\nexport const formItemInjectionKey = createInjectionKey('n-form-item');\nexport default function useFormItem(props, {\n  defaultSize = 'medium',\n  mergedSize,\n  mergedDisabled\n} = {}) {\n  const NFormItem = inject(formItemInjectionKey, null);\n  provide(formItemInjectionKey, null);\n  const mergedSizeRef = computed(mergedSize ? () => mergedSize(NFormItem) : () => {\n    const {\n      size\n    } = props;\n    if (size) return size;\n    if (NFormItem) {\n      const {\n        mergedSize\n      } = NFormItem;\n      if (mergedSize.value !== undefined) {\n        return mergedSize.value;\n      }\n    }\n    return defaultSize;\n  });\n  const mergedDisabledRef = computed(mergedDisabled ? () => mergedDisabled(NFormItem) : () => {\n    const {\n      disabled\n    } = props;\n    if (disabled !== undefined) {\n      return disabled;\n    }\n    if (NFormItem) {\n      return NFormItem.disabled.value;\n    }\n    return false;\n  });\n  const mergedStatusRef = computed(() => {\n    const {\n      status\n    } = props;\n    if (status) return status;\n    return NFormItem === null || NFormItem === void 0 ? void 0 : NFormItem.mergedValidationStatus.value;\n  });\n  onBeforeUnmount(() => {\n    if (NFormItem) {\n      NFormItem.restoreValidation();\n    }\n  });\n  return {\n    mergedSizeRef,\n    mergedDisabledRef,\n    mergedStatusRef,\n    nTriggerFormBlur() {\n      if (NFormItem) {\n        NFormItem.handleContentBlur();\n      }\n    },\n    nTriggerFormChange() {\n      if (NFormItem) {\n        NFormItem.handleContentChange();\n      }\n    },\n    nTriggerFormFocus() {\n      if (NFormItem) {\n        NFormItem.handleContentFocus();\n      }\n    },\n    nTriggerFormInput() {\n      if (NFormItem) {\n        NFormItem.handleContentInput();\n      }\n    }\n  };\n}","const enUS = {\n  name: 'en-US',\n  global: {\n    undo: 'Undo',\n    redo: 'Redo',\n    confirm: 'Confirm',\n    clear: 'Clear'\n  },\n  Popconfirm: {\n    positiveText: 'Confirm',\n    negativeText: 'Cancel'\n  },\n  Cascader: {\n    placeholder: 'Please Select',\n    loading: 'Loading',\n    loadingRequiredMessage: label => `Please load all ${label}'s descendants before checking it.`\n  },\n  Time: {\n    dateFormat: 'yyyy-MM-dd',\n    dateTimeFormat: 'yyyy-MM-dd HH:mm:ss'\n  },\n  DatePicker: {\n    yearFormat: 'yyyy',\n    monthFormat: 'MMM',\n    dayFormat: 'eeeeee',\n    yearTypeFormat: 'yyyy',\n    monthTypeFormat: 'yyyy-MM',\n    dateFormat: 'yyyy-MM-dd',\n    dateTimeFormat: 'yyyy-MM-dd HH:mm:ss',\n    quarterFormat: 'yyyy-qqq',\n    weekFormat: 'YYYY-w',\n    clear: 'Clear',\n    now: 'Now',\n    confirm: 'Confirm',\n    selectTime: 'Select Time',\n    selectDate: 'Select Date',\n    datePlaceholder: 'Select Date',\n    datetimePlaceholder: 'Select Date and Time',\n    monthPlaceholder: 'Select Month',\n    yearPlaceholder: 'Select Year',\n    quarterPlaceholder: 'Select Quarter',\n    weekPlaceholder: 'Select Week',\n    startDatePlaceholder: 'Start Date',\n    endDatePlaceholder: 'End Date',\n    startDatetimePlaceholder: 'Start Date and Time',\n    endDatetimePlaceholder: 'End Date and Time',\n    startMonthPlaceholder: 'Start Month',\n    endMonthPlaceholder: 'End Month',\n    monthBeforeYear: true,\n    firstDayOfWeek: 6,\n    today: 'Today'\n  },\n  DataTable: {\n    checkTableAll: 'Select all in the table',\n    uncheckTableAll: 'Unselect all in the table',\n    confirm: 'Confirm',\n    clear: 'Clear'\n  },\n  LegacyTransfer: {\n    sourceTitle: 'Source',\n    targetTitle: 'Target'\n  },\n  Transfer: {\n    selectAll: 'Select all',\n    unselectAll: 'Unselect all',\n    clearAll: 'Clear',\n    total: num => `Total ${num} items`,\n    selected: num => `${num} items selected`\n  },\n  Empty: {\n    description: 'No Data'\n  },\n  Select: {\n    placeholder: 'Please Select'\n  },\n  TimePicker: {\n    placeholder: 'Select Time',\n    positiveText: 'OK',\n    negativeText: 'Cancel',\n    now: 'Now',\n    clear: 'Clear'\n  },\n  Pagination: {\n    goto: 'Goto',\n    selectionSuffix: 'page'\n  },\n  DynamicTags: {\n    add: 'Add'\n  },\n  Log: {\n    loading: 'Loading'\n  },\n  Input: {\n    placeholder: 'Please Input'\n  },\n  InputNumber: {\n    placeholder: 'Please Input'\n  },\n  DynamicInput: {\n    create: 'Create'\n  },\n  ThemeEditor: {\n    title: 'Theme Editor',\n    clearAllVars: 'Clear All Variables',\n    clearSearch: 'Clear Search',\n    filterCompName: 'Filter Component Name',\n    filterVarName: 'Filter Variable Name',\n    import: 'Import',\n    export: 'Export',\n    restore: 'Reset to Default'\n  },\n  Image: {\n    tipPrevious: 'Previous picture (←)',\n    tipNext: 'Next picture (→)',\n    tipCounterclockwise: 'Counterclockwise',\n    tipClockwise: 'Clockwise',\n    tipZoomOut: 'Zoom out',\n    tipZoomIn: 'Zoom in',\n    tipDownload: 'Download',\n    tipClose: 'Close (Esc)',\n    // TODO: translation\n    tipOriginalSize: 'Zoom to original size'\n  }\n};\nexport default enUS;","export function buildFormatLongFn(args) {\n  return (options = {}) => {\n    // TODO: Remove String()\n    const width = options.width ? String(options.width) : args.defaultWidth;\n    const format = args.formats[width] || args.formats[args.defaultWidth];\n    return format;\n  };\n}\n","/* eslint-disable no-unused-vars */\n\n/**\n * The localize function argument callback which allows to convert raw value to\n * the actual type.\n *\n * @param value - The value to convert\n *\n * @returns The converted value\n */\n\n/**\n * The map of localized values for each width.\n */\n\n/**\n * The index type of the locale unit value. It types conversion of units of\n * values that don't start at 0 (i.e. quarters).\n */\n\n/**\n * Converts the unit value to the tuple of values.\n */\n\n/**\n * The tuple of localized era values. The first element represents BC,\n * the second element represents AD.\n */\n\n/**\n * The tuple of localized quarter values. The first element represents Q1.\n */\n\n/**\n * The tuple of localized day values. The first element represents Sunday.\n */\n\n/**\n * The tuple of localized month values. The first element represents January.\n */\n\nexport function buildLocalizeFn(args) {\n  return (value, options) => {\n    const context = options?.context ? String(options.context) : \"standalone\";\n\n    let valuesArray;\n    if (context === \"formatting\" && args.formattingValues) {\n      const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;\n      const width = options?.width ? String(options.width) : defaultWidth;\n\n      valuesArray =\n        args.formattingValues[width] || args.formattingValues[defaultWidth];\n    } else {\n      const defaultWidth = args.defaultWidth;\n      const width = options?.width ? String(options.width) : args.defaultWidth;\n\n      valuesArray = args.values[width] || args.values[defaultWidth];\n    }\n    const index = args.argumentCallback ? args.argumentCallback(value) : value;\n\n    // @ts-expect-error - For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!\n    return valuesArray[index];\n  };\n}\n","export function buildMatchFn(args) {\n  return (string, options = {}) => {\n    const width = options.width;\n\n    const matchPattern =\n      (width && args.matchPatterns[width]) ||\n      args.matchPatterns[args.defaultMatchWidth];\n    const matchResult = string.match(matchPattern);\n\n    if (!matchResult) {\n      return null;\n    }\n    const matchedString = matchResult[0];\n\n    const parsePatterns =\n      (width && args.parsePatterns[width]) ||\n      args.parsePatterns[args.defaultParseWidth];\n\n    const key = Array.isArray(parsePatterns)\n      ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString))\n      : // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type\n        findKey(parsePatterns, (pattern) => pattern.test(matchedString));\n\n    let value;\n\n    value = args.valueCallback ? args.valueCallback(key) : key;\n    value = options.valueCallback\n      ? // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type\n        options.valueCallback(value)\n      : value;\n\n    const rest = string.slice(matchedString.length);\n\n    return { value, rest };\n  };\n}\n\nfunction findKey(object, predicate) {\n  for (const key in object) {\n    if (\n      Object.prototype.hasOwnProperty.call(object, key) &&\n      predicate(object[key])\n    ) {\n      return key;\n    }\n  }\n  return undefined;\n}\n\nfunction findIndex(array, predicate) {\n  for (let key = 0; key < array.length; key++) {\n    if (predicate(array[key])) {\n      return key;\n    }\n  }\n  return undefined;\n}\n","export function buildMatchPatternFn(args) {\n  return (string, options = {}) => {\n    const matchResult = string.match(args.matchPattern);\n    if (!matchResult) return null;\n    const matchedString = matchResult[0];\n\n    const parseResult = string.match(args.parsePattern);\n    if (!parseResult) return null;\n    let value = args.valueCallback\n      ? args.valueCallback(parseResult[0])\n      : parseResult[0];\n\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type\n    value = options.valueCallback ? options.valueCallback(value) : value;\n\n    const rest = string.slice(matchedString.length);\n\n    return { value, rest };\n  };\n}\n","const formatDistanceLocale = {\n  lessThanXSeconds: {\n    one: \"less than a second\",\n    other: \"less than {{count}} seconds\",\n  },\n\n  xSeconds: {\n    one: \"1 second\",\n    other: \"{{count}} seconds\",\n  },\n\n  halfAMinute: \"half a minute\",\n\n  lessThanXMinutes: {\n    one: \"less than a minute\",\n    other: \"less than {{count}} minutes\",\n  },\n\n  xMinutes: {\n    one: \"1 minute\",\n    other: \"{{count}} minutes\",\n  },\n\n  aboutXHours: {\n    one: \"about 1 hour\",\n    other: \"about {{count}} hours\",\n  },\n\n  xHours: {\n    one: \"1 hour\",\n    other: \"{{count}} hours\",\n  },\n\n  xDays: {\n    one: \"1 day\",\n    other: \"{{count}} days\",\n  },\n\n  aboutXWeeks: {\n    one: \"about 1 week\",\n    other: \"about {{count}} weeks\",\n  },\n\n  xWeeks: {\n    one: \"1 week\",\n    other: \"{{count}} weeks\",\n  },\n\n  aboutXMonths: {\n    one: \"about 1 month\",\n    other: \"about {{count}} months\",\n  },\n\n  xMonths: {\n    one: \"1 month\",\n    other: \"{{count}} months\",\n  },\n\n  aboutXYears: {\n    one: \"about 1 year\",\n    other: \"about {{count}} years\",\n  },\n\n  xYears: {\n    one: \"1 year\",\n    other: \"{{count}} years\",\n  },\n\n  overXYears: {\n    one: \"over 1 year\",\n    other: \"over {{count}} years\",\n  },\n\n  almostXYears: {\n    one: \"almost 1 year\",\n    other: \"almost {{count}} years\",\n  },\n};\n\nexport const formatDistance = (token, count, options) => {\n  let result;\n\n  const tokenValue = formatDistanceLocale[token];\n  if (typeof tokenValue === \"string\") {\n    result = tokenValue;\n  } else if (count === 1) {\n    result = tokenValue.one;\n  } else {\n    result = tokenValue.other.replace(\"{{count}}\", count.toString());\n  }\n\n  if (options?.addSuffix) {\n    if (options.comparison && options.comparison > 0) {\n      return \"in \" + result;\n    } else {\n      return result + \" ago\";\n    }\n  }\n\n  return result;\n};\n","const formatRelativeLocale = {\n  lastWeek: \"'last' eeee 'at' p\",\n  yesterday: \"'yesterday at' p\",\n  today: \"'today at' p\",\n  tomorrow: \"'tomorrow at' p\",\n  nextWeek: \"eeee 'at' p\",\n  other: \"P\",\n};\n\nexport const formatRelative = (token, _date, _baseDate, _options) =>\n  formatRelativeLocale[token];\n","import { buildLocalizeFn } from \"../../_lib/buildLocalizeFn.mjs\";\n\nconst eraValues = {\n  narrow: [\"B\", \"A\"],\n  abbreviated: [\"BC\", \"AD\"],\n  wide: [\"Before Christ\", \"Anno Domini\"],\n};\n\nconst quarterValues = {\n  narrow: [\"1\", \"2\", \"3\", \"4\"],\n  abbreviated: [\"Q1\", \"Q2\", \"Q3\", \"Q4\"],\n  wide: [\"1st quarter\", \"2nd quarter\", \"3rd quarter\", \"4th quarter\"],\n};\n\n// Note: in English, the names of days of the week and months are capitalized.\n// If you are making a new locale based on this one, check if the same is true for the language you're working on.\n// Generally, formatted dates should look like they are in the middle of a sentence,\n// e.g. in Spanish language the weekdays and months should be in the lowercase.\nconst monthValues = {\n  narrow: [\"J\", \"F\", \"M\", \"A\", \"M\", \"J\", \"J\", \"A\", \"S\", \"O\", \"N\", \"D\"],\n  abbreviated: [\n    \"Jan\",\n    \"Feb\",\n    \"Mar\",\n    \"Apr\",\n    \"May\",\n    \"Jun\",\n    \"Jul\",\n    \"Aug\",\n    \"Sep\",\n    \"Oct\",\n    \"Nov\",\n    \"Dec\",\n  ],\n\n  wide: [\n    \"January\",\n    \"February\",\n    \"March\",\n    \"April\",\n    \"May\",\n    \"June\",\n    \"July\",\n    \"August\",\n    \"September\",\n    \"October\",\n    \"November\",\n    \"December\",\n  ],\n};\n\nconst dayValues = {\n  narrow: [\"S\", \"M\", \"T\", \"W\", \"T\", \"F\", \"S\"],\n  short: [\"Su\", \"Mo\", \"Tu\", \"We\", \"Th\", \"Fr\", \"Sa\"],\n  abbreviated: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n  wide: [\n    \"Sunday\",\n    \"Monday\",\n    \"Tuesday\",\n    \"Wednesday\",\n    \"Thursday\",\n    \"Friday\",\n    \"Saturday\",\n  ],\n};\n\nconst dayPeriodValues = {\n  narrow: {\n    am: \"a\",\n    pm: \"p\",\n    midnight: \"mi\",\n    noon: \"n\",\n    morning: \"morning\",\n    afternoon: \"afternoon\",\n    evening: \"evening\",\n    night: \"night\",\n  },\n  abbreviated: {\n    am: \"AM\",\n    pm: \"PM\",\n    midnight: \"midnight\",\n    noon: \"noon\",\n    morning: \"morning\",\n    afternoon: \"afternoon\",\n    evening: \"evening\",\n    night: \"night\",\n  },\n  wide: {\n    am: \"a.m.\",\n    pm: \"p.m.\",\n    midnight: \"midnight\",\n    noon: \"noon\",\n    morning: \"morning\",\n    afternoon: \"afternoon\",\n    evening: \"evening\",\n    night: \"night\",\n  },\n};\n\nconst formattingDayPeriodValues = {\n  narrow: {\n    am: \"a\",\n    pm: \"p\",\n    midnight: \"mi\",\n    noon: \"n\",\n    morning: \"in the morning\",\n    afternoon: \"in the afternoon\",\n    evening: \"in the evening\",\n    night: \"at night\",\n  },\n  abbreviated: {\n    am: \"AM\",\n    pm: \"PM\",\n    midnight: \"midnight\",\n    noon: \"noon\",\n    morning: \"in the morning\",\n    afternoon: \"in the afternoon\",\n    evening: \"in the evening\",\n    night: \"at night\",\n  },\n  wide: {\n    am: \"a.m.\",\n    pm: \"p.m.\",\n    midnight: \"midnight\",\n    noon: \"noon\",\n    morning: \"in the morning\",\n    afternoon: \"in the afternoon\",\n    evening: \"in the evening\",\n    night: \"at night\",\n  },\n};\n\nconst ordinalNumber = (dirtyNumber, _options) => {\n  const number = Number(dirtyNumber);\n\n  // If ordinal numbers depend on context, for example,\n  // if they are different for different grammatical genders,\n  // use `options.unit`.\n  //\n  // `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',\n  // 'day', 'hour', 'minute', 'second'.\n\n  const rem100 = number % 100;\n  if (rem100 > 20 || rem100 < 10) {\n    switch (rem100 % 10) {\n      case 1:\n        return number + \"st\";\n      case 2:\n        return number + \"nd\";\n      case 3:\n        return number + \"rd\";\n    }\n  }\n  return number + \"th\";\n};\n\nexport const localize = {\n  ordinalNumber,\n\n  era: buildLocalizeFn({\n    values: eraValues,\n    defaultWidth: \"wide\",\n  }),\n\n  quarter: buildLocalizeFn({\n    values: quarterValues,\n    defaultWidth: \"wide\",\n    argumentCallback: (quarter) => quarter - 1,\n  }),\n\n  month: buildLocalizeFn({\n    values: monthValues,\n    defaultWidth: \"wide\",\n  }),\n\n  day: buildLocalizeFn({\n    values: dayValues,\n    defaultWidth: \"wide\",\n  }),\n\n  dayPeriod: buildLocalizeFn({\n    values: dayPeriodValues,\n    defaultWidth: \"wide\",\n    formattingValues: formattingDayPeriodValues,\n    defaultFormattingWidth: \"wide\",\n  }),\n};\n","import { buildMatchFn } from \"../../_lib/buildMatchFn.mjs\";\nimport { buildMatchPatternFn } from \"../../_lib/buildMatchPatternFn.mjs\";\n\nconst matchOrdinalNumberPattern = /^(\\d+)(th|st|nd|rd)?/i;\nconst parseOrdinalNumberPattern = /\\d+/i;\n\nconst matchEraPatterns = {\n  narrow: /^(b|a)/i,\n  abbreviated: /^(b\\.?\\s?c\\.?|b\\.?\\s?c\\.?\\s?e\\.?|a\\.?\\s?d\\.?|c\\.?\\s?e\\.?)/i,\n  wide: /^(before christ|before common era|anno domini|common era)/i,\n};\nconst parseEraPatterns = {\n  any: [/^b/i, /^(a|c)/i],\n};\n\nconst matchQuarterPatterns = {\n  narrow: /^[1234]/i,\n  abbreviated: /^q[1234]/i,\n  wide: /^[1234](th|st|nd|rd)? quarter/i,\n};\nconst parseQuarterPatterns = {\n  any: [/1/i, /2/i, /3/i, /4/i],\n};\n\nconst matchMonthPatterns = {\n  narrow: /^[jfmasond]/i,\n  abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,\n  wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i,\n};\nconst parseMonthPatterns = {\n  narrow: [\n    /^j/i,\n    /^f/i,\n    /^m/i,\n    /^a/i,\n    /^m/i,\n    /^j/i,\n    /^j/i,\n    /^a/i,\n    /^s/i,\n    /^o/i,\n    /^n/i,\n    /^d/i,\n  ],\n\n  any: [\n    /^ja/i,\n    /^f/i,\n    /^mar/i,\n    /^ap/i,\n    /^may/i,\n    /^jun/i,\n    /^jul/i,\n    /^au/i,\n    /^s/i,\n    /^o/i,\n    /^n/i,\n    /^d/i,\n  ],\n};\n\nconst matchDayPatterns = {\n  narrow: /^[smtwf]/i,\n  short: /^(su|mo|tu|we|th|fr|sa)/i,\n  abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,\n  wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i,\n};\nconst parseDayPatterns = {\n  narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],\n  any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i],\n};\n\nconst matchDayPeriodPatterns = {\n  narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,\n  any: /^([ap]\\.?\\s?m\\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i,\n};\nconst parseDayPeriodPatterns = {\n  any: {\n    am: /^a/i,\n    pm: /^p/i,\n    midnight: /^mi/i,\n    noon: /^no/i,\n    morning: /morning/i,\n    afternoon: /afternoon/i,\n    evening: /evening/i,\n    night: /night/i,\n  },\n};\n\nexport const match = {\n  ordinalNumber: buildMatchPatternFn({\n    matchPattern: matchOrdinalNumberPattern,\n    parsePattern: parseOrdinalNumberPattern,\n    valueCallback: (value) => parseInt(value, 10),\n  }),\n\n  era: buildMatchFn({\n    matchPatterns: matchEraPatterns,\n    defaultMatchWidth: \"wide\",\n    parsePatterns: parseEraPatterns,\n    defaultParseWidth: \"any\",\n  }),\n\n  quarter: buildMatchFn({\n    matchPatterns: matchQuarterPatterns,\n    defaultMatchWidth: \"wide\",\n    parsePatterns: parseQuarterPatterns,\n    defaultParseWidth: \"any\",\n    valueCallback: (index) => index + 1,\n  }),\n\n  month: buildMatchFn({\n    matchPatterns: matchMonthPatterns,\n    defaultMatchWidth: \"wide\",\n    parsePatterns: parseMonthPatterns,\n    defaultParseWidth: \"any\",\n  }),\n\n  day: buildMatchFn({\n    matchPatterns: matchDayPatterns,\n    defaultMatchWidth: \"wide\",\n    parsePatterns: parseDayPatterns,\n    defaultParseWidth: \"any\",\n  }),\n\n  dayPeriod: buildMatchFn({\n    matchPatterns: matchDayPeriodPatterns,\n    defaultMatchWidth: \"any\",\n    parsePatterns: parseDayPeriodPatterns,\n    defaultParseWidth: \"any\",\n  }),\n};\n","import { buildFormatLongFn } from \"../../_lib/buildFormatLongFn.mjs\";\n\nconst dateFormats = {\n  full: \"EEEE, MMMM do, y\",\n  long: \"MMMM do, y\",\n  medium: \"MMM d, y\",\n  short: \"MM/dd/yyyy\",\n};\n\nconst timeFormats = {\n  full: \"h:mm:ss a zzzz\",\n  long: \"h:mm:ss a z\",\n  medium: \"h:mm:ss a\",\n  short: \"h:mm a\",\n};\n\nconst dateTimeFormats = {\n  full: \"{{date}} 'at' {{time}}\",\n  long: \"{{date}} 'at' {{time}}\",\n  medium: \"{{date}}, {{time}}\",\n  short: \"{{date}}, {{time}}\",\n};\n\nexport const formatLong = {\n  date: buildFormatLongFn({\n    formats: dateFormats,\n    defaultWidth: \"full\",\n  }),\n\n  time: buildFormatLongFn({\n    formats: timeFormats,\n    defaultWidth: \"full\",\n  }),\n\n  dateTime: buildFormatLongFn({\n    formats: dateTimeFormats,\n    defaultWidth: \"full\",\n  }),\n};\n","import { formatDistance } from \"./en-US/_lib/formatDistance.mjs\";\nimport { formatLong } from \"./en-US/_lib/formatLong.mjs\";\nimport { formatRelative } from \"./en-US/_lib/formatRelative.mjs\";\nimport { localize } from \"./en-US/_lib/localize.mjs\";\nimport { match } from \"./en-US/_lib/match.mjs\";\n\n/**\n * @category Locales\n * @summary English locale (United States).\n * @language English\n * @iso-639-2 eng\n * @author Sasha Koss [@kossnocorp](https://github.com/kossnocorp)\n * @author Lesha Koss [@leshakoss](https://github.com/leshakoss)\n */\nexport const enUS = {\n  code: \"en-US\",\n  formatDistance: formatDistance,\n  formatLong: formatLong,\n  formatRelative: formatRelative,\n  localize: localize,\n  match: match,\n  options: {\n    weekStartsOn: 0 /* Sunday */,\n    firstWeekContainsDate: 1,\n  },\n};\n\n// Fallback for modularized imports:\nexport default enUS;\n","import { enUS } from 'date-fns/locale';\nconst dateEnUs = {\n  name: 'en-US',\n  locale: enUS\n};\nexport default dateEnUs;","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nexport default freeGlobal;\n","import freeGlobal from './_freeGlobal.js';\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\nexport default root;\n","import root from './_root.js';\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nexport default Symbol;\n","import Symbol from './_Symbol.js';\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\nexport default 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\nexport default objectToString;\n","import Symbol from './_Symbol.js';\nimport getRawTag from './_getRawTag.js';\nimport objectToString from './_objectToString.js';\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\nexport default baseGetTag;\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\nexport default isObjectLike;\n","import baseGetTag from './_baseGetTag.js';\nimport isObjectLike from './isObjectLike.js';\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\nexport default isSymbol;\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\nexport default arrayMap;\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\nexport default isArray;\n","import Symbol from './_Symbol.js';\nimport arrayMap from './_arrayMap.js';\nimport isArray from './isArray.js';\nimport isSymbol from './isSymbol.js';\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\nexport default baseToString;\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\nexport default trimmedEndIndex;\n","import trimmedEndIndex from './_trimmedEndIndex.js';\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\nexport default baseTrim;\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\nexport default isObject;\n","import baseTrim from './_baseTrim.js';\nimport isObject from './isObject.js';\nimport isSymbol from './isSymbol.js';\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\nexport default toNumber;\n","/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n  return value;\n}\n\nexport default identity;\n","import baseGetTag from './_baseGetTag.js';\nimport isObject from './isObject.js';\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n    funcTag = '[object Function]',\n    genTag = '[object GeneratorFunction]',\n    proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` 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 a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n  if (!isObject(value)) {\n    return false;\n  }\n  // The use of `Object#toString` avoids issues with the `typeof` operator\n  // in Safari 9 which returns 'object' for typed arrays and other constructors.\n  var tag = baseGetTag(value);\n  return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nexport default isFunction;\n","import root from './_root.js';\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nexport default coreJsData;\n","import coreJsData from './_coreJsData.js';\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n  var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n  return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n  return !!maskSrcKey && (maskSrcKey in func);\n}\n\nexport default isMasked;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n  if (func != null) {\n    try {\n      return funcToString.call(func);\n    } catch (e) {}\n    try {\n      return (func + '');\n    } catch (e) {}\n  }\n  return '';\n}\n\nexport default toSource;\n","import isFunction from './isFunction.js';\nimport isMasked from './_isMasked.js';\nimport isObject from './isObject.js';\nimport toSource from './_toSource.js';\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\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n    objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n  funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n  .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n *  else `false`.\n */\nfunction baseIsNative(value) {\n  if (!isObject(value) || isMasked(value)) {\n    return false;\n  }\n  var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n  return pattern.test(toSource(value));\n}\n\nexport default baseIsNative;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n  return object == null ? undefined : object[key];\n}\n\nexport default getValue;\n","import baseIsNative from './_baseIsNative.js';\nimport getValue from './_getValue.js';\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n  var value = getValue(object, key);\n  return baseIsNative(value) ? value : undefined;\n}\n\nexport default getNative;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nexport default WeakMap;\n","import isObject from './isObject.js';\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n  function object() {}\n  return function(proto) {\n    if (!isObject(proto)) {\n      return {};\n    }\n    if (objectCreate) {\n      return objectCreate(proto);\n    }\n    object.prototype = proto;\n    var result = new object;\n    object.prototype = undefined;\n    return result;\n  };\n}());\n\nexport default baseCreate;\n","/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n  switch (args.length) {\n    case 0: return func.call(thisArg);\n    case 1: return func.call(thisArg, args[0]);\n    case 2: return func.call(thisArg, args[0], args[1]);\n    case 3: return func.call(thisArg, args[0], args[1], args[2]);\n  }\n  return func.apply(thisArg, args);\n}\n\nexport default apply;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n  var index = -1,\n      length = source.length;\n\n  array || (array = Array(length));\n  while (++index < length) {\n    array[index] = source[index];\n  }\n  return array;\n}\n\nexport default copyArray;\n","/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n    HOT_SPAN = 16;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeNow = Date.now;\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n  var count = 0,\n      lastCalled = 0;\n\n  return function() {\n    var stamp = nativeNow(),\n        remaining = HOT_SPAN - (stamp - lastCalled);\n\n    lastCalled = stamp;\n    if (remaining > 0) {\n      if (++count >= HOT_COUNT) {\n        return arguments[0];\n      }\n    } else {\n      count = 0;\n    }\n    return func.apply(undefined, arguments);\n  };\n}\n\nexport default shortOut;\n","/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n  return function() {\n    return value;\n  };\n}\n\nexport default constant;\n","import getNative from './_getNative.js';\n\nvar defineProperty = (function() {\n  try {\n    var func = getNative(Object, 'defineProperty');\n    func({}, '', {});\n    return func;\n  } catch (e) {}\n}());\n\nexport default defineProperty;\n","import constant from './constant.js';\nimport defineProperty from './_defineProperty.js';\nimport identity from './identity.js';\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n  return defineProperty(func, 'toString', {\n    'configurable': true,\n    'enumerable': false,\n    'value': constant(string),\n    'writable': true\n  });\n};\n\nexport default baseSetToString;\n","import baseSetToString from './_baseSetToString.js';\nimport shortOut from './_shortOut.js';\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\nexport default setToString;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n  var type = typeof value;\n  length = length == null ? MAX_SAFE_INTEGER : length;\n\n  return !!length &&\n    (type == 'number' ||\n      (type != 'symbol' && reIsUint.test(value))) &&\n        (value > -1 && value % 1 == 0 && value < length);\n}\n\nexport default isIndex;\n","import defineProperty from './_defineProperty.js';\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n  if (key == '__proto__' && defineProperty) {\n    defineProperty(object, key, {\n      'configurable': true,\n      'enumerable': true,\n      'value': value,\n      'writable': true\n    });\n  } else {\n    object[key] = value;\n  }\n}\n\nexport default baseAssignValue;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n  return value === other || (value !== value && other !== other);\n}\n\nexport default eq;\n","import baseAssignValue from './_baseAssignValue.js';\nimport eq from './eq.js';\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 * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n  var objValue = object[key];\n  if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n      (value === undefined && !(key in object))) {\n    baseAssignValue(object, key, value);\n  }\n}\n\nexport default assignValue;\n","import assignValue from './_assignValue.js';\nimport baseAssignValue from './_baseAssignValue.js';\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n  var isNew = !object;\n  object || (object = {});\n\n  var index = -1,\n      length = props.length;\n\n  while (++index < length) {\n    var key = props[index];\n\n    var newValue = customizer\n      ? customizer(object[key], source[key], key, object, source)\n      : undefined;\n\n    if (newValue === undefined) {\n      newValue = source[key];\n    }\n    if (isNew) {\n      baseAssignValue(object, key, newValue);\n    } else {\n      assignValue(object, key, newValue);\n    }\n  }\n  return object;\n}\n\nexport default copyObject;\n","import apply from './_apply.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n  start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n  return function() {\n    var args = arguments,\n        index = -1,\n        length = nativeMax(args.length - start, 0),\n        array = Array(length);\n\n    while (++index < length) {\n      array[index] = args[start + index];\n    }\n    index = -1;\n    var otherArgs = Array(start + 1);\n    while (++index < start) {\n      otherArgs[index] = args[index];\n    }\n    otherArgs[start] = transform(array);\n    return apply(func, this, otherArgs);\n  };\n}\n\nexport default overRest;\n","import identity from './identity.js';\nimport overRest from './_overRest.js';\nimport setToString from './_setToString.js';\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n  return setToString(overRest(func, start, identity), func + '');\n}\n\nexport default baseRest;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\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 valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n  return typeof value == 'number' &&\n    value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nexport default isLength;\n","import isFunction from './isFunction.js';\nimport isLength from './isLength.js';\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\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 array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n  return value != null && isLength(value.length) && !isFunction(value);\n}\n\nexport default isArrayLike;\n","import eq from './eq.js';\nimport isArrayLike from './isArrayLike.js';\nimport isIndex from './_isIndex.js';\nimport isObject from './isObject.js';\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n *  else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n  if (!isObject(object)) {\n    return false;\n  }\n  var type = typeof index;\n  if (type == 'number'\n        ? (isArrayLike(object) && isIndex(index, object.length))\n        : (type == 'string' && index in object)\n      ) {\n    return eq(object[index], value);\n  }\n  return false;\n}\n\nexport default isIterateeCall;\n","import baseRest from './_baseRest.js';\nimport isIterateeCall from './_isIterateeCall.js';\n\n/**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n  return baseRest(function(object, sources) {\n    var index = -1,\n        length = sources.length,\n        customizer = length > 1 ? sources[length - 1] : undefined,\n        guard = length > 2 ? sources[2] : undefined;\n\n    customizer = (assigner.length > 3 && typeof customizer == 'function')\n      ? (length--, customizer)\n      : undefined;\n\n    if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n      customizer = length < 3 ? undefined : customizer;\n      length = 1;\n    }\n    object = Object(object);\n    while (++index < length) {\n      var source = sources[index];\n      if (source) {\n        assigner(object, source, index, customizer);\n      }\n    }\n    return object;\n  });\n}\n\nexport default createAssigner;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n  var Ctor = value && value.constructor,\n      proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n  return value === proto;\n}\n\nexport default isPrototype;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n  var index = -1,\n      result = Array(n);\n\n  while (++index < n) {\n    result[index] = iteratee(index);\n  }\n  return result;\n}\n\nexport default baseTimes;\n","import baseGetTag from './_baseGetTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n  return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nexport default baseIsArguments;\n","import baseIsArguments from './_baseIsArguments.js';\nimport isObjectLike from './isObjectLike.js';\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/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` 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 `arguments` object,\n *  else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n  return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n    !propertyIsEnumerable.call(value, 'callee');\n};\n\nexport default isArguments;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n  return false;\n}\n\nexport default stubFalse;\n","import root from './_root.js';\nimport stubFalse from './stubFalse.js';\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nexport default isBuffer;\n","import baseGetTag from './_baseGetTag.js';\nimport isLength from './isLength.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n    arrayTag = '[object Array]',\n    boolTag = '[object Boolean]',\n    dateTag = '[object Date]',\n    errorTag = '[object Error]',\n    funcTag = '[object Function]',\n    mapTag = '[object Map]',\n    numberTag = '[object Number]',\n    objectTag = '[object Object]',\n    regexpTag = '[object RegExp]',\n    setTag = '[object Set]',\n    stringTag = '[object String]',\n    weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n    dataViewTag = '[object DataView]',\n    float32Tag = '[object Float32Array]',\n    float64Tag = '[object Float64Array]',\n    int8Tag = '[object Int8Array]',\n    int16Tag = '[object Int16Array]',\n    int32Tag = '[object Int32Array]',\n    uint8Tag = '[object Uint8Array]',\n    uint8ClampedTag = '[object Uint8ClampedArray]',\n    uint16Tag = '[object Uint16Array]',\n    uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n  return isObjectLike(value) &&\n    isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nexport default baseIsTypedArray;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n  return function(value) {\n    return func(value);\n  };\n}\n\nexport default baseUnary;\n","import freeGlobal from './_freeGlobal.js';\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n  try {\n    // Use `util.types` for Node.js 10+.\n    var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n    if (types) {\n      return types;\n    }\n\n    // Legacy `process.binding('util')` for Node.js < 10.\n    return freeProcess && freeProcess.binding && freeProcess.binding('util');\n  } catch (e) {}\n}());\n\nexport default nodeUtil;\n","import baseIsTypedArray from './_baseIsTypedArray.js';\nimport baseUnary from './_baseUnary.js';\nimport nodeUtil from './_nodeUtil.js';\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nexport default isTypedArray;\n","import baseTimes from './_baseTimes.js';\nimport isArguments from './isArguments.js';\nimport isArray from './isArray.js';\nimport isBuffer from './isBuffer.js';\nimport isIndex from './_isIndex.js';\nimport isTypedArray from './isTypedArray.js';\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 * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n  var isArr = isArray(value),\n      isArg = !isArr && isArguments(value),\n      isBuff = !isArr && !isArg && isBuffer(value),\n      isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n      skipIndexes = isArr || isArg || isBuff || isType,\n      result = skipIndexes ? baseTimes(value.length, String) : [],\n      length = result.length;\n\n  for (var key in value) {\n    if ((inherited || hasOwnProperty.call(value, key)) &&\n        !(skipIndexes && (\n           // Safari 9 has enumerable `arguments.length` in strict mode.\n           key == 'length' ||\n           // Node.js 0.10 has enumerable non-index properties on buffers.\n           (isBuff && (key == 'offset' || key == 'parent')) ||\n           // PhantomJS 2 has enumerable non-index properties on typed arrays.\n           (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n           // Skip index properties.\n           isIndex(key, length)\n        ))) {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\nexport default arrayLikeKeys;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n  return function(arg) {\n    return func(transform(arg));\n  };\n}\n\nexport default overArg;\n","import overArg from './_overArg.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nexport default nativeKeys;\n","import isPrototype from './_isPrototype.js';\nimport nativeKeys from './_nativeKeys.js';\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 * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n  if (!isPrototype(object)) {\n    return nativeKeys(object);\n  }\n  var result = [];\n  for (var key in Object(object)) {\n    if (hasOwnProperty.call(object, key) && key != 'constructor') {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\nexport default baseKeys;\n","import arrayLikeKeys from './_arrayLikeKeys.js';\nimport baseKeys from './_baseKeys.js';\nimport isArrayLike from './isArrayLike.js';\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n *   this.a = 1;\n *   this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n  return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nexport default keys;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n  var result = [];\n  if (object != null) {\n    for (var key in Object(object)) {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\nexport default nativeKeysIn;\n","import isObject from './isObject.js';\nimport isPrototype from './_isPrototype.js';\nimport nativeKeysIn from './_nativeKeysIn.js';\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 * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n  if (!isObject(object)) {\n    return nativeKeysIn(object);\n  }\n  var isProto = isPrototype(object),\n      result = [];\n\n  for (var key in object) {\n    if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\nexport default baseKeysIn;\n","import arrayLikeKeys from './_arrayLikeKeys.js';\nimport baseKeysIn from './_baseKeysIn.js';\nimport isArrayLike from './isArrayLike.js';\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n *   this.a = 1;\n *   this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n  return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nexport default keysIn;\n","import isArray from './isArray.js';\nimport isSymbol from './isSymbol.js';\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n    reIsPlainProp = /^\\w*$/;\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n  if (isArray(value)) {\n    return false;\n  }\n  var type = typeof value;\n  if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n      value == null || isSymbol(value)) {\n    return true;\n  }\n  return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n    (object != null && value in Object(object));\n}\n\nexport default isKey;\n","import getNative from './_getNative.js';\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nexport default nativeCreate;\n","import nativeCreate from './_nativeCreate.js';\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n  this.__data__ = nativeCreate ? nativeCreate(null) : {};\n  this.size = 0;\n}\n\nexport default hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n  var result = this.has(key) && delete this.__data__[key];\n  this.size -= result ? 1 : 0;\n  return result;\n}\n\nexport default hashDelete;\n","import nativeCreate from './_nativeCreate.js';\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\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 * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n  var data = this.__data__;\n  if (nativeCreate) {\n    var result = data[key];\n    return result === HASH_UNDEFINED ? undefined : result;\n  }\n  return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nexport default hashGet;\n","import nativeCreate from './_nativeCreate.js';\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 * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n  var data = this.__data__;\n  return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nexport default hashHas;\n","import nativeCreate from './_nativeCreate.js';\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n  var data = this.__data__;\n  this.size += this.has(key) ? 0 : 1;\n  data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n  return this;\n}\n\nexport default hashSet;\n","import hashClear from './_hashClear.js';\nimport hashDelete from './_hashDelete.js';\nimport hashGet from './_hashGet.js';\nimport hashHas from './_hashHas.js';\nimport hashSet from './_hashSet.js';\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n  var index = -1,\n      length = entries == null ? 0 : entries.length;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nexport default Hash;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n  this.__data__ = [];\n  this.size = 0;\n}\n\nexport default listCacheClear;\n","import eq from './eq.js';\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n  var length = array.length;\n  while (length--) {\n    if (eq(array[length][0], key)) {\n      return length;\n    }\n  }\n  return -1;\n}\n\nexport default assocIndexOf;\n","import assocIndexOf from './_assocIndexOf.js';\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  if (index < 0) {\n    return false;\n  }\n  var lastIndex = data.length - 1;\n  if (index == lastIndex) {\n    data.pop();\n  } else {\n    splice.call(data, index, 1);\n  }\n  --this.size;\n  return true;\n}\n\nexport default listCacheDelete;\n","import assocIndexOf from './_assocIndexOf.js';\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  return index < 0 ? undefined : data[index][1];\n}\n\nexport default listCacheGet;\n","import assocIndexOf from './_assocIndexOf.js';\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n  return assocIndexOf(this.__data__, key) > -1;\n}\n\nexport default listCacheHas;\n","import assocIndexOf from './_assocIndexOf.js';\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  if (index < 0) {\n    ++this.size;\n    data.push([key, value]);\n  } else {\n    data[index][1] = value;\n  }\n  return this;\n}\n\nexport default listCacheSet;\n","import listCacheClear from './_listCacheClear.js';\nimport listCacheDelete from './_listCacheDelete.js';\nimport listCacheGet from './_listCacheGet.js';\nimport listCacheHas from './_listCacheHas.js';\nimport listCacheSet from './_listCacheSet.js';\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n  var index = -1,\n      length = entries == null ? 0 : entries.length;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nexport default ListCache;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nexport default Map;\n","import Hash from './_Hash.js';\nimport ListCache from './_ListCache.js';\nimport Map from './_Map.js';\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n  this.size = 0;\n  this.__data__ = {\n    'hash': new Hash,\n    'map': new (Map || ListCache),\n    'string': new Hash\n  };\n}\n\nexport default mapCacheClear;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n  var type = typeof value;\n  return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n    ? (value !== '__proto__')\n    : (value === null);\n}\n\nexport default isKeyable;\n","import isKeyable from './_isKeyable.js';\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n  var data = map.__data__;\n  return isKeyable(key)\n    ? data[typeof key == 'string' ? 'string' : 'hash']\n    : data.map;\n}\n\nexport default getMapData;\n","import getMapData from './_getMapData.js';\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n  var result = getMapData(this, key)['delete'](key);\n  this.size -= result ? 1 : 0;\n  return result;\n}\n\nexport default mapCacheDelete;\n","import getMapData from './_getMapData.js';\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n  return getMapData(this, key).get(key);\n}\n\nexport default mapCacheGet;\n","import getMapData from './_getMapData.js';\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n  return getMapData(this, key).has(key);\n}\n\nexport default mapCacheHas;\n","import getMapData from './_getMapData.js';\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n  var data = getMapData(this, key),\n      size = data.size;\n\n  data.set(key, value);\n  this.size += data.size == size ? 0 : 1;\n  return this;\n}\n\nexport default mapCacheSet;\n","import mapCacheClear from './_mapCacheClear.js';\nimport mapCacheDelete from './_mapCacheDelete.js';\nimport mapCacheGet from './_mapCacheGet.js';\nimport mapCacheHas from './_mapCacheHas.js';\nimport mapCacheSet from './_mapCacheSet.js';\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n  var index = -1,\n      length = entries == null ? 0 : entries.length;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nexport default MapCache;\n","import MapCache from './_MapCache.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n  if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n    throw new TypeError(FUNC_ERROR_TEXT);\n  }\n  var memoized = function() {\n    var args = arguments,\n        key = resolver ? resolver.apply(this, args) : args[0],\n        cache = memoized.cache;\n\n    if (cache.has(key)) {\n      return cache.get(key);\n    }\n    var result = func.apply(this, args);\n    memoized.cache = cache.set(key, result) || cache;\n    return result;\n  };\n  memoized.cache = new (memoize.Cache || MapCache);\n  return memoized;\n}\n\n// Expose `MapCache`.\nmemoize.Cache = MapCache;\n\nexport default memoize;\n","import memoize from './memoize.js';\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\n\n/**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\nfunction memoizeCapped(func) {\n  var result = memoize(func, function(key) {\n    if (cache.size === MAX_MEMOIZE_SIZE) {\n      cache.clear();\n    }\n    return key;\n  });\n\n  var cache = result.cache;\n  return result;\n}\n\nexport default memoizeCapped;\n","import memoizeCapped from './_memoizeCapped.js';\n\n/** Used to match property names within property paths. */\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoizeCapped(function(string) {\n  var result = [];\n  if (string.charCodeAt(0) === 46 /* . */) {\n    result.push('');\n  }\n  string.replace(rePropName, function(match, number, quote, subString) {\n    result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n  });\n  return result;\n});\n\nexport default stringToPath;\n","import baseToString from './_baseToString.js';\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\nexport default toString;\n","import isArray from './isArray.js';\nimport isKey from './_isKey.js';\nimport stringToPath from './_stringToPath.js';\nimport toString from './toString.js';\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value, object) {\n  if (isArray(value)) {\n    return value;\n  }\n  return isKey(value, object) ? [value] : stringToPath(toString(value));\n}\n\nexport default castPath;\n","import isSymbol from './isSymbol.js';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n  if (typeof value == 'string' || isSymbol(value)) {\n    return value;\n  }\n  var result = (value + '');\n  return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nexport default toKey;\n","import castPath from './_castPath.js';\nimport toKey from './_toKey.js';\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n  path = castPath(path, object);\n\n  var index = 0,\n      length = path.length;\n\n  while (object != null && index < length) {\n    object = object[toKey(path[index++])];\n  }\n  return (index && index == length) ? object : undefined;\n}\n\nexport default baseGet;\n","import baseGet from './_baseGet.js';\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n  var result = object == null ? undefined : baseGet(object, path);\n  return result === undefined ? defaultValue : result;\n}\n\nexport default get;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n  var index = -1,\n      length = values.length,\n      offset = array.length;\n\n  while (++index < length) {\n    array[offset + index] = values[index];\n  }\n  return array;\n}\n\nexport default arrayPush;\n","import overArg from './_overArg.js';\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nexport default getPrototype;\n","import baseGetTag from './_baseGetTag.js';\nimport getPrototype from './_getPrototype.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n    objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n *   this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n  if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n    return false;\n  }\n  var proto = getPrototype(value);\n  if (proto === null) {\n    return true;\n  }\n  var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n  return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n    funcToString.call(Ctor) == objectCtorString;\n}\n\nexport default isPlainObject;\n","/**\n * The base implementation of `_.slice` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\nfunction baseSlice(array, start, end) {\n  var index = -1,\n      length = array.length;\n\n  if (start < 0) {\n    start = -start > length ? 0 : (length + start);\n  }\n  end = end > length ? length : end;\n  if (end < 0) {\n    end += length;\n  }\n  length = start > end ? 0 : ((end - start) >>> 0);\n  start >>>= 0;\n\n  var result = Array(length);\n  while (++index < length) {\n    result[index] = array[index + start];\n  }\n  return result;\n}\n\nexport default baseSlice;\n","import baseSlice from './_baseSlice.js';\n\n/**\n * Casts `array` to a slice if it's needed.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {number} start The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the cast slice.\n */\nfunction castSlice(array, start, end) {\n  var length = array.length;\n  end = end === undefined ? length : end;\n  return (!start && end >= length) ? array : baseSlice(array, start, end);\n}\n\nexport default castSlice;\n","/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n    rsComboMarksRange = '\\\\u0300-\\\\u036f',\n    reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n    rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n    rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n    rsVarRange = '\\\\ufe0e\\\\ufe0f';\n\n/** Used to compose unicode capture groups. */\nvar rsZWJ = '\\\\u200d';\n\n/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\nvar reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange  + rsComboRange + rsVarRange + ']');\n\n/**\n * Checks if `string` contains Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a symbol is found, else `false`.\n */\nfunction hasUnicode(string) {\n  return reHasUnicode.test(string);\n}\n\nexport default hasUnicode;\n","/**\n * Converts an ASCII `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction asciiToArray(string) {\n  return string.split('');\n}\n\nexport default asciiToArray;\n","/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n    rsComboMarksRange = '\\\\u0300-\\\\u036f',\n    reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n    rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n    rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n    rsVarRange = '\\\\ufe0e\\\\ufe0f';\n\n/** Used to compose unicode capture groups. */\nvar rsAstral = '[' + rsAstralRange + ']',\n    rsCombo = '[' + rsComboRange + ']',\n    rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n    rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n    rsNonAstral = '[^' + rsAstralRange + ']',\n    rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n    rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n    rsZWJ = '\\\\u200d';\n\n/** Used to compose unicode regexes. */\nvar reOptMod = rsModifier + '?',\n    rsOptVar = '[' + rsVarRange + ']?',\n    rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n    rsSeq = rsOptVar + reOptMod + rsOptJoin,\n    rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\n\n/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\nvar reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\n\n/**\n * Converts a Unicode `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction unicodeToArray(string) {\n  return string.match(reUnicode) || [];\n}\n\nexport default unicodeToArray;\n","import asciiToArray from './_asciiToArray.js';\nimport hasUnicode from './_hasUnicode.js';\nimport unicodeToArray from './_unicodeToArray.js';\n\n/**\n * Converts `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction stringToArray(string) {\n  return hasUnicode(string)\n    ? unicodeToArray(string)\n    : asciiToArray(string);\n}\n\nexport default stringToArray;\n","import castSlice from './_castSlice.js';\nimport hasUnicode from './_hasUnicode.js';\nimport stringToArray from './_stringToArray.js';\nimport toString from './toString.js';\n\n/**\n * Creates a function like `_.lowerFirst`.\n *\n * @private\n * @param {string} methodName The name of the `String` case method to use.\n * @returns {Function} Returns the new case function.\n */\nfunction createCaseFirst(methodName) {\n  return function(string) {\n    string = toString(string);\n\n    var strSymbols = hasUnicode(string)\n      ? stringToArray(string)\n      : undefined;\n\n    var chr = strSymbols\n      ? strSymbols[0]\n      : string.charAt(0);\n\n    var trailing = strSymbols\n      ? castSlice(strSymbols, 1).join('')\n      : string.slice(1);\n\n    return chr[methodName]() + trailing;\n  };\n}\n\nexport default createCaseFirst;\n","import createCaseFirst from './_createCaseFirst.js';\n\n/**\n * Converts the first character of `string` to upper case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.upperFirst('fred');\n * // => 'Fred'\n *\n * _.upperFirst('FRED');\n * // => 'FRED'\n */\nvar upperFirst = createCaseFirst('toUpperCase');\n\nexport default upperFirst;\n","/**\n * A specialized version of `_.reduce` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the first element of `array` as\n *  the initial value.\n * @returns {*} Returns the accumulated value.\n */\nfunction arrayReduce(array, iteratee, accumulator, initAccum) {\n  var index = -1,\n      length = array == null ? 0 : array.length;\n\n  if (initAccum && length) {\n    accumulator = array[++index];\n  }\n  while (++index < length) {\n    accumulator = iteratee(accumulator, array[index], index, array);\n  }\n  return accumulator;\n}\n\nexport default arrayReduce;\n","/**\n * The base implementation of `_.propertyOf` without support for deep paths.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyOf(object) {\n  return function(key) {\n    return object == null ? undefined : object[key];\n  };\n}\n\nexport default basePropertyOf;\n","import basePropertyOf from './_basePropertyOf.js';\n\n/** Used to map Latin Unicode letters to basic Latin letters. */\nvar deburredLetters = {\n  // Latin-1 Supplement block.\n  '\\xc0': 'A',  '\\xc1': 'A', '\\xc2': 'A', '\\xc3': 'A', '\\xc4': 'A', '\\xc5': 'A',\n  '\\xe0': 'a',  '\\xe1': 'a', '\\xe2': 'a', '\\xe3': 'a', '\\xe4': 'a', '\\xe5': 'a',\n  '\\xc7': 'C',  '\\xe7': 'c',\n  '\\xd0': 'D',  '\\xf0': 'd',\n  '\\xc8': 'E',  '\\xc9': 'E', '\\xca': 'E', '\\xcb': 'E',\n  '\\xe8': 'e',  '\\xe9': 'e', '\\xea': 'e', '\\xeb': 'e',\n  '\\xcc': 'I',  '\\xcd': 'I', '\\xce': 'I', '\\xcf': 'I',\n  '\\xec': 'i',  '\\xed': 'i', '\\xee': 'i', '\\xef': 'i',\n  '\\xd1': 'N',  '\\xf1': 'n',\n  '\\xd2': 'O',  '\\xd3': 'O', '\\xd4': 'O', '\\xd5': 'O', '\\xd6': 'O', '\\xd8': 'O',\n  '\\xf2': 'o',  '\\xf3': 'o', '\\xf4': 'o', '\\xf5': 'o', '\\xf6': 'o', '\\xf8': 'o',\n  '\\xd9': 'U',  '\\xda': 'U', '\\xdb': 'U', '\\xdc': 'U',\n  '\\xf9': 'u',  '\\xfa': 'u', '\\xfb': 'u', '\\xfc': 'u',\n  '\\xdd': 'Y',  '\\xfd': 'y', '\\xff': 'y',\n  '\\xc6': 'Ae', '\\xe6': 'ae',\n  '\\xde': 'Th', '\\xfe': 'th',\n  '\\xdf': 'ss',\n  // Latin Extended-A block.\n  '\\u0100': 'A',  '\\u0102': 'A', '\\u0104': 'A',\n  '\\u0101': 'a',  '\\u0103': 'a', '\\u0105': 'a',\n  '\\u0106': 'C',  '\\u0108': 'C', '\\u010a': 'C', '\\u010c': 'C',\n  '\\u0107': 'c',  '\\u0109': 'c', '\\u010b': 'c', '\\u010d': 'c',\n  '\\u010e': 'D',  '\\u0110': 'D', '\\u010f': 'd', '\\u0111': 'd',\n  '\\u0112': 'E',  '\\u0114': 'E', '\\u0116': 'E', '\\u0118': 'E', '\\u011a': 'E',\n  '\\u0113': 'e',  '\\u0115': 'e', '\\u0117': 'e', '\\u0119': 'e', '\\u011b': 'e',\n  '\\u011c': 'G',  '\\u011e': 'G', '\\u0120': 'G', '\\u0122': 'G',\n  '\\u011d': 'g',  '\\u011f': 'g', '\\u0121': 'g', '\\u0123': 'g',\n  '\\u0124': 'H',  '\\u0126': 'H', '\\u0125': 'h', '\\u0127': 'h',\n  '\\u0128': 'I',  '\\u012a': 'I', '\\u012c': 'I', '\\u012e': 'I', '\\u0130': 'I',\n  '\\u0129': 'i',  '\\u012b': 'i', '\\u012d': 'i', '\\u012f': 'i', '\\u0131': 'i',\n  '\\u0134': 'J',  '\\u0135': 'j',\n  '\\u0136': 'K',  '\\u0137': 'k', '\\u0138': 'k',\n  '\\u0139': 'L',  '\\u013b': 'L', '\\u013d': 'L', '\\u013f': 'L', '\\u0141': 'L',\n  '\\u013a': 'l',  '\\u013c': 'l', '\\u013e': 'l', '\\u0140': 'l', '\\u0142': 'l',\n  '\\u0143': 'N',  '\\u0145': 'N', '\\u0147': 'N', '\\u014a': 'N',\n  '\\u0144': 'n',  '\\u0146': 'n', '\\u0148': 'n', '\\u014b': 'n',\n  '\\u014c': 'O',  '\\u014e': 'O', '\\u0150': 'O',\n  '\\u014d': 'o',  '\\u014f': 'o', '\\u0151': 'o',\n  '\\u0154': 'R',  '\\u0156': 'R', '\\u0158': 'R',\n  '\\u0155': 'r',  '\\u0157': 'r', '\\u0159': 'r',\n  '\\u015a': 'S',  '\\u015c': 'S', '\\u015e': 'S', '\\u0160': 'S',\n  '\\u015b': 's',  '\\u015d': 's', '\\u015f': 's', '\\u0161': 's',\n  '\\u0162': 'T',  '\\u0164': 'T', '\\u0166': 'T',\n  '\\u0163': 't',  '\\u0165': 't', '\\u0167': 't',\n  '\\u0168': 'U',  '\\u016a': 'U', '\\u016c': 'U', '\\u016e': 'U', '\\u0170': 'U', '\\u0172': 'U',\n  '\\u0169': 'u',  '\\u016b': 'u', '\\u016d': 'u', '\\u016f': 'u', '\\u0171': 'u', '\\u0173': 'u',\n  '\\u0174': 'W',  '\\u0175': 'w',\n  '\\u0176': 'Y',  '\\u0177': 'y', '\\u0178': 'Y',\n  '\\u0179': 'Z',  '\\u017b': 'Z', '\\u017d': 'Z',\n  '\\u017a': 'z',  '\\u017c': 'z', '\\u017e': 'z',\n  '\\u0132': 'IJ', '\\u0133': 'ij',\n  '\\u0152': 'Oe', '\\u0153': 'oe',\n  '\\u0149': \"'n\", '\\u017f': 's'\n};\n\n/**\n * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A\n * letters to basic Latin letters.\n *\n * @private\n * @param {string} letter The matched letter to deburr.\n * @returns {string} Returns the deburred letter.\n */\nvar deburrLetter = basePropertyOf(deburredLetters);\n\nexport default deburrLetter;\n","import deburrLetter from './_deburrLetter.js';\nimport toString from './toString.js';\n\n/** Used to match Latin Unicode letters (excluding mathematical operators). */\nvar reLatin = /[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g;\n\n/** Used to compose unicode character classes. */\nvar rsComboMarksRange = '\\\\u0300-\\\\u036f',\n    reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n    rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n    rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange;\n\n/** Used to compose unicode capture groups. */\nvar rsCombo = '[' + rsComboRange + ']';\n\n/**\n * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and\n * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).\n */\nvar reComboMark = RegExp(rsCombo, 'g');\n\n/**\n * Deburrs `string` by converting\n * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)\n * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)\n * letters to basic Latin letters and removing\n * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to deburr.\n * @returns {string} Returns the deburred string.\n * @example\n *\n * _.deburr('déjà vu');\n * // => 'deja vu'\n */\nfunction deburr(string) {\n  string = toString(string);\n  return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');\n}\n\nexport default deburr;\n","/** Used to match words composed of alphanumeric characters. */\nvar reAsciiWord = /[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g;\n\n/**\n * Splits an ASCII `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\nfunction asciiWords(string) {\n  return string.match(reAsciiWord) || [];\n}\n\nexport default asciiWords;\n","/** Used to detect strings that need a more robust regexp to match words. */\nvar reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;\n\n/**\n * Checks if `string` contains a word composed of Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a word is found, else `false`.\n */\nfunction hasUnicodeWord(string) {\n  return reHasUnicodeWord.test(string);\n}\n\nexport default hasUnicodeWord;\n","/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n    rsComboMarksRange = '\\\\u0300-\\\\u036f',\n    reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n    rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n    rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n    rsDingbatRange = '\\\\u2700-\\\\u27bf',\n    rsLowerRange = 'a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff',\n    rsMathOpRange = '\\\\xac\\\\xb1\\\\xd7\\\\xf7',\n    rsNonCharRange = '\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf',\n    rsPunctuationRange = '\\\\u2000-\\\\u206f',\n    rsSpaceRange = ' \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000',\n    rsUpperRange = 'A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde',\n    rsVarRange = '\\\\ufe0e\\\\ufe0f',\n    rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;\n\n/** Used to compose unicode capture groups. */\nvar rsApos = \"['\\u2019]\",\n    rsBreak = '[' + rsBreakRange + ']',\n    rsCombo = '[' + rsComboRange + ']',\n    rsDigits = '\\\\d+',\n    rsDingbat = '[' + rsDingbatRange + ']',\n    rsLower = '[' + rsLowerRange + ']',\n    rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',\n    rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n    rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n    rsNonAstral = '[^' + rsAstralRange + ']',\n    rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n    rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n    rsUpper = '[' + rsUpperRange + ']',\n    rsZWJ = '\\\\u200d';\n\n/** Used to compose unicode regexes. */\nvar rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',\n    rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',\n    rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',\n    rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',\n    reOptMod = rsModifier + '?',\n    rsOptVar = '[' + rsVarRange + ']?',\n    rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n    rsOrdLower = '\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])',\n    rsOrdUpper = '\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])',\n    rsSeq = rsOptVar + reOptMod + rsOptJoin,\n    rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq;\n\n/** Used to match complex or compound words. */\nvar reUnicodeWord = RegExp([\n  rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',\n  rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',\n  rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,\n  rsUpper + '+' + rsOptContrUpper,\n  rsOrdUpper,\n  rsOrdLower,\n  rsDigits,\n  rsEmoji\n].join('|'), 'g');\n\n/**\n * Splits a Unicode `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\nfunction unicodeWords(string) {\n  return string.match(reUnicodeWord) || [];\n}\n\nexport default unicodeWords;\n","import asciiWords from './_asciiWords.js';\nimport hasUnicodeWord from './_hasUnicodeWord.js';\nimport toString from './toString.js';\nimport unicodeWords from './_unicodeWords.js';\n\n/**\n * Splits `string` into an array of its words.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {RegExp|string} [pattern] The pattern to match words.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the words of `string`.\n * @example\n *\n * _.words('fred, barney, & pebbles');\n * // => ['fred', 'barney', 'pebbles']\n *\n * _.words('fred, barney, & pebbles', /[^, ]+/g);\n * // => ['fred', 'barney', '&', 'pebbles']\n */\nfunction words(string, pattern, guard) {\n  string = toString(string);\n  pattern = guard ? undefined : pattern;\n\n  if (pattern === undefined) {\n    return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);\n  }\n  return string.match(pattern) || [];\n}\n\nexport default words;\n","import arrayReduce from './_arrayReduce.js';\nimport deburr from './deburr.js';\nimport words from './words.js';\n\n/** Used to compose unicode capture groups. */\nvar rsApos = \"['\\u2019]\";\n\n/** Used to match apostrophes. */\nvar reApos = RegExp(rsApos, 'g');\n\n/**\n * Creates a function like `_.camelCase`.\n *\n * @private\n * @param {Function} callback The function to combine each word.\n * @returns {Function} Returns the new compounder function.\n */\nfunction createCompounder(callback) {\n  return function(string) {\n    return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');\n  };\n}\n\nexport default createCompounder;\n","import ListCache from './_ListCache.js';\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n  this.__data__ = new ListCache;\n  this.size = 0;\n}\n\nexport default stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n  var data = this.__data__,\n      result = data['delete'](key);\n\n  this.size = data.size;\n  return result;\n}\n\nexport default stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n  return this.__data__.get(key);\n}\n\nexport default stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n  return this.__data__.has(key);\n}\n\nexport default stackHas;\n","import ListCache from './_ListCache.js';\nimport Map from './_Map.js';\nimport MapCache from './_MapCache.js';\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n  var data = this.__data__;\n  if (data instanceof ListCache) {\n    var pairs = data.__data__;\n    if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n      pairs.push([key, value]);\n      this.size = ++data.size;\n      return this;\n    }\n    data = this.__data__ = new MapCache(pairs);\n  }\n  data.set(key, value);\n  this.size = data.size;\n  return this;\n}\n\nexport default stackSet;\n","import ListCache from './_ListCache.js';\nimport stackClear from './_stackClear.js';\nimport stackDelete from './_stackDelete.js';\nimport stackGet from './_stackGet.js';\nimport stackHas from './_stackHas.js';\nimport stackSet from './_stackSet.js';\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n  var data = this.__data__ = new ListCache(entries);\n  this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nexport default Stack;\n","import root from './_root.js';\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n    allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of  `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n  if (isDeep) {\n    return buffer.slice();\n  }\n  var length = buffer.length,\n      result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n  buffer.copy(result);\n  return result;\n}\n\nexport default cloneBuffer;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n  var index = -1,\n      length = array == null ? 0 : array.length,\n      resIndex = 0,\n      result = [];\n\n  while (++index < length) {\n    var value = array[index];\n    if (predicate(value, index, array)) {\n      result[resIndex++] = value;\n    }\n  }\n  return result;\n}\n\nexport default arrayFilter;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n  return [];\n}\n\nexport default stubArray;\n","import arrayFilter from './_arrayFilter.js';\nimport stubArray from './stubArray.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n  if (object == null) {\n    return [];\n  }\n  object = Object(object);\n  return arrayFilter(nativeGetSymbols(object), function(symbol) {\n    return propertyIsEnumerable.call(object, symbol);\n  });\n};\n\nexport default getSymbols;\n","import arrayPush from './_arrayPush.js';\nimport isArray from './isArray.js';\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n  var result = keysFunc(object);\n  return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nexport default baseGetAllKeys;\n","import baseGetAllKeys from './_baseGetAllKeys.js';\nimport getSymbols from './_getSymbols.js';\nimport keys from './keys.js';\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n  return baseGetAllKeys(object, keys, getSymbols);\n}\n\nexport default getAllKeys;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nexport default DataView;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nexport default Promise;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nexport default Set;\n","import DataView from './_DataView.js';\nimport Map from './_Map.js';\nimport Promise from './_Promise.js';\nimport Set from './_Set.js';\nimport WeakMap from './_WeakMap.js';\nimport baseGetTag from './_baseGetTag.js';\nimport toSource from './_toSource.js';\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n    objectTag = '[object Object]',\n    promiseTag = '[object Promise]',\n    setTag = '[object Set]',\n    weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n    mapCtorString = toSource(Map),\n    promiseCtorString = toSource(Promise),\n    setCtorString = toSource(Set),\n    weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n    (Map && getTag(new Map) != mapTag) ||\n    (Promise && getTag(Promise.resolve()) != promiseTag) ||\n    (Set && getTag(new Set) != setTag) ||\n    (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n  getTag = function(value) {\n    var result = baseGetTag(value),\n        Ctor = result == objectTag ? value.constructor : undefined,\n        ctorString = Ctor ? toSource(Ctor) : '';\n\n    if (ctorString) {\n      switch (ctorString) {\n        case dataViewCtorString: return dataViewTag;\n        case mapCtorString: return mapTag;\n        case promiseCtorString: return promiseTag;\n        case setCtorString: return setTag;\n        case weakMapCtorString: return weakMapTag;\n      }\n    }\n    return result;\n  };\n}\n\nexport default getTag;\n","import root from './_root.js';\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nexport default Uint8Array;\n","import Uint8Array from './_Uint8Array.js';\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n  var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n  new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n  return result;\n}\n\nexport default cloneArrayBuffer;\n","import cloneArrayBuffer from './_cloneArrayBuffer.js';\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n  var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n  return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nexport default cloneTypedArray;\n","import baseCreate from './_baseCreate.js';\nimport getPrototype from './_getPrototype.js';\nimport isPrototype from './_isPrototype.js';\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n  return (typeof object.constructor == 'function' && !isPrototype(object))\n    ? baseCreate(getPrototype(object))\n    : {};\n}\n\nexport default initCloneObject;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n  this.__data__.set(value, HASH_UNDEFINED);\n  return this;\n}\n\nexport default setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n  return this.__data__.has(value);\n}\n\nexport default setCacheHas;\n","import MapCache from './_MapCache.js';\nimport setCacheAdd from './_setCacheAdd.js';\nimport setCacheHas from './_setCacheHas.js';\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n  var index = -1,\n      length = values == null ? 0 : values.length;\n\n  this.__data__ = new MapCache;\n  while (++index < length) {\n    this.add(values[index]);\n  }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nexport default SetCache;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n *  else `false`.\n */\nfunction arraySome(array, predicate) {\n  var index = -1,\n      length = array == null ? 0 : array.length;\n\n  while (++index < length) {\n    if (predicate(array[index], index, array)) {\n      return true;\n    }\n  }\n  return false;\n}\n\nexport default arraySome;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n  return cache.has(key);\n}\n\nexport default cacheHas;\n","import SetCache from './_SetCache.js';\nimport arraySome from './_arraySome.js';\nimport cacheHas from './_cacheHas.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n    COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n  var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n      arrLength = array.length,\n      othLength = other.length;\n\n  if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n    return false;\n  }\n  // Check that cyclic values are equal.\n  var arrStacked = stack.get(array);\n  var othStacked = stack.get(other);\n  if (arrStacked && othStacked) {\n    return arrStacked == other && othStacked == array;\n  }\n  var index = -1,\n      result = true,\n      seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n  stack.set(array, other);\n  stack.set(other, array);\n\n  // Ignore non-index properties.\n  while (++index < arrLength) {\n    var arrValue = array[index],\n        othValue = other[index];\n\n    if (customizer) {\n      var compared = isPartial\n        ? customizer(othValue, arrValue, index, other, array, stack)\n        : customizer(arrValue, othValue, index, array, other, stack);\n    }\n    if (compared !== undefined) {\n      if (compared) {\n        continue;\n      }\n      result = false;\n      break;\n    }\n    // Recursively compare arrays (susceptible to call stack limits).\n    if (seen) {\n      if (!arraySome(other, function(othValue, othIndex) {\n            if (!cacheHas(seen, othIndex) &&\n                (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n              return seen.push(othIndex);\n            }\n          })) {\n        result = false;\n        break;\n      }\n    } else if (!(\n          arrValue === othValue ||\n            equalFunc(arrValue, othValue, bitmask, customizer, stack)\n        )) {\n      result = false;\n      break;\n    }\n  }\n  stack['delete'](array);\n  stack['delete'](other);\n  return result;\n}\n\nexport default equalArrays;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n  var index = -1,\n      result = Array(map.size);\n\n  map.forEach(function(value, key) {\n    result[++index] = [key, value];\n  });\n  return result;\n}\n\nexport default mapToArray;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n  var index = -1,\n      result = Array(set.size);\n\n  set.forEach(function(value) {\n    result[++index] = value;\n  });\n  return result;\n}\n\nexport default setToArray;\n","import Symbol from './_Symbol.js';\nimport Uint8Array from './_Uint8Array.js';\nimport eq from './eq.js';\nimport equalArrays from './_equalArrays.js';\nimport mapToArray from './_mapToArray.js';\nimport setToArray from './_setToArray.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n    COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n    dateTag = '[object Date]',\n    errorTag = '[object Error]',\n    mapTag = '[object Map]',\n    numberTag = '[object Number]',\n    regexpTag = '[object RegExp]',\n    setTag = '[object Set]',\n    stringTag = '[object String]',\n    symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n    dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n    symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n  switch (tag) {\n    case dataViewTag:\n      if ((object.byteLength != other.byteLength) ||\n          (object.byteOffset != other.byteOffset)) {\n        return false;\n      }\n      object = object.buffer;\n      other = other.buffer;\n\n    case arrayBufferTag:\n      if ((object.byteLength != other.byteLength) ||\n          !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n        return false;\n      }\n      return true;\n\n    case boolTag:\n    case dateTag:\n    case numberTag:\n      // Coerce booleans to `1` or `0` and dates to milliseconds.\n      // Invalid dates are coerced to `NaN`.\n      return eq(+object, +other);\n\n    case errorTag:\n      return object.name == other.name && object.message == other.message;\n\n    case regexpTag:\n    case stringTag:\n      // Coerce regexes to strings and treat strings, primitives and objects,\n      // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n      // for more details.\n      return object == (other + '');\n\n    case mapTag:\n      var convert = mapToArray;\n\n    case setTag:\n      var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n      convert || (convert = setToArray);\n\n      if (object.size != other.size && !isPartial) {\n        return false;\n      }\n      // Assume cyclic values are equal.\n      var stacked = stack.get(object);\n      if (stacked) {\n        return stacked == other;\n      }\n      bitmask |= COMPARE_UNORDERED_FLAG;\n\n      // Recursively compare objects (susceptible to call stack limits).\n      stack.set(object, other);\n      var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n      stack['delete'](object);\n      return result;\n\n    case symbolTag:\n      if (symbolValueOf) {\n        return symbolValueOf.call(object) == symbolValueOf.call(other);\n      }\n  }\n  return false;\n}\n\nexport default equalByTag;\n","import getAllKeys from './_getAllKeys.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\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 * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n  var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n      objProps = getAllKeys(object),\n      objLength = objProps.length,\n      othProps = getAllKeys(other),\n      othLength = othProps.length;\n\n  if (objLength != othLength && !isPartial) {\n    return false;\n  }\n  var index = objLength;\n  while (index--) {\n    var key = objProps[index];\n    if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n      return false;\n    }\n  }\n  // Check that cyclic values are equal.\n  var objStacked = stack.get(object);\n  var othStacked = stack.get(other);\n  if (objStacked && othStacked) {\n    return objStacked == other && othStacked == object;\n  }\n  var result = true;\n  stack.set(object, other);\n  stack.set(other, object);\n\n  var skipCtor = isPartial;\n  while (++index < objLength) {\n    key = objProps[index];\n    var objValue = object[key],\n        othValue = other[key];\n\n    if (customizer) {\n      var compared = isPartial\n        ? customizer(othValue, objValue, key, other, object, stack)\n        : customizer(objValue, othValue, key, object, other, stack);\n    }\n    // Recursively compare objects (susceptible to call stack limits).\n    if (!(compared === undefined\n          ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n          : compared\n        )) {\n      result = false;\n      break;\n    }\n    skipCtor || (skipCtor = key == 'constructor');\n  }\n  if (result && !skipCtor) {\n    var objCtor = object.constructor,\n        othCtor = other.constructor;\n\n    // Non `Object` object instances with different constructors are not equal.\n    if (objCtor != othCtor &&\n        ('constructor' in object && 'constructor' in other) &&\n        !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n          typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n      result = false;\n    }\n  }\n  stack['delete'](object);\n  stack['delete'](other);\n  return result;\n}\n\nexport default equalObjects;\n","import Stack from './_Stack.js';\nimport equalArrays from './_equalArrays.js';\nimport equalByTag from './_equalByTag.js';\nimport equalObjects from './_equalObjects.js';\nimport getTag from './_getTag.js';\nimport isArray from './isArray.js';\nimport isBuffer from './isBuffer.js';\nimport isTypedArray from './isTypedArray.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n    arrayTag = '[object Array]',\n    objectTag = '[object Object]';\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 * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n  var objIsArr = isArray(object),\n      othIsArr = isArray(other),\n      objTag = objIsArr ? arrayTag : getTag(object),\n      othTag = othIsArr ? arrayTag : getTag(other);\n\n  objTag = objTag == argsTag ? objectTag : objTag;\n  othTag = othTag == argsTag ? objectTag : othTag;\n\n  var objIsObj = objTag == objectTag,\n      othIsObj = othTag == objectTag,\n      isSameTag = objTag == othTag;\n\n  if (isSameTag && isBuffer(object)) {\n    if (!isBuffer(other)) {\n      return false;\n    }\n    objIsArr = true;\n    objIsObj = false;\n  }\n  if (isSameTag && !objIsObj) {\n    stack || (stack = new Stack);\n    return (objIsArr || isTypedArray(object))\n      ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n      : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n  }\n  if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n    var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n        othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n    if (objIsWrapped || othIsWrapped) {\n      var objUnwrapped = objIsWrapped ? object.value() : object,\n          othUnwrapped = othIsWrapped ? other.value() : other;\n\n      stack || (stack = new Stack);\n      return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n    }\n  }\n  if (!isSameTag) {\n    return false;\n  }\n  stack || (stack = new Stack);\n  return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nexport default baseIsEqualDeep;\n","import baseIsEqualDeep from './_baseIsEqualDeep.js';\nimport isObjectLike from './isObjectLike.js';\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n *  1 - Unordered comparison\n *  2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n  if (value === other) {\n    return true;\n  }\n  if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n    return value !== value && other !== other;\n  }\n  return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nexport default baseIsEqual;\n","import Stack from './_Stack.js';\nimport baseIsEqual from './_baseIsEqual.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n    COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\nfunction baseIsMatch(object, source, matchData, customizer) {\n  var index = matchData.length,\n      length = index,\n      noCustomizer = !customizer;\n\n  if (object == null) {\n    return !length;\n  }\n  object = Object(object);\n  while (index--) {\n    var data = matchData[index];\n    if ((noCustomizer && data[2])\n          ? data[1] !== object[data[0]]\n          : !(data[0] in object)\n        ) {\n      return false;\n    }\n  }\n  while (++index < length) {\n    data = matchData[index];\n    var key = data[0],\n        objValue = object[key],\n        srcValue = data[1];\n\n    if (noCustomizer && data[2]) {\n      if (objValue === undefined && !(key in object)) {\n        return false;\n      }\n    } else {\n      var stack = new Stack;\n      if (customizer) {\n        var result = customizer(objValue, srcValue, key, object, source, stack);\n      }\n      if (!(result === undefined\n            ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n            : result\n          )) {\n        return false;\n      }\n    }\n  }\n  return true;\n}\n\nexport default baseIsMatch;\n","import isObject from './isObject.js';\n\n/**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n *  equality comparisons, else `false`.\n */\nfunction isStrictComparable(value) {\n  return value === value && !isObject(value);\n}\n\nexport default isStrictComparable;\n","import isStrictComparable from './_isStrictComparable.js';\nimport keys from './keys.js';\n\n/**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\nfunction getMatchData(object) {\n  var result = keys(object),\n      length = result.length;\n\n  while (length--) {\n    var key = result[length],\n        value = object[key];\n\n    result[length] = [key, value, isStrictComparable(value)];\n  }\n  return result;\n}\n\nexport default getMatchData;\n","/**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction matchesStrictComparable(key, srcValue) {\n  return function(object) {\n    if (object == null) {\n      return false;\n    }\n    return object[key] === srcValue &&\n      (srcValue !== undefined || (key in Object(object)));\n  };\n}\n\nexport default matchesStrictComparable;\n","import baseIsMatch from './_baseIsMatch.js';\nimport getMatchData from './_getMatchData.js';\nimport matchesStrictComparable from './_matchesStrictComparable.js';\n\n/**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatches(source) {\n  var matchData = getMatchData(source);\n  if (matchData.length == 1 && matchData[0][2]) {\n    return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n  }\n  return function(object) {\n    return object === source || baseIsMatch(object, source, matchData);\n  };\n}\n\nexport default baseMatches;\n","/**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHasIn(object, key) {\n  return object != null && key in Object(object);\n}\n\nexport default baseHasIn;\n","import castPath from './_castPath.js';\nimport isArguments from './isArguments.js';\nimport isArray from './isArray.js';\nimport isIndex from './_isIndex.js';\nimport isLength from './isLength.js';\nimport toKey from './_toKey.js';\n\n/**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\nfunction hasPath(object, path, hasFunc) {\n  path = castPath(path, object);\n\n  var index = -1,\n      length = path.length,\n      result = false;\n\n  while (++index < length) {\n    var key = toKey(path[index]);\n    if (!(result = object != null && hasFunc(object, key))) {\n      break;\n    }\n    object = object[key];\n  }\n  if (result || ++index != length) {\n    return result;\n  }\n  length = object == null ? 0 : object.length;\n  return !!length && isLength(length) && isIndex(key, length) &&\n    (isArray(object) || isArguments(object));\n}\n\nexport default hasPath;\n","import baseHasIn from './_baseHasIn.js';\nimport hasPath from './_hasPath.js';\n\n/**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\nfunction hasIn(object, path) {\n  return object != null && hasPath(object, path, baseHasIn);\n}\n\nexport default hasIn;\n","import baseIsEqual from './_baseIsEqual.js';\nimport get from './get.js';\nimport hasIn from './hasIn.js';\nimport isKey from './_isKey.js';\nimport isStrictComparable from './_isStrictComparable.js';\nimport matchesStrictComparable from './_matchesStrictComparable.js';\nimport toKey from './_toKey.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n    COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatchesProperty(path, srcValue) {\n  if (isKey(path) && isStrictComparable(srcValue)) {\n    return matchesStrictComparable(toKey(path), srcValue);\n  }\n  return function(object) {\n    var objValue = get(object, path);\n    return (objValue === undefined && objValue === srcValue)\n      ? hasIn(object, path)\n      : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n  };\n}\n\nexport default baseMatchesProperty;\n","/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction baseProperty(key) {\n  return function(object) {\n    return object == null ? undefined : object[key];\n  };\n}\n\nexport default baseProperty;\n","import baseGet from './_baseGet.js';\n\n/**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyDeep(path) {\n  return function(object) {\n    return baseGet(object, path);\n  };\n}\n\nexport default basePropertyDeep;\n","import baseProperty from './_baseProperty.js';\nimport basePropertyDeep from './_basePropertyDeep.js';\nimport isKey from './_isKey.js';\nimport toKey from './_toKey.js';\n\n/**\n * Creates a function that returns the value at `path` of a given object.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var objects = [\n *   { 'a': { 'b': 2 } },\n *   { 'a': { 'b': 1 } }\n * ];\n *\n * _.map(objects, _.property('a.b'));\n * // => [2, 1]\n *\n * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n * // => [1, 2]\n */\nfunction property(path) {\n  return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n}\n\nexport default property;\n","import baseMatches from './_baseMatches.js';\nimport baseMatchesProperty from './_baseMatchesProperty.js';\nimport identity from './identity.js';\nimport isArray from './isArray.js';\nimport property from './property.js';\n\n/**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\nfunction baseIteratee(value) {\n  // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n  // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n  if (typeof value == 'function') {\n    return value;\n  }\n  if (value == null) {\n    return identity;\n  }\n  if (typeof value == 'object') {\n    return isArray(value)\n      ? baseMatchesProperty(value[0], value[1])\n      : baseMatches(value);\n  }\n  return property(value);\n}\n\nexport default baseIteratee;\n","/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n  return function(object, iteratee, keysFunc) {\n    var index = -1,\n        iterable = Object(object),\n        props = keysFunc(object),\n        length = props.length;\n\n    while (length--) {\n      var key = props[fromRight ? length : ++index];\n      if (iteratee(iterable[key], key, iterable) === false) {\n        break;\n      }\n    }\n    return object;\n  };\n}\n\nexport default createBaseFor;\n","import createBaseFor from './_createBaseFor.js';\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\nexport default baseFor;\n","import baseFor from './_baseFor.js';\nimport keys from './keys.js';\n\n/**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForOwn(object, iteratee) {\n  return object && baseFor(object, iteratee, keys);\n}\n\nexport default baseForOwn;\n","import isArrayLike from './isArrayLike.js';\n\n/**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseEach(eachFunc, fromRight) {\n  return function(collection, iteratee) {\n    if (collection == null) {\n      return collection;\n    }\n    if (!isArrayLike(collection)) {\n      return eachFunc(collection, iteratee);\n    }\n    var length = collection.length,\n        index = fromRight ? length : -1,\n        iterable = Object(collection);\n\n    while ((fromRight ? index-- : ++index < length)) {\n      if (iteratee(iterable[index], index, iterable) === false) {\n        break;\n      }\n    }\n    return collection;\n  };\n}\n\nexport default createBaseEach;\n","import baseForOwn from './_baseForOwn.js';\nimport createBaseEach from './_createBaseEach.js';\n\n/**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\nvar baseEach = createBaseEach(baseForOwn);\n\nexport default baseEach;\n","import root from './_root.js';\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\nexport default now;\n","import isObject from './isObject.js';\nimport now from './now.js';\nimport toNumber from './toNumber.js';\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\nexport default debounce;\n","import baseAssignValue from './_baseAssignValue.js';\nimport eq from './eq.js';\n\n/**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignMergeValue(object, key, value) {\n  if ((value !== undefined && !eq(object[key], value)) ||\n      (value === undefined && !(key in object))) {\n    baseAssignValue(object, key, value);\n  }\n}\n\nexport default assignMergeValue;\n","import isArrayLike from './isArrayLike.js';\nimport isObjectLike from './isObjectLike.js';\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an 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 an array-like object,\n *  else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n  return isObjectLike(value) && isArrayLike(value);\n}\n\nexport default isArrayLikeObject;\n","/**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction safeGet(object, key) {\n  if (key === 'constructor' && typeof object[key] === 'function') {\n    return;\n  }\n\n  if (key == '__proto__') {\n    return;\n  }\n\n  return object[key];\n}\n\nexport default safeGet;\n","import copyObject from './_copyObject.js';\nimport keysIn from './keysIn.js';\n\n/**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n *   this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\nfunction toPlainObject(value) {\n  return copyObject(value, keysIn(value));\n}\n\nexport default toPlainObject;\n","import assignMergeValue from './_assignMergeValue.js';\nimport cloneBuffer from './_cloneBuffer.js';\nimport cloneTypedArray from './_cloneTypedArray.js';\nimport copyArray from './_copyArray.js';\nimport initCloneObject from './_initCloneObject.js';\nimport isArguments from './isArguments.js';\nimport isArray from './isArray.js';\nimport isArrayLikeObject from './isArrayLikeObject.js';\nimport isBuffer from './isBuffer.js';\nimport isFunction from './isFunction.js';\nimport isObject from './isObject.js';\nimport isPlainObject from './isPlainObject.js';\nimport isTypedArray from './isTypedArray.js';\nimport safeGet from './_safeGet.js';\nimport toPlainObject from './toPlainObject.js';\n\n/**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n *  counterparts.\n */\nfunction baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n  var objValue = safeGet(object, key),\n      srcValue = safeGet(source, key),\n      stacked = stack.get(srcValue);\n\n  if (stacked) {\n    assignMergeValue(object, key, stacked);\n    return;\n  }\n  var newValue = customizer\n    ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n    : undefined;\n\n  var isCommon = newValue === undefined;\n\n  if (isCommon) {\n    var isArr = isArray(srcValue),\n        isBuff = !isArr && isBuffer(srcValue),\n        isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n    newValue = srcValue;\n    if (isArr || isBuff || isTyped) {\n      if (isArray(objValue)) {\n        newValue = objValue;\n      }\n      else if (isArrayLikeObject(objValue)) {\n        newValue = copyArray(objValue);\n      }\n      else if (isBuff) {\n        isCommon = false;\n        newValue = cloneBuffer(srcValue, true);\n      }\n      else if (isTyped) {\n        isCommon = false;\n        newValue = cloneTypedArray(srcValue, true);\n      }\n      else {\n        newValue = [];\n      }\n    }\n    else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n      newValue = objValue;\n      if (isArguments(objValue)) {\n        newValue = toPlainObject(objValue);\n      }\n      else if (!isObject(objValue) || isFunction(objValue)) {\n        newValue = initCloneObject(srcValue);\n      }\n    }\n    else {\n      isCommon = false;\n    }\n  }\n  if (isCommon) {\n    // Recursively merge objects and arrays (susceptible to call stack limits).\n    stack.set(srcValue, newValue);\n    mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n    stack['delete'](srcValue);\n  }\n  assignMergeValue(object, key, newValue);\n}\n\nexport default baseMergeDeep;\n","import Stack from './_Stack.js';\nimport assignMergeValue from './_assignMergeValue.js';\nimport baseFor from './_baseFor.js';\nimport baseMergeDeep from './_baseMergeDeep.js';\nimport isObject from './isObject.js';\nimport keysIn from './keysIn.js';\nimport safeGet from './_safeGet.js';\n\n/**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n *  counterparts.\n */\nfunction baseMerge(object, source, srcIndex, customizer, stack) {\n  if (object === source) {\n    return;\n  }\n  baseFor(source, function(srcValue, key) {\n    stack || (stack = new Stack);\n    if (isObject(srcValue)) {\n      baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n    }\n    else {\n      var newValue = customizer\n        ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n        : undefined;\n\n      if (newValue === undefined) {\n        newValue = srcValue;\n      }\n      assignMergeValue(object, key, newValue);\n    }\n  }, keysIn);\n}\n\nexport default baseMerge;\n","import baseEach from './_baseEach.js';\nimport isArrayLike from './isArrayLike.js';\n\n/**\n * The base implementation of `_.map` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction baseMap(collection, iteratee) {\n  var index = -1,\n      result = isArrayLike(collection) ? Array(collection.length) : [];\n\n  baseEach(collection, function(value, key, collection) {\n    result[++index] = iteratee(value, key, collection);\n  });\n  return result;\n}\n\nexport default baseMap;\n","import arrayMap from './_arrayMap.js';\nimport baseIteratee from './_baseIteratee.js';\nimport baseMap from './_baseMap.js';\nimport isArray from './isArray.js';\n\n/**\n * Creates an array of values by running each element in `collection` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\n *\n * The guarded methods are:\n * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\n * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\n * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\n * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n * @example\n *\n * function square(n) {\n *   return n * n;\n * }\n *\n * _.map([4, 8], square);\n * // => [16, 64]\n *\n * _.map({ 'a': 4, 'b': 8 }, square);\n * // => [16, 64] (iteration order is not guaranteed)\n *\n * var users = [\n *   { 'user': 'barney' },\n *   { 'user': 'fred' }\n * ];\n *\n * // The `_.property` iteratee shorthand.\n * _.map(users, 'user');\n * // => ['barney', 'fred']\n */\nfunction map(collection, iteratee) {\n  var func = isArray(collection) ? arrayMap : baseMap;\n  return func(collection, baseIteratee(iteratee, 3));\n}\n\nexport default map;\n","import createCompounder from './_createCompounder.js';\n\n/**\n * Converts `string` to\n * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the kebab cased string.\n * @example\n *\n * _.kebabCase('Foo Bar');\n * // => 'foo-bar'\n *\n * _.kebabCase('fooBar');\n * // => 'foo-bar'\n *\n * _.kebabCase('__FOO_BAR__');\n * // => 'foo-bar'\n */\nvar kebabCase = createCompounder(function(result, word, index) {\n  return result + (index ? '-' : '') + word.toLowerCase();\n});\n\nexport default kebabCase;\n","import baseMerge from './_baseMerge.js';\nimport createAssigner from './_createAssigner.js';\n\n/**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n *   'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n *   'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */\nvar merge = createAssigner(function(object, source, srcIndex) {\n  baseMerge(object, source, srcIndex);\n});\n\nexport default merge;\n","import debounce from './debounce.js';\nimport isObject from './isObject.js';\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\nexport default throttle;\n","import { computed, inject } from 'vue';\nimport { configProviderInjectionKey } from \"../config-provider/src/context.mjs\";\nimport { dateEnUS, enUS } from \"../locales/index.mjs\";\nexport default function useLocale(ns) {\n  const {\n    mergedLocaleRef,\n    mergedDateLocaleRef\n  } = inject(configProviderInjectionKey, null) || {};\n  const localeRef = computed(() => {\n    var _a, _b;\n    return (_b = (_a = mergedLocaleRef === null || mergedLocaleRef === void 0 ? void 0 : mergedLocaleRef.value) === null || _a === void 0 ? void 0 : _a[ns]) !== null && _b !== void 0 ? _b : enUS[ns];\n  });\n  const dateLocaleRef = computed(() => {\n    var _a;\n    return (_a = mergedDateLocaleRef === null || mergedDateLocaleRef === void 0 ? void 0 : mergedDateLocaleRef.value) !== null && _a !== void 0 ? _a : dateEnUS;\n  });\n  return {\n    dateLocaleRef,\n    localeRef\n  };\n}","export const cssrAnchorMetaName = 'naive-ui-style';","import { useSsrAdapter } from '@css-render/vue3-ssr';\nimport { exists } from 'css-render';\nimport { computed, inject, onBeforeMount, watchEffect } from 'vue';\nimport { configProviderInjectionKey } from \"../config-provider/src/context.mjs\";\nimport { cssrAnchorMetaName } from \"./common.mjs\";\nexport function useRtl(mountId, rtlStateRef, clsPrefixRef) {\n  if (!rtlStateRef) return undefined;\n  const ssrAdapter = useSsrAdapter();\n  const componentRtlStateRef = computed(() => {\n    const {\n      value: rtlState\n    } = rtlStateRef;\n    if (!rtlState) {\n      return undefined;\n    }\n    const componentRtlState = rtlState[mountId];\n    if (!componentRtlState) {\n      return undefined;\n    }\n    return componentRtlState;\n  });\n  const NConfigProvider = inject(configProviderInjectionKey, null);\n  const mountStyle = () => {\n    watchEffect(() => {\n      const {\n        value: clsPrefix\n      } = clsPrefixRef;\n      const id = `${clsPrefix}${mountId}Rtl`;\n      // if it already exists, we only need to watch clsPrefix, although in most\n      // of time it's unnecessary... However we can at least listen less\n      // handlers, which is great.\n      if (exists(id, ssrAdapter)) return;\n      const {\n        value: componentRtlState\n      } = componentRtlStateRef;\n      if (!componentRtlState) return;\n      componentRtlState.style.mount({\n        id,\n        head: true,\n        anchorMetaName: cssrAnchorMetaName,\n        props: {\n          bPrefix: clsPrefix ? `.${clsPrefix}-` : undefined\n        },\n        ssr: ssrAdapter,\n        parent: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.styleMountTarget\n      });\n    });\n  };\n  if (ssrAdapter) {\n    mountStyle();\n  } else {\n    onBeforeMount(mountStyle);\n  }\n  return componentRtlStateRef;\n}","export default {\n  fontFamily: 'v-sans, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"',\n  fontFamilyMono: 'v-mono, SFMono-Regular, Menlo, Consolas, Courier, monospace',\n  fontWeight: '400',\n  fontWeightStrong: '500',\n  cubicBezierEaseInOut: 'cubic-bezier(.4, 0, .2, 1)',\n  cubicBezierEaseOut: 'cubic-bezier(0, 0, .2, 1)',\n  cubicBezierEaseIn: 'cubic-bezier(.4, 0, 1, 1)',\n  borderRadius: '3px',\n  borderRadiusSmall: '2px',\n  fontSize: '14px',\n  fontSizeMini: '12px',\n  fontSizeTiny: '12px',\n  fontSizeSmall: '14px',\n  fontSizeMedium: '14px',\n  fontSizeLarge: '15px',\n  fontSizeHuge: '16px',\n  lineHeight: '1.6',\n  heightMini: '16px',\n  // private now, it's too small\n  heightTiny: '22px',\n  heightSmall: '28px',\n  heightMedium: '34px',\n  heightLarge: '40px',\n  heightHuge: '46px'\n};","import { c } from \"../../_utils/cssr/index.mjs\";\nimport commonVariables from \"../common/_common.mjs\";\nconst {\n  fontSize,\n  fontFamily,\n  lineHeight\n} = commonVariables;\n// All the components need the style\n// It is static and won't be changed in the app's lifetime\n// If user want to overrides it they need to use `n-global-style` is provided\n//\n// Technically we can remove font-size & font-family & line-height to make\n// it pure. However the coding cost doesn't worth it.\n//\n// -webkit-tap-hilight-color:\n// https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-tap-highlight-color\n// In some android devices, there will be the style.\nexport default c('body', `\n margin: 0;\n font-size: ${fontSize};\n font-family: ${fontFamily};\n line-height: ${lineHeight};\n -webkit-text-size-adjust: 100%;\n -webkit-tap-highlight-color: transparent;\n`, [c('input', `\n font-family: inherit;\n font-size: inherit;\n `)]);","import { useSsrAdapter } from '@css-render/vue3-ssr';\nimport { inject, onBeforeMount } from 'vue';\nimport globalStyle from \"../_styles/global/index.cssr.mjs\";\nimport { throwError } from \"../_utils/index.mjs\";\nimport { configProviderInjectionKey } from \"../config-provider/src/context.mjs\";\nimport { cssrAnchorMetaName } from \"./common.mjs\";\nexport default function useStyle(mountId, style, clsPrefixRef) {\n  if (!style) {\n    if (process.env.NODE_ENV !== 'production') throwError('use-style', 'No style is specified.');\n    return;\n  }\n  const ssrAdapter = useSsrAdapter();\n  const NConfigProvider = inject(configProviderInjectionKey, null);\n  const mountStyle = () => {\n    const clsPrefix = clsPrefixRef.value;\n    style.mount({\n      id: clsPrefix === undefined ? mountId : clsPrefix + mountId,\n      head: true,\n      anchorMetaName: cssrAnchorMetaName,\n      props: {\n        bPrefix: clsPrefix ? `.${clsPrefix}-` : undefined\n      },\n      ssr: ssrAdapter,\n      parent: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.styleMountTarget\n    });\n    if (!(NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.preflightStyleDisabled)) {\n      globalStyle.mount({\n        id: 'n-global',\n        head: true,\n        anchorMetaName: cssrAnchorMetaName,\n        ssr: ssrAdapter,\n        parent: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.styleMountTarget\n      });\n    }\n  };\n  if (ssrAdapter) {\n    mountStyle();\n  } else {\n    onBeforeMount(mountStyle);\n  }\n}","import { useSsrAdapter } from '@css-render/vue3-ssr';\nimport { merge } from 'lodash-es';\nimport { computed, inject, onBeforeMount } from 'vue';\nimport globalStyle from \"../_styles/global/index.cssr.mjs\";\nimport { configProviderInjectionKey } from \"../config-provider/src/context.mjs\";\nimport { cssrAnchorMetaName } from \"./common.mjs\";\nexport function createTheme(theme) {\n  return theme;\n}\nfunction useTheme(resolveId, mountId, style, defaultTheme, props, clsPrefixRef) {\n  const ssrAdapter = useSsrAdapter();\n  const NConfigProvider = inject(configProviderInjectionKey, null);\n  if (style) {\n    const mountStyle = () => {\n      const clsPrefix = clsPrefixRef === null || clsPrefixRef === void 0 ? void 0 : clsPrefixRef.value;\n      style.mount({\n        id: clsPrefix === undefined ? mountId : clsPrefix + mountId,\n        head: true,\n        props: {\n          bPrefix: clsPrefix ? `.${clsPrefix}-` : undefined\n        },\n        anchorMetaName: cssrAnchorMetaName,\n        ssr: ssrAdapter,\n        parent: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.styleMountTarget\n      });\n      if (!(NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.preflightStyleDisabled)) {\n        globalStyle.mount({\n          id: 'n-global',\n          head: true,\n          anchorMetaName: cssrAnchorMetaName,\n          ssr: ssrAdapter,\n          parent: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.styleMountTarget\n        });\n      }\n    };\n    if (ssrAdapter) {\n      mountStyle();\n    } else {\n      onBeforeMount(mountStyle);\n    }\n  }\n  const mergedThemeRef = computed(() => {\n    var _a;\n    // keep props to make theme overrideable\n    const {\n      theme: {\n        common: selfCommon,\n        self,\n        peers = {}\n      } = {},\n      themeOverrides: selfOverrides = {},\n      builtinThemeOverrides: builtinOverrides = {}\n    } = props;\n    const {\n      common: selfCommonOverrides,\n      peers: peersOverrides\n    } = selfOverrides;\n    const {\n      common: globalCommon = undefined,\n      [resolveId]: {\n        common: globalSelfCommon = undefined,\n        self: globalSelf = undefined,\n        peers: globalPeers = {}\n      } = {}\n    } = (NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedThemeRef.value) || {};\n    const {\n      common: globalCommonOverrides = undefined,\n      [resolveId]: globalSelfOverrides = {}\n    } = (NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedThemeOverridesRef.value) || {};\n    const {\n      common: globalSelfCommonOverrides,\n      peers: globalPeersOverrides = {}\n    } = globalSelfOverrides;\n    const mergedCommon = merge({}, selfCommon || globalSelfCommon || globalCommon || defaultTheme.common, globalCommonOverrides, globalSelfCommonOverrides, selfCommonOverrides);\n    const mergedSelf = merge(\n    // {}, executed every time, no need for empty obj\n    (_a = self || globalSelf || defaultTheme.self) === null || _a === void 0 ? void 0 : _a(mergedCommon), builtinOverrides, globalSelfOverrides, selfOverrides);\n    return {\n      common: mergedCommon,\n      self: mergedSelf,\n      peers: merge({}, defaultTheme.peers, globalPeers, peers),\n      peerOverrides: merge({}, builtinOverrides.peers, globalPeersOverrides, peersOverrides)\n    };\n  });\n  return mergedThemeRef;\n}\nuseTheme.props = {\n  theme: Object,\n  themeOverrides: Object,\n  builtinThemeOverrides: Object\n};\n/**\n * props.theme (Theme):\n * {\n *   common: CommonThemeVars,\n *   self(): ThemeVars,\n *   peers: { Component: Theme }\n * }\n * provider.theme:\n * {\n *   common: CommonThemeVars,\n *   Button: Theme\n *   ...\n * }\n * defaultTheme:\n * {\n *   common: CommonThemeVars,\n *   self(): ThemeVars,\n *   peers: { Component: Theme }\n * }\n *\n * props.themeOverrides (ThemeOverrides):\n * {\n *   common: CommonThemeVars,\n *   peers: { Component: ThemeOverrides },\n *   ...ThemeVars\n * }\n * provider.themeOverrides:\n * {\n *   common: CommonThemeVars,\n *   Component: ThemeOverrides\n *   ...\n * }\n *\n * mergedTheme:\n * {\n *   common: CommonThemeVars,\n *   self: ThemeVars,\n *   peers: { Component: Theme },\n *   overrides: { Component: ThemeOverrides }\n * }\n */\nexport default useTheme;","import { c, cB } from \"../../../../_utils/cssr/index.mjs\";\nexport default cB('base-icon', `\n height: 1em;\n width: 1em;\n line-height: 1em;\n text-align: center;\n display: inline-block;\n position: relative;\n fill: currentColor;\n`, [c('svg', `\n height: 1em;\n width: 1em;\n `)]);","import { defineComponent, h, toRef } from 'vue';\nimport { useStyle } from \"../../../_mixins/index.mjs\";\nimport style from \"./styles/index.cssr.mjs\";\nexport default defineComponent({\n  name: 'BaseIcon',\n  props: {\n    role: String,\n    ariaLabel: String,\n    ariaDisabled: {\n      type: Boolean,\n      default: undefined\n    },\n    ariaHidden: {\n      type: Boolean,\n      default: undefined\n    },\n    clsPrefix: {\n      type: String,\n      required: true\n    },\n    onClick: Function,\n    onMousedown: Function,\n    onMouseup: Function\n  },\n  setup(props) {\n    useStyle('-base-icon', style, toRef(props, 'clsPrefix'));\n  },\n  render() {\n    return h(\"i\", {\n      class: `${this.clsPrefix}-base-icon`,\n      onClick: this.onClick,\n      onMousedown: this.onMousedown,\n      onMouseup: this.onMouseup,\n      role: this.role,\n      \"aria-label\": this.ariaLabel,\n      \"aria-hidden\": this.ariaHidden,\n      \"aria-disabled\": this.ariaDisabled\n    }, this.$slots);\n  }\n});","import { useIsMounted } from 'vooks';\nimport { defineComponent, h, Transition } from 'vue';\nexport default defineComponent({\n  name: 'BaseIconSwitchTransition',\n  setup(_, {\n    slots\n  }) {\n    const isMountedRef = useIsMounted();\n    return () => h(Transition, {\n      name: \"icon-switch-transition\",\n      appear: isMountedRef.value\n    }, slots);\n  }\n});","import { defineComponent, h } from 'vue';\nexport default defineComponent({\n  name: 'Add',\n  render() {\n    return h(\"svg\", {\n      width: \"512\",\n      height: \"512\",\n      viewBox: \"0 0 512 512\",\n      fill: \"none\",\n      xmlns: \"http://www.w3.org/2000/svg\"\n    }, h(\"path\", {\n      d: \"M256 112V400M400 256H112\",\n      stroke: \"currentColor\",\n      \"stroke-width\": \"32\",\n      \"stroke-linecap\": \"round\",\n      \"stroke-linejoin\": \"round\"\n    }));\n  }\n});","import { upperFirst } from 'lodash-es';\nimport { defineComponent, h, inject } from 'vue';\nimport { configProviderInjectionKey } from \"../../config-provider/src/context.mjs\";\nexport function replaceable(name, icon) {\n  const IconComponent = defineComponent({\n    render() {\n      return icon();\n    }\n  });\n  return defineComponent({\n    name: upperFirst(name),\n    setup() {\n      var _a;\n      const mergedIconsRef = (_a = inject(configProviderInjectionKey, null)) === null || _a === void 0 ? void 0 : _a.mergedIconsRef;\n      return () => {\n        var _a;\n        const iconOverride = (_a = mergedIconsRef === null || mergedIconsRef === void 0 ? void 0 : mergedIconsRef.value) === null || _a === void 0 ? void 0 : _a[name];\n        return iconOverride ? iconOverride() : h(IconComponent, null);\n      };\n    }\n  });\n}","import { defineComponent, h } from 'vue';\nexport default defineComponent({\n  name: 'Backward',\n  render() {\n    return h(\"svg\", {\n      viewBox: \"0 0 20 20\",\n      fill: \"none\",\n      xmlns: \"http://www.w3.org/2000/svg\"\n    }, h(\"path\", {\n      d: \"M12.2674 15.793C11.9675 16.0787 11.4927 16.0672 11.2071 15.7673L6.20572 10.5168C5.9298 10.2271 5.9298 9.7719 6.20572 9.48223L11.2071 4.23177C11.4927 3.93184 11.9675 3.92031 12.2674 4.206C12.5673 4.49169 12.5789 4.96642 12.2932 5.26634L7.78458 9.99952L12.2932 14.7327C12.5789 15.0326 12.5673 15.5074 12.2674 15.793Z\",\n      fill: \"currentColor\"\n    }));\n  }\n});","import { defineComponent, h } from 'vue';\nexport default defineComponent({\n  name: 'Checkmark',\n  render() {\n    return h(\"svg\", {\n      xmlns: \"http://www.w3.org/2000/svg\",\n      viewBox: \"0 0 16 16\"\n    }, h(\"g\", {\n      fill: \"none\"\n    }, h(\"path\", {\n      d: \"M14.046 3.486a.75.75 0 0 1-.032 1.06l-7.93 7.474a.85.85 0 0 1-1.188-.022l-2.68-2.72a.75.75 0 1 1 1.068-1.053l2.234 2.267l7.468-7.038a.75.75 0 0 1 1.06.032z\",\n      fill: \"currentColor\"\n    })));\n  }\n});","import { defineComponent, h } from 'vue';\nexport default defineComponent({\n  name: 'ChevronDown',\n  render() {\n    return h(\"svg\", {\n      viewBox: \"0 0 16 16\",\n      fill: \"none\",\n      xmlns: \"http://www.w3.org/2000/svg\"\n    }, h(\"path\", {\n      d: \"M3.14645 5.64645C3.34171 5.45118 3.65829 5.45118 3.85355 5.64645L8 9.79289L12.1464 5.64645C12.3417 5.45118 12.6583 5.45118 12.8536 5.64645C13.0488 5.84171 13.0488 6.15829 12.8536 6.35355L8.35355 10.8536C8.15829 11.0488 7.84171 11.0488 7.64645 10.8536L3.14645 6.35355C2.95118 6.15829 2.95118 5.84171 3.14645 5.64645Z\",\n      fill: \"currentColor\"\n    }));\n  }\n});","import { defineComponent, h } from 'vue';\nexport default defineComponent({\n  name: 'ChevronDownFilled',\n  render() {\n    return h(\"svg\", {\n      viewBox: \"0 0 16 16\",\n      fill: \"none\",\n      xmlns: \"http://www.w3.org/2000/svg\"\n    }, h(\"path\", {\n      d: \"M3.20041 5.73966C3.48226 5.43613 3.95681 5.41856 4.26034 5.70041L8 9.22652L11.7397 5.70041C12.0432 5.41856 12.5177 5.43613 12.7996 5.73966C13.0815 6.0432 13.0639 6.51775 12.7603 6.7996L8.51034 10.7996C8.22258 11.0668 7.77743 11.0668 7.48967 10.7996L3.23966 6.7996C2.93613 6.51775 2.91856 6.0432 3.20041 5.73966Z\",\n      fill: \"currentColor\"\n    }));\n  }\n});","import { defineComponent, h } from 'vue';\nexport default defineComponent({\n  name: 'ChevronRight',\n  render() {\n    return h(\"svg\", {\n      viewBox: \"0 0 16 16\",\n      fill: \"none\",\n      xmlns: \"http://www.w3.org/2000/svg\"\n    }, h(\"path\", {\n      d: \"M5.64645 3.14645C5.45118 3.34171 5.45118 3.65829 5.64645 3.85355L9.79289 8L5.64645 12.1464C5.45118 12.3417 5.45118 12.6583 5.64645 12.8536C5.84171 13.0488 6.15829 13.0488 6.35355 12.8536L10.8536 8.35355C11.0488 8.15829 11.0488 7.84171 10.8536 7.64645L6.35355 3.14645C6.15829 2.95118 5.84171 2.95118 5.64645 3.14645Z\",\n      fill: \"currentColor\"\n    }));\n  }\n});","import { h } from 'vue';\nimport { replaceable } from \"./replaceable.mjs\";\nexport default replaceable('clear', () => h(\"svg\", {\n  viewBox: \"0 0 16 16\",\n  version: \"1.1\",\n  xmlns: \"http://www.w3.org/2000/svg\"\n}, h(\"g\", {\n  stroke: \"none\",\n  \"stroke-width\": \"1\",\n  fill: \"none\",\n  \"fill-rule\": \"evenodd\"\n}, h(\"g\", {\n  fill: \"currentColor\",\n  \"fill-rule\": \"nonzero\"\n}, h(\"path\", {\n  d: \"M8,2 C11.3137085,2 14,4.6862915 14,8 C14,11.3137085 11.3137085,14 8,14 C4.6862915,14 2,11.3137085 2,8 C2,4.6862915 4.6862915,2 8,2 Z M6.5343055,5.83859116 C6.33943736,5.70359511 6.07001296,5.72288026 5.89644661,5.89644661 L5.89644661,5.89644661 L5.83859116,5.9656945 C5.70359511,6.16056264 5.72288026,6.42998704 5.89644661,6.60355339 L5.89644661,6.60355339 L7.293,8 L5.89644661,9.39644661 L5.83859116,9.4656945 C5.70359511,9.66056264 5.72288026,9.92998704 5.89644661,10.1035534 L5.89644661,10.1035534 L5.9656945,10.1614088 C6.16056264,10.2964049 6.42998704,10.2771197 6.60355339,10.1035534 L6.60355339,10.1035534 L8,8.707 L9.39644661,10.1035534 L9.4656945,10.1614088 C9.66056264,10.2964049 9.92998704,10.2771197 10.1035534,10.1035534 L10.1035534,10.1035534 L10.1614088,10.0343055 C10.2964049,9.83943736 10.2771197,9.57001296 10.1035534,9.39644661 L10.1035534,9.39644661 L8.707,8 L10.1035534,6.60355339 L10.1614088,6.5343055 C10.2964049,6.33943736 10.2771197,6.07001296 10.1035534,5.89644661 L10.1035534,5.89644661 L10.0343055,5.83859116 C9.83943736,5.70359511 9.57001296,5.72288026 9.39644661,5.89644661 L9.39644661,5.89644661 L8,7.293 L6.60355339,5.89644661 Z\"\n})))));","import { h } from 'vue';\nimport { replaceable } from \"./replaceable.mjs\";\nexport default replaceable('close', () => h(\"svg\", {\n  viewBox: \"0 0 12 12\",\n  version: \"1.1\",\n  xmlns: \"http://www.w3.org/2000/svg\",\n  \"aria-hidden\": true\n}, h(\"g\", {\n  stroke: \"none\",\n  \"stroke-width\": \"1\",\n  fill: \"none\",\n  \"fill-rule\": \"evenodd\"\n}, h(\"g\", {\n  fill: \"currentColor\",\n  \"fill-rule\": \"nonzero\"\n}, h(\"path\", {\n  d: \"M2.08859116,2.2156945 L2.14644661,2.14644661 C2.32001296,1.97288026 2.58943736,1.95359511 2.7843055,2.08859116 L2.85355339,2.14644661 L6,5.293 L9.14644661,2.14644661 C9.34170876,1.95118446 9.65829124,1.95118446 9.85355339,2.14644661 C10.0488155,2.34170876 10.0488155,2.65829124 9.85355339,2.85355339 L6.707,6 L9.85355339,9.14644661 C10.0271197,9.32001296 10.0464049,9.58943736 9.91140884,9.7843055 L9.85355339,9.85355339 C9.67998704,10.0271197 9.41056264,10.0464049 9.2156945,9.91140884 L9.14644661,9.85355339 L6,6.707 L2.85355339,9.85355339 C2.65829124,10.0488155 2.34170876,10.0488155 2.14644661,9.85355339 C1.95118446,9.65829124 1.95118446,9.34170876 2.14644661,9.14644661 L5.293,6 L2.14644661,2.85355339 C1.97288026,2.67998704 1.95359511,2.41056264 2.08859116,2.2156945 L2.14644661,2.14644661 L2.08859116,2.2156945 Z\"\n})))));","import { h } from 'vue';\nimport { replaceable } from \"./replaceable.mjs\";\nexport default replaceable('download', () => h(\"svg\", {\n  viewBox: \"0 0 16 16\",\n  version: \"1.1\",\n  xmlns: \"http://www.w3.org/2000/svg\"\n}, h(\"g\", {\n  stroke: \"none\",\n  \"stroke-width\": \"1\",\n  fill: \"none\",\n  \"fill-rule\": \"evenodd\"\n}, h(\"g\", {\n  fill: \"currentColor\",\n  \"fill-rule\": \"nonzero\"\n}, h(\"path\", {\n  d: \"M3.5,13 L12.5,13 C12.7761424,13 13,13.2238576 13,13.5 C13,13.7454599 12.8231248,13.9496084 12.5898756,13.9919443 L12.5,14 L3.5,14 C3.22385763,14 3,13.7761424 3,13.5 C3,13.2545401 3.17687516,13.0503916 3.41012437,13.0080557 L3.5,13 L12.5,13 L3.5,13 Z M7.91012437,1.00805567 L8,1 C8.24545989,1 8.44960837,1.17687516 8.49194433,1.41012437 L8.5,1.5 L8.5,10.292 L11.1819805,7.6109127 C11.3555469,7.43734635 11.6249713,7.4180612 11.8198394,7.55305725 L11.8890873,7.6109127 C12.0626536,7.78447906 12.0819388,8.05390346 11.9469427,8.2487716 L11.8890873,8.31801948 L8.35355339,11.8535534 C8.17998704,12.0271197 7.91056264,12.0464049 7.7156945,11.9114088 L7.64644661,11.8535534 L4.1109127,8.31801948 C3.91565056,8.12275734 3.91565056,7.80617485 4.1109127,7.6109127 C4.28447906,7.43734635 4.55390346,7.4180612 4.7487716,7.55305725 L4.81801948,7.6109127 L7.5,10.292 L7.5,1.5 C7.5,1.25454011 7.67687516,1.05039163 7.91012437,1.00805567 L8,1 L7.91012437,1.00805567 Z\"\n})))));","import { defineComponent, h } from 'vue';\nexport default defineComponent({\n  name: 'Empty',\n  render() {\n    return h(\"svg\", {\n      viewBox: \"0 0 28 28\",\n      fill: \"none\",\n      xmlns: \"http://www.w3.org/2000/svg\"\n    }, h(\"path\", {\n      d: \"M26 7.5C26 11.0899 23.0899 14 19.5 14C15.9101 14 13 11.0899 13 7.5C13 3.91015 15.9101 1 19.5 1C23.0899 1 26 3.91015 26 7.5ZM16.8536 4.14645C16.6583 3.95118 16.3417 3.95118 16.1464 4.14645C15.9512 4.34171 15.9512 4.65829 16.1464 4.85355L18.7929 7.5L16.1464 10.1464C15.9512 10.3417 15.9512 10.6583 16.1464 10.8536C16.3417 11.0488 16.6583 11.0488 16.8536 10.8536L19.5 8.20711L22.1464 10.8536C22.3417 11.0488 22.6583 11.0488 22.8536 10.8536C23.0488 10.6583 23.0488 10.3417 22.8536 10.1464L20.2071 7.5L22.8536 4.85355C23.0488 4.65829 23.0488 4.34171 22.8536 4.14645C22.6583 3.95118 22.3417 3.95118 22.1464 4.14645L19.5 6.79289L16.8536 4.14645Z\",\n      fill: \"currentColor\"\n    }), h(\"path\", {\n      d: \"M25 22.75V12.5991C24.5572 13.0765 24.053 13.4961 23.5 13.8454V16H17.5L17.3982 16.0068C17.0322 16.0565 16.75 16.3703 16.75 16.75C16.75 18.2688 15.5188 19.5 14 19.5C12.4812 19.5 11.25 18.2688 11.25 16.75L11.2432 16.6482C11.1935 16.2822 10.8797 16 10.5 16H4.5V7.25C4.5 6.2835 5.2835 5.5 6.25 5.5H12.2696C12.4146 4.97463 12.6153 4.47237 12.865 4H6.25C4.45507 4 3 5.45507 3 7.25V22.75C3 24.5449 4.45507 26 6.25 26H21.75C23.5449 26 25 24.5449 25 22.75ZM4.5 22.75V17.5H9.81597L9.85751 17.7041C10.2905 19.5919 11.9808 21 14 21L14.215 20.9947C16.2095 20.8953 17.842 19.4209 18.184 17.5H23.5V22.75C23.5 23.7165 22.7165 24.5 21.75 24.5H6.25C5.2835 24.5 4.5 23.7165 4.5 22.75Z\",\n      fill: \"currentColor\"\n    }));\n  }\n});","import { h } from 'vue';\nimport { replaceable } from \"./replaceable.mjs\";\nexport default replaceable('error', () => h(\"svg\", {\n  viewBox: \"0 0 48 48\",\n  version: \"1.1\",\n  xmlns: \"http://www.w3.org/2000/svg\"\n}, h(\"g\", {\n  stroke: \"none\",\n  \"stroke-width\": \"1\",\n  \"fill-rule\": \"evenodd\"\n}, h(\"g\", {\n  \"fill-rule\": \"nonzero\"\n}, h(\"path\", {\n  d: \"M24,4 C35.045695,4 44,12.954305 44,24 C44,35.045695 35.045695,44 24,44 C12.954305,44 4,35.045695 4,24 C4,12.954305 12.954305,4 24,4 Z M17.8838835,16.1161165 L17.7823881,16.0249942 C17.3266086,15.6583353 16.6733914,15.6583353 16.2176119,16.0249942 L16.1161165,16.1161165 L16.0249942,16.2176119 C15.6583353,16.6733914 15.6583353,17.3266086 16.0249942,17.7823881 L16.1161165,17.8838835 L22.233,24 L16.1161165,30.1161165 L16.0249942,30.2176119 C15.6583353,30.6733914 15.6583353,31.3266086 16.0249942,31.7823881 L16.1161165,31.8838835 L16.2176119,31.9750058 C16.6733914,32.3416647 17.3266086,32.3416647 17.7823881,31.9750058 L17.8838835,31.8838835 L24,25.767 L30.1161165,31.8838835 L30.2176119,31.9750058 C30.6733914,32.3416647 31.3266086,32.3416647 31.7823881,31.9750058 L31.8838835,31.8838835 L31.9750058,31.7823881 C32.3416647,31.3266086 32.3416647,30.6733914 31.9750058,30.2176119 L31.8838835,30.1161165 L25.767,24 L31.8838835,17.8838835 L31.9750058,17.7823881 C32.3416647,17.3266086 32.3416647,16.6733914 31.9750058,16.2176119 L31.8838835,16.1161165 L31.7823881,16.0249942 C31.3266086,15.6583353 30.6733914,15.6583353 30.2176119,16.0249942 L30.1161165,16.1161165 L24,22.233 L17.8838835,16.1161165 L17.7823881,16.0249942 L17.8838835,16.1161165 Z\"\n})))));","import { defineComponent, h } from 'vue';\nexport default defineComponent({\n  name: 'Eye',\n  render() {\n    return h(\"svg\", {\n      xmlns: \"http://www.w3.org/2000/svg\",\n      viewBox: \"0 0 512 512\"\n    }, h(\"path\", {\n      d: \"M255.66 112c-77.94 0-157.89 45.11-220.83 135.33a16 16 0 0 0-.27 17.77C82.92 340.8 161.8 400 255.66 400c92.84 0 173.34-59.38 221.79-135.25a16.14 16.14 0 0 0 0-17.47C428.89 172.28 347.8 112 255.66 112z\",\n      fill: \"none\",\n      stroke: \"currentColor\",\n      \"stroke-linecap\": \"round\",\n      \"stroke-linejoin\": \"round\",\n      \"stroke-width\": \"32\"\n    }), h(\"circle\", {\n      cx: \"256\",\n      cy: \"256\",\n      r: \"80\",\n      fill: \"none\",\n      stroke: \"currentColor\",\n      \"stroke-miterlimit\": \"10\",\n      \"stroke-width\": \"32\"\n    }));\n  }\n});","import { defineComponent, h } from 'vue';\nexport default defineComponent({\n  name: 'EyeOff',\n  render() {\n    return h(\"svg\", {\n      xmlns: \"http://www.w3.org/2000/svg\",\n      viewBox: \"0 0 512 512\"\n    }, h(\"path\", {\n      d: \"M432 448a15.92 15.92 0 0 1-11.31-4.69l-352-352a16 16 0 0 1 22.62-22.62l352 352A16 16 0 0 1 432 448z\",\n      fill: \"currentColor\"\n    }), h(\"path\", {\n      d: \"M255.66 384c-41.49 0-81.5-12.28-118.92-36.5c-34.07-22-64.74-53.51-88.7-91v-.08c19.94-28.57 41.78-52.73 65.24-72.21a2 2 0 0 0 .14-2.94L93.5 161.38a2 2 0 0 0-2.71-.12c-24.92 21-48.05 46.76-69.08 76.92a31.92 31.92 0 0 0-.64 35.54c26.41 41.33 60.4 76.14 98.28 100.65C162 402 207.9 416 255.66 416a239.13 239.13 0 0 0 75.8-12.58a2 2 0 0 0 .77-3.31l-21.58-21.58a4 4 0 0 0-3.83-1a204.8 204.8 0 0 1-51.16 6.47z\",\n      fill: \"currentColor\"\n    }), h(\"path\", {\n      d: \"M490.84 238.6c-26.46-40.92-60.79-75.68-99.27-100.53C349 110.55 302 96 255.66 96a227.34 227.34 0 0 0-74.89 12.83a2 2 0 0 0-.75 3.31l21.55 21.55a4 4 0 0 0 3.88 1a192.82 192.82 0 0 1 50.21-6.69c40.69 0 80.58 12.43 118.55 37c34.71 22.4 65.74 53.88 89.76 91a.13.13 0 0 1 0 .16a310.72 310.72 0 0 1-64.12 72.73a2 2 0 0 0-.15 2.95l19.9 19.89a2 2 0 0 0 2.7.13a343.49 343.49 0 0 0 68.64-78.48a32.2 32.2 0 0 0-.1-34.78z\",\n      fill: \"currentColor\"\n    }), h(\"path\", {\n      d: \"M256 160a95.88 95.88 0 0 0-21.37 2.4a2 2 0 0 0-1 3.38l112.59 112.56a2 2 0 0 0 3.38-1A96 96 0 0 0 256 160z\",\n      fill: \"currentColor\"\n    }), h(\"path\", {\n      d: \"M165.78 233.66a2 2 0 0 0-3.38 1a96 96 0 0 0 115 115a2 2 0 0 0 1-3.38z\",\n      fill: \"currentColor\"\n    }));\n  }\n});","import { defineComponent, h } from 'vue';\nexport default defineComponent({\n  name: 'FastBackward',\n  render() {\n    return h(\"svg\", {\n      viewBox: \"0 0 20 20\",\n      version: \"1.1\",\n      xmlns: \"http://www.w3.org/2000/svg\"\n    }, h(\"g\", {\n      stroke: \"none\",\n      \"stroke-width\": \"1\",\n      fill: \"none\",\n      \"fill-rule\": \"evenodd\"\n    }, h(\"g\", {\n      fill: \"currentColor\",\n      \"fill-rule\": \"nonzero\"\n    }, h(\"path\", {\n      d: \"M8.73171,16.7949 C9.03264,17.0795 9.50733,17.0663 9.79196,16.7654 C10.0766,16.4644 10.0634,15.9897 9.76243,15.7051 L4.52339,10.75 L17.2471,10.75 C17.6613,10.75 17.9971,10.4142 17.9971,10 C17.9971,9.58579 17.6613,9.25 17.2471,9.25 L4.52112,9.25 L9.76243,4.29275 C10.0634,4.00812 10.0766,3.53343 9.79196,3.2325 C9.50733,2.93156 9.03264,2.91834 8.73171,3.20297 L2.31449,9.27241 C2.14819,9.4297 2.04819,9.62981 2.01448,9.8386 C2.00308,9.89058 1.99707,9.94459 1.99707,10 C1.99707,10.0576 2.00356,10.1137 2.01585,10.1675 C2.05084,10.3733 2.15039,10.5702 2.31449,10.7254 L8.73171,16.7949 Z\"\n    }))));\n  }\n});","import { defineComponent, h } from 'vue';\nexport default defineComponent({\n  name: 'FastForward',\n  render() {\n    return h(\"svg\", {\n      viewBox: \"0 0 20 20\",\n      version: \"1.1\",\n      xmlns: \"http://www.w3.org/2000/svg\"\n    }, h(\"g\", {\n      stroke: \"none\",\n      \"stroke-width\": \"1\",\n      fill: \"none\",\n      \"fill-rule\": \"evenodd\"\n    }, h(\"g\", {\n      fill: \"currentColor\",\n      \"fill-rule\": \"nonzero\"\n    }, h(\"path\", {\n      d: \"M11.2654,3.20511 C10.9644,2.92049 10.4897,2.93371 10.2051,3.23464 C9.92049,3.53558 9.93371,4.01027 10.2346,4.29489 L15.4737,9.25 L2.75,9.25 C2.33579,9.25 2,9.58579 2,10.0000012 C2,10.4142 2.33579,10.75 2.75,10.75 L15.476,10.75 L10.2346,15.7073 C9.93371,15.9919 9.92049,16.4666 10.2051,16.7675 C10.4897,17.0684 10.9644,17.0817 11.2654,16.797 L17.6826,10.7276 C17.8489,10.5703 17.9489,10.3702 17.9826,10.1614 C17.994,10.1094 18,10.0554 18,10.0000012 C18,9.94241 17.9935,9.88633 17.9812,9.83246 C17.9462,9.62667 17.8467,9.42976 17.6826,9.27455 L11.2654,3.20511 Z\"\n    }))));\n  }\n});","import { defineComponent, h } from 'vue';\nexport default defineComponent({\n  name: 'Forward',\n  render() {\n    return h(\"svg\", {\n      viewBox: \"0 0 20 20\",\n      fill: \"none\",\n      xmlns: \"http://www.w3.org/2000/svg\"\n    }, h(\"path\", {\n      d: \"M7.73271 4.20694C8.03263 3.92125 8.50737 3.93279 8.79306 4.23271L13.7944 9.48318C14.0703 9.77285 14.0703 10.2281 13.7944 10.5178L8.79306 15.7682C8.50737 16.0681 8.03263 16.0797 7.73271 15.794C7.43279 15.5083 7.42125 15.0336 7.70694 14.7336L12.2155 10.0005L7.70694 5.26729C7.42125 4.96737 7.43279 4.49264 7.73271 4.20694Z\",\n      fill: \"currentColor\"\n    }));\n  }\n});","import { h } from 'vue';\nimport { replaceable } from \"./replaceable.mjs\";\nexport default replaceable('info', () => h(\"svg\", {\n  viewBox: \"0 0 28 28\",\n  version: \"1.1\",\n  xmlns: \"http://www.w3.org/2000/svg\"\n}, h(\"g\", {\n  stroke: \"none\",\n  \"stroke-width\": \"1\",\n  \"fill-rule\": \"evenodd\"\n}, h(\"g\", {\n  \"fill-rule\": \"nonzero\"\n}, h(\"path\", {\n  d: \"M14,2 C20.6274,2 26,7.37258 26,14 C26,20.6274 20.6274,26 14,26 C7.37258,26 2,20.6274 2,14 C2,7.37258 7.37258,2 14,2 Z M14,11 C13.4477,11 13,11.4477 13,12 L13,12 L13,20 C13,20.5523 13.4477,21 14,21 C14.5523,21 15,20.5523 15,20 L15,20 L15,12 C15,11.4477 14.5523,11 14,11 Z M14,6.75 C13.3096,6.75 12.75,7.30964 12.75,8 C12.75,8.69036 13.3096,9.25 14,9.25 C14.6904,9.25 15.25,8.69036 15.25,8 C15.25,7.30964 14.6904,6.75 14,6.75 Z\"\n})))));","import { defineComponent, h } from 'vue';\nexport default defineComponent({\n  name: 'More',\n  render() {\n    return h(\"svg\", {\n      viewBox: \"0 0 16 16\",\n      version: \"1.1\",\n      xmlns: \"http://www.w3.org/2000/svg\"\n    }, h(\"g\", {\n      stroke: \"none\",\n      \"stroke-width\": \"1\",\n      fill: \"none\",\n      \"fill-rule\": \"evenodd\"\n    }, h(\"g\", {\n      fill: \"currentColor\",\n      \"fill-rule\": \"nonzero\"\n    }, h(\"path\", {\n      d: \"M4,7 C4.55228,7 5,7.44772 5,8 C5,8.55229 4.55228,9 4,9 C3.44772,9 3,8.55229 3,8 C3,7.44772 3.44772,7 4,7 Z M8,7 C8.55229,7 9,7.44772 9,8 C9,8.55229 8.55229,9 8,9 C7.44772,9 7,8.55229 7,8 C7,7.44772 7.44772,7 8,7 Z M12,7 C12.5523,7 13,7.44772 13,8 C13,8.55229 12.5523,9 12,9 C11.4477,9 11,8.55229 11,8 C11,7.44772 11.4477,7 12,7 Z\"\n    }))));\n  }\n});","import { defineComponent, h } from 'vue';\nexport default defineComponent({\n  name: 'Remove',\n  render() {\n    return h(\"svg\", {\n      xmlns: \"http://www.w3.org/2000/svg\",\n      viewBox: \"0 0 512 512\"\n    }, h(\"line\", {\n      x1: \"400\",\n      y1: \"256\",\n      x2: \"112\",\n      y2: \"256\",\n      style: \"\\n        fill: none;\\n        stroke: currentColor;\\n        stroke-linecap: round;\\n        stroke-linejoin: round;\\n        stroke-width: 32px;\\n      \"\n    }));\n  }\n});","import { defineComponent, h } from 'vue';\nexport default defineComponent({\n  name: 'ResizeSmall',\n  render() {\n    return h(\"svg\", {\n      xmlns: \"http://www.w3.org/2000/svg\",\n      viewBox: \"0 0 20 20\"\n    }, h(\"g\", {\n      fill: \"none\"\n    }, h(\"path\", {\n      d: \"M5.5 4A1.5 1.5 0 0 0 4 5.5v1a.5.5 0 0 1-1 0v-1A2.5 2.5 0 0 1 5.5 3h1a.5.5 0 0 1 0 1h-1zM16 5.5A1.5 1.5 0 0 0 14.5 4h-1a.5.5 0 0 1 0-1h1A2.5 2.5 0 0 1 17 5.5v1a.5.5 0 0 1-1 0v-1zm0 9a1.5 1.5 0 0 1-1.5 1.5h-1a.5.5 0 0 0 0 1h1a2.5 2.5 0 0 0 2.5-2.5v-1a.5.5 0 0 0-1 0v1zm-12 0A1.5 1.5 0 0 0 5.5 16h1.25a.5.5 0 0 1 0 1H5.5A2.5 2.5 0 0 1 3 14.5v-1.25a.5.5 0 0 1 1 0v1.25zM8.5 7A1.5 1.5 0 0 0 7 8.5v3A1.5 1.5 0 0 0 8.5 13h3a1.5 1.5 0 0 0 1.5-1.5v-3A1.5 1.5 0 0 0 11.5 7h-3zM8 8.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-3z\",\n      fill: \"currentColor\"\n    })));\n  }\n});","import { h } from 'vue';\nimport { replaceable } from \"./replaceable.mjs\";\nexport default replaceable('rotateClockwise', () => h(\"svg\", {\n  viewBox: \"0 0 20 20\",\n  fill: \"none\",\n  xmlns: \"http://www.w3.org/2000/svg\"\n}, h(\"path\", {\n  d: \"M3 10C3 6.13401 6.13401 3 10 3C13.866 3 17 6.13401 17 10C17 12.7916 15.3658 15.2026 13 16.3265V14.5C13 14.2239 12.7761 14 12.5 14C12.2239 14 12 14.2239 12 14.5V17.5C12 17.7761 12.2239 18 12.5 18H15.5C15.7761 18 16 17.7761 16 17.5C16 17.2239 15.7761 17 15.5 17H13.8758C16.3346 15.6357 18 13.0128 18 10C18 5.58172 14.4183 2 10 2C5.58172 2 2 5.58172 2 10C2 10.2761 2.22386 10.5 2.5 10.5C2.77614 10.5 3 10.2761 3 10Z\",\n  fill: \"currentColor\"\n}), h(\"path\", {\n  d: \"M10 12C11.1046 12 12 11.1046 12 10C12 8.89543 11.1046 8 10 8C8.89543 8 8 8.89543 8 10C8 11.1046 8.89543 12 10 12ZM10 11C9.44772 11 9 10.5523 9 10C9 9.44772 9.44772 9 10 9C10.5523 9 11 9.44772 11 10C11 10.5523 10.5523 11 10 11Z\",\n  fill: \"currentColor\"\n})));","import { h } from 'vue';\nimport { replaceable } from \"./replaceable.mjs\";\nexport default replaceable('rotateClockwise', () => h(\"svg\", {\n  viewBox: \"0 0 20 20\",\n  fill: \"none\",\n  xmlns: \"http://www.w3.org/2000/svg\"\n}, h(\"path\", {\n  d: \"M17 10C17 6.13401 13.866 3 10 3C6.13401 3 3 6.13401 3 10C3 12.7916 4.63419 15.2026 7 16.3265V14.5C7 14.2239 7.22386 14 7.5 14C7.77614 14 8 14.2239 8 14.5V17.5C8 17.7761 7.77614 18 7.5 18H4.5C4.22386 18 4 17.7761 4 17.5C4 17.2239 4.22386 17 4.5 17H6.12422C3.66539 15.6357 2 13.0128 2 10C2 5.58172 5.58172 2 10 2C14.4183 2 18 5.58172 18 10C18 10.2761 17.7761 10.5 17.5 10.5C17.2239 10.5 17 10.2761 17 10Z\",\n  fill: \"currentColor\"\n}), h(\"path\", {\n  d: \"M10 12C8.89543 12 8 11.1046 8 10C8 8.89543 8.89543 8 10 8C11.1046 8 12 8.89543 12 10C12 11.1046 11.1046 12 10 12ZM10 11C10.5523 11 11 10.5523 11 10C11 9.44772 10.5523 9 10 9C9.44772 9 9 9.44772 9 10C9 10.5523 9.44772 11 10 11Z\",\n  fill: \"currentColor\"\n})));","import { h } from 'vue';\nimport { replaceable } from \"./replaceable.mjs\";\nexport default replaceable('success', () => h(\"svg\", {\n  viewBox: \"0 0 48 48\",\n  version: \"1.1\",\n  xmlns: \"http://www.w3.org/2000/svg\"\n}, h(\"g\", {\n  stroke: \"none\",\n  \"stroke-width\": \"1\",\n  \"fill-rule\": \"evenodd\"\n}, h(\"g\", {\n  \"fill-rule\": \"nonzero\"\n}, h(\"path\", {\n  d: \"M24,4 C35.045695,4 44,12.954305 44,24 C44,35.045695 35.045695,44 24,44 C12.954305,44 4,35.045695 4,24 C4,12.954305 12.954305,4 24,4 Z M32.6338835,17.6161165 C32.1782718,17.1605048 31.4584514,17.1301307 30.9676119,17.5249942 L30.8661165,17.6161165 L20.75,27.732233 L17.1338835,24.1161165 C16.6457281,23.6279612 15.8542719,23.6279612 15.3661165,24.1161165 C14.9105048,24.5717282 14.8801307,25.2915486 15.2749942,25.7823881 L15.3661165,25.8838835 L19.8661165,30.3838835 C20.3217282,30.8394952 21.0415486,30.8698693 21.5323881,30.4750058 L21.6338835,30.3838835 L32.6338835,19.3838835 C33.1220388,18.8957281 33.1220388,18.1042719 32.6338835,17.6161165 Z\"\n})))));","import { h } from 'vue';\nimport { replaceable } from \"./replaceable.mjs\";\nexport default replaceable('warning', () => h(\"svg\", {\n  viewBox: \"0 0 24 24\",\n  version: \"1.1\",\n  xmlns: \"http://www.w3.org/2000/svg\"\n}, h(\"g\", {\n  stroke: \"none\",\n  \"stroke-width\": \"1\",\n  \"fill-rule\": \"evenodd\"\n}, h(\"g\", {\n  \"fill-rule\": \"nonzero\"\n}, h(\"path\", {\n  d: \"M12,2 C17.523,2 22,6.478 22,12 C22,17.522 17.523,22 12,22 C6.477,22 2,17.522 2,12 C2,6.478 6.477,2 12,2 Z M12.0018002,15.0037242 C11.450254,15.0037242 11.0031376,15.4508407 11.0031376,16.0023869 C11.0031376,16.553933 11.450254,17.0010495 12.0018002,17.0010495 C12.5533463,17.0010495 13.0004628,16.553933 13.0004628,16.0023869 C13.0004628,15.4508407 12.5533463,15.0037242 12.0018002,15.0037242 Z M11.99964,7 C11.4868042,7.00018474 11.0642719,7.38637706 11.0066858,7.8837365 L11,8.00036004 L11.0018003,13.0012393 L11.00857,13.117858 C11.0665141,13.6151758 11.4893244,14.0010638 12.0021602,14.0008793 C12.514996,14.0006946 12.9375283,13.6145023 12.9951144,13.1171428 L13.0018002,13.0005193 L13,7.99964009 L12.9932303,7.8830214 C12.9352861,7.38570354 12.5124758,6.99981552 11.99964,7 Z\"\n})))));","import { h } from 'vue';\nimport { replaceable } from \"./replaceable.mjs\";\nexport default replaceable('zoomIn', () => h(\"svg\", {\n  viewBox: \"0 0 20 20\",\n  fill: \"none\",\n  xmlns: \"http://www.w3.org/2000/svg\"\n}, h(\"path\", {\n  d: \"M11.5 8.5C11.5 8.22386 11.2761 8 11 8H9V6C9 5.72386 8.77614 5.5 8.5 5.5C8.22386 5.5 8 5.72386 8 6V8H6C5.72386 8 5.5 8.22386 5.5 8.5C5.5 8.77614 5.72386 9 6 9H8V11C8 11.2761 8.22386 11.5 8.5 11.5C8.77614 11.5 9 11.2761 9 11V9H11C11.2761 9 11.5 8.77614 11.5 8.5Z\",\n  fill: \"currentColor\"\n}), h(\"path\", {\n  d: \"M8.5 3C11.5376 3 14 5.46243 14 8.5C14 9.83879 13.5217 11.0659 12.7266 12.0196L16.8536 16.1464C17.0488 16.3417 17.0488 16.6583 16.8536 16.8536C16.68 17.0271 16.4106 17.0464 16.2157 16.9114L16.1464 16.8536L12.0196 12.7266C11.0659 13.5217 9.83879 14 8.5 14C5.46243 14 3 11.5376 3 8.5C3 5.46243 5.46243 3 8.5 3ZM8.5 4C6.01472 4 4 6.01472 4 8.5C4 10.9853 6.01472 13 8.5 13C10.9853 13 13 10.9853 13 8.5C13 6.01472 10.9853 4 8.5 4Z\",\n  fill: \"currentColor\"\n})));","import { h } from 'vue';\nimport { replaceable } from \"./replaceable.mjs\";\nexport default replaceable('zoomOut', () => h(\"svg\", {\n  viewBox: \"0 0 20 20\",\n  fill: \"none\",\n  xmlns: \"http://www.w3.org/2000/svg\"\n}, h(\"path\", {\n  d: \"M11 8C11.2761 8 11.5 8.22386 11.5 8.5C11.5 8.77614 11.2761 9 11 9H6C5.72386 9 5.5 8.77614 5.5 8.5C5.5 8.22386 5.72386 8 6 8H11Z\",\n  fill: \"currentColor\"\n}), h(\"path\", {\n  d: \"M14 8.5C14 5.46243 11.5376 3 8.5 3C5.46243 3 3 5.46243 3 8.5C3 11.5376 5.46243 14 8.5 14C9.83879 14 11.0659 13.5217 12.0196 12.7266L16.1464 16.8536L16.2157 16.9114C16.4106 17.0464 16.68 17.0271 16.8536 16.8536C17.0488 16.6583 17.0488 16.3417 16.8536 16.1464L12.7266 12.0196C13.5217 11.0659 14 9.83879 14 8.5ZM4 8.5C4 6.01472 6.01472 4 8.5 4C10.9853 4 13 6.01472 13 8.5C13 10.9853 10.9853 13 8.5 13C6.01472 13 4 10.9853 4 8.5Z\",\n  fill: \"currentColor\"\n})));","import { c } from \"../../_utils/cssr/index.mjs\";\nimport commonVariables from \"../common/_common.mjs\";\nconst {\n  cubicBezierEaseInOut\n} = commonVariables;\nexport function iconSwitchTransition({\n  originalTransform = '',\n  left = 0,\n  top = 0,\n  transition = `all .3s ${cubicBezierEaseInOut} !important`\n} = {}) {\n  return [c('&.icon-switch-transition-enter-from, &.icon-switch-transition-leave-to', {\n    transform: `${originalTransform} scale(0.75)`,\n    left,\n    top,\n    opacity: 0\n  }), c('&.icon-switch-transition-enter-to, &.icon-switch-transition-leave-from', {\n    transform: `scale(1) ${originalTransform}`,\n    left,\n    top,\n    opacity: 1\n  }), c('&.icon-switch-transition-enter-active, &.icon-switch-transition-leave-active', {\n    transformOrigin: 'center',\n    position: 'absolute',\n    left,\n    top,\n    transition\n  })];\n}","import { iconSwitchTransition } from \"../../../../_styles/transitions/icon-switch.cssr.mjs\";\nimport { c, cB, cE } from \"../../../../_utils/cssr/index.mjs\";\n// vars:\n// --n-bezier\n// --n-clear-color\n// --n-clear-size\n// --n-clear-color-hover\n// --n-clear-color-pressed\nexport default cB('base-clear', `\n flex-shrink: 0;\n height: 1em;\n width: 1em;\n position: relative;\n`, [c('>', [cE('clear', `\n font-size: var(--n-clear-size);\n height: 1em;\n width: 1em;\n cursor: pointer;\n color: var(--n-clear-color);\n transition: color .3s var(--n-bezier);\n display: flex;\n `, [c('&:hover', `\n color: var(--n-clear-color-hover)!important;\n `), c('&:active', `\n color: var(--n-clear-color-pressed)!important;\n `)]), cE('placeholder', `\n display: flex;\n `), cE('clear, placeholder', `\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translateX(-50%) translateY(-50%);\n `, [iconSwitchTransition({\n  originalTransform: 'translateX(-50%) translateY(-50%)',\n  left: '50%',\n  top: '50%'\n})])])]);","import { defineComponent, h, toRef } from 'vue';\nimport { useStyle } from \"../../../_mixins/index.mjs\";\nimport { resolveSlot } from \"../../../_utils/index.mjs\";\nimport { NBaseIcon } from \"../../icon/index.mjs\";\nimport NIconSwitchTransition from \"../../icon-switch-transition/index.mjs\";\nimport { ClearIcon } from \"../../icons/index.mjs\";\nimport style from \"./styles/index.cssr.mjs\";\nexport default defineComponent({\n  name: 'BaseClear',\n  props: {\n    clsPrefix: {\n      type: String,\n      required: true\n    },\n    show: Boolean,\n    onClear: Function\n  },\n  setup(props) {\n    useStyle('-base-clear', style, toRef(props, 'clsPrefix'));\n    return {\n      handleMouseDown(e) {\n        e.preventDefault();\n      }\n    };\n  },\n  render() {\n    const {\n      clsPrefix\n    } = this;\n    return h(\"div\", {\n      class: `${clsPrefix}-base-clear`\n    }, h(NIconSwitchTransition, null, {\n      default: () => {\n        var _a, _b;\n        return this.show ? h(\"div\", {\n          key: \"dismiss\",\n          class: `${clsPrefix}-base-clear__clear`,\n          onClick: this.onClear,\n          onMousedown: this.handleMouseDown,\n          \"data-clear\": true\n        }, resolveSlot(this.$slots.icon, () => [h(NBaseIcon, {\n          clsPrefix: clsPrefix\n        }, {\n          default: () => h(ClearIcon, null)\n        })])) : h(\"div\", {\n          key: \"icon\",\n          class: `${clsPrefix}-base-clear__placeholder`\n        }, (_b = (_a = this.$slots).placeholder) === null || _b === void 0 ? void 0 : _b.call(_a));\n      }\n    }));\n  }\n});","import { c, cB, cM, cNotM } from \"../../../../_utils/cssr/index.mjs\";\n// vars:\n// --n-close-border-radius\n// --n-close-color-hover\n// --n-close-color-pressed\n// --n-close-icon-color\n// --n-close-icon-color-hover\n// --n-close-icon-color-pressed\n// --n-close-icon-color-disabled\nexport default cB('base-close', `\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n background-color: transparent;\n color: var(--n-close-icon-color);\n border-radius: var(--n-close-border-radius);\n height: var(--n-close-size);\n width: var(--n-close-size);\n font-size: var(--n-close-icon-size);\n outline: none;\n border: none;\n position: relative;\n padding: 0;\n`, [cM('absolute', `\n height: var(--n-close-icon-size);\n width: var(--n-close-icon-size);\n `), c('&::before', `\n content: \"\";\n position: absolute;\n width: var(--n-close-size);\n height: var(--n-close-size);\n left: 50%;\n top: 50%;\n transform: translateY(-50%) translateX(-50%);\n transition: inherit;\n border-radius: inherit;\n `), cNotM('disabled', [c('&:hover', `\n color: var(--n-close-icon-color-hover);\n `), c('&:hover::before', `\n background-color: var(--n-close-color-hover);\n `), c('&:focus::before', `\n background-color: var(--n-close-color-hover);\n `), c('&:active', `\n color: var(--n-close-icon-color-pressed);\n `), c('&:active::before', `\n background-color: var(--n-close-color-pressed);\n `)]), cM('disabled', `\n cursor: not-allowed;\n color: var(--n-close-icon-color-disabled);\n background-color: transparent;\n `), cM('round', [c('&::before', `\n border-radius: 50%;\n `)])]);","import { defineComponent, h, toRef } from 'vue';\nimport { useStyle } from \"../../../_mixins/index.mjs\";\nimport { NBaseIcon } from \"../../icon/index.mjs\";\nimport { CloseIcon } from \"../../icons/index.mjs\";\nimport style from \"./styles/index.cssr.mjs\";\nexport default defineComponent({\n  name: 'BaseClose',\n  props: {\n    isButtonTag: {\n      type: Boolean,\n      default: true\n    },\n    clsPrefix: {\n      type: String,\n      required: true\n    },\n    disabled: {\n      type: Boolean,\n      default: undefined\n    },\n    focusable: {\n      type: Boolean,\n      default: true\n    },\n    round: Boolean,\n    onClick: Function,\n    absolute: Boolean\n  },\n  setup(props) {\n    useStyle('-base-close', style, toRef(props, 'clsPrefix'));\n    return () => {\n      const {\n        clsPrefix,\n        disabled,\n        absolute,\n        round,\n        isButtonTag\n      } = props;\n      const Tag = isButtonTag ? 'button' : 'div';\n      return h(Tag, {\n        type: isButtonTag ? 'button' : undefined,\n        tabindex: disabled || !props.focusable ? -1 : 0,\n        \"aria-disabled\": disabled,\n        \"aria-label\": \"close\",\n        role: isButtonTag ? undefined : 'button',\n        disabled: disabled,\n        class: [`${clsPrefix}-base-close`, absolute && `${clsPrefix}-base-close--absolute`, disabled && `${clsPrefix}-base-close--disabled`, round && `${clsPrefix}-base-close--round`],\n        onMousedown: e => {\n          if (!props.focusable) {\n            e.preventDefault();\n          }\n        },\n        onClick: props.onClick\n      }, h(NBaseIcon, {\n        clsPrefix: clsPrefix\n      }, {\n        default: () => h(CloseIcon, null)\n      }));\n    };\n  }\n});","import { defineComponent, h, Transition, TransitionGroup } from 'vue';\nexport default defineComponent({\n  name: 'FadeInExpandTransition',\n  props: {\n    appear: Boolean,\n    group: Boolean,\n    mode: String,\n    onLeave: Function,\n    onAfterLeave: Function,\n    onAfterEnter: Function,\n    width: Boolean,\n    // reverse mode is only used in tree\n    // it make it from expanded to collapsed after mounted\n    reverse: Boolean\n  },\n  setup(props, {\n    slots\n  }) {\n    function handleBeforeLeave(el) {\n      if (props.width) {\n        el.style.maxWidth = `${el.offsetWidth}px`;\n      } else {\n        el.style.maxHeight = `${el.offsetHeight}px`;\n      }\n      void el.offsetWidth;\n    }\n    function handleLeave(el) {\n      if (props.width) {\n        el.style.maxWidth = '0';\n      } else {\n        el.style.maxHeight = '0';\n      }\n      void el.offsetWidth;\n      const {\n        onLeave\n      } = props;\n      if (onLeave) onLeave();\n    }\n    function handleAfterLeave(el) {\n      if (props.width) {\n        el.style.maxWidth = '';\n      } else {\n        el.style.maxHeight = '';\n      }\n      const {\n        onAfterLeave\n      } = props;\n      if (onAfterLeave) onAfterLeave();\n    }\n    function handleEnter(el) {\n      el.style.transition = 'none';\n      if (props.width) {\n        const memorizedWidth = el.offsetWidth;\n        el.style.maxWidth = '0';\n        void el.offsetWidth;\n        el.style.transition = '';\n        el.style.maxWidth = `${memorizedWidth}px`;\n      } else {\n        if (props.reverse) {\n          el.style.maxHeight = `${el.offsetHeight}px`;\n          void el.offsetHeight;\n          el.style.transition = '';\n          el.style.maxHeight = '0';\n        } else {\n          const memorizedHeight = el.offsetHeight;\n          el.style.maxHeight = '0';\n          void el.offsetWidth;\n          el.style.transition = '';\n          el.style.maxHeight = `${memorizedHeight}px`;\n        }\n      }\n      void el.offsetWidth;\n    }\n    function handleAfterEnter(el) {\n      var _a;\n      if (props.width) {\n        el.style.maxWidth = '';\n      } else {\n        if (!props.reverse) {\n          el.style.maxHeight = '';\n        }\n      }\n      (_a = props.onAfterEnter) === null || _a === void 0 ? void 0 : _a.call(props);\n    }\n    return () => {\n      const {\n        group,\n        width,\n        appear,\n        mode\n      } = props;\n      const type = group ? TransitionGroup : Transition;\n      const resolvedProps = {\n        name: width ? 'fade-in-width-expand-transition' : 'fade-in-height-expand-transition',\n        appear,\n        onEnter: handleEnter,\n        onAfterEnter: handleAfterEnter,\n        onBeforeLeave: handleBeforeLeave,\n        onLeave: handleLeave,\n        onAfterLeave: handleAfterLeave\n      };\n      if (!group) {\n        ;\n        resolvedProps.mode = mode;\n      }\n      return h(type, resolvedProps, slots);\n    };\n  }\n});","import { defineComponent, h } from 'vue';\nexport default defineComponent({\n  props: {\n    onFocus: Function,\n    onBlur: Function\n  },\n  setup(props) {\n    return () => h(\"div\", {\n      style: \"width: 0; height: 0\",\n      tabindex: 0,\n      onFocus: props.onFocus,\n      onBlur: props.onBlur\n    });\n  }\n});","import { iconSwitchTransition } from \"../../../../_styles/transitions/icon-switch.cssr.mjs\";\nimport { c, cB, cE } from \"../../../../_utils/cssr/index.mjs\";\nexport default c([c('@keyframes rotator', `\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }`), cB('base-loading', `\n position: relative;\n line-height: 0;\n width: 1em;\n height: 1em;\n `, [cE('transition-wrapper', `\n position: absolute;\n width: 100%;\n height: 100%;\n `, [iconSwitchTransition()]), cE('placeholder', `\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translateX(-50%) translateY(-50%);\n `, [iconSwitchTransition({\n  left: '50%',\n  top: '50%',\n  originalTransform: 'translateX(-50%) translateY(-50%)'\n})]), cE('container', `\n animation: rotator 3s linear infinite both;\n `, [cE('icon', `\n height: 1em;\n width: 1em;\n `)])])]);","import { defineComponent, h, toRef } from 'vue';\nimport { useStyle } from \"../../../_mixins/index.mjs\";\nimport NIconSwitchTransition from \"../../icon-switch-transition/index.mjs\";\nimport style from \"./styles/index.cssr.mjs\";\nconst duration = '1.6s';\nconst exposedLoadingProps = {\n  strokeWidth: {\n    type: Number,\n    default: 28\n  },\n  stroke: {\n    type: String,\n    default: undefined\n  }\n};\nexport default defineComponent({\n  name: 'BaseLoading',\n  props: Object.assign({\n    clsPrefix: {\n      type: String,\n      required: true\n    },\n    show: {\n      type: Boolean,\n      default: true\n    },\n    scale: {\n      type: Number,\n      default: 1\n    },\n    radius: {\n      type: Number,\n      default: 100\n    }\n  }, exposedLoadingProps),\n  setup(props) {\n    useStyle('-base-loading', style, toRef(props, 'clsPrefix'));\n  },\n  render() {\n    const {\n      clsPrefix,\n      radius,\n      strokeWidth,\n      stroke,\n      scale\n    } = this;\n    const scaledRadius = radius / scale;\n    return h(\"div\", {\n      class: `${clsPrefix}-base-loading`,\n      role: \"img\",\n      \"aria-label\": \"loading\"\n    }, h(NIconSwitchTransition, null, {\n      default: () => this.show ? h(\"div\", {\n        key: \"icon\",\n        class: `${clsPrefix}-base-loading__transition-wrapper`\n      }, h(\"div\", {\n        class: `${clsPrefix}-base-loading__container`\n      }, h(\"svg\", {\n        class: `${clsPrefix}-base-loading__icon`,\n        viewBox: `0 0 ${2 * scaledRadius} ${2 * scaledRadius}`,\n        xmlns: \"http://www.w3.org/2000/svg\",\n        style: {\n          color: stroke\n        }\n      }, h(\"g\", null, h(\"animateTransform\", {\n        attributeName: \"transform\",\n        type: \"rotate\",\n        values: `0 ${scaledRadius} ${scaledRadius};270 ${scaledRadius} ${scaledRadius}`,\n        begin: \"0s\",\n        dur: duration,\n        fill: \"freeze\",\n        repeatCount: \"indefinite\"\n      }), h(\"circle\", {\n        class: `${clsPrefix}-base-loading__icon`,\n        fill: \"none\",\n        stroke: \"currentColor\",\n        \"stroke-width\": strokeWidth,\n        \"stroke-linecap\": \"round\",\n        cx: scaledRadius,\n        cy: scaledRadius,\n        r: radius - strokeWidth / 2,\n        \"stroke-dasharray\": 5.67 * radius,\n        \"stroke-dashoffset\": 18.48 * radius\n      }, h(\"animateTransform\", {\n        attributeName: \"transform\",\n        type: \"rotate\",\n        values: `0 ${scaledRadius} ${scaledRadius};135 ${scaledRadius} ${scaledRadius};450 ${scaledRadius} ${scaledRadius}`,\n        begin: \"0s\",\n        dur: duration,\n        fill: \"freeze\",\n        repeatCount: \"indefinite\"\n      }), h(\"animate\", {\n        attributeName: \"stroke-dashoffset\",\n        values: `${5.67 * radius};${1.42 * radius};${5.67 * radius}`,\n        begin: \"0s\",\n        dur: duration,\n        fill: \"freeze\",\n        repeatCount: \"indefinite\"\n      })))))) : h(\"div\", {\n        key: \"placeholder\",\n        class: `${clsPrefix}-base-loading__placeholder`\n      }, this.$slots)\n    }));\n  }\n});","import { c } from \"../../_utils/cssr/index.mjs\";\nimport commonVariables from \"../common/_common.mjs\";\nconst {\n  cubicBezierEaseInOut\n} = commonVariables;\nexport function fadeInTransition({\n  name = 'fade-in',\n  enterDuration = '0.2s',\n  leaveDuration = '0.2s',\n  enterCubicBezier = cubicBezierEaseInOut,\n  leaveCubicBezier = cubicBezierEaseInOut\n} = {}) {\n  return [c(`&.${name}-transition-enter-active`, {\n    transition: `all ${enterDuration} ${enterCubicBezier}!important`\n  }), c(`&.${name}-transition-leave-active`, {\n    transition: `all ${leaveDuration} ${leaveCubicBezier}!important`\n  }), c(`&.${name}-transition-enter-from, &.${name}-transition-leave-to`, {\n    opacity: 0\n  }), c(`&.${name}-transition-leave-from, &.${name}-transition-enter-to`, {\n    opacity: 1\n  })];\n}","import { composite, rgba, scaleColor } from 'seemly';\nimport commonVariables from \"./_common.mjs\";\nconst base = {\n  neutralBase: '#000',\n  neutralInvertBase: '#fff',\n  neutralTextBase: '#fff',\n  neutralPopover: 'rgb(72, 72, 78)',\n  neutralCard: 'rgb(24, 24, 28)',\n  neutralModal: 'rgb(44, 44, 50)',\n  neutralBody: 'rgb(16, 16, 20)',\n  alpha1: '0.9',\n  alpha2: '0.82',\n  alpha3: '0.52',\n  alpha4: '0.38',\n  alpha5: '0.28',\n  alphaClose: '0.52',\n  alphaDisabled: '0.38',\n  alphaDisabledInput: '0.06',\n  alphaPending: '0.09',\n  alphaTablePending: '0.06',\n  alphaTableStriped: '0.05',\n  alphaPressed: '0.05',\n  alphaAvatar: '0.18',\n  alphaRail: '0.2',\n  alphaProgressRail: '0.12',\n  alphaBorder: '0.24',\n  alphaDivider: '0.09',\n  alphaInput: '0.1',\n  alphaAction: '0.06',\n  alphaTab: '0.04',\n  alphaScrollbar: '0.2',\n  alphaScrollbarHover: '0.3',\n  alphaCode: '0.12',\n  alphaTag: '0.2',\n  // primary\n  primaryHover: '#7fe7c4',\n  primaryDefault: '#63e2b7',\n  primaryActive: '#5acea7',\n  primarySuppl: 'rgb(42, 148, 125)',\n  // info\n  infoHover: '#8acbec',\n  infoDefault: '#70c0e8',\n  infoActive: '#66afd3',\n  infoSuppl: 'rgb(56, 137, 197)',\n  // error\n  errorHover: '#e98b8b',\n  errorDefault: '#e88080',\n  errorActive: '#e57272',\n  errorSuppl: 'rgb(208, 58, 82)',\n  // warning\n  warningHover: '#f5d599',\n  warningDefault: '#f2c97d',\n  warningActive: '#e6c260',\n  warningSuppl: 'rgb(240, 138, 0)',\n  // success\n  successHover: '#7fe7c4',\n  successDefault: '#63e2b7',\n  successActive: '#5acea7',\n  successSuppl: 'rgb(42, 148, 125)'\n};\nconst baseBackgroundRgb = rgba(base.neutralBase);\nconst baseInvertBackgroundRgb = rgba(base.neutralInvertBase);\nconst overlayPrefix = `rgba(${baseInvertBackgroundRgb.slice(0, 3).join(', ')}, `;\nfunction overlay(alpha) {\n  return `${overlayPrefix + String(alpha)})`;\n}\nfunction neutral(alpha) {\n  const overlayRgba = Array.from(baseInvertBackgroundRgb);\n  overlayRgba[3] = Number(alpha);\n  return composite(baseBackgroundRgb, overlayRgba);\n}\nconst derived = Object.assign(Object.assign({\n  name: 'common'\n}, commonVariables), {\n  baseColor: base.neutralBase,\n  // primary color\n  primaryColor: base.primaryDefault,\n  primaryColorHover: base.primaryHover,\n  primaryColorPressed: base.primaryActive,\n  primaryColorSuppl: base.primarySuppl,\n  // info color\n  infoColor: base.infoDefault,\n  infoColorHover: base.infoHover,\n  infoColorPressed: base.infoActive,\n  infoColorSuppl: base.infoSuppl,\n  // success color\n  successColor: base.successDefault,\n  successColorHover: base.successHover,\n  successColorPressed: base.successActive,\n  successColorSuppl: base.successSuppl,\n  // warning color\n  warningColor: base.warningDefault,\n  warningColorHover: base.warningHover,\n  warningColorPressed: base.warningActive,\n  warningColorSuppl: base.warningSuppl,\n  // error color\n  errorColor: base.errorDefault,\n  errorColorHover: base.errorHover,\n  errorColorPressed: base.errorActive,\n  errorColorSuppl: base.errorSuppl,\n  // text color\n  textColorBase: base.neutralTextBase,\n  textColor1: overlay(base.alpha1),\n  textColor2: overlay(base.alpha2),\n  textColor3: overlay(base.alpha3),\n  // textColor4: overlay(base.alpha4), // disabled, placeholder, icon\n  // textColor5: overlay(base.alpha5),\n  textColorDisabled: overlay(base.alpha4),\n  placeholderColor: overlay(base.alpha4),\n  placeholderColorDisabled: overlay(base.alpha5),\n  iconColor: overlay(base.alpha4),\n  iconColorDisabled: overlay(base.alpha5),\n  iconColorHover: overlay(Number(base.alpha4) * 1.25),\n  iconColorPressed: overlay(Number(base.alpha4) * 0.8),\n  opacity1: base.alpha1,\n  opacity2: base.alpha2,\n  opacity3: base.alpha3,\n  opacity4: base.alpha4,\n  opacity5: base.alpha5,\n  dividerColor: overlay(base.alphaDivider),\n  borderColor: overlay(base.alphaBorder),\n  // close\n  closeIconColorHover: overlay(Number(base.alphaClose)),\n  closeIconColor: overlay(Number(base.alphaClose)),\n  closeIconColorPressed: overlay(Number(base.alphaClose)),\n  closeColorHover: 'rgba(255, 255, 255, .12)',\n  closeColorPressed: 'rgba(255, 255, 255, .08)',\n  // clear\n  clearColor: overlay(base.alpha4),\n  clearColorHover: scaleColor(overlay(base.alpha4), {\n    alpha: 1.25\n  }),\n  clearColorPressed: scaleColor(overlay(base.alpha4), {\n    alpha: 0.8\n  }),\n  scrollbarColor: overlay(base.alphaScrollbar),\n  scrollbarColorHover: overlay(base.alphaScrollbarHover),\n  scrollbarWidth: '5px',\n  scrollbarHeight: '5px',\n  scrollbarBorderRadius: '5px',\n  progressRailColor: overlay(base.alphaProgressRail),\n  railColor: overlay(base.alphaRail),\n  popoverColor: base.neutralPopover,\n  tableColor: base.neutralCard,\n  cardColor: base.neutralCard,\n  modalColor: base.neutralModal,\n  bodyColor: base.neutralBody,\n  tagColor: neutral(base.alphaTag),\n  avatarColor: overlay(base.alphaAvatar),\n  invertedColor: base.neutralBase,\n  inputColor: overlay(base.alphaInput),\n  codeColor: overlay(base.alphaCode),\n  tabColor: overlay(base.alphaTab),\n  actionColor: overlay(base.alphaAction),\n  tableHeaderColor: overlay(base.alphaAction),\n  hoverColor: overlay(base.alphaPending),\n  tableColorHover: overlay(base.alphaTablePending),\n  tableColorStriped: overlay(base.alphaTableStriped),\n  pressedColor: overlay(base.alphaPressed),\n  opacityDisabled: base.alphaDisabled,\n  inputColorDisabled: overlay(base.alphaDisabledInput),\n  buttonColor2: 'rgba(255, 255, 255, .08)',\n  buttonColor2Hover: 'rgba(255, 255, 255, .12)',\n  buttonColor2Pressed: 'rgba(255, 255, 255, .08)',\n  boxShadow1: '0 1px 2px -2px rgba(0, 0, 0, .24), 0 3px 6px 0 rgba(0, 0, 0, .18), 0 5px 12px 4px rgba(0, 0, 0, .12)',\n  boxShadow2: '0 3px 6px -4px rgba(0, 0, 0, .24), 0 6px 12px 0 rgba(0, 0, 0, .16), 0 9px 18px 8px rgba(0, 0, 0, .10)',\n  boxShadow3: '0 6px 16px -9px rgba(0, 0, 0, .08), 0 9px 28px 0 rgba(0, 0, 0, .05), 0 12px 48px 16px rgba(0, 0, 0, .03)'\n});\nexport default derived;","import { composite, rgba, scaleColor } from 'seemly';\nimport commonVariables from \"./_common.mjs\";\nconst base = {\n  neutralBase: '#FFF',\n  neutralInvertBase: '#000',\n  neutralTextBase: '#000',\n  neutralPopover: '#fff',\n  neutralCard: '#fff',\n  neutralModal: '#fff',\n  neutralBody: '#fff',\n  alpha1: '0.82',\n  alpha2: '0.72',\n  alpha3: '0.38',\n  alpha4: '0.24',\n  // disabled text, placeholder, icon\n  alpha5: '0.18',\n  // disabled placeholder\n  alphaClose: '0.6',\n  alphaDisabled: '0.5',\n  alphaDisabledInput: '0.02',\n  alphaPending: '0.05',\n  alphaTablePending: '0.02',\n  alphaPressed: '0.07',\n  alphaAvatar: '0.2',\n  alphaRail: '0.14',\n  alphaProgressRail: '.08',\n  alphaBorder: '0.12',\n  alphaDivider: '0.06',\n  alphaInput: '0',\n  alphaAction: '0.02',\n  alphaTab: '0.04',\n  alphaScrollbar: '0.25',\n  alphaScrollbarHover: '0.4',\n  alphaCode: '0.05',\n  alphaTag: '0.02',\n  // primary\n  primaryHover: '#36ad6a',\n  primaryDefault: '#18a058',\n  primaryActive: '#0c7a43',\n  primarySuppl: '#36ad6a',\n  // info\n  infoHover: '#4098fc',\n  infoDefault: '#2080f0',\n  infoActive: '#1060c9',\n  infoSuppl: '#4098fc',\n  // error\n  errorHover: '#de576d',\n  errorDefault: '#d03050',\n  errorActive: '#ab1f3f',\n  errorSuppl: '#de576d',\n  // warning\n  warningHover: '#fcb040',\n  warningDefault: '#f0a020',\n  warningActive: '#c97c10',\n  warningSuppl: '#fcb040',\n  // success\n  successHover: '#36ad6a',\n  successDefault: '#18a058',\n  successActive: '#0c7a43',\n  successSuppl: '#36ad6a'\n};\nconst baseBackgroundRgb = rgba(base.neutralBase);\nconst baseInvertBackgroundRgb = rgba(base.neutralInvertBase);\nconst overlayPrefix = `rgba(${baseInvertBackgroundRgb.slice(0, 3).join(', ')}, `;\nfunction overlay(alpha) {\n  return `${overlayPrefix + String(alpha)})`;\n}\nfunction neutral(alpha) {\n  const overlayRgba = Array.from(baseInvertBackgroundRgb);\n  overlayRgba[3] = Number(alpha);\n  return composite(baseBackgroundRgb, overlayRgba);\n}\nconst derived = Object.assign(Object.assign({\n  name: 'common'\n}, commonVariables), {\n  baseColor: base.neutralBase,\n  // primary color\n  primaryColor: base.primaryDefault,\n  primaryColorHover: base.primaryHover,\n  primaryColorPressed: base.primaryActive,\n  primaryColorSuppl: base.primarySuppl,\n  // info color\n  infoColor: base.infoDefault,\n  infoColorHover: base.infoHover,\n  infoColorPressed: base.infoActive,\n  infoColorSuppl: base.infoSuppl,\n  // success color\n  successColor: base.successDefault,\n  successColorHover: base.successHover,\n  successColorPressed: base.successActive,\n  successColorSuppl: base.successSuppl,\n  // warning color\n  warningColor: base.warningDefault,\n  warningColorHover: base.warningHover,\n  warningColorPressed: base.warningActive,\n  warningColorSuppl: base.warningSuppl,\n  // error color\n  errorColor: base.errorDefault,\n  errorColorHover: base.errorHover,\n  errorColorPressed: base.errorActive,\n  errorColorSuppl: base.errorSuppl,\n  // text color\n  textColorBase: base.neutralTextBase,\n  textColor1: 'rgb(31, 34, 37)',\n  textColor2: 'rgb(51, 54, 57)',\n  textColor3: 'rgb(118, 124, 130)',\n  // textColor4: neutral(base.alpha4), // disabled, placeholder, icon\n  // textColor5: neutral(base.alpha5),\n  textColorDisabled: neutral(base.alpha4),\n  placeholderColor: neutral(base.alpha4),\n  placeholderColorDisabled: neutral(base.alpha5),\n  iconColor: neutral(base.alpha4),\n  iconColorHover: scaleColor(neutral(base.alpha4), {\n    lightness: 0.75\n  }),\n  iconColorPressed: scaleColor(neutral(base.alpha4), {\n    lightness: 0.9\n  }),\n  iconColorDisabled: neutral(base.alpha5),\n  opacity1: base.alpha1,\n  opacity2: base.alpha2,\n  opacity3: base.alpha3,\n  opacity4: base.alpha4,\n  opacity5: base.alpha5,\n  dividerColor: 'rgb(239, 239, 245)',\n  borderColor: 'rgb(224, 224, 230)',\n  // close\n  closeIconColor: neutral(Number(base.alphaClose)),\n  closeIconColorHover: neutral(Number(base.alphaClose)),\n  closeIconColorPressed: neutral(Number(base.alphaClose)),\n  closeColorHover: 'rgba(0, 0, 0, .09)',\n  closeColorPressed: 'rgba(0, 0, 0, .13)',\n  // clear\n  clearColor: neutral(base.alpha4),\n  clearColorHover: scaleColor(neutral(base.alpha4), {\n    lightness: 0.75\n  }),\n  clearColorPressed: scaleColor(neutral(base.alpha4), {\n    lightness: 0.9\n  }),\n  scrollbarColor: overlay(base.alphaScrollbar),\n  scrollbarColorHover: overlay(base.alphaScrollbarHover),\n  scrollbarWidth: '5px',\n  scrollbarHeight: '5px',\n  scrollbarBorderRadius: '5px',\n  progressRailColor: neutral(base.alphaProgressRail),\n  railColor: 'rgb(219, 219, 223)',\n  popoverColor: base.neutralPopover,\n  tableColor: base.neutralCard,\n  cardColor: base.neutralCard,\n  modalColor: base.neutralModal,\n  bodyColor: base.neutralBody,\n  tagColor: '#eee',\n  avatarColor: neutral(base.alphaAvatar),\n  invertedColor: 'rgb(0, 20, 40)',\n  inputColor: neutral(base.alphaInput),\n  codeColor: 'rgb(244, 244, 248)',\n  tabColor: 'rgb(247, 247, 250)',\n  actionColor: 'rgb(250, 250, 252)',\n  tableHeaderColor: 'rgb(250, 250, 252)',\n  hoverColor: 'rgb(243, 243, 245)',\n  // use color with alpha since it can be nested with header filter & sorter effect\n  tableColorHover: 'rgba(0, 0, 100, 0.03)',\n  tableColorStriped: 'rgba(0, 0, 100, 0.02)',\n  pressedColor: 'rgb(237, 237, 239)',\n  opacityDisabled: base.alphaDisabled,\n  inputColorDisabled: 'rgb(250, 250, 252)',\n  // secondary button color\n  // can also be used in tertiary button & quaternary button\n  buttonColor2: 'rgba(46, 51, 56, .05)',\n  buttonColor2Hover: 'rgba(46, 51, 56, .09)',\n  buttonColor2Pressed: 'rgba(46, 51, 56, .13)',\n  boxShadow1: '0 1px 2px -2px rgba(0, 0, 0, .08), 0 3px 6px 0 rgba(0, 0, 0, .06), 0 5px 12px 4px rgba(0, 0, 0, .04)',\n  boxShadow2: '0 3px 6px -4px rgba(0, 0, 0, .12), 0 6px 16px 0 rgba(0, 0, 0, .08), 0 9px 28px 8px rgba(0, 0, 0, .05)',\n  boxShadow3: '0 6px 16px -9px rgba(0, 0, 0, .08), 0 9px 28px 0 rgba(0, 0, 0, .05), 0 12px 48px 16px rgba(0, 0, 0, .03)'\n});\nexport default derived;","export const commonVars = {\n  railInsetHorizontalBottom: 'auto 2px 4px 2px',\n  railInsetHorizontalTop: '4px 2px auto 2px',\n  railInsetVerticalRight: '2px 4px 2px auto',\n  railInsetVerticalLeft: '2px auto 2px 4px',\n  railColor: 'transparent'\n};","import { commonLight } from \"../../../_styles/common/index.mjs\";\nimport { commonVars } from \"./common.mjs\";\nexport function self(vars) {\n  const {\n    scrollbarColor,\n    scrollbarColorHover,\n    scrollbarHeight,\n    scrollbarWidth,\n    scrollbarBorderRadius\n  } = vars;\n  return Object.assign(Object.assign({}, commonVars), {\n    height: scrollbarHeight,\n    width: scrollbarWidth,\n    borderRadius: scrollbarBorderRadius,\n    color: scrollbarColor,\n    colorHover: scrollbarColorHover\n  });\n}\nconst scrollbarLight = {\n  name: 'Scrollbar',\n  common: commonLight,\n  self\n};\nexport default scrollbarLight;","import { commonDark } from \"../../../_styles/common/index.mjs\";\nimport { self } from \"./light.mjs\";\nconst scrollbarDark = {\n  name: 'Scrollbar',\n  common: commonDark,\n  self\n};\nexport default scrollbarDark;","import { fadeInTransition } from \"../../../../_styles/transitions/fade-in.cssr.mjs\";\nimport { c, cB, cE, cM } from \"../../../../_utils/cssr/index.mjs\";\n// vars:\n// --n-scrollbar-bezier\n// --n-scrollbar-color\n// --n-scrollbar-color-hover\n// --n-scrollbar-width\n// --n-scrollbar-height\n// --n-scrollbar-border-radius\n// --n-scrollbar-rail-inset-horizontal\n// --n-scrollbar-rail-inset-vertical\n// --n-scrollbar-rail-color\nexport default cB('scrollbar', `\n overflow: hidden;\n position: relative;\n z-index: auto;\n height: 100%;\n width: 100%;\n`, [c('>', [cB('scrollbar-container', `\n width: 100%;\n overflow: scroll;\n height: 100%;\n min-height: inherit;\n max-height: inherit;\n scrollbar-width: none;\n `, [c('&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb', `\n width: 0;\n height: 0;\n display: none;\n `), c('>', [\n// We can't set overflow hidden since it affects positioning.\ncB('scrollbar-content', `\n box-sizing: border-box;\n min-width: 100%;\n `)])])]), c('>, +', [cB('scrollbar-rail', `\n position: absolute;\n pointer-events: none;\n user-select: none;\n background: var(--n-scrollbar-rail-color);\n -webkit-user-select: none;\n `, [cM('horizontal', `\n height: var(--n-scrollbar-height);\n `, [c('>', [cE('scrollbar', `\n height: var(--n-scrollbar-height);\n border-radius: var(--n-scrollbar-border-radius);\n right: 0;\n `)])]), cM('horizontal--top', `\n top: var(--n-scrollbar-rail-top-horizontal-top); \n right: var(--n-scrollbar-rail-right-horizontal-top); \n bottom: var(--n-scrollbar-rail-bottom-horizontal-top); \n left: var(--n-scrollbar-rail-left-horizontal-top); \n `), cM('horizontal--bottom', `\n top: var(--n-scrollbar-rail-top-horizontal-bottom); \n right: var(--n-scrollbar-rail-right-horizontal-bottom); \n bottom: var(--n-scrollbar-rail-bottom-horizontal-bottom); \n left: var(--n-scrollbar-rail-left-horizontal-bottom); \n `), cM('vertical', `\n width: var(--n-scrollbar-width);\n `, [c('>', [cE('scrollbar', `\n width: var(--n-scrollbar-width);\n border-radius: var(--n-scrollbar-border-radius);\n bottom: 0;\n `)])]), cM('vertical--left', `\n top: var(--n-scrollbar-rail-top-vertical-left); \n right: var(--n-scrollbar-rail-right-vertical-left); \n bottom: var(--n-scrollbar-rail-bottom-vertical-left); \n left: var(--n-scrollbar-rail-left-vertical-left); \n `), cM('vertical--right', `\n top: var(--n-scrollbar-rail-top-vertical-right); \n right: var(--n-scrollbar-rail-right-vertical-right); \n bottom: var(--n-scrollbar-rail-bottom-vertical-right); \n left: var(--n-scrollbar-rail-left-vertical-right); \n `), cM('disabled', [c('>', [cE('scrollbar', 'pointer-events: none;')])]), c('>', [cE('scrollbar', `\n z-index: 1;\n position: absolute;\n cursor: pointer;\n pointer-events: all;\n background-color: var(--n-scrollbar-color);\n transition: background-color .2s var(--n-scrollbar-bezier);\n `, [fadeInTransition(), c('&:hover', 'background-color: var(--n-scrollbar-color-hover);')])])])])]);","import { off, on } from 'evtd';\nimport { depx, getPadding, getPreciseEventTarget } from 'seemly';\nimport { useIsIos } from 'vooks';\nimport { computed, defineComponent, Fragment, h, mergeProps, onBeforeUnmount, onMounted, ref, Transition, watchEffect } from 'vue';\nimport { VResizeObserver } from 'vueuc';\nimport { useConfig, useRtl, useTheme, useThemeClass } from \"../../../_mixins/index.mjs\";\nimport { rtlInset, useReactivated, Wrapper } from \"../../../_utils/index.mjs\";\nimport { scrollbarLight } from \"../styles/index.mjs\";\nimport style from \"./styles/index.cssr.mjs\";\nconst scrollbarProps = Object.assign(Object.assign({}, useTheme.props), {\n  duration: {\n    type: Number,\n    default: 0\n  },\n  scrollable: {\n    type: Boolean,\n    default: true\n  },\n  xScrollable: Boolean,\n  trigger: {\n    type: String,\n    default: 'hover'\n  },\n  useUnifiedContainer: Boolean,\n  triggerDisplayManually: Boolean,\n  // If container is set, resize observer won't not attached\n  container: Function,\n  content: Function,\n  containerClass: String,\n  containerStyle: [String, Object],\n  contentClass: [String, Array],\n  contentStyle: [String, Object],\n  horizontalRailStyle: [String, Object],\n  verticalRailStyle: [String, Object],\n  onScroll: Function,\n  onWheel: Function,\n  onResize: Function,\n  internalOnUpdateScrollLeft: Function,\n  internalHoistYRail: Boolean,\n  yPlacement: {\n    type: String,\n    default: 'right'\n  },\n  xPlacement: {\n    type: String,\n    default: 'bottom'\n  }\n});\nconst Scrollbar = defineComponent({\n  name: 'Scrollbar',\n  props: scrollbarProps,\n  inheritAttrs: false,\n  setup(props) {\n    const {\n      mergedClsPrefixRef,\n      inlineThemeDisabled,\n      mergedRtlRef\n    } = useConfig(props);\n    const rtlEnabledRef = useRtl('Scrollbar', mergedRtlRef, mergedClsPrefixRef);\n    // dom ref\n    const wrapperRef = ref(null);\n    const containerRef = ref(null);\n    const contentRef = ref(null);\n    const yRailRef = ref(null);\n    const xRailRef = ref(null);\n    // data ref\n    const contentHeightRef = ref(null);\n    const contentWidthRef = ref(null);\n    const containerHeightRef = ref(null);\n    const containerWidthRef = ref(null);\n    const yRailSizeRef = ref(null);\n    const xRailSizeRef = ref(null);\n    const containerScrollTopRef = ref(0);\n    const containerScrollLeftRef = ref(0);\n    const isShowXBarRef = ref(false);\n    const isShowYBarRef = ref(false);\n    let yBarPressed = false;\n    let xBarPressed = false;\n    let xBarVanishTimerId;\n    let yBarVanishTimerId;\n    let memoYTop = 0;\n    let memoXLeft = 0;\n    let memoMouseX = 0;\n    let memoMouseY = 0;\n    const isIos = useIsIos();\n    const themeRef = useTheme('Scrollbar', '-scrollbar', style, scrollbarLight, props, mergedClsPrefixRef);\n    const yBarSizeRef = computed(() => {\n      const {\n        value: containerHeight\n      } = containerHeightRef;\n      const {\n        value: contentHeight\n      } = contentHeightRef;\n      const {\n        value: yRailSize\n      } = yRailSizeRef;\n      if (containerHeight === null || contentHeight === null || yRailSize === null) {\n        return 0;\n      } else {\n        return Math.min(containerHeight, yRailSize * containerHeight / contentHeight + depx(themeRef.value.self.width) * 1.5);\n      }\n    });\n    const yBarSizePxRef = computed(() => {\n      return `${yBarSizeRef.value}px`;\n    });\n    const xBarSizeRef = computed(() => {\n      const {\n        value: containerWidth\n      } = containerWidthRef;\n      const {\n        value: contentWidth\n      } = contentWidthRef;\n      const {\n        value: xRailSize\n      } = xRailSizeRef;\n      if (containerWidth === null || contentWidth === null || xRailSize === null) {\n        return 0;\n      } else {\n        return xRailSize * containerWidth / contentWidth + depx(themeRef.value.self.height) * 1.5;\n      }\n    });\n    const xBarSizePxRef = computed(() => {\n      return `${xBarSizeRef.value}px`;\n    });\n    const yBarTopRef = computed(() => {\n      const {\n        value: containerHeight\n      } = containerHeightRef;\n      const {\n        value: containerScrollTop\n      } = containerScrollTopRef;\n      const {\n        value: contentHeight\n      } = contentHeightRef;\n      const {\n        value: yRailSize\n      } = yRailSizeRef;\n      if (containerHeight === null || contentHeight === null || yRailSize === null) {\n        return 0;\n      } else {\n        const heightDiff = contentHeight - containerHeight;\n        if (!heightDiff) return 0;\n        return containerScrollTop / heightDiff * (yRailSize - yBarSizeRef.value);\n      }\n    });\n    const yBarTopPxRef = computed(() => {\n      return `${yBarTopRef.value}px`;\n    });\n    const xBarLeftRef = computed(() => {\n      const {\n        value: containerWidth\n      } = containerWidthRef;\n      const {\n        value: containerScrollLeft\n      } = containerScrollLeftRef;\n      const {\n        value: contentWidth\n      } = contentWidthRef;\n      const {\n        value: xRailSize\n      } = xRailSizeRef;\n      if (containerWidth === null || contentWidth === null || xRailSize === null) {\n        return 0;\n      } else {\n        const widthDiff = contentWidth - containerWidth;\n        if (!widthDiff) return 0;\n        return containerScrollLeft / widthDiff * (xRailSize - xBarSizeRef.value);\n      }\n    });\n    const xBarLeftPxRef = computed(() => {\n      return `${xBarLeftRef.value}px`;\n    });\n    const needYBarRef = computed(() => {\n      const {\n        value: containerHeight\n      } = containerHeightRef;\n      const {\n        value: contentHeight\n      } = contentHeightRef;\n      return containerHeight !== null && contentHeight !== null && contentHeight > containerHeight;\n    });\n    const needXBarRef = computed(() => {\n      const {\n        value: containerWidth\n      } = containerWidthRef;\n      const {\n        value: contentWidth\n      } = contentWidthRef;\n      return containerWidth !== null && contentWidth !== null && contentWidth > containerWidth;\n    });\n    const mergedShowXBarRef = computed(() => {\n      const {\n        trigger\n      } = props;\n      return trigger === 'none' || isShowXBarRef.value;\n    });\n    const mergedShowYBarRef = computed(() => {\n      const {\n        trigger\n      } = props;\n      return trigger === 'none' || isShowYBarRef.value;\n    });\n    const mergedContainerRef = computed(() => {\n      const {\n        container\n      } = props;\n      if (container) return container();\n      return containerRef.value;\n    });\n    const mergedContentRef = computed(() => {\n      const {\n        content\n      } = props;\n      if (content) return content();\n      return contentRef.value;\n    });\n    const scrollTo = (options, y) => {\n      if (!props.scrollable) return;\n      if (typeof options === 'number') {\n        scrollToPosition(options, y !== null && y !== void 0 ? y : 0, 0, false, 'auto');\n        return;\n      }\n      const {\n        left,\n        top,\n        index,\n        elSize,\n        position,\n        behavior,\n        el,\n        debounce = true\n      } = options;\n      if (left !== undefined || top !== undefined) {\n        scrollToPosition(left !== null && left !== void 0 ? left : 0, top !== null && top !== void 0 ? top : 0, 0, false, behavior);\n      }\n      if (el !== undefined) {\n        scrollToPosition(0, el.offsetTop, el.offsetHeight, debounce, behavior);\n      } else if (index !== undefined && elSize !== undefined) {\n        scrollToPosition(0, index * elSize, elSize, debounce, behavior);\n      } else if (position === 'bottom') {\n        scrollToPosition(0, Number.MAX_SAFE_INTEGER, 0, false, behavior);\n      } else if (position === 'top') {\n        scrollToPosition(0, 0, 0, false, behavior);\n      }\n    };\n    const activateState = useReactivated(() => {\n      // Only restore for builtin container & content\n      if (!props.container) {\n        // remount\n        scrollTo({\n          top: containerScrollTopRef.value,\n          left: containerScrollLeftRef.value\n        });\n      }\n    });\n    // methods\n    const handleContentResize = () => {\n      if (activateState.isDeactivated) return;\n      sync();\n    };\n    const handleContainerResize = e => {\n      if (activateState.isDeactivated) return;\n      const {\n        onResize\n      } = props;\n      if (onResize) onResize(e);\n      sync();\n    };\n    const scrollBy = (options, y) => {\n      if (!props.scrollable) return;\n      const {\n        value: container\n      } = mergedContainerRef;\n      if (!container) return;\n      if (typeof options === 'object') {\n        container.scrollBy(options);\n      } else {\n        container.scrollBy(options, y || 0);\n      }\n    };\n    function scrollToPosition(left, top, elSize, debounce, behavior) {\n      const {\n        value: container\n      } = mergedContainerRef;\n      if (!container) return;\n      if (debounce) {\n        const {\n          scrollTop,\n          offsetHeight\n        } = container;\n        if (top > scrollTop) {\n          if (top + elSize <= scrollTop + offsetHeight) {\n            // do nothing\n          } else {\n            container.scrollTo({\n              left,\n              top: top + elSize - offsetHeight,\n              behavior\n            });\n          }\n          return;\n        }\n      }\n      container.scrollTo({\n        left,\n        top,\n        behavior\n      });\n    }\n    function handleMouseEnterWrapper() {\n      showXBar();\n      showYBar();\n      sync();\n    }\n    function handleMouseLeaveWrapper() {\n      hideBar();\n    }\n    function hideBar() {\n      hideYBar();\n      hideXBar();\n    }\n    function hideYBar() {\n      if (yBarVanishTimerId !== undefined) {\n        window.clearTimeout(yBarVanishTimerId);\n      }\n      yBarVanishTimerId = window.setTimeout(() => {\n        isShowYBarRef.value = false;\n      }, props.duration);\n    }\n    function hideXBar() {\n      if (xBarVanishTimerId !== undefined) {\n        window.clearTimeout(xBarVanishTimerId);\n      }\n      xBarVanishTimerId = window.setTimeout(() => {\n        isShowXBarRef.value = false;\n      }, props.duration);\n    }\n    function showXBar() {\n      if (xBarVanishTimerId !== undefined) {\n        window.clearTimeout(xBarVanishTimerId);\n      }\n      isShowXBarRef.value = true;\n    }\n    function showYBar() {\n      if (yBarVanishTimerId !== undefined) {\n        window.clearTimeout(yBarVanishTimerId);\n      }\n      isShowYBarRef.value = true;\n    }\n    function handleScroll(e) {\n      const {\n        onScroll\n      } = props;\n      if (onScroll) onScroll(e);\n      syncScrollState();\n    }\n    function syncScrollState() {\n      // only collect scroll state, do not trigger any dom event\n      const {\n        value: container\n      } = mergedContainerRef;\n      if (container) {\n        containerScrollTopRef.value = container.scrollTop;\n        containerScrollLeftRef.value = container.scrollLeft * ((rtlEnabledRef === null || rtlEnabledRef === void 0 ? void 0 : rtlEnabledRef.value) ? -1 : 1);\n      }\n    }\n    function syncPositionState() {\n      // only collect position state, do not trigger any dom event\n      // Don't use getClientBoundingRect because element may be scale transformed\n      const {\n        value: content\n      } = mergedContentRef;\n      if (content) {\n        contentHeightRef.value = content.offsetHeight;\n        contentWidthRef.value = content.offsetWidth;\n      }\n      const {\n        value: container\n      } = mergedContainerRef;\n      if (container) {\n        containerHeightRef.value = container.offsetHeight;\n        containerWidthRef.value = container.offsetWidth;\n      }\n      const {\n        value: xRailEl\n      } = xRailRef;\n      const {\n        value: yRailEl\n      } = yRailRef;\n      if (xRailEl) {\n        xRailSizeRef.value = xRailEl.offsetWidth;\n      }\n      if (yRailEl) {\n        yRailSizeRef.value = yRailEl.offsetHeight;\n      }\n    }\n    /**\n     * Sometimes there's only one element that we can scroll,\n     * For example for textarea, there won't be a content element.\n     */\n    function syncUnifiedContainer() {\n      const {\n        value: container\n      } = mergedContainerRef;\n      if (container) {\n        containerScrollTopRef.value = container.scrollTop;\n        containerScrollLeftRef.value = container.scrollLeft * ((rtlEnabledRef === null || rtlEnabledRef === void 0 ? void 0 : rtlEnabledRef.value) ? -1 : 1);\n        containerHeightRef.value = container.offsetHeight;\n        containerWidthRef.value = container.offsetWidth;\n        contentHeightRef.value = container.scrollHeight;\n        contentWidthRef.value = container.scrollWidth;\n      }\n      const {\n        value: xRailEl\n      } = xRailRef;\n      const {\n        value: yRailEl\n      } = yRailRef;\n      if (xRailEl) {\n        xRailSizeRef.value = xRailEl.offsetWidth;\n      }\n      if (yRailEl) {\n        yRailSizeRef.value = yRailEl.offsetHeight;\n      }\n    }\n    function sync() {\n      if (!props.scrollable) return;\n      if (props.useUnifiedContainer) {\n        syncUnifiedContainer();\n      } else {\n        syncPositionState();\n        syncScrollState();\n      }\n    }\n    function isMouseUpAway(e) {\n      var _a;\n      return !((_a = wrapperRef.value) === null || _a === void 0 ? void 0 : _a.contains(getPreciseEventTarget(e)));\n    }\n    function handleXScrollMouseDown(e) {\n      e.preventDefault();\n      e.stopPropagation();\n      xBarPressed = true;\n      on('mousemove', window, handleXScrollMouseMove, true);\n      on('mouseup', window, handleXScrollMouseUp, true);\n      memoXLeft = containerScrollLeftRef.value;\n      memoMouseX = (rtlEnabledRef === null || rtlEnabledRef === void 0 ? void 0 : rtlEnabledRef.value) ? window.innerWidth - e.clientX : e.clientX;\n    }\n    function handleXScrollMouseMove(e) {\n      if (!xBarPressed) return;\n      if (xBarVanishTimerId !== undefined) {\n        window.clearTimeout(xBarVanishTimerId);\n      }\n      if (yBarVanishTimerId !== undefined) {\n        window.clearTimeout(yBarVanishTimerId);\n      }\n      const {\n        value: containerWidth\n      } = containerWidthRef;\n      const {\n        value: contentWidth\n      } = contentWidthRef;\n      const {\n        value: xBarSize\n      } = xBarSizeRef;\n      if (containerWidth === null || contentWidth === null) return;\n      const dX = (rtlEnabledRef === null || rtlEnabledRef === void 0 ? void 0 : rtlEnabledRef.value) ? window.innerWidth - e.clientX - memoMouseX : e.clientX - memoMouseX;\n      const dScrollLeft = dX * (contentWidth - containerWidth) / (containerWidth - xBarSize);\n      const toScrollLeftUpperBound = contentWidth - containerWidth;\n      let toScrollLeft = memoXLeft + dScrollLeft;\n      toScrollLeft = Math.min(toScrollLeftUpperBound, toScrollLeft);\n      toScrollLeft = Math.max(toScrollLeft, 0);\n      const {\n        value: container\n      } = mergedContainerRef;\n      if (container) {\n        container.scrollLeft = toScrollLeft * ((rtlEnabledRef === null || rtlEnabledRef === void 0 ? void 0 : rtlEnabledRef.value) ? -1 : 1);\n        const {\n          internalOnUpdateScrollLeft\n        } = props;\n        if (internalOnUpdateScrollLeft) internalOnUpdateScrollLeft(toScrollLeft);\n      }\n    }\n    function handleXScrollMouseUp(e) {\n      e.preventDefault();\n      e.stopPropagation();\n      off('mousemove', window, handleXScrollMouseMove, true);\n      off('mouseup', window, handleXScrollMouseUp, true);\n      xBarPressed = false;\n      sync();\n      if (isMouseUpAway(e)) {\n        hideBar();\n      }\n    }\n    function handleYScrollMouseDown(e) {\n      e.preventDefault();\n      e.stopPropagation();\n      yBarPressed = true;\n      on('mousemove', window, handleYScrollMouseMove, true);\n      on('mouseup', window, handleYScrollMouseUp, true);\n      memoYTop = containerScrollTopRef.value;\n      memoMouseY = e.clientY;\n    }\n    function handleYScrollMouseMove(e) {\n      if (!yBarPressed) return;\n      if (xBarVanishTimerId !== undefined) {\n        window.clearTimeout(xBarVanishTimerId);\n      }\n      if (yBarVanishTimerId !== undefined) {\n        window.clearTimeout(yBarVanishTimerId);\n      }\n      const {\n        value: containerHeight\n      } = containerHeightRef;\n      const {\n        value: contentHeight\n      } = contentHeightRef;\n      const {\n        value: yBarSize\n      } = yBarSizeRef;\n      if (containerHeight === null || contentHeight === null) return;\n      const dY = e.clientY - memoMouseY;\n      const dScrollTop = dY * (contentHeight - containerHeight) / (containerHeight - yBarSize);\n      const toScrollTopUpperBound = contentHeight - containerHeight;\n      let toScrollTop = memoYTop + dScrollTop;\n      toScrollTop = Math.min(toScrollTopUpperBound, toScrollTop);\n      toScrollTop = Math.max(toScrollTop, 0);\n      const {\n        value: container\n      } = mergedContainerRef;\n      if (container) {\n        container.scrollTop = toScrollTop;\n      }\n    }\n    function handleYScrollMouseUp(e) {\n      e.preventDefault();\n      e.stopPropagation();\n      off('mousemove', window, handleYScrollMouseMove, true);\n      off('mouseup', window, handleYScrollMouseUp, true);\n      yBarPressed = false;\n      sync();\n      if (isMouseUpAway(e)) {\n        hideBar();\n      }\n    }\n    watchEffect(() => {\n      const {\n        value: needXBar\n      } = needXBarRef;\n      const {\n        value: needYBar\n      } = needYBarRef;\n      const {\n        value: mergedClsPrefix\n      } = mergedClsPrefixRef;\n      const {\n        value: xRailEl\n      } = xRailRef;\n      const {\n        value: yRailEl\n      } = yRailRef;\n      if (xRailEl) {\n        if (!needXBar) {\n          xRailEl.classList.add(`${mergedClsPrefix}-scrollbar-rail--disabled`);\n        } else {\n          xRailEl.classList.remove(`${mergedClsPrefix}-scrollbar-rail--disabled`);\n        }\n      }\n      if (yRailEl) {\n        if (!needYBar) {\n          yRailEl.classList.add(`${mergedClsPrefix}-scrollbar-rail--disabled`);\n        } else {\n          yRailEl.classList.remove(`${mergedClsPrefix}-scrollbar-rail--disabled`);\n        }\n      }\n    });\n    onMounted(() => {\n      // if container exist, it always can't be resolved when scrollbar is mounted\n      // for example:\n      // - component\n      //   - scrollbar\n      //     - inner\n      // if you pass inner to scrollbar, you may use a ref inside component\n      // however, when scrollbar is mounted, ref is not ready at component\n      // you need to init by yourself\n      if (props.container) return;\n      sync();\n    });\n    onBeforeUnmount(() => {\n      if (xBarVanishTimerId !== undefined) {\n        window.clearTimeout(xBarVanishTimerId);\n      }\n      if (yBarVanishTimerId !== undefined) {\n        window.clearTimeout(yBarVanishTimerId);\n      }\n      off('mousemove', window, handleYScrollMouseMove, true);\n      off('mouseup', window, handleYScrollMouseUp, true);\n    });\n    const cssVarsRef = computed(() => {\n      const {\n        common: {\n          cubicBezierEaseInOut\n        },\n        self: {\n          color,\n          colorHover,\n          height,\n          width,\n          borderRadius,\n          railInsetHorizontalTop,\n          railInsetHorizontalBottom,\n          railInsetVerticalRight,\n          railInsetVerticalLeft,\n          railColor\n        }\n      } = themeRef.value;\n      const {\n        top: railTopHorizontalTop,\n        right: railRightHorizontalTop,\n        bottom: railBottomHorizontalTop,\n        left: railLeftHorizontalTop\n      } = getPadding(railInsetHorizontalTop);\n      const {\n        top: railTopHorizontalBottom,\n        right: railRightHorizontalBottom,\n        bottom: railBottomHorizontalBottom,\n        left: railLeftHorizontalBottom\n      } = getPadding(railInsetHorizontalBottom);\n      const {\n        top: railTopVerticalRight,\n        right: railRightVerticalRight,\n        bottom: railBottomVerticalRight,\n        left: railLeftVerticalRight\n      } = getPadding((rtlEnabledRef === null || rtlEnabledRef === void 0 ? void 0 : rtlEnabledRef.value) ? rtlInset(railInsetVerticalRight) : railInsetVerticalRight);\n      const {\n        top: railTopVerticalLeft,\n        right: railRightVerticalLeft,\n        bottom: railBottomVerticalLeft,\n        left: railLeftVerticalLeft\n      } = getPadding((rtlEnabledRef === null || rtlEnabledRef === void 0 ? void 0 : rtlEnabledRef.value) ? rtlInset(railInsetVerticalLeft) : railInsetVerticalLeft);\n      return {\n        '--n-scrollbar-bezier': cubicBezierEaseInOut,\n        '--n-scrollbar-color': color,\n        '--n-scrollbar-color-hover': colorHover,\n        '--n-scrollbar-border-radius': borderRadius,\n        '--n-scrollbar-width': width,\n        '--n-scrollbar-height': height,\n        '--n-scrollbar-rail-top-horizontal-top': railTopHorizontalTop,\n        '--n-scrollbar-rail-right-horizontal-top': railRightHorizontalTop,\n        '--n-scrollbar-rail-bottom-horizontal-top': railBottomHorizontalTop,\n        '--n-scrollbar-rail-left-horizontal-top': railLeftHorizontalTop,\n        '--n-scrollbar-rail-top-horizontal-bottom': railTopHorizontalBottom,\n        '--n-scrollbar-rail-right-horizontal-bottom': railRightHorizontalBottom,\n        '--n-scrollbar-rail-bottom-horizontal-bottom': railBottomHorizontalBottom,\n        '--n-scrollbar-rail-left-horizontal-bottom': railLeftHorizontalBottom,\n        '--n-scrollbar-rail-top-vertical-right': railTopVerticalRight,\n        '--n-scrollbar-rail-right-vertical-right': railRightVerticalRight,\n        '--n-scrollbar-rail-bottom-vertical-right': railBottomVerticalRight,\n        '--n-scrollbar-rail-left-vertical-right': railLeftVerticalRight,\n        '--n-scrollbar-rail-top-vertical-left': railTopVerticalLeft,\n        '--n-scrollbar-rail-right-vertical-left': railRightVerticalLeft,\n        '--n-scrollbar-rail-bottom-vertical-left': railBottomVerticalLeft,\n        '--n-scrollbar-rail-left-vertical-left': railLeftVerticalLeft,\n        '--n-scrollbar-rail-color': railColor\n      };\n    });\n    const themeClassHandle = inlineThemeDisabled ? useThemeClass('scrollbar', undefined, cssVarsRef, props) : undefined;\n    const exposedMethods = {\n      scrollTo,\n      scrollBy,\n      sync,\n      syncUnifiedContainer,\n      handleMouseEnterWrapper,\n      handleMouseLeaveWrapper\n    };\n    return Object.assign(Object.assign({}, exposedMethods), {\n      mergedClsPrefix: mergedClsPrefixRef,\n      rtlEnabled: rtlEnabledRef,\n      containerScrollTop: containerScrollTopRef,\n      wrapperRef,\n      containerRef,\n      contentRef,\n      yRailRef,\n      xRailRef,\n      needYBar: needYBarRef,\n      needXBar: needXBarRef,\n      yBarSizePx: yBarSizePxRef,\n      xBarSizePx: xBarSizePxRef,\n      yBarTopPx: yBarTopPxRef,\n      xBarLeftPx: xBarLeftPxRef,\n      isShowXBar: mergedShowXBarRef,\n      isShowYBar: mergedShowYBarRef,\n      isIos,\n      handleScroll,\n      handleContentResize,\n      handleContainerResize,\n      handleYScrollMouseDown,\n      handleXScrollMouseDown,\n      cssVars: inlineThemeDisabled ? undefined : cssVarsRef,\n      themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,\n      onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender\n    });\n  },\n  render() {\n    var _a;\n    const {\n      $slots,\n      mergedClsPrefix,\n      triggerDisplayManually,\n      rtlEnabled,\n      internalHoistYRail,\n      yPlacement,\n      xPlacement,\n      xScrollable\n    } = this;\n    if (!this.scrollable) return (_a = $slots.default) === null || _a === void 0 ? void 0 : _a.call($slots);\n    const triggerIsNone = this.trigger === 'none';\n    const createYRail = (className, style) => {\n      return h(\"div\", {\n        ref: \"yRailRef\",\n        class: [`${mergedClsPrefix}-scrollbar-rail`, `${mergedClsPrefix}-scrollbar-rail--vertical`, `${mergedClsPrefix}-scrollbar-rail--vertical--${yPlacement}`, className],\n        \"data-scrollbar-rail\": true,\n        style: [style || '', this.verticalRailStyle],\n        \"aria-hidden\": true\n      }, h(triggerIsNone ? Wrapper : Transition, triggerIsNone ? null : {\n        name: 'fade-in-transition'\n      }, {\n        default: () => this.needYBar && this.isShowYBar && !this.isIos ? h(\"div\", {\n          class: `${mergedClsPrefix}-scrollbar-rail__scrollbar`,\n          style: {\n            height: this.yBarSizePx,\n            top: this.yBarTopPx\n          },\n          onMousedown: this.handleYScrollMouseDown\n        }) : null\n      }));\n    };\n    const createChildren = () => {\n      var _a, _b;\n      (_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this);\n      return h('div', mergeProps(this.$attrs, {\n        role: 'none',\n        ref: 'wrapperRef',\n        class: [`${mergedClsPrefix}-scrollbar`, this.themeClass, rtlEnabled && `${mergedClsPrefix}-scrollbar--rtl`],\n        style: this.cssVars,\n        onMouseenter: triggerDisplayManually ? undefined : this.handleMouseEnterWrapper,\n        onMouseleave: triggerDisplayManually ? undefined : this.handleMouseLeaveWrapper\n      }), [this.container ? (_b = $slots.default) === null || _b === void 0 ? void 0 : _b.call($slots) : h(\"div\", {\n        role: \"none\",\n        ref: \"containerRef\",\n        class: [`${mergedClsPrefix}-scrollbar-container`, this.containerClass],\n        style: this.containerStyle,\n        onScroll: this.handleScroll,\n        onWheel: this.onWheel\n      }, h(VResizeObserver, {\n        onResize: this.handleContentResize\n      }, {\n        default: () => h(\"div\", {\n          ref: \"contentRef\",\n          role: \"none\",\n          style: [{\n            width: this.xScrollable ? 'fit-content' : null\n          }, this.contentStyle],\n          class: [`${mergedClsPrefix}-scrollbar-content`, this.contentClass]\n        }, $slots)\n      })), internalHoistYRail ? null : createYRail(undefined, undefined), xScrollable && h(\"div\", {\n        ref: \"xRailRef\",\n        class: [`${mergedClsPrefix}-scrollbar-rail`, `${mergedClsPrefix}-scrollbar-rail--horizontal`, `${mergedClsPrefix}-scrollbar-rail--horizontal--${xPlacement}`],\n        style: this.horizontalRailStyle,\n        \"data-scrollbar-rail\": true,\n        \"aria-hidden\": true\n      }, h(triggerIsNone ? Wrapper : Transition, triggerIsNone ? null : {\n        name: 'fade-in-transition'\n      }, {\n        default: () => this.needXBar && this.isShowXBar && !this.isIos ? h(\"div\", {\n          class: `${mergedClsPrefix}-scrollbar-rail__scrollbar`,\n          style: {\n            width: this.xBarSizePx,\n            right: rtlEnabled ? this.xBarLeftPx : undefined,\n            left: rtlEnabled ? undefined : this.xBarLeftPx\n          },\n          onMousedown: this.handleXScrollMouseDown\n        }) : null\n      }))]);\n    };\n    const scrollbarNode = this.container ? createChildren() : h(VResizeObserver, {\n      onResize: this.handleContainerResize\n    }, {\n      default: createChildren\n    });\n    if (internalHoistYRail) {\n      return h(Fragment, null, scrollbarNode, createYRail(this.themeClass, this.cssVars));\n    } else {\n      return scrollbarNode;\n    }\n  }\n});\nexport default Scrollbar;\nexport const XScrollbar = Scrollbar;","export function toArray(arg) {\n    if (Array.isArray(arg))\n        return arg;\n    return [arg];\n}\n// Do not use enum for lint plugin has error\nexport const TRAVERSE_COMMAND = {\n    STOP: 'STOP'\n};\nexport function traverseWithCb(treeNode, callback) {\n    const command = callback(treeNode);\n    if (treeNode.children !== undefined && command !== TRAVERSE_COMMAND.STOP) {\n        treeNode.children.forEach((childNode) => traverseWithCb(childNode, callback));\n    }\n}\nexport function getNonLeafKeys(treeNodes, options = {}) {\n    const { preserveGroup = false } = options;\n    const keys = [];\n    const cb = preserveGroup\n        ? (node) => {\n            if (!node.isLeaf) {\n                keys.push(node.key);\n                traverse(node.children);\n            }\n        }\n        : (node) => {\n            if (!node.isLeaf) {\n                if (!node.isGroup)\n                    keys.push(node.key);\n                traverse(node.children);\n            }\n        };\n    function traverse(nodes) {\n        nodes.forEach(cb);\n    }\n    traverse(treeNodes);\n    return keys;\n}\nexport function isLeaf(rawNode, getChildren) {\n    const { isLeaf } = rawNode;\n    if (isLeaf !== undefined)\n        return isLeaf;\n    else if (!getChildren(rawNode))\n        return true;\n    return false;\n}\nexport function defaultGetChildren(node) {\n    return node.children;\n}\nexport function defaultGetKey(node) {\n    return node.key;\n}\nexport function isIgnored() {\n    return false;\n}\nexport function isShallowLoaded(rawNode, getChildren) {\n    const { isLeaf } = rawNode;\n    if (isLeaf === false && !Array.isArray(getChildren(rawNode)))\n        return false;\n    return true;\n}\nexport function isDisabled(rawNode) {\n    return rawNode.disabled === true;\n}\nexport function isExpilicitlyNotLoaded(rawNode, getChildren) {\n    return (rawNode.isLeaf === false && !Array.isArray(getChildren(rawNode)));\n}\nexport function isNodeInvalid(rawNode, getChildren) {\n    if (rawNode.isLeaf === true) {\n        const children = getChildren(rawNode);\n        if (Array.isArray(children) && children.length > 0)\n            return true;\n    }\n    return false;\n}\nexport function unwrapCheckedKeys(result) {\n    var _a;\n    if (result === undefined || result === null)\n        return [];\n    if (Array.isArray(result))\n        return result;\n    return (_a = result.checkedKeys) !== null && _a !== void 0 ? _a : [];\n}\nexport function unwrapIndeterminateKeys(result) {\n    var _a;\n    if (result === undefined || result === null || Array.isArray(result)) {\n        return [];\n    }\n    return (_a = result.indeterminateKeys) !== null && _a !== void 0 ? _a : [];\n}\nexport function merge(originalKeys, keysToAdd) {\n    const set = new Set(originalKeys);\n    keysToAdd.forEach((key) => {\n        if (!set.has(key)) {\n            set.add(key);\n        }\n    });\n    return Array.from(set);\n}\nexport function minus(originalKeys, keysToRemove) {\n    const set = new Set(originalKeys);\n    keysToRemove.forEach((key) => {\n        if (set.has(key)) {\n            set.delete(key);\n        }\n    });\n    return Array.from(set);\n}\nexport function isGroup(rawNode) {\n    return (rawNode === null || rawNode === void 0 ? void 0 : rawNode.type) === 'group';\n}\nexport function createIndexGetter(treeNodes) {\n    const map = new Map();\n    treeNodes.forEach((treeNode, i) => {\n        map.set(treeNode.key, i);\n    });\n    return (key) => { var _a; return (_a = map.get(key)) !== null && _a !== void 0 ? _a : null; };\n}\n","import { isExpilicitlyNotLoaded, merge, minus, traverseWithCb, TRAVERSE_COMMAND } from './utils';\nexport class SubtreeNotLoadedError extends Error {\n    constructor() {\n        super();\n        this.message =\n            'SubtreeNotLoadedError: checking a subtree whose required nodes are not fully loaded.';\n    }\n}\nfunction getExtendedCheckedKeySetAfterCheck(checkKeys, currentCheckedKeys, treeMate, allowNotLoaded) {\n    return getExtendedCheckedKeySet(currentCheckedKeys.concat(checkKeys), treeMate, allowNotLoaded, false);\n}\nfunction getAvailableAscendantNodeSet(uncheckedKeys, treeMate) {\n    const visitedKeys = new Set();\n    uncheckedKeys.forEach((uncheckedKey) => {\n        const uncheckedTreeNode = treeMate.treeNodeMap.get(uncheckedKey);\n        if (uncheckedTreeNode !== undefined) {\n            let nodeCursor = uncheckedTreeNode.parent;\n            while (nodeCursor !== null) {\n                if (nodeCursor.disabled)\n                    break;\n                if (visitedKeys.has(nodeCursor.key))\n                    break;\n                else {\n                    visitedKeys.add(nodeCursor.key);\n                }\n                nodeCursor = nodeCursor.parent;\n            }\n        }\n    });\n    return visitedKeys;\n}\nfunction getExtendedCheckedKeySetAfterUncheck(uncheckedKeys, currentCheckedKeys, treeMate, allowNotLoaded) {\n    const extendedCheckedKeySet = getExtendedCheckedKeySet(currentCheckedKeys, treeMate, allowNotLoaded, false);\n    const extendedKeySetToUncheck = getExtendedCheckedKeySet(uncheckedKeys, treeMate, allowNotLoaded, true);\n    const ascendantKeySet = getAvailableAscendantNodeSet(uncheckedKeys, treeMate);\n    const keysToRemove = [];\n    extendedCheckedKeySet.forEach((key) => {\n        if (extendedKeySetToUncheck.has(key) || ascendantKeySet.has(key)) {\n            keysToRemove.push(key);\n        }\n    });\n    keysToRemove.forEach((key) => extendedCheckedKeySet.delete(key));\n    return extendedCheckedKeySet;\n}\nexport function getCheckedKeys(options, treeMate) {\n    const { checkedKeys, keysToCheck, keysToUncheck, indeterminateKeys, cascade, leafOnly, checkStrategy, allowNotLoaded } = options;\n    if (!cascade) {\n        if (keysToCheck !== undefined) {\n            return {\n                checkedKeys: merge(checkedKeys, keysToCheck),\n                indeterminateKeys: Array.from(indeterminateKeys)\n            };\n        }\n        else if (keysToUncheck !== undefined) {\n            return {\n                checkedKeys: minus(checkedKeys, keysToUncheck),\n                indeterminateKeys: Array.from(indeterminateKeys)\n            };\n        }\n        else {\n            return {\n                checkedKeys: Array.from(checkedKeys),\n                indeterminateKeys: Array.from(indeterminateKeys)\n            };\n        }\n    }\n    const { levelTreeNodeMap } = treeMate;\n    let extendedCheckedKeySet;\n    if (keysToUncheck !== undefined) {\n        extendedCheckedKeySet = getExtendedCheckedKeySetAfterUncheck(keysToUncheck, checkedKeys, treeMate, allowNotLoaded);\n    }\n    else if (keysToCheck !== undefined) {\n        extendedCheckedKeySet = getExtendedCheckedKeySetAfterCheck(keysToCheck, checkedKeys, treeMate, allowNotLoaded);\n    }\n    else {\n        extendedCheckedKeySet = getExtendedCheckedKeySet(checkedKeys, treeMate, allowNotLoaded, false);\n    }\n    const checkStrategyIsParent = checkStrategy === 'parent';\n    const checkStrategyIsChild = checkStrategy === 'child' || leafOnly;\n    const syntheticCheckedKeySet = extendedCheckedKeySet;\n    const syntheticIndeterminateKeySet = new Set();\n    const maxLevel = Math.max.apply(null, Array.from(levelTreeNodeMap.keys()));\n    // cascade check\n    // 1. if tree is fully loaded, it just works\n    // 2. if the tree is not fully loaded, we assume that keys which is in not\n    //    loaded tree are not in checked keys\n    //    for example:\n    //    a -- b(fully-loaded)   -- c(fully-loaded)\n    //      |- d(partial-loaded) -- ?e(not-loaded)\n    //    in the case, `e` is assumed not to be checked, nor we can't calc `d`'s\n    //    and `a`'s status\n    for (let level = maxLevel; level >= 0; level -= 1) {\n        const levelIsZero = level === 0;\n        // it should exists, nor it is a bug\n        const levelTreeNodes = levelTreeNodeMap.get(level);\n        for (const levelTreeNode of levelTreeNodes) {\n            if (levelTreeNode.isLeaf)\n                continue;\n            const { key: levelTreeNodeKey, shallowLoaded } = levelTreeNode;\n            if (checkStrategyIsChild && shallowLoaded) {\n                // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n                levelTreeNode.children.forEach((v) => {\n                    if (!v.disabled &&\n                        !v.isLeaf &&\n                        v.shallowLoaded &&\n                        syntheticCheckedKeySet.has(v.key)) {\n                        syntheticCheckedKeySet.delete(v.key);\n                    }\n                });\n            }\n            if (levelTreeNode.disabled || !shallowLoaded) {\n                continue;\n            }\n            let fullyChecked = true;\n            let partialChecked = false;\n            let allDisabled = true;\n            // it is shallow loaded, so `children` must exist\n            for (const childNode of levelTreeNode.children) {\n                const childKey = childNode.key;\n                if (childNode.disabled)\n                    continue;\n                if (allDisabled)\n                    allDisabled = false;\n                if (syntheticCheckedKeySet.has(childKey)) {\n                    partialChecked = true;\n                }\n                else if (syntheticIndeterminateKeySet.has(childKey)) {\n                    partialChecked = true;\n                    fullyChecked = false;\n                    break;\n                }\n                else {\n                    fullyChecked = false;\n                    if (partialChecked) {\n                        break;\n                    }\n                }\n            }\n            if (fullyChecked && !allDisabled) {\n                if (checkStrategyIsParent) {\n                    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n                    levelTreeNode.children.forEach((v) => {\n                        if (!v.disabled && syntheticCheckedKeySet.has(v.key)) {\n                            syntheticCheckedKeySet.delete(v.key);\n                        }\n                    });\n                }\n                syntheticCheckedKeySet.add(levelTreeNodeKey);\n            }\n            else if (partialChecked) {\n                syntheticIndeterminateKeySet.add(levelTreeNodeKey);\n            }\n            if (levelIsZero &&\n                checkStrategyIsChild &&\n                syntheticCheckedKeySet.has(levelTreeNodeKey)) {\n                syntheticCheckedKeySet.delete(levelTreeNodeKey);\n            }\n        }\n    }\n    return {\n        checkedKeys: Array.from(syntheticCheckedKeySet),\n        indeterminateKeys: Array.from(syntheticIndeterminateKeySet)\n    };\n}\n// unchecking is safe when doing cascade uncheck in async mode\nexport function getExtendedCheckedKeySet(checkedKeys, treeMate, allowNotLoaded, isUnchecking) {\n    const { treeNodeMap, getChildren } = treeMate;\n    const visitedKeySet = new Set();\n    const extendedKeySet = new Set(checkedKeys);\n    checkedKeys.forEach((checkedKey) => {\n        const checkedTreeNode = treeNodeMap.get(checkedKey);\n        if (checkedTreeNode !== undefined) {\n            traverseWithCb(checkedTreeNode, (treeNode) => {\n                if (treeNode.disabled) {\n                    return TRAVERSE_COMMAND.STOP;\n                }\n                const { key } = treeNode;\n                if (visitedKeySet.has(key))\n                    return;\n                visitedKeySet.add(key);\n                // Adding keys before loaded check is okay, since if not valid error\n                // would be thrown\n                extendedKeySet.add(key);\n                if (isExpilicitlyNotLoaded(treeNode.rawNode, getChildren)) {\n                    if (isUnchecking) {\n                        return TRAVERSE_COMMAND.STOP;\n                    }\n                    else if (!allowNotLoaded) {\n                        throw new SubtreeNotLoadedError();\n                    }\n                }\n            });\n        }\n    });\n    return extendedKeySet;\n}\n","export function getPath(key, { includeGroup = false, includeSelf = true }, treeMate) {\n    var _a;\n    const treeNodeMap = treeMate.treeNodeMap;\n    let treeNode = key === null || key === undefined ? null : (_a = treeNodeMap.get(key)) !== null && _a !== void 0 ? _a : null;\n    const mergedPath = {\n        keyPath: [],\n        treeNodePath: [],\n        treeNode: treeNode\n    };\n    if (treeNode === null || treeNode === void 0 ? void 0 : treeNode.ignored) {\n        mergedPath.treeNode = null;\n        return mergedPath;\n    }\n    while (treeNode) {\n        if (!treeNode.ignored && (includeGroup || !treeNode.isGroup)) {\n            mergedPath.treeNodePath.push(treeNode);\n        }\n        treeNode = treeNode.parent;\n    }\n    mergedPath.treeNodePath.reverse();\n    if (!includeSelf)\n        mergedPath.treeNodePath.pop();\n    mergedPath.keyPath = mergedPath.treeNodePath.map((treeNode) => treeNode.key);\n    return mergedPath;\n}\n","export function getFirstAvailableNode(nodes) {\n    if (nodes.length === 0)\n        return null;\n    const node = nodes[0];\n    if (node.isGroup || node.ignored || node.disabled) {\n        return node.getNext();\n    }\n    return node;\n}\nfunction rawGetNext(node, loop) {\n    const sibs = node.siblings;\n    const l = sibs.length;\n    const { index } = node;\n    if (loop) {\n        return sibs[(index + 1) % l];\n    }\n    else {\n        if (index === sibs.length - 1)\n            return null;\n        return sibs[index + 1];\n    }\n}\nfunction move(fromNode, dir, { loop = false, includeDisabled = false } = {}) {\n    const iterate = dir === 'prev' ? rawGetPrev : rawGetNext;\n    const getChildOptions = {\n        reverse: dir === 'prev'\n    };\n    let meet = false;\n    let endNode = null;\n    function traverse(node) {\n        if (node === null)\n            return;\n        if (node === fromNode) {\n            if (!meet) {\n                meet = true;\n            }\n            else if (!fromNode.disabled && !fromNode.isGroup) {\n                endNode = fromNode;\n                return;\n            }\n        }\n        else {\n            if ((!node.disabled || includeDisabled) &&\n                !node.ignored &&\n                !node.isGroup) {\n                endNode = node;\n                return;\n            }\n        }\n        if (node.isGroup) {\n            const child = getChild(node, getChildOptions);\n            if (child !== null) {\n                endNode = child;\n            }\n            else {\n                traverse(iterate(node, loop));\n            }\n        }\n        else {\n            const nextNode = iterate(node, false);\n            if (nextNode !== null) {\n                traverse(nextNode);\n            }\n            else {\n                const parent = rawGetParent(node);\n                if (parent === null || parent === void 0 ? void 0 : parent.isGroup) {\n                    traverse(iterate(parent, loop));\n                }\n                else if (loop) {\n                    traverse(iterate(node, true));\n                }\n            }\n        }\n    }\n    traverse(fromNode);\n    return endNode;\n}\nfunction rawGetPrev(node, loop) {\n    const sibs = node.siblings;\n    const l = sibs.length;\n    const { index } = node;\n    if (loop) {\n        return sibs[(index - 1 + l) % l];\n    }\n    else {\n        if (index === 0)\n            return null;\n        return sibs[index - 1];\n    }\n}\nfunction rawGetParent(node) {\n    return node.parent;\n}\nfunction getChild(node, options = {}) {\n    const { reverse = false } = options;\n    const { children } = node;\n    if (children) {\n        const { length } = children;\n        const start = reverse ? length - 1 : 0;\n        const end = reverse ? -1 : length;\n        const delta = reverse ? -1 : 1;\n        for (let i = start; i !== end; i += delta) {\n            const child = children[i];\n            if (!child.disabled && !child.ignored) {\n                if (child.isGroup) {\n                    const childInGroup = getChild(child, options);\n                    if (childInGroup !== null)\n                        return childInGroup;\n                }\n                else {\n                    return child;\n                }\n            }\n        }\n    }\n    return null;\n}\nexport const moveMethods = {\n    getChild() {\n        if (this.ignored)\n            return null;\n        return getChild(this);\n    },\n    getParent() {\n        const { parent } = this;\n        if (parent === null || parent === void 0 ? void 0 : parent.isGroup) {\n            return parent.getParent();\n        }\n        return parent;\n    },\n    getNext(options = {}) {\n        return move(this, 'next', options);\n    },\n    getPrev(options = {}) {\n        return move(this, 'prev', options);\n    }\n};\n","export function flatten(treeNodes, expandedKeys) {\n    const expandedKeySet = expandedKeys ? new Set(expandedKeys) : undefined;\n    const flattenedNodes = [];\n    function traverse(treeNodes) {\n        treeNodes.forEach((treeNode) => {\n            flattenedNodes.push(treeNode);\n            if (treeNode.isLeaf || !treeNode.children || treeNode.ignored)\n                return;\n            if (treeNode.isGroup) {\n                // group node shouldn't be expanded\n                traverse(treeNode.children);\n            }\n            else if (\n            // normal non-leaf node\n            expandedKeySet === undefined ||\n                expandedKeySet.has(treeNode.key)) {\n                traverse(treeNode.children);\n            }\n        });\n    }\n    traverse(treeNodes);\n    return flattenedNodes;\n}\n","export function contains(parent, child) {\n    const parentKey = parent.key;\n    // eslint-disable-next-line no-unmodified-loop-condition\n    while (child) {\n        if (child.key === parentKey)\n            return true;\n        child = child.parent;\n    }\n    return false;\n}\n","import { getCheckedKeys } from './check';\nimport { toArray, isDisabled, isLeaf, isGroup, isNodeInvalid, unwrapCheckedKeys, isShallowLoaded, unwrapIndeterminateKeys, getNonLeafKeys, isIgnored, defaultGetChildren, defaultGetKey } from './utils';\nimport { getPath } from './path';\nimport { moveMethods, getFirstAvailableNode } from './move';\nimport { flatten } from './flatten';\nimport { contains } from './contains';\nfunction createTreeNodes(rawNodes, treeNodeMap, levelTreeNodeMap, nodeProto, getChildren, parent = null, level = 0) {\n    const treeNodes = [];\n    rawNodes.forEach((rawNode, index) => {\n        var _a;\n        if (process.env.NODE_ENV !== 'production' &&\n            isNodeInvalid(rawNode, getChildren)) {\n            console.error('[treemate]: node', rawNode, 'is invalid');\n        }\n        const treeNode = Object.create(nodeProto);\n        treeNode.rawNode = rawNode;\n        treeNode.siblings = treeNodes;\n        treeNode.level = level;\n        treeNode.index = index;\n        treeNode.isFirstChild = index === 0;\n        treeNode.isLastChild = index + 1 === rawNodes.length;\n        treeNode.parent = parent;\n        if (!treeNode.ignored) {\n            const rawChildren = getChildren(rawNode);\n            if (Array.isArray(rawChildren)) {\n                treeNode.children = createTreeNodes(rawChildren, treeNodeMap, levelTreeNodeMap, nodeProto, getChildren, treeNode, level + 1);\n            }\n        }\n        treeNodes.push(treeNode);\n        treeNodeMap.set(treeNode.key, treeNode);\n        if (!levelTreeNodeMap.has(level))\n            levelTreeNodeMap.set(level, []);\n        (_a = levelTreeNodeMap.get(level)) === null || _a === void 0 ? void 0 : _a.push(treeNode);\n    });\n    return treeNodes;\n}\nexport function createTreeMate(rawNodes, options = {}) {\n    var _a;\n    const treeNodeMap = new Map();\n    const levelTreeNodeMap = new Map();\n    const { getDisabled = isDisabled, getIgnored = isIgnored, getIsGroup = isGroup, getKey = defaultGetKey } = options;\n    const _getChildren = (_a = options.getChildren) !== null && _a !== void 0 ? _a : defaultGetChildren;\n    const getChildren = options.ignoreEmptyChildren\n        ? (node) => {\n            const children = _getChildren(node);\n            if (Array.isArray(children)) {\n                if (!children.length)\n                    return null;\n                return children;\n            }\n            return children;\n        }\n        : _getChildren;\n    const nodeProto = Object.assign({\n        get key() {\n            // do not pass parent or related things to it\n            // the key need to be specified explicitly\n            return getKey(this.rawNode);\n        },\n        get disabled() {\n            return getDisabled(this.rawNode);\n        },\n        get isGroup() {\n            return getIsGroup(this.rawNode);\n        },\n        get isLeaf() {\n            return isLeaf(this.rawNode, getChildren);\n        },\n        get shallowLoaded() {\n            return isShallowLoaded(this.rawNode, getChildren);\n        },\n        get ignored() {\n            return getIgnored(this.rawNode);\n        },\n        contains(node) {\n            return contains(this, node);\n        }\n    }, moveMethods);\n    const treeNodes = createTreeNodes(rawNodes, treeNodeMap, levelTreeNodeMap, nodeProto, getChildren);\n    function getNode(key) {\n        if (key === null || key === undefined)\n            return null;\n        const tmNode = treeNodeMap.get(key);\n        if (tmNode && !tmNode.isGroup && !tmNode.ignored) {\n            return tmNode;\n        }\n        return null;\n    }\n    function _getNode(key) {\n        if (key === null || key === undefined)\n            return null;\n        const tmNode = treeNodeMap.get(key);\n        if (tmNode && !tmNode.ignored) {\n            return tmNode;\n        }\n        return null;\n    }\n    function getPrev(key, options) {\n        const node = _getNode(key);\n        if (!node)\n            return null;\n        return node.getPrev(options);\n    }\n    function getNext(key, options) {\n        const node = _getNode(key);\n        if (!node)\n            return null;\n        return node.getNext(options);\n    }\n    function getParent(key) {\n        const node = _getNode(key);\n        if (!node)\n            return null;\n        return node.getParent();\n    }\n    function getChild(key) {\n        const node = _getNode(key);\n        if (!node)\n            return null;\n        return node.getChild();\n    }\n    const treemate = {\n        treeNodes,\n        treeNodeMap,\n        levelTreeNodeMap,\n        maxLevel: Math.max(...levelTreeNodeMap.keys()),\n        getChildren,\n        getFlattenedNodes(expandedKeys) {\n            return flatten(treeNodes, expandedKeys);\n        },\n        getNode,\n        getPrev,\n        getNext,\n        getParent,\n        getChild,\n        getFirstAvailableNode() {\n            return getFirstAvailableNode(treeNodes);\n        },\n        getPath(key, options = {}) {\n            return getPath(key, options, treemate);\n        },\n        getCheckedKeys(checkedKeys, options = {}) {\n            const { cascade = true, leafOnly = false, checkStrategy = 'all', allowNotLoaded = false } = options;\n            return getCheckedKeys({\n                checkedKeys: unwrapCheckedKeys(checkedKeys),\n                indeterminateKeys: unwrapIndeterminateKeys(checkedKeys),\n                cascade,\n                leafOnly,\n                checkStrategy,\n                allowNotLoaded\n            }, treemate);\n        },\n        check(keysToCheck, checkedKeys, options = {}) {\n            const { cascade = true, leafOnly = false, checkStrategy = 'all', allowNotLoaded = false } = options;\n            return getCheckedKeys({\n                checkedKeys: unwrapCheckedKeys(checkedKeys),\n                indeterminateKeys: unwrapIndeterminateKeys(checkedKeys),\n                keysToCheck: keysToCheck === undefined || keysToCheck === null\n                    ? []\n                    : toArray(keysToCheck),\n                cascade,\n                leafOnly,\n                checkStrategy,\n                allowNotLoaded\n            }, treemate);\n        },\n        uncheck(keysToUncheck, checkedKeys, options = {}) {\n            const { cascade = true, leafOnly = false, checkStrategy = 'all', allowNotLoaded = false } = options;\n            return getCheckedKeys({\n                checkedKeys: unwrapCheckedKeys(checkedKeys),\n                indeterminateKeys: unwrapIndeterminateKeys(checkedKeys),\n                keysToUncheck: keysToUncheck === null || keysToUncheck === undefined\n                    ? []\n                    : toArray(keysToUncheck),\n                cascade,\n                leafOnly,\n                checkStrategy,\n                allowNotLoaded\n            }, treemate);\n        },\n        getNonLeafKeys(options = {}) {\n            return getNonLeafKeys(treeNodes, options);\n        }\n    };\n    return treemate;\n}\n","export default {\n  iconSizeTiny: '28px',\n  iconSizeSmall: '34px',\n  iconSizeMedium: '40px',\n  iconSizeLarge: '46px',\n  iconSizeHuge: '52px'\n};","import { commonLight } from \"../../_styles/common/index.mjs\";\nimport commonVars from \"./_common.mjs\";\nexport function self(vars) {\n  const {\n    textColorDisabled,\n    iconColor,\n    textColor2,\n    fontSizeTiny,\n    fontSizeSmall,\n    fontSizeMedium,\n    fontSizeLarge,\n    fontSizeHuge\n  } = vars;\n  return Object.assign(Object.assign({}, commonVars), {\n    fontSizeTiny,\n    fontSizeSmall,\n    fontSizeMedium,\n    fontSizeLarge,\n    fontSizeHuge,\n    textColor: textColorDisabled,\n    iconColor,\n    extraTextColor: textColor2\n  });\n}\nconst emptyLight = {\n  name: 'Empty',\n  common: commonLight,\n  self\n};\nexport default emptyLight;","import { commonDark } from \"../../_styles/common/index.mjs\";\nimport { self } from \"./light.mjs\";\nconst emptyDark = {\n  name: 'Empty',\n  common: commonDark,\n  self\n};\nexport default emptyDark;","import { c, cB, cE } from \"../../../_utils/cssr/index.mjs\";\n// vars:\n// --n-font-size\n// --n-icon-size\n// --n-icon-color\n// --n-bezier\n// --n-text-color\n// --n-extra-text-color\nexport default cB('empty', `\n display: flex;\n flex-direction: column;\n align-items: center;\n font-size: var(--n-font-size);\n`, [cE('icon', `\n width: var(--n-icon-size);\n height: var(--n-icon-size);\n font-size: var(--n-icon-size);\n line-height: var(--n-icon-size);\n color: var(--n-icon-color);\n transition:\n color .3s var(--n-bezier);\n `, [c('+', [cE('description', `\n margin-top: 8px;\n `)])]), cE('description', `\n transition: color .3s var(--n-bezier);\n color: var(--n-text-color);\n `), cE('extra', `\n text-align: center;\n transition: color .3s var(--n-bezier);\n margin-top: 12px;\n color: var(--n-extra-text-color);\n `)]);","import { computed, defineComponent, h } from 'vue';\nimport { NBaseIcon } from \"../../_internal/icon/index.mjs\";\nimport { EmptyIcon } from \"../../_internal/icons/index.mjs\";\nimport { useConfig, useLocale, useTheme, useThemeClass } from \"../../_mixins/index.mjs\";\nimport { createKey } from \"../../_utils/index.mjs\";\nimport { emptyLight } from \"../styles/index.mjs\";\nimport style from \"./styles/index.cssr.mjs\";\nexport const emptyProps = Object.assign(Object.assign({}, useTheme.props), {\n  description: String,\n  showDescription: {\n    type: Boolean,\n    default: true\n  },\n  showIcon: {\n    type: Boolean,\n    default: true\n  },\n  size: {\n    type: String,\n    default: 'medium'\n  },\n  renderIcon: Function\n});\nexport default defineComponent({\n  name: 'Empty',\n  props: emptyProps,\n  slots: Object,\n  setup(props) {\n    const {\n      mergedClsPrefixRef,\n      inlineThemeDisabled,\n      mergedComponentPropsRef\n    } = useConfig(props);\n    const themeRef = useTheme('Empty', '-empty', style, emptyLight, props, mergedClsPrefixRef);\n    const {\n      localeRef\n    } = useLocale('Empty');\n    const mergedDescriptionRef = computed(() => {\n      var _a, _b, _c;\n      return (_a = props.description) !== null && _a !== void 0 ? _a : (_c = (_b = mergedComponentPropsRef === null || mergedComponentPropsRef === void 0 ? void 0 : mergedComponentPropsRef.value) === null || _b === void 0 ? void 0 : _b.Empty) === null || _c === void 0 ? void 0 : _c.description;\n    });\n    const mergedRenderIconRef = computed(() => {\n      var _a, _b;\n      return ((_b = (_a = mergedComponentPropsRef === null || mergedComponentPropsRef === void 0 ? void 0 : mergedComponentPropsRef.value) === null || _a === void 0 ? void 0 : _a.Empty) === null || _b === void 0 ? void 0 : _b.renderIcon) || (() => h(EmptyIcon, null));\n    });\n    const cssVarsRef = computed(() => {\n      const {\n        size\n      } = props;\n      const {\n        common: {\n          cubicBezierEaseInOut\n        },\n        self: {\n          [createKey('iconSize', size)]: iconSize,\n          [createKey('fontSize', size)]: fontSize,\n          textColor,\n          iconColor,\n          extraTextColor\n        }\n      } = themeRef.value;\n      return {\n        '--n-icon-size': iconSize,\n        '--n-font-size': fontSize,\n        '--n-bezier': cubicBezierEaseInOut,\n        '--n-text-color': textColor,\n        '--n-icon-color': iconColor,\n        '--n-extra-text-color': extraTextColor\n      };\n    });\n    const themeClassHandle = inlineThemeDisabled ? useThemeClass('empty', computed(() => {\n      let hash = '';\n      const {\n        size\n      } = props;\n      hash += size[0];\n      return hash;\n    }), cssVarsRef, props) : undefined;\n    return {\n      mergedClsPrefix: mergedClsPrefixRef,\n      mergedRenderIcon: mergedRenderIconRef,\n      localizedDescription: computed(() => {\n        return mergedDescriptionRef.value || localeRef.value.description;\n      }),\n      cssVars: inlineThemeDisabled ? undefined : cssVarsRef,\n      themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,\n      onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender\n    };\n  },\n  render() {\n    const {\n      $slots,\n      mergedClsPrefix,\n      onRender\n    } = this;\n    onRender === null || onRender === void 0 ? void 0 : onRender();\n    return h(\"div\", {\n      class: [`${mergedClsPrefix}-empty`, this.themeClass],\n      style: this.cssVars\n    }, this.showIcon ? h(\"div\", {\n      class: `${mergedClsPrefix}-empty__icon`\n    }, $slots.icon ? $slots.icon() : h(NBaseIcon, {\n      clsPrefix: mergedClsPrefix\n    }, {\n      default: this.mergedRenderIcon\n    })) : null, this.showDescription ? h(\"div\", {\n      class: `${mergedClsPrefix}-empty__description`\n    }, $slots.default ? $slots.default() : this.localizedDescription) : null, $slots.extra ? h(\"div\", {\n      class: `${mergedClsPrefix}-empty__extra`\n    }, $slots.extra()) : null);\n  }\n});","export default {\n  height: 'calc(var(--n-option-height) * 7.6)',\n  paddingTiny: '4px 0',\n  paddingSmall: '4px 0',\n  paddingMedium: '4px 0',\n  paddingLarge: '4px 0',\n  paddingHuge: '4px 0',\n  optionPaddingTiny: '0 12px',\n  optionPaddingSmall: '0 12px',\n  optionPaddingMedium: '0 12px',\n  optionPaddingLarge: '0 12px',\n  optionPaddingHuge: '0 12px',\n  loadingSize: '18px'\n};","import { createTheme } from \"../../../_mixins/index.mjs\";\nimport { commonLight } from \"../../../_styles/common/index.mjs\";\nimport { emptyLight } from \"../../../empty/styles/index.mjs\";\nimport { scrollbarLight } from \"../../scrollbar/styles/index.mjs\";\nimport commonVariables from \"./_common.mjs\";\nexport function self(vars) {\n  const {\n    borderRadius,\n    popoverColor,\n    textColor3,\n    dividerColor,\n    textColor2,\n    primaryColorPressed,\n    textColorDisabled,\n    primaryColor,\n    opacityDisabled,\n    hoverColor,\n    fontSizeTiny,\n    fontSizeSmall,\n    fontSizeMedium,\n    fontSizeLarge,\n    fontSizeHuge,\n    heightTiny,\n    heightSmall,\n    heightMedium,\n    heightLarge,\n    heightHuge\n  } = vars;\n  return Object.assign(Object.assign({}, commonVariables), {\n    optionFontSizeTiny: fontSizeTiny,\n    optionFontSizeSmall: fontSizeSmall,\n    optionFontSizeMedium: fontSizeMedium,\n    optionFontSizeLarge: fontSizeLarge,\n    optionFontSizeHuge: fontSizeHuge,\n    optionHeightTiny: heightTiny,\n    optionHeightSmall: heightSmall,\n    optionHeightMedium: heightMedium,\n    optionHeightLarge: heightLarge,\n    optionHeightHuge: heightHuge,\n    borderRadius,\n    color: popoverColor,\n    groupHeaderTextColor: textColor3,\n    actionDividerColor: dividerColor,\n    optionTextColor: textColor2,\n    optionTextColorPressed: primaryColorPressed,\n    optionTextColorDisabled: textColorDisabled,\n    optionTextColorActive: primaryColor,\n    optionOpacityDisabled: opacityDisabled,\n    optionCheckColor: primaryColor,\n    optionColorPending: hoverColor,\n    optionColorActive: 'rgba(0, 0, 0, 0)',\n    optionColorActivePending: hoverColor,\n    actionTextColor: textColor2,\n    loadingColor: primaryColor\n  });\n}\nconst internalSelectMenuLight = createTheme({\n  name: 'InternalSelectMenu',\n  common: commonLight,\n  peers: {\n    Scrollbar: scrollbarLight,\n    Empty: emptyLight\n  },\n  self\n});\nexport default internalSelectMenuLight;","import { commonDark } from \"../../../_styles/common/index.mjs\";\nimport { emptyDark } from \"../../../empty/styles/index.mjs\";\nimport { scrollbarDark } from \"../../scrollbar/styles/index.mjs\";\nimport { self } from \"./light.mjs\";\nconst internalSelectMenuDark = {\n  name: 'InternalSelectMenu',\n  common: commonDark,\n  peers: {\n    Scrollbar: scrollbarDark,\n    Empty: emptyDark\n  },\n  self\n};\nexport default internalSelectMenuDark;","import { defineComponent, h, inject } from 'vue';\nimport { render } from \"../../../_utils/index.mjs\";\nimport { internalSelectionMenuInjectionKey } from \"./interface.mjs\";\nexport default defineComponent({\n  name: 'NBaseSelectGroupHeader',\n  props: {\n    clsPrefix: {\n      type: String,\n      required: true\n    },\n    tmNode: {\n      type: Object,\n      required: true\n    }\n  },\n  setup() {\n    const {\n      renderLabelRef,\n      renderOptionRef,\n      labelFieldRef,\n      nodePropsRef\n    } = inject(internalSelectionMenuInjectionKey);\n    return {\n      labelField: labelFieldRef,\n      nodeProps: nodePropsRef,\n      renderLabel: renderLabelRef,\n      renderOption: renderOptionRef\n    };\n  },\n  render() {\n    const {\n      clsPrefix,\n      renderLabel,\n      renderOption,\n      nodeProps,\n      tmNode: {\n        rawNode\n      }\n    } = this;\n    const attrs = nodeProps === null || nodeProps === void 0 ? void 0 : nodeProps(rawNode);\n    const children = renderLabel ? renderLabel(rawNode, false) : render(rawNode[this.labelField], rawNode, false);\n    const node = h(\"div\", Object.assign({}, attrs, {\n      class: [`${clsPrefix}-base-select-group-header`, attrs === null || attrs === void 0 ? void 0 : attrs.class]\n    }), children);\n    return rawNode.render ? rawNode.render({\n      node,\n      option: rawNode\n    }) : renderOption ? renderOption({\n      node,\n      option: rawNode,\n      selected: false\n    }) : node;\n  }\n});","import { useMemo } from 'vooks';\nimport { defineComponent, h, inject, Transition } from 'vue';\nimport { mergeEventHandlers, render } from \"../../../_utils/index.mjs\";\nimport { NBaseIcon } from \"../../icon/index.mjs\";\nimport { CheckmarkIcon } from \"../../icons/index.mjs\";\nimport { internalSelectionMenuInjectionKey } from \"./interface.mjs\";\nfunction renderCheckMark(show, clsPrefix) {\n  return h(Transition, {\n    name: \"fade-in-scale-up-transition\"\n  }, {\n    default: () => show ? h(NBaseIcon, {\n      clsPrefix: clsPrefix,\n      class: `${clsPrefix}-base-select-option__check`\n    }, {\n      default: () => h(CheckmarkIcon)\n    }) : null\n  });\n}\nexport default defineComponent({\n  name: 'NBaseSelectOption',\n  props: {\n    clsPrefix: {\n      type: String,\n      required: true\n    },\n    tmNode: {\n      type: Object,\n      required: true\n    }\n  },\n  setup(props) {\n    const {\n      valueRef,\n      pendingTmNodeRef,\n      multipleRef,\n      valueSetRef,\n      renderLabelRef,\n      renderOptionRef,\n      labelFieldRef,\n      valueFieldRef,\n      showCheckmarkRef,\n      nodePropsRef,\n      handleOptionClick,\n      handleOptionMouseEnter\n    } = inject(internalSelectionMenuInjectionKey);\n    const isPendingRef = useMemo(() => {\n      const {\n        value: pendingTmNode\n      } = pendingTmNodeRef;\n      if (!pendingTmNode) return false;\n      return props.tmNode.key === pendingTmNode.key;\n    });\n    function handleClick(e) {\n      const {\n        tmNode\n      } = props;\n      if (tmNode.disabled) return;\n      handleOptionClick(e, tmNode);\n    }\n    function handleMouseEnter(e) {\n      const {\n        tmNode\n      } = props;\n      if (tmNode.disabled) return;\n      handleOptionMouseEnter(e, tmNode);\n    }\n    function handleMouseMove(e) {\n      const {\n        tmNode\n      } = props;\n      const {\n        value: isPending\n      } = isPendingRef;\n      if (tmNode.disabled || isPending) return;\n      handleOptionMouseEnter(e, tmNode);\n    }\n    return {\n      multiple: multipleRef,\n      isGrouped: useMemo(() => {\n        const {\n          tmNode\n        } = props;\n        const {\n          parent\n        } = tmNode;\n        return parent && parent.rawNode.type === 'group';\n      }),\n      showCheckmark: showCheckmarkRef,\n      nodeProps: nodePropsRef,\n      isPending: isPendingRef,\n      isSelected: useMemo(() => {\n        const {\n          value\n        } = valueRef;\n        const {\n          value: multiple\n        } = multipleRef;\n        if (value === null) return false;\n        const optionValue = props.tmNode.rawNode[valueFieldRef.value];\n        if (multiple) {\n          const {\n            value: valueSet\n          } = valueSetRef;\n          return valueSet.has(optionValue);\n        } else {\n          return value === optionValue;\n        }\n      }),\n      labelField: labelFieldRef,\n      renderLabel: renderLabelRef,\n      renderOption: renderOptionRef,\n      handleMouseMove,\n      handleMouseEnter,\n      handleClick\n    };\n  },\n  render() {\n    const {\n      clsPrefix,\n      tmNode: {\n        rawNode\n      },\n      isSelected,\n      isPending,\n      isGrouped,\n      showCheckmark,\n      nodeProps,\n      renderOption,\n      renderLabel,\n      handleClick,\n      handleMouseEnter,\n      handleMouseMove\n    } = this;\n    const checkmark = renderCheckMark(isSelected, clsPrefix);\n    const children = renderLabel ? [renderLabel(rawNode, isSelected), showCheckmark && checkmark] : [render(rawNode[this.labelField], rawNode, isSelected), showCheckmark && checkmark];\n    const attrs = nodeProps === null || nodeProps === void 0 ? void 0 : nodeProps(rawNode);\n    const node = h(\"div\", Object.assign({}, attrs, {\n      class: [`${clsPrefix}-base-select-option`, rawNode.class, attrs === null || attrs === void 0 ? void 0 : attrs.class, {\n        [`${clsPrefix}-base-select-option--disabled`]: rawNode.disabled,\n        [`${clsPrefix}-base-select-option--selected`]: isSelected,\n        [`${clsPrefix}-base-select-option--grouped`]: isGrouped,\n        [`${clsPrefix}-base-select-option--pending`]: isPending,\n        [`${clsPrefix}-base-select-option--show-checkmark`]: showCheckmark\n      }],\n      style: [(attrs === null || attrs === void 0 ? void 0 : attrs.style) || '', rawNode.style || ''],\n      onClick: mergeEventHandlers([handleClick, attrs === null || attrs === void 0 ? void 0 : attrs.onClick]),\n      onMouseenter: mergeEventHandlers([handleMouseEnter, attrs === null || attrs === void 0 ? void 0 : attrs.onMouseenter]),\n      onMousemove: mergeEventHandlers([handleMouseMove, attrs === null || attrs === void 0 ? void 0 : attrs.onMousemove])\n    }), h(\"div\", {\n      class: `${clsPrefix}-base-select-option__content`\n    }, children));\n    return rawNode.render ? rawNode.render({\n      node,\n      option: rawNode,\n      selected: isSelected\n    }) : renderOption ? renderOption({\n      node,\n      option: rawNode,\n      selected: isSelected\n    }) : node;\n  }\n});","import { c } from \"../../_utils/cssr/index.mjs\";\nimport commonVariables from \"../common/_common.mjs\";\nconst {\n  cubicBezierEaseIn,\n  cubicBezierEaseOut\n} = commonVariables;\nexport function fadeInScaleUpTransition({\n  transformOrigin = 'inherit',\n  duration = '.2s',\n  enterScale = '.9',\n  originalTransform = '',\n  originalTransition = ''\n} = {}) {\n  return [c('&.fade-in-scale-up-transition-leave-active', {\n    transformOrigin,\n    transition: `opacity ${duration} ${cubicBezierEaseIn}, transform ${duration} ${cubicBezierEaseIn} ${originalTransition && `,${originalTransition}`}`\n  }), c('&.fade-in-scale-up-transition-enter-active', {\n    transformOrigin,\n    transition: `opacity ${duration} ${cubicBezierEaseOut}, transform ${duration} ${cubicBezierEaseOut} ${originalTransition && `,${originalTransition}`}`\n  }), c('&.fade-in-scale-up-transition-enter-from, &.fade-in-scale-up-transition-leave-to', {\n    opacity: 0,\n    transform: `${originalTransform} scale(${enterScale})`\n  }), c('&.fade-in-scale-up-transition-leave-from, &.fade-in-scale-up-transition-enter-to', {\n    opacity: 1,\n    transform: `${originalTransform} scale(1)`\n  })];\n}","import { fadeInScaleUpTransition } from \"../../../../_styles/transitions/fade-in-scale-up.cssr.mjs\";\nimport { c, cB, cE, cM, cNotM } from \"../../../../_utils/cssr/index.mjs\";\n// --n-loading-color\n// --n-loading-size\n// --n-option-padding-right\nexport default cB('base-select-menu', `\n line-height: 1.5;\n outline: none;\n z-index: 0;\n position: relative;\n border-radius: var(--n-border-radius);\n transition:\n background-color .3s var(--n-bezier),\n box-shadow .3s var(--n-bezier);\n background-color: var(--n-color);\n`, [cB('scrollbar', `\n max-height: var(--n-height);\n `), cB('virtual-list', `\n max-height: var(--n-height);\n `), cB('base-select-option', `\n min-height: var(--n-option-height);\n font-size: var(--n-option-font-size);\n display: flex;\n align-items: center;\n `, [cE('content', `\n z-index: 1;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n `)]), cB('base-select-group-header', `\n min-height: var(--n-option-height);\n font-size: .93em;\n display: flex;\n align-items: center;\n `), cB('base-select-menu-option-wrapper', `\n position: relative;\n width: 100%;\n `), cE('loading, empty', `\n display: flex;\n padding: 12px 32px;\n flex: 1;\n justify-content: center;\n `), cE('loading', `\n color: var(--n-loading-color);\n font-size: var(--n-loading-size);\n `), cE('header', `\n padding: 8px var(--n-option-padding-left);\n font-size: var(--n-option-font-size);\n transition: \n color .3s var(--n-bezier),\n border-color .3s var(--n-bezier);\n border-bottom: 1px solid var(--n-action-divider-color);\n color: var(--n-action-text-color);\n `), cE('action', `\n padding: 8px var(--n-option-padding-left);\n font-size: var(--n-option-font-size);\n transition: \n color .3s var(--n-bezier),\n border-color .3s var(--n-bezier);\n border-top: 1px solid var(--n-action-divider-color);\n color: var(--n-action-text-color);\n `), cB('base-select-group-header', `\n position: relative;\n cursor: default;\n padding: var(--n-option-padding);\n color: var(--n-group-header-text-color);\n `), cB('base-select-option', `\n cursor: pointer;\n position: relative;\n padding: var(--n-option-padding);\n transition:\n color .3s var(--n-bezier),\n opacity .3s var(--n-bezier);\n box-sizing: border-box;\n color: var(--n-option-text-color);\n opacity: 1;\n `, [cM('show-checkmark', `\n padding-right: calc(var(--n-option-padding-right) + 20px);\n `), c('&::before', `\n content: \"\";\n position: absolute;\n left: 4px;\n right: 4px;\n top: 0;\n bottom: 0;\n border-radius: var(--n-border-radius);\n transition: background-color .3s var(--n-bezier);\n `), c('&:active', `\n color: var(--n-option-text-color-pressed);\n `), cM('grouped', `\n padding-left: calc(var(--n-option-padding-left) * 1.5);\n `), cM('pending', [c('&::before', `\n background-color: var(--n-option-color-pending);\n `)]), cM('selected', `\n color: var(--n-option-text-color-active);\n `, [c('&::before', `\n background-color: var(--n-option-color-active);\n `), cM('pending', [c('&::before', `\n background-color: var(--n-option-color-active-pending);\n `)])]), cM('disabled', `\n cursor: not-allowed;\n `, [cNotM('selected', `\n color: var(--n-option-text-color-disabled);\n `), cM('selected', `\n opacity: var(--n-option-opacity-disabled);\n `)]), cE('check', `\n font-size: 16px;\n position: absolute;\n right: calc(var(--n-option-padding-right) - 4px);\n top: calc(50% - 7px);\n color: var(--n-option-check-color);\n transition: color .3s var(--n-bezier);\n `, [fadeInScaleUpTransition({\n  enterScale: '0.5'\n})])])]);","import { depx, getPadding, happensIn } from 'seemly';\nimport { createIndexGetter } from 'treemate';\nimport { computed, defineComponent, h, nextTick, onBeforeUnmount, onMounted, provide, ref, toRef, watch } from 'vue';\nimport { VirtualList } from 'vueuc';\nimport { useConfig, useRtl, useTheme, useThemeClass } from \"../../../_mixins/index.mjs\";\nimport { resolveSlot, resolveWrappedSlot, useOnResize } from \"../../../_utils/index.mjs\";\nimport { createKey } from \"../../../_utils/cssr/index.mjs\";\nimport { NEmpty } from \"../../../empty/index.mjs\";\nimport NFocusDetector from \"../../focus-detector/index.mjs\";\nimport NInternalLoading from \"../../loading/index.mjs\";\nimport { NScrollbar } from \"../../scrollbar/index.mjs\";\nimport { internalSelectMenuLight } from \"../styles/index.mjs\";\nimport { internalSelectionMenuBodyInjectionKey, internalSelectionMenuInjectionKey } from \"./interface.mjs\";\nimport NSelectGroupHeader from \"./SelectGroupHeader.mjs\";\nimport NSelectOption from \"./SelectOption.mjs\";\nimport style from \"./styles/index.cssr.mjs\";\nexport default defineComponent({\n  name: 'InternalSelectMenu',\n  props: Object.assign(Object.assign({}, useTheme.props), {\n    clsPrefix: {\n      type: String,\n      required: true\n    },\n    scrollable: {\n      type: Boolean,\n      default: true\n    },\n    treeMate: {\n      type: Object,\n      required: true\n    },\n    multiple: Boolean,\n    size: {\n      type: String,\n      default: 'medium'\n    },\n    value: {\n      type: [String, Number, Array],\n      default: null\n    },\n    autoPending: Boolean,\n    virtualScroll: {\n      type: Boolean,\n      default: true\n    },\n    // show is used to toggle pending state initialization\n    show: {\n      type: Boolean,\n      default: true\n    },\n    labelField: {\n      type: String,\n      default: 'label'\n    },\n    valueField: {\n      type: String,\n      default: 'value'\n    },\n    loading: Boolean,\n    focusable: Boolean,\n    renderLabel: Function,\n    renderOption: Function,\n    nodeProps: Function,\n    showCheckmark: {\n      type: Boolean,\n      default: true\n    },\n    onMousedown: Function,\n    onScroll: Function,\n    onFocus: Function,\n    onBlur: Function,\n    onKeyup: Function,\n    onKeydown: Function,\n    onTabOut: Function,\n    onMouseenter: Function,\n    onMouseleave: Function,\n    onResize: Function,\n    resetMenuOnOptionsChange: {\n      type: Boolean,\n      default: true\n    },\n    inlineThemeDisabled: Boolean,\n    // deprecated\n    onToggle: Function\n  }),\n  setup(props) {\n    const {\n      mergedClsPrefixRef,\n      mergedRtlRef\n    } = useConfig(props);\n    const rtlEnabledRef = useRtl('InternalSelectMenu', mergedRtlRef, mergedClsPrefixRef);\n    const themeRef = useTheme('InternalSelectMenu', '-internal-select-menu', style, internalSelectMenuLight, props, toRef(props, 'clsPrefix'));\n    const selfRef = ref(null);\n    const virtualListRef = ref(null);\n    const scrollbarRef = ref(null);\n    const flattenedNodesRef = computed(() => props.treeMate.getFlattenedNodes());\n    const fIndexGetterRef = computed(() => createIndexGetter(flattenedNodesRef.value));\n    const pendingNodeRef = ref(null);\n    function initPendingNode() {\n      const {\n        treeMate\n      } = props;\n      let defaultPendingNode = null;\n      const {\n        value\n      } = props;\n      if (value === null) {\n        defaultPendingNode = treeMate.getFirstAvailableNode();\n      } else {\n        if (props.multiple) {\n          defaultPendingNode = treeMate.getNode((value || [])[(value || []).length - 1]);\n        } else {\n          defaultPendingNode = treeMate.getNode(value);\n        }\n        if (!defaultPendingNode || defaultPendingNode.disabled) {\n          defaultPendingNode = treeMate.getFirstAvailableNode();\n        }\n      }\n      if (defaultPendingNode) {\n        setPendingTmNode(defaultPendingNode);\n      } else {\n        setPendingTmNode(null);\n      }\n    }\n    function clearPendingNodeIfInvalid() {\n      const {\n        value: pendingNode\n      } = pendingNodeRef;\n      if (pendingNode && !props.treeMate.getNode(pendingNode.key)) {\n        pendingNodeRef.value = null;\n      }\n    }\n    let initPendingNodeWatchStopHandle;\n    watch(() => props.show, show => {\n      if (show) {\n        initPendingNodeWatchStopHandle = watch(() => props.treeMate, () => {\n          if (props.resetMenuOnOptionsChange) {\n            if (props.autoPending) {\n              initPendingNode();\n            } else {\n              clearPendingNodeIfInvalid();\n            }\n            void nextTick(scrollToPendingNode);\n          } else {\n            clearPendingNodeIfInvalid();\n          }\n        }, {\n          immediate: true\n        });\n      } else {\n        initPendingNodeWatchStopHandle === null || initPendingNodeWatchStopHandle === void 0 ? void 0 : initPendingNodeWatchStopHandle();\n      }\n    }, {\n      immediate: true\n    });\n    onBeforeUnmount(() => {\n      initPendingNodeWatchStopHandle === null || initPendingNodeWatchStopHandle === void 0 ? void 0 : initPendingNodeWatchStopHandle();\n    });\n    const itemSizeRef = computed(() => {\n      return depx(themeRef.value.self[createKey('optionHeight', props.size)]);\n    });\n    const paddingRef = computed(() => {\n      return getPadding(themeRef.value.self[createKey('padding', props.size)]);\n    });\n    const valueSetRef = computed(() => {\n      if (props.multiple && Array.isArray(props.value)) {\n        return new Set(props.value);\n      }\n      return new Set();\n    });\n    const emptyRef = computed(() => {\n      const tmNodes = flattenedNodesRef.value;\n      return tmNodes && tmNodes.length === 0;\n    });\n    function doToggle(tmNode) {\n      const {\n        onToggle\n      } = props;\n      if (onToggle) onToggle(tmNode);\n    }\n    function doScroll(e) {\n      const {\n        onScroll\n      } = props;\n      if (onScroll) onScroll(e);\n    }\n    // required, scroller sync need to be triggered manually\n    function handleVirtualListScroll(e) {\n      var _a;\n      (_a = scrollbarRef.value) === null || _a === void 0 ? void 0 : _a.sync();\n      doScroll(e);\n    }\n    function handleVirtualListResize() {\n      var _a;\n      (_a = scrollbarRef.value) === null || _a === void 0 ? void 0 : _a.sync();\n    }\n    function getPendingTmNode() {\n      const {\n        value: pendingTmNode\n      } = pendingNodeRef;\n      if (pendingTmNode) return pendingTmNode;\n      return null;\n    }\n    function handleOptionMouseEnter(e, tmNode) {\n      if (tmNode.disabled) return;\n      setPendingTmNode(tmNode, false);\n    }\n    function handleOptionClick(e, tmNode) {\n      if (tmNode.disabled) return;\n      doToggle(tmNode);\n    }\n    // keyboard related methods\n    function handleKeyUp(e) {\n      var _a;\n      if (happensIn(e, 'action')) return;\n      (_a = props.onKeyup) === null || _a === void 0 ? void 0 : _a.call(props, e);\n    }\n    function handleKeyDown(e) {\n      var _a;\n      if (happensIn(e, 'action')) return;\n      (_a = props.onKeydown) === null || _a === void 0 ? void 0 : _a.call(props, e);\n    }\n    function handleMouseDown(e) {\n      var _a;\n      (_a = props.onMousedown) === null || _a === void 0 ? void 0 : _a.call(props, e);\n      if (props.focusable) return;\n      e.preventDefault();\n    }\n    function next() {\n      const {\n        value: pendingTmNode\n      } = pendingNodeRef;\n      if (pendingTmNode) {\n        setPendingTmNode(pendingTmNode.getNext({\n          loop: true\n        }), true);\n      }\n    }\n    function prev() {\n      const {\n        value: pendingTmNode\n      } = pendingNodeRef;\n      if (pendingTmNode) {\n        setPendingTmNode(pendingTmNode.getPrev({\n          loop: true\n        }), true);\n      }\n    }\n    function setPendingTmNode(tmNode, doScroll = false) {\n      pendingNodeRef.value = tmNode;\n      if (doScroll) scrollToPendingNode();\n    }\n    function scrollToPendingNode() {\n      var _a, _b;\n      const tmNode = pendingNodeRef.value;\n      if (!tmNode) return;\n      const fIndex = fIndexGetterRef.value(tmNode.key);\n      if (fIndex === null) return;\n      if (props.virtualScroll) {\n        (_a = virtualListRef.value) === null || _a === void 0 ? void 0 : _a.scrollTo({\n          index: fIndex\n        });\n      } else {\n        (_b = scrollbarRef.value) === null || _b === void 0 ? void 0 : _b.scrollTo({\n          index: fIndex,\n          elSize: itemSizeRef.value\n        });\n      }\n    }\n    function handleFocusin(e) {\n      var _a, _b;\n      if ((_a = selfRef.value) === null || _a === void 0 ? void 0 : _a.contains(e.target)) {\n        (_b = props.onFocus) === null || _b === void 0 ? void 0 : _b.call(props, e);\n      }\n    }\n    function handleFocusout(e) {\n      var _a, _b;\n      if (!((_a = selfRef.value) === null || _a === void 0 ? void 0 : _a.contains(e.relatedTarget))) {\n        (_b = props.onBlur) === null || _b === void 0 ? void 0 : _b.call(props, e);\n      }\n    }\n    provide(internalSelectionMenuInjectionKey, {\n      handleOptionMouseEnter,\n      handleOptionClick,\n      valueSetRef,\n      pendingTmNodeRef: pendingNodeRef,\n      nodePropsRef: toRef(props, 'nodeProps'),\n      showCheckmarkRef: toRef(props, 'showCheckmark'),\n      multipleRef: toRef(props, 'multiple'),\n      valueRef: toRef(props, 'value'),\n      renderLabelRef: toRef(props, 'renderLabel'),\n      renderOptionRef: toRef(props, 'renderOption'),\n      labelFieldRef: toRef(props, 'labelField'),\n      valueFieldRef: toRef(props, 'valueField')\n    });\n    provide(internalSelectionMenuBodyInjectionKey, selfRef);\n    onMounted(() => {\n      const {\n        value\n      } = scrollbarRef;\n      if (value) value.sync();\n    });\n    const cssVarsRef = computed(() => {\n      const {\n        size\n      } = props;\n      const {\n        common: {\n          cubicBezierEaseInOut\n        },\n        self: {\n          height,\n          borderRadius,\n          color,\n          groupHeaderTextColor,\n          actionDividerColor,\n          optionTextColorPressed,\n          optionTextColor,\n          optionTextColorDisabled,\n          optionTextColorActive,\n          optionOpacityDisabled,\n          optionCheckColor,\n          actionTextColor,\n          optionColorPending,\n          optionColorActive,\n          loadingColor,\n          loadingSize,\n          optionColorActivePending,\n          [createKey('optionFontSize', size)]: fontSize,\n          [createKey('optionHeight', size)]: optionHeight,\n          [createKey('optionPadding', size)]: optionPadding\n        }\n      } = themeRef.value;\n      return {\n        '--n-height': height,\n        '--n-action-divider-color': actionDividerColor,\n        '--n-action-text-color': actionTextColor,\n        '--n-bezier': cubicBezierEaseInOut,\n        '--n-border-radius': borderRadius,\n        '--n-color': color,\n        '--n-option-font-size': fontSize,\n        '--n-group-header-text-color': groupHeaderTextColor,\n        '--n-option-check-color': optionCheckColor,\n        '--n-option-color-pending': optionColorPending,\n        '--n-option-color-active': optionColorActive,\n        '--n-option-color-active-pending': optionColorActivePending,\n        '--n-option-height': optionHeight,\n        '--n-option-opacity-disabled': optionOpacityDisabled,\n        '--n-option-text-color': optionTextColor,\n        '--n-option-text-color-active': optionTextColorActive,\n        '--n-option-text-color-disabled': optionTextColorDisabled,\n        '--n-option-text-color-pressed': optionTextColorPressed,\n        '--n-option-padding': optionPadding,\n        '--n-option-padding-left': getPadding(optionPadding, 'left'),\n        '--n-option-padding-right': getPadding(optionPadding, 'right'),\n        '--n-loading-color': loadingColor,\n        '--n-loading-size': loadingSize\n      };\n    });\n    const {\n      inlineThemeDisabled\n    } = props;\n    const themeClassHandle = inlineThemeDisabled ? useThemeClass('internal-select-menu', computed(() => props.size[0]), cssVarsRef, props) : undefined;\n    const exposedProps = {\n      selfRef,\n      next,\n      prev,\n      getPendingTmNode\n    };\n    useOnResize(selfRef, props.onResize);\n    return Object.assign({\n      mergedTheme: themeRef,\n      mergedClsPrefix: mergedClsPrefixRef,\n      rtlEnabled: rtlEnabledRef,\n      virtualListRef,\n      scrollbarRef,\n      itemSize: itemSizeRef,\n      padding: paddingRef,\n      flattenedNodes: flattenedNodesRef,\n      empty: emptyRef,\n      virtualListContainer() {\n        const {\n          value\n        } = virtualListRef;\n        return value === null || value === void 0 ? void 0 : value.listElRef;\n      },\n      virtualListContent() {\n        const {\n          value\n        } = virtualListRef;\n        return value === null || value === void 0 ? void 0 : value.itemsElRef;\n      },\n      doScroll,\n      handleFocusin,\n      handleFocusout,\n      handleKeyUp,\n      handleKeyDown,\n      handleMouseDown,\n      handleVirtualListResize,\n      handleVirtualListScroll,\n      cssVars: inlineThemeDisabled ? undefined : cssVarsRef,\n      themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,\n      onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender\n    }, exposedProps);\n  },\n  render() {\n    const {\n      $slots,\n      virtualScroll,\n      clsPrefix,\n      mergedTheme,\n      themeClass,\n      onRender\n    } = this;\n    onRender === null || onRender === void 0 ? void 0 : onRender();\n    return h(\"div\", {\n      ref: \"selfRef\",\n      tabindex: this.focusable ? 0 : -1,\n      class: [`${clsPrefix}-base-select-menu`, this.rtlEnabled && `${clsPrefix}-base-select-menu--rtl`, themeClass, this.multiple && `${clsPrefix}-base-select-menu--multiple`],\n      style: this.cssVars,\n      onFocusin: this.handleFocusin,\n      onFocusout: this.handleFocusout,\n      onKeyup: this.handleKeyUp,\n      onKeydown: this.handleKeyDown,\n      onMousedown: this.handleMouseDown,\n      onMouseenter: this.onMouseenter,\n      onMouseleave: this.onMouseleave\n    }, resolveWrappedSlot($slots.header, children => children && h(\"div\", {\n      class: `${clsPrefix}-base-select-menu__header`,\n      \"data-header\": true,\n      key: \"header\"\n    }, children)), this.loading ? h(\"div\", {\n      class: `${clsPrefix}-base-select-menu__loading`\n    }, h(NInternalLoading, {\n      clsPrefix: clsPrefix,\n      strokeWidth: 20\n    })) : !this.empty ? h(NScrollbar, {\n      ref: \"scrollbarRef\",\n      theme: mergedTheme.peers.Scrollbar,\n      themeOverrides: mergedTheme.peerOverrides.Scrollbar,\n      scrollable: this.scrollable,\n      container: virtualScroll ? this.virtualListContainer : undefined,\n      content: virtualScroll ? this.virtualListContent : undefined,\n      onScroll: virtualScroll ? undefined : this.doScroll\n    }, {\n      default: () => {\n        return virtualScroll ? h(VirtualList, {\n          ref: \"virtualListRef\",\n          class: `${clsPrefix}-virtual-list`,\n          items: this.flattenedNodes,\n          itemSize: this.itemSize,\n          showScrollbar: false,\n          paddingTop: this.padding.top,\n          paddingBottom: this.padding.bottom,\n          onResize: this.handleVirtualListResize,\n          onScroll: this.handleVirtualListScroll,\n          itemResizable: true\n        }, {\n          default: ({\n            item: tmNode\n          }) => {\n            return tmNode.isGroup ? h(NSelectGroupHeader, {\n              key: tmNode.key,\n              clsPrefix: clsPrefix,\n              tmNode: tmNode\n            }) : tmNode.ignored ? null : h(NSelectOption, {\n              clsPrefix: clsPrefix,\n              key: tmNode.key,\n              tmNode: tmNode\n            });\n          }\n        }) : h(\"div\", {\n          class: `${clsPrefix}-base-select-menu-option-wrapper`,\n          style: {\n            paddingTop: this.padding.top,\n            paddingBottom: this.padding.bottom\n          }\n        }, this.flattenedNodes.map(tmNode => tmNode.isGroup ? h(NSelectGroupHeader, {\n          key: tmNode.key,\n          clsPrefix: clsPrefix,\n          tmNode: tmNode\n        }) : h(NSelectOption, {\n          clsPrefix: clsPrefix,\n          key: tmNode.key,\n          tmNode: tmNode\n        })));\n      }\n    }) : h(\"div\", {\n      class: `${clsPrefix}-base-select-menu__empty`,\n      \"data-empty\": true\n    }, resolveSlot($slots.empty, () => [h(NEmpty, {\n      theme: mergedTheme.peers.Empty,\n      themeOverrides: mergedTheme.peerOverrides.Empty,\n      size: this.size\n    })])), resolveWrappedSlot($slots.action, children => children && [h(\"div\", {\n      class: `${clsPrefix}-base-select-menu__action`,\n      \"data-action\": true,\n      key: \"action\"\n    }, children), h(NFocusDetector, {\n      onFocus: this.onTabOut,\n      key: \"focus-detector\"\n    })]));\n  }\n});","export default {\n  space: '6px',\n  spaceArrow: '10px',\n  arrowOffset: '10px',\n  arrowOffsetVertical: '10px',\n  arrowHeight: '6px',\n  padding: '8px 14px'\n};","import { commonLight } from \"../../_styles/common/index.mjs\";\nimport commonVariables from \"./_common.mjs\";\nexport function self(vars) {\n  const {\n    boxShadow2,\n    popoverColor,\n    textColor2,\n    borderRadius,\n    fontSize,\n    dividerColor\n  } = vars;\n  return Object.assign(Object.assign({}, commonVariables), {\n    fontSize,\n    borderRadius,\n    color: popoverColor,\n    dividerColor,\n    textColor: textColor2,\n    boxShadow: boxShadow2\n  });\n}\nconst popoverLight = {\n  name: 'Popover',\n  common: commonLight,\n  self\n};\nexport default popoverLight;","import { commonDark } from \"../../_styles/common/index.mjs\";\nimport { self } from \"./light.mjs\";\nconst popoverDark = {\n  name: 'Popover',\n  common: commonDark,\n  self\n};\nexport default popoverDark;","import { map } from 'lodash-es';\nimport { c, cB, cCB, cE, cM, cNotM } from \"../../../_utils/cssr/index.mjs\";\nconst oppositePlacement = {\n  top: 'bottom',\n  bottom: 'top',\n  left: 'right',\n  right: 'left'\n};\nconst arrowSize = 'var(--n-arrow-height) * 1.414';\n// vars:\n// --n-bezier\n// --n-bezier-ease-in\n// --n-bezier-ease-out\n// --n-font-size\n// --n-text-color\n// --n-color\n// --n-border-radius\n// --n-arrow-height\n// --n-arrow-offset\n// --n-arrow-offset-vertical\n// --n-padding\n// --n-space\n// --n-space-arrow\n// --n-divider-color\nexport default c([cB('popover', `\n transition:\n box-shadow .3s var(--n-bezier),\n background-color .3s var(--n-bezier),\n color .3s var(--n-bezier);\n position: relative;\n font-size: var(--n-font-size);\n color: var(--n-text-color);\n box-shadow: var(--n-box-shadow);\n word-break: break-word;\n `, [c('>', [cB('scrollbar', `\n height: inherit;\n max-height: inherit;\n `)]), cNotM('raw', `\n background-color: var(--n-color);\n border-radius: var(--n-border-radius);\n `, [cNotM('scrollable', [cNotM('show-header-or-footer', 'padding: var(--n-padding);')])]), cE('header', `\n padding: var(--n-padding);\n border-bottom: 1px solid var(--n-divider-color);\n transition: border-color .3s var(--n-bezier);\n `), cE('footer', `\n padding: var(--n-padding);\n border-top: 1px solid var(--n-divider-color);\n transition: border-color .3s var(--n-bezier);\n `), cM('scrollable, show-header-or-footer', [cE('content', `\n padding: var(--n-padding);\n `)])]), cB('popover-shared', `\n transform-origin: inherit;\n `, [cB('popover-arrow-wrapper', `\n position: absolute;\n overflow: hidden;\n pointer-events: none;\n `, [cB('popover-arrow', `\n transition: background-color .3s var(--n-bezier);\n position: absolute;\n display: block;\n width: calc(${arrowSize});\n height: calc(${arrowSize});\n box-shadow: 0 0 8px 0 rgba(0, 0, 0, .12);\n transform: rotate(45deg);\n background-color: var(--n-color);\n pointer-events: all;\n `)]),\n// body transition\nc('&.popover-transition-enter-from, &.popover-transition-leave-to', `\n opacity: 0;\n transform: scale(.85);\n `), c('&.popover-transition-enter-to, &.popover-transition-leave-from', `\n transform: scale(1);\n opacity: 1;\n `), c('&.popover-transition-enter-active', `\n transition:\n box-shadow .3s var(--n-bezier),\n background-color .3s var(--n-bezier),\n color .3s var(--n-bezier),\n opacity .15s var(--n-bezier-ease-out),\n transform .15s var(--n-bezier-ease-out);\n `), c('&.popover-transition-leave-active', `\n transition:\n box-shadow .3s var(--n-bezier),\n background-color .3s var(--n-bezier),\n color .3s var(--n-bezier),\n opacity .15s var(--n-bezier-ease-in),\n transform .15s var(--n-bezier-ease-in);\n `)]), placementStyle('top-start', `\n top: calc(${arrowSize} / -2);\n left: calc(${getArrowOffset('top-start')} - var(--v-offset-left));\n `), placementStyle('top', `\n top: calc(${arrowSize} / -2);\n transform: translateX(calc(${arrowSize} / -2)) rotate(45deg);\n left: 50%;\n `), placementStyle('top-end', `\n top: calc(${arrowSize} / -2);\n right: calc(${getArrowOffset('top-end')} + var(--v-offset-left));\n `), placementStyle('bottom-start', `\n bottom: calc(${arrowSize} / -2);\n left: calc(${getArrowOffset('bottom-start')} - var(--v-offset-left));\n `), placementStyle('bottom', `\n bottom: calc(${arrowSize} / -2);\n transform: translateX(calc(${arrowSize} / -2)) rotate(45deg);\n left: 50%;\n `), placementStyle('bottom-end', `\n bottom: calc(${arrowSize} / -2);\n right: calc(${getArrowOffset('bottom-end')} + var(--v-offset-left));\n `), placementStyle('left-start', `\n left: calc(${arrowSize} / -2);\n top: calc(${getArrowOffset('left-start')} - var(--v-offset-top));\n `), placementStyle('left', `\n left: calc(${arrowSize} / -2);\n transform: translateY(calc(${arrowSize} / -2)) rotate(45deg);\n top: 50%;\n `), placementStyle('left-end', `\n left: calc(${arrowSize} / -2);\n bottom: calc(${getArrowOffset('left-end')} + var(--v-offset-top));\n `), placementStyle('right-start', `\n right: calc(${arrowSize} / -2);\n top: calc(${getArrowOffset('right-start')} - var(--v-offset-top));\n `), placementStyle('right', `\n right: calc(${arrowSize} / -2);\n transform: translateY(calc(${arrowSize} / -2)) rotate(45deg);\n top: 50%;\n `), placementStyle('right-end', `\n right: calc(${arrowSize} / -2);\n bottom: calc(${getArrowOffset('right-end')} + var(--v-offset-top));\n `), ...map({\n  top: ['right-start', 'left-start'],\n  right: ['top-end', 'bottom-end'],\n  bottom: ['right-end', 'left-end'],\n  left: ['top-start', 'bottom-start']\n}, (placements, direction) => {\n  const isVertical = ['right', 'left'].includes(direction);\n  const sizeType = isVertical ? 'width' : 'height';\n  return placements.map(placement => {\n    const isReverse = placement.split('-')[1] === 'end';\n    const targetSize = `var(--v-target-${sizeType}, 0px)`;\n    const centerOffset = `calc((${targetSize} - ${arrowSize}) / 2)`;\n    const offset = getArrowOffset(placement);\n    return c(`[v-placement=\"${placement}\"] >`, [cB('popover-shared', [cM('center-arrow', [cB('popover-arrow', `${direction}: calc(max(${centerOffset}, ${offset}) ${isReverse ? '+' : '-'} var(--v-offset-${isVertical ? 'left' : 'top'}));`)])])]);\n  });\n})]);\nfunction getArrowOffset(placement) {\n  return ['top', 'bottom'].includes(placement.split('-')[0]) ? 'var(--n-arrow-offset)' : 'var(--n-arrow-offset-vertical)';\n}\nfunction placementStyle(placement, arrowStyleLiteral) {\n  const position = placement.split('-')[0];\n  const sizeStyle = ['top', 'bottom'].includes(position) ? 'height: var(--n-space-arrow);' : 'width: var(--n-space-arrow);';\n  return c(`[v-placement=\"${placement}\"] >`, [cB('popover-shared', `\n margin-${oppositePlacement[position]}: var(--n-space);\n `, [cM('show-arrow', `\n margin-${oppositePlacement[position]}: var(--n-space-arrow);\n `), cM('overlap', `\n margin: 0;\n `), cCB('popover-arrow-wrapper', `\n right: 0;\n left: 0;\n top: 0;\n bottom: 0;\n ${position}: 100%;\n ${oppositePlacement[position]}: auto;\n ${sizeStyle}\n `, [cB('popover-arrow', arrowStyleLiteral)])])]);\n}","import { getPreciseEventTarget } from 'seemly';\nimport { clickoutside, mousemoveoutside } from 'vdirs';\nimport { computed, defineComponent, Fragment, h, inject, mergeProps, onBeforeUnmount, provide, ref, toRef, Transition, vShow, watch, watchEffect, withDirectives } from 'vue';\nimport { VFocusTrap, VFollower } from 'vueuc';\nimport { NxScrollbar } from \"../../_internal/scrollbar/index.mjs\";\nimport { useConfig, useTheme, useThemeClass } from \"../../_mixins/index.mjs\";\nimport { formatLength, isJsdom, isSlotEmpty, resolveWrappedSlot, useAdjustedTo } from \"../../_utils/index.mjs\";\nimport { drawerBodyInjectionKey } from \"../../drawer/src/interface.mjs\";\nimport { modalBodyInjectionKey } from \"../../modal/src/interface.mjs\";\nimport { popoverLight } from \"../styles/index.mjs\";\nimport { popoverBodyInjectionKey } from \"./interface.mjs\";\nimport style from \"./styles/index.cssr.mjs\";\nexport const popoverBodyProps = Object.assign(Object.assign({}, useTheme.props), {\n  to: useAdjustedTo.propTo,\n  show: Boolean,\n  trigger: String,\n  showArrow: Boolean,\n  delay: Number,\n  duration: Number,\n  raw: Boolean,\n  arrowPointToCenter: Boolean,\n  arrowClass: String,\n  arrowStyle: [String, Object],\n  arrowWrapperClass: String,\n  arrowWrapperStyle: [String, Object],\n  displayDirective: String,\n  x: Number,\n  y: Number,\n  flip: Boolean,\n  overlap: Boolean,\n  placement: String,\n  width: [Number, String],\n  keepAliveOnHover: Boolean,\n  scrollable: Boolean,\n  contentClass: String,\n  contentStyle: [Object, String],\n  headerClass: String,\n  headerStyle: [Object, String],\n  footerClass: String,\n  footerStyle: [Object, String],\n  // private\n  internalDeactivateImmediately: Boolean,\n  animated: Boolean,\n  onClickoutside: Function,\n  internalTrapFocus: Boolean,\n  internalOnAfterLeave: Function,\n  // deprecated\n  minWidth: Number,\n  maxWidth: Number\n});\nexport function renderArrow({\n  arrowClass,\n  arrowStyle,\n  arrowWrapperClass,\n  arrowWrapperStyle,\n  clsPrefix\n}) {\n  return h(\"div\", {\n    key: \"__popover-arrow__\",\n    style: arrowWrapperStyle,\n    class: [`${clsPrefix}-popover-arrow-wrapper`, arrowWrapperClass]\n  }, h(\"div\", {\n    class: [`${clsPrefix}-popover-arrow`, arrowClass],\n    style: arrowStyle\n  }));\n}\nexport default defineComponent({\n  name: 'PopoverBody',\n  inheritAttrs: false,\n  props: popoverBodyProps,\n  setup(props, {\n    slots,\n    attrs\n  }) {\n    const {\n      namespaceRef,\n      mergedClsPrefixRef,\n      inlineThemeDisabled\n    } = useConfig(props);\n    const themeRef = useTheme('Popover', '-popover', style, popoverLight, props, mergedClsPrefixRef);\n    const followerRef = ref(null);\n    const NPopover = inject('NPopover');\n    const bodyRef = ref(null);\n    const followerEnabledRef = ref(props.show);\n    const displayedRef = ref(false);\n    watchEffect(() => {\n      const {\n        show\n      } = props;\n      if (show && !isJsdom() && !props.internalDeactivateImmediately) {\n        displayedRef.value = true;\n      }\n    });\n    const directivesRef = computed(() => {\n      const {\n        trigger,\n        onClickoutside\n      } = props;\n      const directives = [];\n      const {\n        positionManuallyRef: {\n          value: positionManually\n        }\n      } = NPopover;\n      if (!positionManually) {\n        if (trigger === 'click' && !onClickoutside) {\n          directives.push([clickoutside, handleClickOutside, undefined, {\n            capture: true\n          }]);\n        }\n        if (trigger === 'hover') {\n          directives.push([mousemoveoutside, handleMouseMoveOutside]);\n        }\n      }\n      if (onClickoutside) {\n        directives.push([clickoutside, handleClickOutside, undefined, {\n          capture: true\n        }]);\n      }\n      if (props.displayDirective === 'show' || props.animated && displayedRef.value) {\n        directives.push([vShow, props.show]);\n      }\n      return directives;\n    });\n    const cssVarsRef = computed(() => {\n      const {\n        common: {\n          cubicBezierEaseInOut,\n          cubicBezierEaseIn,\n          cubicBezierEaseOut\n        },\n        self: {\n          space,\n          spaceArrow,\n          padding,\n          fontSize,\n          textColor,\n          dividerColor,\n          color,\n          boxShadow,\n          borderRadius,\n          arrowHeight,\n          arrowOffset,\n          arrowOffsetVertical\n        }\n      } = themeRef.value;\n      return {\n        '--n-box-shadow': boxShadow,\n        '--n-bezier': cubicBezierEaseInOut,\n        '--n-bezier-ease-in': cubicBezierEaseIn,\n        '--n-bezier-ease-out': cubicBezierEaseOut,\n        '--n-font-size': fontSize,\n        '--n-text-color': textColor,\n        '--n-color': color,\n        '--n-divider-color': dividerColor,\n        '--n-border-radius': borderRadius,\n        '--n-arrow-height': arrowHeight,\n        '--n-arrow-offset': arrowOffset,\n        '--n-arrow-offset-vertical': arrowOffsetVertical,\n        '--n-padding': padding,\n        '--n-space': space,\n        '--n-space-arrow': spaceArrow\n      };\n    });\n    const styleRef = computed(() => {\n      const width = props.width === 'trigger' ? undefined : formatLength(props.width);\n      const style = [];\n      if (width) {\n        style.push({\n          width\n        });\n      }\n      const {\n        maxWidth,\n        minWidth\n      } = props;\n      if (maxWidth) {\n        style.push({\n          maxWidth: formatLength(maxWidth)\n        });\n      }\n      if (minWidth) {\n        style.push({\n          maxWidth: formatLength(minWidth)\n        });\n      }\n      if (!inlineThemeDisabled) {\n        style.push(cssVarsRef.value);\n      }\n      return style;\n    });\n    const themeClassHandle = inlineThemeDisabled ? useThemeClass('popover', undefined, cssVarsRef, props) : undefined;\n    NPopover.setBodyInstance({\n      syncPosition\n    });\n    onBeforeUnmount(() => {\n      NPopover.setBodyInstance(null);\n    });\n    watch(toRef(props, 'show'), value => {\n      // If no animation, no transition component will be applied to the\n      // component. So we need to trigger follower manaully.\n      if (props.animated) return;\n      if (value) {\n        followerEnabledRef.value = true;\n      } else {\n        followerEnabledRef.value = false;\n      }\n    });\n    function syncPosition() {\n      var _a;\n      (_a = followerRef.value) === null || _a === void 0 ? void 0 : _a.syncPosition();\n    }\n    function handleMouseEnter(e) {\n      if (props.trigger === 'hover' && props.keepAliveOnHover && props.show) {\n        NPopover.handleMouseEnter(e);\n      }\n    }\n    function handleMouseLeave(e) {\n      if (props.trigger === 'hover' && props.keepAliveOnHover) {\n        NPopover.handleMouseLeave(e);\n      }\n    }\n    function handleMouseMoveOutside(e) {\n      if (props.trigger === 'hover' && !getTriggerElement().contains(getPreciseEventTarget(e))) {\n        NPopover.handleMouseMoveOutside(e);\n      }\n    }\n    function handleClickOutside(e) {\n      if (props.trigger === 'click' && !getTriggerElement().contains(getPreciseEventTarget(e)) || props.onClickoutside) {\n        NPopover.handleClickOutside(e);\n      }\n    }\n    function getTriggerElement() {\n      return NPopover.getTriggerElement();\n    }\n    provide(popoverBodyInjectionKey, bodyRef);\n    provide(drawerBodyInjectionKey, null);\n    provide(modalBodyInjectionKey, null);\n    function renderContentNode() {\n      themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender();\n      const shouldRenderDom = props.displayDirective === 'show' || props.show || props.animated && displayedRef.value;\n      if (!shouldRenderDom) {\n        return null;\n      }\n      let contentNode;\n      const renderBody = NPopover.internalRenderBodyRef.value;\n      const {\n        value: mergedClsPrefix\n      } = mergedClsPrefixRef;\n      if (!renderBody) {\n        const {\n          value: extraClass\n        } = NPopover.extraClassRef;\n        const {\n          internalTrapFocus\n        } = props;\n        const hasHeaderOrFooter = !isSlotEmpty(slots.header) || !isSlotEmpty(slots.footer);\n        const renderContentInnerNode = () => {\n          var _a, _b;\n          const body = hasHeaderOrFooter ? h(Fragment, null, resolveWrappedSlot(slots.header, children => {\n            return children ? h(\"div\", {\n              class: [`${mergedClsPrefix}-popover__header`, props.headerClass],\n              style: props.headerStyle\n            }, children) : null;\n          }), resolveWrappedSlot(slots.default, children => {\n            return children ? h(\"div\", {\n              class: [`${mergedClsPrefix}-popover__content`, props.contentClass],\n              style: props.contentStyle\n            }, slots) : null;\n          }), resolveWrappedSlot(slots.footer, children => {\n            return children ? h(\"div\", {\n              class: [`${mergedClsPrefix}-popover__footer`, props.footerClass],\n              style: props.footerStyle\n            }, children) : null;\n          })) : props.scrollable ? (_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots) : h(\"div\", {\n            class: [`${mergedClsPrefix}-popover__content`, props.contentClass],\n            style: props.contentStyle\n          }, slots);\n          const maybeScrollableBody = props.scrollable ? h(NxScrollbar, {\n            contentClass: hasHeaderOrFooter ? undefined : `${mergedClsPrefix}-popover__content ${(_b = props.contentClass) !== null && _b !== void 0 ? _b : ''}`,\n            contentStyle: hasHeaderOrFooter ? undefined : props.contentStyle\n          }, {\n            default: () => body\n          }) : body;\n          const arrow = props.showArrow ? renderArrow({\n            arrowClass: props.arrowClass,\n            arrowStyle: props.arrowStyle,\n            arrowWrapperClass: props.arrowWrapperClass,\n            arrowWrapperStyle: props.arrowWrapperStyle,\n            clsPrefix: mergedClsPrefix\n          }) : null;\n          return [maybeScrollableBody, arrow];\n        };\n        contentNode = h('div', mergeProps({\n          class: [`${mergedClsPrefix}-popover`, `${mergedClsPrefix}-popover-shared`, themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass.value, extraClass.map(v => `${mergedClsPrefix}-${v}`), {\n            [`${mergedClsPrefix}-popover--scrollable`]: props.scrollable,\n            [`${mergedClsPrefix}-popover--show-header-or-footer`]: hasHeaderOrFooter,\n            [`${mergedClsPrefix}-popover--raw`]: props.raw,\n            [`${mergedClsPrefix}-popover-shared--overlap`]: props.overlap,\n            [`${mergedClsPrefix}-popover-shared--show-arrow`]: props.showArrow,\n            [`${mergedClsPrefix}-popover-shared--center-arrow`]: props.arrowPointToCenter\n          }],\n          ref: bodyRef,\n          style: styleRef.value,\n          onKeydown: NPopover.handleKeydown,\n          onMouseenter: handleMouseEnter,\n          onMouseleave: handleMouseLeave\n        }, attrs), internalTrapFocus ? h(VFocusTrap, {\n          active: props.show,\n          autoFocus: true\n        }, {\n          default: renderContentInnerNode\n        }) : renderContentInnerNode());\n      } else {\n        contentNode = renderBody(\n        // The popover class and overlap class must exists, they will be used\n        // to place the body & transition animation.\n        // Shadow class exists for reuse box-shadow.\n        [`${mergedClsPrefix}-popover-shared`, themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass.value, props.overlap && `${mergedClsPrefix}-popover-shared--overlap`, props.showArrow && `${mergedClsPrefix}-popover-shared--show-arrow`, props.arrowPointToCenter && `${mergedClsPrefix}-popover-shared--center-arrow`], bodyRef, styleRef.value, handleMouseEnter, handleMouseLeave);\n      }\n      return withDirectives(contentNode, directivesRef.value);\n    }\n    return {\n      displayed: displayedRef,\n      namespace: namespaceRef,\n      isMounted: NPopover.isMountedRef,\n      zIndex: NPopover.zIndexRef,\n      followerRef,\n      adjustedTo: useAdjustedTo(props),\n      followerEnabled: followerEnabledRef,\n      renderContentNode\n    };\n  },\n  render() {\n    return h(VFollower, {\n      ref: \"followerRef\",\n      zIndex: this.zIndex,\n      show: this.show,\n      enabled: this.followerEnabled,\n      to: this.adjustedTo,\n      x: this.x,\n      y: this.y,\n      flip: this.flip,\n      placement: this.placement,\n      containerClass: this.namespace,\n      overlap: this.overlap,\n      width: this.width === 'trigger' ? 'target' : undefined,\n      teleportDisabled: this.adjustedTo === useAdjustedTo.tdkey\n    }, {\n      default: () => {\n        return this.animated ? h(Transition, {\n          name: \"popover-transition\",\n          appear: this.isMounted,\n          // Don't use watch to enable follower, since the transition may\n          // make position sync timing very subtle and buggy.\n          onEnter: () => {\n            this.followerEnabled = true;\n          },\n          onAfterLeave: () => {\n            var _a;\n            (_a = this.internalOnAfterLeave) === null || _a === void 0 ? void 0 : _a.call(this);\n            this.followerEnabled = false;\n            this.displayed = false;\n          }\n        }, {\n          default: this.renderContentNode\n        }) : this.renderContentNode();\n      }\n    });\n  }\n});","import { zindexable } from 'vdirs';\nimport { useCompitable, useIsMounted, useMemo, useMergedState } from 'vooks';\nimport { cloneVNode, computed, defineComponent, h, provide, ref, Text, toRef, watchEffect, withDirectives } from 'vue';\nimport { VBinder, VTarget } from 'vueuc';\nimport { useTheme } from \"../../_mixins/index.mjs\";\nimport { call, getFirstSlotVNode, keep, useAdjustedTo, warnOnce } from \"../../_utils/index.mjs\";\nimport NPopoverBody, { popoverBodyProps } from \"./PopoverBody.mjs\";\nconst bodyPropKeys = Object.keys(popoverBodyProps);\nconst triggerEventMap = {\n  focus: ['onFocus', 'onBlur'],\n  click: ['onClick'],\n  hover: ['onMouseenter', 'onMouseleave'],\n  manual: [],\n  nested: ['onFocus', 'onBlur', 'onMouseenter', 'onMouseleave', 'onClick']\n};\nfunction appendEvents(vNode, trigger, events) {\n  triggerEventMap[trigger].forEach(eventName => {\n    if (!vNode.props) {\n      vNode.props = {};\n    } else {\n      vNode.props = Object.assign({}, vNode.props);\n    }\n    const originalHandler = vNode.props[eventName];\n    const handler = events[eventName];\n    if (!originalHandler) {\n      vNode.props[eventName] = handler;\n    } else {\n      vNode.props[eventName] = (...args) => {\n        originalHandler(...args);\n        handler(...args);\n      };\n    }\n  });\n}\nexport const popoverBaseProps = {\n  show: {\n    type: Boolean,\n    default: undefined\n  },\n  defaultShow: Boolean,\n  showArrow: {\n    type: Boolean,\n    default: true\n  },\n  trigger: {\n    type: String,\n    default: 'hover'\n  },\n  delay: {\n    type: Number,\n    default: 100\n  },\n  duration: {\n    type: Number,\n    default: 100\n  },\n  raw: Boolean,\n  placement: {\n    type: String,\n    default: 'top'\n  },\n  x: Number,\n  y: Number,\n  arrowPointToCenter: Boolean,\n  disabled: Boolean,\n  getDisabled: Function,\n  displayDirective: {\n    type: String,\n    default: 'if'\n  },\n  arrowClass: String,\n  arrowStyle: [String, Object],\n  arrowWrapperClass: String,\n  arrowWrapperStyle: [String, Object],\n  flip: {\n    type: Boolean,\n    default: true\n  },\n  animated: {\n    type: Boolean,\n    default: true\n  },\n  width: {\n    type: [Number, String],\n    default: undefined\n  },\n  overlap: Boolean,\n  keepAliveOnHover: {\n    type: Boolean,\n    default: true\n  },\n  zIndex: Number,\n  to: useAdjustedTo.propTo,\n  scrollable: Boolean,\n  contentClass: String,\n  contentStyle: [Object, String],\n  headerClass: String,\n  headerStyle: [Object, String],\n  footerClass: String,\n  footerStyle: [Object, String],\n  // events\n  onClickoutside: Function,\n  'onUpdate:show': [Function, Array],\n  onUpdateShow: [Function, Array],\n  // internal\n  internalDeactivateImmediately: Boolean,\n  internalSyncTargetWithParent: Boolean,\n  internalInheritedEventHandlers: {\n    type: Array,\n    default: () => []\n  },\n  internalTrapFocus: Boolean,\n  internalExtraClass: {\n    type: Array,\n    default: () => []\n  },\n  // deprecated\n  onShow: [Function, Array],\n  onHide: [Function, Array],\n  arrow: {\n    type: Boolean,\n    default: undefined\n  },\n  minWidth: Number,\n  maxWidth: Number\n};\nexport const popoverProps = Object.assign(Object.assign(Object.assign({}, useTheme.props), popoverBaseProps), {\n  internalOnAfterLeave: Function,\n  internalRenderBody: Function\n});\nexport default defineComponent({\n  name: 'Popover',\n  inheritAttrs: false,\n  props: popoverProps,\n  slots: Object,\n  __popover__: true,\n  setup(props) {\n    if (process.env.NODE_ENV !== 'production') {\n      watchEffect(() => {\n        if (props.maxWidth !== undefined) {\n          warnOnce('popover', '`max-width` is deprecated, please use `style` instead.');\n        }\n        if (props.minWidth !== undefined) {\n          warnOnce('popover', '`min-width` is deprecated, please use `style` instead.');\n        }\n        if (props.arrow !== undefined) {\n          warnOnce('popover', '`arrow` is deprecated, please use `showArrow` instead.');\n        }\n        if (props.onHide !== undefined) {\n          warnOnce('popover', '`on-hide` is deprecated, please use `on-update:show` instead.');\n        }\n        if (props.onShow !== undefined) {\n          warnOnce('popover', '`on-show` is deprecated, please use `on-update:show` instead.');\n        }\n      });\n    }\n    const isMountedRef = useIsMounted();\n    const binderInstRef = ref(null);\n    // setup show\n    const controlledShowRef = computed(() => props.show);\n    const uncontrolledShowRef = ref(props.defaultShow);\n    const mergedShowWithoutDisabledRef = useMergedState(controlledShowRef, uncontrolledShowRef);\n    const mergedShowConsideringDisabledPropRef = useMemo(() => {\n      if (props.disabled) return false;\n      return mergedShowWithoutDisabledRef.value;\n    });\n    const getMergedDisabled = () => {\n      if (props.disabled) return true;\n      const {\n        getDisabled\n      } = props;\n      if (getDisabled === null || getDisabled === void 0 ? void 0 : getDisabled()) return true;\n      return false;\n    };\n    const getMergedShow = () => {\n      if (getMergedDisabled()) return false;\n      return mergedShowWithoutDisabledRef.value;\n    };\n    // setup show-arrow\n    const compatibleShowArrowRef = useCompitable(props, ['arrow', 'showArrow']);\n    const mergedShowArrowRef = computed(() => {\n      if (props.overlap) return false;\n      return compatibleShowArrowRef.value;\n    });\n    // bodyInstance\n    let bodyInstance = null;\n    const showTimerIdRef = ref(null);\n    const hideTimerIdRef = ref(null);\n    const positionManuallyRef = useMemo(() => {\n      return props.x !== undefined && props.y !== undefined;\n    });\n    // methods\n    function doUpdateShow(value) {\n      const {\n        'onUpdate:show': _onUpdateShow,\n        onUpdateShow,\n        onShow,\n        onHide\n      } = props;\n      uncontrolledShowRef.value = value;\n      if (_onUpdateShow) {\n        call(_onUpdateShow, value);\n      }\n      if (onUpdateShow) {\n        call(onUpdateShow, value);\n      }\n      if (value && onShow) {\n        call(onShow, true);\n      }\n      if (value && onHide) {\n        call(onHide, false);\n      }\n    }\n    function syncPosition() {\n      if (bodyInstance) {\n        bodyInstance.syncPosition();\n      }\n    }\n    function clearShowTimer() {\n      const {\n        value: showTimerId\n      } = showTimerIdRef;\n      if (showTimerId) {\n        window.clearTimeout(showTimerId);\n        showTimerIdRef.value = null;\n      }\n    }\n    function clearHideTimer() {\n      const {\n        value: hideTimerId\n      } = hideTimerIdRef;\n      if (hideTimerId) {\n        window.clearTimeout(hideTimerId);\n        hideTimerIdRef.value = null;\n      }\n    }\n    function handleFocus() {\n      const mergedDisabled = getMergedDisabled();\n      if (props.trigger === 'focus' && !mergedDisabled) {\n        if (getMergedShow()) return;\n        doUpdateShow(true);\n      }\n    }\n    function handleBlur() {\n      const mergedDisabled = getMergedDisabled();\n      if (props.trigger === 'focus' && !mergedDisabled) {\n        if (!getMergedShow()) return;\n        doUpdateShow(false);\n      }\n    }\n    function handleMouseEnter() {\n      const mergedDisabled = getMergedDisabled();\n      if (props.trigger === 'hover' && !mergedDisabled) {\n        clearHideTimer();\n        if (showTimerIdRef.value !== null) return;\n        if (getMergedShow()) return;\n        const delayCallback = () => {\n          doUpdateShow(true);\n          showTimerIdRef.value = null;\n        };\n        const {\n          delay\n        } = props;\n        if (delay === 0) {\n          delayCallback();\n        } else {\n          showTimerIdRef.value = window.setTimeout(delayCallback, delay);\n        }\n      }\n    }\n    function handleMouseLeave() {\n      const mergedDisabled = getMergedDisabled();\n      if (props.trigger === 'hover' && !mergedDisabled) {\n        clearShowTimer();\n        if (hideTimerIdRef.value !== null) return;\n        if (!getMergedShow()) return;\n        const delayedCallback = () => {\n          doUpdateShow(false);\n          hideTimerIdRef.value = null;\n        };\n        const {\n          duration\n        } = props;\n        if (duration === 0) {\n          delayedCallback();\n        } else {\n          hideTimerIdRef.value = window.setTimeout(delayedCallback, duration);\n        }\n      }\n    }\n    // will be called in popover-content\n    function handleMouseMoveOutside() {\n      handleMouseLeave();\n    }\n    // will be called in popover-content\n    function handleClickOutside(e) {\n      var _a;\n      if (!getMergedShow()) return;\n      if (props.trigger === 'click') {\n        clearShowTimer();\n        clearHideTimer();\n        doUpdateShow(false);\n      }\n      (_a = props.onClickoutside) === null || _a === void 0 ? void 0 : _a.call(props, e);\n    }\n    function handleClick() {\n      if (props.trigger === 'click' && !getMergedDisabled()) {\n        clearShowTimer();\n        clearHideTimer();\n        const nextShow = !getMergedShow();\n        doUpdateShow(nextShow);\n      }\n    }\n    function handleKeydown(e) {\n      if (!props.internalTrapFocus) return;\n      if (e.key === 'Escape') {\n        clearShowTimer();\n        clearHideTimer();\n        doUpdateShow(false);\n      }\n    }\n    function setShow(value) {\n      uncontrolledShowRef.value = value;\n    }\n    function getTriggerElement() {\n      var _a;\n      return (_a = binderInstRef.value) === null || _a === void 0 ? void 0 : _a.targetRef;\n    }\n    function setBodyInstance(value) {\n      bodyInstance = value;\n    }\n    provide('NPopover', {\n      getTriggerElement,\n      handleKeydown,\n      handleMouseEnter,\n      handleMouseLeave,\n      handleClickOutside,\n      handleMouseMoveOutside,\n      setBodyInstance,\n      positionManuallyRef,\n      isMountedRef,\n      zIndexRef: toRef(props, 'zIndex'),\n      extraClassRef: toRef(props, 'internalExtraClass'),\n      internalRenderBodyRef: toRef(props, 'internalRenderBody')\n    });\n    watchEffect(() => {\n      if (mergedShowWithoutDisabledRef.value && getMergedDisabled()) {\n        doUpdateShow(false);\n      }\n    });\n    const returned = {\n      binderInstRef,\n      positionManually: positionManuallyRef,\n      mergedShowConsideringDisabledProp: mergedShowConsideringDisabledPropRef,\n      // if to show popover body\n      uncontrolledShow: uncontrolledShowRef,\n      mergedShowArrow: mergedShowArrowRef,\n      getMergedShow,\n      setShow,\n      handleClick,\n      handleMouseEnter,\n      handleMouseLeave,\n      handleFocus,\n      handleBlur,\n      syncPosition\n    };\n    return returned;\n  },\n  render() {\n    var _a;\n    const {\n      positionManually,\n      $slots: slots\n    } = this;\n    let triggerVNode;\n    let popoverInside = false;\n    if (!positionManually) {\n      triggerVNode = getFirstSlotVNode(slots, 'trigger');\n      if (triggerVNode) {\n        triggerVNode = cloneVNode(triggerVNode);\n        triggerVNode = triggerVNode.type === Text ? h('span', [triggerVNode]) : triggerVNode;\n        const handlers = {\n          onClick: this.handleClick,\n          onMouseenter: this.handleMouseEnter,\n          onMouseleave: this.handleMouseLeave,\n          onFocus: this.handleFocus,\n          onBlur: this.handleBlur\n        };\n        if ((_a = triggerVNode.type) === null || _a === void 0 ? void 0 : _a.__popover__) {\n          popoverInside = true;\n          // We assume that there's no DOM event handlers on popover element\n          if (!triggerVNode.props) {\n            triggerVNode.props = {\n              internalSyncTargetWithParent: true,\n              internalInheritedEventHandlers: []\n            };\n          }\n          triggerVNode.props.internalSyncTargetWithParent = true;\n          if (!triggerVNode.props.internalInheritedEventHandlers) {\n            triggerVNode.props.internalInheritedEventHandlers = [handlers];\n          } else {\n            triggerVNode.props.internalInheritedEventHandlers = [handlers, ...triggerVNode.props.internalInheritedEventHandlers];\n          }\n        } else {\n          const {\n            internalInheritedEventHandlers\n          } = this;\n          const ascendantAndCurrentHandlers = [handlers, ...internalInheritedEventHandlers];\n          const mergedHandlers = {\n            onBlur: e => {\n              ascendantAndCurrentHandlers.forEach(_handlers => {\n                _handlers.onBlur(e);\n              });\n            },\n            onFocus: e => {\n              ascendantAndCurrentHandlers.forEach(_handlers => {\n                _handlers.onFocus(e);\n              });\n            },\n            onClick: e => {\n              ascendantAndCurrentHandlers.forEach(_handlers => {\n                _handlers.onClick(e);\n              });\n            },\n            onMouseenter: e => {\n              ascendantAndCurrentHandlers.forEach(_handlers => {\n                _handlers.onMouseenter(e);\n              });\n            },\n            onMouseleave: e => {\n              ascendantAndCurrentHandlers.forEach(_handlers => {\n                _handlers.onMouseleave(e);\n              });\n            }\n          };\n          appendEvents(triggerVNode, internalInheritedEventHandlers ? 'nested' : positionManually ? 'manual' : this.trigger, mergedHandlers);\n        }\n      }\n    }\n    return h(VBinder, {\n      ref: \"binderInstRef\",\n      syncTarget: !popoverInside,\n      syncTargetWithParent: this.internalSyncTargetWithParent\n    }, {\n      default: () => {\n        // We need to subscribe it. Sometimes rerender won't ge triggered.\n        // `mergedShowConsideringDisabledProp` is not the final disabled status.\n        // In ellpisis it's dynamic.\n        void this.mergedShowConsideringDisabledProp;\n        const mergedShow = this.getMergedShow();\n        return [this.internalTrapFocus && mergedShow ? withDirectives(h(\"div\", {\n          style: {\n            position: 'fixed',\n            top: 0,\n            right: 0,\n            bottom: 0,\n            left: 0\n          }\n        }), [[zindexable, {\n          enabled: mergedShow,\n          zIndex: this.zIndex\n        }]]) : null, positionManually ? null : h(VTarget, null, {\n          default: () => triggerVNode\n        }), h(NPopoverBody, keep(this.$props, bodyPropKeys, Object.assign(Object.assign({}, this.$attrs), {\n          showArrow: this.mergedShowArrow,\n          show: mergedShow\n        })), {\n          default: () => {\n            var _a, _b;\n            return (_b = (_a = this.$slots).default) === null || _b === void 0 ? void 0 : _b.call(_a);\n          },\n          header: () => {\n            var _a, _b;\n            return (_b = (_a = this.$slots).header) === null || _b === void 0 ? void 0 : _b.call(_a);\n          },\n          footer: () => {\n            var _a, _b;\n            return (_b = (_a = this.$slots).footer) === null || _b === void 0 ? void 0 : _b.call(_a);\n          }\n        })];\n      }\n    });\n  }\n});","export default {\n  closeIconSizeTiny: '12px',\n  closeIconSizeSmall: '12px',\n  closeIconSizeMedium: '14px',\n  closeIconSizeLarge: '14px',\n  closeSizeTiny: '16px',\n  closeSizeSmall: '16px',\n  closeSizeMedium: '18px',\n  closeSizeLarge: '18px',\n  padding: '0 7px',\n  closeMargin: '0 0 0 4px'\n};","import { changeColor, scaleColor } from 'seemly';\nimport { commonDark } from \"../../_styles/common/index.mjs\";\nimport commonVariables from \"./_common.mjs\";\nconst tagDark = {\n  name: 'Tag',\n  common: commonDark,\n  self(vars) {\n    const {\n      textColor2,\n      primaryColorHover,\n      primaryColorPressed,\n      primaryColor,\n      infoColor,\n      successColor,\n      warningColor,\n      errorColor,\n      baseColor,\n      borderColor,\n      tagColor,\n      opacityDisabled,\n      closeIconColor,\n      closeIconColorHover,\n      closeIconColorPressed,\n      closeColorHover,\n      closeColorPressed,\n      borderRadiusSmall: borderRadius,\n      fontSizeMini,\n      fontSizeTiny,\n      fontSizeSmall,\n      fontSizeMedium,\n      heightMini,\n      heightTiny,\n      heightSmall,\n      heightMedium,\n      buttonColor2Hover,\n      buttonColor2Pressed,\n      fontWeightStrong\n    } = vars;\n    return Object.assign(Object.assign({}, commonVariables), {\n      closeBorderRadius: borderRadius,\n      heightTiny: heightMini,\n      heightSmall: heightTiny,\n      heightMedium: heightSmall,\n      heightLarge: heightMedium,\n      borderRadius,\n      opacityDisabled,\n      fontSizeTiny: fontSizeMini,\n      fontSizeSmall: fontSizeTiny,\n      fontSizeMedium: fontSizeSmall,\n      fontSizeLarge: fontSizeMedium,\n      fontWeightStrong,\n      // checked\n      textColorCheckable: textColor2,\n      textColorHoverCheckable: textColor2,\n      textColorPressedCheckable: textColor2,\n      textColorChecked: baseColor,\n      colorCheckable: '#0000',\n      colorHoverCheckable: buttonColor2Hover,\n      colorPressedCheckable: buttonColor2Pressed,\n      colorChecked: primaryColor,\n      colorCheckedHover: primaryColorHover,\n      colorCheckedPressed: primaryColorPressed,\n      // default\n      border: `1px solid ${borderColor}`,\n      textColor: textColor2,\n      color: tagColor,\n      colorBordered: '#0000',\n      closeIconColor,\n      closeIconColorHover,\n      closeIconColorPressed,\n      closeColorHover,\n      closeColorPressed,\n      borderPrimary: `1px solid ${changeColor(primaryColor, {\n        alpha: 0.3\n      })}`,\n      textColorPrimary: primaryColor,\n      colorPrimary: changeColor(primaryColor, {\n        alpha: 0.16\n      }),\n      colorBorderedPrimary: '#0000',\n      closeIconColorPrimary: scaleColor(primaryColor, {\n        lightness: 0.7\n      }),\n      closeIconColorHoverPrimary: scaleColor(primaryColor, {\n        lightness: 0.7\n      }),\n      closeIconColorPressedPrimary: scaleColor(primaryColor, {\n        lightness: 0.7\n      }),\n      closeColorHoverPrimary: changeColor(primaryColor, {\n        alpha: 0.16\n      }),\n      closeColorPressedPrimary: changeColor(primaryColor, {\n        alpha: 0.12\n      }),\n      borderInfo: `1px solid ${changeColor(infoColor, {\n        alpha: 0.3\n      })}`,\n      textColorInfo: infoColor,\n      colorInfo: changeColor(infoColor, {\n        alpha: 0.16\n      }),\n      colorBorderedInfo: '#0000',\n      closeIconColorInfo: scaleColor(infoColor, {\n        alpha: 0.7\n      }),\n      closeIconColorHoverInfo: scaleColor(infoColor, {\n        alpha: 0.7\n      }),\n      closeIconColorPressedInfo: scaleColor(infoColor, {\n        alpha: 0.7\n      }),\n      closeColorHoverInfo: changeColor(infoColor, {\n        alpha: 0.16\n      }),\n      closeColorPressedInfo: changeColor(infoColor, {\n        alpha: 0.12\n      }),\n      borderSuccess: `1px solid ${changeColor(successColor, {\n        alpha: 0.3\n      })}`,\n      textColorSuccess: successColor,\n      colorSuccess: changeColor(successColor, {\n        alpha: 0.16\n      }),\n      colorBorderedSuccess: '#0000',\n      closeIconColorSuccess: scaleColor(successColor, {\n        alpha: 0.7\n      }),\n      closeIconColorHoverSuccess: scaleColor(successColor, {\n        alpha: 0.7\n      }),\n      closeIconColorPressedSuccess: scaleColor(successColor, {\n        alpha: 0.7\n      }),\n      closeColorHoverSuccess: changeColor(successColor, {\n        alpha: 0.16\n      }),\n      closeColorPressedSuccess: changeColor(successColor, {\n        alpha: 0.12\n      }),\n      borderWarning: `1px solid ${changeColor(warningColor, {\n        alpha: 0.3\n      })}`,\n      textColorWarning: warningColor,\n      colorWarning: changeColor(warningColor, {\n        alpha: 0.16\n      }),\n      colorBorderedWarning: '#0000',\n      closeIconColorWarning: scaleColor(warningColor, {\n        alpha: 0.7\n      }),\n      closeIconColorHoverWarning: scaleColor(warningColor, {\n        alpha: 0.7\n      }),\n      closeIconColorPressedWarning: scaleColor(warningColor, {\n        alpha: 0.7\n      }),\n      closeColorHoverWarning: changeColor(warningColor, {\n        alpha: 0.16\n      }),\n      closeColorPressedWarning: changeColor(warningColor, {\n        alpha: 0.11\n      }),\n      borderError: `1px solid ${changeColor(errorColor, {\n        alpha: 0.3\n      })}`,\n      textColorError: errorColor,\n      colorError: changeColor(errorColor, {\n        alpha: 0.16\n      }),\n      colorBorderedError: '#0000',\n      closeIconColorError: scaleColor(errorColor, {\n        alpha: 0.7\n      }),\n      closeIconColorHoverError: scaleColor(errorColor, {\n        alpha: 0.7\n      }),\n      closeIconColorPressedError: scaleColor(errorColor, {\n        alpha: 0.7\n      }),\n      closeColorHoverError: changeColor(errorColor, {\n        alpha: 0.16\n      }),\n      closeColorPressedError: changeColor(errorColor, {\n        alpha: 0.12\n      })\n    });\n  }\n};\nexport default tagDark;","import { changeColor } from 'seemly';\nimport { commonLight } from \"../../_styles/common/index.mjs\";\nimport commonVariables from \"./_common.mjs\";\nfunction self(vars) {\n  const {\n    textColor2,\n    primaryColorHover,\n    primaryColorPressed,\n    primaryColor,\n    infoColor,\n    successColor,\n    warningColor,\n    errorColor,\n    baseColor,\n    borderColor,\n    opacityDisabled,\n    tagColor,\n    closeIconColor,\n    closeIconColorHover,\n    closeIconColorPressed,\n    borderRadiusSmall: borderRadius,\n    fontSizeMini,\n    fontSizeTiny,\n    fontSizeSmall,\n    fontSizeMedium,\n    heightMini,\n    heightTiny,\n    heightSmall,\n    heightMedium,\n    closeColorHover,\n    closeColorPressed,\n    buttonColor2Hover,\n    buttonColor2Pressed,\n    fontWeightStrong\n  } = vars;\n  return Object.assign(Object.assign({}, commonVariables), {\n    closeBorderRadius: borderRadius,\n    heightTiny: heightMini,\n    heightSmall: heightTiny,\n    heightMedium: heightSmall,\n    heightLarge: heightMedium,\n    borderRadius,\n    opacityDisabled,\n    fontSizeTiny: fontSizeMini,\n    fontSizeSmall: fontSizeTiny,\n    fontSizeMedium: fontSizeSmall,\n    fontSizeLarge: fontSizeMedium,\n    fontWeightStrong,\n    // checked\n    textColorCheckable: textColor2,\n    textColorHoverCheckable: textColor2,\n    textColorPressedCheckable: textColor2,\n    textColorChecked: baseColor,\n    colorCheckable: '#0000',\n    colorHoverCheckable: buttonColor2Hover,\n    colorPressedCheckable: buttonColor2Pressed,\n    colorChecked: primaryColor,\n    colorCheckedHover: primaryColorHover,\n    colorCheckedPressed: primaryColorPressed,\n    // default\n    border: `1px solid ${borderColor}`,\n    textColor: textColor2,\n    color: tagColor,\n    colorBordered: 'rgb(250, 250, 252)',\n    closeIconColor,\n    closeIconColorHover,\n    closeIconColorPressed,\n    closeColorHover,\n    closeColorPressed,\n    borderPrimary: `1px solid ${changeColor(primaryColor, {\n      alpha: 0.3\n    })}`,\n    textColorPrimary: primaryColor,\n    colorPrimary: changeColor(primaryColor, {\n      alpha: 0.12\n    }),\n    colorBorderedPrimary: changeColor(primaryColor, {\n      alpha: 0.1\n    }),\n    closeIconColorPrimary: primaryColor,\n    closeIconColorHoverPrimary: primaryColor,\n    closeIconColorPressedPrimary: primaryColor,\n    closeColorHoverPrimary: changeColor(primaryColor, {\n      alpha: 0.12\n    }),\n    closeColorPressedPrimary: changeColor(primaryColor, {\n      alpha: 0.18\n    }),\n    borderInfo: `1px solid ${changeColor(infoColor, {\n      alpha: 0.3\n    })}`,\n    textColorInfo: infoColor,\n    colorInfo: changeColor(infoColor, {\n      alpha: 0.12\n    }),\n    colorBorderedInfo: changeColor(infoColor, {\n      alpha: 0.1\n    }),\n    closeIconColorInfo: infoColor,\n    closeIconColorHoverInfo: infoColor,\n    closeIconColorPressedInfo: infoColor,\n    closeColorHoverInfo: changeColor(infoColor, {\n      alpha: 0.12\n    }),\n    closeColorPressedInfo: changeColor(infoColor, {\n      alpha: 0.18\n    }),\n    borderSuccess: `1px solid ${changeColor(successColor, {\n      alpha: 0.3\n    })}`,\n    textColorSuccess: successColor,\n    colorSuccess: changeColor(successColor, {\n      alpha: 0.12\n    }),\n    colorBorderedSuccess: changeColor(successColor, {\n      alpha: 0.1\n    }),\n    closeIconColorSuccess: successColor,\n    closeIconColorHoverSuccess: successColor,\n    closeIconColorPressedSuccess: successColor,\n    closeColorHoverSuccess: changeColor(successColor, {\n      alpha: 0.12\n    }),\n    closeColorPressedSuccess: changeColor(successColor, {\n      alpha: 0.18\n    }),\n    borderWarning: `1px solid ${changeColor(warningColor, {\n      alpha: 0.35\n    })}`,\n    textColorWarning: warningColor,\n    colorWarning: changeColor(warningColor, {\n      alpha: 0.15\n    }),\n    colorBorderedWarning: changeColor(warningColor, {\n      alpha: 0.12\n    }),\n    closeIconColorWarning: warningColor,\n    closeIconColorHoverWarning: warningColor,\n    closeIconColorPressedWarning: warningColor,\n    closeColorHoverWarning: changeColor(warningColor, {\n      alpha: 0.12\n    }),\n    closeColorPressedWarning: changeColor(warningColor, {\n      alpha: 0.18\n    }),\n    borderError: `1px solid ${changeColor(errorColor, {\n      alpha: 0.23\n    })}`,\n    textColorError: errorColor,\n    colorError: changeColor(errorColor, {\n      alpha: 0.1\n    }),\n    colorBorderedError: changeColor(errorColor, {\n      alpha: 0.08\n    }),\n    closeIconColorError: errorColor,\n    closeIconColorHoverError: errorColor,\n    closeIconColorPressedError: errorColor,\n    closeColorHoverError: changeColor(errorColor, {\n      alpha: 0.12\n    }),\n    closeColorPressedError: changeColor(errorColor, {\n      alpha: 0.18\n    })\n  });\n}\nconst tagLight = {\n  name: 'Tag',\n  common: commonLight,\n  self\n};\nexport default tagLight;","export default {\n  color: Object,\n  type: {\n    type: String,\n    default: 'default'\n  },\n  round: Boolean,\n  size: {\n    type: String,\n    default: 'medium'\n  },\n  closable: Boolean,\n  disabled: {\n    type: Boolean,\n    default: undefined\n  }\n};","import { c, cB, cE, cM, cNotM } from \"../../../_utils/cssr/index.mjs\";\n// vars:\n// --n-bezier\n// --n-border-radius\n// --n-border\n// --n-close-icon-color\n// --n-close-icon-color-hover\n// --n-close-icon-color-pressed\n// --n-close-margin\n// --n-close-size\n// --n-color\n// --n-color-checkable\n// --n-color-checked\n// --n-color-checked-hover\n// --n-color-checked-pressed\n// --n-color-hover-checkable\n// --n-color-pressed-checkable\n// --n-font-size\n// --n-height\n// --n-opacity-disabled\n// --n-padding\n// --n-text-color\n// --n-text-color-checkable\n// --n-text-color-checked\n// --n-text-color-hover-checkable\n// --n-text-color-pressed-checkable\n// --n-font-weight-strong\nexport default cB('tag', `\n --n-close-margin: var(--n-close-margin-top) var(--n-close-margin-right) var(--n-close-margin-bottom) var(--n-close-margin-left);\n white-space: nowrap;\n position: relative;\n box-sizing: border-box;\n cursor: default;\n display: inline-flex;\n align-items: center;\n flex-wrap: nowrap;\n padding: var(--n-padding);\n border-radius: var(--n-border-radius);\n color: var(--n-text-color);\n background-color: var(--n-color);\n transition: \n border-color .3s var(--n-bezier),\n background-color .3s var(--n-bezier),\n color .3s var(--n-bezier),\n box-shadow .3s var(--n-bezier),\n opacity .3s var(--n-bezier);\n line-height: 1;\n height: var(--n-height);\n font-size: var(--n-font-size);\n`, [cM('strong', `\n font-weight: var(--n-font-weight-strong);\n `), cE('border', `\n pointer-events: none;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n border-radius: inherit;\n border: var(--n-border);\n transition: border-color .3s var(--n-bezier);\n `), cE('icon', `\n display: flex;\n margin: 0 4px 0 0;\n color: var(--n-text-color);\n transition: color .3s var(--n-bezier);\n font-size: var(--n-avatar-size-override);\n `), cE('avatar', `\n display: flex;\n margin: 0 6px 0 0;\n `), cE('close', `\n margin: var(--n-close-margin);\n transition:\n background-color .3s var(--n-bezier),\n color .3s var(--n-bezier);\n `), cM('round', `\n padding: 0 calc(var(--n-height) / 3);\n border-radius: calc(var(--n-height) / 2);\n `, [cE('icon', `\n margin: 0 4px 0 calc((var(--n-height) - 8px) / -2);\n `), cE('avatar', `\n margin: 0 6px 0 calc((var(--n-height) - 8px) / -2);\n `), cM('closable', `\n padding: 0 calc(var(--n-height) / 4) 0 calc(var(--n-height) / 3);\n `)]), cM('icon, avatar', [cM('round', `\n padding: 0 calc(var(--n-height) / 3) 0 calc(var(--n-height) / 2);\n `)]), cM('disabled', `\n cursor: not-allowed !important;\n opacity: var(--n-opacity-disabled);\n `), cM('checkable', `\n cursor: pointer;\n box-shadow: none;\n color: var(--n-text-color-checkable);\n background-color: var(--n-color-checkable);\n `, [cNotM('disabled', [c('&:hover', 'background-color: var(--n-color-hover-checkable);', [cNotM('checked', 'color: var(--n-text-color-hover-checkable);')]), c('&:active', 'background-color: var(--n-color-pressed-checkable);', [cNotM('checked', 'color: var(--n-text-color-pressed-checkable);')])]), cM('checked', `\n color: var(--n-text-color-checked);\n background-color: var(--n-color-checked);\n `, [cNotM('disabled', [c('&:hover', 'background-color: var(--n-color-checked-hover);'), c('&:active', 'background-color: var(--n-color-checked-pressed);')])])])]);","import { getMargin } from 'seemly';\nimport { computed, defineComponent, h, provide, ref, toRef, watchEffect } from 'vue';\nimport { NBaseClose } from \"../../_internal/close/index.mjs\";\nimport { useConfig, useTheme, useThemeClass } from \"../../_mixins/index.mjs\";\nimport { useRtl } from \"../../_mixins/use-rtl.mjs\";\nimport { call, color2Class, createInjectionKey, createKey, resolveWrappedSlot, warnOnce } from \"../../_utils/index.mjs\";\nimport { tagLight } from \"../styles/index.mjs\";\nimport commonProps from \"./common-props.mjs\";\nimport style from \"./styles/index.cssr.mjs\";\nexport const tagProps = Object.assign(Object.assign(Object.assign({}, useTheme.props), commonProps), {\n  bordered: {\n    type: Boolean,\n    default: undefined\n  },\n  checked: Boolean,\n  checkable: Boolean,\n  strong: Boolean,\n  triggerClickOnClose: Boolean,\n  onClose: [Array, Function],\n  onMouseenter: Function,\n  onMouseleave: Function,\n  'onUpdate:checked': Function,\n  onUpdateChecked: Function,\n  // private\n  internalCloseFocusable: {\n    type: Boolean,\n    default: true\n  },\n  internalCloseIsButtonTag: {\n    type: Boolean,\n    default: true\n  },\n  // deprecated\n  onCheckedChange: Function\n});\nexport const tagInjectionKey = createInjectionKey('n-tag');\nexport default defineComponent({\n  name: 'Tag',\n  props: tagProps,\n  slots: Object,\n  setup(props) {\n    if (process.env.NODE_ENV !== 'production') {\n      watchEffect(() => {\n        if (props.onCheckedChange !== undefined) {\n          warnOnce('tag', '`on-checked-change` is deprecated, please use `on-update:checked` instead');\n        }\n      });\n    }\n    const contentRef = ref(null);\n    const {\n      mergedBorderedRef,\n      mergedClsPrefixRef,\n      inlineThemeDisabled,\n      mergedRtlRef\n    } = useConfig(props);\n    const themeRef = useTheme('Tag', '-tag', style, tagLight, props, mergedClsPrefixRef);\n    provide(tagInjectionKey, {\n      roundRef: toRef(props, 'round')\n    });\n    function handleClick() {\n      if (!props.disabled) {\n        if (props.checkable) {\n          const {\n            checked,\n            onCheckedChange,\n            onUpdateChecked,\n            'onUpdate:checked': _onUpdateChecked\n          } = props;\n          if (onUpdateChecked) onUpdateChecked(!checked);\n          if (_onUpdateChecked) _onUpdateChecked(!checked);\n          // deprecated\n          if (onCheckedChange) onCheckedChange(!checked);\n        }\n      }\n    }\n    function handleCloseClick(e) {\n      if (!props.triggerClickOnClose) {\n        e.stopPropagation();\n      }\n      if (!props.disabled) {\n        const {\n          onClose\n        } = props;\n        if (onClose) call(onClose, e);\n      }\n    }\n    const tagPublicMethods = {\n      setTextContent(textContent) {\n        const {\n          value\n        } = contentRef;\n        if (value) value.textContent = textContent;\n      }\n    };\n    const rtlEnabledRef = useRtl('Tag', mergedRtlRef, mergedClsPrefixRef);\n    const cssVarsRef = computed(() => {\n      const {\n        type,\n        size,\n        color: {\n          color,\n          textColor\n        } = {}\n      } = props;\n      const {\n        common: {\n          cubicBezierEaseInOut\n        },\n        self: {\n          padding,\n          closeMargin,\n          borderRadius,\n          opacityDisabled,\n          textColorCheckable,\n          textColorHoverCheckable,\n          textColorPressedCheckable,\n          textColorChecked,\n          colorCheckable,\n          colorHoverCheckable,\n          colorPressedCheckable,\n          colorChecked,\n          colorCheckedHover,\n          colorCheckedPressed,\n          closeBorderRadius,\n          fontWeightStrong,\n          [createKey('colorBordered', type)]: colorBordered,\n          [createKey('closeSize', size)]: closeSize,\n          [createKey('closeIconSize', size)]: closeIconSize,\n          [createKey('fontSize', size)]: fontSize,\n          [createKey('height', size)]: height,\n          [createKey('color', type)]: typedColor,\n          [createKey('textColor', type)]: typeTextColor,\n          [createKey('border', type)]: border,\n          [createKey('closeIconColor', type)]: closeIconColor,\n          [createKey('closeIconColorHover', type)]: closeIconColorHover,\n          [createKey('closeIconColorPressed', type)]: closeIconColorPressed,\n          [createKey('closeColorHover', type)]: closeColorHover,\n          [createKey('closeColorPressed', type)]: closeColorPressed\n        }\n      } = themeRef.value;\n      const closeMarginDiscrete = getMargin(closeMargin);\n      return {\n        '--n-font-weight-strong': fontWeightStrong,\n        '--n-avatar-size-override': `calc(${height} - 8px)`,\n        '--n-bezier': cubicBezierEaseInOut,\n        '--n-border-radius': borderRadius,\n        '--n-border': border,\n        '--n-close-icon-size': closeIconSize,\n        '--n-close-color-pressed': closeColorPressed,\n        '--n-close-color-hover': closeColorHover,\n        '--n-close-border-radius': closeBorderRadius,\n        '--n-close-icon-color': closeIconColor,\n        '--n-close-icon-color-hover': closeIconColorHover,\n        '--n-close-icon-color-pressed': closeIconColorPressed,\n        '--n-close-icon-color-disabled': closeIconColor,\n        '--n-close-margin-top': closeMarginDiscrete.top,\n        '--n-close-margin-right': closeMarginDiscrete.right,\n        '--n-close-margin-bottom': closeMarginDiscrete.bottom,\n        '--n-close-margin-left': closeMarginDiscrete.left,\n        '--n-close-size': closeSize,\n        '--n-color': color || (mergedBorderedRef.value ? colorBordered : typedColor),\n        '--n-color-checkable': colorCheckable,\n        '--n-color-checked': colorChecked,\n        '--n-color-checked-hover': colorCheckedHover,\n        '--n-color-checked-pressed': colorCheckedPressed,\n        '--n-color-hover-checkable': colorHoverCheckable,\n        '--n-color-pressed-checkable': colorPressedCheckable,\n        '--n-font-size': fontSize,\n        '--n-height': height,\n        '--n-opacity-disabled': opacityDisabled,\n        '--n-padding': padding,\n        '--n-text-color': textColor || typeTextColor,\n        '--n-text-color-checkable': textColorCheckable,\n        '--n-text-color-checked': textColorChecked,\n        '--n-text-color-hover-checkable': textColorHoverCheckable,\n        '--n-text-color-pressed-checkable': textColorPressedCheckable\n      };\n    });\n    const themeClassHandle = inlineThemeDisabled ? useThemeClass('tag', computed(() => {\n      let hash = '';\n      const {\n        type,\n        size,\n        color: {\n          color,\n          textColor\n        } = {}\n      } = props;\n      hash += type[0];\n      hash += size[0];\n      if (color) {\n        hash += `a${color2Class(color)}`;\n      }\n      if (textColor) {\n        hash += `b${color2Class(textColor)}`;\n      }\n      if (mergedBorderedRef.value) {\n        hash += 'c';\n      }\n      return hash;\n    }), cssVarsRef, props) : undefined;\n    return Object.assign(Object.assign({}, tagPublicMethods), {\n      rtlEnabled: rtlEnabledRef,\n      mergedClsPrefix: mergedClsPrefixRef,\n      contentRef,\n      mergedBordered: mergedBorderedRef,\n      handleClick,\n      handleCloseClick,\n      cssVars: inlineThemeDisabled ? undefined : cssVarsRef,\n      themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,\n      onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender\n    });\n  },\n  render() {\n    var _a, _b;\n    const {\n      mergedClsPrefix,\n      rtlEnabled,\n      closable,\n      color: {\n        borderColor\n      } = {},\n      round,\n      onRender,\n      $slots\n    } = this;\n    onRender === null || onRender === void 0 ? void 0 : onRender();\n    const avatarNode = resolveWrappedSlot($slots.avatar, children => children && h(\"div\", {\n      class: `${mergedClsPrefix}-tag__avatar`\n    }, children));\n    const iconNode = resolveWrappedSlot($slots.icon, children => children && h(\"div\", {\n      class: `${mergedClsPrefix}-tag__icon`\n    }, children));\n    return h(\"div\", {\n      class: [`${mergedClsPrefix}-tag`, this.themeClass, {\n        [`${mergedClsPrefix}-tag--rtl`]: rtlEnabled,\n        [`${mergedClsPrefix}-tag--strong`]: this.strong,\n        [`${mergedClsPrefix}-tag--disabled`]: this.disabled,\n        [`${mergedClsPrefix}-tag--checkable`]: this.checkable,\n        [`${mergedClsPrefix}-tag--checked`]: this.checkable && this.checked,\n        [`${mergedClsPrefix}-tag--round`]: round,\n        [`${mergedClsPrefix}-tag--avatar`]: avatarNode,\n        [`${mergedClsPrefix}-tag--icon`]: iconNode,\n        [`${mergedClsPrefix}-tag--closable`]: closable\n      }],\n      style: this.cssVars,\n      onClick: this.handleClick,\n      onMouseenter: this.onMouseenter,\n      onMouseleave: this.onMouseleave\n    }, iconNode || avatarNode, h(\"span\", {\n      class: `${mergedClsPrefix}-tag__content`,\n      ref: \"contentRef\"\n    }, (_b = (_a = this.$slots).default) === null || _b === void 0 ? void 0 : _b.call(_a)), !this.checkable && closable ? h(NBaseClose, {\n      clsPrefix: mergedClsPrefix,\n      class: `${mergedClsPrefix}-tag__close`,\n      disabled: this.disabled,\n      onClick: this.handleCloseClick,\n      focusable: this.internalCloseFocusable,\n      round: round,\n      isButtonTag: this.internalCloseIsButtonTag,\n      absolute: true\n    }) : null, !this.checkable && this.mergedBordered ? h(\"div\", {\n      class: `${mergedClsPrefix}-tag__border`,\n      style: {\n        borderColor\n      }\n    }) : null);\n  }\n});","import { defineComponent, h } from 'vue';\nimport { resolveSlot } from \"../../../_utils/vue/index.mjs\";\nimport NBaseClear from \"../../clear/index.mjs\";\nimport { NBaseIcon } from \"../../icon/index.mjs\";\nimport { ChevronDownIcon } from \"../../icons/index.mjs\";\nimport NBaseLoading from \"../../loading/index.mjs\";\nexport default defineComponent({\n  name: 'InternalSelectionSuffix',\n  props: {\n    clsPrefix: {\n      type: String,\n      required: true\n    },\n    showArrow: {\n      type: Boolean,\n      default: undefined\n    },\n    showClear: {\n      type: Boolean,\n      default: undefined\n    },\n    loading: {\n      type: Boolean,\n      default: false\n    },\n    onClear: Function\n  },\n  setup(props, {\n    slots\n  }) {\n    return () => {\n      const {\n        clsPrefix\n      } = props;\n      return h(NBaseLoading, {\n        clsPrefix: clsPrefix,\n        class: `${clsPrefix}-base-suffix`,\n        strokeWidth: 24,\n        scale: 0.85,\n        show: props.loading\n      }, {\n        default: () => props.showArrow ? h(NBaseClear, {\n          clsPrefix: clsPrefix,\n          show: props.showClear,\n          onClear: props.onClear\n        }, {\n          placeholder: () => h(NBaseIcon, {\n            clsPrefix: clsPrefix,\n            class: `${clsPrefix}-base-suffix__arrow`\n          }, {\n            default: () => resolveSlot(slots.default, () => [h(ChevronDownIcon, null)])\n          })\n        }) : null\n      });\n    };\n  }\n});","export default {\n  paddingSingle: '0 26px 0 12px',\n  paddingMultiple: '3px 26px 0 12px',\n  clearSize: '16px',\n  arrowSize: '16px'\n};","import { changeColor } from 'seemly';\nimport { commonDark } from \"../../../_styles/common/index.mjs\";\nimport { popoverDark } from \"../../../popover/styles/index.mjs\";\nimport commonVars from \"./_common.mjs\";\nconst internalSelectionDark = {\n  name: 'InternalSelection',\n  common: commonDark,\n  peers: {\n    Popover: popoverDark\n  },\n  self(vars) {\n    const {\n      borderRadius,\n      textColor2,\n      textColorDisabled,\n      inputColor,\n      inputColorDisabled,\n      primaryColor,\n      primaryColorHover,\n      warningColor,\n      warningColorHover,\n      errorColor,\n      errorColorHover,\n      iconColor,\n      iconColorDisabled,\n      clearColor,\n      clearColorHover,\n      clearColorPressed,\n      placeholderColor,\n      placeholderColorDisabled,\n      fontSizeTiny,\n      fontSizeSmall,\n      fontSizeMedium,\n      fontSizeLarge,\n      heightTiny,\n      heightSmall,\n      heightMedium,\n      heightLarge,\n      fontWeight\n    } = vars;\n    return Object.assign(Object.assign({}, commonVars), {\n      fontWeight,\n      fontSizeTiny,\n      fontSizeSmall,\n      fontSizeMedium,\n      fontSizeLarge,\n      heightTiny,\n      heightSmall,\n      heightMedium,\n      heightLarge,\n      borderRadius,\n      // default\n      textColor: textColor2,\n      textColorDisabled,\n      placeholderColor,\n      placeholderColorDisabled,\n      color: inputColor,\n      colorDisabled: inputColorDisabled,\n      colorActive: changeColor(primaryColor, {\n        alpha: 0.1\n      }),\n      border: '1px solid #0000',\n      borderHover: `1px solid ${primaryColorHover}`,\n      borderActive: `1px solid ${primaryColor}`,\n      borderFocus: `1px solid ${primaryColorHover}`,\n      boxShadowHover: 'none',\n      boxShadowActive: `0 0 8px 0 ${changeColor(primaryColor, {\n        alpha: 0.4\n      })}`,\n      boxShadowFocus: `0 0 8px 0 ${changeColor(primaryColor, {\n        alpha: 0.4\n      })}`,\n      caretColor: primaryColor,\n      arrowColor: iconColor,\n      arrowColorDisabled: iconColorDisabled,\n      loadingColor: primaryColor,\n      // warning\n      borderWarning: `1px solid ${warningColor}`,\n      borderHoverWarning: `1px solid ${warningColorHover}`,\n      borderActiveWarning: `1px solid ${warningColor}`,\n      borderFocusWarning: `1px solid ${warningColorHover}`,\n      boxShadowHoverWarning: 'none',\n      boxShadowActiveWarning: `0 0 8px 0 ${changeColor(warningColor, {\n        alpha: 0.4\n      })}`,\n      boxShadowFocusWarning: `0 0 8px 0 ${changeColor(warningColor, {\n        alpha: 0.4\n      })}`,\n      colorActiveWarning: changeColor(warningColor, {\n        alpha: 0.1\n      }),\n      caretColorWarning: warningColor,\n      // error\n      borderError: `1px solid ${errorColor}`,\n      borderHoverError: `1px solid ${errorColorHover}`,\n      borderActiveError: `1px solid ${errorColor}`,\n      borderFocusError: `1px solid ${errorColorHover}`,\n      boxShadowHoverError: 'none',\n      boxShadowActiveError: `0 0 8px 0 ${changeColor(errorColor, {\n        alpha: 0.4\n      })}`,\n      boxShadowFocusError: `0 0 8px 0 ${changeColor(errorColor, {\n        alpha: 0.4\n      })}`,\n      colorActiveError: changeColor(errorColor, {\n        alpha: 0.1\n      }),\n      caretColorError: errorColor,\n      clearColor,\n      clearColorHover,\n      clearColorPressed\n    });\n  }\n};\nexport default internalSelectionDark;","import { changeColor } from 'seemly';\nimport { createTheme } from \"../../../_mixins/index.mjs\";\nimport { commonLight } from \"../../../_styles/common/index.mjs\";\nimport { popoverLight } from \"../../../popover/styles/index.mjs\";\nimport commonVariables from \"./_common.mjs\";\nfunction self(vars) {\n  const {\n    borderRadius,\n    textColor2,\n    textColorDisabled,\n    inputColor,\n    inputColorDisabled,\n    primaryColor,\n    primaryColorHover,\n    warningColor,\n    warningColorHover,\n    errorColor,\n    errorColorHover,\n    borderColor,\n    iconColor,\n    iconColorDisabled,\n    clearColor,\n    clearColorHover,\n    clearColorPressed,\n    placeholderColor,\n    placeholderColorDisabled,\n    fontSizeTiny,\n    fontSizeSmall,\n    fontSizeMedium,\n    fontSizeLarge,\n    heightTiny,\n    heightSmall,\n    heightMedium,\n    heightLarge,\n    fontWeight\n  } = vars;\n  return Object.assign(Object.assign({}, commonVariables), {\n    fontSizeTiny,\n    fontSizeSmall,\n    fontSizeMedium,\n    fontSizeLarge,\n    heightTiny,\n    heightSmall,\n    heightMedium,\n    heightLarge,\n    borderRadius,\n    fontWeight,\n    // default\n    textColor: textColor2,\n    textColorDisabled,\n    placeholderColor,\n    placeholderColorDisabled,\n    color: inputColor,\n    colorDisabled: inputColorDisabled,\n    colorActive: inputColor,\n    border: `1px solid ${borderColor}`,\n    borderHover: `1px solid ${primaryColorHover}`,\n    borderActive: `1px solid ${primaryColor}`,\n    borderFocus: `1px solid ${primaryColorHover}`,\n    boxShadowHover: 'none',\n    boxShadowActive: `0 0 0 2px ${changeColor(primaryColor, {\n      alpha: 0.2\n    })}`,\n    boxShadowFocus: `0 0 0 2px ${changeColor(primaryColor, {\n      alpha: 0.2\n    })}`,\n    caretColor: primaryColor,\n    arrowColor: iconColor,\n    arrowColorDisabled: iconColorDisabled,\n    loadingColor: primaryColor,\n    // warning\n    borderWarning: `1px solid ${warningColor}`,\n    borderHoverWarning: `1px solid ${warningColorHover}`,\n    borderActiveWarning: `1px solid ${warningColor}`,\n    borderFocusWarning: `1px solid ${warningColorHover}`,\n    boxShadowHoverWarning: 'none',\n    boxShadowActiveWarning: `0 0 0 2px ${changeColor(warningColor, {\n      alpha: 0.2\n    })}`,\n    boxShadowFocusWarning: `0 0 0 2px ${changeColor(warningColor, {\n      alpha: 0.2\n    })}`,\n    colorActiveWarning: inputColor,\n    caretColorWarning: warningColor,\n    // error\n    borderError: `1px solid ${errorColor}`,\n    borderHoverError: `1px solid ${errorColorHover}`,\n    borderActiveError: `1px solid ${errorColor}`,\n    borderFocusError: `1px solid ${errorColorHover}`,\n    boxShadowHoverError: 'none',\n    boxShadowActiveError: `0 0 0 2px ${changeColor(errorColor, {\n      alpha: 0.2\n    })}`,\n    boxShadowFocusError: `0 0 0 2px ${changeColor(errorColor, {\n      alpha: 0.2\n    })}`,\n    colorActiveError: inputColor,\n    caretColorError: errorColor,\n    clearColor,\n    clearColorHover,\n    clearColorPressed\n  });\n}\nconst internalSelectionLight = createTheme({\n  name: 'InternalSelection',\n  common: commonLight,\n  peers: {\n    Popover: popoverLight\n  },\n  self\n});\nexport default internalSelectionLight;","import { c, cB, cE, cM, cNotM } from \"../../../../_utils/cssr/index.mjs\";\n// vars:\n// --n-bezier\n// --n-border\n// --n-border-active\n// --n-border-focus\n// --n-border-hover\n// --n-border-radius\n// --n-box-shadow-active\n// --n-box-shadow-focus\n// --n-box-shadow-hover\n// --n-caret-color\n// --n-color\n// --n-color-active\n// --n-color-disabled\n// --n-font-size\n// --n-height\n// --n-padding-single\n// --n-padding-multiple\n// --n-placeholder-color\n// --n-placeholder-color-disabled\n// --n-text-color\n// --n-text-color-disabled\n// --n-arrow-color\n// --n-arrow-size\n// --n-loading-color\n// --n-font-weight\n// ...clear vars\n// ...form item vars\nexport default c([cB('base-selection', `\n --n-padding-single: var(--n-padding-single-top) var(--n-padding-single-right) var(--n-padding-single-bottom) var(--n-padding-single-left);\n --n-padding-multiple: var(--n-padding-multiple-top) var(--n-padding-multiple-right) var(--n-padding-multiple-bottom) var(--n-padding-multiple-left);\n position: relative;\n z-index: auto;\n box-shadow: none;\n width: 100%;\n max-width: 100%;\n display: inline-block;\n vertical-align: bottom;\n border-radius: var(--n-border-radius);\n min-height: var(--n-height);\n line-height: 1.5;\n font-size: var(--n-font-size);\n `, [cB('base-loading', `\n color: var(--n-loading-color);\n `), cB('base-selection-tags', 'min-height: var(--n-height);'), cE('border, state-border', `\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n pointer-events: none;\n border: var(--n-border);\n border-radius: inherit;\n transition:\n box-shadow .3s var(--n-bezier),\n border-color .3s var(--n-bezier);\n `), cE('state-border', `\n z-index: 1;\n border-color: #0000;\n `), cB('base-suffix', `\n cursor: pointer;\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n right: 10px;\n `, [cE('arrow', `\n font-size: var(--n-arrow-size);\n color: var(--n-arrow-color);\n transition: color .3s var(--n-bezier);\n `)]), cB('base-selection-overlay', `\n display: flex;\n align-items: center;\n white-space: nowrap;\n pointer-events: none;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n padding: var(--n-padding-single);\n transition: color .3s var(--n-bezier);\n `, [cE('wrapper', `\n flex-basis: 0;\n flex-grow: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n `)]), cB('base-selection-placeholder', `\n color: var(--n-placeholder-color);\n `, [cE('inner', `\n max-width: 100%;\n overflow: hidden;\n `)]), cB('base-selection-tags', `\n cursor: pointer;\n outline: none;\n box-sizing: border-box;\n position: relative;\n z-index: auto;\n display: flex;\n padding: var(--n-padding-multiple);\n flex-wrap: wrap;\n align-items: center;\n width: 100%;\n vertical-align: bottom;\n background-color: var(--n-color);\n border-radius: inherit;\n transition:\n color .3s var(--n-bezier),\n box-shadow .3s var(--n-bezier),\n background-color .3s var(--n-bezier);\n `), cB('base-selection-label', `\n height: var(--n-height);\n display: inline-flex;\n width: 100%;\n vertical-align: bottom;\n cursor: pointer;\n outline: none;\n z-index: auto;\n box-sizing: border-box;\n position: relative;\n transition:\n color .3s var(--n-bezier),\n box-shadow .3s var(--n-bezier),\n background-color .3s var(--n-bezier);\n border-radius: inherit;\n background-color: var(--n-color);\n align-items: center;\n `, [cB('base-selection-input', `\n font-size: inherit;\n line-height: inherit;\n outline: none;\n cursor: pointer;\n box-sizing: border-box;\n border:none;\n width: 100%;\n padding: var(--n-padding-single);\n background-color: #0000;\n color: var(--n-text-color);\n transition: color .3s var(--n-bezier);\n caret-color: var(--n-caret-color);\n `, [cE('content', `\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap; \n `)]), cE('render-label', `\n color: var(--n-text-color);\n `)]), cNotM('disabled', [c('&:hover', [cE('state-border', `\n box-shadow: var(--n-box-shadow-hover);\n border: var(--n-border-hover);\n `)]), cM('focus', [cE('state-border', `\n box-shadow: var(--n-box-shadow-focus);\n border: var(--n-border-focus);\n `)]), cM('active', [cE('state-border', `\n box-shadow: var(--n-box-shadow-active);\n border: var(--n-border-active);\n `), cB('base-selection-label', 'background-color: var(--n-color-active);'), cB('base-selection-tags', 'background-color: var(--n-color-active);')])]), cM('disabled', 'cursor: not-allowed;', [cE('arrow', `\n color: var(--n-arrow-color-disabled);\n `), cB('base-selection-label', `\n cursor: not-allowed;\n background-color: var(--n-color-disabled);\n `, [cB('base-selection-input', `\n cursor: not-allowed;\n color: var(--n-text-color-disabled);\n `), cE('render-label', `\n color: var(--n-text-color-disabled);\n `)]), cB('base-selection-tags', `\n cursor: not-allowed;\n background-color: var(--n-color-disabled);\n `), cB('base-selection-placeholder', `\n cursor: not-allowed;\n color: var(--n-placeholder-color-disabled);\n `)]), cB('base-selection-input-tag', `\n height: calc(var(--n-height) - 6px);\n line-height: calc(var(--n-height) - 6px);\n outline: none;\n display: none;\n position: relative;\n margin-bottom: 3px;\n max-width: 100%;\n vertical-align: bottom;\n `, [cE('input', `\n font-size: inherit;\n font-family: inherit;\n min-width: 1px;\n padding: 0;\n background-color: #0000;\n outline: none;\n border: none;\n max-width: 100%;\n overflow: hidden;\n width: 1em;\n line-height: inherit;\n cursor: pointer;\n color: var(--n-text-color);\n caret-color: var(--n-caret-color);\n `), cE('mirror', `\n position: absolute;\n left: 0;\n top: 0;\n white-space: pre;\n visibility: hidden;\n user-select: none;\n -webkit-user-select: none;\n opacity: 0;\n `)]), ['warning', 'error'].map(status => cM(`${status}-status`, [cE('state-border', `border: var(--n-border-${status});`), cNotM('disabled', [c('&:hover', [cE('state-border', `\n box-shadow: var(--n-box-shadow-hover-${status});\n border: var(--n-border-hover-${status});\n `)]), cM('active', [cE('state-border', `\n box-shadow: var(--n-box-shadow-active-${status});\n border: var(--n-border-active-${status});\n `), cB('base-selection-label', `background-color: var(--n-color-active-${status});`), cB('base-selection-tags', `background-color: var(--n-color-active-${status});`)]), cM('focus', [cE('state-border', `\n box-shadow: var(--n-box-shadow-focus-${status});\n border: var(--n-border-focus-${status});\n `)])])]))]), cB('base-selection-popover', `\n margin-bottom: -3px;\n display: flex;\n flex-wrap: wrap;\n margin-right: -8px;\n `), cB('base-selection-tag-wrapper', `\n max-width: 100%;\n display: inline-flex;\n padding: 0 7px 3px 0;\n `, [c('&:last-child', 'padding-right: 0;'), cB('tag', `\n font-size: 14px;\n max-width: 100%;\n `, [cE('content', `\n line-height: 1.25;\n text-overflow: ellipsis;\n overflow: hidden;\n `)])])]);","import { getPadding } from 'seemly';\nimport { computed, defineComponent, Fragment, h, nextTick, onMounted, ref, toRef, watch, watchEffect } from 'vue';\nimport { VOverflow } from 'vueuc';\nimport { useConfig, useRtl, useTheme, useThemeClass } from \"../../../_mixins/index.mjs\";\nimport { createKey, getTitleAttribute, render, useOnResize, Wrapper } from \"../../../_utils/index.mjs\";\nimport { NPopover } from \"../../../popover/index.mjs\";\nimport { NTag } from \"../../../tag/index.mjs\";\nimport Suffix from \"../../suffix/index.mjs\";\nimport { internalSelectionLight } from \"../styles/index.mjs\";\nimport style from \"./styles/index.cssr.mjs\";\nexport default defineComponent({\n  name: 'InternalSelection',\n  props: Object.assign(Object.assign({}, useTheme.props), {\n    clsPrefix: {\n      type: String,\n      required: true\n    },\n    bordered: {\n      type: Boolean,\n      default: undefined\n    },\n    active: Boolean,\n    pattern: {\n      type: String,\n      default: ''\n    },\n    placeholder: String,\n    selectedOption: {\n      type: Object,\n      default: null\n    },\n    selectedOptions: {\n      type: Array,\n      default: null\n    },\n    labelField: {\n      type: String,\n      default: 'label'\n    },\n    valueField: {\n      type: String,\n      default: 'value'\n    },\n    multiple: Boolean,\n    filterable: Boolean,\n    clearable: Boolean,\n    disabled: Boolean,\n    size: {\n      type: String,\n      default: 'medium'\n    },\n    loading: Boolean,\n    autofocus: Boolean,\n    showArrow: {\n      type: Boolean,\n      default: true\n    },\n    inputProps: Object,\n    focused: Boolean,\n    renderTag: Function,\n    onKeydown: Function,\n    onClick: Function,\n    onBlur: Function,\n    onFocus: Function,\n    onDeleteOption: Function,\n    maxTagCount: [String, Number],\n    ellipsisTagPopoverProps: Object,\n    onClear: Function,\n    onPatternInput: Function,\n    onPatternFocus: Function,\n    onPatternBlur: Function,\n    renderLabel: Function,\n    status: String,\n    inlineThemeDisabled: Boolean,\n    ignoreComposition: {\n      type: Boolean,\n      default: true\n    },\n    onResize: Function\n  }),\n  setup(props) {\n    const {\n      mergedClsPrefixRef,\n      mergedRtlRef\n    } = useConfig(props);\n    const rtlEnabledRef = useRtl('InternalSelection', mergedRtlRef, mergedClsPrefixRef);\n    const patternInputMirrorRef = ref(null);\n    const patternInputRef = ref(null);\n    const selfRef = ref(null);\n    const multipleElRef = ref(null);\n    const singleElRef = ref(null);\n    const patternInputWrapperRef = ref(null);\n    const counterRef = ref(null);\n    const counterWrapperRef = ref(null);\n    const overflowRef = ref(null);\n    const inputTagElRef = ref(null);\n    const showTagsPopoverRef = ref(false);\n    const patternInputFocusedRef = ref(false);\n    const hoverRef = ref(false);\n    const themeRef = useTheme('InternalSelection', '-internal-selection', style, internalSelectionLight, props, toRef(props, 'clsPrefix'));\n    const mergedClearableRef = computed(() => {\n      return props.clearable && !props.disabled && (hoverRef.value || props.active);\n    });\n    const filterablePlaceholderRef = computed(() => {\n      return props.selectedOption ? props.renderTag ? props.renderTag({\n        option: props.selectedOption,\n        handleClose: () => {}\n      }) : props.renderLabel ? props.renderLabel(props.selectedOption, true) : render(props.selectedOption[props.labelField], props.selectedOption, true) : props.placeholder;\n    });\n    const labelRef = computed(() => {\n      const option = props.selectedOption;\n      if (!option) return undefined;\n      return option[props.labelField];\n    });\n    const selectedRef = computed(() => {\n      if (props.multiple) {\n        return !!(Array.isArray(props.selectedOptions) && props.selectedOptions.length);\n      } else {\n        return props.selectedOption !== null;\n      }\n    });\n    function syncMirrorWidth() {\n      var _a;\n      const {\n        value: patternInputMirrorEl\n      } = patternInputMirrorRef;\n      if (patternInputMirrorEl) {\n        const {\n          value: patternInputEl\n        } = patternInputRef;\n        if (patternInputEl) {\n          patternInputEl.style.width = `${patternInputMirrorEl.offsetWidth}px`;\n          if (props.maxTagCount !== 'responsive') {\n            (_a = overflowRef.value) === null || _a === void 0 ? void 0 : _a.sync({\n              showAllItemsBeforeCalculate: false\n            });\n          }\n        }\n      }\n    }\n    function hideInputTag() {\n      const {\n        value: inputTagEl\n      } = inputTagElRef;\n      if (inputTagEl) inputTagEl.style.display = 'none';\n    }\n    function showInputTag() {\n      const {\n        value: inputTagEl\n      } = inputTagElRef;\n      if (inputTagEl) inputTagEl.style.display = 'inline-block';\n    }\n    watch(toRef(props, 'active'), value => {\n      if (!value) hideInputTag();\n    });\n    watch(toRef(props, 'pattern'), () => {\n      if (props.multiple) {\n        void nextTick(syncMirrorWidth);\n      }\n    });\n    function doFocus(e) {\n      const {\n        onFocus\n      } = props;\n      if (onFocus) onFocus(e);\n    }\n    function doBlur(e) {\n      const {\n        onBlur\n      } = props;\n      if (onBlur) onBlur(e);\n    }\n    function doDeleteOption(value) {\n      const {\n        onDeleteOption\n      } = props;\n      if (onDeleteOption) onDeleteOption(value);\n    }\n    function doClear(e) {\n      const {\n        onClear\n      } = props;\n      if (onClear) onClear(e);\n    }\n    function doPatternInput(value) {\n      const {\n        onPatternInput\n      } = props;\n      if (onPatternInput) onPatternInput(value);\n    }\n    function handleFocusin(e) {\n      var _a;\n      if (!e.relatedTarget || !((_a = selfRef.value) === null || _a === void 0 ? void 0 : _a.contains(e.relatedTarget))) {\n        doFocus(e);\n      }\n    }\n    function handleFocusout(e) {\n      var _a;\n      if ((_a = selfRef.value) === null || _a === void 0 ? void 0 : _a.contains(e.relatedTarget)) return;\n      doBlur(e);\n    }\n    function handleClear(e) {\n      doClear(e);\n    }\n    function handleMouseEnter() {\n      hoverRef.value = true;\n    }\n    function handleMouseLeave() {\n      hoverRef.value = false;\n    }\n    function handleMouseDown(e) {\n      if (!props.active || !props.filterable) return;\n      if (e.target === patternInputRef.value) return;\n      e.preventDefault();\n    }\n    function handleDeleteOption(option) {\n      doDeleteOption(option);\n    }\n    const isComposingRef = ref(false);\n    function handlePatternKeyDown(e) {\n      if (e.key === 'Backspace' && !isComposingRef.value) {\n        if (!props.pattern.length) {\n          const {\n            selectedOptions\n          } = props;\n          if (selectedOptions === null || selectedOptions === void 0 ? void 0 : selectedOptions.length) {\n            handleDeleteOption(selectedOptions[selectedOptions.length - 1]);\n          }\n        }\n      }\n    }\n    // the composition end is later than its input so we can cached the event\n    // and return the input event\n    let cachedInputEvent = null;\n    function handlePatternInputInput(e) {\n      // we should sync mirror width here\n      const {\n        value: patternInputMirrorEl\n      } = patternInputMirrorRef;\n      if (patternInputMirrorEl) {\n        const inputText = e.target.value;\n        patternInputMirrorEl.textContent = inputText;\n        syncMirrorWidth();\n      }\n      if (props.ignoreComposition) {\n        if (!isComposingRef.value) {\n          doPatternInput(e);\n        } else {\n          cachedInputEvent = e;\n        }\n      } else {\n        doPatternInput(e);\n      }\n    }\n    function handleCompositionStart() {\n      isComposingRef.value = true;\n    }\n    function handleCompositionEnd() {\n      isComposingRef.value = false;\n      if (props.ignoreComposition) {\n        doPatternInput(cachedInputEvent);\n      }\n      cachedInputEvent = null;\n    }\n    function handlePatternInputFocus(e) {\n      var _a;\n      patternInputFocusedRef.value = true;\n      (_a = props.onPatternFocus) === null || _a === void 0 ? void 0 : _a.call(props, e);\n    }\n    function handlePatternInputBlur(e) {\n      var _a;\n      patternInputFocusedRef.value = false;\n      (_a = props.onPatternBlur) === null || _a === void 0 ? void 0 : _a.call(props, e);\n    }\n    function blur() {\n      var _a, _b;\n      if (props.filterable) {\n        patternInputFocusedRef.value = false;\n        (_a = patternInputWrapperRef.value) === null || _a === void 0 ? void 0 : _a.blur();\n        (_b = patternInputRef.value) === null || _b === void 0 ? void 0 : _b.blur();\n      } else if (props.multiple) {\n        const {\n          value: multipleEl\n        } = multipleElRef;\n        multipleEl === null || multipleEl === void 0 ? void 0 : multipleEl.blur();\n      } else {\n        const {\n          value: singleEl\n        } = singleElRef;\n        singleEl === null || singleEl === void 0 ? void 0 : singleEl.blur();\n      }\n    }\n    function focus() {\n      var _a, _b, _c;\n      if (props.filterable) {\n        patternInputFocusedRef.value = false;\n        (_a = patternInputWrapperRef.value) === null || _a === void 0 ? void 0 : _a.focus();\n      } else if (props.multiple) {\n        (_b = multipleElRef.value) === null || _b === void 0 ? void 0 : _b.focus();\n      } else {\n        (_c = singleElRef.value) === null || _c === void 0 ? void 0 : _c.focus();\n      }\n    }\n    function focusInput() {\n      const {\n        value: patternInputEl\n      } = patternInputRef;\n      if (patternInputEl) {\n        showInputTag();\n        patternInputEl.focus();\n      }\n    }\n    function blurInput() {\n      const {\n        value: patternInputEl\n      } = patternInputRef;\n      if (patternInputEl) {\n        patternInputEl.blur();\n      }\n    }\n    function updateCounter(count) {\n      const {\n        value\n      } = counterRef;\n      if (value) {\n        value.setTextContent(`+${count}`);\n      }\n    }\n    function getCounter() {\n      const {\n        value\n      } = counterWrapperRef;\n      return value;\n    }\n    function getTail() {\n      return patternInputRef.value;\n    }\n    let enterTimerId = null;\n    function clearEnterTimer() {\n      if (enterTimerId !== null) window.clearTimeout(enterTimerId);\n    }\n    function handleMouseEnterCounter() {\n      if (props.active) return;\n      clearEnterTimer();\n      enterTimerId = window.setTimeout(() => {\n        if (selectedRef.value) {\n          showTagsPopoverRef.value = true;\n        }\n      }, 100);\n    }\n    function handleMouseLeaveCounter() {\n      clearEnterTimer();\n    }\n    function onPopoverUpdateShow(show) {\n      if (!show) {\n        clearEnterTimer();\n        showTagsPopoverRef.value = false;\n      }\n    }\n    watch(selectedRef, value => {\n      if (!value) {\n        showTagsPopoverRef.value = false;\n      }\n    });\n    onMounted(() => {\n      watchEffect(() => {\n        const patternInputWrapperEl = patternInputWrapperRef.value;\n        if (!patternInputWrapperEl) return;\n        if (props.disabled) {\n          patternInputWrapperEl.removeAttribute('tabindex');\n        } else {\n          patternInputWrapperEl.tabIndex = patternInputFocusedRef.value ? -1 : 0;\n        }\n      });\n    });\n    useOnResize(selfRef, props.onResize);\n    const {\n      inlineThemeDisabled\n    } = props;\n    const cssVarsRef = computed(() => {\n      const {\n        size\n      } = props;\n      const {\n        common: {\n          cubicBezierEaseInOut\n        },\n        self: {\n          fontWeight,\n          borderRadius,\n          color,\n          placeholderColor,\n          textColor,\n          paddingSingle,\n          paddingMultiple,\n          caretColor,\n          colorDisabled,\n          textColorDisabled,\n          placeholderColorDisabled,\n          colorActive,\n          boxShadowFocus,\n          boxShadowActive,\n          boxShadowHover,\n          border,\n          borderFocus,\n          borderHover,\n          borderActive,\n          arrowColor,\n          arrowColorDisabled,\n          loadingColor,\n          // form warning\n          colorActiveWarning,\n          boxShadowFocusWarning,\n          boxShadowActiveWarning,\n          boxShadowHoverWarning,\n          borderWarning,\n          borderFocusWarning,\n          borderHoverWarning,\n          borderActiveWarning,\n          // form error\n          colorActiveError,\n          boxShadowFocusError,\n          boxShadowActiveError,\n          boxShadowHoverError,\n          borderError,\n          borderFocusError,\n          borderHoverError,\n          borderActiveError,\n          // clear\n          clearColor,\n          clearColorHover,\n          clearColorPressed,\n          clearSize,\n          // arrow\n          arrowSize,\n          [createKey('height', size)]: height,\n          [createKey('fontSize', size)]: fontSize\n        }\n      } = themeRef.value;\n      const paddingSingleDiscrete = getPadding(paddingSingle);\n      const paddingMultipleDiscrete = getPadding(paddingMultiple);\n      return {\n        '--n-bezier': cubicBezierEaseInOut,\n        '--n-border': border,\n        '--n-border-active': borderActive,\n        '--n-border-focus': borderFocus,\n        '--n-border-hover': borderHover,\n        '--n-border-radius': borderRadius,\n        '--n-box-shadow-active': boxShadowActive,\n        '--n-box-shadow-focus': boxShadowFocus,\n        '--n-box-shadow-hover': boxShadowHover,\n        '--n-caret-color': caretColor,\n        '--n-color': color,\n        '--n-color-active': colorActive,\n        '--n-color-disabled': colorDisabled,\n        '--n-font-size': fontSize,\n        '--n-height': height,\n        '--n-padding-single-top': paddingSingleDiscrete.top,\n        '--n-padding-multiple-top': paddingMultipleDiscrete.top,\n        '--n-padding-single-right': paddingSingleDiscrete.right,\n        '--n-padding-multiple-right': paddingMultipleDiscrete.right,\n        '--n-padding-single-left': paddingSingleDiscrete.left,\n        '--n-padding-multiple-left': paddingMultipleDiscrete.left,\n        '--n-padding-single-bottom': paddingSingleDiscrete.bottom,\n        '--n-padding-multiple-bottom': paddingMultipleDiscrete.bottom,\n        '--n-placeholder-color': placeholderColor,\n        '--n-placeholder-color-disabled': placeholderColorDisabled,\n        '--n-text-color': textColor,\n        '--n-text-color-disabled': textColorDisabled,\n        '--n-arrow-color': arrowColor,\n        '--n-arrow-color-disabled': arrowColorDisabled,\n        '--n-loading-color': loadingColor,\n        // form warning\n        '--n-color-active-warning': colorActiveWarning,\n        '--n-box-shadow-focus-warning': boxShadowFocusWarning,\n        '--n-box-shadow-active-warning': boxShadowActiveWarning,\n        '--n-box-shadow-hover-warning': boxShadowHoverWarning,\n        '--n-border-warning': borderWarning,\n        '--n-border-focus-warning': borderFocusWarning,\n        '--n-border-hover-warning': borderHoverWarning,\n        '--n-border-active-warning': borderActiveWarning,\n        // form error\n        '--n-color-active-error': colorActiveError,\n        '--n-box-shadow-focus-error': boxShadowFocusError,\n        '--n-box-shadow-active-error': boxShadowActiveError,\n        '--n-box-shadow-hover-error': boxShadowHoverError,\n        '--n-border-error': borderError,\n        '--n-border-focus-error': borderFocusError,\n        '--n-border-hover-error': borderHoverError,\n        '--n-border-active-error': borderActiveError,\n        // clear\n        '--n-clear-size': clearSize,\n        '--n-clear-color': clearColor,\n        '--n-clear-color-hover': clearColorHover,\n        '--n-clear-color-pressed': clearColorPressed,\n        // arrow-size\n        '--n-arrow-size': arrowSize,\n        // font-weight\n        '--n-font-weight': fontWeight\n      };\n    });\n    const themeClassHandle = inlineThemeDisabled ? useThemeClass('internal-selection', computed(() => {\n      return props.size[0];\n    }), cssVarsRef, props) : undefined;\n    return {\n      mergedTheme: themeRef,\n      mergedClearable: mergedClearableRef,\n      mergedClsPrefix: mergedClsPrefixRef,\n      rtlEnabled: rtlEnabledRef,\n      patternInputFocused: patternInputFocusedRef,\n      filterablePlaceholder: filterablePlaceholderRef,\n      label: labelRef,\n      selected: selectedRef,\n      showTagsPanel: showTagsPopoverRef,\n      isComposing: isComposingRef,\n      // dom ref\n      counterRef,\n      counterWrapperRef,\n      patternInputMirrorRef,\n      patternInputRef,\n      selfRef,\n      multipleElRef,\n      singleElRef,\n      patternInputWrapperRef,\n      overflowRef,\n      inputTagElRef,\n      handleMouseDown,\n      handleFocusin,\n      handleClear,\n      handleMouseEnter,\n      handleMouseLeave,\n      handleDeleteOption,\n      handlePatternKeyDown,\n      handlePatternInputInput,\n      handlePatternInputBlur,\n      handlePatternInputFocus,\n      handleMouseEnterCounter,\n      handleMouseLeaveCounter,\n      handleFocusout,\n      handleCompositionEnd,\n      handleCompositionStart,\n      onPopoverUpdateShow,\n      focus,\n      focusInput,\n      blur,\n      blurInput,\n      updateCounter,\n      getCounter,\n      getTail,\n      renderLabel: props.renderLabel,\n      cssVars: inlineThemeDisabled ? undefined : cssVarsRef,\n      themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,\n      onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender\n    };\n  },\n  render() {\n    const {\n      status,\n      multiple,\n      size,\n      disabled,\n      filterable,\n      maxTagCount,\n      bordered,\n      clsPrefix,\n      ellipsisTagPopoverProps,\n      onRender,\n      renderTag,\n      renderLabel\n    } = this;\n    onRender === null || onRender === void 0 ? void 0 : onRender();\n    const maxTagCountResponsive = maxTagCount === 'responsive';\n    const maxTagCountNumeric = typeof maxTagCount === 'number';\n    const useMaxTagCount = maxTagCountResponsive || maxTagCountNumeric;\n    const suffix = h(Wrapper, null, {\n      default: () => h(Suffix, {\n        clsPrefix: clsPrefix,\n        loading: this.loading,\n        showArrow: this.showArrow,\n        showClear: this.mergedClearable && this.selected,\n        onClear: this.handleClear\n      }, {\n        default: () => {\n          var _a, _b;\n          return (_b = (_a = this.$slots).arrow) === null || _b === void 0 ? void 0 : _b.call(_a);\n        }\n      })\n    });\n    let body;\n    if (multiple) {\n      const {\n        labelField\n      } = this;\n      const createTag = option => h(\"div\", {\n        class: `${clsPrefix}-base-selection-tag-wrapper`,\n        key: option.value\n      }, renderTag ? renderTag({\n        option,\n        handleClose: () => {\n          this.handleDeleteOption(option);\n        }\n      }) : h(NTag, {\n        size: size,\n        closable: !option.disabled,\n        disabled: disabled,\n        onClose: () => {\n          this.handleDeleteOption(option);\n        },\n        internalCloseIsButtonTag: false,\n        internalCloseFocusable: false\n      }, {\n        default: () => renderLabel ? renderLabel(option, true) : render(option[labelField], option, true)\n      }));\n      const createOriginalTagNodes = () => (maxTagCountNumeric ? this.selectedOptions.slice(0, maxTagCount) : this.selectedOptions).map(createTag);\n      const input = filterable ? h(\"div\", {\n        class: `${clsPrefix}-base-selection-input-tag`,\n        ref: \"inputTagElRef\",\n        key: \"__input-tag__\"\n      }, h(\"input\", Object.assign({}, this.inputProps, {\n        ref: \"patternInputRef\",\n        tabindex: -1,\n        disabled: disabled,\n        value: this.pattern,\n        autofocus: this.autofocus,\n        class: `${clsPrefix}-base-selection-input-tag__input`,\n        onBlur: this.handlePatternInputBlur,\n        onFocus: this.handlePatternInputFocus,\n        onKeydown: this.handlePatternKeyDown,\n        onInput: this.handlePatternInputInput,\n        onCompositionstart: this.handleCompositionStart,\n        onCompositionend: this.handleCompositionEnd\n      })), h(\"span\", {\n        ref: \"patternInputMirrorRef\",\n        class: `${clsPrefix}-base-selection-input-tag__mirror`\n      }, this.pattern)) : null;\n      // May Overflow\n      const renderCounter = maxTagCountResponsive ? () => h(\"div\", {\n        class: `${clsPrefix}-base-selection-tag-wrapper`,\n        ref: \"counterWrapperRef\"\n      }, h(NTag, {\n        size: size,\n        ref: \"counterRef\",\n        onMouseenter: this.handleMouseEnterCounter,\n        onMouseleave: this.handleMouseLeaveCounter,\n        disabled: disabled\n      })) : undefined;\n      let counter;\n      if (maxTagCountNumeric) {\n        const rest = this.selectedOptions.length - maxTagCount;\n        if (rest > 0) {\n          counter = h(\"div\", {\n            class: `${clsPrefix}-base-selection-tag-wrapper`,\n            key: \"__counter__\"\n          }, h(NTag, {\n            size: size,\n            ref: \"counterRef\",\n            onMouseenter: this.handleMouseEnterCounter,\n            disabled: disabled\n          }, {\n            default: () => `+${rest}`\n          }));\n        }\n      }\n      const tags = maxTagCountResponsive ? filterable ? h(VOverflow, {\n        ref: \"overflowRef\",\n        updateCounter: this.updateCounter,\n        getCounter: this.getCounter,\n        getTail: this.getTail,\n        style: {\n          width: '100%',\n          display: 'flex',\n          overflow: 'hidden'\n        }\n      }, {\n        default: createOriginalTagNodes,\n        counter: renderCounter,\n        tail: () => input\n      }) : h(VOverflow, {\n        ref: \"overflowRef\",\n        updateCounter: this.updateCounter,\n        getCounter: this.getCounter,\n        style: {\n          width: '100%',\n          display: 'flex',\n          overflow: 'hidden'\n        }\n      }, {\n        default: createOriginalTagNodes,\n        counter: renderCounter\n      }) : maxTagCountNumeric && counter ? createOriginalTagNodes().concat(counter) : createOriginalTagNodes();\n      const renderPopover = useMaxTagCount ? () => h(\"div\", {\n        class: `${clsPrefix}-base-selection-popover`\n      }, maxTagCountResponsive ? createOriginalTagNodes() : this.selectedOptions.map(createTag)) : undefined;\n      const popoverProps = useMaxTagCount ? Object.assign({\n        show: this.showTagsPanel,\n        trigger: 'hover',\n        overlap: true,\n        placement: 'top',\n        width: 'trigger',\n        onUpdateShow: this.onPopoverUpdateShow,\n        theme: this.mergedTheme.peers.Popover,\n        themeOverrides: this.mergedTheme.peerOverrides.Popover\n      }, ellipsisTagPopoverProps) : null;\n      const showPlaceholder = this.selected ? false : this.active ? !this.pattern && !this.isComposing : true;\n      const placeholder = showPlaceholder ? h(\"div\", {\n        class: `${clsPrefix}-base-selection-placeholder ${clsPrefix}-base-selection-overlay`\n      }, h(\"div\", {\n        class: `${clsPrefix}-base-selection-placeholder__inner`\n      }, this.placeholder)) : null;\n      const popoverTrigger = filterable ? h(\"div\", {\n        ref: \"patternInputWrapperRef\",\n        class: `${clsPrefix}-base-selection-tags`\n      }, tags, maxTagCountResponsive ? null : input, suffix) : h(\"div\", {\n        ref: \"multipleElRef\",\n        class: `${clsPrefix}-base-selection-tags`,\n        tabindex: disabled ? undefined : 0\n      }, tags, suffix);\n      body = h(Fragment, null, useMaxTagCount ? h(NPopover, Object.assign({}, popoverProps, {\n        scrollable: true,\n        style: \"max-height: calc(var(--v-target-height) * 6.6);\"\n      }), {\n        trigger: () => popoverTrigger,\n        default: renderPopover\n      }) : popoverTrigger, placeholder);\n    } else {\n      if (filterable) {\n        const hasInput = this.pattern || this.isComposing;\n        const showPlaceholder = this.active ? !hasInput : !this.selected;\n        const showSelectedLabel = this.active ? false : this.selected;\n        body = h(\"div\", {\n          ref: \"patternInputWrapperRef\",\n          class: `${clsPrefix}-base-selection-label`,\n          title: this.patternInputFocused ? undefined : getTitleAttribute(this.label)\n        }, h(\"input\", Object.assign({}, this.inputProps, {\n          ref: \"patternInputRef\",\n          class: `${clsPrefix}-base-selection-input`,\n          value: this.active ? this.pattern : '',\n          placeholder: \"\",\n          readonly: disabled,\n          disabled: disabled,\n          tabindex: -1,\n          autofocus: this.autofocus,\n          onFocus: this.handlePatternInputFocus,\n          onBlur: this.handlePatternInputBlur,\n          onInput: this.handlePatternInputInput,\n          onCompositionstart: this.handleCompositionStart,\n          onCompositionend: this.handleCompositionEnd\n        })), showSelectedLabel ? h(\"div\", {\n          class: `${clsPrefix}-base-selection-label__render-label ${clsPrefix}-base-selection-overlay`,\n          key: \"input\"\n        }, h(\"div\", {\n          class: `${clsPrefix}-base-selection-overlay__wrapper`\n        }, renderTag ? renderTag({\n          option: this.selectedOption,\n          handleClose: () => {}\n        }) : renderLabel ? renderLabel(this.selectedOption, true) : render(this.label, this.selectedOption, true))) : null, showPlaceholder ? h(\"div\", {\n          class: `${clsPrefix}-base-selection-placeholder ${clsPrefix}-base-selection-overlay`,\n          key: \"placeholder\"\n        }, h(\"div\", {\n          class: `${clsPrefix}-base-selection-overlay__wrapper`\n        }, this.filterablePlaceholder)) : null, suffix);\n      } else {\n        body = h(\"div\", {\n          ref: \"singleElRef\",\n          class: `${clsPrefix}-base-selection-label`,\n          tabindex: this.disabled ? undefined : 0\n        }, this.label !== undefined ? h(\"div\", {\n          class: `${clsPrefix}-base-selection-input`,\n          title: getTitleAttribute(this.label),\n          key: \"input\"\n        }, h(\"div\", {\n          class: `${clsPrefix}-base-selection-input__content`\n        }, renderTag ? renderTag({\n          option: this.selectedOption,\n          handleClose: () => {}\n        }) : renderLabel ? renderLabel(this.selectedOption, true) : render(this.label, this.selectedOption, true))) : h(\"div\", {\n          class: `${clsPrefix}-base-selection-placeholder ${clsPrefix}-base-selection-overlay`,\n          key: \"placeholder\"\n        }, h(\"div\", {\n          class: `${clsPrefix}-base-selection-placeholder__inner`\n        }, this.placeholder)), suffix);\n      }\n    }\n    return h(\"div\", {\n      ref: \"selfRef\",\n      class: [`${clsPrefix}-base-selection`, this.rtlEnabled && `${clsPrefix}-base-selection--rtl`, this.themeClass, status && `${clsPrefix}-base-selection--${status}-status`, {\n        [`${clsPrefix}-base-selection--active`]: this.active,\n        [`${clsPrefix}-base-selection--selected`]: this.selected || this.active && this.pattern,\n        [`${clsPrefix}-base-selection--disabled`]: this.disabled,\n        [`${clsPrefix}-base-selection--multiple`]: this.multiple,\n        // focus is not controlled by selection itself since it always need\n        // to be managed together with menu. provide :focus style will cause\n        // many redundant codes.\n        [`${clsPrefix}-base-selection--focus`]: this.focused\n      }],\n      style: this.cssVars,\n      onClick: this.onClick,\n      onMouseenter: this.handleMouseEnter,\n      onMouseleave: this.handleMouseLeave,\n      onKeydown: this.onKeydown,\n      onFocusin: this.handleFocusin,\n      onFocusout: this.handleFocusout,\n      onMousedown: this.handleMouseDown\n    }, body, bordered ? h(\"div\", {\n      class: `${clsPrefix}-base-selection__border`\n    }) : null, bordered ? h(\"div\", {\n      class: `${clsPrefix}-base-selection__state-border`\n    }) : null);\n  }\n});","import { c } from \"../../_utils/cssr/index.mjs\";\nimport commonVariables from \"../common/_common.mjs\";\nconst {\n  cubicBezierEaseInOut\n} = commonVariables;\nexport function fadeInWidthExpandTransition({\n  duration = '.2s',\n  delay = '.1s'\n} = {}) {\n  return [c('&.fade-in-width-expand-transition-leave-from, &.fade-in-width-expand-transition-enter-to', {\n    opacity: 1\n  }), c('&.fade-in-width-expand-transition-leave-to, &.fade-in-width-expand-transition-enter-from', `\n opacity: 0!important;\n margin-left: 0!important;\n margin-right: 0!important;\n `), c('&.fade-in-width-expand-transition-leave-active', `\n overflow: hidden;\n transition:\n opacity ${duration} ${cubicBezierEaseInOut},\n max-width ${duration} ${cubicBezierEaseInOut} ${delay},\n margin-left ${duration} ${cubicBezierEaseInOut} ${delay},\n margin-right ${duration} ${cubicBezierEaseInOut} ${delay};\n `), c('&.fade-in-width-expand-transition-enter-active', `\n overflow: hidden;\n transition:\n opacity ${duration} ${cubicBezierEaseInOut} ${delay},\n max-width ${duration} ${cubicBezierEaseInOut},\n margin-left ${duration} ${cubicBezierEaseInOut},\n margin-right ${duration} ${cubicBezierEaseInOut};\n `)];\n}","import { cB } from \"../../../../_utils/cssr/index.mjs\";\nexport default cB('base-wave', `\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n border-radius: inherit;\n`);","import { defineComponent, h, nextTick, onBeforeUnmount, ref, toRef } from 'vue';\nimport { useStyle } from \"../../../_mixins/index.mjs\";\nimport style from \"./styles/index.cssr.mjs\";\nexport default defineComponent({\n  name: 'BaseWave',\n  props: {\n    clsPrefix: {\n      type: String,\n      required: true\n    }\n  },\n  setup(props) {\n    useStyle('-base-wave', style, toRef(props, 'clsPrefix'));\n    const selfRef = ref(null);\n    const activeRef = ref(false);\n    let animationTimerId = null;\n    onBeforeUnmount(() => {\n      if (animationTimerId !== null) {\n        window.clearTimeout(animationTimerId);\n      }\n    });\n    return {\n      active: activeRef,\n      selfRef,\n      play() {\n        if (animationTimerId !== null) {\n          window.clearTimeout(animationTimerId);\n          activeRef.value = false;\n          animationTimerId = null;\n        }\n        void nextTick(() => {\n          var _a;\n          void ((_a = selfRef.value) === null || _a === void 0 ? void 0 : _a.offsetHeight);\n          activeRef.value = true;\n          animationTimerId = window.setTimeout(() => {\n            activeRef.value = false;\n            animationTimerId = null;\n          }, 1000);\n        });\n      }\n    };\n  },\n  render() {\n    const {\n      clsPrefix\n    } = this;\n    return h(\"div\", {\n      ref: \"selfRef\",\n      \"aria-hidden\": true,\n      class: [`${clsPrefix}-base-wave`, this.active && `${clsPrefix}-base-wave--active`]\n    });\n  }\n});","export default {\n  iconMargin: '11px 8px 0 12px',\n  iconMarginRtl: '11px 12px 0 8px',\n  iconSize: '24px',\n  closeIconSize: '16px',\n  closeSize: '20px',\n  closeMargin: '13px 14px 0 0',\n  closeMarginRtl: '13px 0 0 14px',\n  padding: '13px'\n};","import { changeColor } from 'seemly';\nimport { commonDark } from \"../../_styles/common/index.mjs\";\nimport commonVars from \"./_common.mjs\";\nconst alertDark = {\n  name: 'Alert',\n  common: commonDark,\n  self(vars) {\n    const {\n      lineHeight,\n      borderRadius,\n      fontWeightStrong,\n      dividerColor,\n      inputColor,\n      textColor1,\n      textColor2,\n      closeColorHover,\n      closeColorPressed,\n      closeIconColor,\n      closeIconColorHover,\n      closeIconColorPressed,\n      infoColorSuppl,\n      successColorSuppl,\n      warningColorSuppl,\n      errorColorSuppl,\n      fontSize\n    } = vars;\n    return Object.assign(Object.assign({}, commonVars), {\n      fontSize,\n      lineHeight,\n      titleFontWeight: fontWeightStrong,\n      borderRadius,\n      border: `1px solid ${dividerColor}`,\n      color: inputColor,\n      titleTextColor: textColor1,\n      iconColor: textColor2,\n      contentTextColor: textColor2,\n      closeBorderRadius: borderRadius,\n      closeColorHover,\n      closeColorPressed,\n      closeIconColor,\n      closeIconColorHover,\n      closeIconColorPressed,\n      borderInfo: `1px solid ${changeColor(infoColorSuppl, {\n        alpha: 0.35\n      })}`,\n      colorInfo: changeColor(infoColorSuppl, {\n        alpha: 0.25\n      }),\n      titleTextColorInfo: textColor1,\n      iconColorInfo: infoColorSuppl,\n      contentTextColorInfo: textColor2,\n      closeColorHoverInfo: closeColorHover,\n      closeColorPressedInfo: closeColorPressed,\n      closeIconColorInfo: closeIconColor,\n      closeIconColorHoverInfo: closeIconColorHover,\n      closeIconColorPressedInfo: closeIconColorPressed,\n      borderSuccess: `1px solid ${changeColor(successColorSuppl, {\n        alpha: 0.35\n      })}`,\n      colorSuccess: changeColor(successColorSuppl, {\n        alpha: 0.25\n      }),\n      titleTextColorSuccess: textColor1,\n      iconColorSuccess: successColorSuppl,\n      contentTextColorSuccess: textColor2,\n      closeColorHoverSuccess: closeColorHover,\n      closeColorPressedSuccess: closeColorPressed,\n      closeIconColorSuccess: closeIconColor,\n      closeIconColorHoverSuccess: closeIconColorHover,\n      closeIconColorPressedSuccess: closeIconColorPressed,\n      borderWarning: `1px solid ${changeColor(warningColorSuppl, {\n        alpha: 0.35\n      })}`,\n      colorWarning: changeColor(warningColorSuppl, {\n        alpha: 0.25\n      }),\n      titleTextColorWarning: textColor1,\n      iconColorWarning: warningColorSuppl,\n      contentTextColorWarning: textColor2,\n      closeColorHoverWarning: closeColorHover,\n      closeColorPressedWarning: closeColorPressed,\n      closeIconColorWarning: closeIconColor,\n      closeIconColorHoverWarning: closeIconColorHover,\n      closeIconColorPressedWarning: closeIconColorPressed,\n      borderError: `1px solid ${changeColor(errorColorSuppl, {\n        alpha: 0.35\n      })}`,\n      colorError: changeColor(errorColorSuppl, {\n        alpha: 0.25\n      }),\n      titleTextColorError: textColor1,\n      iconColorError: errorColorSuppl,\n      contentTextColorError: textColor2,\n      closeColorHoverError: closeColorHover,\n      closeColorPressedError: closeColorPressed,\n      closeIconColorError: closeIconColor,\n      closeIconColorHoverError: closeIconColorHover,\n      closeIconColorPressedError: closeIconColorPressed\n    });\n  }\n};\nexport default alertDark;","import { changeColor, composite } from 'seemly';\nimport { commonLight } from \"../../_styles/common/index.mjs\";\nimport commonVars from \"./_common.mjs\";\nfunction self(vars) {\n  const {\n    lineHeight,\n    borderRadius,\n    fontWeightStrong,\n    baseColor,\n    dividerColor,\n    actionColor,\n    textColor1,\n    textColor2,\n    closeColorHover,\n    closeColorPressed,\n    closeIconColor,\n    closeIconColorHover,\n    closeIconColorPressed,\n    infoColor,\n    successColor,\n    warningColor,\n    errorColor,\n    fontSize\n  } = vars;\n  return Object.assign(Object.assign({}, commonVars), {\n    fontSize,\n    lineHeight,\n    titleFontWeight: fontWeightStrong,\n    borderRadius,\n    border: `1px solid ${dividerColor}`,\n    color: actionColor,\n    titleTextColor: textColor1,\n    iconColor: textColor2,\n    contentTextColor: textColor2,\n    closeBorderRadius: borderRadius,\n    closeColorHover,\n    closeColorPressed,\n    closeIconColor,\n    closeIconColorHover,\n    closeIconColorPressed,\n    borderInfo: `1px solid ${composite(baseColor, changeColor(infoColor, {\n      alpha: 0.25\n    }))}`,\n    colorInfo: composite(baseColor, changeColor(infoColor, {\n      alpha: 0.08\n    })),\n    titleTextColorInfo: textColor1,\n    iconColorInfo: infoColor,\n    contentTextColorInfo: textColor2,\n    closeColorHoverInfo: closeColorHover,\n    closeColorPressedInfo: closeColorPressed,\n    closeIconColorInfo: closeIconColor,\n    closeIconColorHoverInfo: closeIconColorHover,\n    closeIconColorPressedInfo: closeIconColorPressed,\n    borderSuccess: `1px solid ${composite(baseColor, changeColor(successColor, {\n      alpha: 0.25\n    }))}`,\n    colorSuccess: composite(baseColor, changeColor(successColor, {\n      alpha: 0.08\n    })),\n    titleTextColorSuccess: textColor1,\n    iconColorSuccess: successColor,\n    contentTextColorSuccess: textColor2,\n    closeColorHoverSuccess: closeColorHover,\n    closeColorPressedSuccess: closeColorPressed,\n    closeIconColorSuccess: closeIconColor,\n    closeIconColorHoverSuccess: closeIconColorHover,\n    closeIconColorPressedSuccess: closeIconColorPressed,\n    borderWarning: `1px solid ${composite(baseColor, changeColor(warningColor, {\n      alpha: 0.33\n    }))}`,\n    colorWarning: composite(baseColor, changeColor(warningColor, {\n      alpha: 0.08\n    })),\n    titleTextColorWarning: textColor1,\n    iconColorWarning: warningColor,\n    contentTextColorWarning: textColor2,\n    closeColorHoverWarning: closeColorHover,\n    closeColorPressedWarning: closeColorPressed,\n    closeIconColorWarning: closeIconColor,\n    closeIconColorHoverWarning: closeIconColorHover,\n    closeIconColorPressedWarning: closeIconColorPressed,\n    borderError: `1px solid ${composite(baseColor, changeColor(errorColor, {\n      alpha: 0.25\n    }))}`,\n    colorError: composite(baseColor, changeColor(errorColor, {\n      alpha: 0.08\n    })),\n    titleTextColorError: textColor1,\n    iconColorError: errorColor,\n    contentTextColorError: textColor2,\n    closeColorHoverError: closeColorHover,\n    closeColorPressedError: closeColorPressed,\n    closeIconColorError: closeIconColor,\n    closeIconColorHoverError: closeIconColorHover,\n    closeIconColorPressedError: closeIconColorPressed\n  });\n}\nconst alertLight = {\n  name: 'Alert',\n  common: commonLight,\n  self\n};\nexport default alertLight;","import { c } from \"../../_utils/cssr/index.mjs\";\nimport commonVariables from \"../common/_common.mjs\";\nconst {\n  cubicBezierEaseInOut,\n  cubicBezierEaseOut,\n  cubicBezierEaseIn\n} = commonVariables;\nexport function fadeInHeightExpandTransition({\n  overflow = 'hidden',\n  duration = '.3s',\n  originalTransition = '',\n  leavingDelay = '0s',\n  foldPadding = false,\n  enterToProps = undefined,\n  leaveToProps = undefined,\n  reverse = false\n} = {}) {\n  const enterClass = reverse ? 'leave' : 'enter';\n  const leaveClass = reverse ? 'enter' : 'leave';\n  return [c(`&.fade-in-height-expand-transition-${leaveClass}-from,\n &.fade-in-height-expand-transition-${enterClass}-to`, Object.assign(Object.assign({}, enterToProps), {\n    opacity: 1\n  })), c(`&.fade-in-height-expand-transition-${leaveClass}-to,\n &.fade-in-height-expand-transition-${enterClass}-from`, Object.assign(Object.assign({}, leaveToProps), {\n    opacity: 0,\n    marginTop: '0 !important',\n    marginBottom: '0 !important',\n    paddingTop: foldPadding ? '0 !important' : undefined,\n    paddingBottom: foldPadding ? '0 !important' : undefined\n  })), c(`&.fade-in-height-expand-transition-${leaveClass}-active`, `\n overflow: ${overflow};\n transition:\n max-height ${duration} ${cubicBezierEaseInOut} ${leavingDelay},\n opacity ${duration} ${cubicBezierEaseOut} ${leavingDelay},\n margin-top ${duration} ${cubicBezierEaseInOut} ${leavingDelay},\n margin-bottom ${duration} ${cubicBezierEaseInOut} ${leavingDelay},\n padding-top ${duration} ${cubicBezierEaseInOut} ${leavingDelay},\n padding-bottom ${duration} ${cubicBezierEaseInOut} ${leavingDelay}\n ${originalTransition ? `,${originalTransition}` : ''}\n `), c(`&.fade-in-height-expand-transition-${enterClass}-active`, `\n overflow: ${overflow};\n transition:\n max-height ${duration} ${cubicBezierEaseInOut},\n opacity ${duration} ${cubicBezierEaseIn},\n margin-top ${duration} ${cubicBezierEaseInOut},\n margin-bottom ${duration} ${cubicBezierEaseInOut},\n padding-top ${duration} ${cubicBezierEaseInOut},\n padding-bottom ${duration} ${cubicBezierEaseInOut}\n ${originalTransition ? `,${originalTransition}` : ''}\n `)];\n}","import { fadeInHeightExpandTransition } from \"../../../_styles/transitions/fade-in-height-expand.cssr.mjs\";\nimport { c, cB, cE, cM } from \"../../../_utils/cssr/index.mjs\";\n// vars:\n// --n-bezier\n// --n-color\n// --n-close-color-hover\n// --n-close-color-pressed\n// --n-close-icon-color\n// --n-close-icon-color-hover\n// --n-close-icon-color-pressed\n// --n-icon-color\n// --n-border\n// --n-title-text-color\n// --n-content-text-color\n// --n-line-height\n// --n-border-radius\n// --n-font-size\n// --n-title-font-weight\n// --n-icon-size\n// --n-icon-margin\n// --n-close-size\n// --n-close-icon-size\n// --n-close-margin\n// --n-padding\n// --n-icon-margin-left\n// --n-icon-margin-right\nexport default cB('alert', `\n line-height: var(--n-line-height);\n border-radius: var(--n-border-radius);\n position: relative;\n transition: background-color .3s var(--n-bezier);\n background-color: var(--n-color);\n text-align: start;\n word-break: break-word;\n`, [cE('border', `\n border-radius: inherit;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n transition: border-color .3s var(--n-bezier);\n border: var(--n-border);\n pointer-events: none;\n `), cM('closable', [cB('alert-body', [cE('title', `\n padding-right: 24px;\n `)])]), cE('icon', {\n  color: 'var(--n-icon-color)'\n}), cB('alert-body', {\n  padding: 'var(--n-padding)'\n}, [cE('title', {\n  color: 'var(--n-title-text-color)'\n}), cE('content', {\n  color: 'var(--n-content-text-color)'\n})]), fadeInHeightExpandTransition({\n  originalTransition: 'transform .3s var(--n-bezier)',\n  enterToProps: {\n    transform: 'scale(1)'\n  },\n  leaveToProps: {\n    transform: 'scale(0.9)'\n  }\n}), cE('icon', `\n position: absolute;\n left: 0;\n top: 0;\n align-items: center;\n justify-content: center;\n display: flex;\n width: var(--n-icon-size);\n height: var(--n-icon-size);\n font-size: var(--n-icon-size);\n margin: var(--n-icon-margin);\n `), cE('close', `\n transition:\n color .3s var(--n-bezier),\n background-color .3s var(--n-bezier);\n position: absolute;\n right: 0;\n top: 0;\n margin: var(--n-close-margin);\n `), cM('show-icon', [cB('alert-body', {\n  paddingLeft: 'calc(var(--n-icon-margin-left) + var(--n-icon-size) + var(--n-icon-margin-right))'\n})]),\n// fix: https://github.com/tusen-ai/naive-ui/issues/4588\ncM('right-adjust', [cB('alert-body', {\n  paddingRight: 'calc(var(--n-close-size) + var(--n-padding) + 2px)'\n})]), cB('alert-body', `\n border-radius: var(--n-border-radius);\n transition: border-color .3s var(--n-bezier);\n `, [cE('title', `\n transition: color .3s var(--n-bezier);\n font-size: 16px;\n line-height: 19px;\n font-weight: var(--n-title-font-weight);\n `, [c('& +', [cE('content', {\n  marginTop: '9px'\n})])]), cE('content', {\n  transition: 'color .3s var(--n-bezier)',\n  fontSize: 'var(--n-font-size)'\n})]), cE('icon', {\n  transition: 'color .3s var(--n-bezier)'\n})]);","import { getMargin } from 'seemly';\nimport { computed, defineComponent, h, mergeProps, ref, watchEffect } from 'vue';\nimport { NBaseClose, NBaseIcon, NFadeInExpandTransition } from \"../../_internal/index.mjs\";\nimport { ErrorIcon, InfoIcon, SuccessIcon, WarningIcon } from \"../../_internal/icons/index.mjs\";\nimport { useConfig, useTheme, useThemeClass } from \"../../_mixins/index.mjs\";\nimport { useRtl } from \"../../_mixins/use-rtl.mjs\";\nimport { createKey, resolveSlot, resolveWrappedSlot, warnOnce } from \"../../_utils/index.mjs\";\nimport { alertLight } from \"../styles/index.mjs\";\nimport style from \"./styles/index.cssr.mjs\";\nexport const alertProps = Object.assign(Object.assign({}, useTheme.props), {\n  title: String,\n  showIcon: {\n    type: Boolean,\n    default: true\n  },\n  type: {\n    type: String,\n    default: 'default'\n  },\n  bordered: {\n    type: Boolean,\n    default: true\n  },\n  closable: Boolean,\n  onClose: Function,\n  onAfterLeave: Function,\n  /** @deprecated */\n  onAfterHide: Function\n});\nexport default defineComponent({\n  name: 'Alert',\n  inheritAttrs: false,\n  props: alertProps,\n  slots: Object,\n  setup(props) {\n    if (process.env.NODE_ENV !== 'production') {\n      watchEffect(() => {\n        if (props.onAfterHide !== undefined) {\n          warnOnce('alert', '`on-after-hide` is deprecated, please use `on-after-leave` instead.');\n        }\n      });\n    }\n    const {\n      mergedClsPrefixRef,\n      mergedBorderedRef,\n      inlineThemeDisabled,\n      mergedRtlRef\n    } = useConfig(props);\n    const themeRef = useTheme('Alert', '-alert', style, alertLight, props, mergedClsPrefixRef);\n    const rtlEnabledRef = useRtl('Alert', mergedRtlRef, mergedClsPrefixRef);\n    const cssVarsRef = computed(() => {\n      const {\n        common: {\n          cubicBezierEaseInOut\n        },\n        self\n      } = themeRef.value;\n      const {\n        fontSize,\n        borderRadius,\n        titleFontWeight,\n        lineHeight,\n        iconSize,\n        iconMargin,\n        iconMarginRtl,\n        closeIconSize,\n        closeBorderRadius,\n        closeSize,\n        closeMargin,\n        closeMarginRtl,\n        padding\n      } = self;\n      const {\n        type\n      } = props;\n      const {\n        left,\n        right\n      } = getMargin(iconMargin);\n      return {\n        '--n-bezier': cubicBezierEaseInOut,\n        '--n-color': self[createKey('color', type)],\n        '--n-close-icon-size': closeIconSize,\n        '--n-close-border-radius': closeBorderRadius,\n        '--n-close-color-hover': self[createKey('closeColorHover', type)],\n        '--n-close-color-pressed': self[createKey('closeColorPressed', type)],\n        '--n-close-icon-color': self[createKey('closeIconColor', type)],\n        '--n-close-icon-color-hover': self[createKey('closeIconColorHover', type)],\n        '--n-close-icon-color-pressed': self[createKey('closeIconColorPressed', type)],\n        '--n-icon-color': self[createKey('iconColor', type)],\n        '--n-border': self[createKey('border', type)],\n        '--n-title-text-color': self[createKey('titleTextColor', type)],\n        '--n-content-text-color': self[createKey('contentTextColor', type)],\n        '--n-line-height': lineHeight,\n        '--n-border-radius': borderRadius,\n        '--n-font-size': fontSize,\n        '--n-title-font-weight': titleFontWeight,\n        '--n-icon-size': iconSize,\n        '--n-icon-margin': iconMargin,\n        '--n-icon-margin-rtl': iconMarginRtl,\n        '--n-close-size': closeSize,\n        '--n-close-margin': closeMargin,\n        '--n-close-margin-rtl': closeMarginRtl,\n        '--n-padding': padding,\n        '--n-icon-margin-left': left,\n        '--n-icon-margin-right': right\n      };\n    });\n    const themeClassHandle = inlineThemeDisabled ? useThemeClass('alert', computed(() => {\n      return props.type[0];\n    }), cssVarsRef, props) : undefined;\n    const visibleRef = ref(true);\n    const doAfterLeave = () => {\n      const {\n        onAfterLeave,\n        onAfterHide // deprecated\n      } = props;\n      if (onAfterLeave) onAfterLeave();\n      if (onAfterHide) onAfterHide();\n    };\n    const handleCloseClick = () => {\n      var _a;\n      void Promise.resolve((_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props)).then(result => {\n        if (result === false) return;\n        visibleRef.value = false;\n      });\n    };\n    const handleAfterLeave = () => {\n      doAfterLeave();\n    };\n    return {\n      rtlEnabled: rtlEnabledRef,\n      mergedClsPrefix: mergedClsPrefixRef,\n      mergedBordered: mergedBorderedRef,\n      visible: visibleRef,\n      handleCloseClick,\n      handleAfterLeave,\n      mergedTheme: themeRef,\n      cssVars: inlineThemeDisabled ? undefined : cssVarsRef,\n      themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,\n      onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender\n    };\n  },\n  render() {\n    var _a;\n    (_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this);\n    return h(NFadeInExpandTransition, {\n      onAfterLeave: this.handleAfterLeave\n    }, {\n      default: () => {\n        const {\n          mergedClsPrefix,\n          $slots\n        } = this;\n        const attrs = {\n          class: [`${mergedClsPrefix}-alert`, this.themeClass, this.closable && `${mergedClsPrefix}-alert--closable`, this.showIcon && `${mergedClsPrefix}-alert--show-icon`,\n          // fix: https://github.com/tusen-ai/naive-ui/issues/4588\n          !this.title && this.closable && `${mergedClsPrefix}-alert--right-adjust`, this.rtlEnabled && `${mergedClsPrefix}-alert--rtl`],\n          style: this.cssVars,\n          role: 'alert'\n        };\n        return this.visible ? h(\"div\", Object.assign({}, mergeProps(this.$attrs, attrs)), this.closable && h(NBaseClose, {\n          clsPrefix: mergedClsPrefix,\n          class: `${mergedClsPrefix}-alert__close`,\n          onClick: this.handleCloseClick\n        }), this.bordered && h(\"div\", {\n          class: `${mergedClsPrefix}-alert__border`\n        }), this.showIcon && h(\"div\", {\n          class: `${mergedClsPrefix}-alert__icon`,\n          \"aria-hidden\": \"true\"\n        }, resolveSlot($slots.icon, () => [h(NBaseIcon, {\n          clsPrefix: mergedClsPrefix\n        }, {\n          default: () => {\n            switch (this.type) {\n              case 'success':\n                return h(SuccessIcon, null);\n              case 'info':\n                return h(InfoIcon, null);\n              case 'warning':\n                return h(WarningIcon, null);\n              case 'error':\n                return h(ErrorIcon, null);\n              default:\n                return null;\n            }\n          }\n        })])), h(\"div\", {\n          class: [`${mergedClsPrefix}-alert-body`, this.mergedBordered && `${mergedClsPrefix}-alert-body--bordered`]\n        }, resolveWrappedSlot($slots.header, children => {\n          const mergedChildren = children || this.title;\n          return mergedChildren ? h(\"div\", {\n            class: `${mergedClsPrefix}-alert-body__title`\n          }, mergedChildren) : null;\n        }), $slots.default && h(\"div\", {\n          class: `${mergedClsPrefix}-alert-body__content`\n        }, $slots))) : null;\n      }\n    });\n  }\n});","export default {\n  linkFontSize: '13px',\n  linkPadding: '0 0 0 16px',\n  railWidth: '4px'\n};","import { changeColor } from 'seemly';\nimport { commonLight } from \"../../_styles/common/index.mjs\";\nimport commonVars from \"./_common.mjs\";\nexport function self(vars) {\n  const {\n    borderRadius,\n    railColor,\n    primaryColor,\n    primaryColorHover,\n    primaryColorPressed,\n    textColor2\n  } = vars;\n  return Object.assign(Object.assign({}, commonVars), {\n    borderRadius,\n    railColor,\n    railColorActive: primaryColor,\n    linkColor: changeColor(primaryColor, {\n      alpha: 0.15\n    }),\n    linkTextColor: textColor2,\n    linkTextColorHover: primaryColorHover,\n    linkTextColorPressed: primaryColorPressed,\n    linkTextColorActive: primaryColor\n  });\n}\nconst anchorLight = {\n  name: 'Anchor',\n  common: commonLight,\n  self\n};\nexport default anchorLight;","import { commonDark } from \"../../_styles/common/index.mjs\";\nimport { self } from \"./light.mjs\";\nconst anchorDark = {\n  name: 'Anchor',\n  common: commonDark,\n  self\n};\nexport default anchorDark;","import { isBrowser } from \"./is-browser.mjs\";\nexport const isChrome = isBrowser && 'chrome' in window;\nexport const isFirefox = isBrowser && navigator.userAgent.includes('Firefox');\nexport const isSafari = isBrowser && navigator.userAgent.includes('Safari') && !isChrome;","export default {\n  paddingTiny: '0 8px',\n  paddingSmall: '0 10px',\n  paddingMedium: '0 12px',\n  paddingLarge: '0 14px',\n  clearSize: '16px'\n};","import { changeColor } from 'seemly';\nimport { commonDark } from \"../../_styles/common/index.mjs\";\nimport commonVariables from \"./_common.mjs\";\nconst inputDark = {\n  name: 'Input',\n  common: commonDark,\n  self(vars) {\n    const {\n      textColor2,\n      textColor3,\n      textColorDisabled,\n      primaryColor,\n      primaryColorHover,\n      inputColor,\n      inputColorDisabled,\n      warningColor,\n      warningColorHover,\n      errorColor,\n      errorColorHover,\n      borderRadius,\n      lineHeight,\n      fontSizeTiny,\n      fontSizeSmall,\n      fontSizeMedium,\n      fontSizeLarge,\n      heightTiny,\n      heightSmall,\n      heightMedium,\n      heightLarge,\n      clearColor,\n      clearColorHover,\n      clearColorPressed,\n      placeholderColor,\n      placeholderColorDisabled,\n      iconColor,\n      iconColorDisabled,\n      iconColorHover,\n      iconColorPressed,\n      fontWeight\n    } = vars;\n    return Object.assign(Object.assign({}, commonVariables), {\n      fontWeight,\n      countTextColorDisabled: textColorDisabled,\n      countTextColor: textColor3,\n      heightTiny,\n      heightSmall,\n      heightMedium,\n      heightLarge,\n      fontSizeTiny,\n      fontSizeSmall,\n      fontSizeMedium,\n      fontSizeLarge,\n      lineHeight,\n      lineHeightTextarea: lineHeight,\n      borderRadius,\n      iconSize: '16px',\n      groupLabelColor: inputColor,\n      textColor: textColor2,\n      textColorDisabled,\n      textDecorationColor: textColor2,\n      groupLabelTextColor: textColor2,\n      caretColor: primaryColor,\n      placeholderColor,\n      placeholderColorDisabled,\n      color: inputColor,\n      colorDisabled: inputColorDisabled,\n      colorFocus: changeColor(primaryColor, {\n        alpha: 0.1\n      }),\n      groupLabelBorder: '1px solid #0000',\n      border: '1px solid #0000',\n      borderHover: `1px solid ${primaryColorHover}`,\n      borderDisabled: '1px solid #0000',\n      borderFocus: `1px solid ${primaryColorHover}`,\n      boxShadowFocus: `0 0 8px 0 ${changeColor(primaryColor, {\n        alpha: 0.3\n      })}`,\n      loadingColor: primaryColor,\n      // warning\n      loadingColorWarning: warningColor,\n      borderWarning: `1px solid ${warningColor}`,\n      borderHoverWarning: `1px solid ${warningColorHover}`,\n      colorFocusWarning: changeColor(warningColor, {\n        alpha: 0.1\n      }),\n      borderFocusWarning: `1px solid ${warningColorHover}`,\n      boxShadowFocusWarning: `0 0 8px 0 ${changeColor(warningColor, {\n        alpha: 0.3\n      })}`,\n      caretColorWarning: warningColor,\n      // error\n      loadingColorError: errorColor,\n      borderError: `1px solid ${errorColor}`,\n      borderHoverError: `1px solid ${errorColorHover}`,\n      colorFocusError: changeColor(errorColor, {\n        alpha: 0.1\n      }),\n      borderFocusError: `1px solid ${errorColorHover}`,\n      boxShadowFocusError: `0 0 8px 0 ${changeColor(errorColor, {\n        alpha: 0.3\n      })}`,\n      caretColorError: errorColor,\n      clearColor,\n      clearColorHover,\n      clearColorPressed,\n      iconColor,\n      iconColorDisabled,\n      iconColorHover,\n      iconColorPressed,\n      suffixTextColor: textColor2\n    });\n  }\n};\nexport default inputDark;","import { changeColor } from 'seemly';\nimport { commonLight } from \"../../_styles/common/index.mjs\";\nimport commonVariables from \"./_common.mjs\";\nfunction self(vars) {\n  const {\n    textColor2,\n    textColor3,\n    textColorDisabled,\n    primaryColor,\n    primaryColorHover,\n    inputColor,\n    inputColorDisabled,\n    borderColor,\n    warningColor,\n    warningColorHover,\n    errorColor,\n    errorColorHover,\n    borderRadius,\n    lineHeight,\n    fontSizeTiny,\n    fontSizeSmall,\n    fontSizeMedium,\n    fontSizeLarge,\n    heightTiny,\n    heightSmall,\n    heightMedium,\n    heightLarge,\n    actionColor,\n    clearColor,\n    clearColorHover,\n    clearColorPressed,\n    placeholderColor,\n    placeholderColorDisabled,\n    iconColor,\n    iconColorDisabled,\n    iconColorHover,\n    iconColorPressed,\n    fontWeight\n  } = vars;\n  return Object.assign(Object.assign({}, commonVariables), {\n    fontWeight,\n    countTextColorDisabled: textColorDisabled,\n    countTextColor: textColor3,\n    heightTiny,\n    heightSmall,\n    heightMedium,\n    heightLarge,\n    fontSizeTiny,\n    fontSizeSmall,\n    fontSizeMedium,\n    fontSizeLarge,\n    lineHeight,\n    lineHeightTextarea: lineHeight,\n    borderRadius,\n    iconSize: '16px',\n    groupLabelColor: actionColor,\n    groupLabelTextColor: textColor2,\n    textColor: textColor2,\n    textColorDisabled,\n    textDecorationColor: textColor2,\n    caretColor: primaryColor,\n    placeholderColor,\n    placeholderColorDisabled,\n    color: inputColor,\n    colorDisabled: inputColorDisabled,\n    colorFocus: inputColor,\n    groupLabelBorder: `1px solid ${borderColor}`,\n    border: `1px solid ${borderColor}`,\n    borderHover: `1px solid ${primaryColorHover}`,\n    borderDisabled: `1px solid ${borderColor}`,\n    borderFocus: `1px solid ${primaryColorHover}`,\n    boxShadowFocus: `0 0 0 2px ${changeColor(primaryColor, {\n      alpha: 0.2\n    })}`,\n    loadingColor: primaryColor,\n    // warning\n    loadingColorWarning: warningColor,\n    borderWarning: `1px solid ${warningColor}`,\n    borderHoverWarning: `1px solid ${warningColorHover}`,\n    colorFocusWarning: inputColor,\n    borderFocusWarning: `1px solid ${warningColorHover}`,\n    boxShadowFocusWarning: `0 0 0 2px ${changeColor(warningColor, {\n      alpha: 0.2\n    })}`,\n    caretColorWarning: warningColor,\n    // error\n    loadingColorError: errorColor,\n    borderError: `1px solid ${errorColor}`,\n    borderHoverError: `1px solid ${errorColorHover}`,\n    colorFocusError: inputColor,\n    borderFocusError: `1px solid ${errorColorHover}`,\n    boxShadowFocusError: `0 0 0 2px ${changeColor(errorColor, {\n      alpha: 0.2\n    })}`,\n    caretColorError: errorColor,\n    clearColor,\n    clearColorHover,\n    clearColorPressed,\n    iconColor,\n    iconColorDisabled,\n    iconColorHover,\n    iconColorPressed,\n    suffixTextColor: textColor2\n  });\n}\nconst inputLight = {\n  name: 'Input',\n  common: commonLight,\n  self\n};\nexport default inputLight;","import { createInjectionKey } from \"../../_utils/index.mjs\";\nexport const inputInjectionKey = createInjectionKey('n-input');","import { c, cB, cE, cM, cNotM } from \"../../../_utils/cssr/index.mjs\";\n// vars:\n// --n-bezier\n// --n-color\n// --n-font-size\n// --n-border-radius\n// --n-height\n// --n-padding-left\n// --n-padding-right\n// --n-text-color\n// --n-text-color-disabled\n// --n-caret-color\n// --n-text-decoration-color\n// --n-border\n// --n-border-disabled\n// --n-border-hover\n// --n-border-focus\n// --n-placeholder-color\n// --n-placeholder-color-disabled\n// --n-line-height-textarea\n// --n-color-disabled\n// --n-color-focus\n// --n-box-shadow-focus\n// --n-clear-color\n// --n-clear-size\n// --n-clear-color-hover\n// --n-clear-color-pressed\n// --n-suffix-text-color\n// --n-icon-color\n// --n-icon-color-hover\n// --n-icon-color-pressed\n// --n-icon-color-disabled\n// --n-count-text-color\n// --n-count-text-color-disabled\n// --n-loading-color\n// ...form item vars\nexport default cB('input', `\n max-width: 100%;\n cursor: text;\n line-height: 1.5;\n z-index: auto;\n outline: none;\n box-sizing: border-box;\n position: relative;\n display: inline-flex;\n border-radius: var(--n-border-radius);\n background-color: var(--n-color);\n transition: background-color .3s var(--n-bezier);\n font-size: var(--n-font-size);\n font-weight: var(--n-font-weight);\n --n-padding-vertical: calc((var(--n-height) - 1.5 * var(--n-font-size)) / 2);\n`, [\n// common\ncE('input, textarea', `\n overflow: hidden;\n flex-grow: 1;\n position: relative;\n `), cE('input-el, textarea-el, input-mirror, textarea-mirror, separator, placeholder', `\n box-sizing: border-box;\n font-size: inherit;\n line-height: 1.5;\n font-family: inherit;\n border: none;\n outline: none;\n background-color: #0000;\n text-align: inherit;\n transition:\n -webkit-text-fill-color .3s var(--n-bezier),\n caret-color .3s var(--n-bezier),\n color .3s var(--n-bezier),\n text-decoration-color .3s var(--n-bezier);\n `), cE('input-el, textarea-el', `\n -webkit-appearance: none;\n scrollbar-width: none;\n width: 100%;\n min-width: 0;\n text-decoration-color: var(--n-text-decoration-color);\n color: var(--n-text-color);\n caret-color: var(--n-caret-color);\n background-color: transparent;\n `, [c('&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb', `\n width: 0;\n height: 0;\n display: none;\n `), c('&::placeholder', `\n color: #0000;\n -webkit-text-fill-color: transparent !important;\n `), c('&:-webkit-autofill ~', [cE('placeholder', 'display: none;')])]), cM('round', [cNotM('textarea', 'border-radius: calc(var(--n-height) / 2);')]), cE('placeholder', `\n pointer-events: none;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n overflow: hidden;\n color: var(--n-placeholder-color);\n `, [c('span', `\n width: 100%;\n display: inline-block;\n `)]), cM('textarea', [cE('placeholder', 'overflow: visible;')]), cNotM('autosize', 'width: 100%;'), cM('autosize', [cE('textarea-el, input-el', `\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n `)]),\n// input\ncB('input-wrapper', `\n overflow: hidden;\n display: inline-flex;\n flex-grow: 1;\n position: relative;\n padding-left: var(--n-padding-left);\n padding-right: var(--n-padding-right);\n `), cE('input-mirror', `\n padding: 0;\n height: var(--n-height);\n line-height: var(--n-height);\n overflow: hidden;\n visibility: hidden;\n position: static;\n white-space: pre;\n pointer-events: none;\n `), cE('input-el', `\n padding: 0;\n height: var(--n-height);\n line-height: var(--n-height);\n `, [c('&[type=password]::-ms-reveal', 'display: none;'), c('+', [cE('placeholder', `\n display: flex;\n align-items: center; \n `)])]), cNotM('textarea', [cE('placeholder', 'white-space: nowrap;')]), cE('eye', `\n display: flex;\n align-items: center;\n justify-content: center;\n transition: color .3s var(--n-bezier);\n `),\n// textarea\ncM('textarea', 'width: 100%;', [cB('input-word-count', `\n position: absolute;\n right: var(--n-padding-right);\n bottom: var(--n-padding-vertical);\n `), cM('resizable', [cB('input-wrapper', `\n resize: vertical;\n min-height: var(--n-height);\n `)]), cE('textarea-el, textarea-mirror, placeholder', `\n height: 100%;\n padding-left: 0;\n padding-right: 0;\n padding-top: var(--n-padding-vertical);\n padding-bottom: var(--n-padding-vertical);\n word-break: break-word;\n display: inline-block;\n vertical-align: bottom;\n box-sizing: border-box;\n line-height: var(--n-line-height-textarea);\n margin: 0;\n resize: none;\n white-space: pre-wrap;\n scroll-padding-block-end: var(--n-padding-vertical);\n `), cE('textarea-mirror', `\n width: 100%;\n pointer-events: none;\n overflow: hidden;\n visibility: hidden;\n position: static;\n white-space: pre-wrap;\n overflow-wrap: break-word;\n `)]),\n// pair\ncM('pair', [cE('input-el, placeholder', 'text-align: center;'), cE('separator', `\n display: flex;\n align-items: center;\n transition: color .3s var(--n-bezier);\n color: var(--n-text-color);\n white-space: nowrap;\n `, [cB('icon', `\n color: var(--n-icon-color);\n `), cB('base-icon', `\n color: var(--n-icon-color);\n `)])]), cM('disabled', `\n cursor: not-allowed;\n background-color: var(--n-color-disabled);\n `, [cE('border', 'border: var(--n-border-disabled);'), cE('input-el, textarea-el', `\n cursor: not-allowed;\n color: var(--n-text-color-disabled);\n text-decoration-color: var(--n-text-color-disabled);\n `), cE('placeholder', 'color: var(--n-placeholder-color-disabled);'), cE('separator', 'color: var(--n-text-color-disabled);', [cB('icon', `\n color: var(--n-icon-color-disabled);\n `), cB('base-icon', `\n color: var(--n-icon-color-disabled);\n `)]), cB('input-word-count', `\n color: var(--n-count-text-color-disabled);\n `), cE('suffix, prefix', 'color: var(--n-text-color-disabled);', [cB('icon', `\n color: var(--n-icon-color-disabled);\n `), cB('internal-icon', `\n color: var(--n-icon-color-disabled);\n `)])]), cNotM('disabled', [cE('eye', `\n color: var(--n-icon-color);\n cursor: pointer;\n `, [c('&:hover', `\n color: var(--n-icon-color-hover);\n `), c('&:active', `\n color: var(--n-icon-color-pressed);\n `)]), c('&:hover', [cE('state-border', 'border: var(--n-border-hover);')]), cM('focus', 'background-color: var(--n-color-focus);', [cE('state-border', `\n border: var(--n-border-focus);\n box-shadow: var(--n-box-shadow-focus);\n `)])]), cE('border, state-border', `\n box-sizing: border-box;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n pointer-events: none;\n border-radius: inherit;\n border: var(--n-border);\n transition:\n box-shadow .3s var(--n-bezier),\n border-color .3s var(--n-bezier);\n `), cE('state-border', `\n border-color: #0000;\n z-index: 1;\n `), cE('prefix', 'margin-right: 4px;'), cE('suffix', `\n margin-left: 4px;\n `), cE('suffix, prefix', `\n transition: color .3s var(--n-bezier);\n flex-wrap: nowrap;\n flex-shrink: 0;\n line-height: var(--n-height);\n white-space: nowrap;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n color: var(--n-suffix-text-color);\n `, [cB('base-loading', `\n font-size: var(--n-icon-size);\n margin: 0 2px;\n color: var(--n-loading-color);\n `), cB('base-clear', `\n font-size: var(--n-icon-size);\n `, [cE('placeholder', [cB('base-icon', `\n transition: color .3s var(--n-bezier);\n color: var(--n-icon-color);\n font-size: var(--n-icon-size);\n `)])]), c('>', [cB('icon', `\n transition: color .3s var(--n-bezier);\n color: var(--n-icon-color);\n font-size: var(--n-icon-size);\n `)]), cB('base-icon', `\n font-size: var(--n-icon-size);\n `)]), cB('input-word-count', `\n pointer-events: none;\n line-height: 1.5;\n font-size: .85em;\n color: var(--n-count-text-color);\n transition: color .3s var(--n-bezier);\n margin-left: 4px;\n font-variant: tabular-nums;\n `), ['warning', 'error'].map(status => cM(`${status}-status`, [cNotM('disabled', [cB('base-loading', `\n color: var(--n-loading-color-${status})\n `), cE('input-el, textarea-el', `\n caret-color: var(--n-caret-color-${status});\n `), cE('state-border', `\n border: var(--n-border-${status});\n `), c('&:hover', [cE('state-border', `\n border: var(--n-border-hover-${status});\n `)]), c('&:focus', `\n background-color: var(--n-color-focus-${status});\n `, [cE('state-border', `\n box-shadow: var(--n-box-shadow-focus-${status});\n border: var(--n-border-focus-${status});\n `)]), cM('focus', `\n background-color: var(--n-color-focus-${status});\n `, [cE('state-border', `\n box-shadow: var(--n-box-shadow-focus-${status});\n border: var(--n-border-focus-${status});\n `)])])]))]);\nexport const safariStyle = cB('input', [cM('disabled', [cE('input-el, textarea-el', `\n -webkit-text-fill-color: var(--n-text-color-disabled);\n `)])]);","import { ref, watch } from 'vue';\nexport function len(s) {\n  let count = 0;\n  for (const _ of s) {\n    count++;\n  }\n  return count;\n}\nexport function isEmptyInputValue(value) {\n  return value === '' || value == null;\n}\nexport function useCursor(inputElRef) {\n  const selectionRef = ref(null);\n  function recordCursor() {\n    const {\n      value: input\n    } = inputElRef;\n    if (!(input === null || input === void 0 ? void 0 : input.focus)) {\n      reset();\n      return;\n    }\n    const {\n      selectionStart,\n      selectionEnd,\n      value\n    } = input;\n    if (selectionStart == null || selectionEnd == null) {\n      reset();\n      return;\n    }\n    selectionRef.value = {\n      start: selectionStart,\n      end: selectionEnd,\n      beforeText: value.slice(0, selectionStart),\n      afterText: value.slice(selectionEnd)\n    };\n  }\n  function restoreCursor() {\n    var _a;\n    const {\n      value: selection\n    } = selectionRef;\n    const {\n      value: inputEl\n    } = inputElRef;\n    if (!selection || !inputEl) {\n      return;\n    }\n    const {\n      value\n    } = inputEl;\n    const {\n      start,\n      beforeText,\n      afterText\n    } = selection;\n    let startPos = value.length;\n    if (value.endsWith(afterText)) {\n      startPos = value.length - afterText.length;\n    } else if (value.startsWith(beforeText)) {\n      startPos = beforeText.length;\n    } else {\n      const beforeLastChar = beforeText[start - 1];\n      const newIndex = value.indexOf(beforeLastChar, start - 1);\n      if (newIndex !== -1) {\n        startPos = newIndex + 1;\n      }\n    }\n    (_a = inputEl.setSelectionRange) === null || _a === void 0 ? void 0 : _a.call(inputEl, startPos, startPos);\n  }\n  function reset() {\n    selectionRef.value = null;\n  }\n  watch(inputElRef, reset);\n  return {\n    recordCursor,\n    restoreCursor\n  };\n}","import { computed, defineComponent, h, inject } from 'vue';\nimport { resolveSlotWithTypedProps } from \"../../_utils/index.mjs\";\nimport { inputInjectionKey } from \"./interface.mjs\";\nimport { len } from \"./utils.mjs\";\nexport default defineComponent({\n  name: 'InputWordCount',\n  setup(_, {\n    slots\n  }) {\n    const {\n      mergedValueRef,\n      maxlengthRef,\n      mergedClsPrefixRef,\n      countGraphemesRef\n    } = inject(inputInjectionKey);\n    const wordCountRef = computed(() => {\n      const {\n        value: mergedValue\n      } = mergedValueRef;\n      if (mergedValue === null || Array.isArray(mergedValue)) return 0;\n      return (countGraphemesRef.value || len)(mergedValue);\n    });\n    return () => {\n      const {\n        value: maxlength\n      } = maxlengthRef;\n      const {\n        value: mergedValue\n      } = mergedValueRef;\n      return h(\"span\", {\n        class: `${mergedClsPrefixRef.value}-input-word-count`\n      }, resolveSlotWithTypedProps(slots.default, {\n        value: mergedValue === null || Array.isArray(mergedValue) ? '' : mergedValue\n      }, () => [maxlength === undefined ? wordCountRef.value : `${wordCountRef.value} / ${maxlength}`]));\n    };\n  }\n});","import { off, on } from 'evtd';\nimport { getPadding } from 'seemly';\nimport { useMemo, useMergedState } from 'vooks';\nimport { computed, defineComponent, Fragment, getCurrentInstance, h, nextTick, onMounted, provide, ref, toRef, watch, watchEffect } from 'vue';\nimport { VResizeObserver } from 'vueuc';\nimport { NBaseClear, NBaseIcon, NBaseSuffix, NScrollbar } from \"../../_internal/index.mjs\";\nimport { EyeIcon, EyeOffIcon } from \"../../_internal/icons/index.mjs\";\nimport { useConfig, useFormItem, useLocale, useStyle, useTheme, useThemeClass } from \"../../_mixins/index.mjs\";\nimport { useRtl } from \"../../_mixins/use-rtl.mjs\";\nimport { call, createKey, resolveSlot, resolveWrappedSlot } from \"../../_utils/index.mjs\";\nimport { isSafari } from \"../../_utils/env/browser.mjs\";\nimport { inputLight } from \"../styles/index.mjs\";\nimport { inputInjectionKey } from \"./interface.mjs\";\nimport style, { safariStyle } from \"./styles/input.cssr.mjs\";\nimport { isEmptyInputValue, useCursor } from \"./utils.mjs\";\nimport WordCount from \"./WordCount.mjs\";\nexport const inputProps = Object.assign(Object.assign({}, useTheme.props), {\n  bordered: {\n    type: Boolean,\n    default: undefined\n  },\n  type: {\n    type: String,\n    default: 'text'\n  },\n  placeholder: [Array, String],\n  defaultValue: {\n    type: [String, Array],\n    default: null\n  },\n  value: [String, Array],\n  disabled: {\n    type: Boolean,\n    default: undefined\n  },\n  size: String,\n  rows: {\n    type: [Number, String],\n    default: 3\n  },\n  round: Boolean,\n  minlength: [String, Number],\n  maxlength: [String, Number],\n  clearable: Boolean,\n  autosize: {\n    type: [Boolean, Object],\n    default: false\n  },\n  pair: Boolean,\n  separator: String,\n  readonly: {\n    type: [String, Boolean],\n    default: false\n  },\n  passivelyActivated: Boolean,\n  showPasswordOn: String,\n  stateful: {\n    type: Boolean,\n    default: true\n  },\n  autofocus: Boolean,\n  inputProps: Object,\n  resizable: {\n    type: Boolean,\n    default: true\n  },\n  showCount: Boolean,\n  loading: {\n    type: Boolean,\n    default: undefined\n  },\n  allowInput: Function,\n  renderCount: Function,\n  onMousedown: Function,\n  onKeydown: Function,\n  onKeyup: [Function, Array],\n  onInput: [Function, Array],\n  onFocus: [Function, Array],\n  onBlur: [Function, Array],\n  onClick: [Function, Array],\n  onChange: [Function, Array],\n  onClear: [Function, Array],\n  countGraphemes: Function,\n  status: String,\n  'onUpdate:value': [Function, Array],\n  onUpdateValue: [Function, Array],\n  /** private */\n  textDecoration: [String, Array],\n  attrSize: {\n    type: Number,\n    default: 20\n  },\n  onInputBlur: [Function, Array],\n  onInputFocus: [Function, Array],\n  onDeactivate: [Function, Array],\n  onActivate: [Function, Array],\n  onWrapperFocus: [Function, Array],\n  onWrapperBlur: [Function, Array],\n  internalDeactivateOnEnter: Boolean,\n  internalForceFocus: Boolean,\n  internalLoadingBeforeSuffix: {\n    type: Boolean,\n    default: true\n  },\n  /** deprecated */\n  showPasswordToggle: Boolean\n});\nexport default defineComponent({\n  name: 'Input',\n  props: inputProps,\n  slots: Object,\n  setup(props) {\n    const {\n      mergedClsPrefixRef,\n      mergedBorderedRef,\n      inlineThemeDisabled,\n      mergedRtlRef\n    } = useConfig(props);\n    const themeRef = useTheme('Input', '-input', style, inputLight, props, mergedClsPrefixRef);\n    if (isSafari) {\n      useStyle('-input-safari', safariStyle, mergedClsPrefixRef);\n    }\n    // dom refs\n    const wrapperElRef = ref(null);\n    const textareaElRef = ref(null);\n    const textareaMirrorElRef = ref(null);\n    const inputMirrorElRef = ref(null);\n    const inputElRef = ref(null);\n    const inputEl2Ref = ref(null);\n    const currentFocusedInputRef = ref(null);\n    const focusedInputCursorControl = useCursor(currentFocusedInputRef);\n    const textareaScrollbarInstRef = ref(null);\n    // local\n    const {\n      localeRef\n    } = useLocale('Input');\n    // value\n    const uncontrolledValueRef = ref(props.defaultValue);\n    const controlledValueRef = toRef(props, 'value');\n    const mergedValueRef = useMergedState(controlledValueRef, uncontrolledValueRef);\n    // form-item\n    const formItem = useFormItem(props);\n    const {\n      mergedSizeRef,\n      mergedDisabledRef,\n      mergedStatusRef\n    } = formItem;\n    // states\n    const focusedRef = ref(false);\n    const hoverRef = ref(false);\n    const isComposingRef = ref(false);\n    const activatedRef = ref(false);\n    let syncSource = null;\n    // placeholder\n    const mergedPlaceholderRef = computed(() => {\n      const {\n        placeholder,\n        pair\n      } = props;\n      if (pair) {\n        if (Array.isArray(placeholder)) {\n          return placeholder;\n        } else if (placeholder === undefined) {\n          return ['', ''];\n        }\n        return [placeholder, placeholder];\n      } else if (placeholder === undefined) {\n        return [localeRef.value.placeholder];\n      } else {\n        return [placeholder];\n      }\n    });\n    const showPlaceholder1Ref = computed(() => {\n      const {\n        value: isComposing\n      } = isComposingRef;\n      const {\n        value: mergedValue\n      } = mergedValueRef;\n      const {\n        value: mergedPlaceholder\n      } = mergedPlaceholderRef;\n      return !isComposing && (isEmptyInputValue(mergedValue) || Array.isArray(mergedValue) && isEmptyInputValue(mergedValue[0])) && mergedPlaceholder[0];\n    });\n    const showPlaceholder2Ref = computed(() => {\n      const {\n        value: isComposing\n      } = isComposingRef;\n      const {\n        value: mergedValue\n      } = mergedValueRef;\n      const {\n        value: mergedPlaceholder\n      } = mergedPlaceholderRef;\n      return !isComposing && mergedPlaceholder[1] && (isEmptyInputValue(mergedValue) || Array.isArray(mergedValue) && isEmptyInputValue(mergedValue[1]));\n    });\n    // focus\n    const mergedFocusRef = useMemo(() => {\n      return props.internalForceFocus || focusedRef.value;\n    });\n    // clear\n    const showClearButton = useMemo(() => {\n      if (mergedDisabledRef.value || props.readonly || !props.clearable || !mergedFocusRef.value && !hoverRef.value) {\n        return false;\n      }\n      const {\n        value: mergedValue\n      } = mergedValueRef;\n      const {\n        value: mergedFocus\n      } = mergedFocusRef;\n      if (props.pair) {\n        return !!(Array.isArray(mergedValue) && (mergedValue[0] || mergedValue[1])) && (hoverRef.value || mergedFocus);\n      } else {\n        return !!mergedValue && (hoverRef.value || mergedFocus);\n      }\n    });\n    // passwordVisible\n    const mergedShowPasswordOnRef = computed(() => {\n      const {\n        showPasswordOn\n      } = props;\n      if (showPasswordOn) {\n        return showPasswordOn;\n      }\n      if (props.showPasswordToggle) return 'click';\n      return undefined;\n    });\n    const passwordVisibleRef = ref(false);\n    // text-decoration\n    const textDecorationStyleRef = computed(() => {\n      const {\n        textDecoration\n      } = props;\n      if (!textDecoration) return ['', ''];\n      if (Array.isArray(textDecoration)) {\n        return textDecoration.map(v => ({\n          textDecoration: v\n        }));\n      }\n      return [{\n        textDecoration\n      }];\n    });\n    const textAreaScrollContainerWidthRef = ref(undefined);\n    // textarea autosize\n    const updateTextAreaStyle = () => {\n      var _a, _b;\n      if (props.type === 'textarea') {\n        const {\n          autosize\n        } = props;\n        if (autosize) {\n          textAreaScrollContainerWidthRef.value = (_b = (_a = textareaScrollbarInstRef.value) === null || _a === void 0 ? void 0 : _a.$el) === null || _b === void 0 ? void 0 : _b.offsetWidth;\n        }\n        if (!textareaElRef.value) return;\n        if (typeof autosize === 'boolean') return;\n        const {\n          paddingTop: stylePaddingTop,\n          paddingBottom: stylePaddingBottom,\n          lineHeight: styleLineHeight\n        } = window.getComputedStyle(textareaElRef.value);\n        const paddingTop = Number(stylePaddingTop.slice(0, -2));\n        const paddingBottom = Number(stylePaddingBottom.slice(0, -2));\n        const lineHeight = Number(styleLineHeight.slice(0, -2));\n        const {\n          value: textareaMirrorEl\n        } = textareaMirrorElRef;\n        if (!textareaMirrorEl) return;\n        if (autosize.minRows) {\n          const minRows = Math.max(autosize.minRows, 1);\n          const styleMinHeight = `${paddingTop + paddingBottom + lineHeight * minRows}px`;\n          textareaMirrorEl.style.minHeight = styleMinHeight;\n        }\n        if (autosize.maxRows) {\n          const styleMaxHeight = `${paddingTop + paddingBottom + lineHeight * autosize.maxRows}px`;\n          textareaMirrorEl.style.maxHeight = styleMaxHeight;\n        }\n      }\n    };\n    // word count\n    const maxlengthRef = computed(() => {\n      const {\n        maxlength\n      } = props;\n      return maxlength === undefined ? undefined : Number(maxlength);\n    });\n    onMounted(() => {\n      // sync mirror if is not pair\n      const {\n        value\n      } = mergedValueRef;\n      if (!Array.isArray(value)) {\n        syncMirror(value);\n      }\n    });\n    // other methods\n    const vm = getCurrentInstance().proxy;\n    function doUpdateValue(value, meta) {\n      const {\n        onUpdateValue,\n        'onUpdate:value': _onUpdateValue,\n        onInput\n      } = props;\n      const {\n        nTriggerFormInput\n      } = formItem;\n      if (onUpdateValue) call(onUpdateValue, value, meta);\n      if (_onUpdateValue) call(_onUpdateValue, value, meta);\n      if (onInput) call(onInput, value, meta);\n      uncontrolledValueRef.value = value;\n      nTriggerFormInput();\n    }\n    function doChange(value, meta) {\n      const {\n        onChange\n      } = props;\n      const {\n        nTriggerFormChange\n      } = formItem;\n      if (onChange) call(onChange, value, meta);\n      uncontrolledValueRef.value = value;\n      nTriggerFormChange();\n    }\n    function doBlur(e) {\n      const {\n        onBlur\n      } = props;\n      const {\n        nTriggerFormBlur\n      } = formItem;\n      if (onBlur) call(onBlur, e);\n      nTriggerFormBlur();\n    }\n    function doFocus(e) {\n      const {\n        onFocus\n      } = props;\n      const {\n        nTriggerFormFocus\n      } = formItem;\n      if (onFocus) call(onFocus, e);\n      nTriggerFormFocus();\n    }\n    function doClear(e) {\n      const {\n        onClear\n      } = props;\n      if (onClear) call(onClear, e);\n    }\n    function doUpdateValueBlur(e) {\n      const {\n        onInputBlur\n      } = props;\n      if (onInputBlur) call(onInputBlur, e);\n    }\n    function doUpdateValueFocus(e) {\n      const {\n        onInputFocus\n      } = props;\n      if (onInputFocus) call(onInputFocus, e);\n    }\n    function doDeactivate() {\n      const {\n        onDeactivate\n      } = props;\n      if (onDeactivate) call(onDeactivate);\n    }\n    function doActivate() {\n      const {\n        onActivate\n      } = props;\n      if (onActivate) call(onActivate);\n    }\n    function doClick(e) {\n      const {\n        onClick\n      } = props;\n      if (onClick) call(onClick, e);\n    }\n    function doWrapperFocus(e) {\n      const {\n        onWrapperFocus\n      } = props;\n      if (onWrapperFocus) call(onWrapperFocus, e);\n    }\n    function doWrapperBlur(e) {\n      const {\n        onWrapperBlur\n      } = props;\n      if (onWrapperBlur) call(onWrapperBlur, e);\n    }\n    // methods\n    function handleCompositionStart() {\n      isComposingRef.value = true;\n    }\n    function handleCompositionEnd(e) {\n      isComposingRef.value = false;\n      if (e.target === inputEl2Ref.value) {\n        handleInput(e, 1);\n      } else {\n        handleInput(e, 0);\n      }\n    }\n    function handleInput(e, index = 0, event = 'input') {\n      const targetValue = e.target.value;\n      syncMirror(targetValue);\n      if (e instanceof InputEvent && !e.isComposing) {\n        isComposingRef.value = false;\n      }\n      if (props.type === 'textarea') {\n        const {\n          value: textareaScrollbarInst\n        } = textareaScrollbarInstRef;\n        if (textareaScrollbarInst) {\n          textareaScrollbarInst.syncUnifiedContainer();\n        }\n      }\n      syncSource = targetValue;\n      if (isComposingRef.value) return;\n      focusedInputCursorControl.recordCursor();\n      const isIncomingValueValid = allowInput(targetValue);\n      if (isIncomingValueValid) {\n        if (!props.pair) {\n          if (event === 'input') {\n            doUpdateValue(targetValue, {\n              source: index\n            });\n          } else {\n            doChange(targetValue, {\n              source: index\n            });\n          }\n        } else {\n          let {\n            value\n          } = mergedValueRef;\n          if (!Array.isArray(value)) {\n            value = ['', ''];\n          } else {\n            value = [value[0], value[1]];\n          }\n          value[index] = targetValue;\n          if (event === 'input') {\n            doUpdateValue(value, {\n              source: index\n            });\n          } else {\n            doChange(value, {\n              source: index\n            });\n          }\n        }\n      }\n      // force update to sync input's view with value\n      // if not set, after input, input value won't sync with dom input value\n      vm.$forceUpdate();\n      if (!isIncomingValueValid) {\n        void nextTick(focusedInputCursorControl.restoreCursor);\n      }\n    }\n    function allowInput(value) {\n      const {\n        countGraphemes,\n        maxlength,\n        minlength\n      } = props;\n      if (countGraphemes) {\n        let graphemesCount;\n        if (maxlength !== undefined) {\n          if (graphemesCount === undefined) {\n            graphemesCount = countGraphemes(value);\n          }\n          if (graphemesCount > Number(maxlength)) return false;\n        }\n        if (minlength !== undefined) {\n          if (graphemesCount === undefined) {\n            graphemesCount = countGraphemes(value);\n          }\n          if (graphemesCount < Number(maxlength)) return false;\n        }\n      }\n      const {\n        allowInput\n      } = props;\n      if (typeof allowInput === 'function') {\n        return allowInput(value);\n      }\n      return true;\n    }\n    function handleInputBlur(e) {\n      doUpdateValueBlur(e);\n      if (e.relatedTarget === wrapperElRef.value) {\n        doDeactivate();\n      }\n      if (!(e.relatedTarget !== null && (e.relatedTarget === inputElRef.value || e.relatedTarget === inputEl2Ref.value || e.relatedTarget === textareaElRef.value))) {\n        activatedRef.value = false;\n      }\n      dealWithEvent(e, 'blur');\n      currentFocusedInputRef.value = null;\n    }\n    function handleInputFocus(e, index) {\n      doUpdateValueFocus(e);\n      focusedRef.value = true;\n      activatedRef.value = true;\n      doActivate();\n      dealWithEvent(e, 'focus');\n      if (index === 0) {\n        currentFocusedInputRef.value = inputElRef.value;\n      } else if (index === 1) {\n        currentFocusedInputRef.value = inputEl2Ref.value;\n      } else if (index === 2) {\n        currentFocusedInputRef.value = textareaElRef.value;\n      }\n    }\n    function handleWrapperBlur(e) {\n      if (props.passivelyActivated) {\n        doWrapperBlur(e);\n        dealWithEvent(e, 'blur');\n      }\n    }\n    function handleWrapperFocus(e) {\n      if (props.passivelyActivated) {\n        focusedRef.value = true;\n        doWrapperFocus(e);\n        dealWithEvent(e, 'focus');\n      }\n    }\n    function dealWithEvent(e, type) {\n      if (e.relatedTarget !== null && (e.relatedTarget === inputElRef.value || e.relatedTarget === inputEl2Ref.value || e.relatedTarget === textareaElRef.value || e.relatedTarget === wrapperElRef.value)) {\n        /**\n         * activeElement transfer inside the input, do nothing\n         */\n      } else {\n        if (type === 'focus') {\n          doFocus(e);\n          focusedRef.value = true;\n        } else if (type === 'blur') {\n          doBlur(e);\n          focusedRef.value = false;\n        }\n      }\n    }\n    function handleChange(e, index) {\n      handleInput(e, index, 'change');\n    }\n    function handleClick(e) {\n      doClick(e);\n    }\n    function handleClear(e) {\n      doClear(e);\n      clearValue();\n    }\n    function clearValue() {\n      if (props.pair) {\n        doUpdateValue(['', ''], {\n          source: 'clear'\n        });\n        doChange(['', ''], {\n          source: 'clear'\n        });\n      } else {\n        doUpdateValue('', {\n          source: 'clear'\n        });\n        doChange('', {\n          source: 'clear'\n        });\n      }\n    }\n    function handleMouseDown(e) {\n      const {\n        onMousedown\n      } = props;\n      if (onMousedown) onMousedown(e);\n      const {\n        tagName\n      } = e.target;\n      if (tagName !== 'INPUT' && tagName !== 'TEXTAREA') {\n        if (props.resizable) {\n          const {\n            value: wrapperEl\n          } = wrapperElRef;\n          if (wrapperEl) {\n            const {\n              left,\n              top,\n              width,\n              height\n            } = wrapperEl.getBoundingClientRect();\n            const resizeHandleSize = 14;\n            if (left + width - resizeHandleSize < e.clientX && e.clientX < left + width && top + height - resizeHandleSize < e.clientY && e.clientY < top + height) {\n              // touching resize handle, just let it go.\n              // resize won't take focus, maybe there is a better way to do this.\n              // hope someone can figure out a better solution\n              return;\n            }\n          }\n        }\n        e.preventDefault();\n        if (!focusedRef.value) {\n          focus();\n        }\n      }\n    }\n    function handleMouseEnter() {\n      var _a;\n      hoverRef.value = true;\n      if (props.type === 'textarea') {\n        (_a = textareaScrollbarInstRef.value) === null || _a === void 0 ? void 0 : _a.handleMouseEnterWrapper();\n      }\n    }\n    function handleMouseLeave() {\n      var _a;\n      hoverRef.value = false;\n      if (props.type === 'textarea') {\n        (_a = textareaScrollbarInstRef.value) === null || _a === void 0 ? void 0 : _a.handleMouseLeaveWrapper();\n      }\n    }\n    function handlePasswordToggleClick() {\n      if (mergedDisabledRef.value) return;\n      if (mergedShowPasswordOnRef.value !== 'click') return;\n      passwordVisibleRef.value = !passwordVisibleRef.value;\n    }\n    function handlePasswordToggleMousedown(e) {\n      if (mergedDisabledRef.value) return;\n      e.preventDefault();\n      const preventDefaultOnce = e => {\n        e.preventDefault();\n        off('mouseup', document, preventDefaultOnce);\n      };\n      on('mouseup', document, preventDefaultOnce);\n      if (mergedShowPasswordOnRef.value !== 'mousedown') return;\n      passwordVisibleRef.value = true;\n      const hidePassword = () => {\n        passwordVisibleRef.value = false;\n        off('mouseup', document, hidePassword);\n      };\n      on('mouseup', document, hidePassword);\n    }\n    function handleWrapperKeyup(e) {\n      if (props.onKeyup) call(props.onKeyup, e);\n    }\n    function handleWrapperKeydown(e) {\n      if (props.onKeydown) call(props.onKeydown, e);\n      switch (e.key) {\n        case 'Escape':\n          handleWrapperKeydownEsc();\n          break;\n        case 'Enter':\n          handleWrapperKeydownEnter(e);\n          break;\n      }\n    }\n    function handleWrapperKeydownEnter(e) {\n      var _a, _b;\n      if (props.passivelyActivated) {\n        const {\n          value: focused\n        } = activatedRef;\n        if (focused) {\n          if (props.internalDeactivateOnEnter) {\n            handleWrapperKeydownEsc();\n          }\n          return;\n        }\n        e.preventDefault();\n        if (props.type === 'textarea') {\n          (_a = textareaElRef.value) === null || _a === void 0 ? void 0 : _a.focus();\n        } else {\n          (_b = inputElRef.value) === null || _b === void 0 ? void 0 : _b.focus();\n        }\n      }\n    }\n    function handleWrapperKeydownEsc() {\n      if (props.passivelyActivated) {\n        activatedRef.value = false;\n        void nextTick(() => {\n          var _a;\n          (_a = wrapperElRef.value) === null || _a === void 0 ? void 0 : _a.focus();\n        });\n      }\n    }\n    function focus() {\n      var _a, _b, _c;\n      if (mergedDisabledRef.value) return;\n      if (props.passivelyActivated) {\n        (_a = wrapperElRef.value) === null || _a === void 0 ? void 0 : _a.focus();\n      } else {\n        (_b = textareaElRef.value) === null || _b === void 0 ? void 0 : _b.focus();\n        (_c = inputElRef.value) === null || _c === void 0 ? void 0 : _c.focus();\n      }\n    }\n    function blur() {\n      var _a;\n      if ((_a = wrapperElRef.value) === null || _a === void 0 ? void 0 : _a.contains(document.activeElement)) {\n        ;\n        document.activeElement.blur();\n      }\n    }\n    function select() {\n      var _a, _b;\n      (_a = textareaElRef.value) === null || _a === void 0 ? void 0 : _a.select();\n      (_b = inputElRef.value) === null || _b === void 0 ? void 0 : _b.select();\n    }\n    function activate() {\n      if (mergedDisabledRef.value) return;\n      if (textareaElRef.value) textareaElRef.value.focus();else if (inputElRef.value) inputElRef.value.focus();\n    }\n    function deactivate() {\n      const {\n        value: wrapperEl\n      } = wrapperElRef;\n      if ((wrapperEl === null || wrapperEl === void 0 ? void 0 : wrapperEl.contains(document.activeElement)) && wrapperEl !== document.activeElement) {\n        handleWrapperKeydownEsc();\n      }\n    }\n    function scrollTo(options) {\n      if (props.type === 'textarea') {\n        const {\n          value: textareaEl\n        } = textareaElRef;\n        textareaEl === null || textareaEl === void 0 ? void 0 : textareaEl.scrollTo(options);\n      } else {\n        const {\n          value: inputEl\n        } = inputElRef;\n        inputEl === null || inputEl === void 0 ? void 0 : inputEl.scrollTo(options);\n      }\n    }\n    function syncMirror(value) {\n      const {\n        type,\n        pair,\n        autosize\n      } = props;\n      if (!pair && autosize) {\n        if (type === 'textarea') {\n          const {\n            value: textareaMirrorEl\n          } = textareaMirrorElRef;\n          if (textareaMirrorEl) {\n            textareaMirrorEl.textContent = `${value !== null && value !== void 0 ? value : ''}\\r\\n`;\n          }\n        } else {\n          const {\n            value: inputMirrorEl\n          } = inputMirrorElRef;\n          if (inputMirrorEl) {\n            if (value) {\n              inputMirrorEl.textContent = value;\n            } else {\n              inputMirrorEl.innerHTML = '&nbsp;';\n            }\n          }\n        }\n      }\n    }\n    function handleTextAreaMirrorResize() {\n      updateTextAreaStyle();\n    }\n    const placeholderStyleRef = ref({\n      top: '0'\n    });\n    function handleTextAreaScroll(e) {\n      var _a;\n      const {\n        scrollTop\n      } = e.target;\n      placeholderStyleRef.value.top = `${-scrollTop}px`;\n      (_a = textareaScrollbarInstRef.value) === null || _a === void 0 ? void 0 : _a.syncUnifiedContainer();\n    }\n    let stopWatchMergedValue1 = null;\n    watchEffect(() => {\n      const {\n        autosize,\n        type\n      } = props;\n      if (autosize && type === 'textarea') {\n        stopWatchMergedValue1 = watch(mergedValueRef, value => {\n          if (!Array.isArray(value) && value !== syncSource) {\n            syncMirror(value);\n          }\n        });\n      } else {\n        stopWatchMergedValue1 === null || stopWatchMergedValue1 === void 0 ? void 0 : stopWatchMergedValue1();\n      }\n    });\n    let stopWatchMergedValue2 = null;\n    watchEffect(() => {\n      if (props.type === 'textarea') {\n        stopWatchMergedValue2 = watch(mergedValueRef, value => {\n          var _a;\n          if (!Array.isArray(value) && value !== syncSource) {\n            (_a = textareaScrollbarInstRef.value) === null || _a === void 0 ? void 0 : _a.syncUnifiedContainer();\n          }\n        });\n      } else {\n        stopWatchMergedValue2 === null || stopWatchMergedValue2 === void 0 ? void 0 : stopWatchMergedValue2();\n      }\n    });\n    provide(inputInjectionKey, {\n      mergedValueRef,\n      maxlengthRef,\n      mergedClsPrefixRef,\n      countGraphemesRef: toRef(props, 'countGraphemes')\n    });\n    const exposedProps = {\n      wrapperElRef,\n      inputElRef,\n      textareaElRef,\n      isCompositing: isComposingRef,\n      clear: clearValue,\n      focus,\n      blur,\n      select,\n      deactivate,\n      activate,\n      scrollTo\n    };\n    const rtlEnabledRef = useRtl('Input', mergedRtlRef, mergedClsPrefixRef);\n    const cssVarsRef = computed(() => {\n      const {\n        value: size\n      } = mergedSizeRef;\n      const {\n        common: {\n          cubicBezierEaseInOut\n        },\n        self: {\n          color,\n          borderRadius,\n          textColor,\n          caretColor,\n          caretColorError,\n          caretColorWarning,\n          textDecorationColor,\n          border,\n          borderDisabled,\n          borderHover,\n          borderFocus,\n          placeholderColor,\n          placeholderColorDisabled,\n          lineHeightTextarea,\n          colorDisabled,\n          colorFocus,\n          textColorDisabled,\n          boxShadowFocus,\n          iconSize,\n          colorFocusWarning,\n          boxShadowFocusWarning,\n          borderWarning,\n          borderFocusWarning,\n          borderHoverWarning,\n          colorFocusError,\n          boxShadowFocusError,\n          borderError,\n          borderFocusError,\n          borderHoverError,\n          clearSize,\n          clearColor,\n          clearColorHover,\n          clearColorPressed,\n          iconColor,\n          iconColorDisabled,\n          suffixTextColor,\n          countTextColor,\n          countTextColorDisabled,\n          iconColorHover,\n          iconColorPressed,\n          loadingColor,\n          loadingColorError,\n          loadingColorWarning,\n          fontWeight,\n          [createKey('padding', size)]: padding,\n          [createKey('fontSize', size)]: fontSize,\n          [createKey('height', size)]: height\n        }\n      } = themeRef.value;\n      const {\n        left: paddingLeft,\n        right: paddingRight\n      } = getPadding(padding);\n      return {\n        '--n-bezier': cubicBezierEaseInOut,\n        '--n-count-text-color': countTextColor,\n        '--n-count-text-color-disabled': countTextColorDisabled,\n        '--n-color': color,\n        '--n-font-size': fontSize,\n        '--n-font-weight': fontWeight,\n        '--n-border-radius': borderRadius,\n        '--n-height': height,\n        '--n-padding-left': paddingLeft,\n        '--n-padding-right': paddingRight,\n        '--n-text-color': textColor,\n        '--n-caret-color': caretColor,\n        '--n-text-decoration-color': textDecorationColor,\n        '--n-border': border,\n        '--n-border-disabled': borderDisabled,\n        '--n-border-hover': borderHover,\n        '--n-border-focus': borderFocus,\n        '--n-placeholder-color': placeholderColor,\n        '--n-placeholder-color-disabled': placeholderColorDisabled,\n        '--n-icon-size': iconSize,\n        '--n-line-height-textarea': lineHeightTextarea,\n        '--n-color-disabled': colorDisabled,\n        '--n-color-focus': colorFocus,\n        '--n-text-color-disabled': textColorDisabled,\n        '--n-box-shadow-focus': boxShadowFocus,\n        '--n-loading-color': loadingColor,\n        // form warning\n        '--n-caret-color-warning': caretColorWarning,\n        '--n-color-focus-warning': colorFocusWarning,\n        '--n-box-shadow-focus-warning': boxShadowFocusWarning,\n        '--n-border-warning': borderWarning,\n        '--n-border-focus-warning': borderFocusWarning,\n        '--n-border-hover-warning': borderHoverWarning,\n        '--n-loading-color-warning': loadingColorWarning,\n        // form error\n        '--n-caret-color-error': caretColorError,\n        '--n-color-focus-error': colorFocusError,\n        '--n-box-shadow-focus-error': boxShadowFocusError,\n        '--n-border-error': borderError,\n        '--n-border-focus-error': borderFocusError,\n        '--n-border-hover-error': borderHoverError,\n        '--n-loading-color-error': loadingColorError,\n        // clear-button\n        '--n-clear-color': clearColor,\n        '--n-clear-size': clearSize,\n        '--n-clear-color-hover': clearColorHover,\n        '--n-clear-color-pressed': clearColorPressed,\n        '--n-icon-color': iconColor,\n        '--n-icon-color-hover': iconColorHover,\n        '--n-icon-color-pressed': iconColorPressed,\n        '--n-icon-color-disabled': iconColorDisabled,\n        '--n-suffix-text-color': suffixTextColor\n      };\n    });\n    const themeClassHandle = inlineThemeDisabled ? useThemeClass('input', computed(() => {\n      const {\n        value: size\n      } = mergedSizeRef;\n      return size[0];\n    }), cssVarsRef, props) : undefined;\n    return Object.assign(Object.assign({}, exposedProps), {\n      // DOM ref\n      wrapperElRef,\n      inputElRef,\n      inputMirrorElRef,\n      inputEl2Ref,\n      textareaElRef,\n      textareaMirrorElRef,\n      textareaScrollbarInstRef,\n      // value\n      rtlEnabled: rtlEnabledRef,\n      uncontrolledValue: uncontrolledValueRef,\n      mergedValue: mergedValueRef,\n      passwordVisible: passwordVisibleRef,\n      mergedPlaceholder: mergedPlaceholderRef,\n      showPlaceholder1: showPlaceholder1Ref,\n      showPlaceholder2: showPlaceholder2Ref,\n      mergedFocus: mergedFocusRef,\n      isComposing: isComposingRef,\n      activated: activatedRef,\n      showClearButton,\n      mergedSize: mergedSizeRef,\n      mergedDisabled: mergedDisabledRef,\n      textDecorationStyle: textDecorationStyleRef,\n      mergedClsPrefix: mergedClsPrefixRef,\n      mergedBordered: mergedBorderedRef,\n      mergedShowPasswordOn: mergedShowPasswordOnRef,\n      placeholderStyle: placeholderStyleRef,\n      mergedStatus: mergedStatusRef,\n      textAreaScrollContainerWidth: textAreaScrollContainerWidthRef,\n      // methods\n      handleTextAreaScroll,\n      handleCompositionStart,\n      handleCompositionEnd,\n      handleInput,\n      handleInputBlur,\n      handleInputFocus,\n      handleWrapperBlur,\n      handleWrapperFocus,\n      handleMouseEnter,\n      handleMouseLeave,\n      handleMouseDown,\n      handleChange,\n      handleClick,\n      handleClear,\n      handlePasswordToggleClick,\n      handlePasswordToggleMousedown,\n      handleWrapperKeydown,\n      handleWrapperKeyup,\n      handleTextAreaMirrorResize,\n      getTextareaScrollContainer: () => {\n        return textareaElRef.value;\n      },\n      mergedTheme: themeRef,\n      cssVars: inlineThemeDisabled ? undefined : cssVarsRef,\n      themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,\n      onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender\n    });\n  },\n  render() {\n    var _a, _b;\n    const {\n      mergedClsPrefix,\n      mergedStatus,\n      themeClass,\n      type,\n      countGraphemes,\n      onRender\n    } = this;\n    const $slots = this.$slots;\n    onRender === null || onRender === void 0 ? void 0 : onRender();\n    return h(\"div\", {\n      ref: \"wrapperElRef\",\n      class: [`${mergedClsPrefix}-input`, themeClass, mergedStatus && `${mergedClsPrefix}-input--${mergedStatus}-status`, {\n        [`${mergedClsPrefix}-input--rtl`]: this.rtlEnabled,\n        [`${mergedClsPrefix}-input--disabled`]: this.mergedDisabled,\n        [`${mergedClsPrefix}-input--textarea`]: type === 'textarea',\n        [`${mergedClsPrefix}-input--resizable`]: this.resizable && !this.autosize,\n        [`${mergedClsPrefix}-input--autosize`]: this.autosize,\n        [`${mergedClsPrefix}-input--round`]: this.round && !(type === 'textarea'),\n        [`${mergedClsPrefix}-input--pair`]: this.pair,\n        [`${mergedClsPrefix}-input--focus`]: this.mergedFocus,\n        [`${mergedClsPrefix}-input--stateful`]: this.stateful\n      }],\n      style: this.cssVars,\n      tabindex: !this.mergedDisabled && this.passivelyActivated && !this.activated ? 0 : undefined,\n      onFocus: this.handleWrapperFocus,\n      onBlur: this.handleWrapperBlur,\n      onClick: this.handleClick,\n      onMousedown: this.handleMouseDown,\n      onMouseenter: this.handleMouseEnter,\n      onMouseleave: this.handleMouseLeave,\n      onCompositionstart: this.handleCompositionStart,\n      onCompositionend: this.handleCompositionEnd,\n      onKeyup: this.handleWrapperKeyup,\n      onKeydown: this.handleWrapperKeydown\n    }, h(\"div\", {\n      class: `${mergedClsPrefix}-input-wrapper`\n    }, resolveWrappedSlot($slots.prefix, children => children && h(\"div\", {\n      class: `${mergedClsPrefix}-input__prefix`\n    }, children)), type === 'textarea' ? h(NScrollbar, {\n      ref: \"textareaScrollbarInstRef\",\n      class: `${mergedClsPrefix}-input__textarea`,\n      container: this.getTextareaScrollContainer,\n      triggerDisplayManually: true,\n      useUnifiedContainer: true,\n      internalHoistYRail: true\n    }, {\n      default: () => {\n        var _a, _b;\n        const {\n          textAreaScrollContainerWidth\n        } = this;\n        const scrollContainerWidthStyle = {\n          width: this.autosize && textAreaScrollContainerWidth && `${textAreaScrollContainerWidth}px`\n        };\n        return h(Fragment, null, h(\"textarea\", Object.assign({}, this.inputProps, {\n          ref: \"textareaElRef\",\n          class: [`${mergedClsPrefix}-input__textarea-el`, (_a = this.inputProps) === null || _a === void 0 ? void 0 : _a.class],\n          autofocus: this.autofocus,\n          rows: Number(this.rows),\n          placeholder: this.placeholder,\n          value: this.mergedValue,\n          disabled: this.mergedDisabled,\n          maxlength: countGraphemes ? undefined : this.maxlength,\n          minlength: countGraphemes ? undefined : this.minlength,\n          readonly: this.readonly,\n          tabindex: this.passivelyActivated && !this.activated ? -1 : undefined,\n          style: [this.textDecorationStyle[0], (_b = this.inputProps) === null || _b === void 0 ? void 0 : _b.style, scrollContainerWidthStyle],\n          onBlur: this.handleInputBlur,\n          onFocus: e => {\n            this.handleInputFocus(e, 2);\n          },\n          onInput: this.handleInput,\n          onChange: this.handleChange,\n          onScroll: this.handleTextAreaScroll\n        })), this.showPlaceholder1 ? h(\"div\", {\n          class: `${mergedClsPrefix}-input__placeholder`,\n          style: [this.placeholderStyle, scrollContainerWidthStyle],\n          key: \"placeholder\"\n        }, this.mergedPlaceholder[0]) : null, this.autosize ? h(VResizeObserver, {\n          onResize: this.handleTextAreaMirrorResize\n        }, {\n          default: () => h(\"div\", {\n            ref: \"textareaMirrorElRef\",\n            class: `${mergedClsPrefix}-input__textarea-mirror`,\n            key: \"mirror\"\n          })\n        }) : null);\n      }\n    }) : h(\"div\", {\n      class: `${mergedClsPrefix}-input__input`\n    }, h(\"input\", Object.assign({\n      type: type === 'password' && this.mergedShowPasswordOn && this.passwordVisible ? 'text' : type\n    }, this.inputProps, {\n      ref: \"inputElRef\",\n      class: [`${mergedClsPrefix}-input__input-el`, (_a = this.inputProps) === null || _a === void 0 ? void 0 : _a.class],\n      style: [this.textDecorationStyle[0], (_b = this.inputProps) === null || _b === void 0 ? void 0 : _b.style],\n      tabindex: this.passivelyActivated && !this.activated ? -1 : undefined,\n      placeholder: this.mergedPlaceholder[0],\n      disabled: this.mergedDisabled,\n      maxlength: countGraphemes ? undefined : this.maxlength,\n      minlength: countGraphemes ? undefined : this.minlength,\n      value: Array.isArray(this.mergedValue) ? this.mergedValue[0] : this.mergedValue,\n      readonly: this.readonly,\n      autofocus: this.autofocus,\n      size: this.attrSize,\n      onBlur: this.handleInputBlur,\n      onFocus: e => {\n        this.handleInputFocus(e, 0);\n      },\n      onInput: e => {\n        this.handleInput(e, 0);\n      },\n      onChange: e => {\n        this.handleChange(e, 0);\n      }\n    })), this.showPlaceholder1 ? h(\"div\", {\n      class: `${mergedClsPrefix}-input__placeholder`\n    }, h(\"span\", null, this.mergedPlaceholder[0])) : null, this.autosize ? h(\"div\", {\n      class: `${mergedClsPrefix}-input__input-mirror`,\n      key: \"mirror\",\n      ref: \"inputMirrorElRef\"\n    }, \"\\u00A0\") : null), !this.pair && resolveWrappedSlot($slots.suffix, children => {\n      return children || this.clearable || this.showCount || this.mergedShowPasswordOn || this.loading !== undefined ? h(\"div\", {\n        class: `${mergedClsPrefix}-input__suffix`\n      }, [resolveWrappedSlot($slots['clear-icon-placeholder'], children => {\n        return (this.clearable || children) && h(NBaseClear, {\n          clsPrefix: mergedClsPrefix,\n          show: this.showClearButton,\n          onClear: this.handleClear\n        }, {\n          placeholder: () => children,\n          icon: () => {\n            var _a, _b;\n            return (_b = (_a = this.$slots)['clear-icon']) === null || _b === void 0 ? void 0 : _b.call(_a);\n          }\n        });\n      }), !this.internalLoadingBeforeSuffix ? children : null, this.loading !== undefined ? h(NBaseSuffix, {\n        clsPrefix: mergedClsPrefix,\n        loading: this.loading,\n        showArrow: false,\n        showClear: false,\n        style: this.cssVars\n      }) : null, this.internalLoadingBeforeSuffix ? children : null, this.showCount && this.type !== 'textarea' ? h(WordCount, null, {\n        default: props => {\n          var _a;\n          const {\n            renderCount\n          } = this;\n          if (renderCount) {\n            return renderCount(props);\n          }\n          return (_a = $slots.count) === null || _a === void 0 ? void 0 : _a.call($slots, props);\n        }\n      }) : null, this.mergedShowPasswordOn && this.type === 'password' ? h(\"div\", {\n        class: `${mergedClsPrefix}-input__eye`,\n        onMousedown: this.handlePasswordToggleMousedown,\n        onClick: this.handlePasswordToggleClick\n      }, this.passwordVisible ? resolveSlot($slots['password-visible-icon'], () => [h(NBaseIcon, {\n        clsPrefix: mergedClsPrefix\n      }, {\n        default: () => h(EyeIcon, null)\n      })]) : resolveSlot($slots['password-invisible-icon'], () => [h(NBaseIcon, {\n        clsPrefix: mergedClsPrefix\n      }, {\n        default: () => h(EyeOffIcon, null)\n      })])) : null]) : null;\n    })), this.pair ? h(\"span\", {\n      class: `${mergedClsPrefix}-input__separator`\n    }, resolveSlot($slots.separator, () => [this.separator])) : null, this.pair ? h(\"div\", {\n      class: `${mergedClsPrefix}-input-wrapper`\n    }, h(\"div\", {\n      class: `${mergedClsPrefix}-input__input`\n    }, h(\"input\", {\n      ref: \"inputEl2Ref\",\n      type: this.type,\n      class: `${mergedClsPrefix}-input__input-el`,\n      tabindex: this.passivelyActivated && !this.activated ? -1 : undefined,\n      placeholder: this.mergedPlaceholder[1],\n      disabled: this.mergedDisabled,\n      maxlength: countGraphemes ? undefined : this.maxlength,\n      minlength: countGraphemes ? undefined : this.minlength,\n      value: Array.isArray(this.mergedValue) ? this.mergedValue[1] : undefined,\n      readonly: this.readonly,\n      style: this.textDecorationStyle[1],\n      onBlur: this.handleInputBlur,\n      onFocus: e => {\n        this.handleInputFocus(e, 1);\n      },\n      onInput: e => {\n        this.handleInput(e, 1);\n      },\n      onChange: e => {\n        this.handleChange(e, 1);\n      }\n    }), this.showPlaceholder2 ? h(\"div\", {\n      class: `${mergedClsPrefix}-input__placeholder`\n    }, h(\"span\", null, this.mergedPlaceholder[1])) : null), resolveWrappedSlot($slots.suffix, children => {\n      return (this.clearable || children) && h(\"div\", {\n        class: `${mergedClsPrefix}-input__suffix`\n      }, [this.clearable && h(NBaseClear, {\n        clsPrefix: mergedClsPrefix,\n        show: this.showClearButton,\n        onClear: this.handleClear\n      }, {\n        icon: () => {\n          var _a;\n          return (_a = $slots['clear-icon']) === null || _a === void 0 ? void 0 : _a.call($slots);\n        },\n        placeholder: () => {\n          var _a;\n          return (_a = $slots['clear-icon-placeholder']) === null || _a === void 0 ? void 0 : _a.call($slots);\n        }\n      }), children]);\n    })) : null, this.mergedBordered ? h(\"div\", {\n      class: `${mergedClsPrefix}-input__border`\n    }) : null, this.mergedBordered ? h(\"div\", {\n      class: `${mergedClsPrefix}-input__state-border`\n    }) : null, this.showCount && type === 'textarea' ? h(WordCount, null, {\n      default: props => {\n        var _a;\n        const {\n          renderCount\n        } = this;\n        if (renderCount) {\n          return renderCount(props);\n        }\n        return (_a = $slots.count) === null || _a === void 0 ? void 0 : _a.call($slots, props);\n      }\n    }) : null);\n  }\n});","import { c, cB, cE } from \"../../../_utils/cssr/index.mjs\";\nexport default cB('input-group', `\n display: inline-flex;\n width: 100%;\n flex-wrap: nowrap;\n vertical-align: bottom;\n`, [c('>', [cB('input', [c('&:not(:last-child)', `\n border-top-right-radius: 0!important;\n border-bottom-right-radius: 0!important;\n `), c('&:not(:first-child)', `\n border-top-left-radius: 0!important;\n border-bottom-left-radius: 0!important;\n margin-left: -1px!important;\n `)]), cB('button', [c('&:not(:last-child)', `\n border-top-right-radius: 0!important;\n border-bottom-right-radius: 0!important;\n `, [cE('state-border, border', `\n border-top-right-radius: 0!important;\n border-bottom-right-radius: 0!important;\n `)]), c('&:not(:first-child)', `\n border-top-left-radius: 0!important;\n border-bottom-left-radius: 0!important;\n `, [cE('state-border, border', `\n border-top-left-radius: 0!important;\n border-bottom-left-radius: 0!important;\n `)])]), c('*', [c('&:not(:last-child)', `\n border-top-right-radius: 0!important;\n border-bottom-right-radius: 0!important;\n `, [c('>', [cB('input', `\n border-top-right-radius: 0!important;\n border-bottom-right-radius: 0!important;\n `), cB('base-selection', [cB('base-selection-label', `\n border-top-right-radius: 0!important;\n border-bottom-right-radius: 0!important;\n `), cB('base-selection-tags', `\n border-top-right-radius: 0!important;\n border-bottom-right-radius: 0!important;\n `), cE('box-shadow, border, state-border', `\n border-top-right-radius: 0!important;\n border-bottom-right-radius: 0!important;\n `)])])]), c('&:not(:first-child)', `\n margin-left: -1px!important;\n border-top-left-radius: 0!important;\n border-bottom-left-radius: 0!important;\n `, [c('>', [cB('input', `\n border-top-left-radius: 0!important;\n border-bottom-left-radius: 0!important;\n `), cB('base-selection', [cB('base-selection-label', `\n border-top-left-radius: 0!important;\n border-bottom-left-radius: 0!important;\n `), cB('base-selection-tags', `\n border-top-left-radius: 0!important;\n border-bottom-left-radius: 0!important;\n `), cE('box-shadow, border, state-border', `\n border-top-left-radius: 0!important;\n border-bottom-left-radius: 0!important;\n `)])])])])])]);","import { defineComponent, h } from 'vue';\nimport { useConfig, useStyle } from \"../../_mixins/index.mjs\";\nimport style from \"./styles/input-group.cssr.mjs\";\nexport const inputGroupProps = {};\nexport default defineComponent({\n  name: 'InputGroup',\n  props: inputGroupProps,\n  setup(props) {\n    const {\n      mergedClsPrefixRef\n    } = useConfig(props);\n    useStyle('-input-group', style, mergedClsPrefixRef);\n    return {\n      mergedClsPrefix: mergedClsPrefixRef\n    };\n  },\n  render() {\n    const {\n      mergedClsPrefix\n    } = this;\n    return h(\"div\", {\n      class: `${mergedClsPrefix}-input-group`\n    }, this.$slots);\n  }\n});","export function getIsGroup(option) {\n  return option.type === 'group';\n}\nexport function getIgnored(option) {\n  return option.type === 'ignored';\n}\nexport function patternMatched(pattern, value) {\n  try {\n    return !!(1 + value.toString().toLowerCase().indexOf(pattern.trim().toLowerCase()));\n  } catch (_a) {\n    return false;\n  }\n}\nexport function createTmOptions(valueField, childrenField) {\n  const options = {\n    getIsGroup,\n    getIgnored,\n    getKey(option) {\n      if (getIsGroup(option)) {\n        return option.name || option.key || 'key-required';\n      }\n      // Required for non-custom label & value field\n      return option[valueField];\n    },\n    getChildren(option) {\n      return option[childrenField];\n    }\n  };\n  return options;\n}\nexport function filterOptions(originalOpts, filter, pattern, childrenField) {\n  if (!filter) return originalOpts;\n  function traverse(options) {\n    if (!Array.isArray(options)) return [];\n    const filteredOptions = [];\n    for (const option of options) {\n      if (getIsGroup(option)) {\n        const children = traverse(option[childrenField]);\n        if (children.length) {\n          filteredOptions.push(Object.assign({}, option, {\n            [childrenField]: children\n          }));\n        }\n      } else if (getIgnored(option)) {\n        continue;\n      } else if (filter(pattern, option)) {\n        filteredOptions.push(option);\n      }\n    }\n    return filteredOptions;\n  }\n  return traverse(originalOpts);\n}\nexport function createValOptMap(options, valueField, childrenField) {\n  const valOptMap = new Map();\n  options.forEach(option => {\n    if (getIsGroup(option)) {\n      ;\n      option[childrenField].forEach(selectGroupOption => {\n        valOptMap.set(selectGroupOption[valueField], selectGroupOption);\n      });\n    } else {\n      valOptMap.set(option[valueField], option);\n    }\n  });\n  return valOptMap;\n}","import { internalSelectMenuLight } from \"../../_internal/select-menu/styles/index.mjs\";\nimport { createTheme } from \"../../_mixins/index.mjs\";\nimport { commonLight } from \"../../_styles/common/index.mjs\";\nimport { inputLight } from \"../../input/styles/index.mjs\";\nexport function self(vars) {\n  const {\n    boxShadow2\n  } = vars;\n  return {\n    menuBoxShadow: boxShadow2\n  };\n}\nconst autoCompleteLight = createTheme({\n  name: 'AutoComplete',\n  common: commonLight,\n  peers: {\n    InternalSelectMenu: internalSelectMenuLight,\n    Input: inputLight\n  },\n  self\n});\nexport default autoCompleteLight;","import { internalSelectMenuDark } from \"../../_internal/select-menu/styles/index.mjs\";\nimport { commonDark } from \"../../_styles/common/index.mjs\";\nimport { inputDark } from \"../../input/styles/index.mjs\";\nimport { self } from \"./light.mjs\";\nconst autoCompleteDark = {\n  name: 'AutoComplete',\n  common: commonDark,\n  peers: {\n    InternalSelectMenu: internalSelectMenuDark,\n    Input: inputDark\n  },\n  self\n};\nexport default autoCompleteDark;","import { isBrowser } from \"./is-browser.mjs\";\nexport const isImageSupportNativeLazy = isBrowser && 'loading' in document.createElement('img');","export function resolveOptionsAndHash(options = {}) {\n  var _a;\n  const {\n    root = null\n  } = options;\n  return {\n    hash: `${options.rootMargin || '0px 0px 0px 0px'}-${Array.isArray(options.threshold) ? options.threshold.join(',') : (_a = options.threshold) !== null && _a !== void 0 ? _a : '0'}`,\n    options: Object.assign(Object.assign({}, options), {\n      root: (typeof root === 'string' ? document.querySelector(root) : root) || document.documentElement\n    })\n  };\n}\n// root -> options -> [observer, elements]\nconst observers = new WeakMap();\nconst unobserveHandleMap = new WeakMap();\nconst shouldStartLoadingRefMap = new WeakMap();\nexport const observeIntersection = (el, options, shouldStartLoadingRef) => {\n  if (!el) return () => {};\n  const resolvedOptionsAndHash = resolveOptionsAndHash(options);\n  const {\n    root\n  } = resolvedOptionsAndHash.options;\n  let rootObservers;\n  const _rootObservers = observers.get(root);\n  if (_rootObservers) {\n    rootObservers = _rootObservers;\n  } else {\n    rootObservers = new Map();\n    observers.set(root, rootObservers);\n  }\n  let observer;\n  let observerAndObservedElements;\n  if (rootObservers.has(resolvedOptionsAndHash.hash)) {\n    observerAndObservedElements = rootObservers.get(resolvedOptionsAndHash.hash);\n    if (!observerAndObservedElements[1].has(el)) {\n      observer = observerAndObservedElements[0];\n      observerAndObservedElements[1].add(el);\n      observer.observe(el);\n    }\n  } else {\n    observer = new IntersectionObserver(entries => {\n      entries.forEach(entry => {\n        if (entry.isIntersecting) {\n          const _unobserve = unobserveHandleMap.get(entry.target);\n          const _shouldStartLoadingRef = shouldStartLoadingRefMap.get(entry.target);\n          if (_unobserve) _unobserve();\n          if (_shouldStartLoadingRef) {\n            _shouldStartLoadingRef.value = true;\n          }\n        }\n      });\n    }, resolvedOptionsAndHash.options);\n    observer.observe(el);\n    observerAndObservedElements = [observer, new Set([el])];\n    rootObservers.set(resolvedOptionsAndHash.hash, observerAndObservedElements);\n  }\n  let unobservered = false;\n  const unobserve = () => {\n    if (unobservered) return;\n    unobserveHandleMap.delete(el);\n    shouldStartLoadingRefMap.delete(el);\n    unobservered = true;\n    if (observerAndObservedElements[1].has(el)) {\n      observerAndObservedElements[0].unobserve(el);\n      observerAndObservedElements[1].delete(el);\n    }\n    if (observerAndObservedElements[1].size <= 0) {\n      rootObservers.delete(resolvedOptionsAndHash.hash);\n    }\n    if (!rootObservers.size) {\n      observers.delete(root);\n    }\n  };\n  unobserveHandleMap.set(el, unobserve);\n  shouldStartLoadingRefMap.set(el, shouldStartLoadingRef);\n  return unobserve;\n};","import { composite } from 'seemly';\nimport { commonLight } from \"../../_styles/common/index.mjs\";\nexport function self(vars) {\n  const {\n    borderRadius,\n    avatarColor,\n    cardColor,\n    fontSize,\n    heightTiny,\n    heightSmall,\n    heightMedium,\n    heightLarge,\n    heightHuge,\n    modalColor,\n    popoverColor\n  } = vars;\n  return {\n    borderRadius,\n    fontSize,\n    border: `2px solid ${cardColor}`,\n    heightTiny,\n    heightSmall,\n    heightMedium,\n    heightLarge,\n    heightHuge,\n    color: composite(cardColor, avatarColor),\n    colorModal: composite(modalColor, avatarColor),\n    colorPopover: composite(popoverColor, avatarColor)\n  };\n}\nconst avatarLight = {\n  name: 'Avatar',\n  common: commonLight,\n  self\n};\nexport default avatarLight;","import { commonDark } from \"../../_styles/common/index.mjs\";\nimport { self } from \"./light.mjs\";\nconst avatarDark = {\n  name: 'Avatar',\n  common: commonDark,\n  self\n};\nexport default avatarDark;","import { createTheme } from \"../../_mixins/index.mjs\";\nimport { commonLight } from \"../../_styles/common/index.mjs\";\nimport { avatarLight } from \"../../avatar/styles/index.mjs\";\nexport function self() {\n  return {\n    gap: '-12px'\n  };\n}\nconst avatarGroupLight = createTheme({\n  name: 'AvatarGroup',\n  common: commonLight,\n  peers: {\n    Avatar: avatarLight\n  },\n  self\n});\nexport default avatarGroupLight;","import { commonDark } from \"../../_styles/common/index.mjs\";\nimport { avatarDark } from \"../../avatar/styles/index.mjs\";\nimport { self } from \"./light.mjs\";\nconst avatarGroupDark = {\n  name: 'AvatarGroup',\n  common: commonDark,\n  peers: {\n    Avatar: avatarDark\n  },\n  self\n};\nexport default avatarGroupDark;","export default {\n  width: '44px',\n  height: '44px',\n  borderRadius: '22px',\n  iconSize: '26px'\n};","import { commonDark } from \"../../_styles/common/index.mjs\";\nimport commonVariables from \"./_common.mjs\";\nconst backTopDark = {\n  name: 'BackTop',\n  common: commonDark,\n  self(vars) {\n    const {\n      popoverColor,\n      textColor2,\n      primaryColorHover,\n      primaryColorPressed\n    } = vars;\n    return Object.assign(Object.assign({}, commonVariables), {\n      color: popoverColor,\n      textColor: textColor2,\n      iconColor: textColor2,\n      iconColorHover: primaryColorHover,\n      iconColorPressed: primaryColorPressed,\n      boxShadow: '0 2px 8px 0px rgba(0, 0, 0, .12)',\n      boxShadowHover: '0 2px 12px 0px rgba(0, 0, 0, .18)',\n      boxShadowPressed: '0 2px 12px 0px rgba(0, 0, 0, .18)'\n    });\n  }\n};\nexport default backTopDark;","import { commonDark } from \"../../_styles/common/index.mjs\";\nconst badgeDark = {\n  name: 'Badge',\n  common: commonDark,\n  self(vars) {\n    const {\n      errorColorSuppl,\n      infoColorSuppl,\n      successColorSuppl,\n      warningColorSuppl,\n      fontFamily\n    } = vars;\n    return {\n      color: errorColorSuppl,\n      colorInfo: infoColorSuppl,\n      colorSuccess: successColorSuppl,\n      colorError: errorColorSuppl,\n      colorWarning: warningColorSuppl,\n      fontSize: '12px',\n      fontFamily\n    };\n  }\n};\nexport default badgeDark;","export default {\n  fontWeightActive: '400'\n};","import { commonLight } from \"../../_styles/common/index.mjs\";\nimport commonVariables from \"./_common.mjs\";\nexport function self(vars) {\n  const {\n    fontSize,\n    textColor3,\n    textColor2,\n    borderRadius,\n    buttonColor2Hover,\n    buttonColor2Pressed\n  } = vars;\n  return Object.assign(Object.assign({}, commonVariables), {\n    fontSize,\n    itemLineHeight: '1.25',\n    itemTextColor: textColor3,\n    itemTextColorHover: textColor2,\n    itemTextColorPressed: textColor2,\n    itemTextColorActive: textColor2,\n    itemBorderRadius: borderRadius,\n    itemColorHover: buttonColor2Hover,\n    itemColorPressed: buttonColor2Pressed,\n    separatorColor: textColor3\n  });\n}\nconst breadcrumbLight = {\n  name: 'Breadcrumb',\n  common: commonLight,\n  self\n};\nexport default breadcrumbLight;","import { commonDark } from \"../../_styles/common/index.mjs\";\nimport { self } from \"./light.mjs\";\nconst breadcrumbDark = {\n  name: 'Breadcrumb',\n  common: commonDark,\n  self\n};\nexport default breadcrumbDark;","import { composite } from 'seemly';\nexport function createHoverColor(rgb) {\n  return composite(rgb, [255, 255, 255, 0.16]);\n}\nexport function createPressedColor(rgb) {\n  return composite(rgb, [0, 0, 0, 0.12]);\n}","import { createInjectionKey } from \"../../_utils/index.mjs\";\nexport const buttonGroupInjectionKey = createInjectionKey('n-button-group');","export default {\n  paddingTiny: '0 6px',\n  paddingSmall: '0 10px',\n  paddingMedium: '0 14px',\n  paddingLarge: '0 18px',\n  paddingRoundTiny: '0 10px',\n  paddingRoundSmall: '0 14px',\n  paddingRoundMedium: '0 18px',\n  paddingRoundLarge: '0 22px',\n  iconMarginTiny: '6px',\n  iconMarginSmall: '6px',\n  iconMarginMedium: '6px',\n  iconMarginLarge: '6px',\n  iconSizeTiny: '14px',\n  iconSizeSmall: '18px',\n  iconSizeMedium: '18px',\n  iconSizeLarge: '20px',\n  rippleDuration: '.6s'\n};","import { commonLight } from \"../../_styles/common/index.mjs\";\nimport commonVariables from \"./_common.mjs\";\nexport function self(vars) {\n  const {\n    heightTiny,\n    heightSmall,\n    heightMedium,\n    heightLarge,\n    borderRadius,\n    fontSizeTiny,\n    fontSizeSmall,\n    fontSizeMedium,\n    fontSizeLarge,\n    opacityDisabled,\n    textColor2,\n    textColor3,\n    primaryColorHover,\n    primaryColorPressed,\n    borderColor,\n    primaryColor,\n    baseColor,\n    infoColor,\n    infoColorHover,\n    infoColorPressed,\n    successColor,\n    successColorHover,\n    successColorPressed,\n    warningColor,\n    warningColorHover,\n    warningColorPressed,\n    errorColor,\n    errorColorHover,\n    errorColorPressed,\n    fontWeight,\n    buttonColor2,\n    buttonColor2Hover,\n    buttonColor2Pressed,\n    fontWeightStrong\n  } = vars;\n  return Object.assign(Object.assign({}, commonVariables), {\n    heightTiny,\n    heightSmall,\n    heightMedium,\n    heightLarge,\n    borderRadiusTiny: borderRadius,\n    borderRadiusSmall: borderRadius,\n    borderRadiusMedium: borderRadius,\n    borderRadiusLarge: borderRadius,\n    fontSizeTiny,\n    fontSizeSmall,\n    fontSizeMedium,\n    fontSizeLarge,\n    opacityDisabled,\n    // secondary\n    colorOpacitySecondary: '0.16',\n    colorOpacitySecondaryHover: '0.22',\n    colorOpacitySecondaryPressed: '0.28',\n    colorSecondary: buttonColor2,\n    colorSecondaryHover: buttonColor2Hover,\n    colorSecondaryPressed: buttonColor2Pressed,\n    // tertiary\n    colorTertiary: buttonColor2,\n    colorTertiaryHover: buttonColor2Hover,\n    colorTertiaryPressed: buttonColor2Pressed,\n    // quaternary\n    colorQuaternary: '#0000',\n    colorQuaternaryHover: buttonColor2Hover,\n    colorQuaternaryPressed: buttonColor2Pressed,\n    // default type\n    color: '#0000',\n    colorHover: '#0000',\n    colorPressed: '#0000',\n    colorFocus: '#0000',\n    colorDisabled: '#0000',\n    textColor: textColor2,\n    textColorTertiary: textColor3,\n    textColorHover: primaryColorHover,\n    textColorPressed: primaryColorPressed,\n    textColorFocus: primaryColorHover,\n    textColorDisabled: textColor2,\n    textColorText: textColor2,\n    textColorTextHover: primaryColorHover,\n    textColorTextPressed: primaryColorPressed,\n    textColorTextFocus: primaryColorHover,\n    textColorTextDisabled: textColor2,\n    textColorGhost: textColor2,\n    textColorGhostHover: primaryColorHover,\n    textColorGhostPressed: primaryColorPressed,\n    textColorGhostFocus: primaryColorHover,\n    textColorGhostDisabled: textColor2,\n    border: `1px solid ${borderColor}`,\n    borderHover: `1px solid ${primaryColorHover}`,\n    borderPressed: `1px solid ${primaryColorPressed}`,\n    borderFocus: `1px solid ${primaryColorHover}`,\n    borderDisabled: `1px solid ${borderColor}`,\n    rippleColor: primaryColor,\n    // primary\n    colorPrimary: primaryColor,\n    colorHoverPrimary: primaryColorHover,\n    colorPressedPrimary: primaryColorPressed,\n    colorFocusPrimary: primaryColorHover,\n    colorDisabledPrimary: primaryColor,\n    textColorPrimary: baseColor,\n    textColorHoverPrimary: baseColor,\n    textColorPressedPrimary: baseColor,\n    textColorFocusPrimary: baseColor,\n    textColorDisabledPrimary: baseColor,\n    textColorTextPrimary: primaryColor,\n    textColorTextHoverPrimary: primaryColorHover,\n    textColorTextPressedPrimary: primaryColorPressed,\n    textColorTextFocusPrimary: primaryColorHover,\n    textColorTextDisabledPrimary: textColor2,\n    textColorGhostPrimary: primaryColor,\n    textColorGhostHoverPrimary: primaryColorHover,\n    textColorGhostPressedPrimary: primaryColorPressed,\n    textColorGhostFocusPrimary: primaryColorHover,\n    textColorGhostDisabledPrimary: primaryColor,\n    borderPrimary: `1px solid ${primaryColor}`,\n    borderHoverPrimary: `1px solid ${primaryColorHover}`,\n    borderPressedPrimary: `1px solid ${primaryColorPressed}`,\n    borderFocusPrimary: `1px solid ${primaryColorHover}`,\n    borderDisabledPrimary: `1px solid ${primaryColor}`,\n    rippleColorPrimary: primaryColor,\n    // info\n    colorInfo: infoColor,\n    colorHoverInfo: infoColorHover,\n    colorPressedInfo: infoColorPressed,\n    colorFocusInfo: infoColorHover,\n    colorDisabledInfo: infoColor,\n    textColorInfo: baseColor,\n    textColorHoverInfo: baseColor,\n    textColorPressedInfo: baseColor,\n    textColorFocusInfo: baseColor,\n    textColorDisabledInfo: baseColor,\n    textColorTextInfo: infoColor,\n    textColorTextHoverInfo: infoColorHover,\n    textColorTextPressedInfo: infoColorPressed,\n    textColorTextFocusInfo: infoColorHover,\n    textColorTextDisabledInfo: textColor2,\n    textColorGhostInfo: infoColor,\n    textColorGhostHoverInfo: infoColorHover,\n    textColorGhostPressedInfo: infoColorPressed,\n    textColorGhostFocusInfo: infoColorHover,\n    textColorGhostDisabledInfo: infoColor,\n    borderInfo: `1px solid ${infoColor}`,\n    borderHoverInfo: `1px solid ${infoColorHover}`,\n    borderPressedInfo: `1px solid ${infoColorPressed}`,\n    borderFocusInfo: `1px solid ${infoColorHover}`,\n    borderDisabledInfo: `1px solid ${infoColor}`,\n    rippleColorInfo: infoColor,\n    // success\n    colorSuccess: successColor,\n    colorHoverSuccess: successColorHover,\n    colorPressedSuccess: successColorPressed,\n    colorFocusSuccess: successColorHover,\n    colorDisabledSuccess: successColor,\n    textColorSuccess: baseColor,\n    textColorHoverSuccess: baseColor,\n    textColorPressedSuccess: baseColor,\n    textColorFocusSuccess: baseColor,\n    textColorDisabledSuccess: baseColor,\n    textColorTextSuccess: successColor,\n    textColorTextHoverSuccess: successColorHover,\n    textColorTextPressedSuccess: successColorPressed,\n    textColorTextFocusSuccess: successColorHover,\n    textColorTextDisabledSuccess: textColor2,\n    textColorGhostSuccess: successColor,\n    textColorGhostHoverSuccess: successColorHover,\n    textColorGhostPressedSuccess: successColorPressed,\n    textColorGhostFocusSuccess: successColorHover,\n    textColorGhostDisabledSuccess: successColor,\n    borderSuccess: `1px solid ${successColor}`,\n    borderHoverSuccess: `1px solid ${successColorHover}`,\n    borderPressedSuccess: `1px solid ${successColorPressed}`,\n    borderFocusSuccess: `1px solid ${successColorHover}`,\n    borderDisabledSuccess: `1px solid ${successColor}`,\n    rippleColorSuccess: successColor,\n    // warning\n    colorWarning: warningColor,\n    colorHoverWarning: warningColorHover,\n    colorPressedWarning: warningColorPressed,\n    colorFocusWarning: warningColorHover,\n    colorDisabledWarning: warningColor,\n    textColorWarning: baseColor,\n    textColorHoverWarning: baseColor,\n    textColorPressedWarning: baseColor,\n    textColorFocusWarning: baseColor,\n    textColorDisabledWarning: baseColor,\n    textColorTextWarning: warningColor,\n    textColorTextHoverWarning: warningColorHover,\n    textColorTextPressedWarning: warningColorPressed,\n    textColorTextFocusWarning: warningColorHover,\n    textColorTextDisabledWarning: textColor2,\n    textColorGhostWarning: warningColor,\n    textColorGhostHoverWarning: warningColorHover,\n    textColorGhostPressedWarning: warningColorPressed,\n    textColorGhostFocusWarning: warningColorHover,\n    textColorGhostDisabledWarning: warningColor,\n    borderWarning: `1px solid ${warningColor}`,\n    borderHoverWarning: `1px solid ${warningColorHover}`,\n    borderPressedWarning: `1px solid ${warningColorPressed}`,\n    borderFocusWarning: `1px solid ${warningColorHover}`,\n    borderDisabledWarning: `1px solid ${warningColor}`,\n    rippleColorWarning: warningColor,\n    // error\n    colorError: errorColor,\n    colorHoverError: errorColorHover,\n    colorPressedError: errorColorPressed,\n    colorFocusError: errorColorHover,\n    colorDisabledError: errorColor,\n    textColorError: baseColor,\n    textColorHoverError: baseColor,\n    textColorPressedError: baseColor,\n    textColorFocusError: baseColor,\n    textColorDisabledError: baseColor,\n    textColorTextError: errorColor,\n    textColorTextHoverError: errorColorHover,\n    textColorTextPressedError: errorColorPressed,\n    textColorTextFocusError: errorColorHover,\n    textColorTextDisabledError: textColor2,\n    textColorGhostError: errorColor,\n    textColorGhostHoverError: errorColorHover,\n    textColorGhostPressedError: errorColorPressed,\n    textColorGhostFocusError: errorColorHover,\n    textColorGhostDisabledError: errorColor,\n    borderError: `1px solid ${errorColor}`,\n    borderHoverError: `1px solid ${errorColorHover}`,\n    borderPressedError: `1px solid ${errorColorPressed}`,\n    borderFocusError: `1px solid ${errorColorHover}`,\n    borderDisabledError: `1px solid ${errorColor}`,\n    rippleColorError: errorColor,\n    waveOpacity: '0.6',\n    fontWeight,\n    fontWeightStrong\n  });\n}\nconst buttonLight = {\n  name: 'Button',\n  common: commonLight,\n  self\n};\nexport default buttonLight;","import { commonDark } from \"../../_styles/common/index.mjs\";\nimport { self } from \"./light.mjs\";\nconst buttonDark = {\n  name: 'Button',\n  common: commonDark,\n  self(vars) {\n    const commonSelf = self(vars);\n    commonSelf.waveOpacity = '0.8';\n    commonSelf.colorOpacitySecondary = '0.16';\n    commonSelf.colorOpacitySecondaryHover = '0.2';\n    commonSelf.colorOpacitySecondaryPressed = '0.12';\n    return commonSelf;\n  }\n};\nexport default buttonDark;","import { fadeInWidthExpandTransition } from \"../../../_styles/transitions/fade-in-width-expand.cssr.mjs\";\nimport { iconSwitchTransition } from \"../../../_styles/transitions/icon-switch.cssr.mjs\";\nimport { isBrowser } from \"../../../_utils/index.mjs\";\nimport { c, cB, cE, cM, cNotM } from \"../../../_utils/cssr/index.mjs\";\n// vars:\n// --n-bezier\n// --n-bezier-ease-out\n// --n-ripple-duration\n// --n-opacity-disabled\n// --n-text-color\n// --n-text-color-hover\n// --n-text-color-pressed\n// --n-text-color-focus\n// --n-text-color-disabled\n// --n-color\n// --n-color-hover\n// --n-color-pressed\n// --n-color-focus\n// --n-color-disabled\n// --n-border\n// --n-border-hover\n// --n-border-pressed\n// --n-border-focus\n// --n-border-disabled\n// --n-ripple-color\n// --n-border-radius\n// --n-height\n// --n-width\n// --n-font-size\n// --n-padding\n// --n-icon-size\n// --n-icon-margin\n// --n-wave-opacity\n// --n-font-weight\n//\n// private-vars:\n// --n-border-color-xxx, used for custom color\nexport default c([cB('button', `\n margin: 0;\n font-weight: var(--n-font-weight);\n line-height: 1;\n font-family: inherit;\n padding: var(--n-padding);\n height: var(--n-height);\n font-size: var(--n-font-size);\n border-radius: var(--n-border-radius);\n color: var(--n-text-color);\n background-color: var(--n-color);\n width: var(--n-width);\n white-space: nowrap;\n outline: none;\n position: relative;\n z-index: auto;\n border: none;\n display: inline-flex;\n flex-wrap: nowrap;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n user-select: none;\n -webkit-user-select: none;\n text-align: center;\n cursor: pointer;\n text-decoration: none;\n transition:\n color .3s var(--n-bezier),\n background-color .3s var(--n-bezier),\n opacity .3s var(--n-bezier),\n border-color .3s var(--n-bezier);\n `, [cM('color', [cE('border', {\n  borderColor: 'var(--n-border-color)'\n}), cM('disabled', [cE('border', {\n  borderColor: 'var(--n-border-color-disabled)'\n})]), cNotM('disabled', [c('&:focus', [cE('state-border', {\n  borderColor: 'var(--n-border-color-focus)'\n})]), c('&:hover', [cE('state-border', {\n  borderColor: 'var(--n-border-color-hover)'\n})]), c('&:active', [cE('state-border', {\n  borderColor: 'var(--n-border-color-pressed)'\n})]), cM('pressed', [cE('state-border', {\n  borderColor: 'var(--n-border-color-pressed)'\n})])])]), cM('disabled', {\n  backgroundColor: 'var(--n-color-disabled)',\n  color: 'var(--n-text-color-disabled)'\n}, [cE('border', {\n  border: 'var(--n-border-disabled)'\n})]), cNotM('disabled', [c('&:focus', {\n  backgroundColor: 'var(--n-color-focus)',\n  color: 'var(--n-text-color-focus)'\n}, [cE('state-border', {\n  border: 'var(--n-border-focus)'\n})]), c('&:hover', {\n  backgroundColor: 'var(--n-color-hover)',\n  color: 'var(--n-text-color-hover)'\n}, [cE('state-border', {\n  border: 'var(--n-border-hover)'\n})]), c('&:active', {\n  backgroundColor: 'var(--n-color-pressed)',\n  color: 'var(--n-text-color-pressed)'\n}, [cE('state-border', {\n  border: 'var(--n-border-pressed)'\n})]), cM('pressed', {\n  backgroundColor: 'var(--n-color-pressed)',\n  color: 'var(--n-text-color-pressed)'\n}, [cE('state-border', {\n  border: 'var(--n-border-pressed)'\n})])]), cM('loading', 'cursor: wait;'), cB('base-wave', `\n pointer-events: none;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n animation-iteration-count: 1;\n animation-duration: var(--n-ripple-duration);\n animation-timing-function: var(--n-bezier-ease-out), var(--n-bezier-ease-out);\n `, [cM('active', {\n  zIndex: 1,\n  animationName: 'button-wave-spread, button-wave-opacity'\n})]), isBrowser && 'MozBoxSizing' in document.createElement('div').style ? c('&::moz-focus-inner', {\n  border: 0\n}) : null, cE('border, state-border', `\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n border-radius: inherit;\n transition: border-color .3s var(--n-bezier);\n pointer-events: none;\n `), cE('border', {\n  border: 'var(--n-border)'\n}), cE('state-border', {\n  border: 'var(--n-border)',\n  borderColor: '#0000',\n  zIndex: 1\n}), cE('icon', `\n margin: var(--n-icon-margin);\n margin-left: 0;\n height: var(--n-icon-size);\n width: var(--n-icon-size);\n max-width: var(--n-icon-size);\n font-size: var(--n-icon-size);\n position: relative;\n flex-shrink: 0;\n `, [cB('icon-slot', `\n height: var(--n-icon-size);\n width: var(--n-icon-size);\n position: absolute;\n left: 0;\n top: 50%;\n transform: translateY(-50%);\n display: flex;\n align-items: center;\n justify-content: center;\n `, [iconSwitchTransition({\n  top: '50%',\n  originalTransform: 'translateY(-50%)'\n})]), fadeInWidthExpandTransition()]), cE('content', `\n display: flex;\n align-items: center;\n flex-wrap: nowrap;\n min-width: 0;\n `, [c('~', [cE('icon', {\n  margin: 'var(--n-icon-margin)',\n  marginRight: 0\n})])]), cM('block', `\n display: flex;\n width: 100%;\n `), cM('dashed', [cE('border, state-border', {\n  borderStyle: 'dashed !important'\n})]), cM('disabled', {\n  cursor: 'not-allowed',\n  opacity: 'var(--n-opacity-disabled)'\n})]), c('@keyframes button-wave-spread', {\n  from: {\n    boxShadow: '0 0 0.5px 0 var(--n-ripple-color)'\n  },\n  to: {\n    // don't use exact 5px since chrome will display the animation with glitches\n    boxShadow: '0 0 0.5px 4.5px var(--n-ripple-color)'\n  }\n}), c('@keyframes button-wave-opacity', {\n  from: {\n    opacity: 'var(--n-wave-opacity)'\n  },\n  to: {\n    opacity: 0\n  }\n})]);","import { changeColor } from 'seemly';\nimport { useMemo } from 'vooks';\nimport { computed, defineComponent, h, inject, ref, watchEffect } from 'vue';\nimport { NBaseLoading, NBaseWave, NFadeInExpandTransition, NIconSwitchTransition } from \"../../_internal/index.mjs\";\nimport { useConfig, useFormItem, useTheme, useThemeClass } from \"../../_mixins/index.mjs\";\nimport { useRtl } from \"../../_mixins/use-rtl.mjs\";\nimport { call, color2Class, createKey, isSlotEmpty, resolveWrappedSlot, warnOnce } from \"../../_utils/index.mjs\";\nimport { createHoverColor, createPressedColor } from \"../../_utils/color/index.mjs\";\nimport { isSafari } from \"../../_utils/env/browser.mjs\";\nimport { buttonGroupInjectionKey } from \"../../button-group/src/context.mjs\";\nimport { buttonLight } from \"../styles/index.mjs\";\nimport style from \"./styles/index.cssr.mjs\";\nexport const buttonProps = Object.assign(Object.assign({}, useTheme.props), {\n  color: String,\n  textColor: String,\n  text: Boolean,\n  block: Boolean,\n  loading: Boolean,\n  disabled: Boolean,\n  circle: Boolean,\n  size: String,\n  ghost: Boolean,\n  round: Boolean,\n  secondary: Boolean,\n  tertiary: Boolean,\n  quaternary: Boolean,\n  strong: Boolean,\n  focusable: {\n    type: Boolean,\n    default: true\n  },\n  keyboard: {\n    type: Boolean,\n    default: true\n  },\n  tag: {\n    type: String,\n    default: 'button'\n  },\n  type: {\n    type: String,\n    default: 'default'\n  },\n  dashed: Boolean,\n  renderIcon: Function,\n  iconPlacement: {\n    type: String,\n    default: 'left'\n  },\n  attrType: {\n    type: String,\n    default: 'button'\n  },\n  bordered: {\n    type: Boolean,\n    default: true\n  },\n  onClick: [Function, Array],\n  nativeFocusBehavior: {\n    type: Boolean,\n    default: !isSafari\n  }\n});\nconst Button = defineComponent({\n  name: 'Button',\n  props: buttonProps,\n  slots: Object,\n  setup(props) {\n    if (process.env.NODE_ENV !== 'production') {\n      watchEffect(() => {\n        const {\n          dashed,\n          ghost,\n          text,\n          secondary,\n          tertiary,\n          quaternary\n        } = props;\n        if ((dashed || ghost || text) && (secondary || tertiary || quaternary)) {\n          warnOnce('button', '`dashed`, `ghost` and `text` props can\\'t be used along with `secondary`, `tertiary` and `quaternary` props.');\n        }\n      });\n    }\n    const selfElRef = ref(null);\n    const waveElRef = ref(null);\n    const enterPressedRef = ref(false);\n    const showBorderRef = useMemo(() => {\n      return !props.quaternary && !props.tertiary && !props.secondary && !props.text && (!props.color || props.ghost || props.dashed) && props.bordered;\n    });\n    const NButtonGroup = inject(buttonGroupInjectionKey, {});\n    const {\n      mergedSizeRef\n    } = useFormItem({}, {\n      defaultSize: 'medium',\n      mergedSize: NFormItem => {\n        const {\n          size\n        } = props;\n        if (size) return size;\n        const {\n          size: buttonGroupSize\n        } = NButtonGroup;\n        if (buttonGroupSize) return buttonGroupSize;\n        const {\n          mergedSize: formItemSize\n        } = NFormItem || {};\n        if (formItemSize) {\n          return formItemSize.value;\n        }\n        return 'medium';\n      }\n    });\n    const mergedFocusableRef = computed(() => {\n      return props.focusable && !props.disabled;\n    });\n    const handleMousedown = e => {\n      var _a;\n      if (!mergedFocusableRef.value) {\n        e.preventDefault();\n      }\n      if (props.nativeFocusBehavior) {\n        return;\n      }\n      e.preventDefault();\n      // normally this won't be called if disabled (when tag is button)\n      // if not, we try to make it behave like a button\n      if (props.disabled) {\n        return;\n      }\n      if (mergedFocusableRef.value) {\n        (_a = selfElRef.value) === null || _a === void 0 ? void 0 : _a.focus({\n          preventScroll: true\n        });\n      }\n    };\n    const handleClick = e => {\n      var _a;\n      if (!props.disabled && !props.loading) {\n        const {\n          onClick\n        } = props;\n        if (onClick) call(onClick, e);\n        if (!props.text) {\n          (_a = waveElRef.value) === null || _a === void 0 ? void 0 : _a.play();\n        }\n      }\n    };\n    const handleKeyup = e => {\n      switch (e.key) {\n        case 'Enter':\n          if (!props.keyboard) {\n            return;\n          }\n          enterPressedRef.value = false;\n      }\n    };\n    const handleKeydown = e => {\n      switch (e.key) {\n        case 'Enter':\n          if (!props.keyboard || props.loading) {\n            e.preventDefault();\n            return;\n          }\n          enterPressedRef.value = true;\n      }\n    };\n    const handleBlur = () => {\n      enterPressedRef.value = false;\n    };\n    const {\n      inlineThemeDisabled,\n      mergedClsPrefixRef,\n      mergedRtlRef\n    } = useConfig(props);\n    const themeRef = useTheme('Button', '-button', style, buttonLight, props, mergedClsPrefixRef);\n    const rtlEnabledRef = useRtl('Button', mergedRtlRef, mergedClsPrefixRef);\n    const cssVarsRef = computed(() => {\n      const theme = themeRef.value;\n      const {\n        common: {\n          cubicBezierEaseInOut,\n          cubicBezierEaseOut\n        },\n        self\n      } = theme;\n      const {\n        rippleDuration,\n        opacityDisabled,\n        fontWeight,\n        fontWeightStrong\n      } = self;\n      const size = mergedSizeRef.value;\n      const {\n        dashed,\n        type,\n        ghost,\n        text,\n        color,\n        round,\n        circle,\n        textColor,\n        secondary,\n        tertiary,\n        quaternary,\n        strong\n      } = props;\n      // font\n      const fontProps = {\n        '--n-font-weight': strong ? fontWeightStrong : fontWeight\n      };\n      // color\n      let colorProps = {\n        '--n-color': 'initial',\n        '--n-color-hover': 'initial',\n        '--n-color-pressed': 'initial',\n        '--n-color-focus': 'initial',\n        '--n-color-disabled': 'initial',\n        '--n-ripple-color': 'initial',\n        '--n-text-color': 'initial',\n        '--n-text-color-hover': 'initial',\n        '--n-text-color-pressed': 'initial',\n        '--n-text-color-focus': 'initial',\n        '--n-text-color-disabled': 'initial'\n      };\n      const typeIsTertiary = type === 'tertiary';\n      const typeIsDefault = type === 'default';\n      const mergedType = typeIsTertiary ? 'default' : type;\n      if (text) {\n        const propTextColor = textColor || color;\n        const mergedTextColor = propTextColor || self[createKey('textColorText', mergedType)];\n        colorProps = {\n          '--n-color': '#0000',\n          '--n-color-hover': '#0000',\n          '--n-color-pressed': '#0000',\n          '--n-color-focus': '#0000',\n          '--n-color-disabled': '#0000',\n          '--n-ripple-color': '#0000',\n          '--n-text-color': mergedTextColor,\n          '--n-text-color-hover': propTextColor ? createHoverColor(propTextColor) : self[createKey('textColorTextHover', mergedType)],\n          '--n-text-color-pressed': propTextColor ? createPressedColor(propTextColor) : self[createKey('textColorTextPressed', mergedType)],\n          '--n-text-color-focus': propTextColor ? createHoverColor(propTextColor) : self[createKey('textColorTextHover', mergedType)],\n          '--n-text-color-disabled': propTextColor || self[createKey('textColorTextDisabled', mergedType)]\n        };\n      } else if (ghost || dashed) {\n        const mergedTextColor = textColor || color;\n        colorProps = {\n          '--n-color': '#0000',\n          '--n-color-hover': '#0000',\n          '--n-color-pressed': '#0000',\n          '--n-color-focus': '#0000',\n          '--n-color-disabled': '#0000',\n          '--n-ripple-color': color || self[createKey('rippleColor', mergedType)],\n          '--n-text-color': mergedTextColor || self[createKey('textColorGhost', mergedType)],\n          '--n-text-color-hover': mergedTextColor ? createHoverColor(mergedTextColor) : self[createKey('textColorGhostHover', mergedType)],\n          '--n-text-color-pressed': mergedTextColor ? createPressedColor(mergedTextColor) : self[createKey('textColorGhostPressed', mergedType)],\n          '--n-text-color-focus': mergedTextColor ? createHoverColor(mergedTextColor) : self[createKey('textColorGhostHover', mergedType)],\n          '--n-text-color-disabled': mergedTextColor || self[createKey('textColorGhostDisabled', mergedType)]\n        };\n      } else if (secondary) {\n        const typeTextColor = typeIsDefault ? self.textColor : typeIsTertiary ? self.textColorTertiary : self[createKey('color', mergedType)];\n        const mergedTextColor = color || typeTextColor;\n        const isColoredType = type !== 'default' && type !== 'tertiary';\n        colorProps = {\n          '--n-color': isColoredType ? changeColor(mergedTextColor, {\n            alpha: Number(self.colorOpacitySecondary)\n          }) : self.colorSecondary,\n          '--n-color-hover': isColoredType ? changeColor(mergedTextColor, {\n            alpha: Number(self.colorOpacitySecondaryHover)\n          }) : self.colorSecondaryHover,\n          '--n-color-pressed': isColoredType ? changeColor(mergedTextColor, {\n            alpha: Number(self.colorOpacitySecondaryPressed)\n          }) : self.colorSecondaryPressed,\n          '--n-color-focus': isColoredType ? changeColor(mergedTextColor, {\n            alpha: Number(self.colorOpacitySecondaryHover)\n          }) : self.colorSecondaryHover,\n          '--n-color-disabled': self.colorSecondary,\n          '--n-ripple-color': '#0000',\n          '--n-text-color': mergedTextColor,\n          '--n-text-color-hover': mergedTextColor,\n          '--n-text-color-pressed': mergedTextColor,\n          '--n-text-color-focus': mergedTextColor,\n          '--n-text-color-disabled': mergedTextColor\n        };\n      } else if (tertiary || quaternary) {\n        const typeColor = typeIsDefault ? self.textColor : typeIsTertiary ? self.textColorTertiary : self[createKey('color', mergedType)];\n        const mergedColor = color || typeColor;\n        if (tertiary) {\n          colorProps['--n-color'] = self.colorTertiary;\n          colorProps['--n-color-hover'] = self.colorTertiaryHover;\n          colorProps['--n-color-pressed'] = self.colorTertiaryPressed;\n          colorProps['--n-color-focus'] = self.colorSecondaryHover;\n          colorProps['--n-color-disabled'] = self.colorTertiary;\n        } else {\n          colorProps['--n-color'] = self.colorQuaternary;\n          colorProps['--n-color-hover'] = self.colorQuaternaryHover;\n          colorProps['--n-color-pressed'] = self.colorQuaternaryPressed;\n          colorProps['--n-color-focus'] = self.colorQuaternaryHover;\n          colorProps['--n-color-disabled'] = self.colorQuaternary;\n        }\n        colorProps['--n-ripple-color'] = '#0000';\n        colorProps['--n-text-color'] = mergedColor;\n        colorProps['--n-text-color-hover'] = mergedColor;\n        colorProps['--n-text-color-pressed'] = mergedColor;\n        colorProps['--n-text-color-focus'] = mergedColor;\n        colorProps['--n-text-color-disabled'] = mergedColor;\n      } else {\n        colorProps = {\n          '--n-color': color || self[createKey('color', mergedType)],\n          '--n-color-hover': color ? createHoverColor(color) : self[createKey('colorHover', mergedType)],\n          '--n-color-pressed': color ? createPressedColor(color) : self[createKey('colorPressed', mergedType)],\n          '--n-color-focus': color ? createHoverColor(color) : self[createKey('colorFocus', mergedType)],\n          '--n-color-disabled': color || self[createKey('colorDisabled', mergedType)],\n          '--n-ripple-color': color || self[createKey('rippleColor', mergedType)],\n          '--n-text-color': textColor || (color ? self.textColorPrimary : typeIsTertiary ? self.textColorTertiary : self[createKey('textColor', mergedType)]),\n          '--n-text-color-hover': textColor || (color ? self.textColorHoverPrimary : self[createKey('textColorHover', mergedType)]),\n          '--n-text-color-pressed': textColor || (color ? self.textColorPressedPrimary : self[createKey('textColorPressed', mergedType)]),\n          '--n-text-color-focus': textColor || (color ? self.textColorFocusPrimary : self[createKey('textColorFocus', mergedType)]),\n          '--n-text-color-disabled': textColor || (color ? self.textColorDisabledPrimary : self[createKey('textColorDisabled', mergedType)])\n        };\n      }\n      // border\n      let borderProps = {\n        '--n-border': 'initial',\n        '--n-border-hover': 'initial',\n        '--n-border-pressed': 'initial',\n        '--n-border-focus': 'initial',\n        '--n-border-disabled': 'initial'\n      };\n      if (text) {\n        borderProps = {\n          '--n-border': 'none',\n          '--n-border-hover': 'none',\n          '--n-border-pressed': 'none',\n          '--n-border-focus': 'none',\n          '--n-border-disabled': 'none'\n        };\n      } else {\n        borderProps = {\n          '--n-border': self[createKey('border', mergedType)],\n          '--n-border-hover': self[createKey('borderHover', mergedType)],\n          '--n-border-pressed': self[createKey('borderPressed', mergedType)],\n          '--n-border-focus': self[createKey('borderFocus', mergedType)],\n          '--n-border-disabled': self[createKey('borderDisabled', mergedType)]\n        };\n      }\n      // size\n      const {\n        [createKey('height', size)]: height,\n        [createKey('fontSize', size)]: fontSize,\n        [createKey('padding', size)]: padding,\n        [createKey('paddingRound', size)]: paddingRound,\n        [createKey('iconSize', size)]: iconSize,\n        [createKey('borderRadius', size)]: borderRadius,\n        [createKey('iconMargin', size)]: iconMargin,\n        waveOpacity\n      } = self;\n      const sizeProps = {\n        '--n-width': circle && !text ? height : 'initial',\n        '--n-height': text ? 'initial' : height,\n        '--n-font-size': fontSize,\n        '--n-padding': circle ? 'initial' : text ? 'initial' : round ? paddingRound : padding,\n        '--n-icon-size': iconSize,\n        '--n-icon-margin': iconMargin,\n        '--n-border-radius': text ? 'initial' : circle || round ? height : borderRadius\n      };\n      return Object.assign(Object.assign(Object.assign(Object.assign({\n        '--n-bezier': cubicBezierEaseInOut,\n        '--n-bezier-ease-out': cubicBezierEaseOut,\n        '--n-ripple-duration': rippleDuration,\n        '--n-opacity-disabled': opacityDisabled,\n        '--n-wave-opacity': waveOpacity\n      }, fontProps), colorProps), borderProps), sizeProps);\n    });\n    const themeClassHandle = inlineThemeDisabled ? useThemeClass('button', computed(() => {\n      let hash = '';\n      const {\n        dashed,\n        type,\n        ghost,\n        text,\n        color,\n        round,\n        circle,\n        textColor,\n        secondary,\n        tertiary,\n        quaternary,\n        strong\n      } = props;\n      if (dashed) hash += 'a';\n      if (ghost) hash += 'b';\n      if (text) hash += 'c';\n      if (round) hash += 'd';\n      if (circle) hash += 'e';\n      if (secondary) hash += 'f';\n      if (tertiary) hash += 'g';\n      if (quaternary) hash += 'h';\n      if (strong) hash += 'i';\n      if (color) hash += `j${color2Class(color)}`;\n      if (textColor) hash += `k${color2Class(textColor)}`;\n      const {\n        value: size\n      } = mergedSizeRef;\n      hash += `l${size[0]}`;\n      hash += `m${type[0]}`;\n      return hash;\n    }), cssVarsRef, props) : undefined;\n    return {\n      selfElRef,\n      waveElRef,\n      mergedClsPrefix: mergedClsPrefixRef,\n      mergedFocusable: mergedFocusableRef,\n      mergedSize: mergedSizeRef,\n      showBorder: showBorderRef,\n      enterPressed: enterPressedRef,\n      rtlEnabled: rtlEnabledRef,\n      handleMousedown,\n      handleKeydown,\n      handleBlur,\n      handleKeyup,\n      handleClick,\n      customColorCssVars: computed(() => {\n        const {\n          color\n        } = props;\n        if (!color) return null;\n        const hoverColor = createHoverColor(color);\n        return {\n          '--n-border-color': color,\n          '--n-border-color-hover': hoverColor,\n          '--n-border-color-pressed': createPressedColor(color),\n          '--n-border-color-focus': hoverColor,\n          '--n-border-color-disabled': color\n        };\n      }),\n      cssVars: inlineThemeDisabled ? undefined : cssVarsRef,\n      themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,\n      onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender\n    };\n  },\n  render() {\n    const {\n      mergedClsPrefix,\n      tag: Component,\n      onRender\n    } = this;\n    onRender === null || onRender === void 0 ? void 0 : onRender();\n    const children = resolveWrappedSlot(this.$slots.default, children => children && h(\"span\", {\n      class: `${mergedClsPrefix}-button__content`\n    }, children));\n    return h(Component, {\n      ref: \"selfElRef\",\n      class: [this.themeClass, `${mergedClsPrefix}-button`, `${mergedClsPrefix}-button--${this.type}-type`, `${mergedClsPrefix}-button--${this.mergedSize}-type`, this.rtlEnabled && `${mergedClsPrefix}-button--rtl`, this.disabled && `${mergedClsPrefix}-button--disabled`, this.block && `${mergedClsPrefix}-button--block`, this.enterPressed && `${mergedClsPrefix}-button--pressed`, !this.text && this.dashed && `${mergedClsPrefix}-button--dashed`, this.color && `${mergedClsPrefix}-button--color`, this.secondary && `${mergedClsPrefix}-button--secondary`, this.loading && `${mergedClsPrefix}-button--loading`, this.ghost && `${mergedClsPrefix}-button--ghost` // required for button group border collapse\n      ],\n      tabindex: this.mergedFocusable ? 0 : -1,\n      type: this.attrType,\n      style: this.cssVars,\n      disabled: this.disabled,\n      onClick: this.handleClick,\n      onBlur: this.handleBlur,\n      onMousedown: this.handleMousedown,\n      onKeyup: this.handleKeyup,\n      onKeydown: this.handleKeydown\n    }, this.iconPlacement === 'right' && children, h(NFadeInExpandTransition, {\n      width: true\n    }, {\n      default: () => resolveWrappedSlot(this.$slots.icon, children => (this.loading || this.renderIcon || children) && h(\"span\", {\n        class: `${mergedClsPrefix}-button__icon`,\n        style: {\n          margin: isSlotEmpty(this.$slots.default) ? '0' : ''\n        }\n      }, h(NIconSwitchTransition, null, {\n        default: () => this.loading ? h(NBaseLoading, {\n          clsPrefix: mergedClsPrefix,\n          key: \"loading\",\n          class: `${mergedClsPrefix}-icon-slot`,\n          strokeWidth: 20\n        }) : h(\"div\", {\n          key: \"icon\",\n          class: `${mergedClsPrefix}-icon-slot`,\n          role: \"none\"\n        }, this.renderIcon ? this.renderIcon() : children)\n      })))\n    }), this.iconPlacement === 'left' && children, !this.text ? h(NBaseWave, {\n      ref: \"waveElRef\",\n      clsPrefix: mergedClsPrefix\n    }) : null, this.showBorder ? h(\"div\", {\n      \"aria-hidden\": true,\n      class: `${mergedClsPrefix}-button__border`,\n      style: this.customColorCssVars\n    }) : null, this.showBorder ? h(\"div\", {\n      \"aria-hidden\": true,\n      class: `${mergedClsPrefix}-button__state-border`,\n      style: this.customColorCssVars\n    }) : null);\n  }\n});\nexport default Button;\n// XButton is for tsx type checking\n// It's not compatible with render function `h`\n// Currently we don't expose it as public\n// If there's any issue about this, we may expose it\n// Since most people use template, the type checking phase doesn't work as tsx\nexport const XButton = Button;\n// Also, we may make XButton a generic type which support `tag` prop\n// but currently vue doesn't export IntrinsicElementAttributes from runtime-dom\n// so we can't easily make an attr map by hand\n// just leave it for later","import { c, cB, cE, cM, cNotM } from \"../../../_utils/cssr/index.mjs\";\nexport const zero = '0!important';\nexport const n1 = '-1px!important';\nfunction createLeftBorderStyle(type) {\n  return cM(`${type}-type`, [c('& +', [cB('button', {}, [cM(`${type}-type`, [cE('border', {\n    borderLeftWidth: zero\n  }), cE('state-border', {\n    left: n1\n  })])])])]);\n}\nfunction createTopBorderStyle(type) {\n  return cM(`${type}-type`, [c('& +', [cB('button', [cM(`${type}-type`, [cE('border', {\n    borderTopWidth: zero\n  }), cE('state-border', {\n    top: n1\n  })])])])]);\n}\nexport default cB('button-group', `\n flex-wrap: nowrap;\n display: inline-flex;\n position: relative;\n`, [cNotM('vertical', {\n  flexDirection: 'row'\n}, [cNotM('rtl', [cB('button', [c('&:first-child:not(:last-child)', `\n margin-right: ${zero};\n border-top-right-radius: ${zero};\n border-bottom-right-radius: ${zero};\n `), c('&:last-child:not(:first-child)', `\n margin-left: ${zero};\n border-top-left-radius: ${zero};\n border-bottom-left-radius: ${zero};\n `), c('&:not(:first-child):not(:last-child)', `\n margin-left: ${zero};\n margin-right: ${zero};\n border-radius: ${zero};\n `), createLeftBorderStyle('default'), cM('ghost', [createLeftBorderStyle('primary'), createLeftBorderStyle('info'), createLeftBorderStyle('success'), createLeftBorderStyle('warning'), createLeftBorderStyle('error')])])])]), cM('vertical', {\n  flexDirection: 'column'\n}, [cB('button', [c('&:first-child:not(:last-child)', `\n margin-bottom: ${zero};\n margin-left: ${zero};\n margin-right: ${zero};\n border-bottom-left-radius: ${zero};\n border-bottom-right-radius: ${zero};\n `), c('&:last-child:not(:first-child)', `\n margin-top: ${zero};\n margin-left: ${zero};\n margin-right: ${zero};\n border-top-left-radius: ${zero};\n border-top-right-radius: ${zero};\n `), c('&:not(:first-child):not(:last-child)', `\n margin: ${zero};\n border-radius: ${zero};\n `), createTopBorderStyle('default'), cM('ghost', [createTopBorderStyle('primary'), createTopBorderStyle('info'), createTopBorderStyle('success'), createTopBorderStyle('warning'), createTopBorderStyle('error')])])])]);","import { defineComponent, h, provide } from 'vue';\nimport { useConfig, useStyle } from \"../../_mixins/index.mjs\";\nimport { useRtl } from \"../../_mixins/use-rtl.mjs\";\nimport { buttonGroupInjectionKey } from \"./context.mjs\";\nimport style from \"./styles/index.cssr.mjs\";\nexport const buttonGroupProps = {\n  size: {\n    type: String,\n    default: undefined\n  },\n  vertical: Boolean\n};\nexport default defineComponent({\n  name: 'ButtonGroup',\n  props: buttonGroupProps,\n  setup(props) {\n    const {\n      mergedClsPrefixRef,\n      mergedRtlRef\n    } = useConfig(props);\n    useStyle('-button-group', style, mergedClsPrefixRef);\n    provide(buttonGroupInjectionKey, props);\n    const rtlEnabledRef = useRtl('ButtonGroup', mergedRtlRef, mergedClsPrefixRef);\n    return {\n      rtlEnabled: rtlEnabledRef,\n      mergedClsPrefix: mergedClsPrefixRef\n    };\n  },\n  render() {\n    const {\n      mergedClsPrefix\n    } = this;\n    return h(\"div\", {\n      class: [`${mergedClsPrefix}-button-group`, this.rtlEnabled && `${mergedClsPrefix}-button-group--rtl`, this.vertical && `${mergedClsPrefix}-button-group--vertical`],\n      role: \"group\"\n    }, this.$slots);\n  }\n});","export default {\n  titleFontSize: '22px'\n};","import { composite } from 'seemly';\nimport { createTheme } from \"../../_mixins/index.mjs\";\nimport { commonLight } from \"../../_styles/common/index.mjs\";\nimport { buttonLight } from \"../../button/styles/index.mjs\";\nimport commonVariables from \"./_common.mjs\";\nexport function self(vars) {\n  const {\n    borderRadius,\n    fontSize,\n    lineHeight,\n    textColor2,\n    textColor1,\n    textColorDisabled,\n    dividerColor,\n    fontWeightStrong,\n    primaryColor,\n    baseColor,\n    hoverColor,\n    cardColor,\n    modalColor,\n    popoverColor\n  } = vars;\n  return Object.assign(Object.assign({}, commonVariables), {\n    borderRadius,\n    borderColor: composite(cardColor, dividerColor),\n    borderColorModal: composite(modalColor, dividerColor),\n    borderColorPopover: composite(popoverColor, dividerColor),\n    textColor: textColor2,\n    titleFontWeight: fontWeightStrong,\n    titleTextColor: textColor1,\n    dayTextColor: textColorDisabled,\n    fontSize,\n    lineHeight,\n    dateColorCurrent: primaryColor,\n    dateTextColorCurrent: baseColor,\n    cellColorHover: composite(cardColor, hoverColor),\n    cellColorHoverModal: composite(modalColor, hoverColor),\n    cellColorHoverPopover: composite(popoverColor, hoverColor),\n    cellColor: cardColor,\n    cellColorModal: modalColor,\n    cellColorPopover: popoverColor,\n    barColor: primaryColor\n  });\n}\nconst calendarLight = createTheme({\n  name: 'Calendar',\n  common: commonLight,\n  peers: {\n    Button: buttonLight\n  },\n  self\n});\nexport default calendarLight;","import { commonDark } from \"../../_styles/common/index.mjs\";\nimport { buttonDark } from \"../../button/styles/index.mjs\";\nimport { self } from \"./light.mjs\";\nconst calendarDark = {\n  name: 'Calendar',\n  common: commonDark,\n  peers: {\n    Button: buttonDark\n  },\n  self\n};\nexport default calendarDark;","export default {\n  paddingSmall: '12px 16px 12px',\n  paddingMedium: '19px 24px 20px',\n  paddingLarge: '23px 32px 24px',\n  paddingHuge: '27px 40px 28px',\n  titleFontSizeSmall: '16px',\n  titleFontSizeMedium: '18px',\n  titleFontSizeLarge: '18px',\n  titleFontSizeHuge: '18px',\n  closeIconSize: '18px',\n  closeSize: '22px'\n};","import { commonLight } from \"../../_styles/common/index.mjs\";\nimport commonVariables from \"./_common.mjs\";\nexport function self(vars) {\n  const {\n    primaryColor,\n    borderRadius,\n    lineHeight,\n    fontSize,\n    cardColor,\n    textColor2,\n    textColor1,\n    dividerColor,\n    fontWeightStrong,\n    closeIconColor,\n    closeIconColorHover,\n    closeIconColorPressed,\n    closeColorHover,\n    closeColorPressed,\n    modalColor,\n    boxShadow1,\n    popoverColor,\n    actionColor\n  } = vars;\n  return Object.assign(Object.assign({}, commonVariables), {\n    lineHeight,\n    color: cardColor,\n    colorModal: modalColor,\n    colorPopover: popoverColor,\n    colorTarget: primaryColor,\n    colorEmbedded: actionColor,\n    colorEmbeddedModal: actionColor,\n    colorEmbeddedPopover: actionColor,\n    textColor: textColor2,\n    titleTextColor: textColor1,\n    borderColor: dividerColor,\n    actionColor,\n    titleFontWeight: fontWeightStrong,\n    closeColorHover,\n    closeColorPressed,\n    closeBorderRadius: borderRadius,\n    closeIconColor,\n    closeIconColorHover,\n    closeIconColorPressed,\n    fontSizeSmall: fontSize,\n    fontSizeMedium: fontSize,\n    fontSizeLarge: fontSize,\n    fontSizeHuge: fontSize,\n    boxShadow: boxShadow1,\n    borderRadius\n  });\n}\nconst cardLight = {\n  name: 'Card',\n  common: commonLight,\n  self\n};\nexport default cardLight;","import { commonDark } from \"../../_styles/common/index.mjs\";\nimport { self } from \"./light.mjs\";\nconst cardDark = {\n  name: 'Card',\n  common: commonDark,\n  self(vars) {\n    const commonSelf = self(vars);\n    const {\n      cardColor,\n      modalColor,\n      popoverColor\n    } = vars;\n    commonSelf.colorEmbedded = cardColor;\n    commonSelf.colorEmbeddedModal = modalColor;\n    commonSelf.colorEmbeddedPopover = popoverColor;\n    return commonSelf;\n  }\n};\nexport default cardDark;","import { asModal, c, cB, cE, cM, insideModal, insidePopover } from \"../../../_utils/cssr/index.mjs\";\n// vars:\n// --n-bezier\n// --n-border-radius\n// --n-color\n// --n-color-modal\n// --n-color-popover\n// --n-text-color\n// --n-line-height\n// --n-padding-top\n// --n-padding-bottom\n// --n-padding-left\n// --n-font-size\n// --n-action-color\n// --n-title-font-weight\n// --n-title-font-size\n// --n-title-text-color\n// --n-close-size\n// --n-close-icon-size\n// --n-close-color-hover\n// --n-close-color-pressed\n// --n-close-icon-color\n// --n-close-icon-color-hover\n// --n-close-icon-color-pressed\n// --n-border-color\n// --n-box-shadow\n// --n-color-embedded\n// --n-color-embedded-modal\n// --n-color-embedded-popover\nexport default c([cB('card', `\n font-size: var(--n-font-size);\n line-height: var(--n-line-height);\n display: flex;\n flex-direction: column;\n width: 100%;\n box-sizing: border-box;\n position: relative;\n border-radius: var(--n-border-radius);\n background-color: var(--n-color);\n color: var(--n-text-color);\n word-break: break-word;\n transition: \n color .3s var(--n-bezier),\n background-color .3s var(--n-bezier),\n box-shadow .3s var(--n-bezier),\n border-color .3s var(--n-bezier);\n `, [asModal({\n  background: 'var(--n-color-modal)'\n}), cM('hoverable', [c('&:hover', 'box-shadow: var(--n-box-shadow);')]), cM('content-segmented', [c('>', [cE('content', {\n  paddingTop: 'var(--n-padding-bottom)'\n})])]), cM('content-soft-segmented', [c('>', [cE('content', `\n margin: 0 var(--n-padding-left);\n padding: var(--n-padding-bottom) 0;\n `)])]), cM('footer-segmented', [c('>', [cE('footer', {\n  paddingTop: 'var(--n-padding-bottom)'\n})])]), cM('footer-soft-segmented', [c('>', [cE('footer', `\n padding: var(--n-padding-bottom) 0;\n margin: 0 var(--n-padding-left);\n `)])]), c('>', [cB('card-header', `\n box-sizing: border-box;\n display: flex;\n align-items: center;\n font-size: var(--n-title-font-size);\n padding:\n var(--n-padding-top)\n var(--n-padding-left)\n var(--n-padding-bottom)\n var(--n-padding-left);\n `, [cE('main', `\n font-weight: var(--n-title-font-weight);\n transition: color .3s var(--n-bezier);\n flex: 1;\n min-width: 0;\n color: var(--n-title-text-color);\n `), cE('extra', `\n display: flex;\n align-items: center;\n font-size: var(--n-font-size);\n font-weight: 400;\n transition: color .3s var(--n-bezier);\n color: var(--n-text-color);\n `), cE('close', `\n margin: 0 0 0 8px;\n transition:\n background-color .3s var(--n-bezier),\n color .3s var(--n-bezier);\n `)]), cE('action', `\n box-sizing: border-box;\n transition:\n background-color .3s var(--n-bezier),\n border-color .3s var(--n-bezier);\n background-clip: padding-box;\n background-color: var(--n-action-color);\n `), cE('content', 'flex: 1; min-width: 0;'), cE('content, footer', `\n box-sizing: border-box;\n padding: 0 var(--n-padding-left) var(--n-padding-bottom) var(--n-padding-left);\n font-size: var(--n-font-size);\n `, [c('&:first-child', {\n  paddingTop: 'var(--n-padding-bottom)'\n})]), cE('action', `\n background-color: var(--n-action-color);\n padding: var(--n-padding-bottom) var(--n-padding-left);\n border-bottom-left-radius: var(--n-border-radius);\n border-bottom-right-radius: var(--n-border-radius);\n `)]), cB('card-cover', `\n overflow: hidden;\n width: 100%;\n border-radius: var(--n-border-radius) var(--n-border-radius) 0 0;\n `, [c('img', `\n display: block;\n width: 100%;\n `)]), cM('bordered', `\n border: 1px solid var(--n-border-color);\n `, [c('&:target', 'border-color: var(--n-color-target);')]), cM('action-segmented', [c('>', [cE('action', [c('&:not(:first-child)', {\n  borderTop: '1px solid var(--n-border-color)'\n})])])]), cM('content-segmented, content-soft-segmented', [c('>', [cE('content', {\n  transition: 'border-color 0.3s var(--n-bezier)'\n}, [c('&:not(:first-child)', {\n  borderTop: '1px solid var(--n-border-color)'\n})])])]), cM('footer-segmented, footer-soft-segmented', [c('>', [cE('footer', {\n  transition: 'border-color 0.3s var(--n-bezier)'\n}, [c('&:not(:first-child)', {\n  borderTop: '1px solid var(--n-border-color)'\n})])])]), cM('embedded', `\n background-color: var(--n-color-embedded);\n `)]), insideModal(cB('card', `\n background: var(--n-color-modal);\n `, [cM('embedded', `\n background-color: var(--n-color-embedded-modal);\n `)])), insidePopover(cB('card', `\n background: var(--n-color-popover);\n `, [cM('embedded', `\n background-color: var(--n-color-embedded-popover);\n `)]))]);","import { getPadding } from 'seemly';\nimport { computed, defineComponent, h } from 'vue';\nimport { NBaseClose } from \"../../_internal/index.mjs\";\nimport { useConfig, useTheme, useThemeClass } from \"../../_mixins/index.mjs\";\nimport { useRtl } from \"../../_mixins/use-rtl.mjs\";\nimport { call, createKey, keysOf, resolveWrappedSlot } from \"../../_utils/index.mjs\";\nimport { ensureValidVNode } from \"../../_utils/vue/resolve-slot.mjs\";\nimport { cardLight } from \"../styles/index.mjs\";\nimport style from \"./styles/index.cssr.mjs\";\nexport const cardBaseProps = {\n  title: [String, Function],\n  contentClass: String,\n  contentStyle: [Object, String],\n  headerClass: String,\n  headerStyle: [Object, String],\n  headerExtraClass: String,\n  headerExtraStyle: [Object, String],\n  footerClass: String,\n  footerStyle: [Object, String],\n  embedded: Boolean,\n  segmented: {\n    type: [Boolean, Object],\n    default: false\n  },\n  size: {\n    type: String,\n    default: 'medium'\n  },\n  bordered: {\n    type: Boolean,\n    default: true\n  },\n  closable: Boolean,\n  hoverable: Boolean,\n  role: String,\n  onClose: [Function, Array],\n  tag: {\n    type: String,\n    default: 'div'\n  },\n  cover: Function,\n  content: [String, Function],\n  footer: Function,\n  action: Function,\n  headerExtra: Function\n};\nexport const cardBasePropKeys = keysOf(cardBaseProps);\nexport const cardProps = Object.assign(Object.assign({}, useTheme.props), cardBaseProps);\nexport default defineComponent({\n  name: 'Card',\n  props: cardProps,\n  slots: Object,\n  setup(props) {\n    const handleCloseClick = () => {\n      const {\n        onClose\n      } = props;\n      if (onClose) call(onClose);\n    };\n    const {\n      inlineThemeDisabled,\n      mergedClsPrefixRef,\n      mergedRtlRef\n    } = useConfig(props);\n    const themeRef = useTheme('Card', '-card', style, cardLight, props, mergedClsPrefixRef);\n    const rtlEnabledRef = useRtl('Card', mergedRtlRef, mergedClsPrefixRef);\n    const cssVarsRef = computed(() => {\n      const {\n        size\n      } = props;\n      const {\n        self: {\n          color,\n          colorModal,\n          colorTarget,\n          textColor,\n          titleTextColor,\n          titleFontWeight,\n          borderColor,\n          actionColor,\n          borderRadius,\n          lineHeight,\n          closeIconColor,\n          closeIconColorHover,\n          closeIconColorPressed,\n          closeColorHover,\n          closeColorPressed,\n          closeBorderRadius,\n          closeIconSize,\n          closeSize,\n          boxShadow,\n          colorPopover,\n          colorEmbedded,\n          colorEmbeddedModal,\n          colorEmbeddedPopover,\n          [createKey('padding', size)]: padding,\n          [createKey('fontSize', size)]: fontSize,\n          [createKey('titleFontSize', size)]: titleFontSize\n        },\n        common: {\n          cubicBezierEaseInOut\n        }\n      } = themeRef.value;\n      const {\n        top: paddingTop,\n        left: paddingLeft,\n        bottom: paddingBottom\n      } = getPadding(padding);\n      return {\n        '--n-bezier': cubicBezierEaseInOut,\n        '--n-border-radius': borderRadius,\n        '--n-color': color,\n        '--n-color-modal': colorModal,\n        '--n-color-popover': colorPopover,\n        '--n-color-embedded': colorEmbedded,\n        '--n-color-embedded-modal': colorEmbeddedModal,\n        '--n-color-embedded-popover': colorEmbeddedPopover,\n        '--n-color-target': colorTarget,\n        '--n-text-color': textColor,\n        '--n-line-height': lineHeight,\n        '--n-action-color': actionColor,\n        '--n-title-text-color': titleTextColor,\n        '--n-title-font-weight': titleFontWeight,\n        '--n-close-icon-color': closeIconColor,\n        '--n-close-icon-color-hover': closeIconColorHover,\n        '--n-close-icon-color-pressed': closeIconColorPressed,\n        '--n-close-color-hover': closeColorHover,\n        '--n-close-color-pressed': closeColorPressed,\n        '--n-border-color': borderColor,\n        '--n-box-shadow': boxShadow,\n        // size\n        '--n-padding-top': paddingTop,\n        '--n-padding-bottom': paddingBottom,\n        '--n-padding-left': paddingLeft,\n        '--n-font-size': fontSize,\n        '--n-title-font-size': titleFontSize,\n        '--n-close-size': closeSize,\n        '--n-close-icon-size': closeIconSize,\n        '--n-close-border-radius': closeBorderRadius\n      };\n    });\n    const themeClassHandle = inlineThemeDisabled ? useThemeClass('card', computed(() => {\n      return props.size[0];\n    }), cssVarsRef, props) : undefined;\n    return {\n      rtlEnabled: rtlEnabledRef,\n      mergedClsPrefix: mergedClsPrefixRef,\n      mergedTheme: themeRef,\n      handleCloseClick,\n      cssVars: inlineThemeDisabled ? undefined : cssVarsRef,\n      themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,\n      onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender\n    };\n  },\n  render() {\n    const {\n      segmented,\n      bordered,\n      hoverable,\n      mergedClsPrefix,\n      rtlEnabled,\n      onRender,\n      embedded,\n      tag: Component,\n      $slots\n    } = this;\n    onRender === null || onRender === void 0 ? void 0 : onRender();\n    return h(Component, {\n      class: [`${mergedClsPrefix}-card`, this.themeClass, embedded && `${mergedClsPrefix}-card--embedded`, {\n        [`${mergedClsPrefix}-card--rtl`]: rtlEnabled,\n        [`${mergedClsPrefix}-card--content${typeof segmented !== 'boolean' && segmented.content === 'soft' ? '-soft' : ''}-segmented`]: segmented === true || segmented !== false && segmented.content,\n        [`${mergedClsPrefix}-card--footer${typeof segmented !== 'boolean' && segmented.footer === 'soft' ? '-soft' : ''}-segmented`]: segmented === true || segmented !== false && segmented.footer,\n        [`${mergedClsPrefix}-card--action-segmented`]: segmented === true || segmented !== false && segmented.action,\n        [`${mergedClsPrefix}-card--bordered`]: bordered,\n        [`${mergedClsPrefix}-card--hoverable`]: hoverable\n      }],\n      style: this.cssVars,\n      role: this.role\n    }, resolveWrappedSlot($slots.cover, children => {\n      const mergedChildren = this.cover ? ensureValidVNode([this.cover()]) : children;\n      return mergedChildren && h(\"div\", {\n        class: `${mergedClsPrefix}-card-cover`,\n        role: \"none\"\n      }, mergedChildren);\n    }), resolveWrappedSlot($slots.header, children => {\n      const {\n        title\n      } = this;\n      const mergedChildren = title ? ensureValidVNode(typeof title === 'function' ? [title()] : [title]) : children;\n      return mergedChildren || this.closable ? h(\"div\", {\n        class: [`${mergedClsPrefix}-card-header`, this.headerClass],\n        style: this.headerStyle,\n        role: \"heading\"\n      }, h(\"div\", {\n        class: `${mergedClsPrefix}-card-header__main`,\n        role: \"heading\"\n      }, mergedChildren), resolveWrappedSlot($slots['header-extra'], children => {\n        const mergedChildren = this.headerExtra ? ensureValidVNode([this.headerExtra()]) : children;\n        return mergedChildren && h(\"div\", {\n          class: [`${mergedClsPrefix}-card-header__extra`, this.headerExtraClass],\n          style: this.headerExtraStyle\n        }, mergedChildren);\n      }), this.closable && h(NBaseClose, {\n        clsPrefix: mergedClsPrefix,\n        class: `${mergedClsPrefix}-card-header__close`,\n        onClick: this.handleCloseClick,\n        absolute: true\n      })) : null;\n    }), resolveWrappedSlot($slots.default, children => {\n      const {\n        content\n      } = this;\n      const mergedChildren = content ? ensureValidVNode(typeof content === 'function' ? [content()] : [content]) : children;\n      return mergedChildren && h(\"div\", {\n        class: [`${mergedClsPrefix}-card__content`, this.contentClass],\n        style: this.contentStyle,\n        role: \"none\"\n      }, mergedChildren);\n    }), resolveWrappedSlot($slots.footer, children => {\n      const mergedChildren = this.footer ? ensureValidVNode([this.footer()]) : children;\n      return mergedChildren && h(\"div\", {\n        class: [`${mergedClsPrefix}-card__footer`, this.footerClass],\n        style: this.footerStyle,\n        role: \"none\"\n      }, mergedChildren);\n    }), resolveWrappedSlot($slots.action, children => {\n      const mergedChildren = this.action ? ensureValidVNode([this.action()]) : children;\n      return mergedChildren && h(\"div\", {\n        class: `${mergedClsPrefix}-card__action`,\n        role: \"none\"\n      }, mergedChildren);\n    }));\n  }\n});","import { commonLight } from \"../../_styles/common/index.mjs\";\nexport function self() {\n  return {\n    dotSize: '8px',\n    dotColor: 'rgba(255, 255, 255, .3)',\n    dotColorActive: 'rgba(255, 255, 255, 1)',\n    dotColorFocus: 'rgba(255, 255, 255, .5)',\n    dotLineWidth: '16px',\n    dotLineWidthActive: '24px',\n    arrowColor: '#eee'\n  };\n}\nconst carouselLight = {\n  name: 'Carousel',\n  common: commonLight,\n  self\n};\nexport default carouselLight;","import { commonDark } from \"../../_styles/common/index.mjs\";\nimport { self } from \"./light.mjs\";\nconst carouselDark = {\n  name: 'Carousel',\n  common: commonDark,\n  self\n};\nexport default carouselDark;","export default {\n  sizeSmall: '14px',\n  sizeMedium: '16px',\n  sizeLarge: '18px',\n  labelPadding: '0 8px',\n  labelFontWeight: '400'\n};","import { changeColor } from 'seemly';\nimport { commonLight } from \"../../_styles/common/index.mjs\";\nimport commonVariables from \"./_common.mjs\";\nexport function self(vars) {\n  const {\n    baseColor,\n    inputColorDisabled,\n    cardColor,\n    modalColor,\n    popoverColor,\n    textColorDisabled,\n    borderColor,\n    primaryColor,\n    textColor2,\n    fontSizeSmall,\n    fontSizeMedium,\n    fontSizeLarge,\n    borderRadiusSmall,\n    lineHeight\n  } = vars;\n  return Object.assign(Object.assign({}, commonVariables), {\n    labelLineHeight: lineHeight,\n    fontSizeSmall,\n    fontSizeMedium,\n    fontSizeLarge,\n    borderRadius: borderRadiusSmall,\n    color: baseColor,\n    colorChecked: primaryColor,\n    colorDisabled: inputColorDisabled,\n    colorDisabledChecked: inputColorDisabled,\n    colorTableHeader: cardColor,\n    colorTableHeaderModal: modalColor,\n    colorTableHeaderPopover: popoverColor,\n    checkMarkColor: baseColor,\n    checkMarkColorDisabled: textColorDisabled,\n    checkMarkColorDisabledChecked: textColorDisabled,\n    border: `1px solid ${borderColor}`,\n    borderDisabled: `1px solid ${borderColor}`,\n    borderDisabledChecked: `1px solid ${borderColor}`,\n    borderChecked: `1px solid ${primaryColor}`,\n    borderFocus: `1px solid ${primaryColor}`,\n    boxShadowFocus: `0 0 0 2px ${changeColor(primaryColor, {\n      alpha: 0.3\n    })}`,\n    textColor: textColor2,\n    textColorDisabled\n  });\n}\nconst checkboxLight = {\n  name: 'Checkbox',\n  common: commonLight,\n  self\n};\nexport default checkboxLight;","import { commonDark } from \"../../_styles/common/index.mjs\";\nimport { self } from \"./light.mjs\";\nconst checkboxDark = {\n  name: 'Checkbox',\n  common: commonDark,\n  self(vars) {\n    const {\n      cardColor\n    } = vars;\n    const commonSelf = self(vars);\n    commonSelf.color = '#0000';\n    commonSelf.checkMarkColor = cardColor;\n    return commonSelf;\n  }\n};\nexport default checkboxDark;","import { scrollbarLight } from \"../../_internal/scrollbar/styles/index.mjs\";\nimport { internalSelectMenuLight } from \"../../_internal/select-menu/styles/index.mjs\";\nimport { internalSelectionLight } from \"../../_internal/selection/styles/index.mjs\";\nimport { createTheme } from \"../../_mixins/index.mjs\";\nimport { commonLight } from \"../../_styles/common/index.mjs\";\nimport { checkboxLight } from \"../../checkbox/styles/index.mjs\";\nimport { emptyLight } from \"../../empty/styles/index.mjs\";\nexport function self(vars) {\n  const {\n    borderRadius,\n    boxShadow2,\n    popoverColor,\n    textColor2,\n    textColor3,\n    primaryColor,\n    textColorDisabled,\n    dividerColor,\n    hoverColor,\n    fontSizeMedium,\n    heightMedium\n  } = vars;\n  return {\n    menuBorderRadius: borderRadius,\n    menuColor: popoverColor,\n    menuBoxShadow: boxShadow2,\n    menuDividerColor: dividerColor,\n    menuHeight: 'calc(var(--n-option-height) * 6.6)',\n    optionArrowColor: textColor3,\n    optionHeight: heightMedium,\n    optionFontSize: fontSizeMedium,\n    optionColorHover: hoverColor,\n    optionTextColor: textColor2,\n    optionTextColorActive: primaryColor,\n    optionTextColorDisabled: textColorDisabled,\n    optionCheckMarkColor: primaryColor,\n    loadingColor: primaryColor,\n    columnWidth: '180px'\n  };\n}\nconst cascaderLight = createTheme({\n  name: 'Cascader',\n  common: commonLight,\n  peers: {\n    InternalSelectMenu: internalSelectMenuLight,\n    InternalSelection: internalSelectionLight,\n    Scrollbar: scrollbarLight,\n    Checkbox: checkboxLight,\n    Empty: emptyLight\n  },\n  self\n});\nexport default cascaderLight;","import { scrollbarDark } from \"../../_internal/scrollbar/styles/index.mjs\";\nimport { internalSelectMenuDark } from \"../../_internal/select-menu/styles/index.mjs\";\nimport { internalSelectionDark } from \"../../_internal/selection/styles/index.mjs\";\nimport { commonDark } from \"../../_styles/common/index.mjs\";\nimport { checkboxDark } from \"../../checkbox/styles/index.mjs\";\nimport { emptyLight } from \"../../empty/styles/index.mjs\";\nimport { self } from \"./light.mjs\";\nconst cascaderDark = {\n  name: 'Cascader',\n  common: commonDark,\n  peers: {\n    InternalSelectMenu: internalSelectMenuDark,\n    InternalSelection: internalSelectionDark,\n    Scrollbar: scrollbarDark,\n    Checkbox: checkboxDark,\n    Empty: emptyLight\n  },\n  self\n};\nexport default cascaderDark;","import { commonDark } from \"../../_styles/common/index.mjs\";\nconst codeDark = {\n  name: 'Code',\n  common: commonDark,\n  self(vars) {\n    const {\n      textColor2,\n      fontSize,\n      fontWeightStrong,\n      textColor3\n    } = vars;\n    return {\n      textColor: textColor2,\n      fontSize,\n      fontWeightStrong,\n      // extracted from hljs atom-one-dark.scss\n      'mono-3': '#5c6370',\n      'hue-1': '#56b6c2',\n      'hue-2': '#61aeee',\n      'hue-3': '#c678dd',\n      'hue-4': '#98c379',\n      'hue-5': '#e06c75',\n      'hue-5-2': '#be5046',\n      'hue-6': '#d19a66',\n      'hue-6-2': '#e6c07b',\n      // line-number styles\n      lineNumberTextColor: textColor3\n    };\n  }\n};\nexport default codeDark;","import { commonLight } from \"../../_styles/common/index.mjs\";\nexport function self(vars) {\n  const {\n    fontWeight,\n    textColor1,\n    textColor2,\n    textColorDisabled,\n    dividerColor,\n    fontSize\n  } = vars;\n  return {\n    titleFontSize: fontSize,\n    titleFontWeight: fontWeight,\n    dividerColor,\n    titleTextColor: textColor1,\n    titleTextColorDisabled: textColorDisabled,\n    fontSize,\n    textColor: textColor2,\n    arrowColor: textColor2,\n    arrowColorDisabled: textColorDisabled,\n    itemMargin: '16px 0 0 0',\n    titlePadding: '16px 0 0 0'\n  };\n}\nconst collapseLight = {\n  name: 'Collapse',\n  common: commonLight,\n  self\n};\nexport default collapseLight;","import { commonDark } from \"../../_styles/common/index.mjs\";\nimport { self } from \"./light.mjs\";\nconst collapseDark = {\n  name: 'Collapse',\n  common: commonDark,\n  self\n};\nexport default collapseDark;","import { commonLight } from \"../../_styles/common/index.mjs\";\nexport function self(vars) {\n  const {\n    cubicBezierEaseInOut\n  } = vars;\n  return {\n    bezier: cubicBezierEaseInOut\n  };\n}\nconst collapseTransitionLight = {\n  name: 'CollapseTransition',\n  common: commonLight,\n  self\n};\nexport default collapseTransitionLight;","import { commonDark } from \"../../_styles/common/index.mjs\";\nimport { self } from \"./light.mjs\";\nconst collapseTransitionDark = {\n  name: 'CollapseTransition',\n  common: commonDark,\n  self\n};\nexport default collapseTransitionDark;","import { createTheme } from \"../../_mixins/use-theme.mjs\";\nimport { commonLight } from \"../../_styles/common/index.mjs\";\nimport { buttonLight } from \"../../button/styles/index.mjs\";\nimport { inputLight } from \"../../input/styles/index.mjs\";\nexport function self(vars) {\n  const {\n    fontSize,\n    boxShadow2,\n    popoverColor,\n    textColor2,\n    borderRadius,\n    borderColor,\n    heightSmall,\n    heightMedium,\n    heightLarge,\n    fontSizeSmall,\n    fontSizeMedium,\n    fontSizeLarge,\n    dividerColor\n  } = vars;\n  return {\n    panelFontSize: fontSize,\n    boxShadow: boxShadow2,\n    color: popoverColor,\n    textColor: textColor2,\n    borderRadius,\n    border: `1px solid ${borderColor}`,\n    heightSmall,\n    heightMedium,\n    heightLarge,\n    fontSizeSmall,\n    fontSizeMedium,\n    fontSizeLarge,\n    dividerColor\n  };\n}\nconst colorPickerLight = createTheme({\n  name: 'ColorPicker',\n  common: commonLight,\n  peers: {\n    Input: inputLight,\n    Button: buttonLight\n  },\n  self\n});\nexport default colorPickerLight;","import { commonDark } from \"../../_styles/common/index.mjs\";\nimport { buttonDark } from \"../../button/styles/index.mjs\";\nimport { inputDark } from \"../../input/styles/index.mjs\";\nimport { self } from \"./light.mjs\";\nconst colorPickerDark = {\n  name: 'ColorPicker',\n  common: commonDark,\n  peers: {\n    Input: inputDark,\n    Button: buttonDark\n  },\n  self\n};\nexport default colorPickerDark;","import { hash } from 'css-render';\nimport { merge } from 'lodash-es';\nimport { useMemo } from 'vooks';\nimport { computed, defineComponent, h, inject, markRaw, provide } from 'vue';\nimport { defaultClsPrefix } from \"../../_mixins/index.mjs\";\nimport { warn } from \"../../_utils/index.mjs\";\nimport { configProviderInjectionKey } from \"./context.mjs\";\nexport const configProviderProps = {\n  abstract: Boolean,\n  bordered: {\n    type: Boolean,\n    default: undefined\n  },\n  clsPrefix: String,\n  locale: Object,\n  dateLocale: Object,\n  namespace: String,\n  rtl: Array,\n  tag: {\n    type: String,\n    default: 'div'\n  },\n  hljs: Object,\n  katex: Object,\n  theme: Object,\n  themeOverrides: Object,\n  componentOptions: Object,\n  icons: Object,\n  breakpoints: Object,\n  preflightStyleDisabled: Boolean,\n  styleMountTarget: Object,\n  inlineThemeDisabled: {\n    type: Boolean,\n    default: undefined\n  },\n  // deprecated\n  as: {\n    type: String,\n    validator: () => {\n      warn('config-provider', '`as` is deprecated, please use `tag` instead.');\n      return true;\n    },\n    default: undefined\n  }\n};\nexport default defineComponent({\n  name: 'ConfigProvider',\n  alias: ['App'],\n  props: configProviderProps,\n  setup(props) {\n    const NConfigProvider = inject(configProviderInjectionKey, null);\n    const mergedThemeRef = computed(() => {\n      const {\n        theme\n      } = props;\n      if (theme === null) return undefined;\n      const inheritedTheme = NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedThemeRef.value;\n      return theme === undefined ? inheritedTheme : inheritedTheme === undefined ? theme : Object.assign({}, inheritedTheme, theme);\n    });\n    const mergedThemeOverridesRef = computed(() => {\n      const {\n        themeOverrides\n      } = props;\n      // stop inheriting themeOverrides\n      if (themeOverrides === null) return undefined;\n      // use inherited themeOverrides\n      if (themeOverrides === undefined) {\n        return NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedThemeOverridesRef.value;\n      } else {\n        const inheritedThemeOverrides = NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedThemeOverridesRef.value;\n        if (inheritedThemeOverrides === undefined) {\n          // no inherited, use self overrides\n          return themeOverrides;\n        } else {\n          // merge overrides\n          return merge({}, inheritedThemeOverrides, themeOverrides);\n        }\n      }\n    });\n    const mergedNamespaceRef = useMemo(() => {\n      const {\n        namespace\n      } = props;\n      return namespace === undefined ? NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedNamespaceRef.value : namespace;\n    });\n    const mergedBorderedRef = useMemo(() => {\n      const {\n        bordered\n      } = props;\n      return bordered === undefined ? NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedBorderedRef.value : bordered;\n    });\n    const mergedIconsRef = computed(() => {\n      const {\n        icons\n      } = props;\n      return icons === undefined ? NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedIconsRef.value : icons;\n    });\n    const mergedComponentPropsRef = computed(() => {\n      const {\n        componentOptions\n      } = props;\n      if (componentOptions !== undefined) return componentOptions;\n      return NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedComponentPropsRef.value;\n    });\n    const mergedClsPrefixRef = computed(() => {\n      const {\n        clsPrefix\n      } = props;\n      if (clsPrefix !== undefined) return clsPrefix;\n      if (NConfigProvider) return NConfigProvider.mergedClsPrefixRef.value;\n      return defaultClsPrefix;\n    });\n    const mergedRtlRef = computed(() => {\n      var _a;\n      const {\n        rtl\n      } = props;\n      if (rtl === undefined) {\n        return NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedRtlRef.value;\n      }\n      const rtlEnabledState = {};\n      for (const rtlInfo of rtl) {\n        rtlEnabledState[rtlInfo.name] = markRaw(rtlInfo);\n        (_a = rtlInfo.peers) === null || _a === void 0 ? void 0 : _a.forEach(peerRtlInfo => {\n          if (!(peerRtlInfo.name in rtlEnabledState)) {\n            rtlEnabledState[peerRtlInfo.name] = markRaw(peerRtlInfo);\n          }\n        });\n      }\n      return rtlEnabledState;\n    });\n    const mergedBreakpointsRef = computed(() => {\n      return props.breakpoints || (NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedBreakpointsRef.value);\n    });\n    const inlineThemeDisabled = props.inlineThemeDisabled || (NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.inlineThemeDisabled);\n    const preflightStyleDisabled = props.preflightStyleDisabled || (NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.preflightStyleDisabled);\n    const styleMountTarget = props.styleMountTarget || (NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.styleMountTarget);\n    const mergedThemeHashRef = computed(() => {\n      const {\n        value: theme\n      } = mergedThemeRef;\n      const {\n        value: mergedThemeOverrides\n      } = mergedThemeOverridesRef;\n      const hasThemeOverrides = mergedThemeOverrides && Object.keys(mergedThemeOverrides).length !== 0;\n      const themeName = theme === null || theme === void 0 ? void 0 : theme.name;\n      if (themeName) {\n        if (hasThemeOverrides) {\n          return `${themeName}-${hash(JSON.stringify(mergedThemeOverridesRef.value))}`;\n        }\n        return themeName;\n      } else {\n        if (hasThemeOverrides) {\n          return hash(JSON.stringify(mergedThemeOverridesRef.value));\n        }\n        return '';\n      }\n    });\n    provide(configProviderInjectionKey, {\n      mergedThemeHashRef,\n      mergedBreakpointsRef,\n      mergedRtlRef,\n      mergedIconsRef,\n      mergedComponentPropsRef,\n      mergedBorderedRef,\n      mergedNamespaceRef,\n      mergedClsPrefixRef,\n      mergedLocaleRef: computed(() => {\n        const {\n          locale\n        } = props;\n        if (locale === null) return undefined;\n        return locale === undefined ? NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedLocaleRef.value : locale;\n      }),\n      mergedDateLocaleRef: computed(() => {\n        const {\n          dateLocale\n        } = props;\n        if (dateLocale === null) return undefined;\n        return dateLocale === undefined ? NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedDateLocaleRef.value : dateLocale;\n      }),\n      mergedHljsRef: computed(() => {\n        const {\n          hljs\n        } = props;\n        return hljs === undefined ? NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedHljsRef.value : hljs;\n      }),\n      mergedKatexRef: computed(() => {\n        const {\n          katex\n        } = props;\n        return katex === undefined ? NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedKatexRef.value : katex;\n      }),\n      mergedThemeRef,\n      mergedThemeOverridesRef,\n      inlineThemeDisabled: inlineThemeDisabled || false,\n      preflightStyleDisabled: preflightStyleDisabled || false,\n      styleMountTarget\n    });\n    return {\n      mergedClsPrefix: mergedClsPrefixRef,\n      mergedBordered: mergedBorderedRef,\n      mergedNamespace: mergedNamespaceRef,\n      mergedTheme: mergedThemeRef,\n      mergedThemeOverrides: mergedThemeOverridesRef\n    };\n  },\n  render() {\n    var _a, _b, _c, _d;\n    return !this.abstract ? h(this.as || this.tag, {\n      class: `${this.mergedClsPrefix || defaultClsPrefix}-config-provider`\n    }, (_b = (_a = this.$slots).default) === null || _b === void 0 ? void 0 : _b.call(_a)) : (_d = (_c = this.$slots).default) === null || _d === void 0 ? void 0 : _d.call(_c);\n  }\n});","import { internalSelectMenuDark } from \"../../_internal/select-menu/styles/index.mjs\";\nimport { commonDark } from \"../../_styles/common/index.mjs\";\nimport { popoverDark } from \"../../popover/styles/index.mjs\";\nconst popselect = {\n  name: 'Popselect',\n  common: commonDark,\n  peers: {\n    Popover: popoverDark,\n    InternalSelectMenu: internalSelectMenuDark\n  }\n};\nexport default popselect;","import { internalSelectMenuLight } from \"../../_internal/select-menu/styles/index.mjs\";\nimport { createTheme } from \"../../_mixins/index.mjs\";\nimport { commonLight } from \"../../_styles/common/index.mjs\";\nimport { popoverLight } from \"../../popover/styles/index.mjs\";\nexport function self(vars) {\n  const {\n    boxShadow2\n  } = vars;\n  return {\n    menuBoxShadow: boxShadow2\n  };\n}\nconst popselectLight = createTheme({\n  name: 'Popselect',\n  common: commonLight,\n  peers: {\n    Popover: popoverLight,\n    InternalSelectMenu: internalSelectMenuLight\n  },\n  self\n});\nexport default popselectLight;","import { createInjectionKey } from \"../../_utils/index.mjs\";\nexport const popselectInjectionKey = createInjectionKey('n-popselect');","import { cB } from \"../../../_utils/cssr/index.mjs\";\n// --n-menu-box-shadow\nexport default cB('popselect-menu', `\n box-shadow: var(--n-menu-box-shadow);\n`);","import { happensIn } from 'seemly';\nimport { createTreeMate } from 'treemate';\nimport { computed, defineComponent, h, inject, nextTick, toRef, watch, watchEffect } from 'vue';\nimport { NInternalSelectMenu } from \"../../_internal/index.mjs\";\nimport { useConfig, useTheme, useThemeClass } from \"../../_mixins/index.mjs\";\nimport { call, keysOf, warn } from \"../../_utils/index.mjs\";\nimport { createTmOptions } from \"../../select/src/utils.mjs\";\nimport { popselectLight } from \"../styles/index.mjs\";\nimport { popselectInjectionKey } from \"./interface.mjs\";\nimport style from \"./styles/index.cssr.mjs\";\nexport const panelProps = {\n  multiple: Boolean,\n  value: {\n    type: [String, Number, Array],\n    default: null\n  },\n  cancelable: Boolean,\n  options: {\n    type: Array,\n    default: () => []\n  },\n  size: {\n    type: String,\n    default: 'medium'\n  },\n  scrollable: Boolean,\n  'onUpdate:value': [Function, Array],\n  onUpdateValue: [Function, Array],\n  onMouseenter: Function,\n  onMouseleave: Function,\n  renderLabel: Function,\n  showCheckmark: {\n    type: Boolean,\n    default: undefined\n  },\n  nodeProps: Function,\n  virtualScroll: Boolean,\n  // deprecated\n  onChange: [Function, Array]\n};\nexport const panelPropKeys = keysOf(panelProps);\nexport default defineComponent({\n  name: 'PopselectPanel',\n  props: panelProps,\n  setup(props) {\n    if (process.env.NODE_ENV !== 'production') {\n      watchEffect(() => {\n        if (props.onChange !== undefined) {\n          warn('popselect', '`on-change` is deprecated, please use `on-update:value` instead.');\n        }\n      });\n    }\n    const NPopselect = inject(popselectInjectionKey);\n    const {\n      mergedClsPrefixRef,\n      inlineThemeDisabled\n    } = useConfig(props);\n    const themeRef = useTheme('Popselect', '-pop-select', style, popselectLight, NPopselect.props, mergedClsPrefixRef);\n    const treeMateRef = computed(() => {\n      return createTreeMate(props.options, createTmOptions('value', 'children'));\n    });\n    function doUpdateValue(value, option) {\n      const {\n        onUpdateValue,\n        'onUpdate:value': _onUpdateValue,\n        onChange\n      } = props;\n      if (onUpdateValue) call(onUpdateValue, value, option);\n      if (_onUpdateValue) {\n        call(_onUpdateValue, value, option);\n      }\n      if (onChange) call(onChange, value, option);\n    }\n    function handleToggle(tmNode) {\n      toggle(tmNode.key);\n    }\n    function handleMenuMousedown(e) {\n      if (!happensIn(e, 'action') && !happensIn(e, 'empty') && !happensIn(e, 'header')) {\n        e.preventDefault();\n      }\n    }\n    function toggle(value) {\n      const {\n        value: {\n          getNode\n        }\n      } = treeMateRef;\n      if (props.multiple) {\n        if (Array.isArray(props.value)) {\n          const newValue = [];\n          const newOptions = [];\n          let shouldAddValue = true;\n          props.value.forEach(v => {\n            if (v === value) {\n              shouldAddValue = false;\n              return;\n            }\n            const tmNode = getNode(v);\n            if (tmNode) {\n              newValue.push(tmNode.key);\n              newOptions.push(tmNode.rawNode);\n            }\n          });\n          if (shouldAddValue) {\n            newValue.push(value);\n            newOptions.push(getNode(value).rawNode);\n          }\n          doUpdateValue(newValue, newOptions);\n        } else {\n          const tmNode = getNode(value);\n          if (tmNode) {\n            doUpdateValue([value], [tmNode.rawNode]);\n          }\n        }\n      } else {\n        if (props.value === value && props.cancelable) {\n          doUpdateValue(null, null);\n        } else {\n          const tmNode = getNode(value);\n          if (tmNode) {\n            doUpdateValue(value, tmNode.rawNode);\n          }\n          const {\n            'onUpdate:show': _onUpdateShow,\n            onUpdateShow\n          } = NPopselect.props;\n          if (_onUpdateShow) call(_onUpdateShow, false);\n          if (onUpdateShow) call(onUpdateShow, false);\n          NPopselect.setShow(false);\n        }\n      }\n      void nextTick(() => {\n        NPopselect.syncPosition();\n      });\n    }\n    watch(toRef(props, 'options'), () => {\n      void nextTick(() => {\n        NPopselect.syncPosition();\n      });\n    });\n    const cssVarsRef = computed(() => {\n      const {\n        self: {\n          menuBoxShadow\n        }\n      } = themeRef.value;\n      return {\n        '--n-menu-box-shadow': menuBoxShadow\n      };\n    });\n    const themeClassHandle = inlineThemeDisabled ? useThemeClass('select', undefined, cssVarsRef, NPopselect.props) : undefined;\n    return {\n      mergedTheme: NPopselect.mergedThemeRef,\n      mergedClsPrefix: mergedClsPrefixRef,\n      treeMate: treeMateRef,\n      handleToggle,\n      handleMenuMousedown,\n      cssVars: inlineThemeDisabled ? undefined : cssVarsRef,\n      themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,\n      onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender\n    };\n  },\n  render() {\n    var _a;\n    (_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this);\n    return h(NInternalSelectMenu, {\n      clsPrefix: this.mergedClsPrefix,\n      focusable: true,\n      nodeProps: this.nodeProps,\n      class: [`${this.mergedClsPrefix}-popselect-menu`, this.themeClass],\n      style: this.cssVars,\n      theme: this.mergedTheme.peers.InternalSelectMenu,\n      themeOverrides: this.mergedTheme.peerOverrides.InternalSelectMenu,\n      multiple: this.multiple,\n      treeMate: this.treeMate,\n      size: this.size,\n      value: this.value,\n      virtualScroll: this.virtualScroll,\n      scrollable: this.scrollable,\n      renderLabel: this.renderLabel,\n      onToggle: this.handleToggle,\n      onMouseenter: this.onMouseenter,\n      onMouseleave: this.onMouseenter,\n      onMousedown: this.handleMenuMousedown,\n      showCheckmark: this.showCheckmark\n    }, {\n      header: () => {\n        var _a, _b;\n        return ((_b = (_a = this.$slots).header) === null || _b === void 0 ? void 0 : _b.call(_a)) || [];\n      },\n      action: () => {\n        var _a, _b;\n        return ((_b = (_a = this.$slots).action) === null || _b === void 0 ? void 0 : _b.call(_a)) || [];\n      },\n      empty: () => {\n        var _a, _b;\n        return ((_b = (_a = this.$slots).empty) === null || _b === void 0 ? void 0 : _b.call(_a)) || [];\n      }\n    });\n  }\n});","import { defineComponent, h, provide, ref } from 'vue';\nimport { useConfig, useTheme } from \"../../_mixins/index.mjs\";\nimport { createRefSetter, keep, mergeEventHandlers, omit } from \"../../_utils/index.mjs\";\nimport { NPopover } from \"../../popover/index.mjs\";\nimport { popoverBaseProps } from \"../../popover/src/Popover.mjs\";\nimport { popselectLight } from \"../styles/index.mjs\";\nimport { popselectInjectionKey } from \"./interface.mjs\";\nimport NPopselectPanel, { panelPropKeys, panelProps } from \"./PopselectPanel.mjs\";\nexport const popselectProps = Object.assign(Object.assign(Object.assign(Object.assign({}, useTheme.props), omit(popoverBaseProps, ['showArrow', 'arrow'])), {\n  placement: Object.assign(Object.assign({}, popoverBaseProps.placement), {\n    default: 'bottom'\n  }),\n  trigger: {\n    type: String,\n    default: 'hover'\n  }\n}), panelProps);\nexport default defineComponent({\n  name: 'Popselect',\n  props: popselectProps,\n  slots: Object,\n  inheritAttrs: false,\n  __popover__: true,\n  setup(props) {\n    const {\n      mergedClsPrefixRef\n    } = useConfig(props);\n    const themeRef = useTheme('Popselect', '-popselect', undefined, popselectLight, props, mergedClsPrefixRef);\n    const popoverInstRef = ref(null);\n    function syncPosition() {\n      var _a;\n      (_a = popoverInstRef.value) === null || _a === void 0 ? void 0 : _a.syncPosition();\n    }\n    function setShow(value) {\n      var _a;\n      (_a = popoverInstRef.value) === null || _a === void 0 ? void 0 : _a.setShow(value);\n    }\n    provide(popselectInjectionKey, {\n      props,\n      mergedThemeRef: themeRef,\n      syncPosition,\n      setShow\n    });\n    const exposedMethods = {\n      syncPosition,\n      setShow\n    };\n    return Object.assign(Object.assign({}, exposedMethods), {\n      popoverInstRef,\n      mergedTheme: themeRef\n    });\n  },\n  render() {\n    const {\n      mergedTheme\n    } = this;\n    const popoverProps = {\n      theme: mergedTheme.peers.Popover,\n      themeOverrides: mergedTheme.peerOverrides.Popover,\n      builtinThemeOverrides: {\n        padding: '0'\n      },\n      ref: 'popoverInstRef',\n      internalRenderBody: (className, ref, style, onMouseenter, onMouseleave) => {\n        const {\n          $attrs\n        } = this;\n        return h(NPopselectPanel, Object.assign({}, $attrs, {\n          class: [$attrs.class, className],\n          style: [$attrs.style, ...style]\n        }, keep(this.$props, panelPropKeys), {\n          ref: createRefSetter(ref),\n          onMouseenter: mergeEventHandlers([onMouseenter, $attrs.onMouseenter]),\n          onMouseleave: mergeEventHandlers([onMouseleave, $attrs.onMouseleave])\n        }), {\n          header: () => {\n            var _a, _b;\n            return (_b = (_a = this.$slots).header) === null || _b === void 0 ? void 0 : _b.call(_a);\n          },\n          action: () => {\n            var _a, _b;\n            return (_b = (_a = this.$slots).action) === null || _b === void 0 ? void 0 : _b.call(_a);\n          },\n          empty: () => {\n            var _a, _b;\n            return (_b = (_a = this.$slots).empty) === null || _b === void 0 ? void 0 : _b.call(_a);\n          }\n        });\n      }\n    };\n    return h(NPopover, Object.assign({}, omit(this.$props, panelPropKeys), popoverProps, {\n      internalDeactivateImmediately: true\n    }), {\n      trigger: () => {\n        var _a, _b;\n        return (_b = (_a = this.$slots).default) === null || _b === void 0 ? void 0 : _b.call(_a);\n      }\n    });\n  }\n});","import { internalSelectMenuLight } from \"../../_internal/select-menu/styles/index.mjs\";\nimport { internalSelectionLight } from \"../../_internal/selection/styles/index.mjs\";\nimport { createTheme } from \"../../_mixins/index.mjs\";\nimport { commonLight } from \"../../_styles/common/index.mjs\";\nexport function self(vars) {\n  const {\n    boxShadow2\n  } = vars;\n  return {\n    menuBoxShadow: boxShadow2\n  };\n}\nconst selectLight = createTheme({\n  name: 'Select',\n  common: commonLight,\n  peers: {\n    InternalSelection: internalSelectionLight,\n    InternalSelectMenu: internalSelectMenuLight\n  },\n  self\n});\nexport default selectLight;","import { internalSelectMenuDark } from \"../../_internal/select-menu/styles/index.mjs\";\nimport { internalSelectionDark } from \"../../_internal/selection/styles/index.mjs\";\nimport { commonDark } from \"../../_styles/common/index.mjs\";\nimport { self } from \"./light.mjs\";\nconst selectDark = {\n  name: 'Select',\n  common: commonDark,\n  peers: {\n    InternalSelection: internalSelectionDark,\n    InternalSelectMenu: internalSelectMenuDark\n  },\n  self\n};\nexport default selectDark;","import { fadeInScaleUpTransition } from \"../../../_styles/transitions/fade-in-scale-up.cssr.mjs\";\nimport { c, cB } from \"../../../_utils/cssr/index.mjs\";\n// --n-menu-box-shadow\nexport default c([cB('select', `\n z-index: auto;\n outline: none;\n width: 100%;\n position: relative;\n font-weight: var(--n-font-weight);\n `), cB('select-menu', `\n margin: 4px 0;\n box-shadow: var(--n-menu-box-shadow);\n `, [fadeInScaleUpTransition({\n  originalTransition: 'background-color .3s var(--n-bezier), box-shadow .3s var(--n-bezier)'\n})])]);","import { getPreciseEventTarget, happensIn } from 'seemly';\nimport { createTreeMate } from 'treemate';\nimport { clickoutside } from 'vdirs';\nimport { useCompitable, useIsMounted, useMergedState } from 'vooks';\nimport { computed, defineComponent, h, ref, toRef, Transition, vShow, watch, watchEffect, withDirectives } from 'vue';\nimport { VBinder, VFollower, VTarget } from 'vueuc';\nimport { NInternalSelection, NInternalSelectMenu } from \"../../_internal/index.mjs\";\nimport { useConfig, useFormItem, useLocale, useTheme, useThemeClass } from \"../../_mixins/index.mjs\";\nimport { call, markEventEffectPerformed, useAdjustedTo, warnOnce } from \"../../_utils/index.mjs\";\nimport { selectLight } from \"../styles/index.mjs\";\nimport style from \"./styles/index.cssr.mjs\";\nimport { createTmOptions, createValOptMap, filterOptions, patternMatched } from \"./utils.mjs\";\nexport const selectProps = Object.assign(Object.assign({}, useTheme.props), {\n  to: useAdjustedTo.propTo,\n  bordered: {\n    type: Boolean,\n    default: undefined\n  },\n  clearable: Boolean,\n  clearFilterAfterSelect: {\n    type: Boolean,\n    default: true\n  },\n  options: {\n    type: Array,\n    default: () => []\n  },\n  defaultValue: {\n    type: [String, Number, Array],\n    default: null\n  },\n  keyboard: {\n    type: Boolean,\n    default: true\n  },\n  value: [String, Number, Array],\n  placeholder: String,\n  menuProps: Object,\n  multiple: Boolean,\n  size: String,\n  menuSize: {\n    type: String\n  },\n  filterable: Boolean,\n  disabled: {\n    type: Boolean,\n    default: undefined\n  },\n  remote: Boolean,\n  loading: Boolean,\n  filter: Function,\n  placement: {\n    type: String,\n    default: 'bottom-start'\n  },\n  widthMode: {\n    type: String,\n    default: 'trigger'\n  },\n  tag: Boolean,\n  onCreate: Function,\n  fallbackOption: {\n    type: [Function, Boolean],\n    default: undefined\n  },\n  show: {\n    type: Boolean,\n    default: undefined\n  },\n  showArrow: {\n    type: Boolean,\n    default: true\n  },\n  maxTagCount: [Number, String],\n  ellipsisTagPopoverProps: Object,\n  consistentMenuWidth: {\n    type: Boolean,\n    default: true\n  },\n  virtualScroll: {\n    type: Boolean,\n    default: true\n  },\n  labelField: {\n    type: String,\n    default: 'label'\n  },\n  valueField: {\n    type: String,\n    default: 'value'\n  },\n  childrenField: {\n    type: String,\n    default: 'children'\n  },\n  renderLabel: Function,\n  renderOption: Function,\n  renderTag: Function,\n  'onUpdate:value': [Function, Array],\n  inputProps: Object,\n  nodeProps: Function,\n  ignoreComposition: {\n    type: Boolean,\n    default: true\n  },\n  showOnFocus: Boolean,\n  // for jsx\n  onUpdateValue: [Function, Array],\n  onBlur: [Function, Array],\n  onClear: [Function, Array],\n  onFocus: [Function, Array],\n  onScroll: [Function, Array],\n  onSearch: [Function, Array],\n  onUpdateShow: [Function, Array],\n  'onUpdate:show': [Function, Array],\n  displayDirective: {\n    type: String,\n    default: 'show'\n  },\n  resetMenuOnOptionsChange: {\n    type: Boolean,\n    default: true\n  },\n  status: String,\n  showCheckmark: {\n    type: Boolean,\n    default: true\n  },\n  /** deprecated */\n  onChange: [Function, Array],\n  items: Array\n});\nexport default defineComponent({\n  name: 'Select',\n  props: selectProps,\n  slots: Object,\n  setup(props) {\n    if (process.env.NODE_ENV !== 'production') {\n      watchEffect(() => {\n        if (props.items !== undefined) {\n          warnOnce('select', '`items` is deprecated, please use `options` instead.');\n        }\n        if (props.onChange !== undefined) {\n          warnOnce('select', '`on-change` is deprecated, please use `on-update:value` instead.');\n        }\n      });\n    }\n    const {\n      mergedClsPrefixRef,\n      mergedBorderedRef,\n      namespaceRef,\n      inlineThemeDisabled\n    } = useConfig(props);\n    const themeRef = useTheme('Select', '-select', style, selectLight, props, mergedClsPrefixRef);\n    const uncontrolledValueRef = ref(props.defaultValue);\n    const controlledValueRef = toRef(props, 'value');\n    const mergedValueRef = useMergedState(controlledValueRef, uncontrolledValueRef);\n    const focusedRef = ref(false);\n    const patternRef = ref('');\n    const compitableOptionsRef = useCompitable(props, ['items', 'options']);\n    const createdOptionsRef = ref([]);\n    const beingCreatedOptionsRef = ref([]);\n    const localOptionsRef = computed(() => {\n      return beingCreatedOptionsRef.value.concat(createdOptionsRef.value).concat(compitableOptionsRef.value);\n    });\n    const resolvedFilterRef = computed(() => {\n      const {\n        filter\n      } = props;\n      if (filter) return filter;\n      const {\n        labelField,\n        valueField\n      } = props;\n      return (pattern, option) => {\n        if (!option) return false;\n        const label = option[labelField];\n        if (typeof label === 'string') {\n          return patternMatched(pattern, label);\n        }\n        const value = option[valueField];\n        if (typeof value === 'string') {\n          return patternMatched(pattern, value);\n        }\n        if (typeof value === 'number') {\n          return patternMatched(pattern, String(value));\n        }\n        return false;\n      };\n    });\n    const filteredOptionsRef = computed(() => {\n      if (props.remote) {\n        return compitableOptionsRef.value;\n      } else {\n        const {\n          value: localOptions\n        } = localOptionsRef;\n        const {\n          value: pattern\n        } = patternRef;\n        if (!pattern.length || !props.filterable) {\n          return localOptions;\n        } else {\n          return filterOptions(localOptions, resolvedFilterRef.value, pattern, props.childrenField);\n        }\n      }\n    });\n    const treeMateRef = computed(() => {\n      const {\n        valueField,\n        childrenField\n      } = props;\n      const options = createTmOptions(valueField, childrenField);\n      return createTreeMate(filteredOptionsRef.value, options);\n    });\n    const valOptMapRef = computed(() => createValOptMap(localOptionsRef.value, props.valueField, props.childrenField));\n    const uncontrolledShowRef = ref(false);\n    const mergedShowRef = useMergedState(toRef(props, 'show'), uncontrolledShowRef);\n    const triggerRef = ref(null);\n    const followerRef = ref(null);\n    const menuRef = ref(null);\n    const {\n      localeRef\n    } = useLocale('Select');\n    const localizedPlaceholderRef = computed(() => {\n      var _a;\n      return (_a = props.placeholder) !== null && _a !== void 0 ? _a : localeRef.value.placeholder;\n    });\n    const emptyArray = [];\n    const memoValOptMapRef = ref(new Map());\n    const wrappedFallbackOptionRef = computed(() => {\n      const {\n        fallbackOption\n      } = props;\n      if (fallbackOption === undefined) {\n        const {\n          labelField,\n          valueField\n        } = props;\n        return value => ({\n          [labelField]: String(value),\n          [valueField]: value\n        });\n      }\n      if (fallbackOption === false) return false;\n      return value => {\n        return Object.assign(fallbackOption(value), {\n          value\n        });\n      };\n    });\n    function getMergedOptions(values) {\n      const remote = props.remote;\n      const {\n        value: memoValOptMap\n      } = memoValOptMapRef;\n      const {\n        value: valOptMap\n      } = valOptMapRef;\n      const {\n        value: wrappedFallbackOption\n      } = wrappedFallbackOptionRef;\n      const options = [];\n      values.forEach(value => {\n        if (valOptMap.has(value)) {\n          options.push(valOptMap.get(value));\n        } else if (remote && memoValOptMap.has(value)) {\n          options.push(memoValOptMap.get(value));\n        } else if (wrappedFallbackOption) {\n          const option = wrappedFallbackOption(value);\n          if (option) {\n            options.push(option);\n          }\n        }\n      });\n      return options;\n    }\n    const selectedOptionsRef = computed(() => {\n      if (props.multiple) {\n        const {\n          value: values\n        } = mergedValueRef;\n        if (!Array.isArray(values)) return [];\n        return getMergedOptions(values);\n      }\n      return null;\n    });\n    const selectedOptionRef = computed(() => {\n      const {\n        value: mergedValue\n      } = mergedValueRef;\n      if (!props.multiple && !Array.isArray(mergedValue)) {\n        if (mergedValue === null) return null;\n        return getMergedOptions([mergedValue])[0] || null;\n      }\n      return null;\n    });\n    const formItem = useFormItem(props);\n    const {\n      mergedSizeRef,\n      mergedDisabledRef,\n      mergedStatusRef\n    } = formItem;\n    function doUpdateValue(value, option) {\n      const {\n        onChange,\n        'onUpdate:value': _onUpdateValue,\n        onUpdateValue\n      } = props;\n      const {\n        nTriggerFormChange,\n        nTriggerFormInput\n      } = formItem;\n      if (onChange) call(onChange, value, option);\n      if (onUpdateValue) call(onUpdateValue, value, option);\n      if (_onUpdateValue) {\n        call(_onUpdateValue, value, option);\n      }\n      uncontrolledValueRef.value = value;\n      nTriggerFormChange();\n      nTriggerFormInput();\n    }\n    function doBlur(e) {\n      const {\n        onBlur\n      } = props;\n      const {\n        nTriggerFormBlur\n      } = formItem;\n      if (onBlur) call(onBlur, e);\n      nTriggerFormBlur();\n    }\n    function doClear() {\n      const {\n        onClear\n      } = props;\n      if (onClear) call(onClear);\n    }\n    function doFocus(e) {\n      const {\n        onFocus,\n        showOnFocus\n      } = props;\n      const {\n        nTriggerFormFocus\n      } = formItem;\n      if (onFocus) call(onFocus, e);\n      nTriggerFormFocus();\n      if (showOnFocus) {\n        openMenu();\n      }\n    }\n    function doSearch(value) {\n      const {\n        onSearch\n      } = props;\n      if (onSearch) call(onSearch, value);\n    }\n    function doScroll(e) {\n      const {\n        onScroll\n      } = props;\n      if (onScroll) call(onScroll, e);\n    }\n    // remote related methods\n    function updateMemorizedOptions() {\n      var _a;\n      const {\n        remote,\n        multiple\n      } = props;\n      if (remote) {\n        const {\n          value: memoValOptMap\n        } = memoValOptMapRef;\n        if (multiple) {\n          const {\n            valueField\n          } = props;\n          (_a = selectedOptionsRef.value) === null || _a === void 0 ? void 0 : _a.forEach(option => {\n            memoValOptMap.set(option[valueField], option);\n          });\n        } else {\n          const option = selectedOptionRef.value;\n          if (option) {\n            memoValOptMap.set(option[props.valueField], option);\n          }\n        }\n      }\n    }\n    // menu related methods\n    function doUpdateShow(value) {\n      const {\n        onUpdateShow,\n        'onUpdate:show': _onUpdateShow\n      } = props;\n      if (onUpdateShow) call(onUpdateShow, value);\n      if (_onUpdateShow) call(_onUpdateShow, value);\n      uncontrolledShowRef.value = value;\n    }\n    function openMenu() {\n      if (!mergedDisabledRef.value) {\n        doUpdateShow(true);\n        uncontrolledShowRef.value = true;\n        if (props.filterable) {\n          focusSelectionInput();\n        }\n      }\n    }\n    function closeMenu() {\n      doUpdateShow(false);\n    }\n    function handleMenuAfterLeave() {\n      patternRef.value = '';\n      beingCreatedOptionsRef.value = emptyArray;\n    }\n    const activeWithoutMenuOpenRef = ref(false);\n    function onTriggerInputFocus() {\n      if (props.filterable) {\n        activeWithoutMenuOpenRef.value = true;\n      }\n    }\n    function onTriggerInputBlur() {\n      if (props.filterable) {\n        activeWithoutMenuOpenRef.value = false;\n        if (!mergedShowRef.value) {\n          handleMenuAfterLeave();\n        }\n      }\n    }\n    function handleTriggerClick() {\n      if (mergedDisabledRef.value) return;\n      if (!mergedShowRef.value) {\n        openMenu();\n      } else {\n        if (!props.filterable) {\n          // already focused, don't need to return focus\n          closeMenu();\n        } else {\n          focusSelectionInput();\n        }\n      }\n    }\n    function handleTriggerBlur(e) {\n      var _a, _b;\n      if ((_b = (_a = menuRef.value) === null || _a === void 0 ? void 0 : _a.selfRef) === null || _b === void 0 ? void 0 : _b.contains(e.relatedTarget)) {\n        return;\n      }\n      focusedRef.value = false;\n      doBlur(e);\n      // outside select, don't need to return focus\n      closeMenu();\n    }\n    function handleTriggerFocus(e) {\n      doFocus(e);\n      focusedRef.value = true;\n    }\n    function handleMenuFocus() {\n      focusedRef.value = true;\n    }\n    function handleMenuBlur(e) {\n      var _a;\n      if ((_a = triggerRef.value) === null || _a === void 0 ? void 0 : _a.$el.contains(e.relatedTarget)) return;\n      focusedRef.value = false;\n      doBlur(e);\n      // outside select, don't need to return focus\n      closeMenu();\n    }\n    function handleMenuTabOut() {\n      var _a;\n      (_a = triggerRef.value) === null || _a === void 0 ? void 0 : _a.focus();\n      closeMenu();\n    }\n    function handleMenuClickOutside(e) {\n      var _a;\n      if (mergedShowRef.value) {\n        if (!((_a = triggerRef.value) === null || _a === void 0 ? void 0 : _a.$el.contains(getPreciseEventTarget(e)))) {\n          // outside select, don't need to return focus\n          closeMenu();\n        }\n      }\n    }\n    function createClearedMultipleSelectValue(value) {\n      if (!Array.isArray(value)) return [];\n      if (wrappedFallbackOptionRef.value) {\n        // if option has a fallback, I can't help user to clear some unknown value\n        return Array.from(value);\n      } else {\n        // if there's no option fallback, unappeared options are treated as invalid\n        const {\n          remote\n        } = props;\n        const {\n          value: valOptMap\n        } = valOptMapRef;\n        if (remote) {\n          const {\n            value: memoValOptMap\n          } = memoValOptMapRef;\n          return value.filter(v => valOptMap.has(v) || memoValOptMap.has(v));\n        } else {\n          return value.filter(v => valOptMap.has(v));\n        }\n      }\n    }\n    function handleToggleByTmNode(tmNode) {\n      handleToggleByOption(tmNode.rawNode);\n    }\n    function handleToggleByOption(option) {\n      if (mergedDisabledRef.value) return;\n      const {\n        tag,\n        remote,\n        clearFilterAfterSelect,\n        valueField\n      } = props;\n      if (tag && !remote) {\n        const {\n          value: beingCreatedOptions\n        } = beingCreatedOptionsRef;\n        const beingCreatedOption = beingCreatedOptions[0] || null;\n        if (beingCreatedOption) {\n          const createdOptions = createdOptionsRef.value;\n          if (!createdOptions.length) {\n            createdOptionsRef.value = [beingCreatedOption];\n          } else {\n            createdOptions.push(beingCreatedOption);\n          }\n          beingCreatedOptionsRef.value = emptyArray;\n        }\n      }\n      if (remote) {\n        memoValOptMapRef.value.set(option[valueField], option);\n      }\n      if (props.multiple) {\n        const changedValue = createClearedMultipleSelectValue(mergedValueRef.value);\n        const index = changedValue.findIndex(value => value === option[valueField]);\n        if (~index) {\n          changedValue.splice(index, 1);\n          if (tag && !remote) {\n            const createdOptionIndex = getCreatedOptionIndex(option[valueField]);\n            if (~createdOptionIndex) {\n              createdOptionsRef.value.splice(createdOptionIndex, 1);\n              if (clearFilterAfterSelect) patternRef.value = '';\n            }\n          }\n        } else {\n          changedValue.push(option[valueField]);\n          if (clearFilterAfterSelect) patternRef.value = '';\n        }\n        doUpdateValue(changedValue, getMergedOptions(changedValue));\n      } else {\n        if (tag && !remote) {\n          const createdOptionIndex = getCreatedOptionIndex(option[valueField]);\n          if (~createdOptionIndex) {\n            createdOptionsRef.value = [createdOptionsRef.value[createdOptionIndex]];\n          } else {\n            createdOptionsRef.value = emptyArray;\n          }\n        }\n        focusSelection();\n        closeMenu();\n        doUpdateValue(option[valueField], option);\n      }\n    }\n    function getCreatedOptionIndex(optionValue) {\n      const createdOptions = createdOptionsRef.value;\n      return createdOptions.findIndex(createdOption => createdOption[props.valueField] === optionValue);\n    }\n    function handlePatternInput(e) {\n      if (!mergedShowRef.value) {\n        openMenu();\n      }\n      const {\n        value\n      } = e.target;\n      patternRef.value = value;\n      const {\n        tag,\n        remote\n      } = props;\n      doSearch(value);\n      if (tag && !remote) {\n        if (!value) {\n          beingCreatedOptionsRef.value = emptyArray;\n          return;\n        }\n        const {\n          onCreate\n        } = props;\n        const optionBeingCreated = onCreate ? onCreate(value) : {\n          [props.labelField]: value,\n          [props.valueField]: value\n        };\n        const {\n          valueField,\n          labelField\n        } = props;\n        if (compitableOptionsRef.value.some(option => {\n          return option[valueField] === optionBeingCreated[valueField] || option[labelField] === optionBeingCreated[labelField];\n        }) || createdOptionsRef.value.some(option => {\n          return option[valueField] === optionBeingCreated[valueField] || option[labelField] === optionBeingCreated[labelField];\n        })) {\n          beingCreatedOptionsRef.value = emptyArray;\n        } else {\n          beingCreatedOptionsRef.value = [optionBeingCreated];\n        }\n      }\n    }\n    function handleClear(e) {\n      e.stopPropagation();\n      const {\n        multiple\n      } = props;\n      if (!multiple && props.filterable) {\n        closeMenu();\n      }\n      doClear();\n      if (multiple) {\n        doUpdateValue([], []);\n      } else {\n        doUpdateValue(null, null);\n      }\n    }\n    function handleMenuMousedown(e) {\n      if (!happensIn(e, 'action') && !happensIn(e, 'empty') && !happensIn(e, 'header')) {\n        e.preventDefault();\n      }\n    }\n    // scroll events on menu\n    function handleMenuScroll(e) {\n      doScroll(e);\n    }\n    // keyboard events\n    // also for menu keydown\n    function handleKeydown(e) {\n      var _a, _b, _c, _d, _e;\n      if (!props.keyboard) {\n        e.preventDefault();\n        return;\n      }\n      switch (e.key) {\n        case ' ':\n          if (props.filterable) {\n            break;\n          } else {\n            e.preventDefault();\n          }\n        // eslint-disable-next-line no-fallthrough\n        case 'Enter':\n          if (!((_a = triggerRef.value) === null || _a === void 0 ? void 0 : _a.isComposing)) {\n            if (mergedShowRef.value) {\n              const pendingTmNode = (_b = menuRef.value) === null || _b === void 0 ? void 0 : _b.getPendingTmNode();\n              if (pendingTmNode) {\n                handleToggleByTmNode(pendingTmNode);\n              } else if (!props.filterable) {\n                closeMenu();\n                focusSelection();\n              }\n            } else {\n              openMenu();\n              if (props.tag && activeWithoutMenuOpenRef.value) {\n                const beingCreatedOption = beingCreatedOptionsRef.value[0];\n                if (beingCreatedOption) {\n                  const optionValue = beingCreatedOption[props.valueField];\n                  const {\n                    value: mergedValue\n                  } = mergedValueRef;\n                  if (props.multiple) {\n                    if (Array.isArray(mergedValue) && mergedValue.includes(optionValue)) {\n                      // do nothing\n                    } else {\n                      handleToggleByOption(beingCreatedOption);\n                    }\n                  } else {\n                    handleToggleByOption(beingCreatedOption);\n                  }\n                }\n              }\n            }\n          }\n          e.preventDefault();\n          break;\n        case 'ArrowUp':\n          e.preventDefault();\n          if (props.loading) return;\n          if (mergedShowRef.value) {\n            (_c = menuRef.value) === null || _c === void 0 ? void 0 : _c.prev();\n          }\n          break;\n        case 'ArrowDown':\n          e.preventDefault();\n          if (props.loading) return;\n          if (mergedShowRef.value) {\n            (_d = menuRef.value) === null || _d === void 0 ? void 0 : _d.next();\n          } else {\n            openMenu();\n          }\n          break;\n        case 'Escape':\n          if (mergedShowRef.value) {\n            markEventEffectPerformed(e);\n            closeMenu();\n          }\n          (_e = triggerRef.value) === null || _e === void 0 ? void 0 : _e.focus();\n          break;\n      }\n    }\n    function focusSelection() {\n      var _a;\n      (_a = triggerRef.value) === null || _a === void 0 ? void 0 : _a.focus();\n    }\n    function focusSelectionInput() {\n      var _a;\n      (_a = triggerRef.value) === null || _a === void 0 ? void 0 : _a.focusInput();\n    }\n    function handleTriggerOrMenuResize() {\n      var _a;\n      if (!mergedShowRef.value) return;\n      (_a = followerRef.value) === null || _a === void 0 ? void 0 : _a.syncPosition();\n    }\n    updateMemorizedOptions();\n    watch(toRef(props, 'options'), updateMemorizedOptions);\n    const exposedMethods = {\n      focus: () => {\n        var _a;\n        (_a = triggerRef.value) === null || _a === void 0 ? void 0 : _a.focus();\n      },\n      focusInput: () => {\n        var _a;\n        (_a = triggerRef.value) === null || _a === void 0 ? void 0 : _a.focusInput();\n      },\n      blur: () => {\n        var _a;\n        (_a = triggerRef.value) === null || _a === void 0 ? void 0 : _a.blur();\n      },\n      blurInput: () => {\n        var _a;\n        (_a = triggerRef.value) === null || _a === void 0 ? void 0 : _a.blurInput();\n      }\n    };\n    const cssVarsRef = computed(() => {\n      const {\n        self: {\n          menuBoxShadow\n        }\n      } = themeRef.value;\n      return {\n        '--n-menu-box-shadow': menuBoxShadow\n      };\n    });\n    const themeClassHandle = inlineThemeDisabled ? useThemeClass('select', undefined, cssVarsRef, props) : undefined;\n    return Object.assign(Object.assign({}, exposedMethods), {\n      mergedStatus: mergedStatusRef,\n      mergedClsPrefix: mergedClsPrefixRef,\n      mergedBordered: mergedBorderedRef,\n      namespace: namespaceRef,\n      treeMate: treeMateRef,\n      isMounted: useIsMounted(),\n      triggerRef,\n      menuRef,\n      pattern: patternRef,\n      uncontrolledShow: uncontrolledShowRef,\n      mergedShow: mergedShowRef,\n      adjustedTo: useAdjustedTo(props),\n      uncontrolledValue: uncontrolledValueRef,\n      mergedValue: mergedValueRef,\n      followerRef,\n      localizedPlaceholder: localizedPlaceholderRef,\n      selectedOption: selectedOptionRef,\n      selectedOptions: selectedOptionsRef,\n      mergedSize: mergedSizeRef,\n      mergedDisabled: mergedDisabledRef,\n      focused: focusedRef,\n      activeWithoutMenuOpen: activeWithoutMenuOpenRef,\n      inlineThemeDisabled,\n      onTriggerInputFocus,\n      onTriggerInputBlur,\n      handleTriggerOrMenuResize,\n      handleMenuFocus,\n      handleMenuBlur,\n      handleMenuTabOut,\n      handleTriggerClick,\n      handleToggle: handleToggleByTmNode,\n      handleDeleteOption: handleToggleByOption,\n      handlePatternInput,\n      handleClear,\n      handleTriggerBlur,\n      handleTriggerFocus,\n      handleKeydown,\n      handleMenuAfterLeave,\n      handleMenuClickOutside,\n      handleMenuScroll,\n      handleMenuKeydown: handleKeydown,\n      handleMenuMousedown,\n      mergedTheme: themeRef,\n      cssVars: inlineThemeDisabled ? undefined : cssVarsRef,\n      themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,\n      onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender\n    });\n  },\n  render() {\n    return h(\"div\", {\n      class: `${this.mergedClsPrefix}-select`\n    }, h(VBinder, null, {\n      default: () => [h(VTarget, null, {\n        default: () => h(NInternalSelection, {\n          ref: \"triggerRef\",\n          inlineThemeDisabled: this.inlineThemeDisabled,\n          status: this.mergedStatus,\n          inputProps: this.inputProps,\n          clsPrefix: this.mergedClsPrefix,\n          showArrow: this.showArrow,\n          maxTagCount: this.maxTagCount,\n          ellipsisTagPopoverProps: this.ellipsisTagPopoverProps,\n          bordered: this.mergedBordered,\n          active: this.activeWithoutMenuOpen || this.mergedShow,\n          pattern: this.pattern,\n          placeholder: this.localizedPlaceholder,\n          selectedOption: this.selectedOption,\n          selectedOptions: this.selectedOptions,\n          multiple: this.multiple,\n          renderTag: this.renderTag,\n          renderLabel: this.renderLabel,\n          filterable: this.filterable,\n          clearable: this.clearable,\n          disabled: this.mergedDisabled,\n          size: this.mergedSize,\n          theme: this.mergedTheme.peers.InternalSelection,\n          labelField: this.labelField,\n          valueField: this.valueField,\n          themeOverrides: this.mergedTheme.peerOverrides.InternalSelection,\n          loading: this.loading,\n          focused: this.focused,\n          onClick: this.handleTriggerClick,\n          onDeleteOption: this.handleDeleteOption,\n          onPatternInput: this.handlePatternInput,\n          onClear: this.handleClear,\n          onBlur: this.handleTriggerBlur,\n          onFocus: this.handleTriggerFocus,\n          onKeydown: this.handleKeydown,\n          onPatternBlur: this.onTriggerInputBlur,\n          onPatternFocus: this.onTriggerInputFocus,\n          onResize: this.handleTriggerOrMenuResize,\n          ignoreComposition: this.ignoreComposition\n        }, {\n          arrow: () => {\n            var _a, _b;\n            return [(_b = (_a = this.$slots).arrow) === null || _b === void 0 ? void 0 : _b.call(_a)];\n          }\n        })\n      }), h(VFollower, {\n        ref: \"followerRef\",\n        show: this.mergedShow,\n        to: this.adjustedTo,\n        teleportDisabled: this.adjustedTo === useAdjustedTo.tdkey,\n        containerClass: this.namespace,\n        width: this.consistentMenuWidth ? 'target' : undefined,\n        minWidth: \"target\",\n        placement: this.placement\n      }, {\n        default: () => h(Transition, {\n          name: \"fade-in-scale-up-transition\",\n          appear: this.isMounted,\n          onAfterLeave: this.handleMenuAfterLeave\n        }, {\n          default: () => {\n            var _a, _b, _c;\n            if (!(this.mergedShow || this.displayDirective === 'show')) {\n              return null;\n            }\n            (_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this);\n            return withDirectives(h(NInternalSelectMenu, Object.assign({}, this.menuProps, {\n              ref: \"menuRef\",\n              onResize: this.handleTriggerOrMenuResize,\n              inlineThemeDisabled: this.inlineThemeDisabled,\n              virtualScroll: this.consistentMenuWidth && this.virtualScroll,\n              class: [`${this.mergedClsPrefix}-select-menu`, this.themeClass, (_b = this.menuProps) === null || _b === void 0 ? void 0 : _b.class],\n              clsPrefix: this.mergedClsPrefix,\n              focusable: true,\n              labelField: this.labelField,\n              valueField: this.valueField,\n              autoPending: true,\n              nodeProps: this.nodeProps,\n              theme: this.mergedTheme.peers.InternalSelectMenu,\n              themeOverrides: this.mergedTheme.peerOverrides.InternalSelectMenu,\n              treeMate: this.treeMate,\n              multiple: this.multiple,\n              size: this.menuSize,\n              renderOption: this.renderOption,\n              renderLabel: this.renderLabel,\n              value: this.mergedValue,\n              style: [(_c = this.menuProps) === null || _c === void 0 ? void 0 : _c.style, this.cssVars],\n              onToggle: this.handleToggle,\n              onScroll: this.handleMenuScroll,\n              onFocus: this.handleMenuFocus,\n              onBlur: this.handleMenuBlur,\n              onKeydown: this.handleMenuKeydown,\n              onTabOut: this.handleMenuTabOut,\n              onMousedown: this.handleMenuMousedown,\n              show: this.mergedShow,\n              showCheckmark: this.showCheckmark,\n              resetMenuOnOptionsChange: this.resetMenuOnOptionsChange\n            }), {\n              empty: () => {\n                var _a, _b;\n                return [(_b = (_a = this.$slots).empty) === null || _b === void 0 ? void 0 : _b.call(_a)];\n              },\n              header: () => {\n                var _a, _b;\n                return [(_b = (_a = this.$slots).header) === null || _b === void 0 ? void 0 : _b.call(_a)];\n              },\n              action: () => {\n                var _a, _b;\n                return [(_b = (_a = this.$slots).action) === null || _b === void 0 ? void 0 : _b.call(_a)];\n              }\n            }), this.displayDirective === 'show' ? [[vShow, this.mergedShow], [clickoutside, this.handleMenuClickOutside, undefined, {\n              capture: true\n            }]] : [[clickoutside, this.handleMenuClickOutside, undefined, {\n              capture: true\n            }]]);\n          }\n        })\n      })]\n    }));\n  }\n});","export default {\n  itemPaddingSmall: '0 4px',\n  itemMarginSmall: '0 0 0 8px',\n  itemMarginSmallRtl: '0 8px 0 0',\n  itemPaddingMedium: '0 4px',\n  itemMarginMedium: '0 0 0 8px',\n  itemMarginMediumRtl: '0 8px 0 0',\n  itemPaddingLarge: '0 4px',\n  itemMarginLarge: '0 0 0 8px',\n  itemMarginLargeRtl: '0 8px 0 0',\n  buttonIconSizeSmall: '14px',\n  buttonIconSizeMedium: '16px',\n  buttonIconSizeLarge: '18px',\n  inputWidthSmall: '60px',\n  selectWidthSmall: 'unset',\n  inputMarginSmall: '0 0 0 8px',\n  inputMarginSmallRtl: '0 8px 0 0',\n  selectMarginSmall: '0 0 0 8px',\n  prefixMarginSmall: '0 8px 0 0',\n  suffixMarginSmall: '0 0 0 8px',\n  inputWidthMedium: '60px',\n  selectWidthMedium: 'unset',\n  inputMarginMedium: '0 0 0 8px',\n  inputMarginMediumRtl: '0 8px 0 0',\n  selectMarginMedium: '0 0 0 8px',\n  prefixMarginMedium: '0 8px 0 0',\n  suffixMarginMedium: '0 0 0 8px',\n  inputWidthLarge: '60px',\n  selectWidthLarge: 'unset',\n  inputMarginLarge: '0 0 0 8px',\n  inputMarginLargeRtl: '0 8px 0 0',\n  selectMarginLarge: '0 0 0 8px',\n  prefixMarginLarge: '0 8px 0 0',\n  suffixMarginLarge: '0 0 0 8px'\n};","import { createTheme } from \"../../_mixins/index.mjs\";\nimport { commonLight } from \"../../_styles/common/index.mjs\";\nimport { inputLight } from \"../../input/styles/index.mjs\";\nimport { popselectLight } from \"../../popselect/styles/index.mjs\";\nimport { selectLight } from \"../../select/styles/index.mjs\";\nimport commonVariables from \"./_common.mjs\";\nexport function self(vars) {\n  const {\n    textColor2,\n    primaryColor,\n    primaryColorHover,\n    primaryColorPressed,\n    inputColorDisabled,\n    textColorDisabled,\n    borderColor,\n    borderRadius,\n    // item font size\n    fontSizeTiny,\n    fontSizeSmall,\n    fontSizeMedium,\n    // item size\n    heightTiny,\n    heightSmall,\n    heightMedium\n  } = vars;\n  return Object.assign(Object.assign({}, commonVariables), {\n    buttonColor: '#0000',\n    buttonColorHover: '#0000',\n    buttonColorPressed: '#0000',\n    buttonBorder: `1px solid ${borderColor}`,\n    buttonBorderHover: `1px solid ${borderColor}`,\n    buttonBorderPressed: `1px solid ${borderColor}`,\n    buttonIconColor: textColor2,\n    buttonIconColorHover: textColor2,\n    buttonIconColorPressed: textColor2,\n    itemTextColor: textColor2,\n    itemTextColorHover: primaryColorHover,\n    itemTextColorPressed: primaryColorPressed,\n    itemTextColorActive: primaryColor,\n    itemTextColorDisabled: textColorDisabled,\n    itemColor: '#0000',\n    itemColorHover: '#0000',\n    itemColorPressed: '#0000',\n    itemColorActive: '#0000',\n    itemColorActiveHover: '#0000',\n    itemColorDisabled: inputColorDisabled,\n    itemBorder: '1px solid #0000',\n    itemBorderHover: '1px solid #0000',\n    itemBorderPressed: '1px solid #0000',\n    itemBorderActive: `1px solid ${primaryColor}`,\n    itemBorderDisabled: `1px solid ${borderColor}`,\n    itemBorderRadius: borderRadius,\n    itemSizeSmall: heightTiny,\n    itemSizeMedium: heightSmall,\n    itemSizeLarge: heightMedium,\n    itemFontSizeSmall: fontSizeTiny,\n    itemFontSizeMedium: fontSizeSmall,\n    itemFontSizeLarge: fontSizeMedium,\n    jumperFontSizeSmall: fontSizeTiny,\n    jumperFontSizeMedium: fontSizeSmall,\n    jumperFontSizeLarge: fontSizeMedium,\n    jumperTextColor: textColor2,\n    jumperTextColorDisabled: textColorDisabled\n  });\n}\nconst paginationLight = createTheme({\n  name: 'Pagination',\n  common: commonLight,\n  peers: {\n    Select: selectLight,\n    Input: inputLight,\n    Popselect: popselectLight\n  },\n  self\n});\nexport default paginationLight;","import { changeColor } from 'seemly';\nimport { commonDark } from \"../../_styles/common/index.mjs\";\nimport { inputDark } from \"../../input/styles/index.mjs\";\nimport { popselectDark } from \"../../popselect/styles/index.mjs\";\nimport { selectDark } from \"../../select/styles/index.mjs\";\nimport { self } from \"./light.mjs\";\nconst paginationDark = {\n  name: 'Pagination',\n  common: commonDark,\n  peers: {\n    Select: selectDark,\n    Input: inputDark,\n    Popselect: popselectDark\n  },\n  self(vars) {\n    const {\n      primaryColor,\n      opacity3\n    } = vars;\n    const borderColorActive = changeColor(primaryColor, {\n      alpha: Number(opacity3)\n    });\n    const commonSelf = self(vars);\n    commonSelf.itemBorderActive = `1px solid ${borderColorActive}`;\n    commonSelf.itemBorderDisabled = '1px solid #0000';\n    return commonSelf;\n  }\n};\nexport default paginationDark;","import { c, cB, cM, cNotM } from \"../../../_utils/cssr/index.mjs\";\nconst hoverStyleProps = `\n background: var(--n-item-color-hover);\n color: var(--n-item-text-color-hover);\n border: var(--n-item-border-hover);\n`;\nconst hoverStyleChildren = [cM('button', `\n background: var(--n-button-color-hover);\n border: var(--n-button-border-hover);\n color: var(--n-button-icon-color-hover);\n `)];\n// vars:\n// --n-item-font-size\n// --n-select-width\n// --n-input-width\n// --n-input-margin\n// --n-item-size\n// --n-item-text-color\n// --n-item-text-color-disabled\n// --n-item-text-color-hover\n// --n-item-text-color-active\n// --n-item-color\n// --n-item-color-hover\n// --n-item-color-disabled\n// --n-item-color-active\n// --n-item-color-active-hover\n// --n-item-border\n// --n-item-border-hover\n// --n-item-border-disabled\n// --n-item-border-active\n// --n-item-padding\n// --n-item-font-size\n// --n-item-border-radius\n// --n-bezier\n// --n-jumper-font-size\n// --n-jumper-text-color\n// --n-jumper-text-color-disabled\n// --n-item-margin\n// --n-button-icon-size\n// --n-button-icon-color\n// --n-button-icon-color-hover\n// --n-button-icon-color-pressed\n// --n-prefix-margin\n// --n-suffix-margin\n// --n-button-color\n// --n-button-color-hover\n// --n-button-color-pressed\nexport default cB('pagination', `\n display: flex;\n vertical-align: middle;\n font-size: var(--n-item-font-size);\n flex-wrap: nowrap;\n`, [cB('pagination-prefix', `\n display: flex;\n align-items: center;\n margin: var(--n-prefix-margin);\n `), cB('pagination-suffix', `\n display: flex;\n align-items: center;\n margin: var(--n-suffix-margin);\n `), c('> *:not(:first-child)', `\n margin: var(--n-item-margin);\n `), cB('select', `\n width: var(--n-select-width);\n `), c('&.transition-disabled', [cB('pagination-item', 'transition: none!important;')]), cB('pagination-quick-jumper', `\n white-space: nowrap;\n display: flex;\n color: var(--n-jumper-text-color);\n transition: color .3s var(--n-bezier);\n align-items: center;\n font-size: var(--n-jumper-font-size);\n `, [cB('input', `\n margin: var(--n-input-margin);\n width: var(--n-input-width);\n `)]), cB('pagination-item', `\n position: relative;\n cursor: pointer;\n user-select: none;\n -webkit-user-select: none;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n min-width: var(--n-item-size);\n height: var(--n-item-size);\n padding: var(--n-item-padding);\n background-color: var(--n-item-color);\n color: var(--n-item-text-color);\n border-radius: var(--n-item-border-radius);\n border: var(--n-item-border);\n fill: var(--n-button-icon-color);\n transition:\n color .3s var(--n-bezier),\n border-color .3s var(--n-bezier),\n background-color .3s var(--n-bezier),\n fill .3s var(--n-bezier);\n `, [cM('button', `\n background: var(--n-button-color);\n color: var(--n-button-icon-color);\n border: var(--n-button-border);\n padding: 0;\n `, [cB('base-icon', `\n font-size: var(--n-button-icon-size);\n `)]), cNotM('disabled', [cM('hover', hoverStyleProps, hoverStyleChildren), c('&:hover', hoverStyleProps, hoverStyleChildren), c('&:active', `\n background: var(--n-item-color-pressed);\n color: var(--n-item-text-color-pressed);\n border: var(--n-item-border-pressed);\n `, [cM('button', `\n background: var(--n-button-color-pressed);\n border: var(--n-button-border-pressed);\n color: var(--n-button-icon-color-pressed);\n `)]), cM('active', `\n background: var(--n-item-color-active);\n color: var(--n-item-text-color-active);\n border: var(--n-item-border-active);\n `, [c('&:hover', `\n background: var(--n-item-color-active-hover);\n `)])]), cM('disabled', `\n cursor: not-allowed;\n color: var(--n-item-text-color-disabled);\n `, [cM('active, button', `\n background-color: var(--n-item-color-disabled);\n border: var(--n-item-border-disabled);\n `)])]), cM('disabled', `\n cursor: not-allowed;\n `, [cB('pagination-quick-jumper', `\n color: var(--n-jumper-text-color-disabled);\n `)]), cM('simple', `\n display: flex;\n align-items: center;\n flex-wrap: nowrap;\n `, [cB('pagination-quick-jumper', [cB('input', `\n margin: 0;\n `)])])]);","export function getDefaultPageSize(paginationProps) {\n  var _a;\n  if (!paginationProps) return 10;\n  const {\n    defaultPageSize\n  } = paginationProps;\n  if (defaultPageSize !== undefined) return defaultPageSize;\n  const pageSizeOption = (_a = paginationProps.pageSizes) === null || _a === void 0 ? void 0 : _a[0];\n  if (typeof pageSizeOption === 'number') return pageSizeOption;\n  return (pageSizeOption === null || pageSizeOption === void 0 ? void 0 : pageSizeOption.value) || 10;\n}\nfunction createPageItemsInfo(currentPage, pageCount, pageSlot, showQuickJumpDropdown) {\n  let hasFastBackward = false;\n  let hasFastForward = false;\n  let fastBackwardTo = 1;\n  let fastForwardTo = pageCount;\n  if (pageCount === 1) {\n    return {\n      hasFastBackward: false,\n      hasFastForward: false,\n      fastForwardTo,\n      fastBackwardTo,\n      items: [{\n        type: 'page',\n        label: 1,\n        active: currentPage === 1,\n        mayBeFastBackward: false,\n        mayBeFastForward: false\n      }]\n    };\n  }\n  if (pageCount === 2) {\n    return {\n      hasFastBackward: false,\n      hasFastForward: false,\n      fastForwardTo,\n      fastBackwardTo,\n      items: [{\n        type: 'page',\n        label: 1,\n        active: currentPage === 1,\n        mayBeFastBackward: false,\n        mayBeFastForward: false\n      }, {\n        type: 'page',\n        label: 2,\n        active: currentPage === 2,\n        mayBeFastBackward: true,\n        mayBeFastForward: false\n      }]\n    };\n  }\n  const firstPage = 1;\n  const lastPage = pageCount;\n  let middleStart = currentPage;\n  let middleEnd = currentPage;\n  const middleDelta = (pageSlot - 5) / 2;\n  middleEnd += Math.ceil(middleDelta);\n  middleEnd = Math.min(Math.max(middleEnd, firstPage + pageSlot - 3), lastPage - 2);\n  middleStart -= Math.floor(middleDelta);\n  middleStart = Math.max(Math.min(middleStart, lastPage - pageSlot + 3), firstPage + 2);\n  let leftSplit = false;\n  let rightSplit = false;\n  if (middleStart > firstPage + 2) leftSplit = true;\n  if (middleEnd < lastPage - 2) rightSplit = true;\n  const items = [];\n  items.push({\n    type: 'page',\n    label: 1,\n    active: currentPage === 1,\n    mayBeFastBackward: false,\n    mayBeFastForward: false\n  });\n  if (leftSplit) {\n    hasFastBackward = true;\n    fastBackwardTo = middleStart - 1;\n    items.push({\n      type: 'fast-backward',\n      active: false,\n      label: undefined,\n      options: showQuickJumpDropdown ? createRange(firstPage + 1, middleStart - 1) : null\n    });\n  } else if (lastPage >= firstPage + 1) {\n    items.push({\n      type: 'page',\n      label: firstPage + 1,\n      mayBeFastBackward: true,\n      mayBeFastForward: false,\n      active: currentPage === firstPage + 1\n    });\n  }\n  for (let i = middleStart; i <= middleEnd; ++i) {\n    items.push({\n      type: 'page',\n      label: i,\n      mayBeFastBackward: false,\n      mayBeFastForward: false,\n      active: currentPage === i\n    });\n  }\n  if (rightSplit) {\n    hasFastForward = true;\n    fastForwardTo = middleEnd + 1;\n    items.push({\n      type: 'fast-forward',\n      active: false,\n      label: undefined,\n      options: showQuickJumpDropdown ? createRange(middleEnd + 1, lastPage - 1) : null\n    });\n  } else if (middleEnd === lastPage - 2 && items[items.length - 1].label !== lastPage - 1) {\n    items.push({\n      type: 'page',\n      mayBeFastForward: true,\n      mayBeFastBackward: false,\n      label: lastPage - 1,\n      active: currentPage === lastPage - 1\n    });\n  }\n  if (items[items.length - 1].label !== lastPage) {\n    items.push({\n      type: 'page',\n      mayBeFastForward: false,\n      mayBeFastBackward: false,\n      label: lastPage,\n      active: currentPage === lastPage\n    });\n  }\n  return {\n    hasFastBackward,\n    hasFastForward,\n    fastBackwardTo,\n    fastForwardTo,\n    items\n  };\n}\nfunction createRange(from, to) {\n  const range = [];\n  for (let i = from; i <= to; ++i) {\n    range.push({\n      label: `${i}`,\n      value: i\n    });\n  }\n  return range;\n}\nexport { createPageItemsInfo };","import { useMergedState } from 'vooks';\nimport { computed, defineComponent, Fragment, h, nextTick, ref, toRef, watchEffect } from 'vue';\nimport { NBaseIcon } from \"../../_internal/index.mjs\";\nimport { BackwardIcon, FastBackwardIcon, FastForwardIcon, ForwardIcon, MoreIcon } from \"../../_internal/icons/index.mjs\";\nimport { useConfig, useLocale, useTheme, useThemeClass } from \"../../_mixins/index.mjs\";\nimport { useRtl } from \"../../_mixins/use-rtl.mjs\";\nimport { call, createKey, resolveSlot, smallerSize, useAdjustedTo, warn, warnOnce } from \"../../_utils/index.mjs\";\nimport { NInput } from \"../../input/index.mjs\";\nimport { NPopselect } from \"../../popselect/index.mjs\";\nimport { NSelect } from \"../../select/index.mjs\";\nimport { paginationLight } from \"../styles/index.mjs\";\nimport style from \"./styles/index.cssr.mjs\";\nimport { createPageItemsInfo, getDefaultPageSize } from \"./utils.mjs\";\nexport const paginationProps = Object.assign(Object.assign({}, useTheme.props), {\n  simple: Boolean,\n  page: Number,\n  defaultPage: {\n    type: Number,\n    default: 1\n  },\n  itemCount: Number,\n  pageCount: Number,\n  defaultPageCount: {\n    type: Number,\n    default: 1\n  },\n  showSizePicker: Boolean,\n  pageSize: Number,\n  defaultPageSize: Number,\n  pageSizes: {\n    type: Array,\n    default() {\n      return [10];\n    }\n  },\n  showQuickJumper: Boolean,\n  size: {\n    type: String,\n    default: 'medium'\n  },\n  disabled: Boolean,\n  pageSlot: {\n    type: Number,\n    default: 9\n  },\n  selectProps: Object,\n  prev: Function,\n  next: Function,\n  goto: Function,\n  prefix: Function,\n  suffix: Function,\n  label: Function,\n  displayOrder: {\n    type: Array,\n    default: ['pages', 'size-picker', 'quick-jumper']\n  },\n  to: useAdjustedTo.propTo,\n  showQuickJumpDropdown: {\n    type: Boolean,\n    default: true\n  },\n  'onUpdate:page': [Function, Array],\n  onUpdatePage: [Function, Array],\n  'onUpdate:pageSize': [Function, Array],\n  onUpdatePageSize: [Function, Array],\n  /** @deprecated */\n  onPageSizeChange: [Function, Array],\n  /** @deprecated */\n  onChange: [Function, Array]\n});\nexport default defineComponent({\n  name: 'Pagination',\n  props: paginationProps,\n  slots: Object,\n  setup(props) {\n    if (process.env.NODE_ENV !== 'production') {\n      watchEffect(() => {\n        if (props.pageCount !== undefined && props.itemCount !== undefined) {\n          warn('pagination', '`page-count` and `item-count` should\\'t be specified together. Only `item-count` will take effect.');\n        }\n        if (props.onPageSizeChange) {\n          warnOnce('pagination', '`on-page-size-change` is deprecated, please use `on-update:page-size` instead.');\n        }\n        if (props.onChange) {\n          warnOnce('pagination', '`on-change` is deprecated, please use `on-update:page` instead.');\n        }\n      });\n    }\n    const {\n      mergedComponentPropsRef,\n      mergedClsPrefixRef,\n      inlineThemeDisabled,\n      mergedRtlRef\n    } = useConfig(props);\n    const themeRef = useTheme('Pagination', '-pagination', style, paginationLight, props, mergedClsPrefixRef);\n    const {\n      localeRef\n    } = useLocale('Pagination');\n    const selfRef = ref(null);\n    const uncontrolledPageRef = ref(props.defaultPage);\n    const uncontrolledPageSizeRef = ref(getDefaultPageSize(props));\n    const mergedPageRef = useMergedState(toRef(props, 'page'), uncontrolledPageRef);\n    const mergedPageSizeRef = useMergedState(toRef(props, 'pageSize'), uncontrolledPageSizeRef);\n    const mergedPageCountRef = computed(() => {\n      // item count has high priority, for it can affect prefix slot rendering\n      const {\n        itemCount\n      } = props;\n      if (itemCount !== undefined) {\n        return Math.max(1, Math.ceil(itemCount / mergedPageSizeRef.value));\n      }\n      const {\n        pageCount\n      } = props;\n      if (pageCount !== undefined) return Math.max(pageCount, 1);\n      return 1;\n    });\n    const jumperValueRef = ref('');\n    watchEffect(() => {\n      void props.simple;\n      jumperValueRef.value = String(mergedPageRef.value);\n    });\n    const fastForwardActiveRef = ref(false);\n    const fastBackwardActiveRef = ref(false);\n    const showFastForwardMenuRef = ref(false);\n    const showFastBackwardMenuRef = ref(false);\n    const handleFastForwardMouseenter = () => {\n      if (props.disabled) return;\n      fastForwardActiveRef.value = true;\n      disableTransitionOneTick();\n    };\n    const handleFastForwardMouseleave = () => {\n      if (props.disabled) return;\n      fastForwardActiveRef.value = false;\n      disableTransitionOneTick();\n    };\n    const handleFastBackwardMouseenter = () => {\n      fastBackwardActiveRef.value = true;\n      disableTransitionOneTick();\n    };\n    const handleFastBackwardMouseleave = () => {\n      fastBackwardActiveRef.value = false;\n      disableTransitionOneTick();\n    };\n    const handleMenuSelect = value => {\n      doUpdatePage(value);\n    };\n    const pageItemsInfo = computed(() => createPageItemsInfo(mergedPageRef.value, mergedPageCountRef.value, props.pageSlot, props.showQuickJumpDropdown));\n    watchEffect(() => {\n      if (!pageItemsInfo.value.hasFastBackward) {\n        fastBackwardActiveRef.value = false;\n        showFastBackwardMenuRef.value = false;\n      } else if (!pageItemsInfo.value.hasFastForward) {\n        fastForwardActiveRef.value = false;\n        showFastForwardMenuRef.value = false;\n      }\n    });\n    const pageSizeOptionsRef = computed(() => {\n      const suffix = localeRef.value.selectionSuffix;\n      return props.pageSizes.map(size => {\n        if (typeof size === 'number') {\n          return {\n            label: `${size} / ${suffix}`,\n            value: size\n          };\n        } else {\n          return size;\n        }\n      });\n    });\n    const inputSizeRef = computed(() => {\n      var _a, _b;\n      return ((_b = (_a = mergedComponentPropsRef === null || mergedComponentPropsRef === void 0 ? void 0 : mergedComponentPropsRef.value) === null || _a === void 0 ? void 0 : _a.Pagination) === null || _b === void 0 ? void 0 : _b.inputSize) || smallerSize(props.size);\n    });\n    const selectSizeRef = computed(() => {\n      var _a, _b;\n      return ((_b = (_a = mergedComponentPropsRef === null || mergedComponentPropsRef === void 0 ? void 0 : mergedComponentPropsRef.value) === null || _a === void 0 ? void 0 : _a.Pagination) === null || _b === void 0 ? void 0 : _b.selectSize) || smallerSize(props.size);\n    });\n    const startIndexRef = computed(() => {\n      return (mergedPageRef.value - 1) * mergedPageSizeRef.value;\n    });\n    const endIndexRef = computed(() => {\n      const endIndex = mergedPageRef.value * mergedPageSizeRef.value - 1;\n      const {\n        itemCount\n      } = props;\n      if (itemCount !== undefined) {\n        return endIndex > itemCount - 1 ? itemCount - 1 : endIndex;\n      }\n      return endIndex;\n    });\n    const mergedItemCountRef = computed(() => {\n      const {\n        itemCount\n      } = props;\n      if (itemCount !== undefined) return itemCount;\n      return (props.pageCount || 1) * mergedPageSizeRef.value;\n    });\n    const rtlEnabledRef = useRtl('Pagination', mergedRtlRef, mergedClsPrefixRef);\n    function disableTransitionOneTick() {\n      void nextTick(() => {\n        var _a;\n        const {\n          value: selfEl\n        } = selfRef;\n        if (!selfEl) return;\n        selfEl.classList.add('transition-disabled');\n        void ((_a = selfRef.value) === null || _a === void 0 ? void 0 : _a.offsetWidth);\n        selfEl.classList.remove('transition-disabled');\n      });\n    }\n    function doUpdatePage(page) {\n      if (page === mergedPageRef.value) return;\n      const {\n        'onUpdate:page': _onUpdatePage,\n        onUpdatePage,\n        onChange,\n        simple\n      } = props;\n      if (_onUpdatePage) call(_onUpdatePage, page);\n      if (onUpdatePage) call(onUpdatePage, page);\n      // deprecated\n      if (onChange) call(onChange, page);\n      uncontrolledPageRef.value = page;\n      if (simple) {\n        jumperValueRef.value = String(page);\n      }\n    }\n    function doUpdatePageSize(pageSize) {\n      if (pageSize === mergedPageSizeRef.value) return;\n      const {\n        'onUpdate:pageSize': _onUpdatePageSize,\n        onUpdatePageSize,\n        onPageSizeChange\n      } = props;\n      if (_onUpdatePageSize) call(_onUpdatePageSize, pageSize);\n      if (onUpdatePageSize) call(onUpdatePageSize, pageSize);\n      // deprecated\n      if (onPageSizeChange) call(onPageSizeChange, pageSize);\n      uncontrolledPageSizeRef.value = pageSize;\n      // update new page when overflows.\n      // we may have different update strategy, but i've no time to impl it\n      if (mergedPageCountRef.value < mergedPageRef.value) {\n        doUpdatePage(mergedPageCountRef.value);\n      }\n    }\n    function forward() {\n      if (props.disabled) return;\n      const page = Math.min(mergedPageRef.value + 1, mergedPageCountRef.value);\n      doUpdatePage(page);\n    }\n    function backward() {\n      if (props.disabled) return;\n      const page = Math.max(mergedPageRef.value - 1, 1);\n      doUpdatePage(page);\n    }\n    function fastForward() {\n      if (props.disabled) return;\n      const page = Math.min(pageItemsInfo.value.fastForwardTo, mergedPageCountRef.value);\n      doUpdatePage(page);\n    }\n    function fastBackward() {\n      if (props.disabled) return;\n      const page = Math.max(pageItemsInfo.value.fastBackwardTo, 1);\n      doUpdatePage(page);\n    }\n    function handleSizePickerChange(value) {\n      doUpdatePageSize(value);\n    }\n    function doQuickJump() {\n      const page = Number.parseInt(jumperValueRef.value);\n      if (Number.isNaN(page)) return;\n      doUpdatePage(Math.max(1, Math.min(page, mergedPageCountRef.value)));\n      if (!props.simple) {\n        jumperValueRef.value = '';\n      }\n    }\n    function handleQuickJumperChange() {\n      doQuickJump();\n    }\n    function handlePageItemClick(pageItem) {\n      if (props.disabled) return;\n      switch (pageItem.type) {\n        case 'page':\n          doUpdatePage(pageItem.label);\n          break;\n        case 'fast-backward':\n          fastBackward();\n          break;\n        case 'fast-forward':\n          fastForward();\n          break;\n      }\n    }\n    function handleJumperInput(value) {\n      jumperValueRef.value = value.replace(/\\D+/g, '');\n    }\n    watchEffect(() => {\n      void mergedPageRef.value;\n      void mergedPageSizeRef.value;\n      disableTransitionOneTick();\n    });\n    const cssVarsRef = computed(() => {\n      const {\n        size\n      } = props;\n      const {\n        self: {\n          buttonBorder,\n          buttonBorderHover,\n          buttonBorderPressed,\n          buttonIconColor,\n          buttonIconColorHover,\n          buttonIconColorPressed,\n          itemTextColor,\n          itemTextColorHover,\n          itemTextColorPressed,\n          itemTextColorActive,\n          itemTextColorDisabled,\n          itemColor,\n          itemColorHover,\n          itemColorPressed,\n          itemColorActive,\n          itemColorActiveHover,\n          itemColorDisabled,\n          itemBorder,\n          itemBorderHover,\n          itemBorderPressed,\n          itemBorderActive,\n          itemBorderDisabled,\n          itemBorderRadius,\n          jumperTextColor,\n          jumperTextColorDisabled,\n          buttonColor,\n          buttonColorHover,\n          buttonColorPressed,\n          [createKey('itemPadding', size)]: itemPadding,\n          [createKey('itemMargin', size)]: itemMargin,\n          [createKey('inputWidth', size)]: inputWidth,\n          [createKey('selectWidth', size)]: selectWidth,\n          [createKey('inputMargin', size)]: inputMargin,\n          [createKey('selectMargin', size)]: selectMargin,\n          [createKey('jumperFontSize', size)]: jumperFontSize,\n          [createKey('prefixMargin', size)]: prefixMargin,\n          [createKey('suffixMargin', size)]: suffixMargin,\n          [createKey('itemSize', size)]: itemSize,\n          [createKey('buttonIconSize', size)]: buttonIconSize,\n          [createKey('itemFontSize', size)]: itemFontSize,\n          [`${createKey('itemMargin', size)}Rtl`]: itemMarginRtl,\n          [`${createKey('inputMargin', size)}Rtl`]: inputMarginRtl\n        },\n        common: {\n          cubicBezierEaseInOut\n        }\n      } = themeRef.value;\n      return {\n        '--n-prefix-margin': prefixMargin,\n        '--n-suffix-margin': suffixMargin,\n        '--n-item-font-size': itemFontSize,\n        '--n-select-width': selectWidth,\n        '--n-select-margin': selectMargin,\n        '--n-input-width': inputWidth,\n        '--n-input-margin': inputMargin,\n        '--n-input-margin-rtl': inputMarginRtl,\n        '--n-item-size': itemSize,\n        '--n-item-text-color': itemTextColor,\n        '--n-item-text-color-disabled': itemTextColorDisabled,\n        '--n-item-text-color-hover': itemTextColorHover,\n        '--n-item-text-color-active': itemTextColorActive,\n        '--n-item-text-color-pressed': itemTextColorPressed,\n        '--n-item-color': itemColor,\n        '--n-item-color-hover': itemColorHover,\n        '--n-item-color-disabled': itemColorDisabled,\n        '--n-item-color-active': itemColorActive,\n        '--n-item-color-active-hover': itemColorActiveHover,\n        '--n-item-color-pressed': itemColorPressed,\n        '--n-item-border': itemBorder,\n        '--n-item-border-hover': itemBorderHover,\n        '--n-item-border-disabled': itemBorderDisabled,\n        '--n-item-border-active': itemBorderActive,\n        '--n-item-border-pressed': itemBorderPressed,\n        '--n-item-padding': itemPadding,\n        '--n-item-border-radius': itemBorderRadius,\n        '--n-bezier': cubicBezierEaseInOut,\n        '--n-jumper-font-size': jumperFontSize,\n        '--n-jumper-text-color': jumperTextColor,\n        '--n-jumper-text-color-disabled': jumperTextColorDisabled,\n        '--n-item-margin': itemMargin,\n        '--n-item-margin-rtl': itemMarginRtl,\n        '--n-button-icon-size': buttonIconSize,\n        '--n-button-icon-color': buttonIconColor,\n        '--n-button-icon-color-hover': buttonIconColorHover,\n        '--n-button-icon-color-pressed': buttonIconColorPressed,\n        '--n-button-color-hover': buttonColorHover,\n        '--n-button-color': buttonColor,\n        '--n-button-color-pressed': buttonColorPressed,\n        '--n-button-border': buttonBorder,\n        '--n-button-border-hover': buttonBorderHover,\n        '--n-button-border-pressed': buttonBorderPressed\n      };\n    });\n    const themeClassHandle = inlineThemeDisabled ? useThemeClass('pagination', computed(() => {\n      let hash = '';\n      const {\n        size\n      } = props;\n      hash += size[0];\n      return hash;\n    }), cssVarsRef, props) : undefined;\n    return {\n      rtlEnabled: rtlEnabledRef,\n      mergedClsPrefix: mergedClsPrefixRef,\n      locale: localeRef,\n      selfRef,\n      mergedPage: mergedPageRef,\n      pageItems: computed(() => {\n        return pageItemsInfo.value.items;\n      }),\n      mergedItemCount: mergedItemCountRef,\n      jumperValue: jumperValueRef,\n      pageSizeOptions: pageSizeOptionsRef,\n      mergedPageSize: mergedPageSizeRef,\n      inputSize: inputSizeRef,\n      selectSize: selectSizeRef,\n      mergedTheme: themeRef,\n      mergedPageCount: mergedPageCountRef,\n      startIndex: startIndexRef,\n      endIndex: endIndexRef,\n      showFastForwardMenu: showFastForwardMenuRef,\n      showFastBackwardMenu: showFastBackwardMenuRef,\n      fastForwardActive: fastForwardActiveRef,\n      fastBackwardActive: fastBackwardActiveRef,\n      handleMenuSelect,\n      handleFastForwardMouseenter,\n      handleFastForwardMouseleave,\n      handleFastBackwardMouseenter,\n      handleFastBackwardMouseleave,\n      handleJumperInput,\n      handleBackwardClick: backward,\n      handleForwardClick: forward,\n      handlePageItemClick,\n      handleSizePickerChange,\n      handleQuickJumperChange,\n      cssVars: inlineThemeDisabled ? undefined : cssVarsRef,\n      themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,\n      onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender\n    };\n  },\n  render() {\n    // it's ok to expand all prop here since no slots' deps\n    const {\n      $slots,\n      mergedClsPrefix,\n      disabled,\n      cssVars,\n      mergedPage,\n      mergedPageCount,\n      pageItems,\n      showSizePicker,\n      showQuickJumper,\n      mergedTheme,\n      locale,\n      inputSize,\n      selectSize,\n      mergedPageSize,\n      pageSizeOptions,\n      jumperValue,\n      simple,\n      prev,\n      next,\n      prefix,\n      suffix,\n      label,\n      goto,\n      handleJumperInput,\n      handleSizePickerChange,\n      handleBackwardClick,\n      handlePageItemClick,\n      handleForwardClick,\n      handleQuickJumperChange,\n      onRender\n    } = this;\n    onRender === null || onRender === void 0 ? void 0 : onRender();\n    const renderPrefix = prefix || $slots.prefix;\n    const renderSuffix = suffix || $slots.suffix;\n    const renderPrev = prev || $slots.prev;\n    const renderNext = next || $slots.next;\n    const renderLabel = label || $slots.label;\n    return h(\"div\", {\n      ref: \"selfRef\",\n      class: [`${mergedClsPrefix}-pagination`, this.themeClass, this.rtlEnabled && `${mergedClsPrefix}-pagination--rtl`, disabled && `${mergedClsPrefix}-pagination--disabled`, simple && `${mergedClsPrefix}-pagination--simple`],\n      style: cssVars\n    }, renderPrefix ? h(\"div\", {\n      class: `${mergedClsPrefix}-pagination-prefix`\n    }, renderPrefix({\n      page: mergedPage,\n      pageSize: mergedPageSize,\n      pageCount: mergedPageCount,\n      startIndex: this.startIndex,\n      endIndex: this.endIndex,\n      itemCount: this.mergedItemCount\n    })) : null, this.displayOrder.map(part => {\n      switch (part) {\n        case 'pages':\n          return h(Fragment, null, h(\"div\", {\n            class: [`${mergedClsPrefix}-pagination-item`, !renderPrev && `${mergedClsPrefix}-pagination-item--button`, (mergedPage <= 1 || mergedPage > mergedPageCount || disabled) && `${mergedClsPrefix}-pagination-item--disabled`],\n            onClick: handleBackwardClick\n          }, renderPrev ? renderPrev({\n            page: mergedPage,\n            pageSize: mergedPageSize,\n            pageCount: mergedPageCount,\n            startIndex: this.startIndex,\n            endIndex: this.endIndex,\n            itemCount: this.mergedItemCount\n          }) : h(NBaseIcon, {\n            clsPrefix: mergedClsPrefix\n          }, {\n            default: () => this.rtlEnabled ? h(ForwardIcon, null) : h(BackwardIcon, null)\n          })), simple ? h(Fragment, null, h(\"div\", {\n            class: `${mergedClsPrefix}-pagination-quick-jumper`\n          }, h(NInput, {\n            value: jumperValue,\n            onUpdateValue: handleJumperInput,\n            size: inputSize,\n            placeholder: \"\",\n            disabled: disabled,\n            theme: mergedTheme.peers.Input,\n            themeOverrides: mergedTheme.peerOverrides.Input,\n            onChange: handleQuickJumperChange\n          })), \"\\u00A0/\", ' ', mergedPageCount) : pageItems.map((pageItem, index) => {\n            let contentNode;\n            let onMouseenter;\n            let onMouseleave;\n            const {\n              type\n            } = pageItem;\n            switch (type) {\n              case 'page':\n                // eslint-disable-next-line no-case-declarations\n                const pageNode = pageItem.label;\n                if (renderLabel) {\n                  contentNode = renderLabel({\n                    type: 'page',\n                    node: pageNode,\n                    active: pageItem.active\n                  });\n                } else {\n                  contentNode = pageNode;\n                }\n                break;\n              case 'fast-forward':\n                // eslint-disable-next-line no-case-declarations\n                const fastForwardNode = this.fastForwardActive ? h(NBaseIcon, {\n                  clsPrefix: mergedClsPrefix\n                }, {\n                  default: () => this.rtlEnabled ? h(FastBackwardIcon, null) : h(FastForwardIcon, null)\n                }) : h(NBaseIcon, {\n                  clsPrefix: mergedClsPrefix\n                }, {\n                  default: () => h(MoreIcon, null)\n                });\n                if (renderLabel) {\n                  contentNode = renderLabel({\n                    type: 'fast-forward',\n                    node: fastForwardNode,\n                    active: this.fastForwardActive || this.showFastForwardMenu\n                  });\n                } else {\n                  contentNode = fastForwardNode;\n                }\n                onMouseenter = this.handleFastForwardMouseenter;\n                onMouseleave = this.handleFastForwardMouseleave;\n                break;\n              case 'fast-backward':\n                // eslint-disable-next-line no-case-declarations\n                const fastBackwardNode = this.fastBackwardActive ? h(NBaseIcon, {\n                  clsPrefix: mergedClsPrefix\n                }, {\n                  default: () => this.rtlEnabled ? h(FastForwardIcon, null) : h(FastBackwardIcon, null)\n                }) : h(NBaseIcon, {\n                  clsPrefix: mergedClsPrefix\n                }, {\n                  default: () => h(MoreIcon, null)\n                });\n                if (renderLabel) {\n                  contentNode = renderLabel({\n                    type: 'fast-backward',\n                    node: fastBackwardNode,\n                    active: this.fastBackwardActive || this.showFastBackwardMenu\n                  });\n                } else {\n                  contentNode = fastBackwardNode;\n                }\n                onMouseenter = this.handleFastBackwardMouseenter;\n                onMouseleave = this.handleFastBackwardMouseleave;\n                break;\n            }\n            const itemNode = h(\"div\", {\n              key: index,\n              class: [`${mergedClsPrefix}-pagination-item`, pageItem.active && `${mergedClsPrefix}-pagination-item--active`, type !== 'page' && (type === 'fast-backward' && this.showFastBackwardMenu || type === 'fast-forward' && this.showFastForwardMenu) && `${mergedClsPrefix}-pagination-item--hover`, disabled && `${mergedClsPrefix}-pagination-item--disabled`, type === 'page' && `${mergedClsPrefix}-pagination-item--clickable`],\n              onClick: () => {\n                handlePageItemClick(pageItem);\n              },\n              onMouseenter: onMouseenter,\n              onMouseleave: onMouseleave\n            }, contentNode);\n            if (type === 'page' && !pageItem.mayBeFastBackward && !pageItem.mayBeFastForward) {\n              return itemNode;\n            } else {\n              const key = pageItem.type === 'page' ? pageItem.mayBeFastBackward ? 'fast-backward' : 'fast-forward' : pageItem.type;\n              if (pageItem.type !== 'page' && !pageItem.options) {\n                return itemNode;\n              }\n              return h(NPopselect, {\n                to: this.to,\n                key: key,\n                disabled: disabled,\n                trigger: \"hover\",\n                virtualScroll: true,\n                style: {\n                  width: '60px'\n                },\n                theme: mergedTheme.peers.Popselect,\n                themeOverrides: mergedTheme.peerOverrides.Popselect,\n                builtinThemeOverrides: {\n                  peers: {\n                    InternalSelectMenu: {\n                      height: 'calc(var(--n-option-height) * 4.6)'\n                    }\n                  }\n                },\n                nodeProps: () => ({\n                  style: {\n                    justifyContent: 'center'\n                  }\n                }),\n                show: type === 'page' ? false : type === 'fast-backward' ? this.showFastBackwardMenu : this.showFastForwardMenu,\n                onUpdateShow: value => {\n                  if (type === 'page') return;\n                  if (value) {\n                    if (type === 'fast-backward') {\n                      this.showFastBackwardMenu = value;\n                    } else {\n                      this.showFastForwardMenu = value;\n                    }\n                  } else {\n                    this.showFastBackwardMenu = false;\n                    this.showFastForwardMenu = false;\n                  }\n                },\n                options: pageItem.type !== 'page' && pageItem.options ? pageItem.options : [],\n                onUpdateValue: this.handleMenuSelect,\n                scrollable: true,\n                showCheckmark: false\n              }, {\n                default: () => itemNode\n              });\n            }\n          }), h(\"div\", {\n            class: [`${mergedClsPrefix}-pagination-item`, !renderNext && `${mergedClsPrefix}-pagination-item--button`, {\n              [`${mergedClsPrefix}-pagination-item--disabled`]: mergedPage < 1 || mergedPage >= mergedPageCount || disabled\n            }],\n            onClick: handleForwardClick\n          }, renderNext ? renderNext({\n            page: mergedPage,\n            pageSize: mergedPageSize,\n            pageCount: mergedPageCount,\n            itemCount: this.mergedItemCount,\n            startIndex: this.startIndex,\n            endIndex: this.endIndex\n          }) : h(NBaseIcon, {\n            clsPrefix: mergedClsPrefix\n          }, {\n            default: () => this.rtlEnabled ? h(BackwardIcon, null) : h(ForwardIcon, null)\n          })));\n        case 'size-picker':\n          {\n            return !simple && showSizePicker ? h(NSelect, Object.assign({\n              consistentMenuWidth: false,\n              placeholder: \"\",\n              showCheckmark: false,\n              to: this.to\n            }, this.selectProps, {\n              size: selectSize,\n              options: pageSizeOptions,\n              value: mergedPageSize,\n              disabled: disabled,\n              theme: mergedTheme.peers.Select,\n              themeOverrides: mergedTheme.peerOverrides.Select,\n              onUpdateValue: handleSizePickerChange\n            })) : null;\n          }\n        case 'quick-jumper':\n          return !simple && showQuickJumper ? h(\"div\", {\n            class: `${mergedClsPrefix}-pagination-quick-jumper`\n          }, goto ? goto() : resolveSlot(this.$slots.goto, () => [locale.goto]), h(NInput, {\n            value: jumperValue,\n            onUpdateValue: handleJumperInput,\n            size: inputSize,\n            placeholder: \"\",\n            disabled: disabled,\n            theme: mergedTheme.peers.Input,\n            themeOverrides: mergedTheme.peerOverrides.Input,\n            onChange: handleQuickJumperChange\n          })) : null;\n        default:\n          return null;\n      }\n    }), renderSuffix ? h(\"div\", {\n      class: `${mergedClsPrefix}-pagination-suffix`\n    }, renderSuffix({\n      page: mergedPage,\n      pageSize: mergedPageSize,\n      pageCount: mergedPageCount,\n      startIndex: this.startIndex,\n      endIndex: this.endIndex,\n      itemCount: this.mergedItemCount\n    })) : null);\n  }\n});","export default {\n  padding: '4px 0',\n  optionIconSizeSmall: '14px',\n  optionIconSizeMedium: '16px',\n  optionIconSizeLarge: '16px',\n  optionIconSizeHuge: '18px',\n  optionSuffixWidthSmall: '14px',\n  optionSuffixWidthMedium: '14px',\n  optionSuffixWidthLarge: '16px',\n  optionSuffixWidthHuge: '16px',\n  optionIconSuffixWidthSmall: '32px',\n  optionIconSuffixWidthMedium: '32px',\n  optionIconSuffixWidthLarge: '36px',\n  optionIconSuffixWidthHuge: '36px',\n  optionPrefixWidthSmall: '14px',\n  optionPrefixWidthMedium: '14px',\n  optionPrefixWidthLarge: '16px',\n  optionPrefixWidthHuge: '16px',\n  optionIconPrefixWidthSmall: '36px',\n  optionIconPrefixWidthMedium: '36px',\n  optionIconPrefixWidthLarge: '40px',\n  optionIconPrefixWidthHuge: '40px'\n};","import { changeColor } from 'seemly';\nimport { createTheme } from \"../../_mixins/use-theme.mjs\";\nimport { commonLight } from \"../../_styles/common/index.mjs\";\nimport { popoverLight } from \"../../popover/styles/index.mjs\";\nimport commonVariables from \"./_common.mjs\";\nexport function self(vars) {\n  const {\n    primaryColor,\n    textColor2,\n    dividerColor,\n    hoverColor,\n    popoverColor,\n    invertedColor,\n    borderRadius,\n    fontSizeSmall,\n    fontSizeMedium,\n    fontSizeLarge,\n    fontSizeHuge,\n    heightSmall,\n    heightMedium,\n    heightLarge,\n    heightHuge,\n    textColor3,\n    opacityDisabled\n  } = vars;\n  return Object.assign(Object.assign({}, commonVariables), {\n    optionHeightSmall: heightSmall,\n    optionHeightMedium: heightMedium,\n    optionHeightLarge: heightLarge,\n    optionHeightHuge: heightHuge,\n    borderRadius,\n    fontSizeSmall,\n    fontSizeMedium,\n    fontSizeLarge,\n    fontSizeHuge,\n    // non-inverted\n    optionTextColor: textColor2,\n    optionTextColorHover: textColor2,\n    optionTextColorActive: primaryColor,\n    optionTextColorChildActive: primaryColor,\n    color: popoverColor,\n    dividerColor,\n    suffixColor: textColor2,\n    prefixColor: textColor2,\n    optionColorHover: hoverColor,\n    optionColorActive: changeColor(primaryColor, {\n      alpha: 0.1\n    }),\n    groupHeaderTextColor: textColor3,\n    // inverted\n    optionTextColorInverted: '#BBB',\n    optionTextColorHoverInverted: '#FFF',\n    optionTextColorActiveInverted: '#FFF',\n    optionTextColorChildActiveInverted: '#FFF',\n    colorInverted: invertedColor,\n    dividerColorInverted: '#BBB',\n    suffixColorInverted: '#BBB',\n    prefixColorInverted: '#BBB',\n    optionColorHoverInverted: primaryColor,\n    optionColorActiveInverted: primaryColor,\n    groupHeaderTextColorInverted: '#AAA',\n    optionOpacityDisabled: opacityDisabled\n  });\n}\nconst dropdownLight = createTheme({\n  name: 'Dropdown',\n  common: commonLight,\n  peers: {\n    Popover: popoverLight\n  },\n  self\n});\nexport default dropdownLight;","import { changeColor } from 'seemly';\nimport { commonDark } from \"../../_styles/common/index.mjs\";\nimport { popoverDark } from \"../../popover/styles/index.mjs\";\nimport { self } from \"./light.mjs\";\nconst dropdownDark = {\n  name: 'Dropdown',\n  common: commonDark,\n  peers: {\n    Popover: popoverDark\n  },\n  self(vars) {\n    const {\n      primaryColorSuppl,\n      primaryColor,\n      popoverColor\n    } = vars;\n    const commonSelf = self(vars);\n    commonSelf.colorInverted = popoverColor;\n    commonSelf.optionColorActive = changeColor(primaryColor, {\n      alpha: 0.15\n    });\n    commonSelf.optionColorActiveInverted = primaryColorSuppl;\n    commonSelf.optionColorHoverInverted = primaryColorSuppl;\n    return commonSelf;\n  }\n};\nexport default dropdownDark;","export default {\n  padding: '8px 14px'\n};","import { commonDark } from \"../../_styles/common/index.mjs\";\nimport { popoverDark } from \"../../popover/styles/index.mjs\";\nimport commonVars from \"./_common.mjs\";\nconst tooltipDark = {\n  name: 'Tooltip',\n  common: commonDark,\n  peers: {\n    Popover: popoverDark\n  },\n  self(vars) {\n    const {\n      borderRadius,\n      boxShadow2,\n      popoverColor,\n      textColor2\n    } = vars;\n    return Object.assign(Object.assign({}, commonVars), {\n      borderRadius,\n      boxShadow: boxShadow2,\n      color: popoverColor,\n      textColor: textColor2\n    });\n  }\n};\nexport default tooltipDark;","import { composite } from 'seemly';\nimport { createTheme } from \"../../_mixins/use-theme.mjs\";\nimport { commonLight } from \"../../_styles/common/index.mjs\";\nimport { popoverLight } from \"../../popover/styles/index.mjs\";\nimport commonVars from \"./_common.mjs\";\nfunction self(vars) {\n  const {\n    borderRadius,\n    boxShadow2,\n    baseColor\n  } = vars;\n  return Object.assign(Object.assign({}, commonVars), {\n    borderRadius,\n    boxShadow: boxShadow2,\n    color: composite(baseColor, 'rgba(0, 0, 0, .85)'),\n    textColor: baseColor\n  });\n}\nconst tooltipLight = createTheme({\n  name: 'Tooltip',\n  common: commonLight,\n  peers: {\n    Popover: popoverLight\n  },\n  self\n});\nexport default tooltipLight;","import { commonDark } from \"../../_styles/common/index.mjs\";\nimport { tooltipDark } from \"../../tooltip/styles/index.mjs\";\nconst ellipsisDark = {\n  name: 'Ellipsis',\n  common: commonDark,\n  peers: {\n    Tooltip: tooltipDark\n  }\n};\nexport default ellipsisDark;","import { createTheme } from \"../../_mixins/index.mjs\";\nimport { commonLight } from \"../../_styles/common/index.mjs\";\nimport { tooltipLight } from \"../../tooltip/styles/index.mjs\";\nconst ellipsisLight = createTheme({\n  name: 'Ellipsis',\n  common: commonLight,\n  peers: {\n    Tooltip: tooltipLight\n  }\n});\nexport default ellipsisLight;","export default {\n  radioSizeSmall: '14px',\n  radioSizeMedium: '16px',\n  radioSizeLarge: '18px',\n  labelPadding: '0 8px',\n  labelFontWeight: '400'\n};","import { changeColor } from 'seemly';\nimport { commonDark } from \"../../_styles/common/index.mjs\";\nimport commonVariables from \"./_common.mjs\";\nconst radioDark = {\n  name: 'Radio',\n  common: commonDark,\n  self(vars) {\n    const {\n      borderColor,\n      primaryColor,\n      baseColor,\n      textColorDisabled,\n      inputColorDisabled,\n      textColor2,\n      opacityDisabled,\n      borderRadius,\n      fontSizeSmall,\n      fontSizeMedium,\n      fontSizeLarge,\n      heightSmall,\n      heightMedium,\n      heightLarge,\n      lineHeight\n    } = vars;\n    return Object.assign(Object.assign({}, commonVariables), {\n      labelLineHeight: lineHeight,\n      buttonHeightSmall: heightSmall,\n      buttonHeightMedium: heightMedium,\n      buttonHeightLarge: heightLarge,\n      fontSizeSmall,\n      fontSizeMedium,\n      fontSizeLarge,\n      boxShadow: `inset 0 0 0 1px ${borderColor}`,\n      boxShadowActive: `inset 0 0 0 1px ${primaryColor}`,\n      boxShadowFocus: `inset 0 0 0 1px ${primaryColor}, 0 0 0 2px ${changeColor(primaryColor, {\n        alpha: 0.3\n      })}`,\n      boxShadowHover: `inset 0 0 0 1px ${primaryColor}`,\n      boxShadowDisabled: `inset 0 0 0 1px ${borderColor}`,\n      color: '#0000',\n      colorDisabled: inputColorDisabled,\n      colorActive: '#0000',\n      textColor: textColor2,\n      textColorDisabled,\n      dotColorActive: primaryColor,\n      dotColorDisabled: borderColor,\n      buttonBorderColor: borderColor,\n      buttonBorderColorActive: primaryColor,\n      buttonBorderColorHover: primaryColor,\n      buttonColor: '#0000',\n      buttonColorActive: primaryColor,\n      buttonTextColor: textColor2,\n      buttonTextColorActive: baseColor,\n      buttonTextColorHover: primaryColor,\n      opacityDisabled,\n      buttonBoxShadowFocus: `inset 0 0 0 1px ${primaryColor}, 0 0 0 2px ${changeColor(primaryColor, {\n        alpha: 0.3\n      })}`,\n      buttonBoxShadowHover: `inset 0 0 0 1px ${primaryColor}`,\n      buttonBoxShadow: 'inset 0 0 0 1px #0000',\n      buttonBorderRadius: borderRadius\n    });\n  }\n};\nexport default radioDark;","import { changeColor } from 'seemly';\nimport { commonLight } from \"../../_styles/common/index.mjs\";\nimport commonVariables from \"./_common.mjs\";\nfunction self(vars) {\n  const {\n    borderColor,\n    primaryColor,\n    baseColor,\n    textColorDisabled,\n    inputColorDisabled,\n    textColor2,\n    opacityDisabled,\n    borderRadius,\n    fontSizeSmall,\n    fontSizeMedium,\n    fontSizeLarge,\n    heightSmall,\n    heightMedium,\n    heightLarge,\n    lineHeight\n  } = vars;\n  return Object.assign(Object.assign({}, commonVariables), {\n    labelLineHeight: lineHeight,\n    buttonHeightSmall: heightSmall,\n    buttonHeightMedium: heightMedium,\n    buttonHeightLarge: heightLarge,\n    fontSizeSmall,\n    fontSizeMedium,\n    fontSizeLarge,\n    boxShadow: `inset 0 0 0 1px ${borderColor}`,\n    boxShadowActive: `inset 0 0 0 1px ${primaryColor}`,\n    boxShadowFocus: `inset 0 0 0 1px ${primaryColor}, 0 0 0 2px ${changeColor(primaryColor, {\n      alpha: 0.2\n    })}`,\n    boxShadowHover: `inset 0 0 0 1px ${primaryColor}`,\n    boxShadowDisabled: `inset 0 0 0 1px ${borderColor}`,\n    color: baseColor,\n    colorDisabled: inputColorDisabled,\n    colorActive: '#0000',\n    textColor: textColor2,\n    textColorDisabled,\n    dotColorActive: primaryColor,\n    dotColorDisabled: borderColor,\n    buttonBorderColor: borderColor,\n    buttonBorderColorActive: primaryColor,\n    buttonBorderColorHover: borderColor,\n    buttonColor: baseColor,\n    buttonColorActive: baseColor,\n    buttonTextColor: textColor2,\n    buttonTextColorActive: primaryColor,\n    buttonTextColorHover: primaryColor,\n    opacityDisabled,\n    buttonBoxShadowFocus: `inset 0 0 0 1px ${primaryColor}, 0 0 0 2px ${changeColor(primaryColor, {\n      alpha: 0.3\n    })}`,\n    buttonBoxShadowHover: 'inset 0 0 0 1px #0000',\n    buttonBoxShadow: 'inset 0 0 0 1px #0000',\n    buttonBorderRadius: borderRadius\n  });\n}\nconst radioLight = {\n  name: 'Radio',\n  common: commonLight,\n  self\n};\nexport default radioLight;","export default {\n  thPaddingSmall: '8px',\n  thPaddingMedium: '12px',\n  thPaddingLarge: '12px',\n  tdPaddingSmall: '8px',\n  tdPaddingMedium: '12px',\n  tdPaddingLarge: '12px',\n  sorterSize: '15px',\n  resizableContainerSize: '8px',\n  resizableSize: '2px',\n  filterSize: '15px',\n  paginationMargin: '12px 0 0 0',\n  emptyPadding: '48px 0',\n  actionPadding: '8px 12px',\n  actionButtonMargin: '0 8px 0 0'\n};","import { composite } from 'seemly';\nimport { scrollbarLight } from \"../../_internal/scrollbar/styles/index.mjs\";\nimport { createTheme } from \"../../_mixins/index.mjs\";\nimport { commonLight } from \"../../_styles/common/index.mjs\";\nimport { buttonLight } from \"../../button/styles/index.mjs\";\nimport { checkboxLight } from \"../../checkbox/styles/index.mjs\";\nimport { dropdownLight } from \"../../dropdown/styles/index.mjs\";\nimport { ellipsisLight } from \"../../ellipsis/styles/index.mjs\";\nimport { emptyLight } from \"../../empty/styles/index.mjs\";\nimport { paginationLight } from \"../../pagination/styles/index.mjs\";\nimport { popoverLight } from \"../../popover/styles/index.mjs\";\nimport { radioLight } from \"../../radio/styles/index.mjs\";\nimport commonVariables from \"./_common.mjs\";\nexport function self(vars) {\n  const {\n    cardColor,\n    modalColor,\n    popoverColor,\n    textColor2,\n    textColor1,\n    tableHeaderColor,\n    tableColorHover,\n    iconColor,\n    primaryColor,\n    fontWeightStrong,\n    borderRadius,\n    lineHeight,\n    fontSizeSmall,\n    fontSizeMedium,\n    fontSizeLarge,\n    dividerColor,\n    heightSmall,\n    opacityDisabled,\n    tableColorStriped\n  } = vars;\n  return Object.assign(Object.assign({}, commonVariables), {\n    actionDividerColor: dividerColor,\n    lineHeight,\n    borderRadius,\n    fontSizeSmall,\n    fontSizeMedium,\n    fontSizeLarge,\n    borderColor: composite(cardColor, dividerColor),\n    tdColorHover: composite(cardColor, tableColorHover),\n    tdColorSorting: composite(cardColor, tableColorHover),\n    tdColorStriped: composite(cardColor, tableColorStriped),\n    thColor: composite(cardColor, tableHeaderColor),\n    thColorHover: composite(composite(cardColor, tableHeaderColor), tableColorHover),\n    thColorSorting: composite(composite(cardColor, tableHeaderColor), tableColorHover),\n    tdColor: cardColor,\n    tdTextColor: textColor2,\n    thTextColor: textColor1,\n    thFontWeight: fontWeightStrong,\n    thButtonColorHover: tableColorHover,\n    thIconColor: iconColor,\n    thIconColorActive: primaryColor,\n    // modal\n    borderColorModal: composite(modalColor, dividerColor),\n    tdColorHoverModal: composite(modalColor, tableColorHover),\n    tdColorSortingModal: composite(modalColor, tableColorHover),\n    tdColorStripedModal: composite(modalColor, tableColorStriped),\n    thColorModal: composite(modalColor, tableHeaderColor),\n    thColorHoverModal: composite(composite(modalColor, tableHeaderColor), tableColorHover),\n    thColorSortingModal: composite(composite(modalColor, tableHeaderColor), tableColorHover),\n    tdColorModal: modalColor,\n    // popover\n    borderColorPopover: composite(popoverColor, dividerColor),\n    tdColorHoverPopover: composite(popoverColor, tableColorHover),\n    tdColorSortingPopover: composite(popoverColor, tableColorHover),\n    tdColorStripedPopover: composite(popoverColor, tableColorStriped),\n    thColorPopover: composite(popoverColor, tableHeaderColor),\n    thColorHoverPopover: composite(composite(popoverColor, tableHeaderColor), tableColorHover),\n    thColorSortingPopover: composite(composite(popoverColor, tableHeaderColor), tableColorHover),\n    tdColorPopover: popoverColor,\n    boxShadowBefore: 'inset -12px 0 8px -12px rgba(0, 0, 0, .18)',\n    boxShadowAfter: 'inset 12px 0 8px -12px rgba(0, 0, 0, .18)',\n    // loading\n    loadingColor: primaryColor,\n    loadingSize: heightSmall,\n    opacityLoading: opacityDisabled\n  });\n}\nconst dataTableLight = createTheme({\n  name: 'DataTable',\n  common: commonLight,\n  peers: {\n    Button: buttonLight,\n    Checkbox: checkboxLight,\n    Radio: radioLight,\n    Pagination: paginationLight,\n    Scrollbar: scrollbarLight,\n    Empty: emptyLight,\n    Popover: popoverLight,\n    Ellipsis: ellipsisLight,\n    Dropdown: dropdownLight\n  },\n  self\n});\nexport default dataTableLight;","import { scrollbarDark } from \"../../_internal/scrollbar/styles/index.mjs\";\nimport { commonDark } from \"../../_styles/common/index.mjs\";\nimport { buttonDark } from \"../../button/styles/index.mjs\";\nimport { checkboxDark } from \"../../checkbox/styles/index.mjs\";\nimport { dropdownDark } from \"../../dropdown/styles/index.mjs\";\nimport { ellipsisDark } from \"../../ellipsis/styles/index.mjs\";\nimport { emptyDark } from \"../../empty/styles/index.mjs\";\nimport { paginationDark } from \"../../pagination/styles/index.mjs\";\nimport { popoverDark } from \"../../popover/styles/index.mjs\";\nimport { radioDark } from \"../../radio/styles/index.mjs\";\nimport { self } from \"./light.mjs\";\nconst dataTableDark = {\n  name: 'DataTable',\n  common: commonDark,\n  peers: {\n    Button: buttonDark,\n    Checkbox: checkboxDark,\n    Radio: radioDark,\n    Pagination: paginationDark,\n    Scrollbar: scrollbarDark,\n    Empty: emptyDark,\n    Popover: popoverDark,\n    Ellipsis: ellipsisDark,\n    Dropdown: dropdownDark\n  },\n  self(vars) {\n    const commonSelf = self(vars);\n    commonSelf.boxShadowAfter = 'inset 12px 0 8px -12px rgba(0, 0, 0, .36)';\n    commonSelf.boxShadowBefore = 'inset -12px 0 8px -12px rgba(0, 0, 0, .36)';\n    return commonSelf;\n  }\n};\nexport default dataTableDark;","import { useMemo, useMergedState } from 'vooks';\nimport { inject, ref, toRef, watchEffect } from 'vue';\nimport { useConfig, useFormItem } from \"../../_mixins/index.mjs\";\nimport { call, createInjectionKey, warnOnce } from \"../../_utils/index.mjs\";\nexport const radioBaseProps = {\n  name: String,\n  value: {\n    type: [String, Number, Boolean],\n    default: 'on'\n  },\n  checked: {\n    type: Boolean,\n    default: undefined\n  },\n  defaultChecked: Boolean,\n  disabled: {\n    type: Boolean,\n    default: undefined\n  },\n  label: String,\n  size: String,\n  onUpdateChecked: [Function, Array],\n  'onUpdate:checked': [Function, Array],\n  // deprecated\n  checkedValue: {\n    type: Boolean,\n    default: undefined\n  }\n};\nexport const radioGroupInjectionKey = createInjectionKey('n-radio-group');\nfunction setup(props) {\n  if (process.env.NODE_ENV !== 'production') {\n    watchEffect(() => {\n      if (props.checkedValue !== undefined) {\n        warnOnce('radio', '`checked-value` is deprecated, please use `checked` instead.');\n      }\n    });\n  }\n  const NRadioGroup = inject(radioGroupInjectionKey, null);\n  const formItem = useFormItem(props, {\n    mergedSize(NFormItem) {\n      const {\n        size\n      } = props;\n      if (size !== undefined) return size;\n      if (NRadioGroup) {\n        const {\n          mergedSizeRef: {\n            value: mergedSize\n          }\n        } = NRadioGroup;\n        if (mergedSize !== undefined) {\n          return mergedSize;\n        }\n      }\n      if (NFormItem) {\n        return NFormItem.mergedSize.value;\n      }\n      return 'medium';\n    },\n    mergedDisabled(NFormItem) {\n      if (props.disabled) return true;\n      if (NRadioGroup === null || NRadioGroup === void 0 ? void 0 : NRadioGroup.disabledRef.value) return true;\n      if (NFormItem === null || NFormItem === void 0 ? void 0 : NFormItem.disabled.value) return true;\n      return false;\n    }\n  });\n  const {\n    mergedSizeRef,\n    mergedDisabledRef\n  } = formItem;\n  const inputRef = ref(null);\n  const labelRef = ref(null);\n  const uncontrolledCheckedRef = ref(props.defaultChecked);\n  const controlledCheckedRef = toRef(props, 'checked');\n  const mergedCheckedRef = useMergedState(controlledCheckedRef, uncontrolledCheckedRef);\n  const renderSafeCheckedRef = useMemo(() => {\n    if (NRadioGroup) return NRadioGroup.valueRef.value === props.value;\n    return mergedCheckedRef.value;\n  });\n  const mergedNameRef = useMemo(() => {\n    const {\n      name\n    } = props;\n    if (name !== undefined) return name;\n    if (NRadioGroup) return NRadioGroup.nameRef.value;\n  });\n  const focusRef = ref(false);\n  function doUpdateChecked() {\n    if (NRadioGroup) {\n      const {\n        doUpdateValue\n      } = NRadioGroup;\n      const {\n        value\n      } = props;\n      call(doUpdateValue, value);\n    } else {\n      const {\n        onUpdateChecked,\n        'onUpdate:checked': _onUpdateChecked\n      } = props;\n      const {\n        nTriggerFormInput,\n        nTriggerFormChange\n      } = formItem;\n      if (onUpdateChecked) call(onUpdateChecked, true);\n      if (_onUpdateChecked) call(_onUpdateChecked, true);\n      nTriggerFormInput();\n      nTriggerFormChange();\n      uncontrolledCheckedRef.value = true;\n    }\n  }\n  function toggle() {\n    if (mergedDisabledRef.value) return;\n    if (!renderSafeCheckedRef.value) {\n      doUpdateChecked();\n    }\n  }\n  function handleRadioInputChange() {\n    toggle();\n    // Restore element check prop's value to current state, since if doesn't\n    // reflect current VNode. If not, bug will happens in component with element\n    // that has internal state such as <input />.\n    if (inputRef.value) {\n      inputRef.value.checked = renderSafeCheckedRef.value;\n    }\n  }\n  function handleRadioInputBlur() {\n    focusRef.value = false;\n  }\n  function handleRadioInputFocus() {\n    focusRef.value = true;\n  }\n  return {\n    mergedClsPrefix: NRadioGroup ? NRadioGroup.mergedClsPrefixRef : useConfig(props).mergedClsPrefixRef,\n    inputRef,\n    labelRef,\n    mergedName: mergedNameRef,\n    mergedDisabled: mergedDisabledRef,\n    renderSafeChecked: renderSafeCheckedRef,\n    focus: focusRef,\n    mergedSize: mergedSizeRef,\n    handleRadioInputChange,\n    handleRadioInputBlur,\n    handleRadioInputFocus\n  };\n}\nexport { setup };","import { defineComponent, h } from 'vue';\nimport { resolveWrappedSlot } from \"../../_utils/index.mjs\";\nimport { radioBaseProps, setup } from \"./use-radio.mjs\";\nexport const radioButtonProps = radioBaseProps;\nexport default defineComponent({\n  name: 'RadioButton',\n  props: radioBaseProps,\n  setup,\n  render() {\n    const {\n      mergedClsPrefix\n    } = this;\n    return h(\"label\", {\n      class: [`${mergedClsPrefix}-radio-button`, this.mergedDisabled && `${mergedClsPrefix}-radio-button--disabled`, this.renderSafeChecked && `${mergedClsPrefix}-radio-button--checked`, this.focus && [`${mergedClsPrefix}-radio-button--focus`]]\n    }, h(\"input\", {\n      ref: \"inputRef\",\n      type: \"radio\",\n      class: `${mergedClsPrefix}-radio-input`,\n      value: this.value,\n      name: this.mergedName,\n      checked: this.renderSafeChecked,\n      disabled: this.mergedDisabled,\n      onChange: this.handleRadioInputChange,\n      onFocus: this.handleRadioInputFocus,\n      onBlur: this.handleRadioInputBlur\n    }), h(\"div\", {\n      class: `${mergedClsPrefix}-radio-button__state-border`\n    }), resolveWrappedSlot(this.$slots.default, children => {\n      if (!children && !this.label) return null;\n      return h(\"div\", {\n        ref: \"labelRef\",\n        class: `${mergedClsPrefix}-radio__label`\n      }, children || this.label);\n    }));\n  }\n});","import { c, cB, cE, cM, cNotM } from \"../../../_utils/cssr/index.mjs\";\n// vars:\n// --n-bezier\n// --n-button-border-color\n// --n-button-border-color-active\n// --n-height\n// --n-opacity-disabled\n// --n-font-size\nexport default cB('radio-group', `\n display: inline-block;\n font-size: var(--n-font-size);\n`, [cE('splitor', `\n display: inline-block;\n vertical-align: bottom;\n width: 1px;\n transition:\n background-color .3s var(--n-bezier),\n opacity .3s var(--n-bezier);\n background: var(--n-button-border-color);\n `, [cM('checked', {\n  backgroundColor: 'var(--n-button-border-color-active)'\n}), cM('disabled', {\n  opacity: 'var(--n-opacity-disabled)'\n})]), cM('button-group', `\n white-space: nowrap;\n height: var(--n-height);\n line-height: var(--n-height);\n `, [cB('radio-button', {\n  height: 'var(--n-height)',\n  lineHeight: 'var(--n-height)'\n}), cE('splitor', {\n  height: 'var(--n-height)'\n})]), cB('radio-button', `\n vertical-align: bottom;\n outline: none;\n position: relative;\n user-select: none;\n -webkit-user-select: none;\n display: inline-block;\n box-sizing: border-box;\n padding-left: 14px;\n padding-right: 14px;\n white-space: nowrap;\n transition:\n background-color .3s var(--n-bezier),\n opacity .3s var(--n-bezier),\n border-color .3s var(--n-bezier),\n color .3s var(--n-bezier);\n background: var(--n-button-color);\n color: var(--n-button-text-color);\n border-top: 1px solid var(--n-button-border-color);\n border-bottom: 1px solid var(--n-button-border-color);\n `, [cB('radio-input', `\n pointer-events: none;\n position: absolute;\n border: 0;\n border-radius: inherit;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n opacity: 0;\n z-index: 1;\n `), cE('state-border', `\n z-index: 1;\n pointer-events: none;\n position: absolute;\n box-shadow: var(--n-button-box-shadow);\n transition: box-shadow .3s var(--n-bezier);\n left: -1px;\n bottom: -1px;\n right: -1px;\n top: -1px;\n `), c('&:first-child', `\n border-top-left-radius: var(--n-button-border-radius);\n border-bottom-left-radius: var(--n-button-border-radius);\n border-left: 1px solid var(--n-button-border-color);\n `, [cE('state-border', `\n border-top-left-radius: var(--n-button-border-radius);\n border-bottom-left-radius: var(--n-button-border-radius);\n `)]), c('&:last-child', `\n border-top-right-radius: var(--n-button-border-radius);\n border-bottom-right-radius: var(--n-button-border-radius);\n border-right: 1px solid var(--n-button-border-color);\n `, [cE('state-border', `\n border-top-right-radius: var(--n-button-border-radius);\n border-bottom-right-radius: var(--n-button-border-radius);\n `)]), cNotM('disabled', `\n cursor: pointer;\n `, [c('&:hover', [cE('state-border', `\n transition: box-shadow .3s var(--n-bezier);\n box-shadow: var(--n-button-box-shadow-hover);\n `), cNotM('checked', {\n  color: 'var(--n-button-text-color-hover)'\n})]), cM('focus', [c('&:not(:active)', [cE('state-border', {\n  boxShadow: 'var(--n-button-box-shadow-focus)'\n})])])]), cM('checked', `\n background: var(--n-button-color-active);\n color: var(--n-button-text-color-active);\n border-color: var(--n-button-border-color-active);\n `), cM('disabled', `\n cursor: not-allowed;\n opacity: var(--n-opacity-disabled);\n `)])]);","import { useMergedState } from 'vooks';\nimport { computed, defineComponent, h, provide, ref, toRef } from 'vue';\nimport { useConfig, useFormItem, useTheme, useThemeClass } from \"../../_mixins/index.mjs\";\nimport { useRtl } from \"../../_mixins/use-rtl.mjs\";\nimport { call, createKey, flatten, getSlot, warn } from \"../../_utils/index.mjs\";\nimport { radioLight } from \"../styles/index.mjs\";\nimport style from \"./styles/radio-group.cssr.mjs\";\nimport { radioGroupInjectionKey } from \"./use-radio.mjs\";\nfunction mapSlot(defaultSlot, value, clsPrefix) {\n  var _a;\n  const children = [];\n  let isButtonGroup = false;\n  for (let i = 0; i < defaultSlot.length; ++i) {\n    const wrappedInstance = defaultSlot[i];\n    const name = (_a = wrappedInstance.type) === null || _a === void 0 ? void 0 : _a.name;\n    if (name === 'RadioButton') {\n      isButtonGroup = true;\n    }\n    if (process.env.NODE_ENV !== 'production' && isButtonGroup && name !== 'RadioButton') {\n      warn('radio-group', '`n-radio-group` in button mode only takes `n-radio-button` as children.');\n      continue;\n    }\n    const instanceProps = wrappedInstance.props;\n    if (name !== 'RadioButton') {\n      children.push(wrappedInstance);\n      continue;\n    }\n    if (i === 0) {\n      children.push(wrappedInstance);\n    } else {\n      const lastInstanceProps = children[children.length - 1].props;\n      const lastInstanceChecked = value === lastInstanceProps.value;\n      const lastInstanceDisabled = lastInstanceProps.disabled;\n      const currentInstanceChecked = value === instanceProps.value;\n      const currentInstanceDisabled = instanceProps.disabled;\n      /**\n       * Priority of button splitor:\n       * !disabled  checked >\n       *  disabled  checked >\n       * !disabled !checked >\n       *  disabled !checked\n       */\n      const lastInstancePriority = (lastInstanceChecked ? 2 : 0) + (!lastInstanceDisabled ? 1 : 0);\n      const currentInstancePriority = (currentInstanceChecked ? 2 : 0) + (!currentInstanceDisabled ? 1 : 0);\n      const lastInstanceClass = {\n        [`${clsPrefix}-radio-group__splitor--disabled`]: lastInstanceDisabled,\n        [`${clsPrefix}-radio-group__splitor--checked`]: lastInstanceChecked\n      };\n      const currentInstanceClass = {\n        [`${clsPrefix}-radio-group__splitor--disabled`]: currentInstanceDisabled,\n        [`${clsPrefix}-radio-group__splitor--checked`]: currentInstanceChecked\n      };\n      const splitorClass = lastInstancePriority < currentInstancePriority ? currentInstanceClass : lastInstanceClass;\n      children.push(h(\"div\", {\n        class: [`${clsPrefix}-radio-group__splitor`, splitorClass]\n      }), wrappedInstance);\n    }\n  }\n  return {\n    children,\n    isButtonGroup\n  };\n}\nexport const radioGroupProps = Object.assign(Object.assign({}, useTheme.props), {\n  name: String,\n  value: [String, Number, Boolean],\n  defaultValue: {\n    type: [String, Number, Boolean],\n    default: null\n  },\n  size: String,\n  disabled: {\n    type: Boolean,\n    default: undefined\n  },\n  'onUpdate:value': [Function, Array],\n  onUpdateValue: [Function, Array]\n});\nexport default defineComponent({\n  name: 'RadioGroup',\n  props: radioGroupProps,\n  setup(props) {\n    const selfElRef = ref(null);\n    const {\n      mergedSizeRef,\n      mergedDisabledRef,\n      nTriggerFormChange,\n      nTriggerFormInput,\n      nTriggerFormBlur,\n      nTriggerFormFocus\n    } = useFormItem(props);\n    const {\n      mergedClsPrefixRef,\n      inlineThemeDisabled,\n      mergedRtlRef\n    } = useConfig(props);\n    const themeRef = useTheme('Radio', '-radio-group', style, radioLight, props, mergedClsPrefixRef);\n    const uncontrolledValueRef = ref(props.defaultValue);\n    const controlledValueRef = toRef(props, 'value');\n    const mergedValueRef = useMergedState(controlledValueRef, uncontrolledValueRef);\n    function doUpdateValue(value) {\n      const {\n        onUpdateValue,\n        'onUpdate:value': _onUpdateValue\n      } = props;\n      if (onUpdateValue) {\n        call(onUpdateValue, value);\n      }\n      if (_onUpdateValue) {\n        call(_onUpdateValue, value);\n      }\n      uncontrolledValueRef.value = value;\n      nTriggerFormChange();\n      nTriggerFormInput();\n    }\n    function handleFocusin(e) {\n      const {\n        value: selfEl\n      } = selfElRef;\n      if (!selfEl) return;\n      if (selfEl.contains(e.relatedTarget)) return;\n      nTriggerFormFocus();\n    }\n    function handleFocusout(e) {\n      const {\n        value: selfEl\n      } = selfElRef;\n      if (!selfEl) return;\n      if (selfEl.contains(e.relatedTarget)) return;\n      nTriggerFormBlur();\n    }\n    provide(radioGroupInjectionKey, {\n      mergedClsPrefixRef,\n      nameRef: toRef(props, 'name'),\n      valueRef: mergedValueRef,\n      disabledRef: mergedDisabledRef,\n      mergedSizeRef,\n      doUpdateValue\n    });\n    const rtlEnabledRef = useRtl('Radio', mergedRtlRef, mergedClsPrefixRef);\n    const cssVarsRef = computed(() => {\n      const {\n        value: size\n      } = mergedSizeRef;\n      const {\n        common: {\n          cubicBezierEaseInOut\n        },\n        self: {\n          buttonBorderColor,\n          buttonBorderColorActive,\n          buttonBorderRadius,\n          buttonBoxShadow,\n          buttonBoxShadowFocus,\n          buttonBoxShadowHover,\n          buttonColor,\n          buttonColorActive,\n          buttonTextColor,\n          buttonTextColorActive,\n          buttonTextColorHover,\n          opacityDisabled,\n          [createKey('buttonHeight', size)]: height,\n          [createKey('fontSize', size)]: fontSize\n        }\n      } = themeRef.value;\n      return {\n        '--n-font-size': fontSize,\n        '--n-bezier': cubicBezierEaseInOut,\n        '--n-button-border-color': buttonBorderColor,\n        '--n-button-border-color-active': buttonBorderColorActive,\n        '--n-button-border-radius': buttonBorderRadius,\n        '--n-button-box-shadow': buttonBoxShadow,\n        '--n-button-box-shadow-focus': buttonBoxShadowFocus,\n        '--n-button-box-shadow-hover': buttonBoxShadowHover,\n        '--n-button-color': buttonColor,\n        '--n-button-color-active': buttonColorActive,\n        '--n-button-text-color': buttonTextColor,\n        '--n-button-text-color-hover': buttonTextColorHover,\n        '--n-button-text-color-active': buttonTextColorActive,\n        '--n-height': height,\n        '--n-opacity-disabled': opacityDisabled\n      };\n    });\n    const themeClassHandle = inlineThemeDisabled ? useThemeClass('radio-group', computed(() => mergedSizeRef.value[0]), cssVarsRef, props) : undefined;\n    return {\n      selfElRef,\n      rtlEnabled: rtlEnabledRef,\n      mergedClsPrefix: mergedClsPrefixRef,\n      mergedValue: mergedValueRef,\n      handleFocusout,\n      handleFocusin,\n      cssVars: inlineThemeDisabled ? undefined : cssVarsRef,\n      themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,\n      onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender\n    };\n  },\n  render() {\n    var _a;\n    const {\n      mergedValue,\n      mergedClsPrefix,\n      handleFocusin,\n      handleFocusout\n    } = this;\n    const {\n      children,\n      isButtonGroup\n    } = mapSlot(flatten(getSlot(this)), mergedValue, mergedClsPrefix);\n    (_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this);\n    return h(\"div\", {\n      onFocusin: handleFocusin,\n      onFocusout: handleFocusout,\n      ref: \"selfElRef\",\n      class: [`${mergedClsPrefix}-radio-group`, this.rtlEnabled && `${mergedClsPrefix}-radio-group--rtl`, this.themeClass, isButtonGroup && `${mergedClsPrefix}-radio-group--button-group`],\n      style: this.cssVars\n    }, children);\n  }\n});","// Tooltip: popover wearing waistcoat\nimport { computed, defineComponent, h, ref } from 'vue';\nimport { useConfig, useTheme } from \"../../_mixins/index.mjs\";\nimport { NPopover } from \"../../popover/index.mjs\";\nimport { popoverBaseProps } from \"../../popover/src/Popover.mjs\";\nimport { tooltipLight } from \"../styles/index.mjs\";\nexport const tooltipProps = Object.assign(Object.assign({}, popoverBaseProps), useTheme.props);\nexport default defineComponent({\n  name: 'Tooltip',\n  props: tooltipProps,\n  slots: Object,\n  __popover__: true,\n  setup(props) {\n    const {\n      mergedClsPrefixRef\n    } = useConfig(props);\n    const themeRef = useTheme('Tooltip', '-tooltip', undefined, tooltipLight, props, mergedClsPrefixRef);\n    const popoverRef = ref(null);\n    const tooltipExposedMethod = {\n      syncPosition() {\n        popoverRef.value.syncPosition();\n      },\n      setShow(show) {\n        popoverRef.value.setShow(show);\n      }\n    };\n    return Object.assign(Object.assign({}, tooltipExposedMethod), {\n      popoverRef,\n      mergedTheme: themeRef,\n      popoverThemeOverrides: computed(() => {\n        return themeRef.value.self;\n      })\n    });\n  },\n  render() {\n    const {\n      mergedTheme,\n      internalExtraClass\n    } = this;\n    return h(NPopover, Object.assign(Object.assign({}, this.$props), {\n      theme: mergedTheme.peers.Popover,\n      themeOverrides: mergedTheme.peerOverrides.Popover,\n      builtinThemeOverrides: this.popoverThemeOverrides,\n      internalExtraClass: internalExtraClass.concat('tooltip'),\n      ref: 'popoverRef'\n    }), this.$slots);\n  }\n});","import { cB, cM, cNotM } from \"../../../_utils/cssr/index.mjs\";\nexport default cB('ellipsis', {\n  overflow: 'hidden'\n}, [cNotM('line-clamp', `\n white-space: nowrap;\n display: inline-block;\n vertical-align: bottom;\n max-width: 100%;\n `), cM('line-clamp', `\n display: -webkit-inline-box;\n -webkit-box-orient: vertical;\n `), cM('cursor-pointer', `\n cursor: pointer;\n `)]);","import { computed, defineComponent, h, mergeProps, onDeactivated, ref } from 'vue';\nimport { useTheme } from \"../../_mixins/index.mjs\";\nimport { useMergedClsPrefix } from \"../../_mixins/use-config.mjs\";\nimport { NTooltip } from \"../../tooltip/index.mjs\";\nimport { ellipsisLight } from \"../styles/index.mjs\";\nimport style from \"./styles/index.cssr.mjs\";\nexport function createLineClampClass(clsPrefix) {\n  return `${clsPrefix}-ellipsis--line-clamp`;\n}\nexport function createCursorClass(clsPrefix, cursor) {\n  return `${clsPrefix}-ellipsis--cursor-${cursor}`;\n}\nexport const ellipsisProps = Object.assign(Object.assign({}, useTheme.props), {\n  expandTrigger: String,\n  lineClamp: [Number, String],\n  tooltip: {\n    type: [Boolean, Object],\n    default: true\n  }\n});\nexport default defineComponent({\n  name: 'Ellipsis',\n  inheritAttrs: false,\n  props: ellipsisProps,\n  slots: Object,\n  setup(props, {\n    slots,\n    attrs\n  }) {\n    const mergedClsPrefixRef = useMergedClsPrefix();\n    const mergedTheme = useTheme('Ellipsis', '-ellipsis', style, ellipsisLight, props, mergedClsPrefixRef);\n    const triggerRef = ref(null);\n    const triggerInnerRef = ref(null);\n    const tooltipRef = ref(null);\n    const expandedRef = ref(false);\n    const ellipsisStyleRef = computed(() => {\n      const {\n        lineClamp\n      } = props;\n      const {\n        value: expanded\n      } = expandedRef;\n      if (lineClamp !== undefined) {\n        return {\n          textOverflow: '',\n          '-webkit-line-clamp': expanded ? '' : lineClamp\n        };\n      } else {\n        return {\n          textOverflow: expanded ? '' : 'ellipsis',\n          '-webkit-line-clamp': ''\n        };\n      }\n    });\n    function getTooltipDisabled() {\n      let tooltipDisabled = false;\n      const {\n        value: expanded\n      } = expandedRef;\n      if (expanded) return true;\n      const {\n        value: trigger\n      } = triggerRef;\n      if (trigger) {\n        const {\n          lineClamp\n        } = props;\n        // we need to apply style here, since the dom may be updated in\n        // nextTick, measure dom size will derive wrong result\n        syncEllipsisStyle(trigger);\n        if (lineClamp !== undefined) {\n          tooltipDisabled = trigger.scrollHeight <= trigger.offsetHeight;\n        } else {\n          const {\n            value: triggerInner\n          } = triggerInnerRef;\n          if (triggerInner) {\n            tooltipDisabled = triggerInner.getBoundingClientRect().width <= trigger.getBoundingClientRect().width;\n          }\n        }\n        syncCursorStyle(trigger, tooltipDisabled);\n      }\n      return tooltipDisabled;\n    }\n    const handleClickRef = computed(() => {\n      return props.expandTrigger === 'click' ? () => {\n        var _a;\n        const {\n          value: expanded\n        } = expandedRef;\n        if (expanded) {\n          (_a = tooltipRef.value) === null || _a === void 0 ? void 0 : _a.setShow(false);\n        }\n        expandedRef.value = !expanded;\n      } : undefined;\n    });\n    onDeactivated(() => {\n      var _a;\n      if (props.tooltip) {\n        (_a = tooltipRef.value) === null || _a === void 0 ? void 0 : _a.setShow(false);\n      }\n    });\n    const renderTrigger = () => h(\"span\", Object.assign({}, mergeProps(attrs, {\n      class: [`${mergedClsPrefixRef.value}-ellipsis`, props.lineClamp !== undefined ? createLineClampClass(mergedClsPrefixRef.value) : undefined, props.expandTrigger === 'click' ? createCursorClass(mergedClsPrefixRef.value, 'pointer') : undefined],\n      style: ellipsisStyleRef.value\n    }), {\n      ref: \"triggerRef\",\n      onClick: handleClickRef.value,\n      onMouseenter:\n      // get tooltip disabled will derive cursor style\n      props.expandTrigger === 'click' ? getTooltipDisabled : undefined\n    }), props.lineClamp ? slots : h(\"span\", {\n      ref: \"triggerInnerRef\"\n    }, slots));\n    function syncEllipsisStyle(trigger) {\n      if (!trigger) return;\n      const latestStyle = ellipsisStyleRef.value;\n      const lineClampClass = createLineClampClass(mergedClsPrefixRef.value);\n      if (props.lineClamp !== undefined) {\n        syncTriggerClass(trigger, lineClampClass, 'add');\n      } else {\n        syncTriggerClass(trigger, lineClampClass, 'remove');\n      }\n      for (const key in latestStyle) {\n        // guard can make it a little faster\n        if (trigger.style[key] !== latestStyle[key]) {\n          ;\n          trigger.style[key] = latestStyle[key];\n        }\n      }\n    }\n    function syncCursorStyle(trigger, tooltipDisabled) {\n      const cursorClass = createCursorClass(mergedClsPrefixRef.value, 'pointer');\n      if (props.expandTrigger === 'click' && !tooltipDisabled) {\n        syncTriggerClass(trigger, cursorClass, 'add');\n      } else {\n        syncTriggerClass(trigger, cursorClass, 'remove');\n      }\n    }\n    function syncTriggerClass(trigger, styleClass, action) {\n      if (action === 'add') {\n        if (!trigger.classList.contains(styleClass)) {\n          trigger.classList.add(styleClass);\n        }\n      } else {\n        if (trigger.classList.contains(styleClass)) {\n          trigger.classList.remove(styleClass);\n        }\n      }\n    }\n    return {\n      mergedTheme,\n      triggerRef,\n      triggerInnerRef,\n      tooltipRef,\n      handleClick: handleClickRef,\n      renderTrigger,\n      getTooltipDisabled\n    };\n  },\n  render() {\n    var _a;\n    const {\n      tooltip,\n      renderTrigger,\n      $slots\n    } = this;\n    if (tooltip) {\n      const {\n        mergedTheme\n      } = this;\n      return h(NTooltip, Object.assign({\n        ref: \"tooltipRef\",\n        placement: \"top\"\n      }, tooltip, {\n        getDisabled: this.getTooltipDisabled,\n        theme: mergedTheme.peers.Tooltip,\n        themeOverrides: mergedTheme.peerOverrides.Tooltip\n      }), {\n        trigger: renderTrigger,\n        default: (_a = $slots.tooltip) !== null && _a !== void 0 ? _a : $slots.default\n      });\n    } else {\n      return renderTrigger();\n    }\n  }\n});","import { createInjectionKey } from \"../../_utils/index.mjs\";\nexport const dropdownMenuInjectionKey = createInjectionKey('n-dropdown-menu');\nexport const dropdownInjectionKey = createInjectionKey('n-dropdown');\nexport const dropdownOptionInjectionKey = createInjectionKey('n-dropdown-option');","import { defineComponent, h } from 'vue';\nexport default defineComponent({\n  name: 'DropdownDivider',\n  props: {\n    clsPrefix: {\n      type: String,\n      required: true\n    }\n  },\n  render() {\n    return h(\"div\", {\n      class: `${this.clsPrefix}-dropdown-divider`\n    });\n  }\n});","import { defineComponent, h, inject } from 'vue';\nimport { render } from \"../../_utils/index.mjs\";\nimport { dropdownInjectionKey, dropdownMenuInjectionKey } from \"./context.mjs\";\nexport default defineComponent({\n  name: 'DropdownGroupHeader',\n  props: {\n    clsPrefix: {\n      type: String,\n      required: true\n    },\n    tmNode: {\n      type: Object,\n      required: true\n    }\n  },\n  setup() {\n    const {\n      showIconRef,\n      hasSubmenuRef\n    } = inject(dropdownMenuInjectionKey);\n    const {\n      renderLabelRef,\n      labelFieldRef,\n      nodePropsRef,\n      renderOptionRef\n    } = inject(dropdownInjectionKey);\n    return {\n      labelField: labelFieldRef,\n      showIcon: showIconRef,\n      hasSubmenu: hasSubmenuRef,\n      renderLabel: renderLabelRef,\n      nodeProps: nodePropsRef,\n      renderOption: renderOptionRef\n    };\n  },\n  render() {\n    var _a;\n    const {\n      clsPrefix,\n      hasSubmenu,\n      showIcon,\n      nodeProps,\n      renderLabel,\n      renderOption\n    } = this;\n    const {\n      rawNode\n    } = this.tmNode;\n    const node = h(\"div\", Object.assign({\n      class: `${clsPrefix}-dropdown-option`\n    }, nodeProps === null || nodeProps === void 0 ? void 0 : nodeProps(rawNode)), h(\"div\", {\n      class: `${clsPrefix}-dropdown-option-body ${clsPrefix}-dropdown-option-body--group`\n    }, h(\"div\", {\n      \"data-dropdown-option\": true,\n      class: [`${clsPrefix}-dropdown-option-body__prefix`, showIcon && `${clsPrefix}-dropdown-option-body__prefix--show-icon`]\n    }, render(rawNode.icon)), h(\"div\", {\n      class: `${clsPrefix}-dropdown-option-body__label`,\n      \"data-dropdown-option\": true\n    }, renderLabel ? renderLabel(rawNode) : render((_a = rawNode.title) !== null && _a !== void 0 ? _a : rawNode[this.labelField])), h(\"div\", {\n      class: [`${clsPrefix}-dropdown-option-body__suffix`, hasSubmenu && `${clsPrefix}-dropdown-option-body__suffix--has-submenu`],\n      \"data-dropdown-option\": true\n    })));\n    if (renderOption) {\n      return renderOption({\n        node,\n        option: rawNode\n      });\n    }\n    return node;\n  }\n});","import { commonLight } from \"../../_styles/common/index.mjs\";\nexport function self(vars) {\n  const {\n    textColorBase,\n    opacity1,\n    opacity2,\n    opacity3,\n    opacity4,\n    opacity5\n  } = vars;\n  return {\n    color: textColorBase,\n    opacity1Depth: opacity1,\n    opacity2Depth: opacity2,\n    opacity3Depth: opacity3,\n    opacity4Depth: opacity4,\n    opacity5Depth: opacity5\n  };\n}\nconst iconLight = {\n  name: 'Icon',\n  common: commonLight,\n  self\n};\nexport default iconLight;","import { commonDark } from \"../../_styles/common/index.mjs\";\nimport { self } from \"./light.mjs\";\nconst iconDark = {\n  name: 'Icon',\n  common: commonDark,\n  self\n};\nexport default iconDark;","import { c, cB, cM } from \"../../../_utils/cssr/index.mjs\";\n// vars:\n// --n-bezier\n// --n-color\n// --n-opacity\nexport default cB('icon', `\n height: 1em;\n width: 1em;\n line-height: 1em;\n text-align: center;\n display: inline-block;\n position: relative;\n fill: currentColor;\n`, [cM('color-transition', {\n  transition: 'color .3s var(--n-bezier)'\n}), cM('depth', {\n  color: 'var(--n-color)'\n}, [c('svg', {\n  opacity: 'var(--n-opacity)',\n  transition: 'opacity .3s var(--n-bezier)'\n})]), c('svg', {\n  height: '1em',\n  width: '1em'\n})]);","import { computed, defineComponent, h, mergeProps } from 'vue';\nimport { useConfig, useTheme, useThemeClass } from \"../../_mixins/index.mjs\";\nimport { formatLength, warn } from \"../../_utils/index.mjs\";\nimport { iconLight } from \"../styles/index.mjs\";\nimport style from \"./styles/index.cssr.mjs\";\nexport const iconProps = Object.assign(Object.assign({}, useTheme.props), {\n  depth: [String, Number],\n  size: [Number, String],\n  color: String,\n  component: [Object, Function]\n});\nexport const NIcon = defineComponent({\n  _n_icon__: true,\n  name: 'Icon',\n  inheritAttrs: false,\n  props: iconProps,\n  setup(props) {\n    const {\n      mergedClsPrefixRef,\n      inlineThemeDisabled\n    } = useConfig(props);\n    const themeRef = useTheme('Icon', '-icon', style, iconLight, props, mergedClsPrefixRef);\n    const cssVarsRef = computed(() => {\n      const {\n        depth\n      } = props;\n      const {\n        common: {\n          cubicBezierEaseInOut\n        },\n        self\n      } = themeRef.value;\n      if (depth !== undefined) {\n        const {\n          color,\n          [`opacity${depth}Depth`]: opacity\n        } = self;\n        return {\n          '--n-bezier': cubicBezierEaseInOut,\n          '--n-color': color,\n          '--n-opacity': opacity\n        };\n      }\n      return {\n        '--n-bezier': cubicBezierEaseInOut,\n        '--n-color': '',\n        '--n-opacity': ''\n      };\n    });\n    const themeClassHandle = inlineThemeDisabled ? useThemeClass('icon', computed(() => `${props.depth || 'd'}`), cssVarsRef, props) : undefined;\n    return {\n      mergedClsPrefix: mergedClsPrefixRef,\n      mergedStyle: computed(() => {\n        const {\n          size,\n          color\n        } = props;\n        return {\n          fontSize: formatLength(size),\n          color\n        };\n      }),\n      cssVars: inlineThemeDisabled ? undefined : cssVarsRef,\n      themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,\n      onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender\n    };\n  },\n  render() {\n    var _a;\n    const {\n      $parent,\n      depth,\n      mergedClsPrefix,\n      component,\n      onRender,\n      themeClass\n    } = this;\n    if ((_a = $parent === null || $parent === void 0 ? void 0 : $parent.$options) === null || _a === void 0 ? void 0 : _a._n_icon__) {\n      warn('icon', 'don\\'t wrap `n-icon` inside `n-icon`');\n    }\n    onRender === null || onRender === void 0 ? void 0 : onRender();\n    return h('i', mergeProps(this.$attrs, {\n      role: 'img',\n      class: [`${mergedClsPrefix}-icon`, themeClass, {\n        [`${mergedClsPrefix}-icon--depth`]: depth,\n        [`${mergedClsPrefix}-icon--color-transition`]: depth !== undefined\n      }],\n      style: [this.cssVars, this.mergedStyle]\n    }), component ? h(component) : this.$slots);\n  }\n});","export function isSubmenuNode(rawNode, childrenField) {\n  return rawNode.type === 'submenu' || rawNode.type === undefined && rawNode[childrenField] !== undefined;\n}\nexport function isGroupNode(rawNode) {\n  return rawNode.type === 'group';\n}\nexport function isDividerNode(rawNode) {\n  return rawNode.type === 'divider';\n}\nexport function isRenderNode(rawNode) {\n  return rawNode.type === 'render';\n}","import { happensIn } from 'seemly';\nimport { useMemo } from 'vooks';\nimport { computed, defineComponent, h, inject, mergeProps, provide, ref, Transition } from 'vue';\nimport { VBinder, VFollower, VTarget } from 'vueuc';\nimport { ChevronRightIcon } from \"../../_internal/icons/index.mjs\";\nimport { render, useDeferredTrue } from \"../../_utils/index.mjs\";\nimport { NIcon } from \"../../icon/index.mjs\";\nimport { popoverBodyInjectionKey } from \"../../popover/src/interface.mjs\";\nimport { dropdownInjectionKey, dropdownMenuInjectionKey, dropdownOptionInjectionKey } from \"./context.mjs\";\nimport NDropdownMenu from \"./DropdownMenu.mjs\";\nimport { isSubmenuNode } from \"./utils.mjs\";\nexport default defineComponent({\n  name: 'DropdownOption',\n  props: {\n    clsPrefix: {\n      type: String,\n      required: true\n    },\n    tmNode: {\n      type: Object,\n      required: true\n    },\n    parentKey: {\n      type: [String, Number],\n      default: null\n    },\n    placement: {\n      type: String,\n      default: 'right-start'\n    },\n    props: Object,\n    scrollable: Boolean\n  },\n  setup(props) {\n    const NDropdown = inject(dropdownInjectionKey);\n    const {\n      hoverKeyRef,\n      keyboardKeyRef,\n      lastToggledSubmenuKeyRef,\n      pendingKeyPathRef,\n      activeKeyPathRef,\n      animatedRef,\n      mergedShowRef,\n      renderLabelRef,\n      renderIconRef,\n      labelFieldRef,\n      childrenFieldRef,\n      renderOptionRef,\n      nodePropsRef,\n      menuPropsRef\n    } = NDropdown;\n    const NDropdownOption = inject(dropdownOptionInjectionKey, null);\n    const NDropdownMenu = inject(dropdownMenuInjectionKey);\n    const NPopoverBody = inject(popoverBodyInjectionKey);\n    const rawNodeRef = computed(() => props.tmNode.rawNode);\n    const hasSubmenuRef = computed(() => {\n      const {\n        value: childrenField\n      } = childrenFieldRef;\n      return isSubmenuNode(props.tmNode.rawNode, childrenField);\n    });\n    const mergedDisabledRef = computed(() => {\n      const {\n        disabled\n      } = props.tmNode;\n      return disabled;\n    });\n    const showSubmenuRef = computed(() => {\n      if (!hasSubmenuRef.value) return false;\n      const {\n        key,\n        disabled\n      } = props.tmNode;\n      if (disabled) return false;\n      const {\n        value: hoverKey\n      } = hoverKeyRef;\n      const {\n        value: keyboardKey\n      } = keyboardKeyRef;\n      const {\n        value: lastToggledSubmenuKey\n      } = lastToggledSubmenuKeyRef;\n      const {\n        value: pendingKeyPath\n      } = pendingKeyPathRef;\n      if (hoverKey !== null) return pendingKeyPath.includes(key);\n      if (keyboardKey !== null) {\n        return pendingKeyPath.includes(key) && pendingKeyPath[pendingKeyPath.length - 1] !== key;\n      }\n      if (lastToggledSubmenuKey !== null) return pendingKeyPath.includes(key);\n      return false;\n    });\n    const shouldDelayRef = computed(() => {\n      return keyboardKeyRef.value === null && !animatedRef.value;\n    });\n    const deferredShowSubmenuRef = useDeferredTrue(showSubmenuRef, 300, shouldDelayRef);\n    const parentEnteringSubmenuRef = computed(() => {\n      return !!(NDropdownOption === null || NDropdownOption === void 0 ? void 0 : NDropdownOption.enteringSubmenuRef.value);\n    });\n    const enteringSubmenuRef = ref(false);\n    provide(dropdownOptionInjectionKey, {\n      enteringSubmenuRef\n    });\n    // methods\n    function handleSubmenuBeforeEnter() {\n      enteringSubmenuRef.value = true;\n    }\n    function handleSubmenuAfterEnter() {\n      enteringSubmenuRef.value = false;\n    }\n    function handleMouseEnter() {\n      const {\n        parentKey,\n        tmNode\n      } = props;\n      if (tmNode.disabled) return;\n      if (!mergedShowRef.value) return;\n      lastToggledSubmenuKeyRef.value = parentKey;\n      keyboardKeyRef.value = null;\n      hoverKeyRef.value = tmNode.key;\n    }\n    function handleMouseMove() {\n      const {\n        tmNode\n      } = props;\n      if (tmNode.disabled) return;\n      if (!mergedShowRef.value) return;\n      if (hoverKeyRef.value === tmNode.key) return;\n      handleMouseEnter();\n    }\n    function handleMouseLeave(e) {\n      if (props.tmNode.disabled) return;\n      if (!mergedShowRef.value) return;\n      const {\n        relatedTarget\n      } = e;\n      if (relatedTarget && !happensIn({\n        target: relatedTarget\n      }, 'dropdownOption') && !happensIn({\n        target: relatedTarget\n      }, 'scrollbarRail')) {\n        hoverKeyRef.value = null;\n      }\n    }\n    function handleClick() {\n      const {\n        value: hasSubmenu\n      } = hasSubmenuRef;\n      const {\n        tmNode\n      } = props;\n      if (!mergedShowRef.value) return;\n      if (!hasSubmenu && !tmNode.disabled) {\n        NDropdown.doSelect(tmNode.key, tmNode.rawNode);\n        NDropdown.doUpdateShow(false);\n      }\n    }\n    return {\n      labelField: labelFieldRef,\n      renderLabel: renderLabelRef,\n      renderIcon: renderIconRef,\n      siblingHasIcon: NDropdownMenu.showIconRef,\n      siblingHasSubmenu: NDropdownMenu.hasSubmenuRef,\n      menuProps: menuPropsRef,\n      popoverBody: NPopoverBody,\n      animated: animatedRef,\n      mergedShowSubmenu: computed(() => {\n        return deferredShowSubmenuRef.value && !parentEnteringSubmenuRef.value;\n      }),\n      rawNode: rawNodeRef,\n      hasSubmenu: hasSubmenuRef,\n      pending: useMemo(() => {\n        const {\n          value: pendingKeyPath\n        } = pendingKeyPathRef;\n        const {\n          key\n        } = props.tmNode;\n        return pendingKeyPath.includes(key);\n      }),\n      childActive: useMemo(() => {\n        const {\n          value: activeKeyPath\n        } = activeKeyPathRef;\n        const {\n          key\n        } = props.tmNode;\n        const index = activeKeyPath.findIndex(k => key === k);\n        if (index === -1) return false;\n        return index < activeKeyPath.length - 1;\n      }),\n      active: useMemo(() => {\n        const {\n          value: activeKeyPath\n        } = activeKeyPathRef;\n        const {\n          key\n        } = props.tmNode;\n        const index = activeKeyPath.findIndex(k => key === k);\n        if (index === -1) return false;\n        return index === activeKeyPath.length - 1;\n      }),\n      mergedDisabled: mergedDisabledRef,\n      renderOption: renderOptionRef,\n      nodeProps: nodePropsRef,\n      handleClick,\n      handleMouseMove,\n      handleMouseEnter,\n      handleMouseLeave,\n      handleSubmenuBeforeEnter,\n      handleSubmenuAfterEnter\n    };\n  },\n  render() {\n    var _a, _b;\n    const {\n      animated,\n      rawNode,\n      mergedShowSubmenu,\n      clsPrefix,\n      siblingHasIcon,\n      siblingHasSubmenu,\n      renderLabel,\n      renderIcon,\n      renderOption,\n      nodeProps,\n      props,\n      scrollable\n    } = this;\n    let submenuVNode = null;\n    if (mergedShowSubmenu) {\n      const submenuNodeProps = (_a = this.menuProps) === null || _a === void 0 ? void 0 : _a.call(this, rawNode, rawNode.children);\n      submenuVNode = h(NDropdownMenu, Object.assign({}, submenuNodeProps, {\n        clsPrefix: clsPrefix,\n        scrollable: this.scrollable,\n        tmNodes: this.tmNode.children,\n        parentKey: this.tmNode.key\n      }));\n    }\n    const builtinProps = {\n      class: [`${clsPrefix}-dropdown-option-body`, this.pending && `${clsPrefix}-dropdown-option-body--pending`, this.active && `${clsPrefix}-dropdown-option-body--active`, this.childActive && `${clsPrefix}-dropdown-option-body--child-active`, this.mergedDisabled && `${clsPrefix}-dropdown-option-body--disabled`],\n      onMousemove: this.handleMouseMove,\n      onMouseenter: this.handleMouseEnter,\n      onMouseleave: this.handleMouseLeave,\n      onClick: this.handleClick\n    };\n    const optionNodeProps = nodeProps === null || nodeProps === void 0 ? void 0 : nodeProps(rawNode);\n    const node = h(\"div\", Object.assign({\n      class: [`${clsPrefix}-dropdown-option`, optionNodeProps === null || optionNodeProps === void 0 ? void 0 : optionNodeProps.class],\n      \"data-dropdown-option\": true\n    }, optionNodeProps), h('div', mergeProps(builtinProps, props), [h(\"div\", {\n      class: [`${clsPrefix}-dropdown-option-body__prefix`, siblingHasIcon && `${clsPrefix}-dropdown-option-body__prefix--show-icon`]\n    }, [renderIcon ? renderIcon(rawNode) : render(rawNode.icon)]), h(\"div\", {\n      \"data-dropdown-option\": true,\n      class: `${clsPrefix}-dropdown-option-body__label`\n    }, renderLabel ? renderLabel(rawNode) : render((_b = rawNode[this.labelField]) !== null && _b !== void 0 ? _b : rawNode.title)), h(\"div\", {\n      \"data-dropdown-option\": true,\n      class: [`${clsPrefix}-dropdown-option-body__suffix`, siblingHasSubmenu && `${clsPrefix}-dropdown-option-body__suffix--has-submenu`]\n    }, this.hasSubmenu ? h(NIcon, null, {\n      default: () => h(ChevronRightIcon, null)\n    }) : null)]), this.hasSubmenu ? h(VBinder, null, {\n      default: () => [h(VTarget, null, {\n        default: () => h(\"div\", {\n          class: `${clsPrefix}-dropdown-offset-container`\n        }, h(VFollower, {\n          show: this.mergedShowSubmenu,\n          placement: this.placement,\n          to: scrollable ? this.popoverBody || undefined : undefined,\n          teleportDisabled: !scrollable\n        }, {\n          default: () => {\n            return h(\"div\", {\n              class: `${clsPrefix}-dropdown-menu-wrapper`\n            }, animated ? h(Transition, {\n              onBeforeEnter: this.handleSubmenuBeforeEnter,\n              onAfterEnter: this.handleSubmenuAfterEnter,\n              name: \"fade-in-scale-up-transition\",\n              appear: true\n            }, {\n              default: () => submenuVNode\n            }) : submenuVNode);\n          }\n        }))\n      })]\n    }) : null);\n    if (renderOption) {\n      return renderOption({\n        node,\n        option: rawNode\n      });\n    }\n    return node;\n  }\n});","import { defineComponent, Fragment, h } from 'vue';\nimport { warn } from \"../../_utils/index.mjs\";\nimport NDropdownDivider from \"./DropdownDivider.mjs\";\nimport NDropdownGroupHeader from \"./DropdownGroupHeader.mjs\";\nimport NDropdownOption from \"./DropdownOption.mjs\";\nimport { isDividerNode } from \"./utils.mjs\";\nexport default defineComponent({\n  name: 'NDropdownGroup',\n  props: {\n    clsPrefix: {\n      type: String,\n      required: true\n    },\n    tmNode: {\n      type: Object,\n      required: true\n    },\n    parentKey: {\n      type: [String, Number],\n      default: null\n    }\n  },\n  render() {\n    const {\n      tmNode,\n      parentKey,\n      clsPrefix\n    } = this;\n    const {\n      children\n    } = tmNode;\n    return h(Fragment, null, h(NDropdownGroupHeader, {\n      clsPrefix: clsPrefix,\n      tmNode: tmNode,\n      key: tmNode.key\n    }), children === null || children === void 0 ? void 0 : children.map(child => {\n      const {\n        rawNode\n      } = child;\n      if (rawNode.show === false) return null;\n      if (isDividerNode(rawNode)) {\n        return h(NDropdownDivider, {\n          clsPrefix,\n          key: child.key\n        });\n      }\n      if (child.isGroup) {\n        warn('dropdown', '`group` node is not allowed to be put in `group` node.');\n        return null;\n      }\n      return h(NDropdownOption, {\n        clsPrefix: clsPrefix,\n        tmNode: child,\n        parentKey: parentKey,\n        key: child.key\n      });\n    }));\n  }\n});","import { defineComponent, h } from 'vue';\nexport default defineComponent({\n  name: 'DropdownRenderOption',\n  props: {\n    tmNode: {\n      type: Object,\n      required: true\n    }\n  },\n  render() {\n    const {\n      rawNode: {\n        render,\n        props\n      }\n    } = this.tmNode;\n    return h('div', props, [render === null || render === void 0 ? void 0 : render()]);\n  }\n});","import { computed, defineComponent, h, inject, provide, ref } from 'vue';\nimport { NxScrollbar } from \"../../_internal/scrollbar/index.mjs\";\nimport { drawerBodyInjectionKey } from \"../../drawer/src/interface.mjs\";\nimport { modalBodyInjectionKey } from \"../../modal/src/interface.mjs\";\nimport { popoverBodyInjectionKey } from \"../../popover/src/interface.mjs\";\nimport { renderArrow } from \"../../popover/src/PopoverBody.mjs\";\nimport { dropdownInjectionKey, dropdownMenuInjectionKey } from \"./context.mjs\";\nimport NDropdownDivider from \"./DropdownDivider.mjs\";\nimport NDropdownGroup from \"./DropdownGroup.mjs\";\nimport NDropdownOption from \"./DropdownOption.mjs\";\nimport NDropdownRenderOption from \"./DropdownRenderOption.mjs\";\nimport { isDividerNode, isGroupNode, isRenderNode, isSubmenuNode } from \"./utils.mjs\";\nexport default defineComponent({\n  name: 'DropdownMenu',\n  props: {\n    scrollable: Boolean,\n    showArrow: Boolean,\n    arrowStyle: [String, Object],\n    clsPrefix: {\n      type: String,\n      required: true\n    },\n    tmNodes: {\n      type: Array,\n      default: () => []\n    },\n    parentKey: {\n      type: [String, Number],\n      default: null\n    }\n  },\n  setup(props) {\n    const {\n      renderIconRef,\n      childrenFieldRef\n    } = inject(dropdownInjectionKey);\n    provide(dropdownMenuInjectionKey, {\n      showIconRef: computed(() => {\n        const renderIcon = renderIconRef.value;\n        return props.tmNodes.some(tmNode => {\n          var _a;\n          if (tmNode.isGroup) {\n            return (_a = tmNode.children) === null || _a === void 0 ? void 0 : _a.some(({\n              rawNode: rawChild\n            }) => renderIcon ? renderIcon(rawChild) : rawChild.icon);\n          }\n          const {\n            rawNode\n          } = tmNode;\n          return renderIcon ? renderIcon(rawNode) : rawNode.icon;\n        });\n      }),\n      hasSubmenuRef: computed(() => {\n        const {\n          value: childrenField\n        } = childrenFieldRef;\n        return props.tmNodes.some(tmNode => {\n          var _a;\n          if (tmNode.isGroup) {\n            return (_a = tmNode.children) === null || _a === void 0 ? void 0 : _a.some(({\n              rawNode: rawChild\n            }) => isSubmenuNode(rawChild, childrenField));\n          }\n          const {\n            rawNode\n          } = tmNode;\n          return isSubmenuNode(rawNode, childrenField);\n        });\n      })\n    });\n    const bodyRef = ref(null);\n    provide(modalBodyInjectionKey, null);\n    provide(drawerBodyInjectionKey, null);\n    provide(popoverBodyInjectionKey, bodyRef);\n    return {\n      bodyRef\n    };\n  },\n  render() {\n    const {\n      parentKey,\n      clsPrefix,\n      scrollable\n    } = this;\n    const menuOptionsNode = this.tmNodes.map(tmNode => {\n      const {\n        rawNode\n      } = tmNode;\n      if (rawNode.show === false) return null;\n      if (isRenderNode(rawNode)) {\n        return h(NDropdownRenderOption, {\n          tmNode: tmNode,\n          key: tmNode.key\n        });\n      }\n      if (isDividerNode(rawNode)) {\n        return h(NDropdownDivider, {\n          clsPrefix: clsPrefix,\n          key: tmNode.key\n        });\n      }\n      if (isGroupNode(rawNode)) {\n        return h(NDropdownGroup, {\n          clsPrefix: clsPrefix,\n          tmNode: tmNode,\n          parentKey: parentKey,\n          key: tmNode.key\n        });\n      }\n      return h(NDropdownOption, {\n        clsPrefix: clsPrefix,\n        tmNode: tmNode,\n        parentKey: parentKey,\n        key: tmNode.key,\n        props: rawNode.props,\n        scrollable: scrollable\n      });\n    });\n    return h(\"div\", {\n      class: [`${clsPrefix}-dropdown-menu`, scrollable && `${clsPrefix}-dropdown-menu--scrollable`],\n      ref: \"bodyRef\"\n    }, scrollable ? h(NxScrollbar, {\n      contentClass: `${clsPrefix}-dropdown-menu__content`\n    }, {\n      default: () => menuOptionsNode\n    }) : menuOptionsNode, this.showArrow ? renderArrow({\n      clsPrefix,\n      arrowStyle: this.arrowStyle,\n      arrowClass: undefined,\n      arrowWrapperClass: undefined,\n      arrowWrapperStyle: undefined\n    }) : null);\n  }\n});","import { fadeInScaleUpTransition } from \"../../../_styles/transitions/fade-in-scale-up.cssr.mjs\";\nimport { c, cB, cE, cM, cNotM } from \"../../../_utils/cssr/index.mjs\";\n// vars:\n// --n-bezier\n// --n-font-size\n// --n-padding\n// --n-border-radius\n// --n-option-height\n// --n-option-prefix-width\n// --n-option-icon-prefix-width\n// --n-option-suffix-width\n// --n-option-icon-suffix-width\n// --n-color\n// --n-option-color-hover\n// --n-option-color-active\n// --n-divider-color\n// --n-option-text-color\n// --n-option-text-color-hover\n// --n-option-text-color-active\n// --n-option-text-color-child-active\n// --n-prefix-color\n// --n-suffix-color\n// --n-option-icon-size\n// --n-option-opacity-disabled\n// shared with popover\n// --n-box-shadow\nexport default cB('dropdown-menu', `\n transform-origin: var(--v-transform-origin);\n background-color: var(--n-color);\n border-radius: var(--n-border-radius);\n box-shadow: var(--n-box-shadow);\n position: relative;\n transition:\n background-color .3s var(--n-bezier),\n box-shadow .3s var(--n-bezier);\n`, [fadeInScaleUpTransition(), cB('dropdown-option', `\n position: relative;\n `, [c('a', `\n text-decoration: none;\n color: inherit;\n outline: none;\n `, [c('&::before', `\n content: \"\";\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n `)]), cB('dropdown-option-body', `\n display: flex;\n cursor: pointer;\n position: relative;\n height: var(--n-option-height);\n line-height: var(--n-option-height);\n font-size: var(--n-font-size);\n color: var(--n-option-text-color);\n transition: color .3s var(--n-bezier);\n `, [c('&::before', `\n content: \"\";\n position: absolute;\n top: 0;\n bottom: 0;\n left: 4px;\n right: 4px;\n transition: background-color .3s var(--n-bezier);\n border-radius: var(--n-border-radius);\n `), cNotM('disabled', [cM('pending', `\n color: var(--n-option-text-color-hover);\n `, [cE('prefix, suffix', `\n color: var(--n-option-text-color-hover);\n `), c('&::before', 'background-color: var(--n-option-color-hover);')]), cM('active', `\n color: var(--n-option-text-color-active);\n `, [cE('prefix, suffix', `\n color: var(--n-option-text-color-active);\n `), c('&::before', 'background-color: var(--n-option-color-active);')]), cM('child-active', `\n color: var(--n-option-text-color-child-active);\n `, [cE('prefix, suffix', `\n color: var(--n-option-text-color-child-active);\n `)])]), cM('disabled', `\n cursor: not-allowed;\n opacity: var(--n-option-opacity-disabled);\n `), cM('group', `\n font-size: calc(var(--n-font-size) - 1px);\n color: var(--n-group-header-text-color);\n `, [cE('prefix', `\n width: calc(var(--n-option-prefix-width) / 2);\n `, [cM('show-icon', `\n width: calc(var(--n-option-icon-prefix-width) / 2);\n `)])]), cE('prefix', `\n width: var(--n-option-prefix-width);\n display: flex;\n justify-content: center;\n align-items: center;\n color: var(--n-prefix-color);\n transition: color .3s var(--n-bezier);\n z-index: 1;\n `, [cM('show-icon', `\n width: var(--n-option-icon-prefix-width);\n `), cB('icon', `\n font-size: var(--n-option-icon-size);\n `)]), cE('label', `\n white-space: nowrap;\n flex: 1;\n z-index: 1;\n `), cE('suffix', `\n box-sizing: border-box;\n flex-grow: 0;\n flex-shrink: 0;\n display: flex;\n justify-content: flex-end;\n align-items: center;\n min-width: var(--n-option-suffix-width);\n padding: 0 8px;\n transition: color .3s var(--n-bezier);\n color: var(--n-suffix-color);\n z-index: 1;\n `, [cM('has-submenu', `\n width: var(--n-option-icon-suffix-width);\n `), cB('icon', `\n font-size: var(--n-option-icon-size);\n `)]), cB('dropdown-menu', 'pointer-events: all;')]), cB('dropdown-offset-container', `\n pointer-events: none;\n position: absolute;\n left: 0;\n right: 0;\n top: -4px;\n bottom: -4px;\n `)]), cB('dropdown-divider', `\n transition: background-color .3s var(--n-bezier);\n background-color: var(--n-divider-color);\n height: 1px;\n margin: 4px 0;\n `), cB('dropdown-menu-wrapper', `\n transform-origin: var(--v-transform-origin);\n width: fit-content;\n `), c('>', [cB('scrollbar', `\n height: inherit;\n max-height: inherit;\n `)]), cNotM('scrollable', `\n padding: var(--n-padding);\n `), cM('scrollable', [cE('content', `\n padding: var(--n-padding);\n `)])]);","import { createTreeMate } from 'treemate';\nimport { useKeyboard, useMemo, useMergedState } from 'vooks';\nimport { computed, defineComponent, h, mergeProps, provide, ref, toRef, watch } from 'vue';\nimport { useConfig, useTheme, useThemeClass } from \"../../_mixins/index.mjs\";\nimport { call, createKey, createRefSetter, keep } from \"../../_utils/index.mjs\";\nimport { NPopover } from \"../../popover/index.mjs\";\nimport { popoverBaseProps } from \"../../popover/src/Popover.mjs\";\nimport { dropdownLight } from \"../styles/index.mjs\";\nimport { dropdownInjectionKey } from \"./context.mjs\";\nimport NDropdownMenu from \"./DropdownMenu.mjs\";\nimport style from \"./styles/index.cssr.mjs\";\nconst dropdownBaseProps = {\n  animated: {\n    type: Boolean,\n    default: true\n  },\n  keyboard: {\n    type: Boolean,\n    default: true\n  },\n  size: {\n    type: String,\n    default: 'medium'\n  },\n  inverted: Boolean,\n  placement: {\n    type: String,\n    default: 'bottom'\n  },\n  onSelect: [Function, Array],\n  options: {\n    type: Array,\n    default: () => []\n  },\n  menuProps: Function,\n  showArrow: Boolean,\n  renderLabel: Function,\n  renderIcon: Function,\n  renderOption: Function,\n  nodeProps: Function,\n  labelField: {\n    type: String,\n    default: 'label'\n  },\n  keyField: {\n    type: String,\n    default: 'key'\n  },\n  childrenField: {\n    type: String,\n    default: 'children'\n  },\n  // for menu, not documented\n  value: [String, Number]\n};\nconst popoverPropKeys = Object.keys(popoverBaseProps);\nexport const dropdownProps = Object.assign(Object.assign(Object.assign({}, popoverBaseProps), dropdownBaseProps), useTheme.props);\nexport default defineComponent({\n  name: 'Dropdown',\n  inheritAttrs: false,\n  props: dropdownProps,\n  setup(props) {\n    const uncontrolledShowRef = ref(false);\n    const mergedShowRef = useMergedState(toRef(props, 'show'), uncontrolledShowRef);\n    const treemateRef = computed(() => {\n      const {\n        keyField,\n        childrenField\n      } = props;\n      return createTreeMate(props.options, {\n        getKey(node) {\n          return node[keyField];\n        },\n        getDisabled(node) {\n          return node.disabled === true;\n        },\n        getIgnored(node) {\n          return node.type === 'divider' || node.type === 'render';\n        },\n        getChildren(node) {\n          return node[childrenField];\n        }\n      });\n    });\n    const tmNodesRef = computed(() => {\n      return treemateRef.value.treeNodes;\n    });\n    const hoverKeyRef = ref(null);\n    const keyboardKeyRef = ref(null);\n    const lastToggledSubmenuKeyRef = ref(null);\n    const pendingKeyRef = computed(() => {\n      var _a, _b, _c;\n      return (_c = (_b = (_a = hoverKeyRef.value) !== null && _a !== void 0 ? _a : keyboardKeyRef.value) !== null && _b !== void 0 ? _b : lastToggledSubmenuKeyRef.value) !== null && _c !== void 0 ? _c : null;\n    });\n    const pendingKeyPathRef = computed(() => treemateRef.value.getPath(pendingKeyRef.value).keyPath);\n    const activeKeyPathRef = computed(() => treemateRef.value.getPath(props.value).keyPath);\n    const keyboardEnabledRef = useMemo(() => {\n      return props.keyboard && mergedShowRef.value;\n    });\n    useKeyboard({\n      keydown: {\n        ArrowUp: {\n          prevent: true,\n          handler: handleKeydownUp\n        },\n        ArrowRight: {\n          prevent: true,\n          handler: handleKeydownRight\n        },\n        ArrowDown: {\n          prevent: true,\n          handler: handleKeydownDown\n        },\n        ArrowLeft: {\n          prevent: true,\n          handler: handleKeydownLeft\n        },\n        Enter: {\n          prevent: true,\n          handler: handleKeydownEnter\n        },\n        Escape: handleKeydownEsc\n      }\n    }, keyboardEnabledRef);\n    const {\n      mergedClsPrefixRef,\n      inlineThemeDisabled\n    } = useConfig(props);\n    const themeRef = useTheme('Dropdown', '-dropdown', style, dropdownLight, props, mergedClsPrefixRef);\n    provide(dropdownInjectionKey, {\n      labelFieldRef: toRef(props, 'labelField'),\n      childrenFieldRef: toRef(props, 'childrenField'),\n      renderLabelRef: toRef(props, 'renderLabel'),\n      renderIconRef: toRef(props, 'renderIcon'),\n      hoverKeyRef,\n      keyboardKeyRef,\n      lastToggledSubmenuKeyRef,\n      pendingKeyPathRef,\n      activeKeyPathRef,\n      animatedRef: toRef(props, 'animated'),\n      mergedShowRef,\n      nodePropsRef: toRef(props, 'nodeProps'),\n      renderOptionRef: toRef(props, 'renderOption'),\n      menuPropsRef: toRef(props, 'menuProps'),\n      doSelect,\n      doUpdateShow\n    });\n    // watch\n    watch(mergedShowRef, value => {\n      if (!props.animated && !value) {\n        clearPendingState();\n      }\n    });\n    // methods\n    function doSelect(key, node) {\n      const {\n        onSelect\n      } = props;\n      if (onSelect) call(onSelect, key, node);\n    }\n    function doUpdateShow(value) {\n      const {\n        'onUpdate:show': _onUpdateShow,\n        onUpdateShow\n      } = props;\n      if (_onUpdateShow) call(_onUpdateShow, value);\n      if (onUpdateShow) call(onUpdateShow, value);\n      uncontrolledShowRef.value = value;\n    }\n    function clearPendingState() {\n      hoverKeyRef.value = null;\n      keyboardKeyRef.value = null;\n      lastToggledSubmenuKeyRef.value = null;\n    }\n    function handleKeydownEsc() {\n      doUpdateShow(false);\n    }\n    function handleKeydownLeft() {\n      handleKeydown('left');\n    }\n    function handleKeydownRight() {\n      handleKeydown('right');\n    }\n    function handleKeydownUp() {\n      handleKeydown('up');\n    }\n    function handleKeydownDown() {\n      handleKeydown('down');\n    }\n    function handleKeydownEnter() {\n      const pendingNode = getPendingNode();\n      if ((pendingNode === null || pendingNode === void 0 ? void 0 : pendingNode.isLeaf) && mergedShowRef.value) {\n        doSelect(pendingNode.key, pendingNode.rawNode);\n        doUpdateShow(false);\n      }\n    }\n    function getPendingNode() {\n      var _a;\n      const {\n        value: treeMate\n      } = treemateRef;\n      const {\n        value: pendingKey\n      } = pendingKeyRef;\n      if (!treeMate || pendingKey === null) return null;\n      return (_a = treeMate.getNode(pendingKey)) !== null && _a !== void 0 ? _a : null;\n    }\n    function handleKeydown(direction) {\n      const {\n        value: pendingKey\n      } = pendingKeyRef;\n      const {\n        value: {\n          getFirstAvailableNode\n        }\n      } = treemateRef;\n      let nextKeyboardKey = null;\n      if (pendingKey === null) {\n        const firstNode = getFirstAvailableNode();\n        if (firstNode !== null) {\n          nextKeyboardKey = firstNode.key;\n        }\n      } else {\n        const currentNode = getPendingNode();\n        if (currentNode) {\n          let nextNode;\n          switch (direction) {\n            case 'down':\n              nextNode = currentNode.getNext();\n              break;\n            case 'up':\n              nextNode = currentNode.getPrev();\n              break;\n            case 'right':\n              nextNode = currentNode.getChild();\n              break;\n            case 'left':\n              nextNode = currentNode.getParent();\n              break;\n          }\n          if (nextNode) nextKeyboardKey = nextNode.key;\n        }\n      }\n      if (nextKeyboardKey !== null) {\n        hoverKeyRef.value = null;\n        keyboardKeyRef.value = nextKeyboardKey;\n      }\n    }\n    const cssVarsRef = computed(() => {\n      const {\n        size,\n        inverted\n      } = props;\n      const {\n        common: {\n          cubicBezierEaseInOut\n        },\n        self\n      } = themeRef.value;\n      const {\n        padding,\n        dividerColor,\n        borderRadius,\n        optionOpacityDisabled,\n        [createKey('optionIconSuffixWidth', size)]: optionIconSuffixWidth,\n        [createKey('optionSuffixWidth', size)]: optionSuffixWidth,\n        [createKey('optionIconPrefixWidth', size)]: optionIconPrefixWidth,\n        [createKey('optionPrefixWidth', size)]: optionPrefixWidth,\n        [createKey('fontSize', size)]: fontSize,\n        [createKey('optionHeight', size)]: optionHeight,\n        [createKey('optionIconSize', size)]: optionIconSize\n      } = self;\n      const vars = {\n        '--n-bezier': cubicBezierEaseInOut,\n        '--n-font-size': fontSize,\n        '--n-padding': padding,\n        '--n-border-radius': borderRadius,\n        '--n-option-height': optionHeight,\n        '--n-option-prefix-width': optionPrefixWidth,\n        '--n-option-icon-prefix-width': optionIconPrefixWidth,\n        '--n-option-suffix-width': optionSuffixWidth,\n        '--n-option-icon-suffix-width': optionIconSuffixWidth,\n        '--n-option-icon-size': optionIconSize,\n        '--n-divider-color': dividerColor,\n        '--n-option-opacity-disabled': optionOpacityDisabled\n      };\n      // writing like this is the fastest method\n      if (inverted) {\n        vars['--n-color'] = self.colorInverted;\n        vars['--n-option-color-hover'] = self.optionColorHoverInverted;\n        vars['--n-option-color-active'] = self.optionColorActiveInverted;\n        vars['--n-option-text-color'] = self.optionTextColorInverted;\n        vars['--n-option-text-color-hover'] = self.optionTextColorHoverInverted;\n        vars['--n-option-text-color-active'] = self.optionTextColorActiveInverted;\n        vars['--n-option-text-color-child-active'] = self.optionTextColorChildActiveInverted;\n        vars['--n-prefix-color'] = self.prefixColorInverted;\n        vars['--n-suffix-color'] = self.suffixColorInverted;\n        vars['--n-group-header-text-color'] = self.groupHeaderTextColorInverted;\n      } else {\n        vars['--n-color'] = self.color;\n        vars['--n-option-color-hover'] = self.optionColorHover;\n        vars['--n-option-color-active'] = self.optionColorActive;\n        vars['--n-option-text-color'] = self.optionTextColor;\n        vars['--n-option-text-color-hover'] = self.optionTextColorHover;\n        vars['--n-option-text-color-active'] = self.optionTextColorActive;\n        vars['--n-option-text-color-child-active'] = self.optionTextColorChildActive;\n        vars['--n-prefix-color'] = self.prefixColor;\n        vars['--n-suffix-color'] = self.suffixColor;\n        vars['--n-group-header-text-color'] = self.groupHeaderTextColor;\n      }\n      return vars;\n    });\n    const themeClassHandle = inlineThemeDisabled ? useThemeClass('dropdown', computed(() => `${props.size[0]}${props.inverted ? 'i' : ''}`), cssVarsRef, props) : undefined;\n    return {\n      mergedClsPrefix: mergedClsPrefixRef,\n      mergedTheme: themeRef,\n      // data\n      tmNodes: tmNodesRef,\n      // show\n      mergedShow: mergedShowRef,\n      // methods\n      handleAfterLeave: () => {\n        if (!props.animated) return;\n        clearPendingState();\n      },\n      doUpdateShow,\n      cssVars: inlineThemeDisabled ? undefined : cssVarsRef,\n      themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,\n      onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender\n    };\n  },\n  render() {\n    const renderPopoverBody = (className, ref, style, onMouseenter, onMouseleave) => {\n      var _a;\n      const {\n        mergedClsPrefix,\n        menuProps\n      } = this;\n      (_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this);\n      const menuNodeProps = (menuProps === null || menuProps === void 0 ? void 0 : menuProps(undefined, this.tmNodes.map(v => v.rawNode))) || {};\n      const dropdownProps = {\n        ref: createRefSetter(ref),\n        class: [className, `${mergedClsPrefix}-dropdown`, this.themeClass],\n        clsPrefix: mergedClsPrefix,\n        tmNodes: this.tmNodes,\n        style: [...style, this.cssVars],\n        showArrow: this.showArrow,\n        arrowStyle: this.arrowStyle,\n        scrollable: this.scrollable,\n        onMouseenter,\n        onMouseleave\n      };\n      return h(NDropdownMenu, mergeProps(this.$attrs, dropdownProps, menuNodeProps));\n    };\n    const {\n      mergedTheme\n    } = this;\n    const popoverProps = {\n      show: this.mergedShow,\n      theme: mergedTheme.peers.Popover,\n      themeOverrides: mergedTheme.peerOverrides.Popover,\n      internalOnAfterLeave: this.handleAfterLeave,\n      internalRenderBody: renderPopoverBody,\n      onUpdateShow: this.doUpdateShow,\n      'onUpdate:show': undefined\n    };\n    return h(NPopover, Object.assign({}, keep(this.$props, popoverPropKeys), popoverProps), {\n      trigger: () => {\n        var _a, _b;\n        return (_b = (_a = this.$slots).default) === null || _b === void 0 ? void 0 : _b.call(_a);\n      }\n    });\n  }\n});","export default {\n  itemFontSize: '12px',\n  itemHeight: '36px',\n  itemWidth: '52px',\n  panelActionPadding: '8px 0'\n};","import { scrollbarLight } from \"../../_internal/scrollbar/styles/index.mjs\";\nimport { createTheme } from \"../../_mixins/index.mjs\";\nimport { commonLight } from \"../../_styles/common/index.mjs\";\nimport { buttonLight } from \"../../button/styles/index.mjs\";\nimport { inputLight } from \"../../input/styles/index.mjs\";\nimport commonVars from \"./_common.mjs\";\nexport function self(vars) {\n  const {\n    popoverColor,\n    textColor2,\n    primaryColor,\n    hoverColor,\n    dividerColor,\n    opacityDisabled,\n    boxShadow2,\n    borderRadius,\n    iconColor,\n    iconColorDisabled\n  } = vars;\n  return Object.assign(Object.assign({}, commonVars), {\n    panelColor: popoverColor,\n    panelBoxShadow: boxShadow2,\n    panelDividerColor: dividerColor,\n    itemTextColor: textColor2,\n    itemTextColorActive: primaryColor,\n    itemColorHover: hoverColor,\n    itemOpacityDisabled: opacityDisabled,\n    itemBorderRadius: borderRadius,\n    borderRadius,\n    iconColor,\n    iconColorDisabled\n  });\n}\nconst timePickerLight = createTheme({\n  name: 'TimePicker',\n  common: commonLight,\n  peers: {\n    Scrollbar: scrollbarLight,\n    Button: buttonLight,\n    Input: inputLight\n  },\n  self\n});\nexport default timePickerLight;","import { scrollbarDark } from \"../../_internal/scrollbar/styles/index.mjs\";\nimport { commonDark } from \"../../_styles/common/index.mjs\";\nimport { buttonDark } from \"../../button/styles/index.mjs\";\nimport { inputDark } from \"../../input/styles/index.mjs\";\nimport { self } from \"./light.mjs\";\nconst timePickerDark = {\n  name: 'TimePicker',\n  common: commonDark,\n  peers: {\n    Scrollbar: scrollbarDark,\n    Button: buttonDark,\n    Input: inputDark\n  },\n  self\n};\nexport default timePickerDark;","export default {\n  itemSize: '24px',\n  itemCellWidth: '38px',\n  itemCellHeight: '32px',\n  scrollItemWidth: '80px',\n  scrollItemHeight: '40px',\n  panelExtraFooterPadding: '8px 12px',\n  panelActionPadding: '8px 12px',\n  calendarTitlePadding: '0',\n  calendarTitleHeight: '28px',\n  arrowSize: '14px',\n  panelHeaderPadding: '8px 12px',\n  calendarDaysHeight: '32px',\n  calendarTitleGridTempateColumns: '28px 28px 1fr 28px 28px',\n  // type\n  calendarLeftPaddingDate: '6px 12px 4px 12px',\n  calendarLeftPaddingDatetime: '4px 12px',\n  calendarLeftPaddingDaterange: '6px 12px 4px 12px',\n  calendarLeftPaddingDatetimerange: '4px 12px',\n  calendarLeftPaddingMonth: '0',\n  // TODO: make it actually effective\n  calendarLeftPaddingYear: '0',\n  calendarLeftPaddingQuarter: '0',\n  calendarLeftPaddingMonthrange: '0',\n  calendarLeftPaddingQuarterrange: '0',\n  calendarLeftPaddingYearrange: '0',\n  calendarLeftPaddingWeek: '6px 12px 4px 12px',\n  calendarRightPaddingDate: '6px 12px 4px 12px',\n  calendarRightPaddingDatetime: '4px 12px',\n  calendarRightPaddingDaterange: '6px 12px 4px 12px',\n  calendarRightPaddingDatetimerange: '4px 12px',\n  calendarRightPaddingMonth: '0',\n  calendarRightPaddingYear: '0',\n  calendarRightPaddingQuarter: '0',\n  calendarRightPaddingMonthrange: '0',\n  calendarRightPaddingQuarterrange: '0',\n  calendarRightPaddingYearrange: '0',\n  calendarRightPaddingWeek: '0'\n};","import { changeColor } from 'seemly';\nimport { scrollbarLight } from \"../../_internal/scrollbar/styles/index.mjs\";\nimport { createTheme } from \"../../_mixins/index.mjs\";\nimport { commonLight } from \"../../_styles/common/index.mjs\";\nimport { buttonLight } from \"../../button/styles/index.mjs\";\nimport { inputLight } from \"../../input/styles/index.mjs\";\nimport { timePickerLight } from \"../../time-picker/styles/index.mjs\";\nimport commonVars from \"./_common.mjs\";\nexport function self(vars) {\n  const {\n    hoverColor,\n    fontSize,\n    textColor2,\n    textColorDisabled,\n    popoverColor,\n    primaryColor,\n    borderRadiusSmall,\n    iconColor,\n    iconColorDisabled,\n    textColor1,\n    dividerColor,\n    boxShadow2,\n    borderRadius,\n    fontWeightStrong\n  } = vars;\n  return Object.assign(Object.assign({}, commonVars), {\n    itemFontSize: fontSize,\n    calendarDaysFontSize: fontSize,\n    calendarTitleFontSize: fontSize,\n    itemTextColor: textColor2,\n    itemTextColorDisabled: textColorDisabled,\n    itemTextColorActive: popoverColor,\n    itemTextColorCurrent: primaryColor,\n    itemColorIncluded: changeColor(primaryColor, {\n      alpha: 0.1\n    }),\n    itemColorHover: hoverColor,\n    itemColorDisabled: hoverColor,\n    itemColorActive: primaryColor,\n    itemBorderRadius: borderRadiusSmall,\n    panelColor: popoverColor,\n    panelTextColor: textColor2,\n    arrowColor: iconColor,\n    calendarTitleTextColor: textColor1,\n    calendarTitleColorHover: hoverColor,\n    calendarDaysTextColor: textColor2,\n    panelHeaderDividerColor: dividerColor,\n    calendarDaysDividerColor: dividerColor,\n    calendarDividerColor: dividerColor,\n    panelActionDividerColor: dividerColor,\n    panelBoxShadow: boxShadow2,\n    panelBorderRadius: borderRadius,\n    calendarTitleFontWeight: fontWeightStrong,\n    scrollItemBorderRadius: borderRadius,\n    iconColor,\n    iconColorDisabled\n  });\n}\nconst datePickerLight = createTheme({\n  name: 'DatePicker',\n  common: commonLight,\n  peers: {\n    Input: inputLight,\n    Button: buttonLight,\n    TimePicker: timePickerLight,\n    Scrollbar: scrollbarLight\n  },\n  self\n});\nexport default datePickerLight;","import { changeColor, composite } from 'seemly';\nimport { scrollbarDark } from \"../../_internal/scrollbar/styles/index.mjs\";\nimport { commonDark } from \"../../_styles/common/index.mjs\";\nimport { buttonDark } from \"../../button/styles/index.mjs\";\nimport { inputDark } from \"../../input/styles/index.mjs\";\nimport { timePickerDark } from \"../../time-picker/styles/index.mjs\";\nimport { self } from \"./light.mjs\";\nconst datePickerDark = {\n  name: 'DatePicker',\n  common: commonDark,\n  peers: {\n    Input: inputDark,\n    Button: buttonDark,\n    TimePicker: timePickerDark,\n    Scrollbar: scrollbarDark\n  },\n  self(vars) {\n    const {\n      popoverColor,\n      hoverColor,\n      primaryColor\n    } = vars;\n    const commonSelf = self(vars);\n    commonSelf.itemColorDisabled = composite(popoverColor, hoverColor);\n    commonSelf.itemColorIncluded = changeColor(primaryColor, {\n      alpha: 0.15\n    });\n    commonSelf.itemColorHover = composite(popoverColor, hoverColor);\n    return commonSelf;\n  }\n};\nexport default datePickerDark;","export default {\n  thPaddingBorderedSmall: '8px 12px',\n  thPaddingBorderedMedium: '12px 16px',\n  thPaddingBorderedLarge: '16px 24px',\n  thPaddingSmall: '0',\n  thPaddingMedium: '0',\n  thPaddingLarge: '0',\n  tdPaddingBorderedSmall: '8px 12px',\n  tdPaddingBorderedMedium: '12px 16px',\n  tdPaddingBorderedLarge: '16px 24px',\n  tdPaddingSmall: '0 0 8px 0',\n  tdPaddingMedium: '0 0 12px 0',\n  tdPaddingLarge: '0 0 16px 0'\n};","import { composite } from 'seemly';\nimport { commonLight } from \"../../_styles/common/index.mjs\";\nimport commonVariables from \"./_common.mjs\";\nexport function self(vars) {\n  const {\n    tableHeaderColor,\n    textColor2,\n    textColor1,\n    cardColor,\n    modalColor,\n    popoverColor,\n    dividerColor,\n    borderRadius,\n    fontWeightStrong,\n    lineHeight,\n    fontSizeSmall,\n    fontSizeMedium,\n    fontSizeLarge\n  } = vars;\n  return Object.assign(Object.assign({}, commonVariables), {\n    lineHeight,\n    fontSizeSmall,\n    fontSizeMedium,\n    fontSizeLarge,\n    titleTextColor: textColor1,\n    thColor: composite(cardColor, tableHeaderColor),\n    thColorModal: composite(modalColor, tableHeaderColor),\n    thColorPopover: composite(popoverColor, tableHeaderColor),\n    thTextColor: textColor1,\n    thFontWeight: fontWeightStrong,\n    tdTextColor: textColor2,\n    tdColor: cardColor,\n    tdColorModal: modalColor,\n    tdColorPopover: popoverColor,\n    borderColor: composite(cardColor, dividerColor),\n    borderColorModal: composite(modalColor, dividerColor),\n    borderColorPopover: composite(popoverColor, dividerColor),\n    borderRadius\n  });\n}\nconst descriptionsLight = {\n  name: 'Descriptions',\n  common: commonLight,\n  self\n};\nexport default descriptionsLight;","import { commonDark } from \"../../_styles/common/index.mjs\";\nimport { self } from \"./light.mjs\";\nconst descriptionsDark = {\n  name: 'Descriptions',\n  common: commonDark,\n  self\n};\nexport default descriptionsDark;","import { createInjectionKey } from \"../../_utils/index.mjs\";\nexport const dialogProviderInjectionKey = createInjectionKey('n-dialog-provider');\nexport const dialogApiInjectionKey = createInjectionKey('n-dialog-api');\nexport const dialogReactiveListInjectionKey = createInjectionKey('n-dialog-reactive-list');","export default {\n  titleFontSize: '18px',\n  padding: '16px 28px 20px 28px',\n  iconSize: '28px',\n  actionSpace: '12px',\n  contentMargin: '8px 0 16px 0',\n  iconMargin: '0 4px 0 0',\n  iconMarginIconTop: '4px 0 8px 0',\n  closeSize: '22px',\n  closeIconSize: '18px',\n  closeMargin: '20px 26px 0 0',\n  closeMarginIconTop: '10px 16px 0 0'\n};","import { createTheme } from \"../../_mixins/index.mjs\";\nimport { commonLight } from \"../../_styles/common/index.mjs\";\nimport { buttonLight } from \"../../button/styles/index.mjs\";\nimport commonVars from \"./_common.mjs\";\nexport function self(vars) {\n  const {\n    textColor1,\n    textColor2,\n    modalColor,\n    closeIconColor,\n    closeIconColorHover,\n    closeIconColorPressed,\n    closeColorHover,\n    closeColorPressed,\n    infoColor,\n    successColor,\n    warningColor,\n    errorColor,\n    primaryColor,\n    dividerColor,\n    borderRadius,\n    fontWeightStrong,\n    lineHeight,\n    fontSize\n  } = vars;\n  return Object.assign(Object.assign({}, commonVars), {\n    fontSize,\n    lineHeight,\n    border: `1px solid ${dividerColor}`,\n    titleTextColor: textColor1,\n    textColor: textColor2,\n    color: modalColor,\n    closeColorHover,\n    closeColorPressed,\n    closeIconColor,\n    closeIconColorHover,\n    closeIconColorPressed,\n    closeBorderRadius: borderRadius,\n    iconColor: primaryColor,\n    iconColorInfo: infoColor,\n    iconColorSuccess: successColor,\n    iconColorWarning: warningColor,\n    iconColorError: errorColor,\n    borderRadius,\n    titleFontWeight: fontWeightStrong\n  });\n}\nconst dialogLight = createTheme({\n  name: 'Dialog',\n  common: commonLight,\n  peers: {\n    Button: buttonLight\n  },\n  self\n});\nexport default dialogLight;","import { commonDark } from \"../../_styles/common/index.mjs\";\nimport { buttonDark } from \"../../button/styles/index.mjs\";\nimport { self } from \"./light.mjs\";\nconst dialogDark = {\n  name: 'Dialog',\n  common: commonDark,\n  peers: {\n    Button: buttonDark\n  },\n  self\n};\nexport default dialogDark;","import { keysOf } from \"../../_utils/index.mjs\";\nconst dialogProps = {\n  icon: Function,\n  type: {\n    type: String,\n    default: 'default'\n  },\n  title: [String, Function],\n  closable: {\n    type: Boolean,\n    default: true\n  },\n  negativeText: String,\n  positiveText: String,\n  positiveButtonProps: Object,\n  negativeButtonProps: Object,\n  content: [String, Function],\n  action: Function,\n  showIcon: {\n    type: Boolean,\n    default: true\n  },\n  loading: Boolean,\n  bordered: Boolean,\n  iconPlacement: String,\n  titleClass: [String, Array],\n  titleStyle: [String, Object],\n  contentClass: [String, Array],\n  contentStyle: [String, Object],\n  actionClass: [String, Array],\n  actionStyle: [String, Object],\n  onPositiveClick: Function,\n  onNegativeClick: Function,\n  onClose: Function\n};\nexport { dialogProps };\nexport const dialogPropKeys = keysOf(dialogProps);","import { asModal, c, cB, cE, cM, insideModal } from \"../../../_utils/cssr/index.mjs\";\n// vars:\n// --n-icon-color\n// --n-bezier\n// --n-icon-margin-top\n// --n-icon-margin-right\n// --n-icon-margin-bottom\n// --n-icon-margin-left\n// --n-icon-size\n// --n-close-border-radius\n// --n-close-margin\n// --n-close-size\n// --n-close-color-hover\n// --n-close-color-pressed\n// --n-close-icon-color\n// --n-close-icon-color-hover\n// --n-close-icon-color-pressed\n// --n-color\n// --n-text-color\n// --n-border-radius\n// --n-padding\n// --n-line-height\n// --n-border\n// --n-content-margin\n// --n-title-font-size\n// --n-title-font-weight\n// --n-title-text-color\n// --n-action-space\nexport default c([cB('dialog', `\n --n-icon-margin: var(--n-icon-margin-top) var(--n-icon-margin-right) var(--n-icon-margin-bottom) var(--n-icon-margin-left);\n word-break: break-word;\n line-height: var(--n-line-height);\n position: relative;\n background: var(--n-color);\n color: var(--n-text-color);\n box-sizing: border-box;\n margin: auto;\n border-radius: var(--n-border-radius);\n padding: var(--n-padding);\n transition: \n border-color .3s var(--n-bezier),\n background-color .3s var(--n-bezier),\n color .3s var(--n-bezier);\n `, [cE('icon', {\n  color: 'var(--n-icon-color)'\n}), cM('bordered', {\n  border: 'var(--n-border)'\n}), cM('icon-top', [cE('close', {\n  margin: 'var(--n-close-margin)'\n}), cE('icon', {\n  margin: 'var(--n-icon-margin)'\n}), cE('content', {\n  textAlign: 'center'\n}), cE('title', {\n  justifyContent: 'center'\n}), cE('action', {\n  justifyContent: 'center'\n})]), cM('icon-left', [cE('icon', {\n  margin: 'var(--n-icon-margin)'\n}), cM('closable', [cE('title', `\n padding-right: calc(var(--n-close-size) + 6px);\n `)])]), cE('close', `\n position: absolute;\n right: 0;\n top: 0;\n margin: var(--n-close-margin);\n transition:\n background-color .3s var(--n-bezier),\n color .3s var(--n-bezier);\n z-index: 1;\n `), cE('content', `\n font-size: var(--n-font-size);\n margin: var(--n-content-margin);\n position: relative;\n word-break: break-word;\n `, [cM('last', 'margin-bottom: 0;')]), cE('action', `\n display: flex;\n justify-content: flex-end;\n `, [c('> *:not(:last-child)', `\n margin-right: var(--n-action-space);\n `)]), cE('icon', `\n font-size: var(--n-icon-size);\n transition: color .3s var(--n-bezier);\n `), cE('title', `\n transition: color .3s var(--n-bezier);\n display: flex;\n align-items: center;\n font-size: var(--n-title-font-size);\n font-weight: var(--n-title-font-weight);\n color: var(--n-title-text-color);\n `), cB('dialog-icon-container', `\n display: flex;\n justify-content: center;\n `)]), insideModal(cB('dialog', `\n width: 446px;\n max-width: calc(100vw - 32px);\n `)), cB('dialog', [asModal(`\n width: 446px;\n max-width: calc(100vw - 32px);\n `)])]);","import { getMargin } from 'seemly';\nimport { computed, defineComponent, h } from 'vue';\nimport { NBaseClose, NBaseIcon } from \"../../_internal/index.mjs\";\nimport { ErrorIcon, InfoIcon, SuccessIcon, WarningIcon } from \"../../_internal/icons/index.mjs\";\nimport { useConfig, useRtl, useTheme, useThemeClass } from \"../../_mixins/index.mjs\";\nimport { createKey, render, resolveSlot, resolveWrappedSlot } from \"../../_utils/index.mjs\";\nimport { NButton } from \"../../button/index.mjs\";\nimport { dialogLight } from \"../styles/index.mjs\";\nimport { dialogProps } from \"./dialogProps.mjs\";\nimport style from \"./styles/index.cssr.mjs\";\nconst iconRenderMap = {\n  default: () => h(InfoIcon, null),\n  info: () => h(InfoIcon, null),\n  success: () => h(SuccessIcon, null),\n  warning: () => h(WarningIcon, null),\n  error: () => h(ErrorIcon, null)\n};\nexport const NDialog = defineComponent({\n  name: 'Dialog',\n  alias: ['NimbusConfirmCard',\n  // deprecated\n  'Confirm' // deprecated\n  ],\n  props: Object.assign(Object.assign({}, useTheme.props), dialogProps),\n  slots: Object,\n  setup(props) {\n    const {\n      mergedComponentPropsRef,\n      mergedClsPrefixRef,\n      inlineThemeDisabled,\n      mergedRtlRef\n    } = useConfig(props);\n    const rtlEnabledRef = useRtl('Dialog', mergedRtlRef, mergedClsPrefixRef);\n    const mergedIconPlacementRef = computed(() => {\n      var _a, _b;\n      const {\n        iconPlacement\n      } = props;\n      return iconPlacement || ((_b = (_a = mergedComponentPropsRef === null || mergedComponentPropsRef === void 0 ? void 0 : mergedComponentPropsRef.value) === null || _a === void 0 ? void 0 : _a.Dialog) === null || _b === void 0 ? void 0 : _b.iconPlacement) || 'left';\n    });\n    function handlePositiveClick(e) {\n      const {\n        onPositiveClick\n      } = props;\n      if (onPositiveClick) onPositiveClick(e);\n    }\n    function handleNegativeClick(e) {\n      const {\n        onNegativeClick\n      } = props;\n      if (onNegativeClick) onNegativeClick(e);\n    }\n    function handleCloseClick() {\n      const {\n        onClose\n      } = props;\n      if (onClose) onClose();\n    }\n    const themeRef = useTheme('Dialog', '-dialog', style, dialogLight, props, mergedClsPrefixRef);\n    const cssVarsRef = computed(() => {\n      const {\n        type\n      } = props;\n      const iconPlacement = mergedIconPlacementRef.value;\n      const {\n        common: {\n          cubicBezierEaseInOut\n        },\n        self: {\n          fontSize,\n          lineHeight,\n          border,\n          titleTextColor,\n          textColor,\n          color,\n          closeBorderRadius,\n          closeColorHover,\n          closeColorPressed,\n          closeIconColor,\n          closeIconColorHover,\n          closeIconColorPressed,\n          closeIconSize,\n          borderRadius,\n          titleFontWeight,\n          titleFontSize,\n          padding,\n          iconSize,\n          actionSpace,\n          contentMargin,\n          closeSize,\n          [iconPlacement === 'top' ? 'iconMarginIconTop' : 'iconMargin']: iconMargin,\n          [iconPlacement === 'top' ? 'closeMarginIconTop' : 'closeMargin']: closeMargin,\n          [createKey('iconColor', type)]: iconColor\n        }\n      } = themeRef.value;\n      const iconMarginDiscrete = getMargin(iconMargin);\n      return {\n        '--n-font-size': fontSize,\n        '--n-icon-color': iconColor,\n        '--n-bezier': cubicBezierEaseInOut,\n        '--n-close-margin': closeMargin,\n        '--n-icon-margin-top': iconMarginDiscrete.top,\n        '--n-icon-margin-right': iconMarginDiscrete.right,\n        '--n-icon-margin-bottom': iconMarginDiscrete.bottom,\n        '--n-icon-margin-left': iconMarginDiscrete.left,\n        '--n-icon-size': iconSize,\n        '--n-close-size': closeSize,\n        '--n-close-icon-size': closeIconSize,\n        '--n-close-border-radius': closeBorderRadius,\n        '--n-close-color-hover': closeColorHover,\n        '--n-close-color-pressed': closeColorPressed,\n        '--n-close-icon-color': closeIconColor,\n        '--n-close-icon-color-hover': closeIconColorHover,\n        '--n-close-icon-color-pressed': closeIconColorPressed,\n        '--n-color': color,\n        '--n-text-color': textColor,\n        '--n-border-radius': borderRadius,\n        '--n-padding': padding,\n        '--n-line-height': lineHeight,\n        '--n-border': border,\n        '--n-content-margin': contentMargin,\n        '--n-title-font-size': titleFontSize,\n        '--n-title-font-weight': titleFontWeight,\n        '--n-title-text-color': titleTextColor,\n        '--n-action-space': actionSpace\n      };\n    });\n    const themeClassHandle = inlineThemeDisabled ? useThemeClass('dialog', computed(() => `${props.type[0]}${mergedIconPlacementRef.value[0]}`), cssVarsRef, props) : undefined;\n    return {\n      mergedClsPrefix: mergedClsPrefixRef,\n      rtlEnabled: rtlEnabledRef,\n      mergedIconPlacement: mergedIconPlacementRef,\n      mergedTheme: themeRef,\n      handlePositiveClick,\n      handleNegativeClick,\n      handleCloseClick,\n      cssVars: inlineThemeDisabled ? undefined : cssVarsRef,\n      themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,\n      onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender\n    };\n  },\n  render() {\n    var _a;\n    const {\n      bordered,\n      mergedIconPlacement,\n      cssVars,\n      closable,\n      showIcon,\n      title,\n      content,\n      action,\n      negativeText,\n      positiveText,\n      positiveButtonProps,\n      negativeButtonProps,\n      handlePositiveClick,\n      handleNegativeClick,\n      mergedTheme,\n      loading,\n      type,\n      mergedClsPrefix\n    } = this;\n    (_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this);\n    const icon = showIcon ? h(NBaseIcon, {\n      clsPrefix: mergedClsPrefix,\n      class: `${mergedClsPrefix}-dialog__icon`\n    }, {\n      default: () => resolveWrappedSlot(this.$slots.icon, children => children || (this.icon ? render(this.icon) : iconRenderMap[this.type]()))\n    }) : null;\n    const actionNode = resolveWrappedSlot(this.$slots.action, children => children || positiveText || negativeText || action ? h(\"div\", {\n      class: [`${mergedClsPrefix}-dialog__action`, this.actionClass],\n      style: this.actionStyle\n    }, children || (action ? [render(action)] : [this.negativeText && h(NButton, Object.assign({\n      theme: mergedTheme.peers.Button,\n      themeOverrides: mergedTheme.peerOverrides.Button,\n      ghost: true,\n      size: \"small\",\n      onClick: handleNegativeClick\n    }, negativeButtonProps), {\n      default: () => render(this.negativeText)\n    }), this.positiveText && h(NButton, Object.assign({\n      theme: mergedTheme.peers.Button,\n      themeOverrides: mergedTheme.peerOverrides.Button,\n      size: \"small\",\n      type: type === 'default' ? 'primary' : type,\n      disabled: loading,\n      loading: loading,\n      onClick: handlePositiveClick\n    }, positiveButtonProps), {\n      default: () => render(this.positiveText)\n    })])) : null);\n    return h(\"div\", {\n      class: [`${mergedClsPrefix}-dialog`, this.themeClass, this.closable && `${mergedClsPrefix}-dialog--closable`, `${mergedClsPrefix}-dialog--icon-${mergedIconPlacement}`, bordered && `${mergedClsPrefix}-dialog--bordered`, this.rtlEnabled && `${mergedClsPrefix}-dialog--rtl`],\n      style: cssVars,\n      role: \"dialog\"\n    }, closable ? resolveWrappedSlot(this.$slots.close, node => {\n      const classNames = [`${mergedClsPrefix}-dialog__close`, this.rtlEnabled && `${mergedClsPrefix}-dialog--rtl`];\n      return node ? h(\"div\", {\n        class: classNames\n      }, node) : h(NBaseClose, {\n        clsPrefix: mergedClsPrefix,\n        class: classNames,\n        onClick: this.handleCloseClick\n      });\n    }) : null, showIcon && mergedIconPlacement === 'top' ? h(\"div\", {\n      class: `${mergedClsPrefix}-dialog-icon-container`\n    }, icon) : null, h(\"div\", {\n      class: [`${mergedClsPrefix}-dialog__title`, this.titleClass],\n      style: this.titleStyle\n    }, showIcon && mergedIconPlacement === 'left' ? icon : null, resolveSlot(this.$slots.header, () => [render(title)])), h(\"div\", {\n      class: [`${mergedClsPrefix}-dialog__content`, actionNode ? '' : `${mergedClsPrefix}-dialog__content--last`, this.contentClass],\n      style: this.contentStyle\n    }, resolveSlot(this.$slots.default, () => [render(content)])), actionNode);\n  }\n});","import { scrollbarLight } from \"../../_internal/scrollbar/styles/index.mjs\";\nimport { createTheme } from \"../../_mixins/index.mjs\";\nimport { commonLight } from \"../../_styles/common/index.mjs\";\nimport { cardLight } from \"../../card/styles/index.mjs\";\nimport { dialogLight } from \"../../dialog/styles/index.mjs\";\nexport function self(vars) {\n  const {\n    modalColor,\n    textColor2,\n    boxShadow3\n  } = vars;\n  return {\n    color: modalColor,\n    textColor: textColor2,\n    boxShadow: boxShadow3\n  };\n}\nconst modalLight = createTheme({\n  name: 'Modal',\n  common: commonLight,\n  peers: {\n    Scrollbar: scrollbarLight,\n    Dialog: dialogLight,\n    Card: cardLight\n  },\n  self\n});\nexport default modalLight;","import { scrollbarDark } from \"../../_internal/scrollbar/styles/index.mjs\";\nimport { commonDark } from \"../../_styles/common/index.mjs\";\nimport { cardDark } from \"../../card/styles/index.mjs\";\nimport { dialogDark } from \"../../dialog/styles/index.mjs\";\nimport { self } from \"./light.mjs\";\nconst modalDark = {\n  name: 'Modal',\n  common: commonDark,\n  peers: {\n    Scrollbar: scrollbarDark,\n    Dialog: dialogDark,\n    Card: cardDark\n  },\n  self\n};\nexport default modalDark;","import { off, on } from 'evtd';\nimport { computed, inject, onUnmounted } from 'vue';\nimport { throwError } from \"../../_utils/index.mjs\";\nimport { modalApiInjectionKey, modalReactiveListInjectionKey } from \"./context.mjs\";\nexport function useModal() {\n  const modal = inject(modalApiInjectionKey, null);\n  if (modal === null) {\n    throwError('use-modal', 'No outer <n-modal-provider /> founded.');\n  }\n  return modal;\n}\nexport function useModalReactiveList() {\n  const modalReactiveList = inject(modalReactiveListInjectionKey, null);\n  if (modalReactiveList === null) {\n    throwError('use-modal-reactive-list', 'No outer <n-modal-provider /> founded.');\n  }\n  return modalReactiveList;\n}\nexport const DRAGGABLE_CLASS = 'n-draggable';\nexport function useDragModal(draggablePropsRef, options) {\n  let cleanup;\n  const draggableRef = computed(() => {\n    return draggablePropsRef.value !== false;\n  });\n  const draggableClassRef = computed(() => {\n    return draggableRef.value ? DRAGGABLE_CLASS : '';\n  });\n  const boundsToWindowRef = computed(() => {\n    const draggableProps = draggablePropsRef.value;\n    if (draggableProps === true || draggableProps === false) {\n      return true;\n    } else if (draggableProps) {\n      return draggableProps.bounds !== 'none';\n    } else {\n      return true;\n    }\n  });\n  function startDrag(modal) {\n    const header = modal.querySelector(`.${DRAGGABLE_CLASS}`);\n    if (!header || !draggableClassRef.value) {\n      return;\n    }\n    let maxMoveX = 0;\n    let minMoveX = 0;\n    let maxMoveY = 0;\n    let minMoveY = 0;\n    let prevMoveY = 0;\n    let prevMoveX = 0;\n    let mousedownEvent;\n    function handleMouseDown(event) {\n      event.preventDefault();\n      mousedownEvent = event;\n      const {\n        x,\n        y,\n        right,\n        bottom\n      } = modal.getBoundingClientRect();\n      minMoveX = x;\n      minMoveY = y;\n      maxMoveX = window.innerWidth - right;\n      maxMoveY = window.innerHeight - bottom;\n      const {\n        left,\n        top\n      } = modal.style;\n      prevMoveY = +top.slice(0, -2);\n      prevMoveX = +left.slice(0, -2);\n    }\n    function handleMouseMove(event) {\n      if (!mousedownEvent) return;\n      const {\n        clientX: downX,\n        clientY: downY\n      } = mousedownEvent;\n      let moveX = event.clientX - downX;\n      let moveY = event.clientY - downY;\n      if (boundsToWindowRef.value) {\n        if (moveX > maxMoveX) {\n          moveX = maxMoveX;\n        } else if (-moveX > minMoveX) {\n          moveX = -minMoveX;\n        }\n        if (moveY > maxMoveY) {\n          moveY = maxMoveY;\n        } else if (-moveY > minMoveY) {\n          moveY = -minMoveY;\n        }\n      }\n      const x = moveX + prevMoveX;\n      const y = moveY + prevMoveY;\n      modal.style.top = `${y}px`;\n      modal.style.left = `${x}px`;\n    }\n    function handleMouseUp() {\n      mousedownEvent = undefined;\n      options.onEnd(modal);\n    }\n    on('mousedown', header, handleMouseDown);\n    on('mousemove', window, handleMouseMove);\n    on('mouseup', window, handleMouseUp);\n    cleanup = () => {\n      off('mousedown', header, handleMouseDown);\n      on('mousemove', window, handleMouseMove);\n      on('mouseup', window, handleMouseUp);\n    };\n  }\n  function stopDrag() {\n    if (cleanup) {\n      cleanup();\n      cleanup = undefined;\n    }\n  }\n  onUnmounted(stopDrag);\n  return {\n    stopDrag,\n    startDrag,\n    draggableRef,\n    draggableClassRef\n  };\n}","import { keysOf } from \"../../_utils/index.mjs\";\nimport { cardBaseProps } from \"../../card/src/Card.mjs\";\nimport { dialogProps } from \"../../dialog/src/dialogProps.mjs\";\nconst presetProps = Object.assign(Object.assign({}, cardBaseProps), dialogProps);\nconst presetPropsKeys = keysOf(presetProps);\nexport { presetProps, presetPropsKeys };","import { clickoutside } from 'vdirs';\nimport { cloneVNode, computed, defineComponent, h, inject, mergeProps, nextTick, normalizeClass, provide, ref, toRef, Transition, vShow, watch, withDirectives } from 'vue';\nimport { VFocusTrap } from 'vueuc';\nimport { NScrollbar } from \"../../_internal/index.mjs\";\nimport { getFirstSlotVNodeWithTypedProps, keep, useLockHtmlScroll, warn } from \"../../_utils/index.mjs\";\nimport { NCard } from \"../../card/index.mjs\";\nimport { cardBasePropKeys } from \"../../card/src/Card.mjs\";\nimport { NDialog } from \"../../dialog/src/Dialog.mjs\";\nimport { dialogPropKeys } from \"../../dialog/src/dialogProps.mjs\";\nimport { drawerBodyInjectionKey } from \"../../drawer/src/interface.mjs\";\nimport { popoverBodyInjectionKey } from \"../../popover/src/interface.mjs\";\nimport { useDragModal } from \"./composables.mjs\";\nimport { modalBodyInjectionKey, modalInjectionKey } from \"./interface.mjs\";\nimport { presetProps } from \"./presetProps.mjs\";\nexport default defineComponent({\n  name: 'ModalBody',\n  inheritAttrs: false,\n  slots: Object,\n  props: Object.assign(Object.assign({\n    show: {\n      type: Boolean,\n      required: true\n    },\n    preset: String,\n    displayDirective: {\n      type: String,\n      required: true\n    },\n    trapFocus: {\n      type: Boolean,\n      default: true\n    },\n    autoFocus: {\n      type: Boolean,\n      default: true\n    },\n    blockScroll: Boolean,\n    draggable: {\n      type: [Boolean, Object],\n      default: false\n    }\n  }, presetProps), {\n    renderMask: Function,\n    // events\n    onClickoutside: Function,\n    onBeforeLeave: {\n      type: Function,\n      required: true\n    },\n    onAfterLeave: {\n      type: Function,\n      required: true\n    },\n    onPositiveClick: {\n      type: Function,\n      required: true\n    },\n    onNegativeClick: {\n      type: Function,\n      required: true\n    },\n    onClose: {\n      type: Function,\n      required: true\n    },\n    onAfterEnter: Function,\n    onEsc: Function\n  }),\n  setup(props) {\n    const bodyRef = ref(null);\n    const scrollbarRef = ref(null);\n    const displayedRef = ref(props.show);\n    const transformOriginXRef = ref(null);\n    const transformOriginYRef = ref(null);\n    const NModal = inject(modalInjectionKey);\n    let mousePosition = null;\n    watch(toRef(props, 'show'), value => {\n      if (value) {\n        mousePosition = NModal.getMousePosition();\n      }\n    }, {\n      immediate: true\n    });\n    const {\n      stopDrag,\n      startDrag,\n      draggableRef,\n      draggableClassRef\n    } = useDragModal(toRef(props, 'draggable'), {\n      onEnd: el => {\n        syncTransformOrigin(el);\n      }\n    });\n    const dialogTitleClassRef = computed(() => {\n      return normalizeClass([props.titleClass, draggableClassRef.value]);\n    });\n    const cardHeaderClassRef = computed(() => {\n      return normalizeClass([props.headerClass, draggableClassRef.value]);\n    });\n    watch(toRef(props, 'show'), value => {\n      if (value) displayedRef.value = true;\n    });\n    useLockHtmlScroll(computed(() => props.blockScroll && displayedRef.value));\n    function styleTransformOrigin() {\n      if (NModal.transformOriginRef.value === 'center') {\n        return '';\n      }\n      const {\n        value: transformOriginX\n      } = transformOriginXRef;\n      const {\n        value: transformOriginY\n      } = transformOriginYRef;\n      if (transformOriginX === null || transformOriginY === null) {\n        return '';\n      } else if (scrollbarRef.value) {\n        const scrollTop = scrollbarRef.value.containerScrollTop;\n        return `${transformOriginX}px ${transformOriginY + scrollTop}px`;\n      }\n      return '';\n    }\n    function syncTransformOrigin(el) {\n      if (NModal.transformOriginRef.value === 'center') {\n        return;\n      }\n      if (!mousePosition) {\n        return;\n      }\n      if (!scrollbarRef.value) return;\n      const scrollTop = scrollbarRef.value.containerScrollTop;\n      const {\n        offsetLeft,\n        offsetTop\n      } = el;\n      const top = mousePosition.y;\n      const left = mousePosition.x;\n      transformOriginXRef.value = -(offsetLeft - left);\n      transformOriginYRef.value = -(offsetTop - top - scrollTop);\n      el.style.transformOrigin = styleTransformOrigin();\n    }\n    function handleEnter(el) {\n      void nextTick(() => {\n        syncTransformOrigin(el);\n      });\n    }\n    function handleBeforeLeave(el) {\n      el.style.transformOrigin = styleTransformOrigin();\n      props.onBeforeLeave();\n    }\n    function handleAfterEnter(el) {\n      const element = el;\n      draggableRef.value && startDrag(element);\n      props.onAfterEnter && props.onAfterEnter(element);\n    }\n    function handleAfterLeave() {\n      displayedRef.value = false;\n      transformOriginXRef.value = null;\n      transformOriginYRef.value = null;\n      stopDrag();\n      props.onAfterLeave();\n    }\n    function handleCloseClick() {\n      const {\n        onClose\n      } = props;\n      if (onClose) {\n        onClose();\n      }\n    }\n    function handleNegativeClick() {\n      props.onNegativeClick();\n    }\n    function handlePositiveClick() {\n      props.onPositiveClick();\n    }\n    const childNodeRef = ref(null);\n    watch(childNodeRef, node => {\n      if (node) {\n        void nextTick(() => {\n          const el = node.el;\n          if (el && bodyRef.value !== el) {\n            bodyRef.value = el;\n          }\n        });\n      }\n    });\n    provide(modalBodyInjectionKey, bodyRef);\n    provide(drawerBodyInjectionKey, null);\n    provide(popoverBodyInjectionKey, null);\n    return {\n      mergedTheme: NModal.mergedThemeRef,\n      appear: NModal.appearRef,\n      isMounted: NModal.isMountedRef,\n      mergedClsPrefix: NModal.mergedClsPrefixRef,\n      bodyRef,\n      scrollbarRef,\n      draggableClass: draggableClassRef,\n      displayed: displayedRef,\n      childNodeRef,\n      cardHeaderClass: cardHeaderClassRef,\n      dialogTitleClass: dialogTitleClassRef,\n      handlePositiveClick,\n      handleNegativeClick,\n      handleCloseClick,\n      handleAfterEnter,\n      handleAfterLeave,\n      handleBeforeLeave,\n      handleEnter\n    };\n  },\n  render() {\n    const {\n      $slots,\n      $attrs,\n      handleEnter,\n      handleAfterEnter,\n      handleAfterLeave,\n      handleBeforeLeave,\n      preset,\n      mergedClsPrefix\n    } = this;\n    let childNode = null;\n    if (!preset) {\n      childNode = getFirstSlotVNodeWithTypedProps('default', $slots.default, {\n        draggableClass: this.draggableClass\n      });\n      if (!childNode) {\n        warn('modal', 'default slot is empty');\n        return;\n      }\n      childNode = cloneVNode(childNode);\n      childNode.props = mergeProps({\n        class: `${mergedClsPrefix}-modal`\n      }, $attrs, childNode.props || {});\n    }\n    return this.displayDirective === 'show' || this.displayed || this.show ? withDirectives(h(\"div\", {\n      role: \"none\",\n      class: `${mergedClsPrefix}-modal-body-wrapper`\n    }, h(NScrollbar, {\n      ref: \"scrollbarRef\",\n      theme: this.mergedTheme.peers.Scrollbar,\n      themeOverrides: this.mergedTheme.peerOverrides.Scrollbar,\n      contentClass: `${mergedClsPrefix}-modal-scroll-content`\n    }, {\n      default: () => {\n        var _a;\n        return [(_a = this.renderMask) === null || _a === void 0 ? void 0 : _a.call(this), h(VFocusTrap, {\n          disabled: !this.trapFocus,\n          active: this.show,\n          onEsc: this.onEsc,\n          autoFocus: this.autoFocus\n        }, {\n          default: () => {\n            var _a;\n            return h(Transition, {\n              name: \"fade-in-scale-up-transition\",\n              appear: (_a = this.appear) !== null && _a !== void 0 ? _a : this.isMounted,\n              onEnter: handleEnter,\n              onAfterEnter: handleAfterEnter,\n              onAfterLeave: handleAfterLeave,\n              onBeforeLeave: handleBeforeLeave\n            }, {\n              default: () => {\n                const dirs = [[vShow, this.show]];\n                const {\n                  onClickoutside\n                } = this;\n                if (onClickoutside) {\n                  dirs.push([clickoutside, this.onClickoutside, undefined, {\n                    capture: true\n                  }]);\n                }\n                return withDirectives(this.preset === 'confirm' || this.preset === 'dialog' ? h(NDialog, Object.assign({}, this.$attrs, {\n                  class: [`${mergedClsPrefix}-modal`, this.$attrs.class],\n                  ref: \"bodyRef\",\n                  theme: this.mergedTheme.peers.Dialog,\n                  themeOverrides: this.mergedTheme.peerOverrides.Dialog\n                }, keep(this.$props, dialogPropKeys), {\n                  titleClass: this.dialogTitleClass,\n                  \"aria-modal\": \"true\"\n                }), $slots) : this.preset === 'card' ? h(NCard, Object.assign({}, this.$attrs, {\n                  ref: \"bodyRef\",\n                  class: [`${mergedClsPrefix}-modal`, this.$attrs.class],\n                  theme: this.mergedTheme.peers.Card,\n                  themeOverrides: this.mergedTheme.peerOverrides.Card\n                }, keep(this.$props, cardBasePropKeys), {\n                  headerClass: this.cardHeaderClass,\n                  \"aria-modal\": \"true\",\n                  role: \"dialog\"\n                }), $slots) : this.childNodeRef = childNode, dirs);\n              }\n            });\n          }\n        })];\n      }\n    })), [[vShow, this.displayDirective === 'if' || this.displayed || this.show]]) : null;\n  }\n});","import { fadeInScaleUpTransition } from \"../../../_styles/transitions/fade-in-scale-up.cssr.mjs\";\nimport { fadeInTransition } from \"../../../_styles/transitions/fade-in.cssr.mjs\";\nimport { c, cB } from \"../../../_utils/cssr/index.mjs\";\nimport { DRAGGABLE_CLASS } from \"../composables.mjs\";\n// vars:\n// --n-bezier-ease-out\n// --n-box-shadow\n// --n-color\n// --n-text-color\nexport default c([cB('modal-container', `\n position: fixed;\n left: 0;\n top: 0;\n height: 0;\n width: 0;\n display: flex;\n `), cB('modal-mask', `\n position: fixed;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n background-color: rgba(0, 0, 0, .4);\n `, [fadeInTransition({\n  enterDuration: '.25s',\n  leaveDuration: '.25s',\n  enterCubicBezier: 'var(--n-bezier-ease-out)',\n  leaveCubicBezier: 'var(--n-bezier-ease-out)'\n})]), cB('modal-body-wrapper', `\n position: fixed;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n overflow: visible;\n `, [cB('modal-scroll-content', `\n min-height: 100%;\n display: flex;\n position: relative;\n `)]), cB('modal', `\n position: relative;\n align-self: center;\n color: var(--n-text-color);\n margin: auto;\n box-shadow: var(--n-box-shadow);\n `, [fadeInScaleUpTransition({\n  duration: '.25s',\n  enterScale: '.5'\n}), c(`.${DRAGGABLE_CLASS}`, `\n cursor: move;\n user-select: none;\n `)])]);","import { getPreciseEventTarget } from 'seemly';\nimport { zindexable } from 'vdirs';\nimport { useClicked, useClickPosition, useIsMounted } from 'vooks';\nimport { computed, defineComponent, h, inject, provide, ref, toRef, Transition, withDirectives } from 'vue';\nimport { VLazyTeleport } from 'vueuc';\nimport { useConfig, useTheme, useThemeClass } from \"../../_mixins/index.mjs\";\nimport { call, eventEffectNotPerformed, keep, useIsComposing, warnOnce } from \"../../_utils/index.mjs\";\nimport { dialogProviderInjectionKey } from \"../../dialog/src/context.mjs\";\nimport { modalLight } from \"../styles/index.mjs\";\nimport NModalBodyWrapper from \"./BodyWrapper.mjs\";\nimport { modalInjectionKey, modalProviderInjectionKey } from \"./interface.mjs\";\nimport { presetProps, presetPropsKeys } from \"./presetProps.mjs\";\nimport style from \"./styles/index.cssr.mjs\";\nexport const modalProps = Object.assign(Object.assign(Object.assign(Object.assign({}, useTheme.props), {\n  show: Boolean,\n  unstableShowMask: {\n    type: Boolean,\n    default: true\n  },\n  maskClosable: {\n    type: Boolean,\n    default: true\n  },\n  preset: String,\n  to: [String, Object],\n  displayDirective: {\n    type: String,\n    default: 'if'\n  },\n  transformOrigin: {\n    type: String,\n    default: 'mouse'\n  },\n  zIndex: Number,\n  autoFocus: {\n    type: Boolean,\n    default: true\n  },\n  trapFocus: {\n    type: Boolean,\n    default: true\n  },\n  closeOnEsc: {\n    type: Boolean,\n    default: true\n  },\n  blockScroll: {\n    type: Boolean,\n    default: true\n  }\n}), presetProps), {\n  draggable: [Boolean, Object],\n  // events\n  onEsc: Function,\n  'onUpdate:show': [Function, Array],\n  onUpdateShow: [Function, Array],\n  onAfterEnter: Function,\n  onBeforeLeave: Function,\n  onAfterLeave: Function,\n  onClose: Function,\n  onPositiveClick: Function,\n  onNegativeClick: Function,\n  onMaskClick: Function,\n  // private\n  internalDialog: Boolean,\n  internalModal: Boolean,\n  internalAppear: {\n    type: Boolean,\n    default: undefined\n  },\n  // deprecated\n  overlayStyle: [String, Object],\n  onBeforeHide: Function,\n  onAfterHide: Function,\n  onHide: Function\n});\nexport default defineComponent({\n  name: 'Modal',\n  inheritAttrs: false,\n  props: modalProps,\n  slots: Object,\n  setup(props) {\n    if (process.env.NODE_ENV !== 'production') {\n      if (props.onHide) {\n        warnOnce('modal', '`on-hide` is deprecated.');\n      }\n      if (props.onAfterHide) {\n        warnOnce('modal', '`on-after-hide` is deprecated, please use `on-after-leave` instead.');\n      }\n      if (props.onBeforeHide) {\n        warnOnce('modal', '`on-before-hide` is deprecated, please use `on-before-leave` instead.');\n      }\n      if (props.overlayStyle) {\n        warnOnce('modal', '`overlay-style` is deprecated, please use `style` instead.');\n      }\n    }\n    const containerRef = ref(null);\n    const {\n      mergedClsPrefixRef,\n      namespaceRef,\n      inlineThemeDisabled\n    } = useConfig(props);\n    const themeRef = useTheme('Modal', '-modal', style, modalLight, props, mergedClsPrefixRef);\n    const clickedRef = useClicked(64);\n    const clickedPositionRef = useClickPosition();\n    const isMountedRef = useIsMounted();\n    const NDialogProvider = props.internalDialog ? inject(dialogProviderInjectionKey, null) : null;\n    const NModalProvider = props.internalModal ? inject(modalProviderInjectionKey, null) : null;\n    const isComposingRef = useIsComposing();\n    function doUpdateShow(show) {\n      const {\n        onUpdateShow,\n        'onUpdate:show': _onUpdateShow,\n        onHide\n      } = props;\n      if (onUpdateShow) call(onUpdateShow, show);\n      if (_onUpdateShow) call(_onUpdateShow, show);\n      // deprecated\n      if (onHide && !show) onHide(show);\n    }\n    function handleCloseClick() {\n      const {\n        onClose\n      } = props;\n      if (onClose) {\n        void Promise.resolve(onClose()).then(value => {\n          if (value === false) return;\n          doUpdateShow(false);\n        });\n      } else {\n        doUpdateShow(false);\n      }\n    }\n    function handlePositiveClick() {\n      const {\n        onPositiveClick\n      } = props;\n      if (onPositiveClick) {\n        void Promise.resolve(onPositiveClick()).then(value => {\n          if (value === false) return;\n          doUpdateShow(false);\n        });\n      } else {\n        doUpdateShow(false);\n      }\n    }\n    function handleNegativeClick() {\n      const {\n        onNegativeClick\n      } = props;\n      if (onNegativeClick) {\n        void Promise.resolve(onNegativeClick()).then(value => {\n          if (value === false) return;\n          doUpdateShow(false);\n        });\n      } else {\n        doUpdateShow(false);\n      }\n    }\n    function handleBeforeLeave() {\n      const {\n        onBeforeLeave,\n        onBeforeHide\n      } = props;\n      if (onBeforeLeave) call(onBeforeLeave);\n      // deprecated\n      if (onBeforeHide) onBeforeHide();\n    }\n    function handleAfterLeave() {\n      const {\n        onAfterLeave,\n        onAfterHide\n      } = props;\n      if (onAfterLeave) call(onAfterLeave);\n      // deprecated\n      if (onAfterHide) onAfterHide();\n    }\n    function handleClickoutside(e) {\n      var _a;\n      const {\n        onMaskClick\n      } = props;\n      if (onMaskClick) {\n        onMaskClick(e);\n      }\n      if (props.maskClosable) {\n        if ((_a = containerRef.value) === null || _a === void 0 ? void 0 : _a.contains(getPreciseEventTarget(e))) {\n          doUpdateShow(false);\n        }\n      }\n    }\n    function handleEsc(e) {\n      var _a;\n      (_a = props.onEsc) === null || _a === void 0 ? void 0 : _a.call(props);\n      if (props.show && props.closeOnEsc && eventEffectNotPerformed(e)) {\n        if (!isComposingRef.value) {\n          doUpdateShow(false);\n        }\n      }\n    }\n    provide(modalInjectionKey, {\n      getMousePosition: () => {\n        const mergedProvider = NDialogProvider || NModalProvider;\n        if (mergedProvider) {\n          const {\n            clickedRef,\n            clickedPositionRef\n          } = mergedProvider;\n          if (clickedRef.value && clickedPositionRef.value) {\n            return clickedPositionRef.value;\n          }\n        }\n        if (clickedRef.value) {\n          return clickedPositionRef.value;\n        }\n        return null;\n      },\n      mergedClsPrefixRef,\n      mergedThemeRef: themeRef,\n      isMountedRef,\n      appearRef: toRef(props, 'internalAppear'),\n      transformOriginRef: toRef(props, 'transformOrigin')\n    });\n    const cssVarsRef = computed(() => {\n      const {\n        common: {\n          cubicBezierEaseOut\n        },\n        self: {\n          boxShadow,\n          color,\n          textColor\n        }\n      } = themeRef.value;\n      return {\n        '--n-bezier-ease-out': cubicBezierEaseOut,\n        '--n-box-shadow': boxShadow,\n        '--n-color': color,\n        '--n-text-color': textColor\n      };\n    });\n    const themeClassHandle = inlineThemeDisabled ? useThemeClass('theme-class', undefined, cssVarsRef, props) : undefined;\n    return {\n      mergedClsPrefix: mergedClsPrefixRef,\n      namespace: namespaceRef,\n      isMounted: isMountedRef,\n      containerRef,\n      presetProps: computed(() => {\n        const pickedProps = keep(props, presetPropsKeys);\n        // TODO: remove as any after vue fix the issue introduced in 3.2.27\n        return pickedProps;\n      }),\n      handleEsc,\n      handleAfterLeave,\n      handleClickoutside,\n      handleBeforeLeave,\n      doUpdateShow,\n      handleNegativeClick,\n      handlePositiveClick,\n      handleCloseClick,\n      cssVars: inlineThemeDisabled ? undefined : cssVarsRef,\n      themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,\n      onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender\n    };\n  },\n  render() {\n    const {\n      mergedClsPrefix\n    } = this;\n    return h(VLazyTeleport, {\n      to: this.to,\n      show: this.show\n    }, {\n      default: () => {\n        var _a;\n        (_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this);\n        const {\n          unstableShowMask\n        } = this;\n        return withDirectives(h(\"div\", {\n          role: \"none\",\n          ref: \"containerRef\",\n          class: [`${mergedClsPrefix}-modal-container`, this.themeClass, this.namespace],\n          style: this.cssVars\n        }, h(NModalBodyWrapper, Object.assign({\n          style: this.overlayStyle\n        }, this.$attrs, {\n          ref: \"bodyWrapper\",\n          displayDirective: this.displayDirective,\n          show: this.show,\n          preset: this.preset,\n          autoFocus: this.autoFocus,\n          trapFocus: this.trapFocus,\n          draggable: this.draggable,\n          blockScroll: this.blockScroll\n        }, this.presetProps, {\n          onEsc: this.handleEsc,\n          onClose: this.handleCloseClick,\n          onNegativeClick: this.handleNegativeClick,\n          onPositiveClick: this.handlePositiveClick,\n          onBeforeLeave: this.handleBeforeLeave,\n          onAfterEnter: this.onAfterEnter,\n          onAfterLeave: this.handleAfterLeave,\n          onClickoutside: unstableShowMask ? undefined : this.handleClickoutside,\n          renderMask: unstableShowMask ? () => {\n            var _a;\n            return h(Transition, {\n              name: \"fade-in-transition\",\n              key: \"mask\",\n              appear: (_a = this.internalAppear) !== null && _a !== void 0 ? _a : this.isMounted\n            }, {\n              default: () => {\n                return this.show ? h(\"div\", {\n                  \"aria-hidden\": true,\n                  ref: \"containerRef\",\n                  class: `${mergedClsPrefix}-modal-mask`,\n                  onClick: this.handleClickoutside\n                }) : null;\n              }\n            });\n          } : undefined\n        }), this.$slots)), [[zindexable, {\n          zIndex: this.zIndex,\n          enabled: this.show\n        }]]);\n      }\n    });\n  }\n});","import { createInjectionKey } from \"../../_utils/index.mjs\";\nexport const loadingBarProviderInjectionKey = createInjectionKey('n-loading-bar');\nexport const loadingBarApiInjectionKey = createInjectionKey('n-loading-bar-api');","import { commonDark } from \"../../_styles/common/index.mjs\";\nconst loadingBarDark = {\n  name: 'LoadingBar',\n  common: commonDark,\n  self(vars) {\n    const {\n      primaryColor\n    } = vars;\n    return {\n      colorError: 'red',\n      colorLoading: primaryColor,\n      height: '2px'\n    };\n  }\n};\nexport default loadingBarDark;","import { commonLight } from \"../../_styles/common/index.mjs\";\nfunction self(vars) {\n  const {\n    primaryColor,\n    errorColor\n  } = vars;\n  return {\n    colorError: errorColor,\n    colorLoading: primaryColor,\n    height: '2px'\n  };\n}\nconst loadingBarLight = {\n  name: 'LoadingBar',\n  common: commonLight,\n  self\n};\nexport default loadingBarLight;","import { fadeInTransition } from \"../../../_styles/transitions/fade-in.cssr.mjs\";\nimport { cB, cM } from \"../../../_utils/cssr/index.mjs\";\n// vars:\n// --n-height\n// --n-color-loading\n// --n-color-error\nexport default cB('loading-bar-container', `\n z-index: 5999;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n height: 2px;\n`, [fadeInTransition({\n  enterDuration: '0.3s',\n  leaveDuration: '0.8s'\n}), cB('loading-bar', `\n width: 100%;\n transition:\n max-width 4s linear,\n background .2s linear;\n height: var(--n-height);\n `, [cM('starting', `\n background: var(--n-color-loading);\n `), cM('finishing', `\n background: var(--n-color-loading);\n transition:\n max-width .2s linear,\n background .2s linear;\n `), cM('error', `\n background: var(--n-color-error);\n transition:\n max-width .2s linear,\n background .2s linear;\n `)])]);","var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {\n  function adopt(value) {\n    return value instanceof P ? value : new P(function (resolve) {\n      resolve(value);\n    });\n  }\n  return new (P || (P = Promise))(function (resolve, reject) {\n    function fulfilled(value) {\n      try {\n        step(generator.next(value));\n      } catch (e) {\n        reject(e);\n      }\n    }\n    function rejected(value) {\n      try {\n        step(generator[\"throw\"](value));\n      } catch (e) {\n        reject(e);\n      }\n    }\n    function step(result) {\n      result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n    }\n    step((generator = generator.apply(thisArg, _arguments || [])).next());\n  });\n};\nimport { computed, defineComponent, h, inject, nextTick, ref, Transition, vShow, withDirectives } from 'vue';\nimport { useConfig, useTheme, useThemeClass } from \"../../_mixins/index.mjs\";\nimport { loadingBarLight } from \"../styles/index.mjs\";\nimport { loadingBarProviderInjectionKey } from \"./context.mjs\";\nimport style from \"./styles/index.cssr.mjs\";\nfunction createClassName(status, clsPrefix) {\n  return `${clsPrefix}-loading-bar ${clsPrefix}-loading-bar--${status}`;\n}\nexport default defineComponent({\n  name: 'LoadingBar',\n  props: {\n    containerClass: String,\n    containerStyle: [String, Object]\n  },\n  setup() {\n    const {\n      inlineThemeDisabled\n    } = useConfig();\n    const {\n      props: providerProps,\n      mergedClsPrefixRef\n    } = inject(loadingBarProviderInjectionKey);\n    const loadingBarRef = ref(null);\n    const enteringRef = ref(false);\n    const startedRef = ref(false);\n    const loadingRef = ref(false);\n    const transitionDisabledRef = ref(false);\n    let finishing = false;\n    const erroringRef = ref(false);\n    const mergedLoadingBarStyle = computed(() => {\n      const {\n        loadingBarStyle\n      } = providerProps;\n      if (!loadingBarStyle) return '';\n      return loadingBarStyle[erroringRef.value ? 'error' : 'loading'];\n    });\n    function init() {\n      return __awaiter(this, void 0, void 0, function* () {\n        enteringRef.value = false;\n        loadingRef.value = false;\n        finishing = false;\n        erroringRef.value = false;\n        transitionDisabledRef.value = true;\n        yield nextTick();\n        transitionDisabledRef.value = false;\n      });\n    }\n    function start() {\n      return __awaiter(this, arguments, void 0, function* (fromProgress = 0, toProgress = 80, status = 'starting') {\n        startedRef.value = true;\n        yield init();\n        if (finishing) return;\n        loadingRef.value = true;\n        yield nextTick();\n        const el = loadingBarRef.value;\n        if (!el) return;\n        el.style.maxWidth = `${fromProgress}%`;\n        el.style.transition = 'none';\n        void el.offsetWidth;\n        el.className = createClassName(status, mergedClsPrefixRef.value);\n        el.style.transition = '';\n        el.style.maxWidth = `${toProgress}%`;\n      });\n    }\n    function finish() {\n      return __awaiter(this, void 0, void 0, function* () {\n        if (finishing || erroringRef.value) return;\n        if (startedRef.value) {\n          yield nextTick();\n        }\n        finishing = true;\n        const el = loadingBarRef.value;\n        if (!el) return;\n        el.className = createClassName('finishing', mergedClsPrefixRef.value);\n        el.style.maxWidth = '100%';\n        void el.offsetWidth;\n        loadingRef.value = false;\n      });\n    }\n    function error() {\n      if (finishing || erroringRef.value) return;\n      if (!loadingRef.value) {\n        void start(100, 100, 'error').then(() => {\n          erroringRef.value = true;\n          const el = loadingBarRef.value;\n          if (!el) return;\n          el.className = createClassName('error', mergedClsPrefixRef.value);\n          void el.offsetWidth;\n          loadingRef.value = false;\n        });\n      } else {\n        erroringRef.value = true;\n        const el = loadingBarRef.value;\n        if (!el) return;\n        el.className = createClassName('error', mergedClsPrefixRef.value);\n        el.style.maxWidth = '100%';\n        void el.offsetWidth;\n        loadingRef.value = false;\n      }\n    }\n    function handleEnter() {\n      enteringRef.value = true;\n    }\n    function handleAfterEnter() {\n      enteringRef.value = false;\n    }\n    function handleAfterLeave() {\n      return __awaiter(this, void 0, void 0, function* () {\n        yield init();\n      });\n    }\n    const themeRef = useTheme('LoadingBar', '-loading-bar', style, loadingBarLight, providerProps, mergedClsPrefixRef);\n    const cssVarsRef = computed(() => {\n      const {\n        self: {\n          height,\n          colorError,\n          colorLoading\n        }\n      } = themeRef.value;\n      return {\n        '--n-height': height,\n        '--n-color-loading': colorLoading,\n        '--n-color-error': colorError\n      };\n    });\n    const themeClassHandle = inlineThemeDisabled ? useThemeClass('loading-bar', undefined, cssVarsRef, providerProps) : undefined;\n    return {\n      mergedClsPrefix: mergedClsPrefixRef,\n      loadingBarRef,\n      started: startedRef,\n      loading: loadingRef,\n      entering: enteringRef,\n      transitionDisabled: transitionDisabledRef,\n      start,\n      error,\n      finish,\n      handleEnter,\n      handleAfterEnter,\n      handleAfterLeave,\n      mergedLoadingBarStyle,\n      cssVars: inlineThemeDisabled ? undefined : cssVarsRef,\n      themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,\n      onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender\n    };\n  },\n  render() {\n    if (!this.started) return null;\n    const {\n      mergedClsPrefix\n    } = this;\n    return h(Transition, {\n      name: \"fade-in-transition\",\n      appear: true,\n      onEnter: this.handleEnter,\n      onAfterEnter: this.handleAfterEnter,\n      onAfterLeave: this.handleAfterLeave,\n      css: !this.transitionDisabled\n    }, {\n      default: () => {\n        var _a;\n        (_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this);\n        return withDirectives(h(\"div\", {\n          class: [`${mergedClsPrefix}-loading-bar-container`, this.themeClass, this.containerClass],\n          style: this.containerStyle\n        }, h(\"div\", {\n          ref: \"loadingBarRef\",\n          class: [`${mergedClsPrefix}-loading-bar`],\n          style: [this.cssVars, this.mergedLoadingBarStyle]\n        })), [[vShow, this.loading || !this.loading && this.entering]]);\n      }\n    });\n  }\n});","import { useIsMounted } from 'vooks';\nimport { defineComponent, Fragment, h, nextTick, provide, ref, Teleport } from 'vue';\nimport { useConfig, useTheme } from \"../../_mixins/index.mjs\";\nimport { loadingBarApiInjectionKey, loadingBarProviderInjectionKey } from \"./context.mjs\";\nimport NLoadingBar from \"./LoadingBar.mjs\";\nexport const loadingBarProviderProps = Object.assign(Object.assign({}, useTheme.props), {\n  to: {\n    type: [String, Object, Boolean],\n    default: undefined\n  },\n  containerClass: String,\n  containerStyle: [String, Object],\n  loadingBarStyle: {\n    type: Object\n  }\n});\nexport default defineComponent({\n  name: 'LoadingBarProvider',\n  props: loadingBarProviderProps,\n  setup(props) {\n    const isMountedRef = useIsMounted();\n    const loadingBarRef = ref(null);\n    const methods = {\n      start() {\n        var _a;\n        if (isMountedRef.value) {\n          (_a = loadingBarRef.value) === null || _a === void 0 ? void 0 : _a.start();\n        } else {\n          void nextTick(() => {\n            var _a;\n            (_a = loadingBarRef.value) === null || _a === void 0 ? void 0 : _a.start();\n          });\n        }\n      },\n      error() {\n        var _a;\n        if (isMountedRef.value) {\n          (_a = loadingBarRef.value) === null || _a === void 0 ? void 0 : _a.error();\n        } else {\n          void nextTick(() => {\n            var _a;\n            (_a = loadingBarRef.value) === null || _a === void 0 ? void 0 : _a.error();\n          });\n        }\n      },\n      finish() {\n        var _a;\n        if (isMountedRef.value) {\n          (_a = loadingBarRef.value) === null || _a === void 0 ? void 0 : _a.finish();\n        } else {\n          void nextTick(() => {\n            var _a;\n            (_a = loadingBarRef.value) === null || _a === void 0 ? void 0 : _a.finish();\n          });\n        }\n      }\n    };\n    const {\n      mergedClsPrefixRef\n    } = useConfig(props);\n    provide(loadingBarApiInjectionKey, methods);\n    provide(loadingBarProviderInjectionKey, {\n      props,\n      mergedClsPrefixRef\n    });\n    return Object.assign(methods, {\n      loadingBarRef\n    });\n  },\n  render() {\n    var _a, _b;\n    return h(Fragment, null, h(Teleport, {\n      disabled: this.to === false,\n      to: this.to || 'body'\n    }, h(NLoadingBar, {\n      ref: \"loadingBarRef\",\n      containerStyle: this.containerStyle,\n      containerClass: this.containerClass\n    })), (_b = (_a = this.$slots).default) === null || _b === void 0 ? void 0 : _b.call(_a));\n  }\n});","export default {\n  margin: '0 0 8px 0',\n  padding: '10px 20px',\n  maxWidth: '720px',\n  minWidth: '420px',\n  iconMargin: '0 10px 0 0',\n  closeMargin: '0 0 0 10px',\n  closeSize: '20px',\n  closeIconSize: '16px',\n  iconSize: '20px',\n  fontSize: '14px'\n};","import { commonLight } from \"../../_styles/common/index.mjs\";\nimport commonVariables from \"./_common.mjs\";\nexport function self(vars) {\n  const {\n    textColor2,\n    closeIconColor,\n    closeIconColorHover,\n    closeIconColorPressed,\n    infoColor,\n    successColor,\n    errorColor,\n    warningColor,\n    popoverColor,\n    boxShadow2,\n    primaryColor,\n    lineHeight,\n    borderRadius,\n    closeColorHover,\n    closeColorPressed\n  } = vars;\n  return Object.assign(Object.assign({}, commonVariables), {\n    closeBorderRadius: borderRadius,\n    textColor: textColor2,\n    textColorInfo: textColor2,\n    textColorSuccess: textColor2,\n    textColorError: textColor2,\n    textColorWarning: textColor2,\n    textColorLoading: textColor2,\n    color: popoverColor,\n    colorInfo: popoverColor,\n    colorSuccess: popoverColor,\n    colorError: popoverColor,\n    colorWarning: popoverColor,\n    colorLoading: popoverColor,\n    boxShadow: boxShadow2,\n    boxShadowInfo: boxShadow2,\n    boxShadowSuccess: boxShadow2,\n    boxShadowError: boxShadow2,\n    boxShadowWarning: boxShadow2,\n    boxShadowLoading: boxShadow2,\n    iconColor: textColor2,\n    iconColorInfo: infoColor,\n    iconColorSuccess: successColor,\n    iconColorWarning: warningColor,\n    iconColorError: errorColor,\n    iconColorLoading: primaryColor,\n    closeColorHover,\n    closeColorPressed,\n    closeIconColor,\n    closeIconColorHover,\n    closeIconColorPressed,\n    closeColorHoverInfo: closeColorHover,\n    closeColorPressedInfo: closeColorPressed,\n    closeIconColorInfo: closeIconColor,\n    closeIconColorHoverInfo: closeIconColorHover,\n    closeIconColorPressedInfo: closeIconColorPressed,\n    closeColorHoverSuccess: closeColorHover,\n    closeColorPressedSuccess: closeColorPressed,\n    closeIconColorSuccess: closeIconColor,\n    closeIconColorHoverSuccess: closeIconColorHover,\n    closeIconColorPressedSuccess: closeIconColorPressed,\n    closeColorHoverError: closeColorHover,\n    closeColorPressedError: closeColorPressed,\n    closeIconColorError: closeIconColor,\n    closeIconColorHoverError: closeIconColorHover,\n    closeIconColorPressedError: closeIconColorPressed,\n    closeColorHoverWarning: closeColorHover,\n    closeColorPressedWarning: closeColorPressed,\n    closeIconColorWarning: closeIconColor,\n    closeIconColorHoverWarning: closeIconColorHover,\n    closeIconColorPressedWarning: closeIconColorPressed,\n    closeColorHoverLoading: closeColorHover,\n    closeColorPressedLoading: closeColorPressed,\n    closeIconColorLoading: closeIconColor,\n    closeIconColorHoverLoading: closeIconColorHover,\n    closeIconColorPressedLoading: closeIconColorPressed,\n    loadingColor: primaryColor,\n    lineHeight,\n    borderRadius\n  });\n}\nconst messageLight = {\n  name: 'Message',\n  common: commonLight,\n  self\n};\nexport default messageLight;","import { commonDark } from \"../../_styles/common/index.mjs\";\nimport { self } from \"./light.mjs\";\nconst messageDark = {\n  name: 'Message',\n  common: commonDark,\n  self\n};\nexport default messageDark;","export default {\n  closeMargin: '16px 12px',\n  closeSize: '20px',\n  closeIconSize: '16px',\n  width: '365px',\n  padding: '16px',\n  titleFontSize: '16px',\n  metaFontSize: '12px',\n  descriptionFontSize: '12px'\n};","import { scrollbarLight } from \"../../_internal/scrollbar/styles/index.mjs\";\nimport { createTheme } from \"../../_mixins/index.mjs\";\nimport { commonLight } from \"../../_styles/common/index.mjs\";\nimport commonVars from \"./_common.mjs\";\nexport function self(vars) {\n  const {\n    textColor2,\n    successColor,\n    infoColor,\n    warningColor,\n    errorColor,\n    popoverColor,\n    closeIconColor,\n    closeIconColorHover,\n    closeIconColorPressed,\n    closeColorHover,\n    closeColorPressed,\n    textColor1,\n    textColor3,\n    borderRadius,\n    fontWeightStrong,\n    boxShadow2,\n    lineHeight,\n    fontSize\n  } = vars;\n  return Object.assign(Object.assign({}, commonVars), {\n    borderRadius,\n    lineHeight,\n    fontSize,\n    headerFontWeight: fontWeightStrong,\n    iconColor: textColor2,\n    iconColorSuccess: successColor,\n    iconColorInfo: infoColor,\n    iconColorWarning: warningColor,\n    iconColorError: errorColor,\n    color: popoverColor,\n    textColor: textColor2,\n    closeIconColor,\n    closeIconColorHover,\n    closeIconColorPressed,\n    closeBorderRadius: borderRadius,\n    closeColorHover,\n    closeColorPressed,\n    headerTextColor: textColor1,\n    descriptionTextColor: textColor3,\n    actionTextColor: textColor2,\n    boxShadow: boxShadow2\n  });\n}\nconst notificationLight = createTheme({\n  name: 'Notification',\n  common: commonLight,\n  peers: {\n    Scrollbar: scrollbarLight\n  },\n  self\n});\nexport default notificationLight;","import { scrollbarDark } from \"../../_internal/scrollbar/styles/index.mjs\";\nimport { commonDark } from \"../../_styles/common/index.mjs\";\nimport { self } from \"./light.mjs\";\nconst notificationDark = {\n  name: 'Notification',\n  common: commonDark,\n  peers: {\n    Scrollbar: scrollbarDark\n  },\n  self\n};\nexport default notificationDark;","import { commonLight } from \"../../_styles/common/index.mjs\";\nexport function self(vars) {\n  const {\n    textColor1,\n    dividerColor,\n    fontWeightStrong\n  } = vars;\n  return {\n    textColor: textColor1,\n    color: dividerColor,\n    fontWeight: fontWeightStrong\n  };\n}\nconst dividerLight = {\n  name: 'Divider',\n  common: commonLight,\n  self\n};\nexport default dividerLight;","import { commonDark } from \"../../_styles/common/index.mjs\";\nimport { self } from \"./light.mjs\";\nconst dividerDark = {\n  name: 'Divider',\n  common: commonDark,\n  self\n};\nexport default dividerDark;","import { scrollbarLight } from \"../../_internal/scrollbar/styles/index.mjs\";\nimport { createTheme } from \"../../_mixins/index.mjs\";\nimport { commonLight } from \"../../_styles/common/index.mjs\";\nexport function self(vars) {\n  const {\n    modalColor,\n    textColor1,\n    textColor2,\n    boxShadow3,\n    lineHeight,\n    fontWeightStrong,\n    dividerColor,\n    closeColorHover,\n    closeColorPressed,\n    closeIconColor,\n    closeIconColorHover,\n    closeIconColorPressed,\n    borderRadius,\n    primaryColorHover\n  } = vars;\n  return {\n    bodyPadding: '16px 24px',\n    borderRadius,\n    headerPadding: '16px 24px',\n    footerPadding: '16px 24px',\n    color: modalColor,\n    textColor: textColor2,\n    titleTextColor: textColor1,\n    titleFontSize: '18px',\n    titleFontWeight: fontWeightStrong,\n    boxShadow: boxShadow3,\n    lineHeight,\n    headerBorderBottom: `1px solid ${dividerColor}`,\n    footerBorderTop: `1px solid ${dividerColor}`,\n    closeIconColor,\n    closeIconColorHover,\n    closeIconColorPressed,\n    closeSize: '22px',\n    closeIconSize: '18px',\n    closeColorHover,\n    closeColorPressed,\n    closeBorderRadius: borderRadius,\n    resizableTriggerColorHover: primaryColorHover\n  };\n}\nconst drawerLight = createTheme({\n  name: 'Drawer',\n  common: commonLight,\n  peers: {\n    Scrollbar: scrollbarLight\n  },\n  self\n});\nexport default drawerLight;","import { scrollbarDark } from \"../../_internal/scrollbar/styles/index.mjs\";\nimport { commonDark } from \"../../_styles/common/index.mjs\";\nimport { self } from \"./light.mjs\";\nconst drawerDark = {\n  name: 'Drawer',\n  common: commonDark,\n  peers: {\n    Scrollbar: scrollbarDark\n  },\n  self\n};\nexport default drawerDark;","import { clickoutside } from 'vdirs';\nimport { computed, defineComponent, h, inject, mergeProps, onBeforeUnmount, provide, ref, Transition, vShow, watch, watchEffect, withDirectives } from 'vue';\nimport { VFocusTrap } from 'vueuc';\nimport { NScrollbar } from \"../../_internal/index.mjs\";\nimport { useConfig, useRtl } from \"../../_mixins/index.mjs\";\nimport { useLockHtmlScroll } from \"../../_utils/index.mjs\";\nimport { modalBodyInjectionKey } from \"../../modal/src/interface.mjs\";\nimport { popoverBodyInjectionKey } from \"../../popover/src/interface.mjs\";\nimport { drawerBodyInjectionKey, drawerInjectionKey } from \"./interface.mjs\";\nexport default defineComponent({\n  name: 'NDrawerContent',\n  inheritAttrs: false,\n  props: {\n    blockScroll: Boolean,\n    show: {\n      type: Boolean,\n      default: undefined\n    },\n    displayDirective: {\n      type: String,\n      required: true\n    },\n    placement: {\n      type: String,\n      required: true\n    },\n    contentClass: String,\n    contentStyle: [Object, String],\n    nativeScrollbar: {\n      type: Boolean,\n      required: true\n    },\n    scrollbarProps: Object,\n    trapFocus: {\n      type: Boolean,\n      default: true\n    },\n    autoFocus: {\n      type: Boolean,\n      default: true\n    },\n    showMask: {\n      type: [Boolean, String],\n      required: true\n    },\n    maxWidth: Number,\n    maxHeight: Number,\n    minWidth: Number,\n    minHeight: Number,\n    resizable: Boolean,\n    onClickoutside: Function,\n    onAfterLeave: Function,\n    onAfterEnter: Function,\n    onEsc: Function\n  },\n  setup(props) {\n    const displayedRef = ref(!!props.show);\n    const bodyRef = ref(null); // used for detached content\n    const NDrawer = inject(drawerInjectionKey);\n    let startPosition = 0;\n    let memoizedBodyStyleCursor = '';\n    let hoverTimerId = null;\n    const isHoverOnResizeTriggerRef = ref(false);\n    const isDraggingRef = ref(false);\n    const isVertical = computed(() => {\n      return props.placement === 'top' || props.placement === 'bottom';\n    });\n    const {\n      mergedClsPrefixRef,\n      mergedRtlRef\n    } = useConfig(props);\n    const rtlEnabledRef = useRtl('Drawer', mergedRtlRef, mergedClsPrefixRef);\n    const handleBodyMouseleave = handleBodyMouseup;\n    const handleMousedownResizeTrigger = e => {\n      isDraggingRef.value = true;\n      startPosition = isVertical.value ? e.clientY : e.clientX;\n      memoizedBodyStyleCursor = document.body.style.cursor;\n      document.body.style.cursor = isVertical.value ? 'ns-resize' : 'ew-resize';\n      document.body.addEventListener('mousemove', handleBodyMousemove);\n      document.body.addEventListener('mouseleave', handleBodyMouseleave);\n      document.body.addEventListener('mouseup', handleBodyMouseup);\n    };\n    const handleMouseenterResizeTrigger = () => {\n      if (hoverTimerId !== null) {\n        window.clearTimeout(hoverTimerId);\n        hoverTimerId = null;\n      }\n      if (isDraggingRef.value) {\n        isHoverOnResizeTriggerRef.value = true;\n      } else {\n        hoverTimerId = window.setTimeout(() => {\n          isHoverOnResizeTriggerRef.value = true;\n        }, 300);\n      }\n    };\n    const handleMouseleaveResizeTrigger = () => {\n      if (hoverTimerId !== null) {\n        window.clearTimeout(hoverTimerId);\n        hoverTimerId = null;\n      }\n      isHoverOnResizeTriggerRef.value = false;\n    };\n    const {\n      doUpdateHeight,\n      doUpdateWidth\n    } = NDrawer;\n    const regulateWidth = size => {\n      const {\n        maxWidth\n      } = props;\n      if (maxWidth && size > maxWidth) return maxWidth;\n      const {\n        minWidth\n      } = props;\n      if (minWidth && size < minWidth) return minWidth;\n      return size;\n    };\n    const regulateHeight = size => {\n      const {\n        maxHeight\n      } = props;\n      if (maxHeight && size > maxHeight) return maxHeight;\n      const {\n        minHeight\n      } = props;\n      if (minHeight && size < minHeight) return minHeight;\n      return size;\n    };\n    function handleBodyMousemove(e) {\n      var _a, _b;\n      if (isDraggingRef.value) {\n        if (isVertical.value) {\n          let height = ((_a = bodyRef.value) === null || _a === void 0 ? void 0 : _a.offsetHeight) || 0;\n          const increment = startPosition - e.clientY;\n          height += props.placement === 'bottom' ? increment : -increment;\n          height = regulateHeight(height);\n          doUpdateHeight(height);\n          startPosition = e.clientY;\n        } else {\n          let width = ((_b = bodyRef.value) === null || _b === void 0 ? void 0 : _b.offsetWidth) || 0;\n          const increment = startPosition - e.clientX;\n          width += props.placement === 'right' ? increment : -increment;\n          width = regulateWidth(width);\n          doUpdateWidth(width);\n          startPosition = e.clientX;\n        }\n      }\n    }\n    function handleBodyMouseup() {\n      if (isDraggingRef.value) {\n        startPosition = 0;\n        isDraggingRef.value = false;\n        document.body.style.cursor = memoizedBodyStyleCursor;\n        document.body.removeEventListener('mousemove', handleBodyMousemove);\n        document.body.removeEventListener('mouseup', handleBodyMouseup);\n        document.body.removeEventListener('mouseleave', handleBodyMouseleave);\n      }\n    }\n    watchEffect(() => {\n      if (props.show) displayedRef.value = true;\n    });\n    watch(() => props.show, value => {\n      if (!value) {\n        handleBodyMouseup();\n      }\n    });\n    onBeforeUnmount(() => {\n      handleBodyMouseup();\n    });\n    const bodyDirectivesRef = computed(() => {\n      const {\n        show\n      } = props;\n      const directives = [[vShow, show]];\n      if (!props.showMask) {\n        directives.push([clickoutside, props.onClickoutside, undefined, {\n          capture: true\n        }]);\n      }\n      return directives;\n    });\n    function handleAfterLeave() {\n      var _a;\n      displayedRef.value = false;\n      (_a = props.onAfterLeave) === null || _a === void 0 ? void 0 : _a.call(props);\n    }\n    useLockHtmlScroll(computed(() => props.blockScroll && displayedRef.value));\n    provide(drawerBodyInjectionKey, bodyRef);\n    provide(popoverBodyInjectionKey, null);\n    provide(modalBodyInjectionKey, null);\n    return {\n      bodyRef,\n      rtlEnabled: rtlEnabledRef,\n      mergedClsPrefix: NDrawer.mergedClsPrefixRef,\n      isMounted: NDrawer.isMountedRef,\n      mergedTheme: NDrawer.mergedThemeRef,\n      displayed: displayedRef,\n      transitionName: computed(() => {\n        return {\n          right: 'slide-in-from-right-transition',\n          left: 'slide-in-from-left-transition',\n          top: 'slide-in-from-top-transition',\n          bottom: 'slide-in-from-bottom-transition'\n        }[props.placement];\n      }),\n      handleAfterLeave,\n      bodyDirectives: bodyDirectivesRef,\n      handleMousedownResizeTrigger,\n      handleMouseenterResizeTrigger,\n      handleMouseleaveResizeTrigger,\n      isDragging: isDraggingRef,\n      isHoverOnResizeTrigger: isHoverOnResizeTriggerRef\n    };\n  },\n  render() {\n    const {\n      $slots,\n      mergedClsPrefix\n    } = this;\n    return this.displayDirective === 'show' || this.displayed || this.show ? withDirectives(\n    /* Keep the wrapper dom. Make sure the drawer has a host.\n    Nor the detached content will disappear without transition */\n    h(\"div\", {\n      role: \"none\"\n    }, h(VFocusTrap, {\n      disabled: !this.showMask || !this.trapFocus,\n      active: this.show,\n      autoFocus: this.autoFocus,\n      onEsc: this.onEsc\n    }, {\n      default: () => h(Transition, {\n        name: this.transitionName,\n        appear: this.isMounted,\n        onAfterEnter: this.onAfterEnter,\n        onAfterLeave: this.handleAfterLeave\n      }, {\n        default: () => withDirectives(h('div', mergeProps(this.$attrs, {\n          role: 'dialog',\n          ref: 'bodyRef',\n          'aria-modal': 'true',\n          class: [`${mergedClsPrefix}-drawer`, this.rtlEnabled && `${mergedClsPrefix}-drawer--rtl`, `${mergedClsPrefix}-drawer--${this.placement}-placement`,\n          /**\n           * When the mouse is pressed to resize the drawer,\n           * disable text selection\n           */\n          this.isDragging && `${mergedClsPrefix}-drawer--unselectable`, this.nativeScrollbar && `${mergedClsPrefix}-drawer--native-scrollbar`]\n        }), [this.resizable ? h(\"div\", {\n          class: [`${mergedClsPrefix}-drawer__resize-trigger`, (this.isDragging || this.isHoverOnResizeTrigger) && `${mergedClsPrefix}-drawer__resize-trigger--hover`],\n          onMouseenter: this.handleMouseenterResizeTrigger,\n          onMouseleave: this.handleMouseleaveResizeTrigger,\n          onMousedown: this.handleMousedownResizeTrigger\n        }) : null, this.nativeScrollbar ? h(\"div\", {\n          class: [`${mergedClsPrefix}-drawer-content-wrapper`, this.contentClass],\n          style: this.contentStyle,\n          role: \"none\"\n        }, $slots) : h(NScrollbar, Object.assign({}, this.scrollbarProps, {\n          contentStyle: this.contentStyle,\n          contentClass: [`${mergedClsPrefix}-drawer-content-wrapper`, this.contentClass],\n          theme: this.mergedTheme.peers.Scrollbar,\n          themeOverrides: this.mergedTheme.peerOverrides.Scrollbar\n        }), $slots)]), this.bodyDirectives)\n      })\n    })), [[vShow, this.displayDirective === 'if' || this.displayed || this.show]]) : null;\n  }\n});","import { c } from \"../../_utils/cssr/index.mjs\";\nimport commonVariables from \"../common/_common.mjs\";\nconst {\n  cubicBezierEaseIn,\n  cubicBezierEaseOut\n} = commonVariables;\nexport function slideInFromBottomTransition({\n  duration = '0.3s',\n  leaveDuration = '0.2s',\n  name = 'slide-in-from-bottom'\n} = {}) {\n  return [c(`&.${name}-transition-leave-active`, {\n    transition: `transform ${leaveDuration} ${cubicBezierEaseIn}`\n  }), c(`&.${name}-transition-enter-active`, {\n    transition: `transform ${duration} ${cubicBezierEaseOut}`\n  }), c(`&.${name}-transition-enter-to`, {\n    transform: 'translateY(0)'\n  }), c(`&.${name}-transition-enter-from`, {\n    transform: 'translateY(100%)'\n  }), c(`&.${name}-transition-leave-from`, {\n    transform: 'translateY(0)'\n  }), c(`&.${name}-transition-leave-to`, {\n    transform: 'translateY(100%)'\n  })];\n}","import { c } from \"../../_utils/cssr/index.mjs\";\nimport commonVariables from \"../common/_common.mjs\";\nconst {\n  cubicBezierEaseIn,\n  cubicBezierEaseOut\n} = commonVariables;\nexport function slideInFromLeftTransition({\n  duration = '0.3s',\n  leaveDuration = '0.2s',\n  name = 'slide-in-from-left'\n} = {}) {\n  return [c(`&.${name}-transition-leave-active`, {\n    transition: `transform ${leaveDuration} ${cubicBezierEaseIn}`\n  }), c(`&.${name}-transition-enter-active`, {\n    transition: `transform ${duration} ${cubicBezierEaseOut}`\n  }), c(`&.${name}-transition-enter-to`, {\n    transform: 'translateX(0)'\n  }), c(`&.${name}-transition-enter-from`, {\n    transform: 'translateX(-100%)'\n  }), c(`&.${name}-transition-leave-from`, {\n    transform: 'translateX(0)'\n  }), c(`&.${name}-transition-leave-to`, {\n    transform: 'translateX(-100%)'\n  })];\n}","import { c } from \"../../_utils/cssr/index.mjs\";\nimport commonVariables from \"../common/_common.mjs\";\nconst {\n  cubicBezierEaseIn,\n  cubicBezierEaseOut\n} = commonVariables;\nexport function slideInFromRightTransition({\n  duration = '0.3s',\n  leaveDuration = '0.2s',\n  name = 'slide-in-from-right'\n} = {}) {\n  return [c(`&.${name}-transition-leave-active`, {\n    transition: `transform ${leaveDuration} ${cubicBezierEaseIn}`\n  }), c(`&.${name}-transition-enter-active`, {\n    transition: `transform ${duration} ${cubicBezierEaseOut}`\n  }), c(`&.${name}-transition-enter-to`, {\n    transform: 'translateX(0)'\n  }), c(`&.${name}-transition-enter-from`, {\n    transform: 'translateX(100%)'\n  }), c(`&.${name}-transition-leave-from`, {\n    transform: 'translateX(0)'\n  }), c(`&.${name}-transition-leave-to`, {\n    transform: 'translateX(100%)'\n  })];\n}","import { c } from \"../../_utils/cssr/index.mjs\";\nimport commonVariables from \"../common/_common.mjs\";\nconst {\n  cubicBezierEaseIn,\n  cubicBezierEaseOut\n} = commonVariables;\nexport function slideInFromTopTransition({\n  duration = '0.3s',\n  leaveDuration = '0.2s',\n  name = 'slide-in-from-top'\n} = {}) {\n  return [c(`&.${name}-transition-leave-active`, {\n    transition: `transform ${leaveDuration} ${cubicBezierEaseIn}`\n  }), c(`&.${name}-transition-enter-active`, {\n    transition: `transform ${duration} ${cubicBezierEaseOut}`\n  }), c(`&.${name}-transition-enter-to`, {\n    transform: 'translateY(0)'\n  }), c(`&.${name}-transition-enter-from`, {\n    transform: 'translateY(-100%)'\n  }), c(`&.${name}-transition-leave-from`, {\n    transform: 'translateY(0)'\n  }), c(`&.${name}-transition-leave-to`, {\n    transform: 'translateY(-100%)'\n  })];\n}","import { fadeInTransition } from \"../../../_styles/transitions/fade-in.cssr.mjs\";\nimport { slideInFromBottomTransition } from \"../../../_styles/transitions/slide-in-from-bottom.mjs\";\nimport { slideInFromLeftTransition } from \"../../../_styles/transitions/slide-in-from-left.mjs\";\nimport { slideInFromRightTransition } from \"../../../_styles/transitions/slide-in-from-right.mjs\";\nimport { slideInFromTopTransition } from \"../../../_styles/transitions/slide-in-from-top.mjs\";\nimport { c, cB, cE, cM } from \"../../../_utils/cssr/index.mjs\";\n// vars:\n// --n-line-height\n// --n-color\n// --n-border-radius\n// --n-text-color\n// --n-box-shadow\n// --n-bezier\n// --n-bezier-out\n// --n-bezier-in\n// --n-body-padding\n// --n-header-padding\n// --n-footer-padding\n// --n-title-font-size\n// --n-title-text-color\n// --n-title-font-weight\n// --n-header-border-bottom\n// --n-footer-border-top\n// --n-close-border-radius\n// --n-close-color-hover\n// --n-close-color-pressed\n// --n-close-icon-color\n// --n-close-icon-color-hover\n// --n-close-icon-color-pressed\n// --n-close-size\n// --n-close-icon-size\nexport default c([cB('drawer', `\n word-break: break-word;\n line-height: var(--n-line-height);\n position: absolute;\n pointer-events: all;\n box-shadow: var(--n-box-shadow);\n transition:\n background-color .3s var(--n-bezier),\n color .3s var(--n-bezier);\n background-color: var(--n-color);\n color: var(--n-text-color);\n box-sizing: border-box;\n `, [slideInFromRightTransition(), slideInFromLeftTransition(), slideInFromTopTransition(), slideInFromBottomTransition(), cM('unselectable', `\n user-select: none; \n -webkit-user-select: none;\n `), cM('native-scrollbar', [cB('drawer-content-wrapper', `\n overflow: auto;\n height: 100%;\n `)]), cE('resize-trigger', `\n position: absolute;\n background-color: #0000;\n transition: background-color .3s var(--n-bezier);\n `, [cM('hover', `\n background-color: var(--n-resize-trigger-color-hover);\n `)]), cB('drawer-content-wrapper', `\n box-sizing: border-box;\n `), cB('drawer-content', `\n height: 100%;\n display: flex;\n flex-direction: column;\n `, [cM('native-scrollbar', [cB('drawer-body-content-wrapper', `\n height: 100%;\n overflow: auto;\n `)]), cB('drawer-body', `\n flex: 1 0 0;\n overflow: hidden;\n `), cB('drawer-body-content-wrapper', `\n box-sizing: border-box;\n padding: var(--n-body-padding);\n `), cB('drawer-header', `\n font-weight: var(--n-title-font-weight);\n line-height: 1;\n font-size: var(--n-title-font-size);\n color: var(--n-title-text-color);\n padding: var(--n-header-padding);\n transition: border .3s var(--n-bezier);\n border-bottom: 1px solid var(--n-divider-color);\n border-bottom: var(--n-header-border-bottom);\n display: flex;\n justify-content: space-between;\n align-items: center;\n `, [cE('main', `\n flex: 1;\n `), cE('close', `\n margin-left: 6px;\n transition:\n background-color .3s var(--n-bezier),\n color .3s var(--n-bezier);\n `)]), cB('drawer-footer', `\n display: flex;\n justify-content: flex-end;\n border-top: var(--n-footer-border-top);\n transition: border .3s var(--n-bezier);\n padding: var(--n-footer-padding);\n `)]), cM('right-placement', `\n top: 0;\n bottom: 0;\n right: 0;\n border-top-left-radius: var(--n-border-radius);\n border-bottom-left-radius: var(--n-border-radius);\n `, [cE('resize-trigger', `\n width: 3px;\n height: 100%;\n top: 0;\n left: 0;\n transform: translateX(-1.5px);\n cursor: ew-resize;\n `)]), cM('left-placement', `\n top: 0;\n bottom: 0;\n left: 0;\n border-top-right-radius: var(--n-border-radius);\n border-bottom-right-radius: var(--n-border-radius);\n `, [cE('resize-trigger', `\n width: 3px;\n height: 100%;\n top: 0;\n right: 0;\n transform: translateX(1.5px);\n cursor: ew-resize;\n `)]), cM('top-placement', `\n top: 0;\n left: 0;\n right: 0;\n border-bottom-left-radius: var(--n-border-radius);\n border-bottom-right-radius: var(--n-border-radius);\n `, [cE('resize-trigger', `\n width: 100%;\n height: 3px;\n bottom: 0;\n left: 0;\n transform: translateY(1.5px);\n cursor: ns-resize;\n `)]), cM('bottom-placement', `\n left: 0;\n bottom: 0;\n right: 0;\n border-top-left-radius: var(--n-border-radius);\n border-top-right-radius: var(--n-border-radius);\n `, [cE('resize-trigger', `\n width: 100%;\n height: 3px;\n top: 0;\n left: 0;\n transform: translateY(-1.5px);\n cursor: ns-resize;\n `)])]), c('body', [c('>', [cB('drawer-container', `\n position: fixed;\n `)])]), cB('drawer-container', `\n position: relative;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n pointer-events: none;\n `, [c('> *', `\n pointer-events: all;\n `)]), cB('drawer-mask', `\n background-color: rgba(0, 0, 0, .3);\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n `, [cM('invisible', `\n background-color: rgba(0, 0, 0, 0)\n `), fadeInTransition({\n  enterDuration: '0.2s',\n  leaveDuration: '0.2s',\n  enterCubicBezier: 'var(--n-bezier-in)',\n  leaveCubicBezier: 'var(--n-bezier-out)'\n})])]);","import { zindexable } from 'vdirs';\nimport { useIsMounted, useMergedState } from 'vooks';\nimport { computed, defineComponent, h, provide, ref, toRef, Transition, watchEffect, withDirectives } from 'vue';\nimport { VLazyTeleport } from 'vueuc';\nimport { useConfig, useTheme, useThemeClass } from \"../../_mixins/index.mjs\";\nimport { call, eventEffectNotPerformed, formatLength, useIsComposing, warnOnce } from \"../../_utils/index.mjs\";\nimport { drawerLight } from \"../styles/index.mjs\";\nimport NDrawerBodyWrapper from \"./DrawerBodyWrapper.mjs\";\nimport { drawerInjectionKey } from \"./interface.mjs\";\nimport style from \"./styles/index.cssr.mjs\";\nexport const drawerProps = Object.assign(Object.assign({}, useTheme.props), {\n  show: Boolean,\n  width: [Number, String],\n  height: [Number, String],\n  placement: {\n    type: String,\n    default: 'right'\n  },\n  maskClosable: {\n    type: Boolean,\n    default: true\n  },\n  showMask: {\n    type: [Boolean, String],\n    default: true\n  },\n  to: [String, Object],\n  displayDirective: {\n    type: String,\n    default: 'if'\n  },\n  nativeScrollbar: {\n    type: Boolean,\n    default: true\n  },\n  zIndex: Number,\n  onMaskClick: Function,\n  scrollbarProps: Object,\n  contentClass: String,\n  contentStyle: [Object, String],\n  trapFocus: {\n    type: Boolean,\n    default: true\n  },\n  onEsc: Function,\n  autoFocus: {\n    type: Boolean,\n    default: true\n  },\n  closeOnEsc: {\n    type: Boolean,\n    default: true\n  },\n  blockScroll: {\n    type: Boolean,\n    default: true\n  },\n  maxWidth: Number,\n  maxHeight: Number,\n  minWidth: Number,\n  minHeight: Number,\n  resizable: Boolean,\n  defaultWidth: {\n    type: [Number, String],\n    default: 251\n  },\n  defaultHeight: {\n    type: [Number, String],\n    default: 251\n  },\n  onUpdateWidth: [Function, Array],\n  onUpdateHeight: [Function, Array],\n  'onUpdate:width': [Function, Array],\n  'onUpdate:height': [Function, Array],\n  'onUpdate:show': [Function, Array],\n  onUpdateShow: [Function, Array],\n  onAfterEnter: Function,\n  onAfterLeave: Function,\n  /** @deprecated */\n  drawerStyle: [String, Object],\n  drawerClass: String,\n  target: null,\n  onShow: Function,\n  onHide: Function\n});\nexport default defineComponent({\n  name: 'Drawer',\n  inheritAttrs: false,\n  props: drawerProps,\n  setup(props) {\n    if (process.env.NODE_ENV !== 'production') {\n      watchEffect(() => {\n        if (props.drawerStyle !== undefined) {\n          warnOnce('drawer', '`drawer-style` is deprecated, please use `style` instead.');\n        }\n        if (props.drawerClass !== undefined) {\n          warnOnce('drawer', '`drawer-class` is deprecated, please use `class` instead.');\n        }\n        if (props.target !== undefined) {\n          warnOnce('drawer', '`target` is deprecated, please use `to` instead.');\n        }\n        if (props.onShow !== undefined) {\n          warnOnce('drawer', '`on-show` is deprecated, please use `on-update:show` instead.');\n        }\n        if (props.onHide !== undefined) {\n          warnOnce('drawer', '`on-hide` is deprecated, please use `on-update:show` instead.');\n        }\n      });\n    }\n    const {\n      mergedClsPrefixRef,\n      namespaceRef,\n      inlineThemeDisabled\n    } = useConfig(props);\n    const isMountedRef = useIsMounted();\n    const themeRef = useTheme('Drawer', '-drawer', style, drawerLight, props, mergedClsPrefixRef);\n    const uncontrolledWidthRef = ref(props.defaultWidth);\n    const uncontrolledHeightRef = ref(props.defaultHeight);\n    const mergedWidthRef = useMergedState(toRef(props, 'width'), uncontrolledWidthRef);\n    const mergedHeightRef = useMergedState(toRef(props, 'height'), uncontrolledHeightRef);\n    const styleWidthRef = computed(() => {\n      const {\n        placement\n      } = props;\n      if (placement === 'top' || placement === 'bottom') return '';\n      return formatLength(mergedWidthRef.value);\n    });\n    const styleHeightRef = computed(() => {\n      const {\n        placement\n      } = props;\n      if (placement === 'left' || placement === 'right') return '';\n      return formatLength(mergedHeightRef.value);\n    });\n    const doUpdateWidth = value => {\n      const {\n        onUpdateWidth,\n        'onUpdate:width': _onUpdateWidth\n      } = props;\n      if (onUpdateWidth) call(onUpdateWidth, value);\n      if (_onUpdateWidth) call(_onUpdateWidth, value);\n      uncontrolledWidthRef.value = value;\n    };\n    const doUpdateHeight = value => {\n      const {\n        onUpdateHeight,\n        'onUpdate:width': _onUpdateHeight\n      } = props;\n      if (onUpdateHeight) call(onUpdateHeight, value);\n      if (_onUpdateHeight) call(_onUpdateHeight, value);\n      uncontrolledHeightRef.value = value;\n    };\n    const mergedBodyStyleRef = computed(() => {\n      return [{\n        width: styleWidthRef.value,\n        height: styleHeightRef.value\n      }, props.drawerStyle || ''];\n    });\n    function handleMaskClick(e) {\n      const {\n        onMaskClick,\n        maskClosable\n      } = props;\n      if (maskClosable) {\n        doUpdateShow(false);\n      }\n      if (onMaskClick) onMaskClick(e);\n    }\n    function handleOutsideClick(e) {\n      handleMaskClick(e);\n    }\n    const isComposingRef = useIsComposing();\n    function handleEsc(e) {\n      var _a;\n      (_a = props.onEsc) === null || _a === void 0 ? void 0 : _a.call(props);\n      if (props.show && props.closeOnEsc && eventEffectNotPerformed(e)) {\n        if (!isComposingRef.value) {\n          doUpdateShow(false);\n        }\n      }\n    }\n    function doUpdateShow(show) {\n      const {\n        onHide,\n        onUpdateShow,\n        'onUpdate:show': _onUpdateShow\n      } = props;\n      if (onUpdateShow) call(onUpdateShow, show);\n      if (_onUpdateShow) call(_onUpdateShow, show);\n      // deprecated\n      if (onHide && !show) call(onHide, show);\n    }\n    provide(drawerInjectionKey, {\n      isMountedRef,\n      mergedThemeRef: themeRef,\n      mergedClsPrefixRef,\n      doUpdateShow,\n      doUpdateHeight,\n      doUpdateWidth\n    });\n    const cssVarsRef = computed(() => {\n      const {\n        common: {\n          cubicBezierEaseInOut,\n          cubicBezierEaseIn,\n          cubicBezierEaseOut\n        },\n        self: {\n          color,\n          textColor,\n          boxShadow,\n          lineHeight,\n          headerPadding,\n          footerPadding,\n          borderRadius,\n          bodyPadding,\n          titleFontSize,\n          titleTextColor,\n          titleFontWeight,\n          headerBorderBottom,\n          footerBorderTop,\n          closeIconColor,\n          closeIconColorHover,\n          closeIconColorPressed,\n          closeColorHover,\n          closeColorPressed,\n          closeIconSize,\n          closeSize,\n          closeBorderRadius,\n          resizableTriggerColorHover\n        }\n      } = themeRef.value;\n      return {\n        '--n-line-height': lineHeight,\n        '--n-color': color,\n        '--n-border-radius': borderRadius,\n        '--n-text-color': textColor,\n        '--n-box-shadow': boxShadow,\n        '--n-bezier': cubicBezierEaseInOut,\n        '--n-bezier-out': cubicBezierEaseOut,\n        '--n-bezier-in': cubicBezierEaseIn,\n        '--n-header-padding': headerPadding,\n        '--n-body-padding': bodyPadding,\n        '--n-footer-padding': footerPadding,\n        '--n-title-text-color': titleTextColor,\n        '--n-title-font-size': titleFontSize,\n        '--n-title-font-weight': titleFontWeight,\n        '--n-header-border-bottom': headerBorderBottom,\n        '--n-footer-border-top': footerBorderTop,\n        '--n-close-icon-color': closeIconColor,\n        '--n-close-icon-color-hover': closeIconColorHover,\n        '--n-close-icon-color-pressed': closeIconColorPressed,\n        '--n-close-size': closeSize,\n        '--n-close-color-hover': closeColorHover,\n        '--n-close-color-pressed': closeColorPressed,\n        '--n-close-icon-size': closeIconSize,\n        '--n-close-border-radius': closeBorderRadius,\n        '--n-resize-trigger-color-hover': resizableTriggerColorHover\n      };\n    });\n    const themeClassHandle = inlineThemeDisabled ? useThemeClass('drawer', undefined, cssVarsRef, props) : undefined;\n    return {\n      mergedClsPrefix: mergedClsPrefixRef,\n      namespace: namespaceRef,\n      mergedBodyStyle: mergedBodyStyleRef,\n      handleOutsideClick,\n      handleMaskClick,\n      handleEsc,\n      mergedTheme: themeRef,\n      cssVars: inlineThemeDisabled ? undefined : cssVarsRef,\n      themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,\n      onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender,\n      isMounted: isMountedRef\n    };\n  },\n  render() {\n    const {\n      mergedClsPrefix\n    } = this;\n    return h(VLazyTeleport, {\n      to: this.to,\n      show: this.show\n    }, {\n      default: () => {\n        var _a;\n        (_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this);\n        return withDirectives(h(\"div\", {\n          class: [`${mergedClsPrefix}-drawer-container`, this.namespace, this.themeClass],\n          style: this.cssVars,\n          role: \"none\"\n        }, this.showMask ? h(Transition, {\n          name: \"fade-in-transition\",\n          appear: this.isMounted\n        }, {\n          default: () => this.show ? h(\"div\", {\n            \"aria-hidden\": true,\n            class: [`${mergedClsPrefix}-drawer-mask`, this.showMask === 'transparent' && `${mergedClsPrefix}-drawer-mask--invisible`],\n            onClick: this.handleMaskClick\n          }) : null\n        }) : null, h(NDrawerBodyWrapper, Object.assign({}, this.$attrs, {\n          class: [this.drawerClass, this.$attrs.class],\n          style: [this.mergedBodyStyle, this.$attrs.style],\n          blockScroll: this.blockScroll,\n          contentStyle: this.contentStyle,\n          contentClass: this.contentClass,\n          placement: this.placement,\n          scrollbarProps: this.scrollbarProps,\n          show: this.show,\n          displayDirective: this.displayDirective,\n          nativeScrollbar: this.nativeScrollbar,\n          onAfterEnter: this.onAfterEnter,\n          onAfterLeave: this.onAfterLeave,\n          trapFocus: this.trapFocus,\n          autoFocus: this.autoFocus,\n          resizable: this.resizable,\n          maxHeight: this.maxHeight,\n          minHeight: this.minHeight,\n          maxWidth: this.maxWidth,\n          minWidth: this.minWidth,\n          showMask: this.showMask,\n          onEsc: this.handleEsc,\n          onClickoutside: this.handleOutsideClick\n        }), this.$slots)), [[zindexable, {\n          zIndex: this.zIndex,\n          enabled: this.show\n        }]]);\n      }\n    });\n  }\n});","import { defineComponent, h, inject } from 'vue';\nimport { NBaseClose, NScrollbar } from \"../../_internal/index.mjs\";\nimport { throwError } from \"../../_utils/index.mjs\";\nimport { drawerInjectionKey } from \"./interface.mjs\";\nexport const drawerContentProps = {\n  title: String,\n  headerClass: String,\n  headerStyle: [Object, String],\n  footerClass: String,\n  footerStyle: [Object, String],\n  bodyClass: String,\n  bodyStyle: [Object, String],\n  bodyContentClass: String,\n  bodyContentStyle: [Object, String],\n  nativeScrollbar: {\n    type: Boolean,\n    default: true\n  },\n  scrollbarProps: Object,\n  closable: Boolean\n};\nexport default defineComponent({\n  name: 'DrawerContent',\n  props: drawerContentProps,\n  slots: Object,\n  setup() {\n    const NDrawer = inject(drawerInjectionKey, null);\n    if (!NDrawer) {\n      throwError('drawer-content', '`n-drawer-content` must be placed inside `n-drawer`.');\n    }\n    const {\n      doUpdateShow\n    } = NDrawer;\n    function handleCloseClick() {\n      doUpdateShow(false);\n    }\n    return {\n      handleCloseClick,\n      mergedTheme: NDrawer.mergedThemeRef,\n      mergedClsPrefix: NDrawer.mergedClsPrefixRef\n    };\n  },\n  render() {\n    const {\n      title,\n      mergedClsPrefix,\n      nativeScrollbar,\n      mergedTheme,\n      bodyClass,\n      bodyStyle,\n      bodyContentClass,\n      bodyContentStyle,\n      headerClass,\n      headerStyle,\n      footerClass,\n      footerStyle,\n      scrollbarProps,\n      closable,\n      $slots\n    } = this;\n    return h(\"div\", {\n      role: \"none\",\n      class: [`${mergedClsPrefix}-drawer-content`, nativeScrollbar && `${mergedClsPrefix}-drawer-content--native-scrollbar`]\n    }, $slots.header || title || closable ? h(\"div\", {\n      class: [`${mergedClsPrefix}-drawer-header`, headerClass],\n      style: headerStyle,\n      role: \"none\"\n    }, h(\"div\", {\n      class: `${mergedClsPrefix}-drawer-header__main`,\n      role: \"heading\",\n      \"aria-level\": \"1\"\n    }, $slots.header !== undefined ? $slots.header() : title), closable && h(NBaseClose, {\n      onClick: this.handleCloseClick,\n      clsPrefix: mergedClsPrefix,\n      class: `${mergedClsPrefix}-drawer-header__close`,\n      absolute: true\n    })) : null, nativeScrollbar ? h(\"div\", {\n      class: [`${mergedClsPrefix}-drawer-body`, bodyClass],\n      style: bodyStyle,\n      role: \"none\"\n    }, h(\"div\", {\n      class: [`${mergedClsPrefix}-drawer-body-content-wrapper`, bodyContentClass],\n      style: bodyContentStyle,\n      role: \"none\"\n    }, $slots)) : h(NScrollbar, Object.assign({\n      themeOverrides: mergedTheme.peerOverrides.Scrollbar,\n      theme: mergedTheme.peers.Scrollbar\n    }, scrollbarProps, {\n      class: `${mergedClsPrefix}-drawer-body`,\n      contentClass: [`${mergedClsPrefix}-drawer-body-content-wrapper`, bodyContentClass],\n      contentStyle: bodyContentStyle\n    }), $slots), $slots.footer ? h(\"div\", {\n      class: [`${mergedClsPrefix}-drawer-footer`, footerClass],\n      style: footerStyle,\n      role: \"none\"\n    }, $slots.footer()) : null);\n  }\n});","export default {\n  actionMargin: '0 0 0 20px',\n  actionMarginRtl: '0 20px 0 0'\n};","import { commonDark } from \"../../_styles/common/index.mjs\";\nimport { buttonDark } from \"../../button/styles/index.mjs\";\nimport { inputDark } from \"../../input/styles/index.mjs\";\nimport commonVariables from \"./_common.mjs\";\nconst dynamicInputDark = {\n  name: 'DynamicInput',\n  common: commonDark,\n  peers: {\n    Input: inputDark,\n    Button: buttonDark\n  },\n  self() {\n    return commonVariables;\n  }\n};\nexport default dynamicInputDark;","export default {\n  gapSmall: '4px 8px',\n  gapMedium: '8px 12px',\n  gapLarge: '12px 16px'\n};","import commonVars from \"./_common.mjs\";\nconst spaceDark = {\n  name: 'Space',\n  self() {\n    return commonVars;\n  }\n};\nexport default spaceDark;","import commonVars from \"./_common.mjs\";\nfunction self() {\n  return commonVars;\n}\nconst spaceLight = {\n  name: 'Space',\n  self\n};\nexport default spaceLight;","import { isBrowser } from \"../../_utils/index.mjs\";\nlet supportFlexGap;\nexport function ensureSupportFlexGap() {\n  if (!isBrowser) return true;\n  if (supportFlexGap === undefined) {\n    // create flex container with row-gap set\n    const flex = document.createElement('div');\n    flex.style.display = 'flex';\n    flex.style.flexDirection = 'column';\n    flex.style.rowGap = '1px';\n    // create two, elements inside it\n    flex.appendChild(document.createElement('div'));\n    flex.appendChild(document.createElement('div'));\n    // append to the DOM (needed to obtain scrollHeight)\n    document.body.appendChild(flex);\n    const isSupported = flex.scrollHeight === 1; // flex container should be 1px high from the row-gap\n    document.body.removeChild(flex);\n    return supportFlexGap = isSupported;\n  }\n  return supportFlexGap;\n}","import { depx, getGap } from 'seemly';\nimport { Comment, computed, defineComponent, h } from 'vue';\nimport { useConfig, useTheme } from \"../../_mixins/index.mjs\";\nimport { useRtl } from \"../../_mixins/use-rtl.mjs\";\nimport { createKey, flatten, getSlot } from \"../../_utils/index.mjs\";\nimport { spaceLight } from \"../styles/index.mjs\";\nimport { ensureSupportFlexGap } from \"./utils.mjs\";\nexport const spaceProps = Object.assign(Object.assign({}, useTheme.props), {\n  align: String,\n  justify: {\n    type: String,\n    default: 'start'\n  },\n  inline: Boolean,\n  vertical: Boolean,\n  reverse: Boolean,\n  size: {\n    type: [String, Number, Array],\n    default: 'medium'\n  },\n  wrapItem: {\n    type: Boolean,\n    default: true\n  },\n  itemClass: String,\n  itemStyle: [String, Object],\n  wrap: {\n    type: Boolean,\n    default: true\n  },\n  // internal\n  internalUseGap: {\n    type: Boolean,\n    default: undefined\n  }\n});\nexport default defineComponent({\n  name: 'Space',\n  props: spaceProps,\n  setup(props) {\n    const {\n      mergedClsPrefixRef,\n      mergedRtlRef\n    } = useConfig(props);\n    const themeRef = useTheme('Space', '-space', undefined, spaceLight, props, mergedClsPrefixRef);\n    const rtlEnabledRef = useRtl('Space', mergedRtlRef, mergedClsPrefixRef);\n    return {\n      useGap: ensureSupportFlexGap(),\n      rtlEnabled: rtlEnabledRef,\n      mergedClsPrefix: mergedClsPrefixRef,\n      margin: computed(() => {\n        const {\n          size\n        } = props;\n        if (Array.isArray(size)) {\n          return {\n            horizontal: size[0],\n            vertical: size[1]\n          };\n        }\n        if (typeof size === 'number') {\n          return {\n            horizontal: size,\n            vertical: size\n          };\n        }\n        const {\n          self: {\n            [createKey('gap', size)]: gap\n          }\n        } = themeRef.value;\n        const {\n          row,\n          col\n        } = getGap(gap);\n        return {\n          horizontal: depx(col),\n          vertical: depx(row)\n        };\n      })\n    };\n  },\n  render() {\n    const {\n      vertical,\n      reverse,\n      align,\n      inline,\n      justify,\n      itemClass,\n      itemStyle,\n      margin,\n      wrap,\n      mergedClsPrefix,\n      rtlEnabled,\n      useGap,\n      wrapItem,\n      internalUseGap\n    } = this;\n    const children = flatten(getSlot(this), false);\n    if (!children.length) return null;\n    const horizontalMargin = `${margin.horizontal}px`;\n    const semiHorizontalMargin = `${margin.horizontal / 2}px`;\n    const verticalMargin = `${margin.vertical}px`;\n    const semiVerticalMargin = `${margin.vertical / 2}px`;\n    const lastIndex = children.length - 1;\n    const isJustifySpace = justify.startsWith('space-');\n    return h(\"div\", {\n      role: \"none\",\n      class: [`${mergedClsPrefix}-space`, rtlEnabled && `${mergedClsPrefix}-space--rtl`],\n      style: {\n        display: inline ? 'inline-flex' : 'flex',\n        flexDirection: (() => {\n          if (vertical && !reverse) return 'column';\n          if (vertical && reverse) return 'column-reverse';\n          if (!vertical && reverse) return 'row-reverse';\n          /** (!vertical && !reverse) */else return 'row';\n        })(),\n        justifyContent: ['start', 'end'].includes(justify) ? `flex-${justify}` : justify,\n        flexWrap: !wrap || vertical ? 'nowrap' : 'wrap',\n        marginTop: useGap || vertical ? '' : `-${semiVerticalMargin}`,\n        marginBottom: useGap || vertical ? '' : `-${semiVerticalMargin}`,\n        alignItems: align,\n        gap: useGap ? `${margin.vertical}px ${margin.horizontal}px` : ''\n      }\n    }, !wrapItem && (useGap || internalUseGap) ? children : children.map((child, index) => child.type === Comment ? child : h(\"div\", {\n      role: \"none\",\n      class: itemClass,\n      style: [itemStyle, {\n        maxWidth: '100%'\n      }, useGap ? '' : vertical ? {\n        marginBottom: index !== lastIndex ? verticalMargin : ''\n      } : rtlEnabled ? {\n        marginLeft: isJustifySpace ? justify === 'space-between' && index === lastIndex ? '' : semiHorizontalMargin : index !== lastIndex ? horizontalMargin : '',\n        marginRight: isJustifySpace ? justify === 'space-between' && index === 0 ? '' : semiHorizontalMargin : '',\n        paddingTop: semiVerticalMargin,\n        paddingBottom: semiVerticalMargin\n      } : {\n        marginRight: isJustifySpace ? justify === 'space-between' && index === lastIndex ? '' : semiHorizontalMargin : index !== lastIndex ? horizontalMargin : '',\n        marginLeft: isJustifySpace ? justify === 'space-between' && index === 0 ? '' : semiHorizontalMargin : '',\n        paddingTop: semiVerticalMargin,\n        paddingBottom: semiVerticalMargin\n      }]\n    }, child)));\n  }\n});","import { commonDark } from \"../../_styles/common/index.mjs\";\nimport { buttonDark } from \"../../button/styles/index.mjs\";\nimport { inputDark } from \"../../input/styles/index.mjs\";\nimport { spaceDark } from \"../../space/styles/index.mjs\";\nimport { tagDark } from \"../../tag/styles/index.mjs\";\nconst dynamicTagsDark = {\n  name: 'DynamicTags',\n  common: commonDark,\n  peers: {\n    Input: inputDark,\n    Button: buttonDark,\n    Tag: tagDark,\n    Space: spaceDark\n  },\n  self() {\n    return {\n      inputWidth: '64px'\n    };\n  }\n};\nexport default dynamicTagsDark;","import { commonDark } from \"../../_styles/common/index.mjs\";\nconst elementDark = {\n  name: 'Element',\n  common: commonDark\n};\nexport default elementDark;","export default {\n  gapSmall: '4px 8px',\n  gapMedium: '8px 12px',\n  gapLarge: '12px 16px'\n};","import commonVars from \"./_common.mjs\";\nconst flexDark = {\n  name: 'Flex',\n  self() {\n    return commonVars;\n  }\n};\nexport default flexDark;","import { commonDark } from \"../../_styles/common/index.mjs\";\nconst buttonGroupDark = {\n  name: 'ButtonGroup',\n  common: commonDark\n};\nexport default buttonGroupDark;","export default {\n  feedbackPadding: '4px 0 0 2px',\n  feedbackHeightSmall: '24px',\n  feedbackHeightMedium: '24px',\n  feedbackHeightLarge: '26px',\n  feedbackFontSizeSmall: '13px',\n  feedbackFontSizeMedium: '14px',\n  feedbackFontSizeLarge: '14px',\n  labelFontSizeLeftSmall: '14px',\n  labelFontSizeLeftMedium: '14px',\n  labelFontSizeLeftLarge: '15px',\n  labelFontSizeTopSmall: '13px',\n  labelFontSizeTopMedium: '14px',\n  labelFontSizeTopLarge: '14px',\n  labelHeightSmall: '24px',\n  labelHeightMedium: '26px',\n  labelHeightLarge: '28px',\n  labelPaddingVertical: '0 0 6px 2px',\n  labelPaddingHorizontal: '0 12px 0 0',\n  labelTextAlignVertical: 'left',\n  labelTextAlignHorizontal: 'right',\n  labelFontWeight: '400'\n};","import { commonLight } from \"../../_styles/common/index.mjs\";\nimport commonVariables from \"./_common.mjs\";\nexport function self(vars) {\n  const {\n    heightSmall,\n    heightMedium,\n    heightLarge,\n    textColor1,\n    errorColor,\n    warningColor,\n    lineHeight,\n    textColor3\n  } = vars;\n  return Object.assign(Object.assign({}, commonVariables), {\n    blankHeightSmall: heightSmall,\n    blankHeightMedium: heightMedium,\n    blankHeightLarge: heightLarge,\n    lineHeight,\n    labelTextColor: textColor1,\n    asteriskColor: errorColor,\n    feedbackTextColorError: errorColor,\n    feedbackTextColorWarning: warningColor,\n    feedbackTextColor: textColor3\n  });\n}\nconst formLight = {\n  name: 'Form',\n  common: commonLight,\n  self\n};\nexport default formLight;","import { commonDark } from \"../../_styles/common/index.mjs\";\nimport { self } from \"./light.mjs\";\nconst formItemDark = {\n  name: 'Form',\n  common: commonDark,\n  self\n};\nexport default formItemDark;","import { commonDark } from \"../../_styles/common/index.mjs\";\nconst gradientTextDark = {\n  name: 'GradientText',\n  common: commonDark,\n  self(vars) {\n    const {\n      primaryColor,\n      successColor,\n      warningColor,\n      errorColor,\n      infoColor,\n      primaryColorSuppl,\n      successColorSuppl,\n      warningColorSuppl,\n      errorColorSuppl,\n      infoColorSuppl,\n      fontWeightStrong\n    } = vars;\n    return {\n      fontWeight: fontWeightStrong,\n      rotate: '252deg',\n      colorStartPrimary: primaryColor,\n      colorEndPrimary: primaryColorSuppl,\n      colorStartInfo: infoColor,\n      colorEndInfo: infoColorSuppl,\n      colorStartWarning: warningColor,\n      colorEndWarning: warningColorSuppl,\n      colorStartError: errorColor,\n      colorEndError: errorColorSuppl,\n      colorStartSuccess: successColor,\n      colorEndSuccess: successColorSuppl\n    };\n  }\n};\nexport default gradientTextDark;","import { commonDark } from \"../../_styles/common/index.mjs\";\nimport { buttonDark } from \"../../button/styles/index.mjs\";\nimport { inputDark } from \"../../input/styles/index.mjs\";\nconst inputNumberDark = {\n  name: 'InputNumber',\n  common: commonDark,\n  peers: {\n    Button: buttonDark,\n    Input: inputDark\n  },\n  self(vars) {\n    const {\n      textColorDisabled\n    } = vars;\n    return {\n      iconColorDisabled: textColorDisabled\n    };\n  }\n};\nexport default inputNumberDark;","import { createTheme } from \"../../_mixins/index.mjs\";\nimport { commonLight } from \"../../_styles/common/index.mjs\";\nimport { buttonLight } from \"../../button/styles/index.mjs\";\nimport { inputLight } from \"../../input/styles/index.mjs\";\nfunction self(vars) {\n  const {\n    textColorDisabled\n  } = vars;\n  return {\n    iconColorDisabled: textColorDisabled\n  };\n}\nconst inputNumberLight = createTheme({\n  name: 'InputNumber',\n  common: commonLight,\n  peers: {\n    Button: buttonLight,\n    Input: inputLight\n  },\n  self\n});\nexport default inputNumberLight;","import { createTheme } from \"../../_mixins/index.mjs\";\nimport { commonLight } from \"../../_styles/common/index.mjs\";\nimport { inputLight } from \"../../input/styles/index.mjs\";\nexport function self() {\n  return {\n    inputWidthSmall: '24px',\n    inputWidthMedium: '30px',\n    inputWidthLarge: '36px',\n    gapSmall: '8px',\n    gapMedium: '8px',\n    gapLarge: '8px'\n  };\n}\nconst inputOtpLight = createTheme({\n  name: 'InputOtp',\n  common: commonLight,\n  peers: {\n    Input: inputLight\n  },\n  self\n});\nexport default inputOtpLight;","import { commonDark } from \"../../_styles/common/index.mjs\";\nimport { inputDark } from \"../../styles.mjs\";\nimport { self } from \"./light.mjs\";\nconst inputOtpDark = {\n  name: 'InputOtp',\n  common: commonDark,\n  peers: {\n    Input: inputDark\n  },\n  self\n};\nexport default inputOtpDark;","import { composite } from 'seemly';\nimport { scrollbarDark } from \"../../_internal/scrollbar/styles/index.mjs\";\nimport { commonDark } from \"../../_styles/common/index.mjs\";\nconst layoutDark = {\n  name: 'Layout',\n  common: commonDark,\n  peers: {\n    Scrollbar: scrollbarDark\n  },\n  self(vars) {\n    const {\n      textColor2,\n      bodyColor,\n      popoverColor,\n      cardColor,\n      dividerColor,\n      scrollbarColor,\n      scrollbarColorHover\n    } = vars;\n    return {\n      textColor: textColor2,\n      textColorInverted: textColor2,\n      color: bodyColor,\n      colorEmbedded: bodyColor,\n      headerColor: cardColor,\n      headerColorInverted: cardColor,\n      footerColor: cardColor,\n      footerColorInverted: cardColor,\n      headerBorderColor: dividerColor,\n      headerBorderColorInverted: dividerColor,\n      footerBorderColor: dividerColor,\n      footerBorderColorInverted: dividerColor,\n      siderBorderColor: dividerColor,\n      siderBorderColorInverted: dividerColor,\n      siderColor: cardColor,\n      siderColorInverted: cardColor,\n      siderToggleButtonBorder: '1px solid transparent',\n      siderToggleButtonColor: popoverColor,\n      siderToggleButtonIconColor: textColor2,\n      siderToggleButtonIconColorInverted: textColor2,\n      siderToggleBarColor: composite(bodyColor, scrollbarColor),\n      siderToggleBarColorHover: composite(bodyColor, scrollbarColorHover),\n      __invertScrollbar: 'false'\n    };\n  }\n};\nexport default layoutDark;","import { commonDark } from \"../../_styles/common/index.mjs\";\nconst rowDark = {\n  name: 'Row',\n  common: commonDark\n};\nexport default rowDark;","import { composite } from 'seemly';\nimport { commonLight } from \"../../_styles/common/index.mjs\";\nexport function self(vars) {\n  const {\n    textColor2,\n    cardColor,\n    modalColor,\n    popoverColor,\n    dividerColor,\n    borderRadius,\n    fontSize,\n    hoverColor\n  } = vars;\n  return {\n    textColor: textColor2,\n    color: cardColor,\n    colorHover: hoverColor,\n    colorModal: modalColor,\n    colorHoverModal: composite(modalColor, hoverColor),\n    colorPopover: popoverColor,\n    colorHoverPopover: composite(popoverColor, hoverColor),\n    borderColor: dividerColor,\n    borderColorModal: composite(modalColor, dividerColor),\n    borderColorPopover: composite(popoverColor, dividerColor),\n    borderRadius,\n    fontSize\n  };\n}\nconst listLight = {\n  name: 'List',\n  common: commonLight,\n  self\n};\nexport default listLight;","import { commonDark } from \"../../_styles/common/index.mjs\";\nimport { self } from \"./light.mjs\";\nconst listDark = {\n  name: 'List',\n  common: commonDark,\n  self\n};\nexport default listDark;","import { scrollbarDark } from \"../../_internal/scrollbar/styles/index.mjs\";\nimport { commonDark } from \"../../_styles/common/index.mjs\";\nimport { codeDark } from \"../../code/styles/index.mjs\";\nconst logDark = {\n  name: 'Log',\n  common: commonDark,\n  peers: {\n    Scrollbar: scrollbarDark,\n    Code: codeDark\n  },\n  self(vars) {\n    const {\n      textColor2,\n      inputColor,\n      fontSize,\n      primaryColor\n    } = vars;\n    return {\n      loaderFontSize: fontSize,\n      loaderTextColor: textColor2,\n      loaderColor: inputColor,\n      loaderBorder: '1px solid #0000',\n      loadingColor: primaryColor\n    };\n  }\n};\nexport default logDark;","import { internalSelectMenuDark } from \"../../_internal/select-menu/styles/index.mjs\";\nimport { commonDark } from \"../../_styles/common/index.mjs\";\nimport { inputDark } from \"../../input/styles/index.mjs\";\nconst listDark = {\n  name: 'Mention',\n  common: commonDark,\n  peers: {\n    InternalSelectMenu: internalSelectMenuDark,\n    Input: inputDark\n  },\n  self(vars) {\n    const {\n      boxShadow2\n    } = vars;\n    return {\n      menuBoxShadow: boxShadow2\n    };\n  }\n};\nexport default listDark;","import { changeColor } from 'seemly';\nimport { createTheme } from \"../../_mixins/use-theme.mjs\";\nimport { commonLight } from \"../../_styles/common/index.mjs\";\nimport { dropdownLight } from \"../../dropdown/styles/index.mjs\";\nimport { tooltipLight } from \"../../tooltip/styles/index.mjs\";\nexport function createPartialInvertedVars(color, activeItemColor, activeTextColor, groupTextColor) {\n  return {\n    itemColorHoverInverted: '#0000',\n    itemColorActiveInverted: activeItemColor,\n    itemColorActiveHoverInverted: activeItemColor,\n    itemColorActiveCollapsedInverted: activeItemColor,\n    itemTextColorInverted: color,\n    itemTextColorHoverInverted: activeTextColor,\n    itemTextColorChildActiveInverted: activeTextColor,\n    itemTextColorChildActiveHoverInverted: activeTextColor,\n    itemTextColorActiveInverted: activeTextColor,\n    itemTextColorActiveHoverInverted: activeTextColor,\n    itemTextColorHorizontalInverted: color,\n    itemTextColorHoverHorizontalInverted: activeTextColor,\n    itemTextColorChildActiveHorizontalInverted: activeTextColor,\n    itemTextColorChildActiveHoverHorizontalInverted: activeTextColor,\n    itemTextColorActiveHorizontalInverted: activeTextColor,\n    itemTextColorActiveHoverHorizontalInverted: activeTextColor,\n    itemIconColorInverted: color,\n    itemIconColorHoverInverted: activeTextColor,\n    itemIconColorActiveInverted: activeTextColor,\n    itemIconColorActiveHoverInverted: activeTextColor,\n    itemIconColorChildActiveInverted: activeTextColor,\n    itemIconColorChildActiveHoverInverted: activeTextColor,\n    itemIconColorCollapsedInverted: color,\n    itemIconColorHorizontalInverted: color,\n    itemIconColorHoverHorizontalInverted: activeTextColor,\n    itemIconColorActiveHorizontalInverted: activeTextColor,\n    itemIconColorActiveHoverHorizontalInverted: activeTextColor,\n    itemIconColorChildActiveHorizontalInverted: activeTextColor,\n    itemIconColorChildActiveHoverHorizontalInverted: activeTextColor,\n    arrowColorInverted: color,\n    arrowColorHoverInverted: activeTextColor,\n    arrowColorActiveInverted: activeTextColor,\n    arrowColorActiveHoverInverted: activeTextColor,\n    arrowColorChildActiveInverted: activeTextColor,\n    arrowColorChildActiveHoverInverted: activeTextColor,\n    groupTextColorInverted: groupTextColor\n  };\n}\nexport function self(vars) {\n  const {\n    borderRadius,\n    textColor3,\n    primaryColor,\n    textColor2,\n    textColor1,\n    fontSize,\n    dividerColor,\n    hoverColor,\n    primaryColorHover\n  } = vars;\n  return Object.assign({\n    borderRadius,\n    color: '#0000',\n    groupTextColor: textColor3,\n    itemColorHover: hoverColor,\n    itemColorActive: changeColor(primaryColor, {\n      alpha: 0.1\n    }),\n    itemColorActiveHover: changeColor(primaryColor, {\n      alpha: 0.1\n    }),\n    itemColorActiveCollapsed: changeColor(primaryColor, {\n      alpha: 0.1\n    }),\n    itemTextColor: textColor2,\n    itemTextColorHover: textColor2,\n    itemTextColorActive: primaryColor,\n    itemTextColorActiveHover: primaryColor,\n    itemTextColorChildActive: primaryColor,\n    itemTextColorChildActiveHover: primaryColor,\n    itemTextColorHorizontal: textColor2,\n    itemTextColorHoverHorizontal: primaryColorHover,\n    itemTextColorActiveHorizontal: primaryColor,\n    itemTextColorActiveHoverHorizontal: primaryColor,\n    itemTextColorChildActiveHorizontal: primaryColor,\n    itemTextColorChildActiveHoverHorizontal: primaryColor,\n    itemIconColor: textColor1,\n    itemIconColorHover: textColor1,\n    itemIconColorActive: primaryColor,\n    itemIconColorActiveHover: primaryColor,\n    itemIconColorChildActive: primaryColor,\n    itemIconColorChildActiveHover: primaryColor,\n    itemIconColorCollapsed: textColor1,\n    itemIconColorHorizontal: textColor1,\n    itemIconColorHoverHorizontal: primaryColorHover,\n    itemIconColorActiveHorizontal: primaryColor,\n    itemIconColorActiveHoverHorizontal: primaryColor,\n    itemIconColorChildActiveHorizontal: primaryColor,\n    itemIconColorChildActiveHoverHorizontal: primaryColor,\n    itemHeight: '42px',\n    arrowColor: textColor2,\n    arrowColorHover: textColor2,\n    arrowColorActive: primaryColor,\n    arrowColorActiveHover: primaryColor,\n    arrowColorChildActive: primaryColor,\n    arrowColorChildActiveHover: primaryColor,\n    colorInverted: '#0000',\n    borderColorHorizontal: '#0000',\n    fontSize,\n    dividerColor\n  }, createPartialInvertedVars('#BBB', primaryColor, '#FFF', '#AAA'));\n}\nconst menuLight = createTheme({\n  name: 'Menu',\n  common: commonLight,\n  peers: {\n    Tooltip: tooltipLight,\n    Dropdown: dropdownLight\n  },\n  self\n});\nexport default menuLight;","import { changeColor } from 'seemly';\nimport { commonDark } from \"../../_styles/common/index.mjs\";\nimport { dropdownDark } from \"../../dropdown/styles/index.mjs\";\nimport { tooltipDark } from \"../../tooltip/styles/index.mjs\";\nimport { self } from \"./light.mjs\";\nconst menuDark = {\n  name: 'Menu',\n  common: commonDark,\n  peers: {\n    Tooltip: tooltipDark,\n    Dropdown: dropdownDark\n  },\n  self(vars) {\n    const {\n      primaryColor,\n      primaryColorSuppl\n    } = vars;\n    const commonSelf = self(vars);\n    commonSelf.itemColorActive = changeColor(primaryColor, {\n      alpha: 0.15\n    });\n    commonSelf.itemColorActiveHover = changeColor(primaryColor, {\n      alpha: 0.15\n    });\n    commonSelf.itemColorActiveCollapsed = changeColor(primaryColor, {\n      alpha: 0.15\n    });\n    commonSelf.itemColorActiveInverted = primaryColorSuppl;\n    commonSelf.itemColorActiveHoverInverted = primaryColorSuppl;\n    commonSelf.itemColorActiveCollapsedInverted = primaryColorSuppl;\n    return commonSelf;\n  }\n};\nexport default menuDark;","export default {\n  titleFontSize: '18px',\n  backSize: '22px'\n};","import { createTheme } from \"../../_mixins/index.mjs\";\nimport { commonLight } from \"../../_styles/common/index.mjs\";\nimport common from \"./_common.mjs\";\nexport function self(vars) {\n  const {\n    textColor1,\n    textColor2,\n    textColor3,\n    fontSize,\n    fontWeightStrong,\n    primaryColorHover,\n    primaryColorPressed\n  } = vars;\n  return Object.assign(Object.assign({}, common), {\n    titleFontWeight: fontWeightStrong,\n    fontSize,\n    titleTextColor: textColor1,\n    backColor: textColor2,\n    backColorHover: primaryColorHover,\n    backColorPressed: primaryColorPressed,\n    subtitleTextColor: textColor3\n  });\n}\nexport const pageHeaderLight = createTheme({\n  name: 'PageHeader',\n  common: commonLight,\n  self\n});","import { commonDark } from \"../../_styles/common/index.mjs\";\nimport { self } from \"./light.mjs\";\nexport const pageHeaderDark = {\n  name: 'PageHeader',\n  common: commonDark,\n  self\n};","export default {\n  iconSize: '22px'\n};","import { createTheme } from \"../../_mixins/index.mjs\";\nimport { commonLight } from \"../../_styles/common/index.mjs\";\nimport { buttonLight } from \"../../button/styles/index.mjs\";\nimport { popoverLight } from \"../../popover/styles/index.mjs\";\nimport commonVars from \"./_common.mjs\";\nexport function self(vars) {\n  const {\n    fontSize,\n    warningColor\n  } = vars;\n  return Object.assign(Object.assign({}, commonVars), {\n    fontSize,\n    iconColor: warningColor\n  });\n}\nconst popconfirmLight = createTheme({\n  name: 'Popconfirm',\n  common: commonLight,\n  peers: {\n    Button: buttonLight,\n    Popover: popoverLight\n  },\n  self\n});\nexport default popconfirmLight;","import { commonDark } from \"../../_styles/common/index.mjs\";\nimport { buttonDark } from \"../../button/styles/index.mjs\";\nimport { popoverDark } from \"../../popover/styles/index.mjs\";\nimport { self } from \"./light.mjs\";\nconst popconfirmDark = {\n  name: 'Popconfirm',\n  common: commonDark,\n  peers: {\n    Button: buttonDark,\n    Popover: popoverDark\n  },\n  self\n};\nexport default popconfirmDark;","import { commonLight } from \"../../_styles/common/index.mjs\";\nexport function self(vars) {\n  const {\n    infoColor,\n    successColor,\n    warningColor,\n    errorColor,\n    textColor2,\n    progressRailColor,\n    fontSize,\n    fontWeight\n  } = vars;\n  return {\n    fontSize,\n    fontSizeCircle: '28px',\n    fontWeightCircle: fontWeight,\n    railColor: progressRailColor,\n    railHeight: '8px',\n    iconSizeCircle: '36px',\n    iconSizeLine: '18px',\n    iconColor: infoColor,\n    iconColorInfo: infoColor,\n    iconColorSuccess: successColor,\n    iconColorWarning: warningColor,\n    iconColorError: errorColor,\n    textColorCircle: textColor2,\n    textColorLineInner: 'rgb(255, 255, 255)',\n    textColorLineOuter: textColor2,\n    fillColor: infoColor,\n    fillColorInfo: infoColor,\n    fillColorSuccess: successColor,\n    fillColorWarning: warningColor,\n    fillColorError: errorColor,\n    lineBgProcessing: 'linear-gradient(90deg, rgba(255, 255, 255, .3) 0%, rgba(255, 255, 255, .5) 100%)'\n  };\n}\nconst progressLight = {\n  name: 'Progress',\n  common: commonLight,\n  self\n};\nexport default progressLight;","import { commonDark } from \"../../_styles/common/index.mjs\";\nimport { self } from \"./light.mjs\";\nconst progressDark = {\n  name: 'Progress',\n  common: commonDark,\n  self(vars) {\n    const commonSelf = self(vars);\n    commonSelf.textColorLineInner = 'rgb(0, 0, 0)';\n    commonSelf.lineBgProcessing = 'linear-gradient(90deg, rgba(255, 255, 255, .3) 0%, rgba(255, 255, 255, .5) 100%)';\n    return commonSelf;\n  }\n};\nexport default progressDark;","import { commonDark } from \"../../_styles/common/index.mjs\";\nconst rateDark = {\n  name: 'Rate',\n  common: commonDark,\n  self(vars) {\n    const {\n      railColor\n    } = vars;\n    return {\n      itemColor: railColor,\n      itemColorActive: '#CCAA33',\n      itemSize: '20px',\n      sizeSmall: '16px',\n      sizeMedium: '20px',\n      sizeLarge: '24px'\n    };\n  }\n};\nexport default rateDark;","export default {\n  titleFontSizeSmall: '26px',\n  titleFontSizeMedium: '32px',\n  titleFontSizeLarge: '40px',\n  titleFontSizeHuge: '48px',\n  fontSizeSmall: '14px',\n  fontSizeMedium: '14px',\n  fontSizeLarge: '15px',\n  fontSizeHuge: '16px',\n  iconSizeSmall: '64px',\n  iconSizeMedium: '80px',\n  iconSizeLarge: '100px',\n  iconSizeHuge: '125px',\n  iconColor418: undefined,\n  iconColor404: undefined,\n  iconColor403: undefined,\n  iconColor500: undefined\n};","import { commonLight } from \"../../_styles/common/index.mjs\";\nimport commonVariables from \"./_common.mjs\";\nexport function self(vars) {\n  const {\n    textColor2,\n    textColor1,\n    errorColor,\n    successColor,\n    infoColor,\n    warningColor,\n    lineHeight,\n    fontWeightStrong\n  } = vars;\n  return Object.assign(Object.assign({}, commonVariables), {\n    lineHeight,\n    titleFontWeight: fontWeightStrong,\n    titleTextColor: textColor1,\n    textColor: textColor2,\n    iconColorError: errorColor,\n    iconColorSuccess: successColor,\n    iconColorInfo: infoColor,\n    iconColorWarning: warningColor\n  });\n}\nconst resultLight = {\n  name: 'Result',\n  common: commonLight,\n  self\n};\nexport default resultLight;","import { commonDark } from \"../../_styles/common/index.mjs\";\nimport { self } from \"./light.mjs\";\nconst resultDark = {\n  name: 'Result',\n  common: commonDark,\n  self\n};\nexport default resultDark;","export default {\n  railHeight: '4px',\n  railWidthVertical: '4px',\n  handleSize: '18px',\n  dotHeight: '8px',\n  dotWidth: '8px',\n  dotBorderRadius: '4px'\n};","import { commonDark } from \"../../_styles/common/index.mjs\";\nimport sizeVariables from \"./_common.mjs\";\nconst sliderDark = {\n  name: 'Slider',\n  common: commonDark,\n  self(vars) {\n    const boxShadow = '0 2px 8px 0 rgba(0, 0, 0, 0.12)';\n    const {\n      railColor,\n      modalColor,\n      primaryColorSuppl,\n      popoverColor,\n      textColor2,\n      cardColor,\n      borderRadius,\n      fontSize,\n      opacityDisabled\n    } = vars;\n    return Object.assign(Object.assign({}, sizeVariables), {\n      fontSize,\n      markFontSize: fontSize,\n      railColor,\n      railColorHover: railColor,\n      fillColor: primaryColorSuppl,\n      fillColorHover: primaryColorSuppl,\n      opacityDisabled,\n      handleColor: '#FFF',\n      dotColor: cardColor,\n      dotColorModal: modalColor,\n      dotColorPopover: popoverColor,\n      handleBoxShadow: '0px 2px 4px 0 rgba(0, 0, 0, 0.4)',\n      handleBoxShadowHover: '0px 2px 4px 0 rgba(0, 0, 0, 0.4)',\n      handleBoxShadowActive: '0px 2px 4px 0 rgba(0, 0, 0, 0.4)',\n      handleBoxShadowFocus: '0px 2px 4px 0 rgba(0, 0, 0, 0.4)',\n      indicatorColor: popoverColor,\n      indicatorBoxShadow: boxShadow,\n      indicatorTextColor: textColor2,\n      indicatorBorderRadius: borderRadius,\n      dotBorder: `2px solid ${railColor}`,\n      dotBorderActive: `2px solid ${primaryColorSuppl}`,\n      dotBoxShadow: ''\n    });\n  }\n};\nexport default sliderDark;","import { commonLight } from \"../../_styles/common/index.mjs\";\nexport function self(vars) {\n  const {\n    opacityDisabled,\n    heightTiny,\n    heightSmall,\n    heightMedium,\n    heightLarge,\n    heightHuge,\n    primaryColor,\n    fontSize\n  } = vars;\n  return {\n    fontSize,\n    textColor: primaryColor,\n    sizeTiny: heightTiny,\n    sizeSmall: heightSmall,\n    sizeMedium: heightMedium,\n    sizeLarge: heightLarge,\n    sizeHuge: heightHuge,\n    color: primaryColor,\n    opacitySpinning: opacityDisabled\n  };\n}\nconst spinLight = {\n  name: 'Spin',\n  common: commonLight,\n  self\n};\nexport default spinLight;","import { commonDark } from \"../../_styles/common/index.mjs\";\nimport { self } from \"./light.mjs\";\nconst spinDark = {\n  name: 'Spin',\n  common: commonDark,\n  self\n};\nexport default spinDark;","import { commonLight } from \"../../_styles/common/index.mjs\";\nexport function self(vars) {\n  const {\n    textColor2,\n    textColor3,\n    fontSize,\n    fontWeight\n  } = vars;\n  return {\n    labelFontSize: fontSize,\n    labelFontWeight: fontWeight,\n    valueFontWeight: fontWeight,\n    valueFontSize: '24px',\n    labelTextColor: textColor3,\n    valuePrefixTextColor: textColor2,\n    valueSuffixTextColor: textColor2,\n    valueTextColor: textColor2\n  };\n}\nconst statisticLight = {\n  name: 'Statistic',\n  common: commonLight,\n  self\n};\nexport default statisticLight;","import { commonDark } from \"../../_styles/common/index.mjs\";\nimport { self } from \"./light.mjs\";\nconst statisticDark = {\n  name: 'Statistic',\n  common: commonDark,\n  self\n};\nexport default statisticDark;","export default {\n  stepHeaderFontSizeSmall: '14px',\n  stepHeaderFontSizeMedium: '16px',\n  indicatorIndexFontSizeSmall: '14px',\n  indicatorIndexFontSizeMedium: '16px',\n  indicatorSizeSmall: '22px',\n  indicatorSizeMedium: '28px',\n  indicatorIconSizeSmall: '14px',\n  indicatorIconSizeMedium: '18px'\n};","import { commonLight } from \"../../_styles/common/index.mjs\";\nimport commonVariables from \"./_common.mjs\";\nexport function self(vars) {\n  const {\n    fontWeightStrong,\n    baseColor,\n    textColorDisabled,\n    primaryColor,\n    errorColor,\n    textColor1,\n    textColor2\n  } = vars;\n  return Object.assign(Object.assign({}, commonVariables), {\n    stepHeaderFontWeight: fontWeightStrong,\n    indicatorTextColorProcess: baseColor,\n    indicatorTextColorWait: textColorDisabled,\n    indicatorTextColorFinish: primaryColor,\n    indicatorTextColorError: errorColor,\n    indicatorBorderColorProcess: primaryColor,\n    indicatorBorderColorWait: textColorDisabled,\n    indicatorBorderColorFinish: primaryColor,\n    indicatorBorderColorError: errorColor,\n    indicatorColorProcess: primaryColor,\n    indicatorColorWait: '#0000',\n    indicatorColorFinish: '#0000',\n    indicatorColorError: '#0000',\n    splitorColorProcess: textColorDisabled,\n    splitorColorWait: textColorDisabled,\n    splitorColorFinish: primaryColor,\n    splitorColorError: textColorDisabled,\n    headerTextColorProcess: textColor1,\n    headerTextColorWait: textColorDisabled,\n    headerTextColorFinish: textColorDisabled,\n    headerTextColorError: errorColor,\n    descriptionTextColorProcess: textColor2,\n    descriptionTextColorWait: textColorDisabled,\n    descriptionTextColorFinish: textColorDisabled,\n    descriptionTextColorError: errorColor\n  });\n}\nconst stepsLight = {\n  name: 'Steps',\n  common: commonLight,\n  self\n};\nexport default stepsLight;","import { commonDark } from \"../../_styles/common/index.mjs\";\nimport { self } from \"./light.mjs\";\nconst stepsDark = {\n  name: 'Steps',\n  common: commonDark,\n  self\n};\nexport default stepsDark;","export default {\n  buttonHeightSmall: '14px',\n  buttonHeightMedium: '18px',\n  buttonHeightLarge: '22px',\n  buttonWidthSmall: '14px',\n  buttonWidthMedium: '18px',\n  buttonWidthLarge: '22px',\n  buttonWidthPressedSmall: '20px',\n  buttonWidthPressedMedium: '24px',\n  buttonWidthPressedLarge: '28px',\n  railHeightSmall: '18px',\n  railHeightMedium: '22px',\n  railHeightLarge: '26px',\n  railWidthSmall: '32px',\n  railWidthMedium: '40px',\n  railWidthLarge: '48px'\n};","import { changeColor } from 'seemly';\nimport { commonDark } from \"../../_styles/common/index.mjs\";\nimport commonVars from \"./_common.mjs\";\nconst switchDark = {\n  name: 'Switch',\n  common: commonDark,\n  self(vars) {\n    const {\n      primaryColorSuppl,\n      opacityDisabled,\n      borderRadius,\n      primaryColor,\n      textColor2,\n      baseColor\n    } = vars;\n    const railOverlayColor = 'rgba(255, 255, 255, .20)';\n    return Object.assign(Object.assign({}, commonVars), {\n      iconColor: baseColor,\n      textColor: textColor2,\n      loadingColor: primaryColorSuppl,\n      opacityDisabled,\n      railColor: railOverlayColor,\n      railColorActive: primaryColorSuppl,\n      buttonBoxShadow: '0px 2px 4px 0 rgba(0, 0, 0, 0.4)',\n      buttonColor: '#FFF',\n      railBorderRadiusSmall: borderRadius,\n      railBorderRadiusMedium: borderRadius,\n      railBorderRadiusLarge: borderRadius,\n      buttonBorderRadiusSmall: borderRadius,\n      buttonBorderRadiusMedium: borderRadius,\n      buttonBorderRadiusLarge: borderRadius,\n      boxShadowFocus: `0 0 8px 0 ${changeColor(primaryColor, {\n        alpha: 0.3\n      })}`\n    });\n  }\n};\nexport default switchDark;","import { changeColor } from 'seemly';\nimport { commonLight } from \"../../_styles/common/index.mjs\";\nimport commonVars from \"./_common.mjs\";\nfunction self(vars) {\n  const {\n    primaryColor,\n    opacityDisabled,\n    borderRadius,\n    textColor3\n  } = vars;\n  const railOverlayColor = 'rgba(0, 0, 0, .14)';\n  return Object.assign(Object.assign({}, commonVars), {\n    iconColor: textColor3,\n    textColor: 'white',\n    loadingColor: primaryColor,\n    opacityDisabled,\n    railColor: railOverlayColor,\n    railColorActive: primaryColor,\n    buttonBoxShadow: '0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)',\n    buttonColor: '#FFF',\n    railBorderRadiusSmall: borderRadius,\n    railBorderRadiusMedium: borderRadius,\n    railBorderRadiusLarge: borderRadius,\n    buttonBorderRadiusSmall: borderRadius,\n    buttonBorderRadiusMedium: borderRadius,\n    buttonBorderRadiusLarge: borderRadius,\n    boxShadowFocus: `0 0 0 2px ${changeColor(primaryColor, {\n      alpha: 0.2\n    })}`\n  });\n}\nconst switchLight = {\n  name: 'Switch',\n  common: commonLight,\n  self\n};\nexport default switchLight;","export default {\n  thPaddingSmall: '6px',\n  thPaddingMedium: '12px',\n  thPaddingLarge: '12px',\n  tdPaddingSmall: '6px',\n  tdPaddingMedium: '12px',\n  tdPaddingLarge: '12px'\n};","import { composite } from 'seemly';\nimport { commonLight } from \"../../_styles/common/index.mjs\";\nimport sizeVariables from \"./_common.mjs\";\nexport function self(vars) {\n  const {\n    dividerColor,\n    cardColor,\n    modalColor,\n    popoverColor,\n    tableHeaderColor,\n    tableColorStriped,\n    textColor1,\n    textColor2,\n    borderRadius,\n    fontWeightStrong,\n    lineHeight,\n    fontSizeSmall,\n    fontSizeMedium,\n    fontSizeLarge\n  } = vars;\n  return Object.assign(Object.assign({}, sizeVariables), {\n    fontSizeSmall,\n    fontSizeMedium,\n    fontSizeLarge,\n    lineHeight,\n    borderRadius,\n    borderColor: composite(cardColor, dividerColor),\n    borderColorModal: composite(modalColor, dividerColor),\n    borderColorPopover: composite(popoverColor, dividerColor),\n    tdColor: cardColor,\n    tdColorModal: modalColor,\n    tdColorPopover: popoverColor,\n    tdColorStriped: composite(cardColor, tableColorStriped),\n    tdColorStripedModal: composite(modalColor, tableColorStriped),\n    tdColorStripedPopover: composite(popoverColor, tableColorStriped),\n    thColor: composite(cardColor, tableHeaderColor),\n    thColorModal: composite(modalColor, tableHeaderColor),\n    thColorPopover: composite(popoverColor, tableHeaderColor),\n    thTextColor: textColor1,\n    tdTextColor: textColor2,\n    thFontWeight: fontWeightStrong\n  });\n}\nconst tableLight = {\n  name: 'Table',\n  common: commonLight,\n  self\n};\nexport default tableLight;","import { commonDark } from \"../../_styles/common/index.mjs\";\nimport { self } from \"./light.mjs\";\nconst tableDark = {\n  name: 'Table',\n  common: commonDark,\n  self\n};\nexport default tableDark;","export default {\n  tabFontSizeSmall: '14px',\n  tabFontSizeMedium: '14px',\n  tabFontSizeLarge: '16px',\n  tabGapSmallLine: '36px',\n  tabGapMediumLine: '36px',\n  tabGapLargeLine: '36px',\n  tabGapSmallLineVertical: '8px',\n  tabGapMediumLineVertical: '8px',\n  tabGapLargeLineVertical: '8px',\n  tabPaddingSmallLine: '6px 0',\n  tabPaddingMediumLine: '10px 0',\n  tabPaddingLargeLine: '14px 0',\n  tabPaddingVerticalSmallLine: '6px 12px',\n  tabPaddingVerticalMediumLine: '8px 16px',\n  tabPaddingVerticalLargeLine: '10px 20px',\n  tabGapSmallBar: '36px',\n  tabGapMediumBar: '36px',\n  tabGapLargeBar: '36px',\n  tabGapSmallBarVertical: '8px',\n  tabGapMediumBarVertical: '8px',\n  tabGapLargeBarVertical: '8px',\n  tabPaddingSmallBar: '4px 0',\n  tabPaddingMediumBar: '6px 0',\n  tabPaddingLargeBar: '10px 0',\n  tabPaddingVerticalSmallBar: '6px 12px',\n  tabPaddingVerticalMediumBar: '8px 16px',\n  tabPaddingVerticalLargeBar: '10px 20px',\n  tabGapSmallCard: '4px',\n  tabGapMediumCard: '4px',\n  tabGapLargeCard: '4px',\n  tabGapSmallCardVertical: '4px',\n  tabGapMediumCardVertical: '4px',\n  tabGapLargeCardVertical: '4px',\n  tabPaddingSmallCard: '8px 16px',\n  tabPaddingMediumCard: '10px 20px',\n  tabPaddingLargeCard: '12px 24px',\n  tabPaddingSmallSegment: '4px 0',\n  tabPaddingMediumSegment: '6px 0',\n  tabPaddingLargeSegment: '8px 0',\n  tabPaddingVerticalLargeSegment: '0 8px',\n  tabPaddingVerticalSmallCard: '8px 12px',\n  tabPaddingVerticalMediumCard: '10px 16px',\n  tabPaddingVerticalLargeCard: '12px 20px',\n  tabPaddingVerticalSmallSegment: '0 4px',\n  tabPaddingVerticalMediumSegment: '0 6px',\n  tabGapSmallSegment: '0',\n  tabGapMediumSegment: '0',\n  tabGapLargeSegment: '0',\n  tabGapSmallSegmentVertical: '0',\n  tabGapMediumSegmentVertical: '0',\n  tabGapLargeSegmentVertical: '0',\n  panePaddingSmall: '8px 0 0 0',\n  panePaddingMedium: '12px 0 0 0',\n  panePaddingLarge: '16px 0 0 0',\n  closeSize: '18px',\n  closeIconSize: '14px'\n};","import { commonLight } from \"../../_styles/common/index.mjs\";\nimport sizeVariables from \"./_common.mjs\";\nexport function self(vars) {\n  const {\n    textColor2,\n    primaryColor,\n    textColorDisabled,\n    closeIconColor,\n    closeIconColorHover,\n    closeIconColorPressed,\n    closeColorHover,\n    closeColorPressed,\n    tabColor,\n    baseColor,\n    dividerColor,\n    fontWeight,\n    textColor1,\n    borderRadius,\n    fontSize,\n    fontWeightStrong\n  } = vars;\n  return Object.assign(Object.assign({}, sizeVariables), {\n    colorSegment: tabColor,\n    tabFontSizeCard: fontSize,\n    tabTextColorLine: textColor1,\n    tabTextColorActiveLine: primaryColor,\n    tabTextColorHoverLine: primaryColor,\n    tabTextColorDisabledLine: textColorDisabled,\n    tabTextColorSegment: textColor1,\n    tabTextColorActiveSegment: textColor2,\n    tabTextColorHoverSegment: textColor2,\n    tabTextColorDisabledSegment: textColorDisabled,\n    tabTextColorBar: textColor1,\n    tabTextColorActiveBar: primaryColor,\n    tabTextColorHoverBar: primaryColor,\n    tabTextColorDisabledBar: textColorDisabled,\n    tabTextColorCard: textColor1,\n    tabTextColorHoverCard: textColor1,\n    tabTextColorActiveCard: primaryColor,\n    tabTextColorDisabledCard: textColorDisabled,\n    barColor: primaryColor,\n    closeIconColor,\n    closeIconColorHover,\n    closeIconColorPressed,\n    closeColorHover,\n    closeColorPressed,\n    closeBorderRadius: borderRadius,\n    tabColor,\n    tabColorSegment: baseColor,\n    tabBorderColor: dividerColor,\n    tabFontWeightActive: fontWeight,\n    tabFontWeight: fontWeight,\n    tabBorderRadius: borderRadius,\n    paneTextColor: textColor2,\n    fontWeightStrong\n  });\n}\nconst tabsLight = {\n  name: 'Tabs',\n  common: commonLight,\n  self\n};\nexport default tabsLight;","import { commonDark } from \"../../_styles/common/index.mjs\";\nimport { self } from \"./light.mjs\";\nconst tabsDark = {\n  name: 'Tabs',\n  common: commonDark,\n  self(vars) {\n    const commonSelf = self(vars);\n    const {\n      inputColor\n    } = vars;\n    commonSelf.colorSegment = inputColor;\n    commonSelf.tabColorSegment = inputColor;\n    return commonSelf;\n  }\n};\nexport default tabsDark;","import { commonLight } from \"../../_styles/common/index.mjs\";\nexport function self(vars) {\n  const {\n    textColor1,\n    textColor2,\n    fontWeightStrong,\n    fontSize\n  } = vars;\n  return {\n    fontSize,\n    titleTextColor: textColor1,\n    textColor: textColor2,\n    titleFontWeight: fontWeightStrong\n  };\n}\nconst thingLight = {\n  name: 'Thing',\n  common: commonLight,\n  self\n};\nexport default thingLight;","import { commonDark } from \"../../_styles/common/index.mjs\";\nimport { self } from \"./light.mjs\";\nconst thingDark = {\n  name: 'Thing',\n  common: commonDark,\n  self\n};\nexport default thingDark;","export default {\n  titleMarginMedium: '0 0 6px 0',\n  titleMarginLarge: '-2px 0 6px 0',\n  titleFontSizeMedium: '14px',\n  titleFontSizeLarge: '16px',\n  iconSizeMedium: '14px',\n  iconSizeLarge: '14px'\n};","import { commonDark } from \"../../_styles/common/index.mjs\";\nimport sizeVariables from \"./_common.mjs\";\nconst timelineDark = {\n  name: 'Timeline',\n  common: commonDark,\n  self(vars) {\n    const {\n      textColor3,\n      infoColorSuppl,\n      errorColorSuppl,\n      successColorSuppl,\n      warningColorSuppl,\n      textColor1,\n      textColor2,\n      railColor,\n      fontWeightStrong,\n      fontSize\n    } = vars;\n    return Object.assign(Object.assign({}, sizeVariables), {\n      contentFontSize: fontSize,\n      titleFontWeight: fontWeightStrong,\n      circleBorder: `2px solid ${textColor3}`,\n      circleBorderInfo: `2px solid ${infoColorSuppl}`,\n      circleBorderError: `2px solid ${errorColorSuppl}`,\n      circleBorderSuccess: `2px solid ${successColorSuppl}`,\n      circleBorderWarning: `2px solid ${warningColorSuppl}`,\n      iconColor: textColor3,\n      iconColorInfo: infoColorSuppl,\n      iconColorError: errorColorSuppl,\n      iconColorSuccess: successColorSuppl,\n      iconColorWarning: warningColorSuppl,\n      titleTextColor: textColor1,\n      contentTextColor: textColor2,\n      metaTextColor: textColor3,\n      lineColor: railColor\n    });\n  }\n};\nexport default timelineDark;","export default {\n  extraFontSizeSmall: '12px',\n  extraFontSizeMedium: '12px',\n  extraFontSizeLarge: '14px',\n  titleFontSizeSmall: '14px',\n  titleFontSizeMedium: '16px',\n  titleFontSizeLarge: '16px',\n  closeSize: '20px',\n  closeIconSize: '16px',\n  headerHeightSmall: '44px',\n  headerHeightMedium: '44px',\n  headerHeightLarge: '50px'\n};","import { scrollbarDark } from \"../../_internal/scrollbar/styles/index.mjs\";\nimport { commonDark } from \"../../_styles/common/index.mjs\";\nimport { buttonDark } from \"../../button/styles/index.mjs\";\nimport { checkboxDark } from \"../../checkbox/styles/index.mjs\";\nimport { emptyDark } from \"../../empty/styles/index.mjs\";\nimport { inputDark } from \"../../input/styles/index.mjs\";\nimport commonVariables from \"./_common.mjs\";\nconst transferDark = {\n  name: 'Transfer',\n  common: commonDark,\n  peers: {\n    Checkbox: checkboxDark,\n    Scrollbar: scrollbarDark,\n    Input: inputDark,\n    Empty: emptyDark,\n    Button: buttonDark\n  },\n  self(vars) {\n    const {\n      fontWeight,\n      fontSizeLarge,\n      fontSizeMedium,\n      fontSizeSmall,\n      heightLarge,\n      heightMedium,\n      borderRadius,\n      inputColor,\n      tableHeaderColor,\n      textColor1,\n      textColorDisabled,\n      textColor2,\n      textColor3,\n      hoverColor,\n      closeColorHover,\n      closeColorPressed,\n      closeIconColor,\n      closeIconColorHover,\n      closeIconColorPressed,\n      dividerColor\n    } = vars;\n    return Object.assign(Object.assign({}, commonVariables), {\n      itemHeightSmall: heightMedium,\n      itemHeightMedium: heightMedium,\n      itemHeightLarge: heightLarge,\n      fontSizeSmall,\n      fontSizeMedium,\n      fontSizeLarge,\n      borderRadius,\n      dividerColor,\n      borderColor: '#0000',\n      listColor: inputColor,\n      headerColor: tableHeaderColor,\n      titleTextColor: textColor1,\n      titleTextColorDisabled: textColorDisabled,\n      extraTextColor: textColor3,\n      extraTextColorDisabled: textColorDisabled,\n      itemTextColor: textColor2,\n      itemTextColorDisabled: textColorDisabled,\n      itemColorPending: hoverColor,\n      titleFontWeight: fontWeight,\n      closeColorHover,\n      closeColorPressed,\n      closeIconColor,\n      closeIconColorHover,\n      closeIconColorPressed\n    });\n  }\n};\nexport default transferDark;","import { changeColor } from 'seemly';\nimport { scrollbarLight } from \"../../_internal/scrollbar/styles/index.mjs\";\nimport { createTheme } from \"../../_mixins/use-theme.mjs\";\nimport { commonLight } from \"../../_styles/common/index.mjs\";\nimport { checkboxLight } from \"../../checkbox/styles/index.mjs\";\nimport { emptyLight } from \"../../empty/styles/index.mjs\";\nexport function self(vars) {\n  const {\n    borderRadiusSmall,\n    dividerColor,\n    hoverColor,\n    pressedColor,\n    primaryColor,\n    textColor3,\n    textColor2,\n    textColorDisabled,\n    fontSize\n  } = vars;\n  return {\n    fontSize,\n    lineHeight: '1.5',\n    nodeHeight: '30px',\n    nodeWrapperPadding: '3px 0',\n    nodeBorderRadius: borderRadiusSmall,\n    nodeColorHover: hoverColor,\n    nodeColorPressed: pressedColor,\n    nodeColorActive: changeColor(primaryColor, {\n      alpha: 0.1\n    }),\n    arrowColor: textColor3,\n    nodeTextColor: textColor2,\n    nodeTextColorDisabled: textColorDisabled,\n    loadingColor: primaryColor,\n    dropMarkColor: primaryColor,\n    lineColor: dividerColor\n  };\n}\nconst treeLight = createTheme({\n  name: 'Tree',\n  common: commonLight,\n  peers: {\n    Checkbox: checkboxLight,\n    Scrollbar: scrollbarLight,\n    Empty: emptyLight\n  },\n  self\n});\nexport default treeLight;","import { changeColor } from 'seemly';\nimport { scrollbarDark } from \"../../_internal/scrollbar/styles/index.mjs\";\nimport { commonDark } from \"../../_styles/common/index.mjs\";\nimport { checkboxDark } from \"../../checkbox/styles/index.mjs\";\nimport { emptyDark } from \"../../empty/styles/index.mjs\";\nimport { self } from \"./light.mjs\";\nconst treeDark = {\n  name: 'Tree',\n  common: commonDark,\n  peers: {\n    Checkbox: checkboxDark,\n    Scrollbar: scrollbarDark,\n    Empty: emptyDark\n  },\n  self(vars) {\n    const {\n      primaryColor\n    } = vars;\n    const commonSelf = self(vars);\n    commonSelf.nodeColorActive = changeColor(primaryColor, {\n      alpha: 0.15\n    });\n    return commonSelf;\n  }\n};\nexport default treeDark;","import { internalSelectionDark } from \"../../_internal/selection/styles/index.mjs\";\nimport { commonDark } from \"../../_styles/common/index.mjs\";\nimport { emptyDark } from \"../../empty/styles/index.mjs\";\nimport { treeDark } from \"../../tree/styles/index.mjs\";\nconst treeSelectDark = {\n  name: 'TreeSelect',\n  common: commonDark,\n  peers: {\n    Tree: treeDark,\n    Empty: emptyDark,\n    InternalSelection: internalSelectionDark\n  }\n};\nexport default treeSelectDark;","export default {\n  headerFontSize1: '30px',\n  headerFontSize2: '22px',\n  headerFontSize3: '18px',\n  headerFontSize4: '16px',\n  headerFontSize5: '16px',\n  headerFontSize6: '16px',\n  headerMargin1: '28px 0 20px 0',\n  headerMargin2: '28px 0 20px 0',\n  headerMargin3: '28px 0 20px 0',\n  headerMargin4: '28px 0 18px 0',\n  headerMargin5: '28px 0 18px 0',\n  headerMargin6: '28px 0 18px 0',\n  headerPrefixWidth1: '16px',\n  headerPrefixWidth2: '16px',\n  headerPrefixWidth3: '12px',\n  headerPrefixWidth4: '12px',\n  headerPrefixWidth5: '12px',\n  headerPrefixWidth6: '12px',\n  headerBarWidth1: '4px',\n  headerBarWidth2: '4px',\n  headerBarWidth3: '3px',\n  headerBarWidth4: '3px',\n  headerBarWidth5: '3px',\n  headerBarWidth6: '3px',\n  pMargin: '16px 0 16px 0',\n  liMargin: '.25em 0 0 0',\n  olPadding: '0 0 0 2em',\n  ulPadding: '0 0 0 2em'\n};","import { commonLight } from \"../../_styles/common/index.mjs\";\nimport commonVars from \"./_common.mjs\";\nexport function self(vars) {\n  const {\n    primaryColor,\n    textColor2,\n    borderColor,\n    lineHeight,\n    fontSize,\n    borderRadiusSmall,\n    dividerColor,\n    fontWeightStrong,\n    textColor1,\n    textColor3,\n    infoColor,\n    warningColor,\n    errorColor,\n    successColor,\n    codeColor\n  } = vars;\n  return Object.assign(Object.assign({}, commonVars), {\n    aTextColor: primaryColor,\n    blockquoteTextColor: textColor2,\n    blockquotePrefixColor: borderColor,\n    blockquoteLineHeight: lineHeight,\n    blockquoteFontSize: fontSize,\n    codeBorderRadius: borderRadiusSmall,\n    liTextColor: textColor2,\n    liLineHeight: lineHeight,\n    liFontSize: fontSize,\n    hrColor: dividerColor,\n    headerFontWeight: fontWeightStrong,\n    headerTextColor: textColor1,\n    pTextColor: textColor2,\n    pTextColor1Depth: textColor1,\n    pTextColor2Depth: textColor2,\n    pTextColor3Depth: textColor3,\n    pLineHeight: lineHeight,\n    pFontSize: fontSize,\n    headerBarColor: primaryColor,\n    headerBarColorPrimary: primaryColor,\n    headerBarColorInfo: infoColor,\n    headerBarColorError: errorColor,\n    headerBarColorWarning: warningColor,\n    headerBarColorSuccess: successColor,\n    textColor: textColor2,\n    textColor1Depth: textColor1,\n    textColor2Depth: textColor2,\n    textColor3Depth: textColor3,\n    textColorPrimary: primaryColor,\n    textColorInfo: infoColor,\n    textColorSuccess: successColor,\n    textColorWarning: warningColor,\n    textColorError: errorColor,\n    codeTextColor: textColor2,\n    codeColor,\n    codeBorder: '1px solid #0000'\n  });\n}\nconst typographyLight = {\n  name: 'Typography',\n  common: commonLight,\n  self\n};\nexport default typographyLight;","import { commonDark } from \"../../_styles/common/index.mjs\";\nimport { self } from \"./light.mjs\";\nconst typographyDark = {\n  name: 'Typography',\n  common: commonDark,\n  self\n};\nexport default typographyDark;","import { changeColor } from 'seemly';\nimport { createTheme } from \"../../_mixins/index.mjs\";\nimport { commonLight } from \"../../_styles/common/index.mjs\";\nimport { buttonLight } from \"../../button/styles/index.mjs\";\nimport { progressLight } from \"../../progress/styles/index.mjs\";\nexport function self(vars) {\n  const {\n    iconColor,\n    primaryColor,\n    errorColor,\n    textColor2,\n    successColor,\n    opacityDisabled,\n    actionColor,\n    borderColor,\n    hoverColor,\n    lineHeight,\n    borderRadius,\n    fontSize\n  } = vars;\n  return {\n    fontSize,\n    lineHeight,\n    borderRadius,\n    draggerColor: actionColor,\n    draggerBorder: `1px dashed ${borderColor}`,\n    draggerBorderHover: `1px dashed ${primaryColor}`,\n    itemColorHover: hoverColor,\n    itemColorHoverError: changeColor(errorColor, {\n      alpha: 0.06\n    }),\n    itemTextColor: textColor2,\n    itemTextColorError: errorColor,\n    itemTextColorSuccess: successColor,\n    itemIconColor: iconColor,\n    itemDisabledOpacity: opacityDisabled,\n    itemBorderImageCardError: `1px solid ${errorColor}`,\n    itemBorderImageCard: `1px solid ${borderColor}`\n  };\n}\nconst uploadLight = createTheme({\n  name: 'Upload',\n  common: commonLight,\n  peers: {\n    Button: buttonLight,\n    Progress: progressLight\n  },\n  self\n});\nexport default uploadLight;","import { changeColor } from 'seemly';\nimport { commonDark } from \"../../_styles/common/index.mjs\";\nimport { buttonDark } from \"../../button/styles/index.mjs\";\nimport { progressDark } from \"../../progress/styles/index.mjs\";\nimport { self } from \"./light.mjs\";\nconst uploadDark = {\n  name: 'Upload',\n  common: commonDark,\n  peers: {\n    Button: buttonDark,\n    Progress: progressDark\n  },\n  self(vars) {\n    const {\n      errorColor\n    } = vars;\n    const commonSelf = self(vars);\n    commonSelf.itemColorHoverError = changeColor(errorColor, {\n      alpha: 0.09\n    });\n    return commonSelf;\n  }\n};\nexport default uploadDark;","import { commonDark } from \"../../_styles/common/index.mjs\";\nconst watermarkDark = {\n  name: 'Watermark',\n  common: commonDark,\n  self(vars) {\n    const {\n      fontFamily\n    } = vars;\n    return {\n      fontFamily\n    };\n  }\n};\nexport default watermarkDark;","import { commonDark } from \"../../_styles/common/index.mjs\";\nconst floatButtonDark = {\n  name: 'FloatButton',\n  common: commonDark,\n  self(vars) {\n    const {\n      popoverColor,\n      textColor2,\n      buttonColor2Hover,\n      buttonColor2Pressed,\n      primaryColor,\n      primaryColorHover,\n      primaryColorPressed,\n      baseColor,\n      borderRadius\n    } = vars;\n    return {\n      color: popoverColor,\n      textColor: textColor2,\n      boxShadow: '0 2px 8px 0px rgba(0, 0, 0, .12)',\n      boxShadowHover: '0 2px 12px 0px rgba(0, 0, 0, .18)',\n      boxShadowPressed: '0 2px 12px 0px rgba(0, 0, 0, .18)',\n      colorHover: buttonColor2Hover,\n      colorPressed: buttonColor2Pressed,\n      colorPrimary: primaryColor,\n      colorPrimaryHover: primaryColorHover,\n      colorPrimaryPressed: primaryColorPressed,\n      textColorPrimary: baseColor,\n      borderRadiusSquare: borderRadius\n    };\n  }\n};\nexport default floatButtonDark;","import { createInjectionKey } from \"../../_utils/index.mjs\";\nexport const formInjectionKey = createInjectionKey('n-form');\nexport const formItemInstsInjectionKey = createInjectionKey('n-form-item-insts');","import { c, cB, cM } from \"../../../_utils/cssr/index.mjs\";\nexport default cB('form', [cM('inline', `\n width: 100%;\n display: inline-flex;\n align-items: flex-start;\n align-content: space-around;\n `, [cB('form-item', {\n  width: 'auto',\n  marginRight: '18px'\n}, [c('&:last-child', {\n  marginRight: 0\n})])])]);","var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {\n  function adopt(value) {\n    return value instanceof P ? value : new P(function (resolve) {\n      resolve(value);\n    });\n  }\n  return new (P || (P = Promise))(function (resolve, reject) {\n    function fulfilled(value) {\n      try {\n        step(generator.next(value));\n      } catch (e) {\n        reject(e);\n      }\n    }\n    function rejected(value) {\n      try {\n        step(generator[\"throw\"](value));\n      } catch (e) {\n        reject(e);\n      }\n    }\n    function step(result) {\n      result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n    }\n    step((generator = generator.apply(thisArg, _arguments || [])).next());\n  });\n};\nimport { defineComponent, h, provide, ref } from 'vue';\nimport { useConfig, useTheme } from \"../../_mixins/index.mjs\";\nimport { keysOf } from \"../../_utils/index.mjs\";\nimport { formLight } from \"../styles/index.mjs\";\nimport { formInjectionKey, formItemInstsInjectionKey } from \"./context.mjs\";\nimport style from \"./styles/form.cssr.mjs\";\nexport const formProps = Object.assign(Object.assign({}, useTheme.props), {\n  inline: Boolean,\n  labelWidth: [Number, String],\n  labelAlign: String,\n  labelPlacement: {\n    type: String,\n    default: 'top'\n  },\n  model: {\n    type: Object,\n    default: () => {}\n  },\n  rules: Object,\n  disabled: Boolean,\n  size: String,\n  showRequireMark: {\n    type: Boolean,\n    default: undefined\n  },\n  requireMarkPlacement: String,\n  showFeedback: {\n    type: Boolean,\n    default: true\n  },\n  onSubmit: {\n    type: Function,\n    default: e => {\n      e.preventDefault();\n    }\n  },\n  showLabel: {\n    type: Boolean,\n    default: undefined\n  },\n  validateMessages: Object\n});\nexport default defineComponent({\n  name: 'Form',\n  props: formProps,\n  setup(props) {\n    const {\n      mergedClsPrefixRef\n    } = useConfig(props);\n    useTheme('Form', '-form', style, formLight, props, mergedClsPrefixRef);\n    // from path to form-item\n    const formItems = {};\n    // for label-width = 'auto'\n    const maxChildLabelWidthRef = ref(undefined);\n    const deriveMaxChildLabelWidth = currentWidth => {\n      const currentMaxChildLabelWidth = maxChildLabelWidthRef.value;\n      if (currentMaxChildLabelWidth === undefined || currentWidth >= currentMaxChildLabelWidth) {\n        maxChildLabelWidthRef.value = currentWidth;\n      }\n    };\n    function validate(validateCallback_1) {\n      return __awaiter(this, arguments, void 0, function* (validateCallback, shouldRuleBeApplied = () => true) {\n        return yield new Promise((resolve, reject) => {\n          const formItemValidationPromises = [];\n          for (const key of keysOf(formItems)) {\n            const formItemInstances = formItems[key];\n            for (const formItemInstance of formItemInstances) {\n              if (formItemInstance.path) {\n                formItemValidationPromises.push(formItemInstance.internalValidate(null, shouldRuleBeApplied));\n              }\n            }\n          }\n          void Promise.all(formItemValidationPromises).then(results => {\n            const formInvalid = results.some(result => !result.valid);\n            const errors = [];\n            const warnings = [];\n            results.forEach(result => {\n              var _a, _b;\n              if ((_a = result.errors) === null || _a === void 0 ? void 0 : _a.length) {\n                errors.push(result.errors);\n              }\n              if ((_b = result.warnings) === null || _b === void 0 ? void 0 : _b.length) {\n                warnings.push(result.warnings);\n              }\n            });\n            if (validateCallback) {\n              validateCallback(errors.length ? errors : undefined, {\n                warnings: warnings.length ? warnings : undefined\n              });\n            }\n            if (formInvalid) {\n              reject(errors.length ? errors : undefined);\n            } else {\n              resolve({\n                warnings: warnings.length ? warnings : undefined\n              });\n            }\n          });\n        });\n      });\n    }\n    function restoreValidation() {\n      for (const key of keysOf(formItems)) {\n        const formItemInstances = formItems[key];\n        for (const formItemInstance of formItemInstances) {\n          formItemInstance.restoreValidation();\n        }\n      }\n    }\n    provide(formInjectionKey, {\n      props,\n      maxChildLabelWidthRef,\n      deriveMaxChildLabelWidth\n    });\n    provide(formItemInstsInjectionKey, {\n      formItems\n    });\n    const formExposedMethod = {\n      validate,\n      restoreValidation\n    };\n    return Object.assign(formExposedMethod, {\n      mergedClsPrefix: mergedClsPrefixRef\n    });\n  },\n  render() {\n    const {\n      mergedClsPrefix\n    } = this;\n    return h(\"form\", {\n      class: [`${mergedClsPrefix}-form`, this.inline && `${mergedClsPrefix}-form--inline`],\n      onSubmit: this.onSubmit\n    }, this.$slots);\n  }\n});","function _extends() {\n  _extends = Object.assign ? Object.assign.bind() : function (target) {\n    for (var i = 1; i < arguments.length; i++) {\n      var source = arguments[i];\n\n      for (var key in source) {\n        if (Object.prototype.hasOwnProperty.call(source, key)) {\n          target[key] = source[key];\n        }\n      }\n    }\n\n    return target;\n  };\n  return _extends.apply(this, arguments);\n}\n\nfunction _inheritsLoose(subClass, superClass) {\n  subClass.prototype = Object.create(superClass.prototype);\n  subClass.prototype.constructor = subClass;\n\n  _setPrototypeOf(subClass, superClass);\n}\n\nfunction _getPrototypeOf(o) {\n  _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {\n    return o.__proto__ || Object.getPrototypeOf(o);\n  };\n  return _getPrototypeOf(o);\n}\n\nfunction _setPrototypeOf(o, p) {\n  _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n    o.__proto__ = p;\n    return o;\n  };\n  return _setPrototypeOf(o, p);\n}\n\nfunction _isNativeReflectConstruct() {\n  if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n  if (Reflect.construct.sham) return false;\n  if (typeof Proxy === \"function\") return true;\n\n  try {\n    Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n    return true;\n  } catch (e) {\n    return false;\n  }\n}\n\nfunction _construct(Parent, args, Class) {\n  if (_isNativeReflectConstruct()) {\n    _construct = Reflect.construct.bind();\n  } else {\n    _construct = function _construct(Parent, args, Class) {\n      var a = [null];\n      a.push.apply(a, args);\n      var Constructor = Function.bind.apply(Parent, a);\n      var instance = new Constructor();\n      if (Class) _setPrototypeOf(instance, Class.prototype);\n      return instance;\n    };\n  }\n\n  return _construct.apply(null, arguments);\n}\n\nfunction _isNativeFunction(fn) {\n  return Function.toString.call(fn).indexOf(\"[native code]\") !== -1;\n}\n\nfunction _wrapNativeSuper(Class) {\n  var _cache = typeof Map === \"function\" ? new Map() : undefined;\n\n  _wrapNativeSuper = function _wrapNativeSuper(Class) {\n    if (Class === null || !_isNativeFunction(Class)) return Class;\n\n    if (typeof Class !== \"function\") {\n      throw new TypeError(\"Super expression must either be null or a function\");\n    }\n\n    if (typeof _cache !== \"undefined\") {\n      if (_cache.has(Class)) return _cache.get(Class);\n\n      _cache.set(Class, Wrapper);\n    }\n\n    function Wrapper() {\n      return _construct(Class, arguments, _getPrototypeOf(this).constructor);\n    }\n\n    Wrapper.prototype = Object.create(Class.prototype, {\n      constructor: {\n        value: Wrapper,\n        enumerable: false,\n        writable: true,\n        configurable: true\n      }\n    });\n    return _setPrototypeOf(Wrapper, Class);\n  };\n\n  return _wrapNativeSuper(Class);\n}\n\n/* eslint no-console:0 */\nvar formatRegExp = /%[sdj%]/g;\nvar warning = function warning() {}; // don't print warning message when in production env or node runtime\n\nif (typeof process !== 'undefined' && process.env && process.env.NODE_ENV !== 'production' && typeof window !== 'undefined' && typeof document !== 'undefined') {\n  warning = function warning(type, errors) {\n    if (typeof console !== 'undefined' && console.warn && typeof ASYNC_VALIDATOR_NO_WARNING === 'undefined') {\n      if (errors.every(function (e) {\n        return typeof e === 'string';\n      })) {\n        console.warn(type, errors);\n      }\n    }\n  };\n}\n\nfunction convertFieldsError(errors) {\n  if (!errors || !errors.length) return null;\n  var fields = {};\n  errors.forEach(function (error) {\n    var field = error.field;\n    fields[field] = fields[field] || [];\n    fields[field].push(error);\n  });\n  return fields;\n}\nfunction format(template) {\n  for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n    args[_key - 1] = arguments[_key];\n  }\n\n  var i = 0;\n  var len = args.length;\n\n  if (typeof template === 'function') {\n    return template.apply(null, args);\n  }\n\n  if (typeof template === 'string') {\n    var str = template.replace(formatRegExp, function (x) {\n      if (x === '%%') {\n        return '%';\n      }\n\n      if (i >= len) {\n        return x;\n      }\n\n      switch (x) {\n        case '%s':\n          return String(args[i++]);\n\n        case '%d':\n          return Number(args[i++]);\n\n        case '%j':\n          try {\n            return JSON.stringify(args[i++]);\n          } catch (_) {\n            return '[Circular]';\n          }\n\n          break;\n\n        default:\n          return x;\n      }\n    });\n    return str;\n  }\n\n  return template;\n}\n\nfunction isNativeStringType(type) {\n  return type === 'string' || type === 'url' || type === 'hex' || type === 'email' || type === 'date' || type === 'pattern';\n}\n\nfunction isEmptyValue(value, type) {\n  if (value === undefined || value === null) {\n    return true;\n  }\n\n  if (type === 'array' && Array.isArray(value) && !value.length) {\n    return true;\n  }\n\n  if (isNativeStringType(type) && typeof value === 'string' && !value) {\n    return true;\n  }\n\n  return false;\n}\n\nfunction asyncParallelArray(arr, func, callback) {\n  var results = [];\n  var total = 0;\n  var arrLength = arr.length;\n\n  function count(errors) {\n    results.push.apply(results, errors || []);\n    total++;\n\n    if (total === arrLength) {\n      callback(results);\n    }\n  }\n\n  arr.forEach(function (a) {\n    func(a, count);\n  });\n}\n\nfunction asyncSerialArray(arr, func, callback) {\n  var index = 0;\n  var arrLength = arr.length;\n\n  function next(errors) {\n    if (errors && errors.length) {\n      callback(errors);\n      return;\n    }\n\n    var original = index;\n    index = index + 1;\n\n    if (original < arrLength) {\n      func(arr[original], next);\n    } else {\n      callback([]);\n    }\n  }\n\n  next([]);\n}\n\nfunction flattenObjArr(objArr) {\n  var ret = [];\n  Object.keys(objArr).forEach(function (k) {\n    ret.push.apply(ret, objArr[k] || []);\n  });\n  return ret;\n}\n\nvar AsyncValidationError = /*#__PURE__*/function (_Error) {\n  _inheritsLoose(AsyncValidationError, _Error);\n\n  function AsyncValidationError(errors, fields) {\n    var _this;\n\n    _this = _Error.call(this, 'Async Validation Error') || this;\n    _this.errors = errors;\n    _this.fields = fields;\n    return _this;\n  }\n\n  return AsyncValidationError;\n}( /*#__PURE__*/_wrapNativeSuper(Error));\nfunction asyncMap(objArr, option, func, callback, source) {\n  if (option.first) {\n    var _pending = new Promise(function (resolve, reject) {\n      var next = function next(errors) {\n        callback(errors);\n        return errors.length ? reject(new AsyncValidationError(errors, convertFieldsError(errors))) : resolve(source);\n      };\n\n      var flattenArr = flattenObjArr(objArr);\n      asyncSerialArray(flattenArr, func, next);\n    });\n\n    _pending[\"catch\"](function (e) {\n      return e;\n    });\n\n    return _pending;\n  }\n\n  var firstFields = option.firstFields === true ? Object.keys(objArr) : option.firstFields || [];\n  var objArrKeys = Object.keys(objArr);\n  var objArrLength = objArrKeys.length;\n  var total = 0;\n  var results = [];\n  var pending = new Promise(function (resolve, reject) {\n    var next = function next(errors) {\n      results.push.apply(results, errors);\n      total++;\n\n      if (total === objArrLength) {\n        callback(results);\n        return results.length ? reject(new AsyncValidationError(results, convertFieldsError(results))) : resolve(source);\n      }\n    };\n\n    if (!objArrKeys.length) {\n      callback(results);\n      resolve(source);\n    }\n\n    objArrKeys.forEach(function (key) {\n      var arr = objArr[key];\n\n      if (firstFields.indexOf(key) !== -1) {\n        asyncSerialArray(arr, func, next);\n      } else {\n        asyncParallelArray(arr, func, next);\n      }\n    });\n  });\n  pending[\"catch\"](function (e) {\n    return e;\n  });\n  return pending;\n}\n\nfunction isErrorObj(obj) {\n  return !!(obj && obj.message !== undefined);\n}\n\nfunction getValue(value, path) {\n  var v = value;\n\n  for (var i = 0; i < path.length; i++) {\n    if (v == undefined) {\n      return v;\n    }\n\n    v = v[path[i]];\n  }\n\n  return v;\n}\n\nfunction complementError(rule, source) {\n  return function (oe) {\n    var fieldValue;\n\n    if (rule.fullFields) {\n      fieldValue = getValue(source, rule.fullFields);\n    } else {\n      fieldValue = source[oe.field || rule.fullField];\n    }\n\n    if (isErrorObj(oe)) {\n      oe.field = oe.field || rule.fullField;\n      oe.fieldValue = fieldValue;\n      return oe;\n    }\n\n    return {\n      message: typeof oe === 'function' ? oe() : oe,\n      fieldValue: fieldValue,\n      field: oe.field || rule.fullField\n    };\n  };\n}\nfunction deepMerge(target, source) {\n  if (source) {\n    for (var s in source) {\n      if (source.hasOwnProperty(s)) {\n        var value = source[s];\n\n        if (typeof value === 'object' && typeof target[s] === 'object') {\n          target[s] = _extends({}, target[s], value);\n        } else {\n          target[s] = value;\n        }\n      }\n    }\n  }\n\n  return target;\n}\n\nvar required$1 = function required(rule, value, source, errors, options, type) {\n  if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value, type || rule.type))) {\n    errors.push(format(options.messages.required, rule.fullField));\n  }\n};\n\n/**\n *  Rule for validating whitespace.\n *\n *  @param rule The validation rule.\n *  @param value The value of the field on the source object.\n *  @param source The source object being validated.\n *  @param errors An array of errors that this rule may add\n *  validation errors to.\n *  @param options The validation options.\n *  @param options.messages The validation messages.\n */\n\nvar whitespace = function whitespace(rule, value, source, errors, options) {\n  if (/^\\s+$/.test(value) || value === '') {\n    errors.push(format(options.messages.whitespace, rule.fullField));\n  }\n};\n\n// https://github.com/kevva/url-regex/blob/master/index.js\nvar urlReg;\nvar getUrlRegex = (function () {\n  if (urlReg) {\n    return urlReg;\n  }\n\n  var word = '[a-fA-F\\\\d:]';\n\n  var b = function b(options) {\n    return options && options.includeBoundaries ? \"(?:(?<=\\\\s|^)(?=\" + word + \")|(?<=\" + word + \")(?=\\\\s|$))\" : '';\n  };\n\n  var v4 = '(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)(?:\\\\.(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)){3}';\n  var v6seg = '[a-fA-F\\\\d]{1,4}';\n  var v6 = (\"\\n(?:\\n(?:\" + v6seg + \":){7}(?:\" + v6seg + \"|:)|                                    // 1:2:3:4:5:6:7::  1:2:3:4:5:6:7:8\\n(?:\" + v6seg + \":){6}(?:\" + v4 + \"|:\" + v6seg + \"|:)|                             // 1:2:3:4:5:6::    1:2:3:4:5:6::8   1:2:3:4:5:6::8  1:2:3:4:5:6::1.2.3.4\\n(?:\" + v6seg + \":){5}(?::\" + v4 + \"|(?::\" + v6seg + \"){1,2}|:)|                   // 1:2:3:4:5::      1:2:3:4:5::7:8   1:2:3:4:5::8    1:2:3:4:5::7:1.2.3.4\\n(?:\" + v6seg + \":){4}(?:(?::\" + v6seg + \"){0,1}:\" + v4 + \"|(?::\" + v6seg + \"){1,3}|:)| // 1:2:3:4::        1:2:3:4::6:7:8   1:2:3:4::8      1:2:3:4::6:7:1.2.3.4\\n(?:\" + v6seg + \":){3}(?:(?::\" + v6seg + \"){0,2}:\" + v4 + \"|(?::\" + v6seg + \"){1,4}|:)| // 1:2:3::          1:2:3::5:6:7:8   1:2:3::8        1:2:3::5:6:7:1.2.3.4\\n(?:\" + v6seg + \":){2}(?:(?::\" + v6seg + \"){0,3}:\" + v4 + \"|(?::\" + v6seg + \"){1,5}|:)| // 1:2::            1:2::4:5:6:7:8   1:2::8          1:2::4:5:6:7:1.2.3.4\\n(?:\" + v6seg + \":){1}(?:(?::\" + v6seg + \"){0,4}:\" + v4 + \"|(?::\" + v6seg + \"){1,6}|:)| // 1::              1::3:4:5:6:7:8   1::8            1::3:4:5:6:7:1.2.3.4\\n(?::(?:(?::\" + v6seg + \"){0,5}:\" + v4 + \"|(?::\" + v6seg + \"){1,7}|:))             // ::2:3:4:5:6:7:8  ::2:3:4:5:6:7:8  ::8             ::1.2.3.4\\n)(?:%[0-9a-zA-Z]{1,})?                                             // %eth0            %1\\n\").replace(/\\s*\\/\\/.*$/gm, '').replace(/\\n/g, '').trim(); // Pre-compile only the exact regexes because adding a global flag make regexes stateful\n\n  var v46Exact = new RegExp(\"(?:^\" + v4 + \"$)|(?:^\" + v6 + \"$)\");\n  var v4exact = new RegExp(\"^\" + v4 + \"$\");\n  var v6exact = new RegExp(\"^\" + v6 + \"$\");\n\n  var ip = function ip(options) {\n    return options && options.exact ? v46Exact : new RegExp(\"(?:\" + b(options) + v4 + b(options) + \")|(?:\" + b(options) + v6 + b(options) + \")\", 'g');\n  };\n\n  ip.v4 = function (options) {\n    return options && options.exact ? v4exact : new RegExp(\"\" + b(options) + v4 + b(options), 'g');\n  };\n\n  ip.v6 = function (options) {\n    return options && options.exact ? v6exact : new RegExp(\"\" + b(options) + v6 + b(options), 'g');\n  };\n\n  var protocol = \"(?:(?:[a-z]+:)?//)\";\n  var auth = '(?:\\\\S+(?::\\\\S*)?@)?';\n  var ipv4 = ip.v4().source;\n  var ipv6 = ip.v6().source;\n  var host = \"(?:(?:[a-z\\\\u00a1-\\\\uffff0-9][-_]*)*[a-z\\\\u00a1-\\\\uffff0-9]+)\";\n  var domain = \"(?:\\\\.(?:[a-z\\\\u00a1-\\\\uffff0-9]-*)*[a-z\\\\u00a1-\\\\uffff0-9]+)*\";\n  var tld = \"(?:\\\\.(?:[a-z\\\\u00a1-\\\\uffff]{2,}))\";\n  var port = '(?::\\\\d{2,5})?';\n  var path = '(?:[/?#][^\\\\s\"]*)?';\n  var regex = \"(?:\" + protocol + \"|www\\\\.)\" + auth + \"(?:localhost|\" + ipv4 + \"|\" + ipv6 + \"|\" + host + domain + tld + \")\" + port + path;\n  urlReg = new RegExp(\"(?:^\" + regex + \"$)\", 'i');\n  return urlReg;\n});\n\n/* eslint max-len:0 */\n\nvar pattern$2 = {\n  // http://emailregex.com/\n  email: /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]+\\.)+[a-zA-Z\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]{2,}))$/,\n  // url: new RegExp(\n  //   '^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\\\S+(?::\\\\S*)?@)?(?:(?:(?:[1-9]\\\\d?|1\\\\d\\\\d|2[01]\\\\d|22[0-3])(?:\\\\.(?:1?\\\\d{1,2}|2[0-4]\\\\d|25[0-5])){2}(?:\\\\.(?:[0-9]\\\\d?|1\\\\d\\\\d|2[0-4]\\\\d|25[0-4]))|(?:(?:[a-z\\\\u00a1-\\\\uffff0-9]+-*)*[a-z\\\\u00a1-\\\\uffff0-9]+)(?:\\\\.(?:[a-z\\\\u00a1-\\\\uffff0-9]+-*)*[a-z\\\\u00a1-\\\\uffff0-9]+)*(?:\\\\.(?:[a-z\\\\u00a1-\\\\uffff]{2,})))|localhost)(?::\\\\d{2,5})?(?:(/|\\\\?|#)[^\\\\s]*)?$',\n  //   'i',\n  // ),\n  hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i\n};\nvar types = {\n  integer: function integer(value) {\n    return types.number(value) && parseInt(value, 10) === value;\n  },\n  \"float\": function float(value) {\n    return types.number(value) && !types.integer(value);\n  },\n  array: function array(value) {\n    return Array.isArray(value);\n  },\n  regexp: function regexp(value) {\n    if (value instanceof RegExp) {\n      return true;\n    }\n\n    try {\n      return !!new RegExp(value);\n    } catch (e) {\n      return false;\n    }\n  },\n  date: function date(value) {\n    return typeof value.getTime === 'function' && typeof value.getMonth === 'function' && typeof value.getYear === 'function' && !isNaN(value.getTime());\n  },\n  number: function number(value) {\n    if (isNaN(value)) {\n      return false;\n    }\n\n    return typeof value === 'number';\n  },\n  object: function object(value) {\n    return typeof value === 'object' && !types.array(value);\n  },\n  method: function method(value) {\n    return typeof value === 'function';\n  },\n  email: function email(value) {\n    return typeof value === 'string' && value.length <= 320 && !!value.match(pattern$2.email);\n  },\n  url: function url(value) {\n    return typeof value === 'string' && value.length <= 2048 && !!value.match(getUrlRegex());\n  },\n  hex: function hex(value) {\n    return typeof value === 'string' && !!value.match(pattern$2.hex);\n  }\n};\n\nvar type$1 = function type(rule, value, source, errors, options) {\n  if (rule.required && value === undefined) {\n    required$1(rule, value, source, errors, options);\n    return;\n  }\n\n  var custom = ['integer', 'float', 'array', 'regexp', 'object', 'method', 'email', 'number', 'date', 'url', 'hex'];\n  var ruleType = rule.type;\n\n  if (custom.indexOf(ruleType) > -1) {\n    if (!types[ruleType](value)) {\n      errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));\n    } // straight typeof check\n\n  } else if (ruleType && typeof value !== rule.type) {\n    errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));\n  }\n};\n\nvar range = function range(rule, value, source, errors, options) {\n  var len = typeof rule.len === 'number';\n  var min = typeof rule.min === 'number';\n  var max = typeof rule.max === 'number'; // 正则匹配码点范围从U+010000一直到U+10FFFF的文字（补充平面Supplementary Plane）\n\n  var spRegexp = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g;\n  var val = value;\n  var key = null;\n  var num = typeof value === 'number';\n  var str = typeof value === 'string';\n  var arr = Array.isArray(value);\n\n  if (num) {\n    key = 'number';\n  } else if (str) {\n    key = 'string';\n  } else if (arr) {\n    key = 'array';\n  } // if the value is not of a supported type for range validation\n  // the validation rule rule should use the\n  // type property to also test for a particular type\n\n\n  if (!key) {\n    return false;\n  }\n\n  if (arr) {\n    val = value.length;\n  }\n\n  if (str) {\n    // 处理码点大于U+010000的文字length属性不准确的bug，如\"𠮷𠮷𠮷\".lenght !== 3\n    val = value.replace(spRegexp, '_').length;\n  }\n\n  if (len) {\n    if (val !== rule.len) {\n      errors.push(format(options.messages[key].len, rule.fullField, rule.len));\n    }\n  } else if (min && !max && val < rule.min) {\n    errors.push(format(options.messages[key].min, rule.fullField, rule.min));\n  } else if (max && !min && val > rule.max) {\n    errors.push(format(options.messages[key].max, rule.fullField, rule.max));\n  } else if (min && max && (val < rule.min || val > rule.max)) {\n    errors.push(format(options.messages[key].range, rule.fullField, rule.min, rule.max));\n  }\n};\n\nvar ENUM$1 = 'enum';\n\nvar enumerable$1 = function enumerable(rule, value, source, errors, options) {\n  rule[ENUM$1] = Array.isArray(rule[ENUM$1]) ? rule[ENUM$1] : [];\n\n  if (rule[ENUM$1].indexOf(value) === -1) {\n    errors.push(format(options.messages[ENUM$1], rule.fullField, rule[ENUM$1].join(', ')));\n  }\n};\n\nvar pattern$1 = function pattern(rule, value, source, errors, options) {\n  if (rule.pattern) {\n    if (rule.pattern instanceof RegExp) {\n      // if a RegExp instance is passed, reset `lastIndex` in case its `global`\n      // flag is accidentally set to `true`, which in a validation scenario\n      // is not necessary and the result might be misleading\n      rule.pattern.lastIndex = 0;\n\n      if (!rule.pattern.test(value)) {\n        errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));\n      }\n    } else if (typeof rule.pattern === 'string') {\n      var _pattern = new RegExp(rule.pattern);\n\n      if (!_pattern.test(value)) {\n        errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));\n      }\n    }\n  }\n};\n\nvar rules = {\n  required: required$1,\n  whitespace: whitespace,\n  type: type$1,\n  range: range,\n  \"enum\": enumerable$1,\n  pattern: pattern$1\n};\n\nvar string = function string(rule, value, callback, source, options) {\n  var errors = [];\n  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n\n  if (validate) {\n    if (isEmptyValue(value, 'string') && !rule.required) {\n      return callback();\n    }\n\n    rules.required(rule, value, source, errors, options, 'string');\n\n    if (!isEmptyValue(value, 'string')) {\n      rules.type(rule, value, source, errors, options);\n      rules.range(rule, value, source, errors, options);\n      rules.pattern(rule, value, source, errors, options);\n\n      if (rule.whitespace === true) {\n        rules.whitespace(rule, value, source, errors, options);\n      }\n    }\n  }\n\n  callback(errors);\n};\n\nvar method = function method(rule, value, callback, source, options) {\n  var errors = [];\n  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n\n  if (validate) {\n    if (isEmptyValue(value) && !rule.required) {\n      return callback();\n    }\n\n    rules.required(rule, value, source, errors, options);\n\n    if (value !== undefined) {\n      rules.type(rule, value, source, errors, options);\n    }\n  }\n\n  callback(errors);\n};\n\nvar number = function number(rule, value, callback, source, options) {\n  var errors = [];\n  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n\n  if (validate) {\n    if (value === '') {\n      value = undefined;\n    }\n\n    if (isEmptyValue(value) && !rule.required) {\n      return callback();\n    }\n\n    rules.required(rule, value, source, errors, options);\n\n    if (value !== undefined) {\n      rules.type(rule, value, source, errors, options);\n      rules.range(rule, value, source, errors, options);\n    }\n  }\n\n  callback(errors);\n};\n\nvar _boolean = function _boolean(rule, value, callback, source, options) {\n  var errors = [];\n  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n\n  if (validate) {\n    if (isEmptyValue(value) && !rule.required) {\n      return callback();\n    }\n\n    rules.required(rule, value, source, errors, options);\n\n    if (value !== undefined) {\n      rules.type(rule, value, source, errors, options);\n    }\n  }\n\n  callback(errors);\n};\n\nvar regexp = function regexp(rule, value, callback, source, options) {\n  var errors = [];\n  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n\n  if (validate) {\n    if (isEmptyValue(value) && !rule.required) {\n      return callback();\n    }\n\n    rules.required(rule, value, source, errors, options);\n\n    if (!isEmptyValue(value)) {\n      rules.type(rule, value, source, errors, options);\n    }\n  }\n\n  callback(errors);\n};\n\nvar integer = function integer(rule, value, callback, source, options) {\n  var errors = [];\n  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n\n  if (validate) {\n    if (isEmptyValue(value) && !rule.required) {\n      return callback();\n    }\n\n    rules.required(rule, value, source, errors, options);\n\n    if (value !== undefined) {\n      rules.type(rule, value, source, errors, options);\n      rules.range(rule, value, source, errors, options);\n    }\n  }\n\n  callback(errors);\n};\n\nvar floatFn = function floatFn(rule, value, callback, source, options) {\n  var errors = [];\n  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n\n  if (validate) {\n    if (isEmptyValue(value) && !rule.required) {\n      return callback();\n    }\n\n    rules.required(rule, value, source, errors, options);\n\n    if (value !== undefined) {\n      rules.type(rule, value, source, errors, options);\n      rules.range(rule, value, source, errors, options);\n    }\n  }\n\n  callback(errors);\n};\n\nvar array = function array(rule, value, callback, source, options) {\n  var errors = [];\n  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n\n  if (validate) {\n    if ((value === undefined || value === null) && !rule.required) {\n      return callback();\n    }\n\n    rules.required(rule, value, source, errors, options, 'array');\n\n    if (value !== undefined && value !== null) {\n      rules.type(rule, value, source, errors, options);\n      rules.range(rule, value, source, errors, options);\n    }\n  }\n\n  callback(errors);\n};\n\nvar object = function object(rule, value, callback, source, options) {\n  var errors = [];\n  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n\n  if (validate) {\n    if (isEmptyValue(value) && !rule.required) {\n      return callback();\n    }\n\n    rules.required(rule, value, source, errors, options);\n\n    if (value !== undefined) {\n      rules.type(rule, value, source, errors, options);\n    }\n  }\n\n  callback(errors);\n};\n\nvar ENUM = 'enum';\n\nvar enumerable = function enumerable(rule, value, callback, source, options) {\n  var errors = [];\n  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n\n  if (validate) {\n    if (isEmptyValue(value) && !rule.required) {\n      return callback();\n    }\n\n    rules.required(rule, value, source, errors, options);\n\n    if (value !== undefined) {\n      rules[ENUM](rule, value, source, errors, options);\n    }\n  }\n\n  callback(errors);\n};\n\nvar pattern = function pattern(rule, value, callback, source, options) {\n  var errors = [];\n  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n\n  if (validate) {\n    if (isEmptyValue(value, 'string') && !rule.required) {\n      return callback();\n    }\n\n    rules.required(rule, value, source, errors, options);\n\n    if (!isEmptyValue(value, 'string')) {\n      rules.pattern(rule, value, source, errors, options);\n    }\n  }\n\n  callback(errors);\n};\n\nvar date = function date(rule, value, callback, source, options) {\n  // console.log('integer rule called %j', rule);\n  var errors = [];\n  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); // console.log('validate on %s value', value);\n\n  if (validate) {\n    if (isEmptyValue(value, 'date') && !rule.required) {\n      return callback();\n    }\n\n    rules.required(rule, value, source, errors, options);\n\n    if (!isEmptyValue(value, 'date')) {\n      var dateObject;\n\n      if (value instanceof Date) {\n        dateObject = value;\n      } else {\n        dateObject = new Date(value);\n      }\n\n      rules.type(rule, dateObject, source, errors, options);\n\n      if (dateObject) {\n        rules.range(rule, dateObject.getTime(), source, errors, options);\n      }\n    }\n  }\n\n  callback(errors);\n};\n\nvar required = function required(rule, value, callback, source, options) {\n  var errors = [];\n  var type = Array.isArray(value) ? 'array' : typeof value;\n  rules.required(rule, value, source, errors, options, type);\n  callback(errors);\n};\n\nvar type = function type(rule, value, callback, source, options) {\n  var ruleType = rule.type;\n  var errors = [];\n  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n\n  if (validate) {\n    if (isEmptyValue(value, ruleType) && !rule.required) {\n      return callback();\n    }\n\n    rules.required(rule, value, source, errors, options, ruleType);\n\n    if (!isEmptyValue(value, ruleType)) {\n      rules.type(rule, value, source, errors, options);\n    }\n  }\n\n  callback(errors);\n};\n\nvar any = function any(rule, value, callback, source, options) {\n  var errors = [];\n  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n\n  if (validate) {\n    if (isEmptyValue(value) && !rule.required) {\n      return callback();\n    }\n\n    rules.required(rule, value, source, errors, options);\n  }\n\n  callback(errors);\n};\n\nvar validators = {\n  string: string,\n  method: method,\n  number: number,\n  \"boolean\": _boolean,\n  regexp: regexp,\n  integer: integer,\n  \"float\": floatFn,\n  array: array,\n  object: object,\n  \"enum\": enumerable,\n  pattern: pattern,\n  date: date,\n  url: type,\n  hex: type,\n  email: type,\n  required: required,\n  any: any\n};\n\nfunction newMessages() {\n  return {\n    \"default\": 'Validation error on field %s',\n    required: '%s is required',\n    \"enum\": '%s must be one of %s',\n    whitespace: '%s cannot be empty',\n    date: {\n      format: '%s date %s is invalid for format %s',\n      parse: '%s date could not be parsed, %s is invalid ',\n      invalid: '%s date %s is invalid'\n    },\n    types: {\n      string: '%s is not a %s',\n      method: '%s is not a %s (function)',\n      array: '%s is not an %s',\n      object: '%s is not an %s',\n      number: '%s is not a %s',\n      date: '%s is not a %s',\n      \"boolean\": '%s is not a %s',\n      integer: '%s is not an %s',\n      \"float\": '%s is not a %s',\n      regexp: '%s is not a valid %s',\n      email: '%s is not a valid %s',\n      url: '%s is not a valid %s',\n      hex: '%s is not a valid %s'\n    },\n    string: {\n      len: '%s must be exactly %s characters',\n      min: '%s must be at least %s characters',\n      max: '%s cannot be longer than %s characters',\n      range: '%s must be between %s and %s characters'\n    },\n    number: {\n      len: '%s must equal %s',\n      min: '%s cannot be less than %s',\n      max: '%s cannot be greater than %s',\n      range: '%s must be between %s and %s'\n    },\n    array: {\n      len: '%s must be exactly %s in length',\n      min: '%s cannot be less than %s in length',\n      max: '%s cannot be greater than %s in length',\n      range: '%s must be between %s and %s in length'\n    },\n    pattern: {\n      mismatch: '%s value %s does not match pattern %s'\n    },\n    clone: function clone() {\n      var cloned = JSON.parse(JSON.stringify(this));\n      cloned.clone = this.clone;\n      return cloned;\n    }\n  };\n}\nvar messages = newMessages();\n\n/**\n *  Encapsulates a validation schema.\n *\n *  @param descriptor An object declaring validation rules\n *  for this schema.\n */\n\nvar Schema = /*#__PURE__*/function () {\n  // ========================= Static =========================\n  // ======================== Instance ========================\n  function Schema(descriptor) {\n    this.rules = null;\n    this._messages = messages;\n    this.define(descriptor);\n  }\n\n  var _proto = Schema.prototype;\n\n  _proto.define = function define(rules) {\n    var _this = this;\n\n    if (!rules) {\n      throw new Error('Cannot configure a schema with no rules');\n    }\n\n    if (typeof rules !== 'object' || Array.isArray(rules)) {\n      throw new Error('Rules must be an object');\n    }\n\n    this.rules = {};\n    Object.keys(rules).forEach(function (name) {\n      var item = rules[name];\n      _this.rules[name] = Array.isArray(item) ? item : [item];\n    });\n  };\n\n  _proto.messages = function messages(_messages) {\n    if (_messages) {\n      this._messages = deepMerge(newMessages(), _messages);\n    }\n\n    return this._messages;\n  };\n\n  _proto.validate = function validate(source_, o, oc) {\n    var _this2 = this;\n\n    if (o === void 0) {\n      o = {};\n    }\n\n    if (oc === void 0) {\n      oc = function oc() {};\n    }\n\n    var source = source_;\n    var options = o;\n    var callback = oc;\n\n    if (typeof options === 'function') {\n      callback = options;\n      options = {};\n    }\n\n    if (!this.rules || Object.keys(this.rules).length === 0) {\n      if (callback) {\n        callback(null, source);\n      }\n\n      return Promise.resolve(source);\n    }\n\n    function complete(results) {\n      var errors = [];\n      var fields = {};\n\n      function add(e) {\n        if (Array.isArray(e)) {\n          var _errors;\n\n          errors = (_errors = errors).concat.apply(_errors, e);\n        } else {\n          errors.push(e);\n        }\n      }\n\n      for (var i = 0; i < results.length; i++) {\n        add(results[i]);\n      }\n\n      if (!errors.length) {\n        callback(null, source);\n      } else {\n        fields = convertFieldsError(errors);\n        callback(errors, fields);\n      }\n    }\n\n    if (options.messages) {\n      var messages$1 = this.messages();\n\n      if (messages$1 === messages) {\n        messages$1 = newMessages();\n      }\n\n      deepMerge(messages$1, options.messages);\n      options.messages = messages$1;\n    } else {\n      options.messages = this.messages();\n    }\n\n    var series = {};\n    var keys = options.keys || Object.keys(this.rules);\n    keys.forEach(function (z) {\n      var arr = _this2.rules[z];\n      var value = source[z];\n      arr.forEach(function (r) {\n        var rule = r;\n\n        if (typeof rule.transform === 'function') {\n          if (source === source_) {\n            source = _extends({}, source);\n          }\n\n          value = source[z] = rule.transform(value);\n        }\n\n        if (typeof rule === 'function') {\n          rule = {\n            validator: rule\n          };\n        } else {\n          rule = _extends({}, rule);\n        } // Fill validator. Skip if nothing need to validate\n\n\n        rule.validator = _this2.getValidationMethod(rule);\n\n        if (!rule.validator) {\n          return;\n        }\n\n        rule.field = z;\n        rule.fullField = rule.fullField || z;\n        rule.type = _this2.getType(rule);\n        series[z] = series[z] || [];\n        series[z].push({\n          rule: rule,\n          value: value,\n          source: source,\n          field: z\n        });\n      });\n    });\n    var errorFields = {};\n    return asyncMap(series, options, function (data, doIt) {\n      var rule = data.rule;\n      var deep = (rule.type === 'object' || rule.type === 'array') && (typeof rule.fields === 'object' || typeof rule.defaultField === 'object');\n      deep = deep && (rule.required || !rule.required && data.value);\n      rule.field = data.field;\n\n      function addFullField(key, schema) {\n        return _extends({}, schema, {\n          fullField: rule.fullField + \".\" + key,\n          fullFields: rule.fullFields ? [].concat(rule.fullFields, [key]) : [key]\n        });\n      }\n\n      function cb(e) {\n        if (e === void 0) {\n          e = [];\n        }\n\n        var errorList = Array.isArray(e) ? e : [e];\n\n        if (!options.suppressWarning && errorList.length) {\n          Schema.warning('async-validator:', errorList);\n        }\n\n        if (errorList.length && rule.message !== undefined) {\n          errorList = [].concat(rule.message);\n        } // Fill error info\n\n\n        var filledErrors = errorList.map(complementError(rule, source));\n\n        if (options.first && filledErrors.length) {\n          errorFields[rule.field] = 1;\n          return doIt(filledErrors);\n        }\n\n        if (!deep) {\n          doIt(filledErrors);\n        } else {\n          // if rule is required but the target object\n          // does not exist fail at the rule level and don't\n          // go deeper\n          if (rule.required && !data.value) {\n            if (rule.message !== undefined) {\n              filledErrors = [].concat(rule.message).map(complementError(rule, source));\n            } else if (options.error) {\n              filledErrors = [options.error(rule, format(options.messages.required, rule.field))];\n            }\n\n            return doIt(filledErrors);\n          }\n\n          var fieldsSchema = {};\n\n          if (rule.defaultField) {\n            Object.keys(data.value).map(function (key) {\n              fieldsSchema[key] = rule.defaultField;\n            });\n          }\n\n          fieldsSchema = _extends({}, fieldsSchema, data.rule.fields);\n          var paredFieldsSchema = {};\n          Object.keys(fieldsSchema).forEach(function (field) {\n            var fieldSchema = fieldsSchema[field];\n            var fieldSchemaList = Array.isArray(fieldSchema) ? fieldSchema : [fieldSchema];\n            paredFieldsSchema[field] = fieldSchemaList.map(addFullField.bind(null, field));\n          });\n          var schema = new Schema(paredFieldsSchema);\n          schema.messages(options.messages);\n\n          if (data.rule.options) {\n            data.rule.options.messages = options.messages;\n            data.rule.options.error = options.error;\n          }\n\n          schema.validate(data.value, data.rule.options || options, function (errs) {\n            var finalErrors = [];\n\n            if (filledErrors && filledErrors.length) {\n              finalErrors.push.apply(finalErrors, filledErrors);\n            }\n\n            if (errs && errs.length) {\n              finalErrors.push.apply(finalErrors, errs);\n            }\n\n            doIt(finalErrors.length ? finalErrors : null);\n          });\n        }\n      }\n\n      var res;\n\n      if (rule.asyncValidator) {\n        res = rule.asyncValidator(rule, data.value, cb, data.source, options);\n      } else if (rule.validator) {\n        try {\n          res = rule.validator(rule, data.value, cb, data.source, options);\n        } catch (error) {\n          console.error == null ? void 0 : console.error(error); // rethrow to report error\n\n          if (!options.suppressValidatorError) {\n            setTimeout(function () {\n              throw error;\n            }, 0);\n          }\n\n          cb(error.message);\n        }\n\n        if (res === true) {\n          cb();\n        } else if (res === false) {\n          cb(typeof rule.message === 'function' ? rule.message(rule.fullField || rule.field) : rule.message || (rule.fullField || rule.field) + \" fails\");\n        } else if (res instanceof Array) {\n          cb(res);\n        } else if (res instanceof Error) {\n          cb(res.message);\n        }\n      }\n\n      if (res && res.then) {\n        res.then(function () {\n          return cb();\n        }, function (e) {\n          return cb(e);\n        });\n      }\n    }, function (results) {\n      complete(results);\n    }, source);\n  };\n\n  _proto.getType = function getType(rule) {\n    if (rule.type === undefined && rule.pattern instanceof RegExp) {\n      rule.type = 'pattern';\n    }\n\n    if (typeof rule.validator !== 'function' && rule.type && !validators.hasOwnProperty(rule.type)) {\n      throw new Error(format('Unknown rule type %s', rule.type));\n    }\n\n    return rule.type || 'string';\n  };\n\n  _proto.getValidationMethod = function getValidationMethod(rule) {\n    if (typeof rule.validator === 'function') {\n      return rule.validator;\n    }\n\n    var keys = Object.keys(rule);\n    var messageIndex = keys.indexOf('message');\n\n    if (messageIndex !== -1) {\n      keys.splice(messageIndex, 1);\n    }\n\n    if (keys.length === 1 && keys[0] === 'required') {\n      return validators.required;\n    }\n\n    return validators[this.getType(rule)] || undefined;\n  };\n\n  return Schema;\n}();\n\nSchema.register = function register(type, validator) {\n  if (typeof validator !== 'function') {\n    throw new Error('Cannot register a validator by type, validator is not a function');\n  }\n\n  validators[type] = validator;\n};\n\nSchema.warning = warning;\nSchema.messages = messages;\nSchema.validators = validators;\n\nexport { Schema as default };\n//# sourceMappingURL=index.js.map\n","import { c } from \"../../_utils/cssr/index.mjs\";\nimport commonVariables from \"../common/_common.mjs\";\nconst {\n  cubicBezierEaseInOut\n} = commonVariables;\nexport function fadeDownTransition({\n  name = 'fade-down',\n  fromOffset = '-4px',\n  enterDuration = '.3s',\n  leaveDuration = '.3s',\n  enterCubicBezier = cubicBezierEaseInOut,\n  leaveCubicBezier = cubicBezierEaseInOut\n} = {}) {\n  return [c(`&.${name}-transition-enter-from, &.${name}-transition-leave-to`, {\n    opacity: 0,\n    transform: `translateY(${fromOffset})`\n  }), c(`&.${name}-transition-enter-to, &.${name}-transition-leave-from`, {\n    opacity: 1,\n    transform: 'translateY(0)'\n  }), c(`&.${name}-transition-leave-active`, {\n    transition: `opacity ${leaveDuration} ${leaveCubicBezier}, transform ${leaveDuration} ${leaveCubicBezier}`\n  }), c(`&.${name}-transition-enter-active`, {\n    transition: `opacity ${enterDuration} ${enterCubicBezier}, transform ${enterDuration} ${enterCubicBezier}`\n  })];\n}","import { fadeDownTransition } from \"../../../_styles/transitions/fade-down.cssr.mjs\";\nimport { c, cB, cE, cM } from \"../../../_utils/cssr/index.mjs\";\n// vars:\n// --n-line-height\n// --n-blank-height\n// --n-feedback-padding\n// --n-feedback-font-size\n// --n-label-font-size-left\n// --n-label-font-size-top\n// --n-label-height\n// --n-label-padding\n// --n-asterisk-color\n// --n-label-text-color\n// --n-bezier\n// --n-feedback-text-color\n// --n-feedback-text-color-warning\n// --n-feedback-text-color-error\n// --n-label-text-align\n// --n-label-padding\nexport default cB('form-item', `\n display: grid;\n line-height: var(--n-line-height);\n`, [cB('form-item-label', `\n grid-area: label;\n align-items: center;\n line-height: 1.25;\n text-align: var(--n-label-text-align);\n font-size: var(--n-label-font-size);\n min-height: var(--n-label-height);\n padding: var(--n-label-padding);\n color: var(--n-label-text-color);\n transition: color .3s var(--n-bezier);\n box-sizing: border-box;\n font-weight: var(--n-label-font-weight);\n `, [cE('asterisk', `\n white-space: nowrap;\n user-select: none;\n -webkit-user-select: none;\n color: var(--n-asterisk-color);\n transition: color .3s var(--n-bezier);\n `), cE('asterisk-placeholder', `\n grid-area: mark;\n user-select: none;\n -webkit-user-select: none;\n visibility: hidden; \n `)]), cB('form-item-blank', `\n grid-area: blank;\n min-height: var(--n-blank-height);\n `), cM('auto-label-width', [cB('form-item-label', 'white-space: nowrap;')]), cM('left-labelled', `\n grid-template-areas:\n \"label blank\"\n \"label feedback\";\n grid-template-columns: auto minmax(0, 1fr);\n grid-template-rows: auto 1fr;\n align-items: flex-start;\n `, [cB('form-item-label', `\n display: grid;\n grid-template-columns: 1fr auto;\n min-height: var(--n-blank-height);\n height: auto;\n box-sizing: border-box;\n flex-shrink: 0;\n flex-grow: 0;\n `, [cM('reverse-columns-space', `\n grid-template-columns: auto 1fr;\n `), cM('left-mark', `\n grid-template-areas:\n \"mark text\"\n \". text\";\n `), cM('right-mark', `\n grid-template-areas: \n \"text mark\"\n \"text .\";\n `), cM('right-hanging-mark', `\n grid-template-areas: \n \"text mark\"\n \"text .\";\n `), cE('text', `\n grid-area: text; \n `), cE('asterisk', `\n grid-area: mark; \n align-self: end;\n `)])]), cM('top-labelled', `\n grid-template-areas:\n \"label\"\n \"blank\"\n \"feedback\";\n grid-template-rows: minmax(var(--n-label-height), auto) 1fr;\n grid-template-columns: minmax(0, 100%);\n `, [cM('no-label', `\n grid-template-areas:\n \"blank\"\n \"feedback\";\n grid-template-rows: 1fr;\n `), cB('form-item-label', `\n display: flex;\n align-items: flex-start;\n justify-content: var(--n-label-text-align);\n `)]), cB('form-item-blank', `\n box-sizing: border-box;\n display: flex;\n align-items: center;\n position: relative;\n `), cB('form-item-feedback-wrapper', `\n grid-area: feedback;\n box-sizing: border-box;\n min-height: var(--n-feedback-height);\n font-size: var(--n-feedback-font-size);\n line-height: 1.25;\n transform-origin: top left;\n `, [c('&:not(:empty)', `\n padding: var(--n-feedback-padding);\n `), cB('form-item-feedback', {\n  transition: 'color .3s var(--n-bezier)',\n  color: 'var(--n-feedback-text-color)'\n}, [cM('warning', {\n  color: 'var(--n-feedback-text-color-warning)'\n}), cM('error', {\n  color: 'var(--n-feedback-text-color-error)'\n}), fadeDownTransition({\n  fromOffset: '-3px',\n  enterDuration: '.3s',\n  leaveDuration: '.2s'\n})])])]);","import { get } from 'lodash-es';\nimport { computed, inject, ref } from 'vue';\nimport { formatLength } from \"../../_utils/index.mjs\";\nimport { formInjectionKey } from \"./context.mjs\";\nexport function formItemSize(props) {\n  const NForm = inject(formInjectionKey, null);\n  return {\n    mergedSize: computed(() => {\n      if (props.size !== undefined) return props.size;\n      if ((NForm === null || NForm === void 0 ? void 0 : NForm.props.size) !== undefined) return NForm.props.size;\n      return 'medium';\n    })\n  };\n}\nexport function formItemMisc(props) {\n  const NForm = inject(formInjectionKey, null);\n  const mergedLabelPlacementRef = computed(() => {\n    const {\n      labelPlacement\n    } = props;\n    if (labelPlacement !== undefined) return labelPlacement;\n    if (NForm === null || NForm === void 0 ? void 0 : NForm.props.labelPlacement) return NForm.props.labelPlacement;\n    return 'top';\n  });\n  const isAutoLabelWidthRef = computed(() => {\n    return mergedLabelPlacementRef.value === 'left' && (props.labelWidth === 'auto' || (NForm === null || NForm === void 0 ? void 0 : NForm.props.labelWidth) === 'auto');\n  });\n  const mergedLabelWidthRef = computed(() => {\n    if (mergedLabelPlacementRef.value === 'top') return;\n    const {\n      labelWidth\n    } = props;\n    if (labelWidth !== undefined && labelWidth !== 'auto') {\n      return formatLength(labelWidth);\n    }\n    if (isAutoLabelWidthRef.value) {\n      const autoComputedWidth = NForm === null || NForm === void 0 ? void 0 : NForm.maxChildLabelWidthRef.value;\n      if (autoComputedWidth !== undefined) {\n        return formatLength(autoComputedWidth);\n      } else {\n        return undefined;\n      }\n    }\n    if ((NForm === null || NForm === void 0 ? void 0 : NForm.props.labelWidth) !== undefined) {\n      return formatLength(NForm.props.labelWidth);\n    }\n    return undefined;\n  });\n  const mergedLabelAlignRef = computed(() => {\n    const {\n      labelAlign\n    } = props;\n    if (labelAlign) return labelAlign;\n    if (NForm === null || NForm === void 0 ? void 0 : NForm.props.labelAlign) return NForm.props.labelAlign;\n    return undefined;\n  });\n  const mergedLabelStyleRef = computed(() => {\n    var _a;\n    return [(_a = props.labelProps) === null || _a === void 0 ? void 0 : _a.style, props.labelStyle, {\n      width: mergedLabelWidthRef.value\n    }];\n  });\n  const mergedShowRequireMarkRef = computed(() => {\n    const {\n      showRequireMark\n    } = props;\n    if (showRequireMark !== undefined) return showRequireMark;\n    return NForm === null || NForm === void 0 ? void 0 : NForm.props.showRequireMark;\n  });\n  const mergedRequireMarkPlacementRef = computed(() => {\n    const {\n      requireMarkPlacement\n    } = props;\n    if (requireMarkPlacement !== undefined) return requireMarkPlacement;\n    return (NForm === null || NForm === void 0 ? void 0 : NForm.props.requireMarkPlacement) || 'right';\n  });\n  const validationErroredRef = ref(false);\n  const validationWarnedRef = ref(false);\n  const mergedValidationStatusRef = computed(() => {\n    const {\n      validationStatus\n    } = props;\n    if (validationStatus !== undefined) return validationStatus;\n    if (validationErroredRef.value) return 'error';\n    if (validationWarnedRef.value) return 'warning';\n    return undefined;\n  });\n  const mergedShowFeedbackRef = computed(() => {\n    const {\n      showFeedback\n    } = props;\n    if (showFeedback !== undefined) return showFeedback;\n    if ((NForm === null || NForm === void 0 ? void 0 : NForm.props.showFeedback) !== undefined) return NForm.props.showFeedback;\n    return true;\n  });\n  const mergedShowLabelRef = computed(() => {\n    const {\n      showLabel\n    } = props;\n    if (showLabel !== undefined) return showLabel;\n    if ((NForm === null || NForm === void 0 ? void 0 : NForm.props.showLabel) !== undefined) return NForm.props.showLabel;\n    return true;\n  });\n  return {\n    validationErrored: validationErroredRef,\n    validationWarned: validationWarnedRef,\n    mergedLabelStyle: mergedLabelStyleRef,\n    mergedLabelPlacement: mergedLabelPlacementRef,\n    mergedLabelAlign: mergedLabelAlignRef,\n    mergedShowRequireMark: mergedShowRequireMarkRef,\n    mergedRequireMarkPlacement: mergedRequireMarkPlacementRef,\n    mergedValidationStatus: mergedValidationStatusRef,\n    mergedShowFeedback: mergedShowFeedbackRef,\n    mergedShowLabel: mergedShowLabelRef,\n    isAutoLabelWidth: isAutoLabelWidthRef\n  };\n}\nexport function formItemRule(props) {\n  const NForm = inject(formInjectionKey, null);\n  const compatibleRulePathRef = computed(() => {\n    const {\n      rulePath\n    } = props;\n    if (rulePath !== undefined) return rulePath;\n    const {\n      path\n    } = props;\n    if (path !== undefined) return path;\n    return undefined;\n  });\n  const mergedRulesRef = computed(() => {\n    const rules = [];\n    const {\n      rule\n    } = props;\n    if (rule !== undefined) {\n      if (Array.isArray(rule)) rules.push(...rule);else rules.push(rule);\n    }\n    if (NForm) {\n      const {\n        rules: formRules\n      } = NForm.props;\n      const {\n        value: rulePath\n      } = compatibleRulePathRef;\n      if (formRules !== undefined && rulePath !== undefined) {\n        const formRule = get(formRules, rulePath);\n        if (formRule !== undefined) {\n          if (Array.isArray(formRule)) {\n            rules.push(...formRule);\n          } else {\n            // terminate object must be a form item rule\n            rules.push(formRule);\n          }\n        }\n      }\n    }\n    return rules;\n  });\n  const hasRequiredRuleRef = computed(() => {\n    return mergedRulesRef.value.some(rule => rule.required);\n  });\n  // deprecated\n  const mergedRequiredRef = computed(() => {\n    return hasRequiredRuleRef.value || props.required;\n  });\n  return {\n    mergedRules: mergedRulesRef,\n    mergedRequired: mergedRequiredRef\n  };\n}","var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {\n  function adopt(value) {\n    return value instanceof P ? value : new P(function (resolve) {\n      resolve(value);\n    });\n  }\n  return new (P || (P = Promise))(function (resolve, reject) {\n    function fulfilled(value) {\n      try {\n        step(generator.next(value));\n      } catch (e) {\n        reject(e);\n      }\n    }\n    function rejected(value) {\n      try {\n        step(generator[\"throw\"](value));\n      } catch (e) {\n        reject(e);\n      }\n    }\n    function step(result) {\n      result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n    }\n    step((generator = generator.apply(thisArg, _arguments || [])).next());\n  });\n};\nimport Schema from 'async-validator';\nimport { get } from 'lodash-es';\nimport { createId } from 'seemly';\nimport { computed, defineComponent, h, inject, onMounted, provide, ref, toRef, Transition, watch } from 'vue';\nimport { useConfig, useTheme, useThemeClass } from \"../../_mixins/index.mjs\";\nimport { formItemInjectionKey } from \"../../_mixins/use-form-item.mjs\";\nimport { createKey, keysOf, resolveWrappedSlot, useInjectionInstanceCollection, warn } from \"../../_utils/index.mjs\";\nimport { formLight } from \"../styles/index.mjs\";\nimport { formInjectionKey, formItemInstsInjectionKey } from \"./context.mjs\";\nimport style from \"./styles/form-item.cssr.mjs\";\nimport { formItemMisc, formItemRule, formItemSize } from \"./utils.mjs\";\nexport const formItemProps = Object.assign(Object.assign({}, useTheme.props), {\n  label: String,\n  labelWidth: [Number, String],\n  labelStyle: [String, Object],\n  labelAlign: String,\n  labelPlacement: String,\n  path: String,\n  first: Boolean,\n  rulePath: String,\n  required: Boolean,\n  showRequireMark: {\n    type: Boolean,\n    default: undefined\n  },\n  requireMarkPlacement: String,\n  showFeedback: {\n    type: Boolean,\n    default: undefined\n  },\n  rule: [Object, Array],\n  size: String,\n  ignorePathChange: Boolean,\n  validationStatus: String,\n  feedback: String,\n  feedbackClass: String,\n  feedbackStyle: [String, Object],\n  showLabel: {\n    type: Boolean,\n    default: undefined\n  },\n  labelProps: Object\n});\nexport const formItemPropKeys = keysOf(formItemProps);\n// wrap sync validator\nfunction wrapValidator(validator, async) {\n  return (...args) => {\n    try {\n      const validateResult = validator(...args);\n      if (!async && (typeof validateResult === 'boolean' || validateResult instanceof Error || Array.isArray(validateResult)) // Error[]\n      || (validateResult === null || validateResult === void 0 ? void 0 : validateResult.then)) {\n        return validateResult;\n      } else if (validateResult === undefined) {\n        return true;\n      } else {\n        warn('form-item/validate', `You return a ${typeof validateResult} ` + `typed value in the validator method, which is not recommended. Please use ${async ? '`Promise`' : '`boolean`, `Error` or `Promise`'} typed value instead.`);\n        return true;\n      }\n    } catch (err) {\n      warn('form-item/validate', 'An error is catched in the validation, ' + 'so the validation won\\'t be done. Your callback in `validate` method of ' + '`n-form` or `n-form-item` won\\'t be called in this validation.');\n      console.error(err);\n      // If returns undefined, async-validator won't trigger callback\n      // so the result will be abandoned, which means not true and not false\n      return undefined;\n    }\n  };\n}\nexport default defineComponent({\n  name: 'FormItem',\n  props: formItemProps,\n  setup(props) {\n    useInjectionInstanceCollection(formItemInstsInjectionKey, 'formItems', toRef(props, 'path'));\n    const {\n      mergedClsPrefixRef,\n      inlineThemeDisabled\n    } = useConfig(props);\n    const NForm = inject(formInjectionKey, null);\n    const formItemSizeRefs = formItemSize(props);\n    const formItemMiscRefs = formItemMisc(props);\n    const {\n      validationErrored: validationErroredRef,\n      validationWarned: validationWarnedRef\n    } = formItemMiscRefs;\n    const {\n      mergedRequired: mergedRequiredRef,\n      mergedRules: mergedRulesRef\n    } = formItemRule(props);\n    const {\n      mergedSize: mergedSizeRef\n    } = formItemSizeRefs;\n    const {\n      mergedLabelPlacement: labelPlacementRef,\n      mergedLabelAlign: labelTextAlignRef,\n      mergedRequireMarkPlacement: mergedRequireMarkPlacementRef\n    } = formItemMiscRefs;\n    const renderExplainsRef = ref([]);\n    const feedbackIdRef = ref(createId());\n    const mergedDisabledRef = NForm ? toRef(NForm.props, 'disabled') : ref(false);\n    const themeRef = useTheme('Form', '-form-item', style, formLight, props, mergedClsPrefixRef);\n    watch(toRef(props, 'path'), () => {\n      if (props.ignorePathChange) return;\n      restoreValidation();\n    });\n    function restoreValidation() {\n      renderExplainsRef.value = [];\n      validationErroredRef.value = false;\n      validationWarnedRef.value = false;\n      if (props.feedback) {\n        feedbackIdRef.value = createId();\n      }\n    }\n    const internalValidate = (...args_1) => __awaiter(this, [...args_1], void 0, function* (trigger = null, shouldRuleBeApplied = () => true, options = {\n      suppressWarning: true\n    }) {\n      const {\n        path\n      } = props;\n      if (!options) {\n        options = {};\n      } else {\n        if (!options.first) options.first = props.first;\n      }\n      const {\n        value: rules\n      } = mergedRulesRef;\n      const value = NForm ? get(NForm.props.model, path || '') : undefined;\n      const messageRenderers = {};\n      const originalMessageRendersMessage = {};\n      const activeRules = (!trigger ? rules : rules.filter(rule => {\n        if (Array.isArray(rule.trigger)) {\n          return rule.trigger.includes(trigger);\n        } else {\n          return rule.trigger === trigger;\n        }\n      })).filter(shouldRuleBeApplied).map((rule, i) => {\n        const shallowClonedRule = Object.assign({}, rule);\n        if (shallowClonedRule.validator) {\n          shallowClonedRule.validator = wrapValidator(shallowClonedRule.validator, false);\n        }\n        if (shallowClonedRule.asyncValidator) {\n          shallowClonedRule.asyncValidator = wrapValidator(shallowClonedRule.asyncValidator, true);\n        }\n        if (shallowClonedRule.renderMessage) {\n          const rendererKey = `__renderMessage__${i}`;\n          originalMessageRendersMessage[rendererKey] = shallowClonedRule.message;\n          shallowClonedRule.message = rendererKey;\n          messageRenderers[rendererKey] = shallowClonedRule.renderMessage;\n        }\n        return shallowClonedRule;\n      });\n      const activeErrorRules = activeRules.filter(r => r.level !== 'warning');\n      const activeWarningRules = activeRules.filter(r => r.level === 'warning');\n      const validationResult = {\n        valid: true,\n        errors: undefined,\n        warnings: undefined\n      };\n      if (!activeRules.length) return validationResult;\n      const mergedPath = path !== null && path !== void 0 ? path : '__n_no_path__';\n      const validator = new Schema({\n        [mergedPath]: activeErrorRules\n      });\n      const warningValidator = new Schema({\n        [mergedPath]: activeWarningRules\n      });\n      const {\n        validateMessages\n      } = (NForm === null || NForm === void 0 ? void 0 : NForm.props) || {};\n      if (validateMessages) {\n        validator.messages(validateMessages);\n        warningValidator.messages(validateMessages);\n      }\n      const renderMessages = errors => {\n        renderExplainsRef.value = errors.map(error => {\n          const transformedMessage = (error === null || error === void 0 ? void 0 : error.message) || '';\n          return {\n            key: transformedMessage,\n            render: () => {\n              if (transformedMessage.startsWith('__renderMessage__')) {\n                return messageRenderers[transformedMessage]();\n              }\n              return transformedMessage;\n            }\n          };\n        });\n        errors.forEach(error => {\n          var _a;\n          if ((_a = error.message) === null || _a === void 0 ? void 0 : _a.startsWith('__renderMessage__')) {\n            error.message = originalMessageRendersMessage[error.message];\n          }\n        });\n      };\n      if (activeErrorRules.length) {\n        const errors = yield new Promise(resolve => {\n          void validator.validate({\n            [mergedPath]: value\n          }, options, resolve);\n        });\n        if (errors === null || errors === void 0 ? void 0 : errors.length) {\n          validationResult.valid = false;\n          validationResult.errors = errors;\n          renderMessages(errors);\n        }\n      }\n      // if there are already errors, warning check can be skipped\n      if (activeWarningRules.length && !validationResult.errors) {\n        const warnings = yield new Promise(resolve => {\n          void warningValidator.validate({\n            [mergedPath]: value\n          }, options, resolve);\n        });\n        if (warnings === null || warnings === void 0 ? void 0 : warnings.length) {\n          renderMessages(warnings);\n          validationResult.warnings = warnings;\n        }\n      }\n      if (!validationResult.errors && !validationResult.warnings) {\n        restoreValidation();\n      } else {\n        validationErroredRef.value = !!validationResult.errors;\n        validationWarnedRef.value = !!validationResult.warnings;\n      }\n      return validationResult;\n    });\n    function handleContentBlur() {\n      void internalValidate('blur');\n    }\n    function handleContentChange() {\n      void internalValidate('change');\n    }\n    function handleContentFocus() {\n      void internalValidate('focus');\n    }\n    function handleContentInput() {\n      void internalValidate('input');\n    }\n    function validate(options, callback) {\n      return __awaiter(this, void 0, void 0, function* () {\n        /** the following code is for compatibility */\n        let trigger;\n        let validateCallback;\n        let shouldRuleBeApplied;\n        let asyncValidatorOptions;\n        if (typeof options === 'string') {\n          trigger = options;\n          validateCallback = callback;\n        } else if (options !== null && typeof options === 'object') {\n          trigger = options.trigger;\n          validateCallback = options.callback;\n          shouldRuleBeApplied = options.shouldRuleBeApplied;\n          asyncValidatorOptions = options.options;\n        }\n        return yield new Promise((resolve, reject) => {\n          void internalValidate(trigger, shouldRuleBeApplied, asyncValidatorOptions).then(({\n            valid,\n            errors,\n            warnings\n          }) => {\n            if (valid) {\n              if (validateCallback) {\n                validateCallback(undefined, {\n                  warnings\n                });\n              }\n              resolve({\n                warnings\n              });\n            } else {\n              if (validateCallback) {\n                validateCallback(errors, {\n                  warnings\n                });\n              }\n              reject(errors);\n            }\n          });\n        });\n      });\n    }\n    provide(formItemInjectionKey, {\n      path: toRef(props, 'path'),\n      disabled: mergedDisabledRef,\n      mergedSize: formItemSizeRefs.mergedSize,\n      mergedValidationStatus: formItemMiscRefs.mergedValidationStatus,\n      restoreValidation,\n      handleContentBlur,\n      handleContentChange,\n      handleContentFocus,\n      handleContentInput\n    });\n    const exposedRef = {\n      validate,\n      restoreValidation,\n      internalValidate\n    };\n    const labelElementRef = ref(null);\n    onMounted(() => {\n      if (!formItemMiscRefs.isAutoLabelWidth.value) return;\n      const labelElement = labelElementRef.value;\n      if (labelElement !== null) {\n        const memoizedWhitespace = labelElement.style.whiteSpace;\n        labelElement.style.whiteSpace = 'nowrap';\n        labelElement.style.width = '';\n        NForm === null || NForm === void 0 ? void 0 : NForm.deriveMaxChildLabelWidth(Number(getComputedStyle(labelElement).width.slice(0, -2)));\n        labelElement.style.whiteSpace = memoizedWhitespace;\n      }\n    });\n    const cssVarsRef = computed(() => {\n      var _a;\n      const {\n        value: size\n      } = mergedSizeRef;\n      const {\n        value: labelPlacement\n      } = labelPlacementRef;\n      const direction = labelPlacement === 'top' ? 'vertical' : 'horizontal';\n      const {\n        common: {\n          cubicBezierEaseInOut\n        },\n        self: {\n          labelTextColor,\n          asteriskColor,\n          lineHeight,\n          feedbackTextColor,\n          feedbackTextColorWarning,\n          feedbackTextColorError,\n          feedbackPadding,\n          labelFontWeight,\n          [createKey('labelHeight', size)]: labelHeight,\n          [createKey('blankHeight', size)]: blankHeight,\n          [createKey('feedbackFontSize', size)]: feedbackFontSize,\n          [createKey('feedbackHeight', size)]: feedbackHeight,\n          [createKey('labelPadding', direction)]: labelPadding,\n          [createKey('labelTextAlign', direction)]: labelTextAlign,\n          [createKey(createKey('labelFontSize', labelPlacement), size)]: labelFontSize\n        }\n      } = themeRef.value;\n      let mergedLabelTextAlign = (_a = labelTextAlignRef.value) !== null && _a !== void 0 ? _a : labelTextAlign;\n      if (labelPlacement === 'top') {\n        mergedLabelTextAlign = mergedLabelTextAlign === 'right' ? 'flex-end' : 'flex-start';\n      }\n      const cssVars = {\n        '--n-bezier': cubicBezierEaseInOut,\n        '--n-line-height': lineHeight,\n        '--n-blank-height': blankHeight,\n        '--n-label-font-size': labelFontSize,\n        '--n-label-text-align': mergedLabelTextAlign,\n        '--n-label-height': labelHeight,\n        '--n-label-padding': labelPadding,\n        '--n-label-font-weight': labelFontWeight,\n        '--n-asterisk-color': asteriskColor,\n        '--n-label-text-color': labelTextColor,\n        '--n-feedback-padding': feedbackPadding,\n        '--n-feedback-font-size': feedbackFontSize,\n        '--n-feedback-height': feedbackHeight,\n        '--n-feedback-text-color': feedbackTextColor,\n        '--n-feedback-text-color-warning': feedbackTextColorWarning,\n        '--n-feedback-text-color-error': feedbackTextColorError\n      };\n      return cssVars;\n    });\n    const themeClassHandle = inlineThemeDisabled ? useThemeClass('form-item', computed(() => {\n      var _a;\n      return `${mergedSizeRef.value[0]}${labelPlacementRef.value[0]}${((_a = labelTextAlignRef.value) === null || _a === void 0 ? void 0 : _a[0]) || ''}`;\n    }), cssVarsRef, props) : undefined;\n    const reverseColSpaceRef = computed(() => {\n      // label placement left\n      // require-mark-placement | label align | areas (1fr auto)\n      // left                   | left        | mark text (need reverse)\n      // left                   | right       | mark text (okay)\n      // right                  | left        | mark text (okay)\n      // right                  | right       | mark text (okay)\n      // right-hanging          | left        | text mark (okay)\n      // right-hanging          | right       | text mark (okay)\n      return labelPlacementRef.value === 'left' && mergedRequireMarkPlacementRef.value === 'left' && labelTextAlignRef.value === 'left';\n    });\n    return Object.assign(Object.assign(Object.assign(Object.assign({\n      labelElementRef,\n      mergedClsPrefix: mergedClsPrefixRef,\n      mergedRequired: mergedRequiredRef,\n      feedbackId: feedbackIdRef,\n      renderExplains: renderExplainsRef,\n      reverseColSpace: reverseColSpaceRef\n    }, formItemMiscRefs), formItemSizeRefs), exposedRef), {\n      cssVars: inlineThemeDisabled ? undefined : cssVarsRef,\n      themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,\n      onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender\n    });\n  },\n  render() {\n    const {\n      $slots,\n      mergedClsPrefix,\n      mergedShowLabel,\n      mergedShowRequireMark,\n      mergedRequireMarkPlacement,\n      onRender\n    } = this;\n    const renderedShowRequireMark = mergedShowRequireMark !== undefined ? mergedShowRequireMark : this.mergedRequired;\n    onRender === null || onRender === void 0 ? void 0 : onRender();\n    const renderLabel = () => {\n      const labelText = this.$slots.label ? this.$slots.label() : this.label;\n      if (!labelText) return null;\n      const textNode = h(\"span\", {\n        class: `${mergedClsPrefix}-form-item-label__text`\n      }, labelText);\n      const markNode = renderedShowRequireMark ? h(\"span\", {\n        class: `${mergedClsPrefix}-form-item-label__asterisk`\n      }, mergedRequireMarkPlacement !== 'left' ? '\\u00A0*' : '*\\u00A0') : mergedRequireMarkPlacement === 'right-hanging' && h(\"span\", {\n        class: `${mergedClsPrefix}-form-item-label__asterisk-placeholder`\n      }, '\\u00A0*');\n      const {\n        labelProps\n      } = this;\n      return h(\"label\", Object.assign({}, labelProps, {\n        class: [labelProps === null || labelProps === void 0 ? void 0 : labelProps.class, `${mergedClsPrefix}-form-item-label`, `${mergedClsPrefix}-form-item-label--${mergedRequireMarkPlacement}-mark`, this.reverseColSpace && `${mergedClsPrefix}-form-item-label--reverse-columns-space`],\n        style: this.mergedLabelStyle,\n        ref: \"labelElementRef\"\n      }), mergedRequireMarkPlacement === 'left' ? [markNode, textNode] : [textNode, markNode]);\n    };\n    return h(\"div\", {\n      class: [`${mergedClsPrefix}-form-item`, this.themeClass, `${mergedClsPrefix}-form-item--${this.mergedSize}-size`, `${mergedClsPrefix}-form-item--${this.mergedLabelPlacement}-labelled`, this.isAutoLabelWidth && `${mergedClsPrefix}-form-item--auto-label-width`, !mergedShowLabel && `${mergedClsPrefix}-form-item--no-label`],\n      style: this.cssVars\n    }, mergedShowLabel && renderLabel(), h(\"div\", {\n      class: [`${mergedClsPrefix}-form-item-blank`, this.mergedValidationStatus && `${mergedClsPrefix}-form-item-blank--${this.mergedValidationStatus}`]\n    }, $slots), this.mergedShowFeedback ? h(\"div\", {\n      key: this.feedbackId,\n      style: this.feedbackStyle,\n      class: [`${mergedClsPrefix}-form-item-feedback-wrapper`, this.feedbackClass]\n    }, h(Transition, {\n      name: \"fade-down-transition\",\n      mode: \"out-in\"\n    }, {\n      default: () => {\n        const {\n          mergedValidationStatus\n        } = this;\n        return resolveWrappedSlot($slots.feedback, children => {\n          var _a;\n          const {\n            feedback\n          } = this;\n          const feedbackNodes = children || feedback ? h(\"div\", {\n            key: \"__feedback__\",\n            class: `${mergedClsPrefix}-form-item-feedback__line`\n          }, children || feedback) : this.renderExplains.length ? (_a = this.renderExplains) === null || _a === void 0 ? void 0 : _a.map(({\n            key,\n            render\n          }) => h(\"div\", {\n            key: key,\n            class: `${mergedClsPrefix}-form-item-feedback__line`\n          }, render())) : null;\n          return feedbackNodes ? mergedValidationStatus === 'warning' ? h(\"div\", {\n            key: \"controlled-warning\",\n            class: `${mergedClsPrefix}-form-item-feedback ${mergedClsPrefix}-form-item-feedback--warning`\n          }, feedbackNodes) : mergedValidationStatus === 'error' ? h(\"div\", {\n            key: \"controlled-error\",\n            class: `${mergedClsPrefix}-form-item-feedback ${mergedClsPrefix}-form-item-feedback--error`\n          }, feedbackNodes) : mergedValidationStatus === 'success' ? h(\"div\", {\n            key: \"controlled-success\",\n            class: `${mergedClsPrefix}-form-item-feedback ${mergedClsPrefix}-form-item-feedback--success`\n          }, feedbackNodes) : h(\"div\", {\n            key: \"controlled-default\",\n            class: `${mergedClsPrefix}-form-item-feedback`\n          }, feedbackNodes) : null;\n        });\n      }\n    })) : null);\n  }\n});","import { createInjectionKey } from \"../../_utils/index.mjs\";\nexport const defaultSpan = 1;\nexport const gridInjectionKey = createInjectionKey('n-grid');","import { pxfy } from 'seemly';\nimport { computed, defineComponent, getCurrentInstance, h, inject } from 'vue';\nimport { keysOf } from \"../../_utils/index.mjs\";\nimport { gridInjectionKey } from \"./config.mjs\";\nexport const defaultSpan = 1;\nexport const gridItemProps = {\n  span: {\n    type: [Number, String],\n    default: defaultSpan\n  },\n  offset: {\n    type: [Number, String],\n    default: 0\n  },\n  suffix: Boolean,\n  // private props\n  privateOffset: Number,\n  privateSpan: Number,\n  privateColStart: Number,\n  privateShow: {\n    type: Boolean,\n    default: true\n  }\n};\nexport const gridItemPropKeys = keysOf(gridItemProps);\nexport default defineComponent({\n  __GRID_ITEM__: true,\n  name: 'GridItem',\n  alias: ['Gi'],\n  props: gridItemProps,\n  setup() {\n    const {\n      isSsrRef,\n      xGapRef,\n      itemStyleRef,\n      overflowRef,\n      layoutShiftDisabledRef\n    } = inject(gridInjectionKey);\n    const self = getCurrentInstance();\n    return {\n      overflow: overflowRef,\n      itemStyle: itemStyleRef,\n      layoutShiftDisabled: layoutShiftDisabledRef,\n      mergedXGap: computed(() => {\n        return pxfy(xGapRef.value || 0);\n      }),\n      deriveStyle: () => {\n        void isSsrRef.value;\n        // Here is quite a hack, I hope there is a better way to solve it\n        const {\n          privateSpan = defaultSpan,\n          privateShow = true,\n          privateColStart = undefined,\n          privateOffset = 0\n        } = self.vnode.props;\n        const {\n          value: xGap\n        } = xGapRef;\n        const mergedXGap = pxfy(xGap || 0);\n        return {\n          display: !privateShow ? 'none' : '',\n          gridColumn: `${privateColStart !== null && privateColStart !== void 0 ? privateColStart : `span ${privateSpan}`} / span ${privateSpan}`,\n          marginLeft: privateOffset ? `calc((100% - (${privateSpan} - 1) * ${mergedXGap}) / ${privateSpan} * ${privateOffset} + ${mergedXGap} * ${privateOffset})` : ''\n        };\n      }\n    };\n  },\n  render() {\n    var _a, _b;\n    if (this.layoutShiftDisabled) {\n      const {\n        span,\n        offset,\n        mergedXGap\n      } = this;\n      return h(\"div\", {\n        style: {\n          gridColumn: `span ${span} / span ${span}`,\n          marginLeft: offset ? `calc((100% - (${span} - 1) * ${mergedXGap}) / ${span} * ${offset} + ${mergedXGap} * ${offset})` : ''\n        }\n      }, this.$slots);\n    }\n    return h(\"div\", {\n      style: [this.itemStyle, this.deriveStyle()]\n    }, (_b = (_a = this.$slots).default) === null || _b === void 0 ? void 0 : _b.call(_a, {\n      overflow: this.overflow\n    }));\n  }\n});","import { merge } from 'lodash-es';\nimport { defineComponent, inject, onBeforeMount, onUnmounted, watchEffect } from 'vue';\nimport { commonLight } from \"../../_styles/common/index.mjs\";\nimport { warn } from \"../../_utils/index.mjs\";\nimport { configProviderInjectionKey } from \"../../config-provider/src/context.mjs\";\nexport default defineComponent({\n  name: 'GlobalStyle',\n  setup() {\n    if (typeof document === 'undefined') return; // TODO: inject style for SSR\n    const NConfigProvider = inject(configProviderInjectionKey, null);\n    const {\n      body\n    } = document;\n    const {\n      style\n    } = body;\n    let styleApplied = false;\n    let firstApply = true;\n    onBeforeMount(() => {\n      watchEffect(() => {\n        var _a, _b;\n        const {\n          textColor2,\n          fontSize,\n          fontFamily,\n          bodyColor,\n          cubicBezierEaseInOut,\n          lineHeight\n        } = NConfigProvider ? merge({}, ((_a = NConfigProvider.mergedThemeRef.value) === null || _a === void 0 ? void 0 : _a.common) || commonLight, (_b = NConfigProvider.mergedThemeOverridesRef.value) === null || _b === void 0 ? void 0 : _b.common) : commonLight;\n        if (styleApplied || !body.hasAttribute('n-styled')) {\n          style.setProperty('-webkit-text-size-adjust', '100%');\n          style.setProperty('-webkit-tap-highlight-color', 'transparent');\n          style.padding = '0';\n          style.margin = '0';\n          style.backgroundColor = bodyColor;\n          style.color = textColor2;\n          style.fontSize = fontSize;\n          style.fontFamily = fontFamily;\n          style.lineHeight = lineHeight;\n          const transition = `color .3s ${cubicBezierEaseInOut}, background-color .3s ${cubicBezierEaseInOut}`;\n          if (firstApply) {\n            setTimeout(() => {\n              style.transition = transition;\n            }, 0);\n          } else {\n            style.transition = transition;\n          }\n          body.setAttribute('n-styled', '');\n          styleApplied = true;\n          firstApply = false;\n        } else if (process.env.NODE_ENV !== 'production') {\n          warn('global-style', 'More than one n-global-style exist in the document.body. Only the first mounted one will work.');\n        }\n      });\n    });\n    onUnmounted(() => {\n      if (styleApplied) {\n        body.removeAttribute('n-styled');\n      }\n    });\n  },\n  render() {\n    return null;\n  }\n});","export const defaultBreakpoints = {\n  xs: 0,\n  // mobile\n  s: 640,\n  // tablet\n  m: 1024,\n  // laptop s\n  l: 1280,\n  // laptop\n  xl: 1536,\n  // laptop l\n  xxl: 1920 // normal desktop display\n};","import { beforeNextFrameOnce, parseResponsivePropValue, pxfy } from 'seemly';\nimport { useBreakpoints, useMemo } from 'vooks';\nimport { cloneVNode, computed, defineComponent, h, mergeProps, onMounted, provide, ref, toRef, vShow } from 'vue';\nimport { VResizeObserver } from 'vueuc';\nimport { useConfig } from \"../../_mixins/index.mjs\";\nimport { flatten, getSlot, isBrowser, isNodeVShowFalse } from \"../../_utils/index.mjs\";\nimport { defaultBreakpoints } from \"../../config-provider/src/config.mjs\";\nimport { defaultSpan, gridInjectionKey } from \"./config.mjs\";\nconst defaultCols = 24;\nconst SSR_ATTR_NAME = '__ssr__';\nexport const gridProps = {\n  layoutShiftDisabled: Boolean,\n  responsive: {\n    type: [String, Boolean],\n    default: 'self'\n  },\n  cols: {\n    type: [Number, String],\n    default: defaultCols\n  },\n  itemResponsive: Boolean,\n  collapsed: Boolean,\n  // may create grid rows < collapsedRows since a item may take all the row\n  collapsedRows: {\n    type: Number,\n    default: 1\n  },\n  itemStyle: [Object, String],\n  xGap: {\n    type: [Number, String],\n    default: 0\n  },\n  yGap: {\n    type: [Number, String],\n    default: 0\n  }\n};\nexport default defineComponent({\n  name: 'Grid',\n  inheritAttrs: false,\n  props: gridProps,\n  setup(props) {\n    const {\n      mergedClsPrefixRef,\n      mergedBreakpointsRef\n    } = useConfig(props);\n    const numRegex = /^\\d+$/;\n    const widthRef = ref(undefined);\n    const breakpointsRef = useBreakpoints((mergedBreakpointsRef === null || mergedBreakpointsRef === void 0 ? void 0 : mergedBreakpointsRef.value) || defaultBreakpoints);\n    const isResponsiveRef = useMemo(() => {\n      if (props.itemResponsive) return true;\n      if (!numRegex.test(props.cols.toString())) return true;\n      if (!numRegex.test(props.xGap.toString())) return true;\n      if (!numRegex.test(props.yGap.toString())) return true;\n      return false;\n    });\n    const responsiveQueryRef = computed(() => {\n      if (!isResponsiveRef.value) return undefined;\n      return props.responsive === 'self' ? widthRef.value : breakpointsRef.value;\n    });\n    const responsiveColsRef = useMemo(() => {\n      var _a;\n      return (_a = Number(parseResponsivePropValue(props.cols.toString(), responsiveQueryRef.value))) !== null && _a !== void 0 ? _a : defaultCols;\n    });\n    const responsiveXGapRef = useMemo(() => parseResponsivePropValue(props.xGap.toString(), responsiveQueryRef.value));\n    const responsiveYGapRef = useMemo(() => parseResponsivePropValue(props.yGap.toString(), responsiveQueryRef.value));\n    const handleResize = entry => {\n      widthRef.value = entry.contentRect.width;\n    };\n    const handleResizeRaf = entry => {\n      beforeNextFrameOnce(handleResize, entry);\n    };\n    const overflowRef = ref(false);\n    const handleResizeRef = computed(() => {\n      if (props.responsive === 'self') {\n        return handleResizeRaf;\n      }\n      return undefined;\n    });\n    // for SSR, fix bug https://github.com/tusen-ai/naive-ui/issues/2462\n    const isSsrRef = ref(false);\n    const contentElRef = ref();\n    onMounted(() => {\n      const {\n        value: contentEl\n      } = contentElRef;\n      if (contentEl) {\n        if (contentEl.hasAttribute(SSR_ATTR_NAME)) {\n          contentEl.removeAttribute(SSR_ATTR_NAME);\n          isSsrRef.value = true;\n        }\n      }\n    });\n    provide(gridInjectionKey, {\n      layoutShiftDisabledRef: toRef(props, 'layoutShiftDisabled'),\n      isSsrRef,\n      itemStyleRef: toRef(props, 'itemStyle'),\n      xGapRef: responsiveXGapRef,\n      overflowRef\n    });\n    return {\n      isSsr: !isBrowser,\n      contentEl: contentElRef,\n      mergedClsPrefix: mergedClsPrefixRef,\n      style: computed(() => {\n        if (props.layoutShiftDisabled) {\n          return {\n            width: '100%',\n            display: 'grid',\n            gridTemplateColumns: `repeat(${props.cols}, minmax(0, 1fr))`,\n            columnGap: pxfy(props.xGap),\n            rowGap: pxfy(props.yGap)\n          };\n        }\n        return {\n          width: '100%',\n          display: 'grid',\n          gridTemplateColumns: `repeat(${responsiveColsRef.value}, minmax(0, 1fr))`,\n          columnGap: pxfy(responsiveXGapRef.value),\n          rowGap: pxfy(responsiveYGapRef.value)\n        };\n      }),\n      isResponsive: isResponsiveRef,\n      responsiveQuery: responsiveQueryRef,\n      responsiveCols: responsiveColsRef,\n      handleResize: handleResizeRef,\n      overflow: overflowRef\n    };\n  },\n  render() {\n    if (this.layoutShiftDisabled) {\n      return h('div', mergeProps({\n        ref: 'contentEl',\n        class: `${this.mergedClsPrefix}-grid`,\n        style: this.style\n      }, this.$attrs), this.$slots);\n    }\n    const renderContent = () => {\n      var _a, _b, _c, _d, _e, _f, _g;\n      this.overflow = false;\n      // render will be called twice when mounted, I can't figure out why\n      // 2 jobs will be pushed into job queues with same id, and then be flushed\n      const rawChildren = flatten(getSlot(this));\n      const childrenAndRawSpan = [];\n      const {\n        collapsed,\n        collapsedRows,\n        responsiveCols,\n        responsiveQuery\n      } = this;\n      rawChildren.forEach(child => {\n        var _a, _b, _c, _d, _e;\n        if (((_a = child === null || child === void 0 ? void 0 : child.type) === null || _a === void 0 ? void 0 : _a.__GRID_ITEM__) !== true) return;\n        if (isNodeVShowFalse(child)) {\n          const clonedNode = cloneVNode(child);\n          if (clonedNode.props) {\n            clonedNode.props.privateShow = false;\n          } else {\n            clonedNode.props = {\n              privateShow: false\n            };\n          }\n          childrenAndRawSpan.push({\n            child: clonedNode,\n            rawChildSpan: 0\n          });\n          return;\n        }\n        // We don't want v-show to control display, so we need to stripe it\n        // here, nor it may mess child's style\n        child.dirs = ((_b = child.dirs) === null || _b === void 0 ? void 0 : _b.filter(({\n          dir\n        }) => dir !== vShow)) || null;\n        if (((_c = child.dirs) === null || _c === void 0 ? void 0 : _c.length) === 0) {\n          child.dirs = null;\n        }\n        const clonedChild = cloneVNode(child);\n        const rawChildSpan = Number((_e = parseResponsivePropValue((_d = clonedChild.props) === null || _d === void 0 ? void 0 : _d.span, responsiveQuery)) !== null && _e !== void 0 ? _e : defaultSpan);\n        if (rawChildSpan === 0) return;\n        childrenAndRawSpan.push({\n          child: clonedChild,\n          rawChildSpan\n        });\n      });\n      let suffixSpan = 0;\n      const maybeSuffixNode = (_a = childrenAndRawSpan[childrenAndRawSpan.length - 1]) === null || _a === void 0 ? void 0 : _a.child;\n      if (maybeSuffixNode === null || maybeSuffixNode === void 0 ? void 0 : maybeSuffixNode.props) {\n        const suffixPropValue = (_b = maybeSuffixNode.props) === null || _b === void 0 ? void 0 : _b.suffix;\n        if (suffixPropValue !== undefined && suffixPropValue !== false) {\n          suffixSpan = Number((_d = parseResponsivePropValue((_c = maybeSuffixNode.props) === null || _c === void 0 ? void 0 : _c.span, responsiveQuery)) !== null && _d !== void 0 ? _d : defaultSpan);\n          maybeSuffixNode.props.privateSpan = suffixSpan;\n          maybeSuffixNode.props.privateColStart = responsiveCols + 1 - suffixSpan;\n          maybeSuffixNode.props.privateShow = (_e = maybeSuffixNode.props.privateShow) !== null && _e !== void 0 ? _e : true;\n        }\n      }\n      let spanCounter = 0;\n      let done = false;\n      for (const {\n        child,\n        rawChildSpan\n      } of childrenAndRawSpan) {\n        if (done) {\n          this.overflow = true;\n        }\n        if (!done) {\n          const childOffset = Number((_g = parseResponsivePropValue((_f = child.props) === null || _f === void 0 ? void 0 : _f.offset, responsiveQuery)) !== null && _g !== void 0 ? _g : 0);\n          // it could be 0 sometimes (v-show = false)\n          const childSpan = Math.min(rawChildSpan + childOffset, responsiveCols);\n          if (!child.props) {\n            child.props = {\n              privateSpan: childSpan,\n              privateOffset: childOffset\n            };\n          } else {\n            child.props.privateSpan = childSpan;\n            child.props.privateOffset = childOffset;\n          }\n          if (collapsed) {\n            const remainder = spanCounter % responsiveCols;\n            if (childSpan + remainder > responsiveCols) {\n              spanCounter += responsiveCols - remainder;\n            }\n            if (childSpan + spanCounter + suffixSpan > collapsedRows * responsiveCols) {\n              done = true;\n            } else {\n              spanCounter += childSpan;\n            }\n          }\n        }\n        if (done) {\n          if (child.props) {\n            // suffix node's privateShow may be true\n            if (child.props.privateShow !== true) {\n              child.props.privateShow = false;\n            }\n          } else {\n            child.props = {\n              privateShow: false\n            };\n          }\n        }\n      }\n      return h('div', mergeProps({\n        ref: 'contentEl',\n        class: `${this.mergedClsPrefix}-grid`,\n        style: this.style,\n        [SSR_ATTR_NAME]: this.isSsr || undefined\n      }, this.$attrs), childrenAndRawSpan.map(({\n        child\n      }) => child));\n    };\n    return this.isResponsive && this.responsive === 'self' ? h(VResizeObserver, {\n      onResize: this.handleResize\n    }, {\n      default: renderContent\n    }) : renderContent();\n  }\n});","import { commonLight } from \"../../_styles/common/index.mjs\";\nexport function self(vars) {\n  const {\n    primaryColor,\n    baseColor\n  } = vars;\n  return {\n    color: primaryColor,\n    iconColor: baseColor\n  };\n}\nconst iconWrapperLight = {\n  name: 'IconWrapper',\n  common: commonLight,\n  self\n};\nexport default iconWrapperLight;","import { commonDark } from \"../../_styles/common/index.mjs\";\nimport { self } from \"./light.mjs\";\nconst iconDark = {\n  name: 'IconWrapper',\n  common: commonDark,\n  self\n};\nexport default iconDark;","import { commonDark } from \"../../_styles/common/index.mjs\";\nimport { tooltipDark } from \"../../styles.mjs\";\nexport const imageDark = {\n  name: 'Image',\n  common: commonDark,\n  peers: {\n    Tooltip: tooltipDark\n  },\n  self: vars => {\n    const {\n      textColor2\n    } = vars;\n    return {\n      toolbarIconColor: textColor2,\n      toolbarColor: 'rgba(0, 0, 0, .35)',\n      toolbarBoxShadow: 'none',\n      toolbarBorderRadius: '24px'\n    };\n  }\n};","import { createTheme } from \"../../_mixins/index.mjs\";\nimport { commonLight } from \"../../_styles/common/index.mjs\";\nimport { tooltipLight } from \"../../tooltip/styles/index.mjs\";\nfunction self() {\n  return {\n    toolbarIconColor: 'rgba(255, 255, 255, .9)',\n    toolbarColor: 'rgba(0, 0, 0, .35)',\n    toolbarBoxShadow: 'none',\n    toolbarBorderRadius: '24px'\n  };\n}\nexport const imageLight = createTheme({\n  name: 'Image',\n  common: commonLight,\n  peers: {\n    Tooltip: tooltipLight\n  },\n  self\n});","import { h } from 'vue';\nexport function renderPrevIcon() {\n  return h(\"svg\", {\n    viewBox: \"0 0 20 20\",\n    fill: \"none\",\n    xmlns: \"http://www.w3.org/2000/svg\"\n  }, h(\"path\", {\n    d: \"M6 5C5.75454 5 5.55039 5.17688 5.50806 5.41012L5.5 5.5V14.5C5.5 14.7761 5.72386 15 6 15C6.24546 15 6.44961 14.8231 6.49194 14.5899L6.5 14.5V5.5C6.5 5.22386 6.27614 5 6 5ZM13.8536 5.14645C13.68 4.97288 13.4106 4.9536 13.2157 5.08859L13.1464 5.14645L8.64645 9.64645C8.47288 9.82001 8.4536 10.0894 8.58859 10.2843L8.64645 10.3536L13.1464 14.8536C13.3417 15.0488 13.6583 15.0488 13.8536 14.8536C14.0271 14.68 14.0464 14.4106 13.9114 14.2157L13.8536 14.1464L9.70711 10L13.8536 5.85355C14.0488 5.65829 14.0488 5.34171 13.8536 5.14645Z\",\n    fill: \"currentColor\"\n  }));\n}\nexport function renderNextIcon() {\n  return h(\"svg\", {\n    viewBox: \"0 0 20 20\",\n    fill: \"none\",\n    xmlns: \"http://www.w3.org/2000/svg\"\n  }, h(\"path\", {\n    d: \"M13.5 5C13.7455 5 13.9496 5.17688 13.9919 5.41012L14 5.5V14.5C14 14.7761 13.7761 15 13.5 15C13.2545 15 13.0504 14.8231 13.0081 14.5899L13 14.5V5.5C13 5.22386 13.2239 5 13.5 5ZM5.64645 5.14645C5.82001 4.97288 6.08944 4.9536 6.28431 5.08859L6.35355 5.14645L10.8536 9.64645C11.0271 9.82001 11.0464 10.0894 10.9114 10.2843L10.8536 10.3536L6.35355 14.8536C6.15829 15.0488 5.84171 15.0488 5.64645 14.8536C5.47288 14.68 5.4536 14.4106 5.58859 14.2157L5.64645 14.1464L9.79289 10L5.64645 5.85355C5.45118 5.65829 5.45118 5.34171 5.64645 5.14645Z\",\n    fill: \"currentColor\"\n  }));\n}\nexport function renderCloseIcon() {\n  return h(\"svg\", {\n    viewBox: \"0 0 20 20\",\n    fill: \"none\",\n    xmlns: \"http://www.w3.org/2000/svg\"\n  }, h(\"path\", {\n    d: \"M4.089 4.216l.057-.07a.5.5 0 0 1 .638-.057l.07.057L10 9.293l5.146-5.147a.5.5 0 0 1 .638-.057l.07.057a.5.5 0 0 1 .057.638l-.057.07L10.707 10l5.147 5.146a.5.5 0 0 1 .057.638l-.057.07a.5.5 0 0 1-.638.057l-.07-.057L10 10.707l-5.146 5.147a.5.5 0 0 1-.638.057l-.07-.057a.5.5 0 0 1-.057-.638l.057-.07L9.293 10L4.146 4.854a.5.5 0 0 1-.057-.638l.057-.07l-.057.07z\",\n    fill: \"currentColor\"\n  }));\n}","import { useTheme } from \"../../_mixins/index.mjs\";\nimport { createInjectionKey } from \"../../_utils/index.mjs\";\nexport const imagePreviewSharedProps = Object.assign(Object.assign({}, useTheme.props), {\n  onPreviewPrev: Function,\n  onPreviewNext: Function,\n  showToolbar: {\n    type: Boolean,\n    default: true\n  },\n  showToolbarTooltip: Boolean,\n  renderToolbar: Function\n});\nexport const imageContextKey = createInjectionKey('n-image');","import { fadeInScaleUpTransition } from \"../../../_styles/transitions/fade-in-scale-up.cssr.mjs\";\nimport { fadeInTransition } from \"../../../_styles/transitions/fade-in.cssr.mjs\";\nimport { c, cB, cNotM } from \"../../../_utils/cssr/index.mjs\";\n// vars:\n// --n-toolbar-icon-color\n// --n-toolbar-color\n// --n-toolbar-border-radius\n// --n-toolbar-box-shadow\n// --n-bezier\nexport default c([c('body >', [cB('image-container', 'position: fixed;')]), cB('image-preview-container', `\n position: fixed;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n display: flex;\n `), cB('image-preview-overlay', `\n z-index: -1;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n background: rgba(0, 0, 0, .3);\n `, [fadeInTransition()]), cB('image-preview-toolbar', `\n z-index: 1;\n position: absolute;\n left: 50%;\n transform: translateX(-50%);\n border-radius: var(--n-toolbar-border-radius);\n height: 48px;\n bottom: 40px;\n padding: 0 12px;\n background: var(--n-toolbar-color);\n box-shadow: var(--n-toolbar-box-shadow);\n color: var(--n-toolbar-icon-color);\n transition: color .3s var(--n-bezier);\n display: flex;\n align-items: center;\n `, [cB('base-icon', `\n padding: 0 8px;\n font-size: 28px;\n cursor: pointer;\n `), fadeInTransition()]), cB('image-preview-wrapper', `\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n display: flex;\n pointer-events: none;\n `, [fadeInScaleUpTransition()]), cB('image-preview', `\n user-select: none;\n -webkit-user-select: none;\n pointer-events: all;\n margin: auto;\n max-height: calc(100vh - 32px);\n max-width: calc(100vw - 32px);\n transition: transform .3s var(--n-bezier);\n `), cB('image', `\n display: inline-flex;\n max-height: 100%;\n max-width: 100%;\n `, [cNotM('preview-disabled', `\n cursor: pointer;\n `), c('img', `\n border-radius: inherit;\n `)])]);","import { off, on } from 'evtd';\nimport { kebabCase } from 'lodash-es';\nimport { beforeNextFrameOnce } from 'seemly';\nimport { zindexable } from 'vdirs';\nimport { useIsMounted } from 'vooks';\nimport { computed, defineComponent, Fragment, h, inject, normalizeStyle, onBeforeUnmount, ref, toRef, Transition, vShow, watch, withDirectives } from 'vue';\nimport { LazyTeleport } from 'vueuc';\nimport { NBaseIcon } from \"../../_internal/index.mjs\";\nimport { DownloadIcon, ResizeSmallIcon, RotateClockwiseIcon, RotateCounterclockwiseIcon, ZoomInIcon, ZoomOutIcon } from \"../../_internal/icons/index.mjs\";\nimport { useConfig, useLocale, useTheme, useThemeClass } from \"../../_mixins/index.mjs\";\nimport { download } from \"../../_utils/index.mjs\";\nimport { NTooltip } from \"../../tooltip/index.mjs\";\nimport { imageLight } from \"../styles/index.mjs\";\nimport { renderCloseIcon, renderNextIcon, renderPrevIcon } from \"./icons.mjs\";\nimport { imageContextKey, imagePreviewSharedProps } from \"./interface.mjs\";\nimport style from \"./styles/index.cssr.mjs\";\nconst BLEEDING = 32;\nexport default defineComponent({\n  name: 'ImagePreview',\n  props: Object.assign(Object.assign({}, imagePreviewSharedProps), {\n    onNext: Function,\n    onPrev: Function,\n    clsPrefix: {\n      type: String,\n      required: true\n    }\n  }),\n  setup(props) {\n    const themeRef = useTheme('Image', '-image', style, imageLight, props, toRef(props, 'clsPrefix'));\n    let thumbnailEl = null;\n    const previewRef = ref(null);\n    const previewWrapperRef = ref(null);\n    const previewSrcRef = ref(undefined);\n    const showRef = ref(false);\n    const displayedRef = ref(false);\n    const {\n      localeRef\n    } = useLocale('Image');\n    function syncTransformOrigin() {\n      const {\n        value: previewWrapper\n      } = previewWrapperRef;\n      if (!thumbnailEl || !previewWrapper) return;\n      const {\n        style\n      } = previewWrapper;\n      const tbox = thumbnailEl.getBoundingClientRect();\n      const tx = tbox.left + tbox.width / 2;\n      const ty = tbox.top + tbox.height / 2;\n      style.transformOrigin = `${tx}px ${ty}px`;\n    }\n    function handleKeydown(e) {\n      var _a, _b;\n      switch (e.key) {\n        case ' ':\n          e.preventDefault();\n          break;\n        case 'ArrowLeft':\n          (_a = props.onPrev) === null || _a === void 0 ? void 0 : _a.call(props);\n          break;\n        case 'ArrowRight':\n          (_b = props.onNext) === null || _b === void 0 ? void 0 : _b.call(props);\n          break;\n        case 'Escape':\n          toggleShow();\n          break;\n      }\n    }\n    watch(showRef, value => {\n      if (value) {\n        on('keydown', document, handleKeydown);\n      } else {\n        off('keydown', document, handleKeydown);\n      }\n    });\n    onBeforeUnmount(() => {\n      off('keydown', document, handleKeydown);\n    });\n    let startX = 0;\n    let startY = 0;\n    let offsetX = 0;\n    let offsetY = 0;\n    let startOffsetX = 0;\n    let startOffsetY = 0;\n    let mouseDownClientX = 0;\n    let mouseDownClientY = 0;\n    let dragging = false;\n    function handleMouseMove(e) {\n      const {\n        clientX,\n        clientY\n      } = e;\n      offsetX = clientX - startX;\n      offsetY = clientY - startY;\n      beforeNextFrameOnce(derivePreviewStyle);\n    }\n    function getMoveStrategy(opts) {\n      const {\n        mouseUpClientX,\n        mouseUpClientY,\n        mouseDownClientX,\n        mouseDownClientY\n      } = opts;\n      const deltaHorizontal = mouseDownClientX - mouseUpClientX;\n      const deltaVertical = mouseDownClientY - mouseUpClientY;\n      const moveVerticalDirection = `vertical${deltaVertical > 0 ? 'Top' : 'Bottom'}`;\n      const moveHorizontalDirection = `horizontal${deltaHorizontal > 0 ? 'Left' : 'Right'}`;\n      return {\n        moveVerticalDirection,\n        moveHorizontalDirection,\n        deltaHorizontal,\n        deltaVertical\n      };\n    }\n    // avoid image move outside viewport\n    function getDerivedOffset(moveStrategy) {\n      const {\n        value: preview\n      } = previewRef;\n      if (!preview) return {\n        offsetX: 0,\n        offsetY: 0\n      };\n      const pbox = preview.getBoundingClientRect();\n      const {\n        moveVerticalDirection,\n        moveHorizontalDirection,\n        deltaHorizontal,\n        deltaVertical\n      } = moveStrategy || {};\n      let nextOffsetX = 0;\n      let nextOffsetY = 0;\n      if (pbox.width <= window.innerWidth) {\n        nextOffsetX = 0;\n      } else if (pbox.left > 0) {\n        nextOffsetX = (pbox.width - window.innerWidth) / 2;\n      } else if (pbox.right < window.innerWidth) {\n        nextOffsetX = -(pbox.width - window.innerWidth) / 2;\n      } else if (moveHorizontalDirection === 'horizontalRight') {\n        nextOffsetX = Math.min((pbox.width - window.innerWidth) / 2, startOffsetX - (deltaHorizontal !== null && deltaHorizontal !== void 0 ? deltaHorizontal : 0));\n      } else {\n        nextOffsetX = Math.max(-((pbox.width - window.innerWidth) / 2), startOffsetX - (deltaHorizontal !== null && deltaHorizontal !== void 0 ? deltaHorizontal : 0));\n      }\n      if (pbox.height <= window.innerHeight) {\n        nextOffsetY = 0;\n      } else if (pbox.top > 0) {\n        nextOffsetY = (pbox.height - window.innerHeight) / 2;\n      } else if (pbox.bottom < window.innerHeight) {\n        nextOffsetY = -(pbox.height - window.innerHeight) / 2;\n      } else if (moveVerticalDirection === 'verticalBottom') {\n        nextOffsetY = Math.min((pbox.height - window.innerHeight) / 2, startOffsetY - (deltaVertical !== null && deltaVertical !== void 0 ? deltaVertical : 0));\n      } else {\n        nextOffsetY = Math.max(-((pbox.height - window.innerHeight) / 2), startOffsetY - (deltaVertical !== null && deltaVertical !== void 0 ? deltaVertical : 0));\n      }\n      return {\n        offsetX: nextOffsetX,\n        offsetY: nextOffsetY\n      };\n    }\n    function handleMouseUp(e) {\n      off('mousemove', document, handleMouseMove);\n      off('mouseup', document, handleMouseUp);\n      const {\n        clientX: mouseUpClientX,\n        clientY: mouseUpClientY\n      } = e;\n      dragging = false;\n      const moveStrategy = getMoveStrategy({\n        mouseUpClientX,\n        mouseUpClientY,\n        mouseDownClientX,\n        mouseDownClientY\n      });\n      const offset = getDerivedOffset(moveStrategy);\n      offsetX = offset.offsetX;\n      offsetY = offset.offsetY;\n      derivePreviewStyle();\n    }\n    const imageContext = inject(imageContextKey, null);\n    function handlePreviewMousedown(e) {\n      var _a, _b;\n      (_b = (_a = imageContext === null || imageContext === void 0 ? void 0 : imageContext.previewedImgPropsRef.value) === null || _a === void 0 ? void 0 : _a.onMousedown) === null || _b === void 0 ? void 0 : _b.call(_a, e);\n      if (e.button !== 0) return;\n      const {\n        clientX,\n        clientY\n      } = e;\n      dragging = true;\n      startX = clientX - offsetX;\n      startY = clientY - offsetY;\n      startOffsetX = offsetX;\n      startOffsetY = offsetY;\n      mouseDownClientX = clientX;\n      mouseDownClientY = clientY;\n      derivePreviewStyle();\n      on('mousemove', document, handleMouseMove);\n      on('mouseup', document, handleMouseUp);\n    }\n    const scaleRadix = 1.5;\n    let scaleExp = 0;\n    let scale = 1;\n    let rotate = 0;\n    function handlePreviewDblclick(e) {\n      var _a, _b;\n      (_b = (_a = imageContext === null || imageContext === void 0 ? void 0 : imageContext.previewedImgPropsRef.value) === null || _a === void 0 ? void 0 : _a.onDblclick) === null || _b === void 0 ? void 0 : _b.call(_a, e);\n      const originalImageSizeScale = getOrignalImageSizeScale();\n      scale = scale === originalImageSizeScale ? 1 : originalImageSizeScale;\n      derivePreviewStyle();\n    }\n    function resetScale() {\n      scale = 1;\n      scaleExp = 0;\n    }\n    function handleSwitchPrev() {\n      var _a;\n      resetScale();\n      rotate = 0;\n      (_a = props.onPrev) === null || _a === void 0 ? void 0 : _a.call(props);\n    }\n    function handleSwitchNext() {\n      var _a;\n      resetScale();\n      rotate = 0;\n      (_a = props.onNext) === null || _a === void 0 ? void 0 : _a.call(props);\n    }\n    function rotateCounterclockwise() {\n      rotate -= 90;\n      derivePreviewStyle();\n    }\n    function rotateClockwise() {\n      rotate += 90;\n      derivePreviewStyle();\n    }\n    function getMaxScale() {\n      const {\n        value: preview\n      } = previewRef;\n      if (!preview) return 1;\n      const {\n        innerWidth,\n        innerHeight\n      } = window;\n      const heightMaxScale = Math.max(1, preview.naturalHeight / (innerHeight - BLEEDING));\n      const widthMaxScale = Math.max(1, preview.naturalWidth / (innerWidth - BLEEDING));\n      return Math.max(3, heightMaxScale * 2, widthMaxScale * 2);\n    }\n    function getOrignalImageSizeScale() {\n      const {\n        value: preview\n      } = previewRef;\n      if (!preview) return 1;\n      const {\n        innerWidth,\n        innerHeight\n      } = window;\n      const heightScale = preview.naturalHeight / (innerHeight - BLEEDING);\n      const widthScale = preview.naturalWidth / (innerWidth - BLEEDING);\n      if (heightScale < 1 && widthScale < 1) {\n        return 1;\n      }\n      return Math.max(heightScale, widthScale);\n    }\n    function zoomIn() {\n      const maxScale = getMaxScale();\n      if (scale < maxScale) {\n        scaleExp += 1;\n        scale = Math.min(maxScale, Math.pow(scaleRadix, scaleExp));\n        derivePreviewStyle();\n      }\n    }\n    function zoomOut() {\n      if (scale > 0.5) {\n        const originalScale = scale;\n        scaleExp -= 1;\n        scale = Math.max(0.5, Math.pow(scaleRadix, scaleExp));\n        const diff = originalScale - scale;\n        derivePreviewStyle(false);\n        const offset = getDerivedOffset();\n        scale += diff;\n        derivePreviewStyle(false);\n        scale -= diff;\n        offsetX = offset.offsetX;\n        offsetY = offset.offsetY;\n        derivePreviewStyle();\n      }\n    }\n    function handleDownloadClick() {\n      const src = previewSrcRef.value;\n      if (src) {\n        download(src, undefined);\n      }\n    }\n    function derivePreviewStyle(transition = true) {\n      var _a;\n      const {\n        value: preview\n      } = previewRef;\n      if (!preview) return;\n      const {\n        style\n      } = preview;\n      const controlledStyle = normalizeStyle((_a = imageContext === null || imageContext === void 0 ? void 0 : imageContext.previewedImgPropsRef.value) === null || _a === void 0 ? void 0 : _a.style);\n      let controlledStyleString = '';\n      if (typeof controlledStyle === 'string') {\n        controlledStyleString = `${controlledStyle};`;\n      } else {\n        for (const key in controlledStyle) {\n          controlledStyleString += `${kebabCase(key)}: ${controlledStyle[key]};`;\n        }\n      }\n      const transformStyle = `transform-origin: center; transform: translateX(${offsetX}px) translateY(${offsetY}px) rotate(${rotate}deg) scale(${scale});`;\n      if (dragging) {\n        style.cssText = `${controlledStyleString}cursor: grabbing; transition: none;${transformStyle}`;\n      } else {\n        style.cssText = `${controlledStyleString}cursor: grab;${transformStyle}${transition ? '' : 'transition: none;'}`;\n      }\n      if (!transition) {\n        void preview.offsetHeight;\n      }\n    }\n    function toggleShow() {\n      showRef.value = !showRef.value;\n      displayedRef.value = true;\n    }\n    function resizeToOrignalImageSize() {\n      scale = getOrignalImageSizeScale();\n      scaleExp = Math.ceil(Math.log(scale) / Math.log(scaleRadix));\n      offsetX = 0;\n      offsetY = 0;\n      derivePreviewStyle();\n    }\n    const exposedMethods = {\n      setPreviewSrc: src => {\n        previewSrcRef.value = src;\n      },\n      setThumbnailEl: el => {\n        thumbnailEl = el;\n      },\n      toggleShow\n    };\n    function withTooltip(node, tooltipKey) {\n      if (props.showToolbarTooltip) {\n        const {\n          value: theme\n        } = themeRef;\n        return h(NTooltip, {\n          to: false,\n          theme: theme.peers.Tooltip,\n          themeOverrides: theme.peerOverrides.Tooltip,\n          keepAliveOnHover: false\n        }, {\n          default: () => {\n            return localeRef.value[tooltipKey];\n          },\n          trigger: () => node\n        });\n      } else {\n        return node;\n      }\n    }\n    const cssVarsRef = computed(() => {\n      const {\n        common: {\n          cubicBezierEaseInOut\n        },\n        self: {\n          toolbarIconColor,\n          toolbarBorderRadius,\n          toolbarBoxShadow,\n          toolbarColor\n        }\n      } = themeRef.value;\n      return {\n        '--n-bezier': cubicBezierEaseInOut,\n        '--n-toolbar-icon-color': toolbarIconColor,\n        '--n-toolbar-color': toolbarColor,\n        '--n-toolbar-border-radius': toolbarBorderRadius,\n        '--n-toolbar-box-shadow': toolbarBoxShadow\n      };\n    });\n    const {\n      inlineThemeDisabled\n    } = useConfig();\n    const themeClassHandle = inlineThemeDisabled ? useThemeClass('image-preview', undefined, cssVarsRef, props) : undefined;\n    return Object.assign({\n      previewRef,\n      previewWrapperRef,\n      previewSrc: previewSrcRef,\n      show: showRef,\n      appear: useIsMounted(),\n      displayed: displayedRef,\n      previewedImgProps: imageContext === null || imageContext === void 0 ? void 0 : imageContext.previewedImgPropsRef,\n      handleWheel(e) {\n        e.preventDefault();\n      },\n      handlePreviewMousedown,\n      handlePreviewDblclick,\n      syncTransformOrigin,\n      handleAfterLeave: () => {\n        resetScale();\n        rotate = 0;\n        displayedRef.value = false;\n      },\n      handleDragStart: e => {\n        var _a, _b;\n        (_b = (_a = imageContext === null || imageContext === void 0 ? void 0 : imageContext.previewedImgPropsRef.value) === null || _a === void 0 ? void 0 : _a.onDragstart) === null || _b === void 0 ? void 0 : _b.call(_a, e);\n        e.preventDefault();\n      },\n      zoomIn,\n      zoomOut,\n      handleDownloadClick,\n      rotateCounterclockwise,\n      rotateClockwise,\n      handleSwitchPrev,\n      handleSwitchNext,\n      withTooltip,\n      resizeToOrignalImageSize,\n      cssVars: inlineThemeDisabled ? undefined : cssVarsRef,\n      themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,\n      onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender\n    }, exposedMethods);\n  },\n  render() {\n    var _a, _b;\n    const {\n      clsPrefix,\n      renderToolbar,\n      withTooltip\n    } = this;\n    const prevNode = withTooltip(h(NBaseIcon, {\n      clsPrefix: clsPrefix,\n      onClick: this.handleSwitchPrev\n    }, {\n      default: renderPrevIcon\n    }), 'tipPrevious');\n    const nextNode = withTooltip(h(NBaseIcon, {\n      clsPrefix: clsPrefix,\n      onClick: this.handleSwitchNext\n    }, {\n      default: renderNextIcon\n    }), 'tipNext');\n    const rotateCounterclockwiseNode = withTooltip(h(NBaseIcon, {\n      clsPrefix: clsPrefix,\n      onClick: this.rotateCounterclockwise\n    }, {\n      default: () => h(RotateCounterclockwiseIcon, null)\n    }), 'tipCounterclockwise');\n    const rotateClockwiseNode = withTooltip(h(NBaseIcon, {\n      clsPrefix: clsPrefix,\n      onClick: this.rotateClockwise\n    }, {\n      default: () => h(RotateClockwiseIcon, null)\n    }), 'tipClockwise');\n    const originalSizeNode = withTooltip(h(NBaseIcon, {\n      clsPrefix: clsPrefix,\n      onClick: this.resizeToOrignalImageSize\n    }, {\n      default: () => {\n        return h(ResizeSmallIcon, null);\n      }\n    }), 'tipOriginalSize');\n    const zoomOutNode = withTooltip(h(NBaseIcon, {\n      clsPrefix: clsPrefix,\n      onClick: this.zoomOut\n    }, {\n      default: () => h(ZoomOutIcon, null)\n    }), 'tipZoomOut');\n    const downloadNode = withTooltip(h(NBaseIcon, {\n      clsPrefix: clsPrefix,\n      onClick: this.handleDownloadClick\n    }, {\n      default: () => h(DownloadIcon, null)\n    }), 'tipDownload');\n    const closeNode = withTooltip(h(NBaseIcon, {\n      clsPrefix: clsPrefix,\n      onClick: this.toggleShow\n    }, {\n      default: renderCloseIcon\n    }), 'tipClose');\n    const zoomInNode = withTooltip(h(NBaseIcon, {\n      clsPrefix: clsPrefix,\n      onClick: this.zoomIn\n    }, {\n      default: () => h(ZoomInIcon, null)\n    }), 'tipZoomIn');\n    return h(Fragment, null, (_b = (_a = this.$slots).default) === null || _b === void 0 ? void 0 : _b.call(_a), h(LazyTeleport, {\n      show: this.show\n    }, {\n      default: () => {\n        var _a;\n        if (!(this.show || this.displayed)) {\n          return null;\n        }\n        (_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this);\n        return withDirectives(h(\"div\", {\n          class: [`${clsPrefix}-image-preview-container`, this.themeClass],\n          style: this.cssVars,\n          onWheel: this.handleWheel\n        }, h(Transition, {\n          name: \"fade-in-transition\",\n          appear: this.appear\n        }, {\n          default: () => this.show ? h(\"div\", {\n            class: `${clsPrefix}-image-preview-overlay`,\n            onClick: this.toggleShow\n          }) : null\n        }), this.showToolbar ? h(Transition, {\n          name: \"fade-in-transition\",\n          appear: this.appear\n        }, {\n          default: () => {\n            if (!this.show) return null;\n            return h(\"div\", {\n              class: `${clsPrefix}-image-preview-toolbar`\n            }, renderToolbar ? renderToolbar({\n              nodes: {\n                prev: prevNode,\n                next: nextNode,\n                rotateCounterclockwise: rotateCounterclockwiseNode,\n                rotateClockwise: rotateClockwiseNode,\n                resizeToOriginalSize: originalSizeNode,\n                zoomOut: zoomOutNode,\n                zoomIn: zoomInNode,\n                download: downloadNode,\n                close: closeNode\n              }\n            }) : h(Fragment, null, this.onPrev ? h(Fragment, null, prevNode, nextNode) : null, rotateCounterclockwiseNode, rotateClockwiseNode, originalSizeNode, zoomOutNode, zoomInNode, downloadNode, closeNode));\n          }\n        }) : null, h(Transition, {\n          name: \"fade-in-scale-up-transition\",\n          onAfterLeave: this.handleAfterLeave,\n          appear: this.appear,\n          // BUG:\n          // onEnter will be called twice, I don't know why\n          // Maybe it is a bug of vue\n          onEnter: this.syncTransformOrigin,\n          onBeforeLeave: this.syncTransformOrigin\n        }, {\n          default: () => {\n            const {\n              previewedImgProps = {}\n            } = this;\n            return withDirectives(h(\"div\", {\n              class: `${clsPrefix}-image-preview-wrapper`,\n              ref: \"previewWrapperRef\"\n            }, h(\"img\", Object.assign({}, previewedImgProps, {\n              draggable: false,\n              onMousedown: this.handlePreviewMousedown,\n              onDblclick: this.handlePreviewDblclick,\n              class: [`${clsPrefix}-image-preview`, previewedImgProps.class],\n              key: this.previewSrc,\n              src: this.previewSrc,\n              ref: \"previewRef\",\n              onDragstart: this.handleDragStart\n            }))), [[vShow, this.show]]);\n          }\n        })), [[zindexable, {\n          enabled: this.show\n        }]]);\n      }\n    }));\n  }\n});","import { createId } from 'seemly';\nimport { defineComponent, getCurrentInstance, h, provide, ref, toRef } from 'vue';\nimport { useConfig } from \"../../_mixins/index.mjs\";\nimport { createInjectionKey } from \"../../_utils/index.mjs\";\nimport NImagePreview from \"./ImagePreview.mjs\";\nimport { imagePreviewSharedProps } from \"./interface.mjs\";\nexport const imageGroupInjectionKey = createInjectionKey('n-image-group');\nexport const imageGroupProps = imagePreviewSharedProps;\nexport default defineComponent({\n  name: 'ImageGroup',\n  props: imageGroupProps,\n  setup(props) {\n    let currentSrc;\n    const {\n      mergedClsPrefixRef\n    } = useConfig(props);\n    const groupId = `c${createId()}`;\n    const vm = getCurrentInstance();\n    const previewInstRef = ref(null);\n    const setPreviewSrc = src => {\n      var _a;\n      currentSrc = src;\n      (_a = previewInstRef.value) === null || _a === void 0 ? void 0 : _a.setPreviewSrc(src);\n    };\n    function go(step) {\n      var _a, _b;\n      if (!(vm === null || vm === void 0 ? void 0 : vm.proxy)) return;\n      const container = vm.proxy.$el.parentElement;\n      // use dom api since we can't get the correct order before all children are rendered\n      const imgs = container.querySelectorAll(`[data-group-id=${groupId}]:not([data-error=true])`);\n      if (!imgs.length) return;\n      const index = Array.from(imgs).findIndex(img => img.dataset.previewSrc === currentSrc);\n      if (~index) {\n        setPreviewSrc(imgs[(index + step + imgs.length) % imgs.length].dataset.previewSrc);\n      } else {\n        setPreviewSrc(imgs[0].dataset.previewSrc);\n      }\n      if (step === 1) {\n        (_a = props.onPreviewNext) === null || _a === void 0 ? void 0 : _a.call(props);\n      } else {\n        (_b = props.onPreviewPrev) === null || _b === void 0 ? void 0 : _b.call(props);\n      }\n    }\n    provide(imageGroupInjectionKey, {\n      mergedClsPrefixRef,\n      setPreviewSrc,\n      setThumbnailEl: el => {\n        var _a;\n        (_a = previewInstRef.value) === null || _a === void 0 ? void 0 : _a.setThumbnailEl(el);\n      },\n      toggleShow: () => {\n        var _a;\n        (_a = previewInstRef.value) === null || _a === void 0 ? void 0 : _a.toggleShow();\n      },\n      groupId,\n      renderToolbarRef: toRef(props, 'renderToolbar')\n    });\n    return {\n      mergedClsPrefix: mergedClsPrefixRef,\n      previewInstRef,\n      next: () => {\n        go(1);\n      },\n      prev: () => {\n        go(-1);\n      }\n    };\n  },\n  render() {\n    return h(NImagePreview, {\n      theme: this.theme,\n      themeOverrides: this.themeOverrides,\n      clsPrefix: this.mergedClsPrefix,\n      ref: \"previewInstRef\",\n      onPrev: this.prev,\n      onNext: this.next,\n      showToolbar: this.showToolbar,\n      showToolbarTooltip: this.showToolbarTooltip,\n      renderToolbar: this.renderToolbar\n    }, this.$slots);\n  }\n});","import { defineComponent, h, inject, onBeforeUnmount, onMounted, provide, ref, toRef, watchEffect } from 'vue';\nimport { useConfig } from \"../../_mixins/index.mjs\";\nimport { resolveSlot } from \"../../_utils/index.mjs\";\nimport { isImageSupportNativeLazy } from \"../../_utils/env/is-native-lazy-load.mjs\";\nimport { imageGroupInjectionKey } from \"./ImageGroup.mjs\";\nimport NImagePreview from \"./ImagePreview.mjs\";\nimport { imageContextKey, imagePreviewSharedProps } from \"./interface.mjs\";\nimport { observeIntersection } from \"./utils.mjs\";\nexport const imageProps = Object.assign({\n  alt: String,\n  height: [String, Number],\n  imgProps: Object,\n  previewedImgProps: Object,\n  lazy: Boolean,\n  intersectionObserverOptions: Object,\n  objectFit: {\n    type: String,\n    default: 'fill'\n  },\n  previewSrc: String,\n  fallbackSrc: String,\n  width: [String, Number],\n  src: String,\n  previewDisabled: Boolean,\n  loadDescription: String,\n  onError: Function,\n  onLoad: Function\n}, imagePreviewSharedProps);\nexport default defineComponent({\n  name: 'Image',\n  props: imageProps,\n  slots: Object,\n  inheritAttrs: false,\n  setup(props) {\n    const imageRef = ref(null);\n    const showErrorRef = ref(false);\n    const previewInstRef = ref(null);\n    const imageGroupHandle = inject(imageGroupInjectionKey, null);\n    const {\n      mergedClsPrefixRef\n    } = imageGroupHandle || useConfig(props);\n    const exposedMethods = {\n      click: () => {\n        if (props.previewDisabled || showErrorRef.value) return;\n        const mergedPreviewSrc = props.previewSrc || props.src;\n        if (imageGroupHandle) {\n          imageGroupHandle.setPreviewSrc(mergedPreviewSrc);\n          imageGroupHandle.setThumbnailEl(imageRef.value);\n          imageGroupHandle.toggleShow();\n          return;\n        }\n        const {\n          value: previewInst\n        } = previewInstRef;\n        if (!previewInst) return;\n        previewInst.setPreviewSrc(mergedPreviewSrc);\n        previewInst.setThumbnailEl(imageRef.value);\n        previewInst.toggleShow();\n      }\n    };\n    const shouldStartLoadingRef = ref(!props.lazy);\n    onMounted(() => {\n      var _a;\n      (_a = imageRef.value) === null || _a === void 0 ? void 0 : _a.setAttribute('data-group-id', (imageGroupHandle === null || imageGroupHandle === void 0 ? void 0 : imageGroupHandle.groupId) || '');\n    });\n    onMounted(() => {\n      // Use IntersectionObserver if lazy and intersectionObserverOptions is set\n      if (props.lazy && props.intersectionObserverOptions) {\n        let unobserve;\n        const stopWatchHandle = watchEffect(() => {\n          unobserve === null || unobserve === void 0 ? void 0 : unobserve();\n          unobserve = undefined;\n          unobserve = observeIntersection(imageRef.value, props.intersectionObserverOptions, shouldStartLoadingRef);\n        });\n        onBeforeUnmount(() => {\n          stopWatchHandle();\n          unobserve === null || unobserve === void 0 ? void 0 : unobserve();\n        });\n      }\n    });\n    watchEffect(() => {\n      var _a;\n      void (props.src || ((_a = props.imgProps) === null || _a === void 0 ? void 0 : _a.src));\n      showErrorRef.value = false;\n    });\n    const loadedRef = ref(false);\n    provide(imageContextKey, {\n      previewedImgPropsRef: toRef(props, 'previewedImgProps')\n    });\n    return Object.assign({\n      mergedClsPrefix: mergedClsPrefixRef,\n      groupId: imageGroupHandle === null || imageGroupHandle === void 0 ? void 0 : imageGroupHandle.groupId,\n      previewInstRef,\n      imageRef,\n      showError: showErrorRef,\n      shouldStartLoading: shouldStartLoadingRef,\n      loaded: loadedRef,\n      mergedOnClick: e => {\n        var _a, _b;\n        exposedMethods.click();\n        (_b = (_a = props.imgProps) === null || _a === void 0 ? void 0 : _a.onClick) === null || _b === void 0 ? void 0 : _b.call(_a, e);\n      },\n      mergedOnError: e => {\n        if (!shouldStartLoadingRef.value) return;\n        showErrorRef.value = true;\n        const {\n          onError,\n          imgProps: {\n            onError: imgPropsOnError\n          } = {}\n        } = props;\n        onError === null || onError === void 0 ? void 0 : onError(e);\n        imgPropsOnError === null || imgPropsOnError === void 0 ? void 0 : imgPropsOnError(e);\n      },\n      mergedOnLoad: e => {\n        const {\n          onLoad,\n          imgProps: {\n            onLoad: imgPropsOnLoad\n          } = {}\n        } = props;\n        onLoad === null || onLoad === void 0 ? void 0 : onLoad(e);\n        imgPropsOnLoad === null || imgPropsOnLoad === void 0 ? void 0 : imgPropsOnLoad(e);\n        loadedRef.value = true;\n      }\n    }, exposedMethods);\n  },\n  render() {\n    var _a, _b;\n    const {\n      mergedClsPrefix,\n      imgProps = {},\n      loaded,\n      $attrs,\n      lazy\n    } = this;\n    const errorNode = resolveSlot(this.$slots.error, () => []);\n    const placeholderNode = (_b = (_a = this.$slots).placeholder) === null || _b === void 0 ? void 0 : _b.call(_a);\n    const loadSrc = this.src || imgProps.src;\n    const imgNode = this.showError && errorNode.length ? errorNode : h('img', Object.assign(Object.assign({}, imgProps), {\n      ref: 'imageRef',\n      width: this.width || imgProps.width,\n      height: this.height || imgProps.height,\n      src: this.showError ? this.fallbackSrc : lazy && this.intersectionObserverOptions ? this.shouldStartLoading ? loadSrc : undefined : loadSrc,\n      alt: this.alt || imgProps.alt,\n      'aria-label': this.alt || imgProps.alt,\n      onClick: this.mergedOnClick,\n      onError: this.mergedOnError,\n      onLoad: this.mergedOnLoad,\n      // If interseciton observer options is set, do not use native lazy\n      loading: isImageSupportNativeLazy && lazy && !this.intersectionObserverOptions ? 'lazy' : 'eager',\n      style: [imgProps.style || '', placeholderNode && !loaded ? {\n        height: '0',\n        width: '0',\n        visibility: 'hidden'\n      } : '', {\n        objectFit: this.objectFit\n      }],\n      'data-error': this.showError,\n      'data-preview-src': this.previewSrc || this.src\n    }));\n    return h(\"div\", Object.assign({}, $attrs, {\n      role: \"none\",\n      class: [$attrs.class, `${mergedClsPrefix}-image`, (this.previewDisabled || this.showError) && `${mergedClsPrefix}-image--preview-disabled`]\n    }), this.groupId ? imgNode : h(NImagePreview, {\n      theme: this.theme,\n      themeOverrides: this.themeOverrides,\n      clsPrefix: mergedClsPrefix,\n      ref: \"previewInstRef\",\n      showToolbar: this.showToolbar,\n      showToolbarTooltip: this.showToolbarTooltip,\n      renderToolbar: this.renderToolbar\n    }, {\n      default: () => imgNode\n    }), !loaded && placeholderNode);\n  }\n});","import { c, cB } from \"../../../_utils/cssr/index.mjs\";\nexport default c([cB('input-number-suffix', `\n display: inline-block;\n margin-right: 10px;\n `), cB('input-number-prefix', `\n display: inline-block;\n margin-left: 10px;\n `)]);","// string => string (expected, not implemented)\n// string => number (legacy)\nexport function parse(value) {\n  if (value === undefined || value === null || typeof value === 'string' && value.trim() === '') {\n    return null;\n  }\n  return Number(value);\n}\n// This function is created for `update-value-on-input` prop. When the prop is\n// true, the input value will update the value and <input />'s value at the same\n// time. So we need to make user's content won't be replaced by its parsed value\n// in some certain cases. For example '0.' should be parsed and replaced by '0',\n// '-0' should be parsed and replaced by '0', since user may input '-0.1' after.\nexport function isWipValue(value) {\n  return value.includes('.') && (/^(-)?\\d+.*(\\.|0)$/.test(value) || /^-?\\d*$/.test(value)) || value === '-' || value === '-0';\n}\n// string => boolean (expected, not implemented)\n// number => boolean (legacy)\nexport function validator(value) {\n  if (value === undefined || value === null) return true;\n  if (Number.isNaN(value)) return false;\n  return true;\n}\n// string => string (expected, not implemented)\n// number => string (legacy)\nexport function format(value, precision) {\n  if (typeof value !== 'number') return '';\n  return precision === undefined ? String(value) : value.toFixed(precision);\n}\nexport function parseNumber(number) {\n  if (number === null) return null;\n  if (typeof number === 'number') {\n    return number;\n  } else {\n    const parsedNumber = Number(number);\n    if (Number.isNaN(parsedNumber)) {\n      return null;\n    } else {\n      return parsedNumber;\n    }\n  }\n}","import { on } from 'evtd';\nimport { rgba } from 'seemly';\nimport { useMemo, useMergedState } from 'vooks';\nimport { computed, defineComponent, h, nextTick, ref, toRef, watch, watchEffect } from 'vue';\nimport { NBaseIcon } from \"../../_internal/index.mjs\";\nimport { AddIcon, RemoveIcon } from \"../../_internal/icons/index.mjs\";\nimport { useConfig, useFormItem, useLocale, useTheme } from \"../../_mixins/index.mjs\";\nimport { useRtl } from \"../../_mixins/use-rtl.mjs\";\nimport { call, resolveSlot, resolveWrappedSlot, warnOnce } from \"../../_utils/index.mjs\";\nimport { NxButton } from \"../../button/index.mjs\";\nimport { NInput } from \"../../input/index.mjs\";\nimport { inputNumberLight } from \"../styles/index.mjs\";\nimport style from \"./styles/input-number.cssr.mjs\";\nimport { format, isWipValue, parse, parseNumber, validator } from \"./utils.mjs\";\nconst HOLDING_CHANGE_THRESHOLD = 800;\nconst HOLDING_CHANGE_INTERVAL = 100;\nexport const inputNumberProps = Object.assign(Object.assign({}, useTheme.props), {\n  autofocus: Boolean,\n  loading: {\n    type: Boolean,\n    default: undefined\n  },\n  placeholder: String,\n  defaultValue: {\n    type: Number,\n    default: null\n  },\n  value: Number,\n  step: {\n    type: [Number, String],\n    default: 1\n  },\n  min: [Number, String],\n  max: [Number, String],\n  size: String,\n  disabled: {\n    type: Boolean,\n    default: undefined\n  },\n  validator: Function,\n  bordered: {\n    type: Boolean,\n    default: undefined\n  },\n  showButton: {\n    type: Boolean,\n    default: true\n  },\n  buttonPlacement: {\n    type: String,\n    default: 'right'\n  },\n  inputProps: Object,\n  readonly: Boolean,\n  clearable: Boolean,\n  keyboard: {\n    type: Object,\n    default: {}\n  },\n  updateValueOnInput: {\n    type: Boolean,\n    default: true\n  },\n  round: {\n    type: Boolean,\n    default: undefined\n  },\n  parse: Function,\n  format: Function,\n  precision: Number,\n  status: String,\n  'onUpdate:value': [Function, Array],\n  onUpdateValue: [Function, Array],\n  onFocus: [Function, Array],\n  onBlur: [Function, Array],\n  onClear: [Function, Array],\n  // deprecated\n  onChange: [Function, Array]\n});\nexport default defineComponent({\n  name: 'InputNumber',\n  props: inputNumberProps,\n  slots: Object,\n  setup(props) {\n    if (process.env.NODE_ENV !== 'production') {\n      watchEffect(() => {\n        if (props.onChange !== undefined) {\n          warnOnce('input-number', '`on-change` is deprecated, please use `on-update:value` instead');\n        }\n      });\n    }\n    const {\n      mergedBorderedRef,\n      mergedClsPrefixRef,\n      mergedRtlRef\n    } = useConfig(props);\n    const themeRef = useTheme('InputNumber', '-input-number', style, inputNumberLight, props, mergedClsPrefixRef);\n    const {\n      localeRef\n    } = useLocale('InputNumber');\n    const formItem = useFormItem(props);\n    const {\n      mergedSizeRef,\n      mergedDisabledRef,\n      mergedStatusRef\n    } = formItem;\n    // dom ref\n    const inputInstRef = ref(null);\n    const minusButtonInstRef = ref(null);\n    const addButtonInstRef = ref(null);\n    // value\n    const uncontrolledValueRef = ref(props.defaultValue);\n    const controlledValueRef = toRef(props, 'value');\n    const mergedValueRef = useMergedState(controlledValueRef, uncontrolledValueRef);\n    const displayedValueRef = ref('');\n    const getPrecision = value => {\n      const fraction = String(value).split('.')[1];\n      return fraction ? fraction.length : 0;\n    };\n    const getMaxPrecision = currentValue => {\n      const precisions = [props.min, props.max, props.step, currentValue].map(value => {\n        if (value === undefined) return 0;\n        return getPrecision(value);\n      });\n      return Math.max(...precisions);\n    };\n    const mergedPlaceholderRef = useMemo(() => {\n      const {\n        placeholder\n      } = props;\n      if (placeholder !== undefined) return placeholder;\n      return localeRef.value.placeholder;\n    });\n    const mergedStepRef = useMemo(() => {\n      const parsedNumber = parseNumber(props.step);\n      if (parsedNumber !== null) {\n        return parsedNumber === 0 ? 1 : Math.abs(parsedNumber);\n      }\n      return 1;\n    });\n    const mergedMinRef = useMemo(() => {\n      const parsedNumber = parseNumber(props.min);\n      if (parsedNumber !== null) return parsedNumber;else return null;\n    });\n    const mergedMaxRef = useMemo(() => {\n      const parsedNumber = parseNumber(props.max);\n      if (parsedNumber !== null) return parsedNumber;else return null;\n    });\n    const deriveDisplayedValueFromValue = () => {\n      const {\n        value: mergedValue\n      } = mergedValueRef;\n      if (validator(mergedValue)) {\n        const {\n          format: formatProp,\n          precision\n        } = props;\n        if (formatProp) {\n          displayedValueRef.value = formatProp(mergedValue);\n        } else {\n          if (mergedValue === null || precision === undefined\n          // precision overflow\n          || getPrecision(mergedValue) > precision) {\n            displayedValueRef.value = format(mergedValue, undefined);\n          } else {\n            displayedValueRef.value = format(mergedValue, precision);\n          }\n        }\n      } else {\n        // null can pass the validator check\n        // so mergedValue is a number\n        displayedValueRef.value = String(mergedValue);\n      }\n    };\n    deriveDisplayedValueFromValue();\n    const doUpdateValue = value => {\n      const {\n        value: mergedValue\n      } = mergedValueRef;\n      if (value === mergedValue) {\n        deriveDisplayedValueFromValue();\n        return;\n      }\n      const {\n        'onUpdate:value': _onUpdateValue,\n        onUpdateValue,\n        onChange\n      } = props;\n      const {\n        nTriggerFormInput,\n        nTriggerFormChange\n      } = formItem;\n      if (onChange) call(onChange, value);\n      if (onUpdateValue) call(onUpdateValue, value);\n      if (_onUpdateValue) call(_onUpdateValue, value);\n      uncontrolledValueRef.value = value;\n      nTriggerFormInput();\n      nTriggerFormChange();\n    };\n    const deriveValueFromDisplayedValue = ({\n      offset,\n      doUpdateIfValid,\n      fixPrecision,\n      isInputing\n    }) => {\n      const {\n        value: displayedValue\n      } = displayedValueRef;\n      if (isInputing && isWipValue(displayedValue)) {\n        return false;\n      }\n      const parsedValue = (props.parse || parse)(displayedValue);\n      if (parsedValue === null) {\n        if (doUpdateIfValid) doUpdateValue(null);\n        return null;\n      }\n      if (validator(parsedValue)) {\n        const currentPrecision = getPrecision(parsedValue);\n        const {\n          precision\n        } = props;\n        if (precision !== undefined && precision < currentPrecision && !fixPrecision) {\n          return false;\n        }\n        let nextValue = Number.parseFloat((parsedValue + offset).toFixed(precision !== null && precision !== void 0 ? precision : getMaxPrecision(parsedValue)));\n        if (validator(nextValue)) {\n          const {\n            value: mergedMax\n          } = mergedMaxRef;\n          const {\n            value: mergedMin\n          } = mergedMinRef;\n          if (mergedMax !== null && nextValue > mergedMax) {\n            if (!doUpdateIfValid || isInputing) return false;\n            // if doUpdateIfValid=true, we try to make it a valid value\n            nextValue = mergedMax;\n          }\n          if (mergedMin !== null && nextValue < mergedMin) {\n            if (!doUpdateIfValid || isInputing) return false;\n            // if doUpdateIfValid=true, we try to make it a valid value\n            nextValue = mergedMin;\n          }\n          if (props.validator && !props.validator(nextValue)) return false;\n          if (doUpdateIfValid) doUpdateValue(nextValue);\n          return nextValue;\n        }\n      }\n      return false;\n    };\n    const displayedValueInvalidRef = useMemo(() => {\n      const derivedValue = deriveValueFromDisplayedValue({\n        offset: 0,\n        doUpdateIfValid: false,\n        isInputing: false,\n        fixPrecision: false\n      });\n      return derivedValue === false;\n    });\n    const minusableRef = useMemo(() => {\n      const {\n        value: mergedValue\n      } = mergedValueRef;\n      if (props.validator && mergedValue === null) {\n        return false;\n      }\n      const {\n        value: mergedStep\n      } = mergedStepRef;\n      const derivedNextValue = deriveValueFromDisplayedValue({\n        offset: -mergedStep,\n        doUpdateIfValid: false,\n        isInputing: false,\n        fixPrecision: false\n      });\n      return derivedNextValue !== false;\n    });\n    const addableRef = useMemo(() => {\n      const {\n        value: mergedValue\n      } = mergedValueRef;\n      if (props.validator && mergedValue === null) {\n        return false;\n      }\n      const {\n        value: mergedStep\n      } = mergedStepRef;\n      const derivedNextValue = deriveValueFromDisplayedValue({\n        offset: +mergedStep,\n        doUpdateIfValid: false,\n        isInputing: false,\n        fixPrecision: false\n      });\n      return derivedNextValue !== false;\n    });\n    function doFocus(e) {\n      const {\n        onFocus\n      } = props;\n      const {\n        nTriggerFormFocus\n      } = formItem;\n      if (onFocus) call(onFocus, e);\n      nTriggerFormFocus();\n    }\n    function doBlur(e) {\n      var _a, _b;\n      if (e.target === ((_a = inputInstRef.value) === null || _a === void 0 ? void 0 : _a.wrapperElRef)) {\n        // hit input wrapper\n        // which means not activated\n        return;\n      }\n      const value = deriveValueFromDisplayedValue({\n        offset: 0,\n        doUpdateIfValid: true,\n        isInputing: false,\n        fixPrecision: true\n      });\n      // If valid, update event has been emitted\n      // make sure e.target.value is correct in blur callback\n      if (value !== false) {\n        const inputElRef = (_b = inputInstRef.value) === null || _b === void 0 ? void 0 : _b.inputElRef;\n        if (inputElRef) {\n          inputElRef.value = String(value || '');\n        }\n        // If value is not changed, the displayed value may be greater than or\n        // less than the current value. The derived value is reformatted so the\n        // value is not changed. We can simply derive a new displayed value\n        if (mergedValueRef.value === value) {\n          deriveDisplayedValueFromValue();\n        }\n      } else {\n        // If not valid, nothing will be emitted, so derive displayed value from\n        // origin value\n        deriveDisplayedValueFromValue();\n      }\n      const {\n        onBlur\n      } = props;\n      const {\n        nTriggerFormBlur\n      } = formItem;\n      if (onBlur) call(onBlur, e);\n      nTriggerFormBlur();\n      // User may change value in blur callback, we make sure it will be\n      // displayed. Sometimes mergedValue won't be viewed as changed\n      void nextTick(() => {\n        deriveDisplayedValueFromValue();\n      });\n    }\n    function doClear(e) {\n      const {\n        onClear\n      } = props;\n      if (onClear) call(onClear, e);\n    }\n    function doAdd() {\n      const {\n        value: addable\n      } = addableRef;\n      if (!addable) {\n        clearAddHoldTimeout();\n        return;\n      }\n      const {\n        value: mergedValue\n      } = mergedValueRef;\n      if (mergedValue === null) {\n        if (!props.validator) {\n          doUpdateValue(createValidValue());\n        }\n      } else {\n        const {\n          value: mergedStep\n        } = mergedStepRef;\n        deriveValueFromDisplayedValue({\n          offset: mergedStep,\n          doUpdateIfValid: true,\n          isInputing: false,\n          fixPrecision: true\n        });\n      }\n    }\n    function doMinus() {\n      const {\n        value: minusable\n      } = minusableRef;\n      if (!minusable) {\n        clearMinusHoldTimeout();\n        return;\n      }\n      const {\n        value: mergedValue\n      } = mergedValueRef;\n      if (mergedValue === null) {\n        if (!props.validator) {\n          doUpdateValue(createValidValue());\n        }\n      } else {\n        const {\n          value: mergedStep\n        } = mergedStepRef;\n        deriveValueFromDisplayedValue({\n          offset: -mergedStep,\n          doUpdateIfValid: true,\n          isInputing: false,\n          fixPrecision: true\n        });\n      }\n    }\n    const handleFocus = doFocus;\n    const handleBlur = doBlur;\n    function createValidValue() {\n      if (props.validator) return null;\n      const {\n        value: mergedMin\n      } = mergedMinRef;\n      const {\n        value: mergedMax\n      } = mergedMaxRef;\n      if (mergedMin !== null) {\n        return Math.max(0, mergedMin);\n      } else if (mergedMax !== null) {\n        return Math.min(0, mergedMax);\n      } else {\n        return 0;\n      }\n    }\n    function handleClear(e) {\n      doClear(e);\n      doUpdateValue(null);\n    }\n    function handleMouseDown(e) {\n      var _a, _b, _c;\n      if ((_a = addButtonInstRef.value) === null || _a === void 0 ? void 0 : _a.$el.contains(e.target)) {\n        e.preventDefault();\n      }\n      if ((_b = minusButtonInstRef.value) === null || _b === void 0 ? void 0 : _b.$el.contains(e.target)) {\n        e.preventDefault();\n      }\n      (_c = inputInstRef.value) === null || _c === void 0 ? void 0 : _c.activate();\n    }\n    let minusHoldStateIntervalId = null;\n    let addHoldStateIntervalId = null;\n    let firstMinusMousedownId = null;\n    function clearMinusHoldTimeout() {\n      if (firstMinusMousedownId) {\n        window.clearTimeout(firstMinusMousedownId);\n        firstMinusMousedownId = null;\n      }\n      if (minusHoldStateIntervalId) {\n        window.clearInterval(minusHoldStateIntervalId);\n        minusHoldStateIntervalId = null;\n      }\n    }\n    let firstAddMousedownId = null;\n    function clearAddHoldTimeout() {\n      if (firstAddMousedownId) {\n        window.clearTimeout(firstAddMousedownId);\n        firstAddMousedownId = null;\n      }\n      if (addHoldStateIntervalId) {\n        window.clearInterval(addHoldStateIntervalId);\n        addHoldStateIntervalId = null;\n      }\n    }\n    function handleMinusMousedown() {\n      clearMinusHoldTimeout();\n      firstMinusMousedownId = window.setTimeout(() => {\n        minusHoldStateIntervalId = window.setInterval(() => {\n          doMinus();\n        }, HOLDING_CHANGE_INTERVAL);\n      }, HOLDING_CHANGE_THRESHOLD);\n      on('mouseup', document, clearMinusHoldTimeout, {\n        once: true\n      });\n    }\n    function handleAddMousedown() {\n      clearAddHoldTimeout();\n      firstAddMousedownId = window.setTimeout(() => {\n        addHoldStateIntervalId = window.setInterval(() => {\n          doAdd();\n        }, HOLDING_CHANGE_INTERVAL);\n      }, HOLDING_CHANGE_THRESHOLD);\n      on('mouseup', document, clearAddHoldTimeout, {\n        once: true\n      });\n    }\n    const handleAddClick = () => {\n      if (addHoldStateIntervalId) return;\n      doAdd();\n    };\n    const handleMinusClick = () => {\n      if (minusHoldStateIntervalId) return;\n      doMinus();\n    };\n    function handleKeyDown(e) {\n      var _a, _b;\n      if (e.key === 'Enter') {\n        if (e.target === ((_a = inputInstRef.value) === null || _a === void 0 ? void 0 : _a.wrapperElRef)) {\n          // hit input wrapper\n          // which means not activated\n          return;\n        }\n        const value = deriveValueFromDisplayedValue({\n          offset: 0,\n          doUpdateIfValid: true,\n          isInputing: false,\n          fixPrecision: true\n        });\n        if (value !== false) {\n          (_b = inputInstRef.value) === null || _b === void 0 ? void 0 : _b.deactivate();\n        }\n      } else if (e.key === 'ArrowUp') {\n        if (!addableRef.value) return;\n        if (props.keyboard.ArrowUp === false) return;\n        e.preventDefault();\n        const value = deriveValueFromDisplayedValue({\n          offset: 0,\n          doUpdateIfValid: true,\n          isInputing: false,\n          fixPrecision: true\n        });\n        if (value !== false) {\n          doAdd();\n        }\n      } else if (e.key === 'ArrowDown') {\n        if (!minusableRef.value) return;\n        if (props.keyboard.ArrowDown === false) return;\n        e.preventDefault();\n        const value = deriveValueFromDisplayedValue({\n          offset: 0,\n          doUpdateIfValid: true,\n          isInputing: false,\n          fixPrecision: true\n        });\n        if (value !== false) {\n          doMinus();\n        }\n      }\n    }\n    function handleUpdateDisplayedValue(value) {\n      displayedValueRef.value = value;\n      if (props.updateValueOnInput && !props.format && !props.parse && props.precision === undefined) {\n        deriveValueFromDisplayedValue({\n          offset: 0,\n          doUpdateIfValid: true,\n          isInputing: true,\n          fixPrecision: false\n        });\n      }\n    }\n    watch(mergedValueRef, () => {\n      deriveDisplayedValueFromValue();\n    });\n    const exposedMethods = {\n      focus: () => {\n        var _a;\n        return (_a = inputInstRef.value) === null || _a === void 0 ? void 0 : _a.focus();\n      },\n      blur: () => {\n        var _a;\n        return (_a = inputInstRef.value) === null || _a === void 0 ? void 0 : _a.blur();\n      },\n      select: () => {\n        var _a;\n        return (_a = inputInstRef.value) === null || _a === void 0 ? void 0 : _a.select();\n      }\n    };\n    const rtlEnabledRef = useRtl('InputNumber', mergedRtlRef, mergedClsPrefixRef);\n    return Object.assign(Object.assign({}, exposedMethods), {\n      rtlEnabled: rtlEnabledRef,\n      inputInstRef,\n      minusButtonInstRef,\n      addButtonInstRef,\n      mergedClsPrefix: mergedClsPrefixRef,\n      mergedBordered: mergedBorderedRef,\n      uncontrolledValue: uncontrolledValueRef,\n      mergedValue: mergedValueRef,\n      mergedPlaceholder: mergedPlaceholderRef,\n      displayedValueInvalid: displayedValueInvalidRef,\n      mergedSize: mergedSizeRef,\n      mergedDisabled: mergedDisabledRef,\n      displayedValue: displayedValueRef,\n      addable: addableRef,\n      minusable: minusableRef,\n      mergedStatus: mergedStatusRef,\n      handleFocus,\n      handleBlur,\n      handleClear,\n      handleMouseDown,\n      handleAddClick,\n      handleMinusClick,\n      handleAddMousedown,\n      handleMinusMousedown,\n      handleKeyDown,\n      handleUpdateDisplayedValue,\n      // theme\n      mergedTheme: themeRef,\n      inputThemeOverrides: {\n        paddingSmall: '0 8px 0 10px',\n        paddingMedium: '0 8px 0 12px',\n        paddingLarge: '0 8px 0 14px'\n      },\n      buttonThemeOverrides: computed(() => {\n        const {\n          self: {\n            iconColorDisabled\n          }\n        } = themeRef.value;\n        const [r, g, b, a] = rgba(iconColorDisabled);\n        return {\n          textColorTextDisabled: `rgb(${r}, ${g}, ${b})`,\n          opacityDisabled: `${a}`\n        };\n      })\n    });\n  },\n  render() {\n    const {\n      mergedClsPrefix,\n      $slots\n    } = this;\n    const renderMinusButton = () => {\n      return h(NxButton, {\n        text: true,\n        disabled: !this.minusable || this.mergedDisabled || this.readonly,\n        focusable: false,\n        theme: this.mergedTheme.peers.Button,\n        themeOverrides: this.mergedTheme.peerOverrides.Button,\n        builtinThemeOverrides: this.buttonThemeOverrides,\n        onClick: this.handleMinusClick,\n        onMousedown: this.handleMinusMousedown,\n        ref: \"minusButtonInstRef\"\n      }, {\n        icon: () => resolveSlot($slots['minus-icon'], () => [h(NBaseIcon, {\n          clsPrefix: mergedClsPrefix\n        }, {\n          default: () => h(RemoveIcon, null)\n        })])\n      });\n    };\n    const renderAddButton = () => {\n      return h(NxButton, {\n        text: true,\n        disabled: !this.addable || this.mergedDisabled || this.readonly,\n        focusable: false,\n        theme: this.mergedTheme.peers.Button,\n        themeOverrides: this.mergedTheme.peerOverrides.Button,\n        builtinThemeOverrides: this.buttonThemeOverrides,\n        onClick: this.handleAddClick,\n        onMousedown: this.handleAddMousedown,\n        ref: \"addButtonInstRef\"\n      }, {\n        icon: () => resolveSlot($slots['add-icon'], () => [h(NBaseIcon, {\n          clsPrefix: mergedClsPrefix\n        }, {\n          default: () => h(AddIcon, null)\n        })])\n      });\n    };\n    return h(\"div\", {\n      class: [`${mergedClsPrefix}-input-number`, this.rtlEnabled && `${mergedClsPrefix}-input-number--rtl`]\n    }, h(NInput, {\n      ref: \"inputInstRef\",\n      autofocus: this.autofocus,\n      status: this.mergedStatus,\n      bordered: this.mergedBordered,\n      loading: this.loading,\n      value: this.displayedValue,\n      onUpdateValue: this.handleUpdateDisplayedValue,\n      theme: this.mergedTheme.peers.Input,\n      themeOverrides: this.mergedTheme.peerOverrides.Input,\n      builtinThemeOverrides: this.inputThemeOverrides,\n      size: this.mergedSize,\n      placeholder: this.mergedPlaceholder,\n      disabled: this.mergedDisabled,\n      readonly: this.readonly,\n      round: this.round,\n      textDecoration: this.displayedValueInvalid ? 'line-through' : undefined,\n      onFocus: this.handleFocus,\n      onBlur: this.handleBlur,\n      onKeydown: this.handleKeyDown,\n      onMousedown: this.handleMouseDown,\n      onClear: this.handleClear,\n      clearable: this.clearable,\n      inputProps: this.inputProps,\n      internalLoadingBeforeSuffix: true\n    }, {\n      prefix: () => {\n        var _a;\n        return this.showButton && this.buttonPlacement === 'both' ? [renderMinusButton(), resolveWrappedSlot($slots.prefix, children => {\n          if (children) {\n            return h(\"span\", {\n              class: `${mergedClsPrefix}-input-number-prefix`\n            }, children);\n          }\n          return null;\n        })] : (_a = $slots.prefix) === null || _a === void 0 ? void 0 : _a.call($slots);\n      },\n      suffix: () => {\n        var _a;\n        return this.showButton ? [resolveWrappedSlot($slots.suffix, children => {\n          if (children) {\n            return h(\"span\", {\n              class: `${mergedClsPrefix}-input-number-suffix`\n            }, children);\n          }\n          return null;\n        }), this.buttonPlacement === 'right' ? renderMinusButton() : null, renderAddButton()] : (_a = $slots.suffix) === null || _a === void 0 ? void 0 : _a.call($slots);\n      }\n    }));\n  }\n});","import { createInjectionKey } from \"../../_utils/index.mjs\";\nexport const layoutSiderInjectionKey = createInjectionKey('n-layout-sider');\nexport const positionProp = {\n  type: String,\n  default: 'static'\n};","export default {\n  extraFontSize: '12px',\n  width: '440px'\n};","import { scrollbarDark } from \"../../_internal/scrollbar/styles/index.mjs\";\nimport { commonDark } from \"../../_styles/common/index.mjs\";\nimport { buttonDark } from \"../../button/styles/index.mjs\";\nimport { checkboxDark } from \"../../checkbox/styles/index.mjs\";\nimport { emptyDark } from \"../../empty/styles/index.mjs\";\nimport { inputDark } from \"../../input/styles/index.mjs\";\nimport commonVariables from \"./_common.mjs\";\nconst transferDark = {\n  name: 'Transfer',\n  common: commonDark,\n  peers: {\n    Checkbox: checkboxDark,\n    Scrollbar: scrollbarDark,\n    Input: inputDark,\n    Empty: emptyDark,\n    Button: buttonDark\n  },\n  self(vars) {\n    const {\n      iconColorDisabled,\n      iconColor,\n      fontWeight,\n      fontSizeLarge,\n      fontSizeMedium,\n      fontSizeSmall,\n      heightLarge,\n      heightMedium,\n      heightSmall,\n      borderRadius,\n      inputColor,\n      tableHeaderColor,\n      textColor1,\n      textColorDisabled,\n      textColor2,\n      hoverColor\n    } = vars;\n    return Object.assign(Object.assign({}, commonVariables), {\n      itemHeightSmall: heightSmall,\n      itemHeightMedium: heightMedium,\n      itemHeightLarge: heightLarge,\n      fontSizeSmall,\n      fontSizeMedium,\n      fontSizeLarge,\n      borderRadius,\n      borderColor: '#0000',\n      listColor: inputColor,\n      headerColor: tableHeaderColor,\n      titleTextColor: textColor1,\n      titleTextColorDisabled: textColorDisabled,\n      extraTextColor: textColor2,\n      filterDividerColor: '#0000',\n      itemTextColor: textColor2,\n      itemTextColorDisabled: textColorDisabled,\n      itemColorPending: hoverColor,\n      titleFontWeight: fontWeight,\n      iconColor,\n      iconColorDisabled\n    });\n  }\n};\nexport default transferDark;","import { commonLight } from \"../../_styles/common/index.mjs\";\nexport function self() {\n  return {};\n}\nconst marqueeLight = {\n  name: 'Marquee',\n  common: commonLight,\n  self\n};\nexport default marqueeLight;","import { commonDark } from \"../../_styles/common/index.mjs\";\nimport { self } from \"./light.mjs\";\nconst marqueeDark = {\n  name: 'Marquee',\n  common: commonDark,\n  self\n};\nexport default marqueeDark;","import { createInjectionKey } from \"../../_utils/index.mjs\";\nexport const menuInjectionKey = createInjectionKey('n-menu');\nexport const submenuInjectionKey = createInjectionKey('n-submenu');\nexport const menuItemGroupInjectionKey = createInjectionKey('n-menu-item-group');","import { fadeInHeightExpandTransition } from \"../../../_styles/transitions/fade-in-height-expand.cssr.mjs\";\nimport { c, cB, cE, cM, cNotM } from \"../../../_utils/cssr/index.mjs\";\nconst hoverStyleChildren = [c('&::before', 'background-color: var(--n-item-color-hover);'), cE('arrow', `\n color: var(--n-arrow-color-hover);\n `), cE('icon', `\n color: var(--n-item-icon-color-hover);\n `), cB('menu-item-content-header', `\n color: var(--n-item-text-color-hover);\n `, [c('a', `\n color: var(--n-item-text-color-hover);\n `), cE('extra', `\n color: var(--n-item-text-color-hover);\n `)])];\nconst horizontalHoverStyleChildren = [cE('icon', `\n color: var(--n-item-icon-color-hover-horizontal);\n `), cB('menu-item-content-header', `\n color: var(--n-item-text-color-hover-horizontal);\n `, [c('a', `\n color: var(--n-item-text-color-hover-horizontal);\n `), cE('extra', `\n color: var(--n-item-text-color-hover-horizontal);\n `)])];\n// vars:\n// --n-color\n// --n-group-text-color\n// --n-bezier\n// --n-font-size\n// --n-border-color-horizontal\n// --n-border-radius\n// --n-item-color-hover\n// --n-item-color-active\n// --n-item-color-active-hover\n// --n-item-color-active-collapsed\n// --n-arrow-color\n// --n-arrow-color-hover\n// --n-arrow-color-active\n// --n-arrow-color-active-hover\n// --n-arrow-color-child-active\n// --n-arrow-color-child-active-hover\n// --n-item-text-color\n// --n-item-text-color-hover\n// --n-item-text-color-active\n// --n-item-text-color-active-hover\n// --n-item-text-color-child-active\n// --n-item-text-color-child-active-hover\n// --n-item-text-color-horizontal\n// --n-item-text-color-hover-horizontal\n// --n-item-text-color-active-horizontal\n// --n-item-text-color-active-hover-horizontal\n// --n-item-text-color-child-active-horizontal\n// --n-item-text-color-child-active-hover-horizontal\n// --n-item-icon-color\n// --n-item-icon-color-hover\n// --n-item-icon-color-active\n// --n-item-icon-color-active-hover\n// --n-item-icon-color-child-active\n// --n-item-icon-color-child-active-hover\n// --n-item-icon-color-collapsed\n// --n-item-icon-color-horizontal\n// --n-item-icon-color-hover-horizontal\n// --n-item-icon-color-active-horizontal\n// --n-item-icon-color-active-hover-horizontal\n// --n-item-icon-color-child-active-horizontal\n// --n-item-icon-color-child-active-hover-horizontal\n// --n-item-height\nexport default c([cB('menu', `\n background-color: var(--n-color);\n color: var(--n-item-text-color);\n overflow: hidden;\n transition: background-color .3s var(--n-bezier);\n box-sizing: border-box;\n font-size: var(--n-font-size);\n padding-bottom: 6px;\n `, [cM('horizontal', `\n max-width: 100%;\n width: 100%;\n display: flex;\n overflow: hidden;\n padding-bottom: 0;\n `, [cB('submenu', 'margin: 0;'), cB('menu-item', 'margin: 0;'), cB('menu-item-content', `\n padding: 0 20px;\n border-bottom: 2px solid #0000;\n `, [c('&::before', 'display: none;'), cM('selected', 'border-bottom: 2px solid var(--n-border-color-horizontal)')]), cB('menu-item-content', [cM('selected', [cE('icon', 'color: var(--n-item-icon-color-active-horizontal);'), cB('menu-item-content-header', `\n color: var(--n-item-text-color-active-horizontal);\n `, [c('a', 'color: var(--n-item-text-color-active-horizontal);'), cE('extra', 'color: var(--n-item-text-color-active-horizontal);')])]), cM('child-active', `\n border-bottom: 2px solid var(--n-border-color-horizontal);\n `, [cB('menu-item-content-header', `\n color: var(--n-item-text-color-child-active-horizontal);\n `, [c('a', `\n color: var(--n-item-text-color-child-active-horizontal);\n `), cE('extra', `\n color: var(--n-item-text-color-child-active-horizontal);\n `)]), cE('icon', `\n color: var(--n-item-icon-color-child-active-horizontal);\n `)]), cNotM('disabled', [cNotM('selected, child-active', [c('&:focus-within', horizontalHoverStyleChildren)]), cM('selected', [hoverStyle(null, [cE('icon', 'color: var(--n-item-icon-color-active-hover-horizontal);'), cB('menu-item-content-header', `\n color: var(--n-item-text-color-active-hover-horizontal);\n `, [c('a', 'color: var(--n-item-text-color-active-hover-horizontal);'), cE('extra', 'color: var(--n-item-text-color-active-hover-horizontal);')])])]), cM('child-active', [hoverStyle(null, [cE('icon', 'color: var(--n-item-icon-color-child-active-hover-horizontal);'), cB('menu-item-content-header', `\n color: var(--n-item-text-color-child-active-hover-horizontal);\n `, [c('a', 'color: var(--n-item-text-color-child-active-hover-horizontal);'), cE('extra', 'color: var(--n-item-text-color-child-active-hover-horizontal);')])])]), hoverStyle('border-bottom: 2px solid var(--n-border-color-horizontal);', horizontalHoverStyleChildren)]), cB('menu-item-content-header', [c('a', 'color: var(--n-item-text-color-horizontal);')])])]), cNotM('responsive', [cB('menu-item-content-header', `\n overflow: hidden;\n text-overflow: ellipsis;\n `)]), cM('collapsed', [cB('menu-item-content', [cM('selected', [c('&::before', `\n background-color: var(--n-item-color-active-collapsed) !important;\n `)]), cB('menu-item-content-header', 'opacity: 0;'), cE('arrow', 'opacity: 0;'), cE('icon', 'color: var(--n-item-icon-color-collapsed);')])]), cB('menu-item', `\n height: var(--n-item-height);\n margin-top: 6px;\n position: relative;\n `), cB('menu-item-content', `\n box-sizing: border-box;\n line-height: 1.75;\n height: 100%;\n display: grid;\n grid-template-areas: \"icon content arrow\";\n grid-template-columns: auto 1fr auto;\n align-items: center;\n cursor: pointer;\n position: relative;\n padding-right: 18px;\n transition:\n background-color .3s var(--n-bezier),\n padding-left .3s var(--n-bezier),\n border-color .3s var(--n-bezier);\n `, [c('> *', 'z-index: 1;'), c('&::before', `\n z-index: auto;\n content: \"\";\n background-color: #0000;\n position: absolute;\n left: 8px;\n right: 8px;\n top: 0;\n bottom: 0;\n pointer-events: none;\n border-radius: var(--n-border-radius);\n transition: background-color .3s var(--n-bezier);\n `), cM('disabled', `\n opacity: .45;\n cursor: not-allowed;\n `), cM('collapsed', [cE('arrow', 'transform: rotate(0);')]), cM('selected', [c('&::before', 'background-color: var(--n-item-color-active);'), cE('arrow', 'color: var(--n-arrow-color-active);'), cE('icon', 'color: var(--n-item-icon-color-active);'), cB('menu-item-content-header', `\n color: var(--n-item-text-color-active);\n `, [c('a', 'color: var(--n-item-text-color-active);'), cE('extra', 'color: var(--n-item-text-color-active);')])]), cM('child-active', [cB('menu-item-content-header', `\n color: var(--n-item-text-color-child-active);\n `, [c('a', `\n color: var(--n-item-text-color-child-active);\n `), cE('extra', `\n color: var(--n-item-text-color-child-active);\n `)]), cE('arrow', `\n color: var(--n-arrow-color-child-active);\n `), cE('icon', `\n color: var(--n-item-icon-color-child-active);\n `)]), cNotM('disabled', [cNotM('selected, child-active', [c('&:focus-within', hoverStyleChildren)]), cM('selected', [hoverStyle(null, [cE('arrow', 'color: var(--n-arrow-color-active-hover);'), cE('icon', 'color: var(--n-item-icon-color-active-hover);'), cB('menu-item-content-header', `\n color: var(--n-item-text-color-active-hover);\n `, [c('a', 'color: var(--n-item-text-color-active-hover);'), cE('extra', 'color: var(--n-item-text-color-active-hover);')])])]), cM('child-active', [hoverStyle(null, [cE('arrow', 'color: var(--n-arrow-color-child-active-hover);'), cE('icon', 'color: var(--n-item-icon-color-child-active-hover);'), cB('menu-item-content-header', `\n color: var(--n-item-text-color-child-active-hover);\n `, [c('a', 'color: var(--n-item-text-color-child-active-hover);'), cE('extra', 'color: var(--n-item-text-color-child-active-hover);')])])]), cM('selected', [hoverStyle(null, [c('&::before', 'background-color: var(--n-item-color-active-hover);')])]), hoverStyle(null, hoverStyleChildren)]), cE('icon', `\n grid-area: icon;\n color: var(--n-item-icon-color);\n transition:\n color .3s var(--n-bezier),\n font-size .3s var(--n-bezier),\n margin-right .3s var(--n-bezier);\n box-sizing: content-box;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n `), cE('arrow', `\n grid-area: arrow;\n font-size: 16px;\n color: var(--n-arrow-color);\n transform: rotate(180deg);\n opacity: 1;\n transition:\n color .3s var(--n-bezier),\n transform 0.2s var(--n-bezier),\n opacity 0.2s var(--n-bezier);\n `), cB('menu-item-content-header', `\n grid-area: content;\n transition:\n color .3s var(--n-bezier),\n opacity .3s var(--n-bezier);\n opacity: 1;\n white-space: nowrap;\n color: var(--n-item-text-color);\n `, [c('a', `\n outline: none;\n text-decoration: none;\n transition: color .3s var(--n-bezier);\n color: var(--n-item-text-color);\n `, [c('&::before', `\n content: \"\";\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n `)]), cE('extra', `\n font-size: .93em;\n color: var(--n-group-text-color);\n transition: color .3s var(--n-bezier);\n `)])]), cB('submenu', `\n cursor: pointer;\n position: relative;\n margin-top: 6px;\n `, [cB('menu-item-content', `\n height: var(--n-item-height);\n `), cB('submenu-children', `\n overflow: hidden;\n padding: 0;\n `, [fadeInHeightExpandTransition({\n  duration: '.2s'\n})])]), cB('menu-item-group', [cB('menu-item-group-title', `\n margin-top: 6px;\n color: var(--n-group-text-color);\n cursor: default;\n font-size: .93em;\n height: 36px;\n display: flex;\n align-items: center;\n transition:\n padding-left .3s var(--n-bezier),\n color .3s var(--n-bezier);\n `)])]), cB('menu-tooltip', [c('a', `\n color: inherit;\n text-decoration: none;\n `)]), cB('menu-divider', `\n transition: background-color .3s var(--n-bezier);\n background-color: var(--n-divider-color);\n height: 1px;\n margin: 6px 18px;\n `)]);\nfunction hoverStyle(props, children) {\n  return [cM('hover', props, children), c('&:hover', props, children)];\n}","import { computed, defineComponent, h, inject } from 'vue';\nimport { NBaseIcon } from \"../../_internal/index.mjs\";\nimport { ChevronDownFilledIcon } from \"../../_internal/icons/index.mjs\";\nimport { render } from \"../../_utils/index.mjs\";\nimport { menuInjectionKey } from \"./context.mjs\";\nexport default defineComponent({\n  name: 'MenuOptionContent',\n  props: {\n    collapsed: Boolean,\n    disabled: Boolean,\n    title: [String, Function],\n    icon: Function,\n    extra: [String, Function],\n    showArrow: Boolean,\n    childActive: Boolean,\n    hover: Boolean,\n    paddingLeft: Number,\n    selected: Boolean,\n    maxIconSize: {\n      type: Number,\n      required: true\n    },\n    activeIconSize: {\n      type: Number,\n      required: true\n    },\n    iconMarginRight: {\n      type: Number,\n      required: true\n    },\n    clsPrefix: {\n      type: String,\n      required: true\n    },\n    onClick: Function,\n    tmNode: {\n      type: Object,\n      required: true\n    },\n    isEllipsisPlaceholder: Boolean\n  },\n  setup(props) {\n    const {\n      props: menuProps\n    } = inject(menuInjectionKey);\n    return {\n      menuProps,\n      style: computed(() => {\n        const {\n          paddingLeft\n        } = props;\n        return {\n          paddingLeft: paddingLeft && `${paddingLeft}px`\n        };\n      }),\n      iconStyle: computed(() => {\n        const {\n          maxIconSize,\n          activeIconSize,\n          iconMarginRight\n        } = props;\n        return {\n          width: `${maxIconSize}px`,\n          height: `${maxIconSize}px`,\n          fontSize: `${activeIconSize}px`,\n          marginRight: `${iconMarginRight}px`\n        };\n      })\n    };\n  },\n  render() {\n    const {\n      clsPrefix,\n      tmNode,\n      menuProps: {\n        renderIcon,\n        renderLabel,\n        renderExtra,\n        expandIcon\n      }\n    } = this;\n    const icon = renderIcon ? renderIcon(tmNode.rawNode) : render(this.icon);\n    return h(\"div\", {\n      onClick: e => {\n        var _a;\n        (_a = this.onClick) === null || _a === void 0 ? void 0 : _a.call(this, e);\n      },\n      role: \"none\",\n      class: [`${clsPrefix}-menu-item-content`, {\n        [`${clsPrefix}-menu-item-content--selected`]: this.selected,\n        [`${clsPrefix}-menu-item-content--collapsed`]: this.collapsed,\n        [`${clsPrefix}-menu-item-content--child-active`]: this.childActive,\n        [`${clsPrefix}-menu-item-content--disabled`]: this.disabled,\n        [`${clsPrefix}-menu-item-content--hover`]: this.hover\n      }],\n      style: this.style\n    }, icon && h(\"div\", {\n      class: `${clsPrefix}-menu-item-content__icon`,\n      style: this.iconStyle,\n      role: \"none\"\n    }, [icon]), h(\"div\", {\n      class: `${clsPrefix}-menu-item-content-header`,\n      role: \"none\"\n    }, this.isEllipsisPlaceholder ? this.title : renderLabel ? renderLabel(tmNode.rawNode) : render(this.title), this.extra || renderExtra ? h(\"span\", {\n      class: `${clsPrefix}-menu-item-content-header__extra`\n    }, ' ', renderExtra ? renderExtra(tmNode.rawNode) : render(this.extra)) : null), this.showArrow ? h(NBaseIcon, {\n      ariaHidden: true,\n      class: `${clsPrefix}-menu-item-content__arrow`,\n      clsPrefix: clsPrefix\n    }, {\n      default: () => expandIcon ? expandIcon(tmNode.rawNode) : h(ChevronDownFilledIcon, null)\n    }) : null);\n  }\n});","import { computed, inject } from 'vue';\nimport { menuInjectionKey, menuItemGroupInjectionKey, submenuInjectionKey } from \"./context.mjs\";\nconst ICON_MARGIN_RIGHT = 8;\nexport function useMenuChild(props) {\n  const NMenu = inject(menuInjectionKey);\n  const {\n    props: menuProps,\n    mergedCollapsedRef\n  } = NMenu;\n  const NSubmenu = inject(submenuInjectionKey, null);\n  const NMenuOptionGroup = inject(menuItemGroupInjectionKey, null);\n  const horizontalRef = computed(() => {\n    return menuProps.mode === 'horizontal';\n  });\n  const dropdownPlacementRef = computed(() => {\n    if (horizontalRef.value) {\n      return menuProps.dropdownPlacement;\n    }\n    if ('tmNodes' in props) return 'right-start';\n    return 'right';\n  });\n  const maxIconSizeRef = computed(() => {\n    var _a;\n    return Math.max((_a = menuProps.collapsedIconSize) !== null && _a !== void 0 ? _a : menuProps.iconSize, menuProps.iconSize);\n  });\n  const activeIconSizeRef = computed(() => {\n    var _a;\n    if (!horizontalRef.value && props.root && mergedCollapsedRef.value) {\n      return (_a = menuProps.collapsedIconSize) !== null && _a !== void 0 ? _a : menuProps.iconSize;\n    } else {\n      return menuProps.iconSize;\n    }\n  });\n  const paddingLeftRef = computed(() => {\n    if (horizontalRef.value) return undefined;\n    const {\n      collapsedWidth,\n      indent,\n      rootIndent\n    } = menuProps;\n    const {\n      root,\n      isGroup\n    } = props;\n    const mergedRootIndent = rootIndent === undefined ? indent : rootIndent;\n    if (root) {\n      if (mergedCollapsedRef.value) {\n        return collapsedWidth / 2 - maxIconSizeRef.value / 2;\n      }\n      return mergedRootIndent;\n    }\n    if (NMenuOptionGroup && typeof NMenuOptionGroup.paddingLeftRef.value === 'number') {\n      return indent / 2 + NMenuOptionGroup.paddingLeftRef.value;\n    }\n    if (NSubmenu && typeof NSubmenu.paddingLeftRef.value === 'number') {\n      return (isGroup ? indent / 2 : indent) + NSubmenu.paddingLeftRef.value;\n    }\n    // Shouldn't reach here\n    return 0;\n  });\n  const iconMarginRightRef = computed(() => {\n    const {\n      collapsedWidth,\n      indent,\n      rootIndent\n    } = menuProps;\n    const {\n      value: maxIconSize\n    } = maxIconSizeRef;\n    const {\n      root\n    } = props;\n    if (horizontalRef.value) return ICON_MARGIN_RIGHT;\n    if (!root) return ICON_MARGIN_RIGHT;\n    if (!mergedCollapsedRef.value) return ICON_MARGIN_RIGHT;\n    const mergedRootIndent = rootIndent === undefined ? indent : rootIndent;\n    return mergedRootIndent + maxIconSize + ICON_MARGIN_RIGHT - (collapsedWidth + maxIconSize) / 2;\n  });\n  return {\n    dropdownPlacement: dropdownPlacementRef,\n    activeIconSize: activeIconSizeRef,\n    maxIconSize: maxIconSizeRef,\n    paddingLeft: paddingLeftRef,\n    iconMarginRight: iconMarginRightRef,\n    NMenu,\n    NSubmenu\n  };\n}","export const useMenuChildProps = {\n  internalKey: {\n    type: [String, Number],\n    required: true\n  },\n  root: Boolean,\n  isGroup: Boolean,\n  level: {\n    type: Number,\n    required: true\n  },\n  title: [String, Function],\n  extra: [String, Function]\n};","import { defineComponent, h, inject } from 'vue';\nimport { menuInjectionKey } from \"./context.mjs\";\nexport default defineComponent({\n  name: 'MenuDivider',\n  setup() {\n    const NMenu = inject(menuInjectionKey);\n    const {\n      mergedClsPrefixRef,\n      isHorizontalRef\n    } = NMenu;\n    return () => isHorizontalRef.value ? null : h(\"div\", {\n      class: `${mergedClsPrefixRef.value}-menu-divider`\n    });\n  }\n});","import { useMemo } from 'vooks';\nimport { computed, defineComponent, h } from 'vue';\nimport { keysOf, render } from \"../../_utils/index.mjs\";\nimport { NTooltip } from \"../../tooltip/index.mjs\";\nimport NMenuOptionContent from \"./MenuOptionContent.mjs\";\nimport { useMenuChild } from \"./use-menu-child.mjs\";\nimport { useMenuChildProps } from \"./use-menu-child-props.mjs\";\nexport const menuItemProps = Object.assign(Object.assign({}, useMenuChildProps), {\n  tmNode: {\n    type: Object,\n    required: true\n  },\n  disabled: Boolean,\n  icon: Function,\n  onClick: Function\n});\nexport const menuItemPropKeys = keysOf(menuItemProps);\nexport const NMenuOption = defineComponent({\n  name: 'MenuOption',\n  props: menuItemProps,\n  setup(props) {\n    const MenuChild = useMenuChild(props);\n    const {\n      NSubmenu,\n      NMenu\n    } = MenuChild;\n    const {\n      props: menuProps,\n      mergedClsPrefixRef,\n      mergedCollapsedRef\n    } = NMenu;\n    const submenuDisabledRef = NSubmenu ? NSubmenu.mergedDisabledRef : {\n      value: false\n    };\n    const mergedDisabledRef = computed(() => {\n      return submenuDisabledRef.value || props.disabled;\n    });\n    function doClick(e) {\n      const {\n        onClick\n      } = props;\n      if (onClick) onClick(e);\n    }\n    function handleClick(e) {\n      if (!mergedDisabledRef.value) {\n        NMenu.doSelect(props.internalKey, props.tmNode.rawNode);\n        doClick(e);\n      }\n    }\n    return {\n      mergedClsPrefix: mergedClsPrefixRef,\n      dropdownPlacement: MenuChild.dropdownPlacement,\n      paddingLeft: MenuChild.paddingLeft,\n      iconMarginRight: MenuChild.iconMarginRight,\n      maxIconSize: MenuChild.maxIconSize,\n      activeIconSize: MenuChild.activeIconSize,\n      mergedTheme: NMenu.mergedThemeRef,\n      menuProps,\n      dropdownEnabled: useMemo(() => {\n        return props.root && mergedCollapsedRef.value && menuProps.mode !== 'horizontal' && !mergedDisabledRef.value;\n      }),\n      selected: useMemo(() => {\n        if (NMenu.mergedValueRef.value === props.internalKey) return true;\n        return false;\n      }),\n      mergedDisabled: mergedDisabledRef,\n      handleClick\n    };\n  },\n  render() {\n    const {\n      mergedClsPrefix,\n      mergedTheme,\n      tmNode,\n      menuProps: {\n        renderLabel,\n        nodeProps\n      }\n    } = this;\n    const attrs = nodeProps === null || nodeProps === void 0 ? void 0 : nodeProps(tmNode.rawNode);\n    return h(\"div\", Object.assign({}, attrs, {\n      role: \"menuitem\",\n      class: [`${mergedClsPrefix}-menu-item`, attrs === null || attrs === void 0 ? void 0 : attrs.class]\n    }), h(NTooltip, {\n      theme: mergedTheme.peers.Tooltip,\n      themeOverrides: mergedTheme.peerOverrides.Tooltip,\n      trigger: \"hover\",\n      placement: this.dropdownPlacement,\n      disabled: !this.dropdownEnabled || this.title === undefined,\n      internalExtraClass: ['menu-tooltip']\n    }, {\n      default: () => renderLabel ? renderLabel(tmNode.rawNode) : render(this.title),\n      trigger: () => h(NMenuOptionContent, {\n        tmNode: tmNode,\n        clsPrefix: mergedClsPrefix,\n        paddingLeft: this.paddingLeft,\n        iconMarginRight: this.iconMarginRight,\n        maxIconSize: this.maxIconSize,\n        activeIconSize: this.activeIconSize,\n        selected: this.selected,\n        title: this.title,\n        extra: this.extra,\n        disabled: this.mergedDisabled,\n        icon: this.icon,\n        onClick: this.handleClick\n      })\n    }));\n  }\n});","import { defineComponent, Fragment, h, inject, provide } from 'vue';\nimport { keysOf, render } from \"../../_utils/index.mjs\";\nimport { menuInjectionKey, menuItemGroupInjectionKey, submenuInjectionKey } from \"./context.mjs\";\nimport { useMenuChild } from \"./use-menu-child.mjs\";\nimport { useMenuChildProps } from \"./use-menu-child-props.mjs\";\nimport { itemRenderer } from \"./utils.mjs\";\nexport const menuItemGroupProps = Object.assign(Object.assign({}, useMenuChildProps), {\n  tmNode: {\n    type: Object,\n    required: true\n  },\n  tmNodes: {\n    type: Array,\n    required: true\n  }\n});\nexport const menuItemGroupPropKeys = keysOf(menuItemGroupProps);\nexport const NMenuOptionGroup = defineComponent({\n  name: 'MenuOptionGroup',\n  props: menuItemGroupProps,\n  setup(props) {\n    provide(submenuInjectionKey, null);\n    const MenuChild = useMenuChild(props);\n    provide(menuItemGroupInjectionKey, {\n      paddingLeftRef: MenuChild.paddingLeft\n    });\n    const {\n      mergedClsPrefixRef,\n      props: menuProps\n    } = inject(menuInjectionKey);\n    return function () {\n      const {\n        value: mergedClsPrefix\n      } = mergedClsPrefixRef;\n      const paddingLeft = MenuChild.paddingLeft.value;\n      const {\n        nodeProps\n      } = menuProps;\n      const attrs = nodeProps === null || nodeProps === void 0 ? void 0 : nodeProps(props.tmNode.rawNode);\n      return h(\"div\", {\n        class: `${mergedClsPrefix}-menu-item-group`,\n        role: \"group\"\n      }, h(\"div\", Object.assign({}, attrs, {\n        class: [`${mergedClsPrefix}-menu-item-group-title`, attrs === null || attrs === void 0 ? void 0 : attrs.class],\n        style: [(attrs === null || attrs === void 0 ? void 0 : attrs.style) || '', paddingLeft !== undefined ? `padding-left: ${paddingLeft}px;` : '']\n      }), render(props.title), props.extra ? h(Fragment, null, ' ', render(props.extra)) : null), h(\"div\", null, props.tmNodes.map(tmNode => itemRenderer(tmNode, menuProps))));\n    };\n  }\n});","import { h } from 'vue';\nimport { keep } from \"../../_utils/index.mjs\";\nimport NMenuDivider from \"./MenuDivider.mjs\";\nimport { menuItemPropKeys, NMenuOption } from \"./MenuOption.mjs\";\nimport { menuItemGroupPropKeys, NMenuOptionGroup } from \"./MenuOptionGroup.mjs\";\nimport { NSubmenu, submenuPropKeys } from \"./Submenu.mjs\";\nexport function isIgnoredNode(rawNode) {\n  return rawNode.type === 'divider' || rawNode.type === 'render';\n}\nexport function isDividerNode(rawNode) {\n  return rawNode.type === 'divider';\n}\nexport function itemRenderer(tmNode, menuProps) {\n  const {\n    rawNode\n  } = tmNode;\n  const {\n    show\n  } = rawNode;\n  if (show === false) {\n    return null;\n  }\n  if (isIgnoredNode(rawNode)) {\n    if (isDividerNode(rawNode)) {\n      return h(NMenuDivider, Object.assign({\n        key: tmNode.key\n      }, rawNode.props));\n    }\n    return null;\n  }\n  const {\n    labelField\n  } = menuProps;\n  const {\n    key,\n    level,\n    isGroup\n  } = tmNode;\n  const props = Object.assign(Object.assign({}, rawNode), {\n    title: rawNode.title || rawNode[labelField],\n    extra: rawNode.titleExtra || rawNode.extra,\n    key,\n    internalKey: key,\n    // since key can't be used as a prop\n    level,\n    root: level === 0,\n    isGroup\n  });\n  if (tmNode.children) {\n    if (tmNode.isGroup) {\n      return h(NMenuOptionGroup, keep(props, menuItemGroupPropKeys, {\n        tmNode,\n        tmNodes: tmNode.children,\n        key\n      }));\n    }\n    return h(NSubmenu, keep(props, submenuPropKeys, {\n      key,\n      rawNodes: rawNode[menuProps.childrenField],\n      tmNodes: tmNode.children,\n      tmNode\n    }));\n  } else {\n    return h(NMenuOption, keep(props, menuItemPropKeys, {\n      key,\n      tmNode\n    }));\n  }\n}","import { useMemo } from 'vooks';\nimport { computed, defineComponent, h, provide, ref } from 'vue';\nimport { NFadeInExpandTransition } from \"../../_internal/index.mjs\";\nimport { keysOf } from \"../../_utils/index.mjs\";\nimport { NDropdown } from \"../../dropdown/index.mjs\";\nimport { menuItemGroupInjectionKey, submenuInjectionKey } from \"./context.mjs\";\nimport NMenuOptionContent from \"./MenuOptionContent.mjs\";\nimport { useMenuChild } from \"./use-menu-child.mjs\";\nimport { useMenuChildProps } from \"./use-menu-child-props.mjs\";\nimport { itemRenderer } from \"./utils.mjs\";\nexport const submenuProps = Object.assign(Object.assign({}, useMenuChildProps), {\n  rawNodes: {\n    type: Array,\n    default: () => []\n  },\n  tmNodes: {\n    type: Array,\n    default: () => []\n  },\n  tmNode: {\n    type: Object,\n    required: true\n  },\n  disabled: Boolean,\n  icon: Function,\n  onClick: Function,\n  domId: String,\n  virtualChildActive: {\n    type: Boolean,\n    default: undefined\n  },\n  isEllipsisPlaceholder: Boolean\n});\nexport const submenuPropKeys = keysOf(submenuProps);\nexport const NSubmenu = defineComponent({\n  name: 'Submenu',\n  props: submenuProps,\n  setup(props) {\n    const MenuChild = useMenuChild(props);\n    const {\n      NMenu,\n      NSubmenu\n    } = MenuChild;\n    const {\n      props: menuProps,\n      mergedCollapsedRef,\n      mergedThemeRef\n    } = NMenu;\n    const mergedDisabledRef = computed(() => {\n      const {\n        disabled\n      } = props;\n      if (NSubmenu === null || NSubmenu === void 0 ? void 0 : NSubmenu.mergedDisabledRef.value) return true;\n      if (menuProps.disabled) return true;\n      return disabled;\n    });\n    const dropdownShowRef = ref(false);\n    provide(submenuInjectionKey, {\n      paddingLeftRef: MenuChild.paddingLeft,\n      mergedDisabledRef\n    });\n    provide(menuItemGroupInjectionKey, null);\n    function doClick() {\n      const {\n        onClick\n      } = props;\n      if (onClick) onClick();\n    }\n    function handleClick() {\n      if (!mergedDisabledRef.value) {\n        if (!mergedCollapsedRef.value) {\n          NMenu.toggleExpand(props.internalKey);\n        }\n        doClick();\n      }\n    }\n    function handlePopoverShowChange(value) {\n      dropdownShowRef.value = value;\n    }\n    return {\n      menuProps,\n      mergedTheme: mergedThemeRef,\n      doSelect: NMenu.doSelect,\n      inverted: NMenu.invertedRef,\n      isHorizontal: NMenu.isHorizontalRef,\n      mergedClsPrefix: NMenu.mergedClsPrefixRef,\n      maxIconSize: MenuChild.maxIconSize,\n      activeIconSize: MenuChild.activeIconSize,\n      iconMarginRight: MenuChild.iconMarginRight,\n      dropdownPlacement: MenuChild.dropdownPlacement,\n      dropdownShow: dropdownShowRef,\n      paddingLeft: MenuChild.paddingLeft,\n      mergedDisabled: mergedDisabledRef,\n      mergedValue: NMenu.mergedValueRef,\n      childActive: useMemo(() => {\n        var _a;\n        return (_a = props.virtualChildActive) !== null && _a !== void 0 ? _a : NMenu.activePathRef.value.includes(props.internalKey);\n      }),\n      collapsed: computed(() => {\n        if (menuProps.mode === 'horizontal') return false;\n        if (mergedCollapsedRef.value) {\n          return true;\n        }\n        return !NMenu.mergedExpandedKeysRef.value.includes(props.internalKey);\n      }),\n      dropdownEnabled: computed(() => {\n        return !mergedDisabledRef.value && (menuProps.mode === 'horizontal' || mergedCollapsedRef.value);\n      }),\n      handlePopoverShowChange,\n      handleClick\n    };\n  },\n  render() {\n    var _a;\n    const {\n      mergedClsPrefix,\n      menuProps: {\n        renderIcon,\n        renderLabel\n      }\n    } = this;\n    const createSubmenuItem = () => {\n      const {\n        isHorizontal,\n        paddingLeft,\n        collapsed,\n        mergedDisabled,\n        maxIconSize,\n        activeIconSize,\n        title,\n        childActive,\n        icon,\n        handleClick,\n        menuProps: {\n          nodeProps\n        },\n        dropdownShow,\n        iconMarginRight,\n        tmNode,\n        mergedClsPrefix,\n        isEllipsisPlaceholder,\n        extra\n      } = this;\n      const attrs = nodeProps === null || nodeProps === void 0 ? void 0 : nodeProps(tmNode.rawNode);\n      return h(\"div\", Object.assign({}, attrs, {\n        class: [`${mergedClsPrefix}-menu-item`, attrs === null || attrs === void 0 ? void 0 : attrs.class],\n        role: \"menuitem\"\n      }), h(NMenuOptionContent, {\n        tmNode: tmNode,\n        paddingLeft: paddingLeft,\n        collapsed: collapsed,\n        disabled: mergedDisabled,\n        iconMarginRight: iconMarginRight,\n        maxIconSize: maxIconSize,\n        activeIconSize: activeIconSize,\n        title: title,\n        extra: extra,\n        showArrow: !isHorizontal,\n        childActive: childActive,\n        clsPrefix: mergedClsPrefix,\n        icon: icon,\n        hover: dropdownShow,\n        onClick: handleClick,\n        isEllipsisPlaceholder: isEllipsisPlaceholder\n      }));\n    };\n    const createSubmenuChildren = () => {\n      return h(NFadeInExpandTransition, null, {\n        default: () => {\n          const {\n            tmNodes,\n            collapsed\n          } = this;\n          return !collapsed ? h(\"div\", {\n            class: `${mergedClsPrefix}-submenu-children`,\n            role: \"menu\"\n          }, tmNodes.map(item => itemRenderer(item, this.menuProps))) : null;\n        }\n      });\n    };\n    return this.root ? h(NDropdown, Object.assign({\n      size: \"large\",\n      trigger: \"hover\"\n    }, (_a = this.menuProps) === null || _a === void 0 ? void 0 : _a.dropdownProps, {\n      themeOverrides: this.mergedTheme.peerOverrides.Dropdown,\n      theme: this.mergedTheme.peers.Dropdown,\n      builtinThemeOverrides: {\n        fontSizeLarge: '14px',\n        optionIconSizeLarge: '18px'\n      },\n      value: this.mergedValue,\n      disabled: !this.dropdownEnabled,\n      placement: this.dropdownPlacement,\n      keyField: this.menuProps.keyField,\n      labelField: this.menuProps.labelField,\n      childrenField: this.menuProps.childrenField,\n      onUpdateShow: this.handlePopoverShowChange,\n      options: this.rawNodes,\n      onSelect: this.doSelect,\n      inverted: this.inverted,\n      renderIcon: renderIcon,\n      renderLabel: renderLabel\n    }), {\n      default: () => h(\"div\", {\n        class: `${mergedClsPrefix}-submenu`,\n        role: \"menu\",\n        \"aria-expanded\": !this.collapsed,\n        id: this.domId\n      }, createSubmenuItem(), this.isHorizontal ? null : createSubmenuChildren())\n    }) : h(\"div\", {\n      class: `${mergedClsPrefix}-submenu`,\n      role: \"menu\",\n      \"aria-expanded\": !this.collapsed,\n      id: this.domId\n    }, createSubmenuItem(), createSubmenuChildren());\n  }\n});","import { createId } from 'seemly';\nimport { createTreeMate } from 'treemate';\nimport { useCompitable, useMergedState } from 'vooks';\nimport { computed, defineComponent, h, inject, mergeProps, provide, ref, toRef, watchEffect } from 'vue';\nimport { VOverflow, VResizeObserver } from 'vueuc';\nimport { useConfig, useTheme, useThemeClass } from \"../../_mixins/index.mjs\";\nimport { call } from \"../../_utils/index.mjs\";\nimport { layoutSiderInjectionKey } from \"../../layout/src/interface.mjs\";\nimport { menuLight } from \"../styles/index.mjs\";\nimport { menuInjectionKey } from \"./context.mjs\";\nimport style from \"./styles/index.cssr.mjs\";\nimport { NSubmenu } from \"./Submenu.mjs\";\nimport { useCheckDeprecated } from \"./useCheckDeprecated.mjs\";\nimport { isIgnoredNode, itemRenderer } from \"./utils.mjs\";\nexport const menuProps = Object.assign(Object.assign({}, useTheme.props), {\n  options: {\n    type: Array,\n    default: () => []\n  },\n  collapsed: {\n    type: Boolean,\n    default: undefined\n  },\n  collapsedWidth: {\n    type: Number,\n    default: 48\n  },\n  iconSize: {\n    type: Number,\n    default: 20\n  },\n  collapsedIconSize: {\n    type: Number,\n    default: 24\n  },\n  rootIndent: Number,\n  indent: {\n    type: Number,\n    default: 32\n  },\n  labelField: {\n    type: String,\n    default: 'label'\n  },\n  keyField: {\n    type: String,\n    default: 'key'\n  },\n  childrenField: {\n    type: String,\n    default: 'children'\n  },\n  disabledField: {\n    type: String,\n    default: 'disabled'\n  },\n  defaultExpandAll: Boolean,\n  defaultExpandedKeys: Array,\n  expandedKeys: Array,\n  value: [String, Number],\n  defaultValue: {\n    type: [String, Number],\n    default: null\n  },\n  mode: {\n    type: String,\n    default: 'vertical'\n  },\n  watchProps: {\n    type: Array,\n    default: undefined\n  },\n  disabled: Boolean,\n  show: {\n    type: Boolean,\n    default: true\n  },\n  inverted: Boolean,\n  'onUpdate:expandedKeys': [Function, Array],\n  onUpdateExpandedKeys: [Function, Array],\n  onUpdateValue: [Function, Array],\n  'onUpdate:value': [Function, Array],\n  expandIcon: Function,\n  renderIcon: Function,\n  renderLabel: Function,\n  renderExtra: Function,\n  dropdownProps: Object,\n  accordion: Boolean,\n  nodeProps: Function,\n  dropdownPlacement: {\n    type: String,\n    default: 'bottom'\n  },\n  responsive: Boolean,\n  // deprecated\n  items: Array,\n  onOpenNamesChange: [Function, Array],\n  onSelect: [Function, Array],\n  onExpandedNamesChange: [Function, Array],\n  expandedNames: Array,\n  defaultExpandedNames: Array\n});\nexport default defineComponent({\n  name: 'Menu',\n  inheritAttrs: false,\n  props: menuProps,\n  setup(props) {\n    if (process.env.NODE_ENV !== 'production') {\n      useCheckDeprecated(props);\n    }\n    const {\n      mergedClsPrefixRef,\n      inlineThemeDisabled\n    } = useConfig(props);\n    const themeRef = useTheme('Menu', '-menu', style, menuLight, props, mergedClsPrefixRef);\n    const layoutSider = inject(layoutSiderInjectionKey, null);\n    const mergedCollapsedRef = computed(() => {\n      var _a;\n      const {\n        collapsed\n      } = props;\n      if (collapsed !== undefined) return collapsed;\n      if (layoutSider) {\n        const {\n          collapseModeRef,\n          collapsedRef\n        } = layoutSider;\n        if (collapseModeRef.value === 'width') {\n          return (_a = collapsedRef.value) !== null && _a !== void 0 ? _a : false;\n        }\n      }\n      return false;\n    });\n    const treeMateRef = computed(() => {\n      const {\n        keyField,\n        childrenField,\n        disabledField\n      } = props;\n      return createTreeMate(props.items || props.options, {\n        getIgnored(node) {\n          return isIgnoredNode(node);\n        },\n        getChildren(node) {\n          return node[childrenField];\n        },\n        getDisabled(node) {\n          return node[disabledField];\n        },\n        getKey(node) {\n          var _a;\n          return (_a = node[keyField]) !== null && _a !== void 0 ? _a : node.name;\n        }\n      });\n    });\n    const treeKeysLevelOneRef = computed(() => new Set(treeMateRef.value.treeNodes.map(e => e.key)));\n    const {\n      watchProps\n    } = props;\n    const uncontrolledValueRef = ref(null);\n    if (watchProps === null || watchProps === void 0 ? void 0 : watchProps.includes('defaultValue')) {\n      watchEffect(() => {\n        uncontrolledValueRef.value = props.defaultValue;\n      });\n    } else {\n      uncontrolledValueRef.value = props.defaultValue;\n    }\n    const controlledValueRef = toRef(props, 'value');\n    const mergedValueRef = useMergedState(controlledValueRef, uncontrolledValueRef);\n    const uncontrolledExpandedKeysRef = ref([]);\n    const initUncontrolledExpandedKeys = () => {\n      uncontrolledExpandedKeysRef.value = props.defaultExpandAll ? treeMateRef.value.getNonLeafKeys() : props.defaultExpandedNames || props.defaultExpandedKeys || treeMateRef.value.getPath(mergedValueRef.value, {\n        includeSelf: false\n      }).keyPath;\n    };\n    if (watchProps === null || watchProps === void 0 ? void 0 : watchProps.includes('defaultExpandedKeys')) {\n      watchEffect(initUncontrolledExpandedKeys);\n    } else {\n      initUncontrolledExpandedKeys();\n    }\n    const controlledExpandedKeysRef = useCompitable(props, ['expandedNames', 'expandedKeys']);\n    const mergedExpandedKeysRef = useMergedState(controlledExpandedKeysRef, uncontrolledExpandedKeysRef);\n    const tmNodesRef = computed(() => treeMateRef.value.treeNodes);\n    const activePathRef = computed(() => {\n      return treeMateRef.value.getPath(mergedValueRef.value).keyPath;\n    });\n    provide(menuInjectionKey, {\n      props,\n      mergedCollapsedRef,\n      mergedThemeRef: themeRef,\n      mergedValueRef,\n      mergedExpandedKeysRef,\n      activePathRef,\n      mergedClsPrefixRef,\n      isHorizontalRef: computed(() => props.mode === 'horizontal'),\n      invertedRef: toRef(props, 'inverted'),\n      doSelect,\n      toggleExpand\n    });\n    function doSelect(value, item) {\n      const {\n        'onUpdate:value': _onUpdateValue,\n        onUpdateValue,\n        onSelect\n      } = props;\n      if (onUpdateValue) {\n        call(onUpdateValue, value, item);\n      }\n      if (_onUpdateValue) {\n        call(_onUpdateValue, value, item);\n      }\n      if (onSelect) {\n        call(onSelect, value, item);\n      }\n      uncontrolledValueRef.value = value;\n    }\n    function doUpdateExpandedKeys(value) {\n      const {\n        'onUpdate:expandedKeys': _onUpdateExpandedKeys,\n        onUpdateExpandedKeys,\n        onExpandedNamesChange,\n        onOpenNamesChange\n      } = props;\n      if (_onUpdateExpandedKeys) {\n        call(_onUpdateExpandedKeys, value);\n      }\n      if (onUpdateExpandedKeys) {\n        call(onUpdateExpandedKeys, value);\n      }\n      // deprecated\n      if (onExpandedNamesChange) {\n        call(onExpandedNamesChange, value);\n      }\n      if (onOpenNamesChange) {\n        call(onOpenNamesChange, value);\n      }\n      uncontrolledExpandedKeysRef.value = value;\n    }\n    function toggleExpand(key) {\n      const currentExpandedKeys = Array.from(mergedExpandedKeysRef.value);\n      const index = currentExpandedKeys.findIndex(expanededKey => expanededKey === key);\n      if (~index) {\n        currentExpandedKeys.splice(index, 1);\n      } else {\n        if (props.accordion) {\n          if (treeKeysLevelOneRef.value.has(key)) {\n            const closeKeyIndex = currentExpandedKeys.findIndex(e => treeKeysLevelOneRef.value.has(e));\n            if (closeKeyIndex > -1) {\n              currentExpandedKeys.splice(closeKeyIndex, 1);\n            }\n          }\n        }\n        currentExpandedKeys.push(key);\n      }\n      doUpdateExpandedKeys(currentExpandedKeys);\n    }\n    const showOption = key => {\n      const selectedKeyPath = treeMateRef.value.getPath(key !== null && key !== void 0 ? key : mergedValueRef.value, {\n        includeSelf: false\n      }).keyPath;\n      if (!selectedKeyPath.length) return;\n      const currentExpandedKeys = Array.from(mergedExpandedKeysRef.value);\n      const nextExpandedKeys = new Set([...currentExpandedKeys, ...selectedKeyPath]);\n      if (props.accordion) {\n        treeKeysLevelOneRef.value.forEach(firstLevelKey => {\n          if (nextExpandedKeys.has(firstLevelKey) && !selectedKeyPath.includes(firstLevelKey)) {\n            nextExpandedKeys.delete(firstLevelKey);\n          }\n        });\n      }\n      doUpdateExpandedKeys(Array.from(nextExpandedKeys));\n    };\n    const cssVarsRef = computed(() => {\n      const {\n        inverted\n      } = props;\n      const {\n        common: {\n          cubicBezierEaseInOut\n        },\n        self\n      } = themeRef.value;\n      const {\n        borderRadius,\n        borderColorHorizontal,\n        fontSize,\n        itemHeight,\n        dividerColor\n      } = self;\n      const vars = {\n        '--n-divider-color': dividerColor,\n        '--n-bezier': cubicBezierEaseInOut,\n        '--n-font-size': fontSize,\n        '--n-border-color-horizontal': borderColorHorizontal,\n        '--n-border-radius': borderRadius,\n        '--n-item-height': itemHeight\n      };\n      if (inverted) {\n        vars['--n-group-text-color'] = self.groupTextColorInverted;\n        vars['--n-color'] = self.colorInverted;\n        vars['--n-item-text-color'] = self.itemTextColorInverted;\n        vars['--n-item-text-color-hover'] = self.itemTextColorHoverInverted;\n        vars['--n-item-text-color-active'] = self.itemTextColorActiveInverted;\n        vars['--n-item-text-color-child-active'] = self.itemTextColorChildActiveInverted;\n        vars['--n-item-text-color-child-active-hover'] = self.itemTextColorChildActiveInverted;\n        vars['--n-item-text-color-active-hover'] = self.itemTextColorActiveHoverInverted;\n        vars['--n-item-icon-color'] = self.itemIconColorInverted;\n        vars['--n-item-icon-color-hover'] = self.itemIconColorHoverInverted;\n        vars['--n-item-icon-color-active'] = self.itemIconColorActiveInverted;\n        vars['--n-item-icon-color-active-hover'] = self.itemIconColorActiveHoverInverted;\n        vars['--n-item-icon-color-child-active'] = self.itemIconColorChildActiveInverted;\n        vars['--n-item-icon-color-child-active-hover'] = self.itemIconColorChildActiveHoverInverted;\n        vars['--n-item-icon-color-collapsed'] = self.itemIconColorCollapsedInverted;\n        vars['--n-item-text-color-horizontal'] = self.itemTextColorHorizontalInverted;\n        vars['--n-item-text-color-hover-horizontal'] = self.itemTextColorHoverHorizontalInverted;\n        vars['--n-item-text-color-active-horizontal'] = self.itemTextColorActiveHorizontalInverted;\n        vars['--n-item-text-color-child-active-horizontal'] = self.itemTextColorChildActiveHorizontalInverted;\n        vars['--n-item-text-color-child-active-hover-horizontal'] = self.itemTextColorChildActiveHoverHorizontalInverted;\n        vars['--n-item-text-color-active-hover-horizontal'] = self.itemTextColorActiveHoverHorizontalInverted;\n        vars['--n-item-icon-color-horizontal'] = self.itemIconColorHorizontalInverted;\n        vars['--n-item-icon-color-hover-horizontal'] = self.itemIconColorHoverHorizontalInverted;\n        vars['--n-item-icon-color-active-horizontal'] = self.itemIconColorActiveHorizontalInverted;\n        vars['--n-item-icon-color-active-hover-horizontal'] = self.itemIconColorActiveHoverHorizontalInverted;\n        vars['--n-item-icon-color-child-active-horizontal'] = self.itemIconColorChildActiveHorizontalInverted;\n        vars['--n-item-icon-color-child-active-hover-horizontal'] = self.itemIconColorChildActiveHoverHorizontalInverted;\n        vars['--n-arrow-color'] = self.arrowColorInverted;\n        vars['--n-arrow-color-hover'] = self.arrowColorHoverInverted;\n        vars['--n-arrow-color-active'] = self.arrowColorActiveInverted;\n        vars['--n-arrow-color-active-hover'] = self.arrowColorActiveHoverInverted;\n        vars['--n-arrow-color-child-active'] = self.arrowColorChildActiveInverted;\n        vars['--n-arrow-color-child-active-hover'] = self.arrowColorChildActiveHoverInverted;\n        vars['--n-item-color-hover'] = self.itemColorHoverInverted;\n        vars['--n-item-color-active'] = self.itemColorActiveInverted;\n        vars['--n-item-color-active-hover'] = self.itemColorActiveHoverInverted;\n        vars['--n-item-color-active-collapsed'] = self.itemColorActiveCollapsedInverted;\n      } else {\n        vars['--n-group-text-color'] = self.groupTextColor;\n        vars['--n-color'] = self.color;\n        vars['--n-item-text-color'] = self.itemTextColor;\n        vars['--n-item-text-color-hover'] = self.itemTextColorHover;\n        vars['--n-item-text-color-active'] = self.itemTextColorActive;\n        vars['--n-item-text-color-child-active'] = self.itemTextColorChildActive;\n        vars['--n-item-text-color-child-active-hover'] = self.itemTextColorChildActiveHover;\n        vars['--n-item-text-color-active-hover'] = self.itemTextColorActiveHover;\n        vars['--n-item-icon-color'] = self.itemIconColor;\n        vars['--n-item-icon-color-hover'] = self.itemIconColorHover;\n        vars['--n-item-icon-color-active'] = self.itemIconColorActive;\n        vars['--n-item-icon-color-active-hover'] = self.itemIconColorActiveHover;\n        vars['--n-item-icon-color-child-active'] = self.itemIconColorChildActive;\n        vars['--n-item-icon-color-child-active-hover'] = self.itemIconColorChildActiveHover;\n        vars['--n-item-icon-color-collapsed'] = self.itemIconColorCollapsed;\n        vars['--n-item-text-color-horizontal'] = self.itemTextColorHorizontal;\n        vars['--n-item-text-color-hover-horizontal'] = self.itemTextColorHoverHorizontal;\n        vars['--n-item-text-color-active-horizontal'] = self.itemTextColorActiveHorizontal;\n        vars['--n-item-text-color-child-active-horizontal'] = self.itemTextColorChildActiveHorizontal;\n        vars['--n-item-text-color-child-active-hover-horizontal'] = self.itemTextColorChildActiveHoverHorizontal;\n        vars['--n-item-text-color-active-hover-horizontal'] = self.itemTextColorActiveHoverHorizontal;\n        vars['--n-item-icon-color-horizontal'] = self.itemIconColorHorizontal;\n        vars['--n-item-icon-color-hover-horizontal'] = self.itemIconColorHoverHorizontal;\n        vars['--n-item-icon-color-active-horizontal'] = self.itemIconColorActiveHorizontal;\n        vars['--n-item-icon-color-active-hover-horizontal'] = self.itemIconColorActiveHoverHorizontal;\n        vars['--n-item-icon-color-child-active-horizontal'] = self.itemIconColorChildActiveHorizontal;\n        vars['--n-item-icon-color-child-active-hover-horizontal'] = self.itemIconColorChildActiveHoverHorizontal;\n        vars['--n-arrow-color'] = self.arrowColor;\n        vars['--n-arrow-color-hover'] = self.arrowColorHover;\n        vars['--n-arrow-color-active'] = self.arrowColorActive;\n        vars['--n-arrow-color-active-hover'] = self.arrowColorActiveHover;\n        vars['--n-arrow-color-child-active'] = self.arrowColorChildActive;\n        vars['--n-arrow-color-child-active-hover'] = self.arrowColorChildActiveHover;\n        vars['--n-item-color-hover'] = self.itemColorHover;\n        vars['--n-item-color-active'] = self.itemColorActive;\n        vars['--n-item-color-active-hover'] = self.itemColorActiveHover;\n        vars['--n-item-color-active-collapsed'] = self.itemColorActiveCollapsed;\n      }\n      return vars;\n    });\n    const themeClassHandle = inlineThemeDisabled ? useThemeClass('menu', computed(() => props.inverted ? 'a' : 'b'), cssVarsRef, props) : undefined;\n    const ellipsisNodeId = createId();\n    const overflowRef = ref(null);\n    const counterRef = ref(null);\n    let isFirstResize = true;\n    const onResize = () => {\n      var _a;\n      if (isFirstResize) {\n        isFirstResize = false;\n      } else {\n        (_a = overflowRef.value) === null || _a === void 0 ? void 0 : _a.sync({\n          showAllItemsBeforeCalculate: true\n        });\n      }\n    };\n    function getCounter() {\n      return document.getElementById(ellipsisNodeId);\n    }\n    const ellipsisFromIndexRef = ref(-1);\n    function onUpdateCount(count) {\n      ellipsisFromIndexRef.value = props.options.length - count;\n    }\n    function onUpdateOverflow(overflow) {\n      if (!overflow) {\n        ellipsisFromIndexRef.value = -1;\n      }\n    }\n    const ellipsisOptionRef = computed(() => {\n      const ellipsisFromIndex = ellipsisFromIndexRef.value;\n      const option = {\n        children: ellipsisFromIndex === -1 ? [] : props.options.slice(ellipsisFromIndex)\n      };\n      return option;\n    });\n    const ellipsisTreeMateRef = computed(() => {\n      const {\n        childrenField,\n        disabledField,\n        keyField\n      } = props;\n      return createTreeMate([ellipsisOptionRef.value], {\n        getIgnored(node) {\n          return isIgnoredNode(node);\n        },\n        getChildren(node) {\n          return node[childrenField];\n        },\n        getDisabled(node) {\n          return node[disabledField];\n        },\n        getKey(node) {\n          var _a;\n          return (_a = node[keyField]) !== null && _a !== void 0 ? _a : node.name;\n        }\n      });\n    });\n    const emptyTmNodeRef = computed(() => {\n      return createTreeMate([{}]).treeNodes[0];\n    });\n    function renderCounter() {\n      var _a;\n      if (ellipsisFromIndexRef.value === -1) {\n        // Only a placeholder\n        return h(NSubmenu, {\n          root: true,\n          level: 0,\n          key: \"__ellpisisGroupPlaceholder__\",\n          internalKey: \"__ellpisisGroupPlaceholder__\",\n          title: \"\\u00B7\\u00B7\\u00B7\",\n          tmNode: emptyTmNodeRef.value,\n          domId: ellipsisNodeId,\n          isEllipsisPlaceholder: true\n        });\n      }\n      const tmNode = ellipsisTreeMateRef.value.treeNodes[0];\n      const activePath = activePathRef.value;\n      const childActive = !!((_a = tmNode.children) === null || _a === void 0 ? void 0 : _a.some(tmNode => {\n        return activePath.includes(tmNode.key);\n      }));\n      return h(NSubmenu, {\n        level: 0,\n        root: true,\n        key: \"__ellpisisGroup__\",\n        internalKey: \"__ellpisisGroup__\",\n        title: \"\\u00B7\\u00B7\\u00B7\",\n        virtualChildActive: childActive,\n        tmNode: tmNode,\n        domId: ellipsisNodeId,\n        rawNodes: tmNode.rawNode.children || [],\n        tmNodes: tmNode.children || [],\n        isEllipsisPlaceholder: true\n      });\n    }\n    return {\n      mergedClsPrefix: mergedClsPrefixRef,\n      controlledExpandedKeys: controlledExpandedKeysRef,\n      uncontrolledExpanededKeys: uncontrolledExpandedKeysRef,\n      mergedExpandedKeys: mergedExpandedKeysRef,\n      uncontrolledValue: uncontrolledValueRef,\n      mergedValue: mergedValueRef,\n      activePath: activePathRef,\n      tmNodes: tmNodesRef,\n      mergedTheme: themeRef,\n      mergedCollapsed: mergedCollapsedRef,\n      cssVars: inlineThemeDisabled ? undefined : cssVarsRef,\n      themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,\n      overflowRef,\n      counterRef,\n      updateCounter: () => {},\n      onResize,\n      onUpdateOverflow,\n      onUpdateCount,\n      renderCounter,\n      getCounter,\n      onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender,\n      showOption,\n      deriveResponsiveState: onResize\n    };\n  },\n  render() {\n    const {\n      mergedClsPrefix,\n      mode,\n      themeClass,\n      onRender\n    } = this;\n    onRender === null || onRender === void 0 ? void 0 : onRender();\n    const renderMenuItemNodes = () => this.tmNodes.map(tmNode => itemRenderer(tmNode, this.$props));\n    const horizontal = mode === 'horizontal';\n    const finalResponsive = horizontal && this.responsive;\n    const renderMainNode = () => h('div', mergeProps(this.$attrs, {\n      role: mode === 'horizontal' ? 'menubar' : 'menu',\n      class: [`${mergedClsPrefix}-menu`, themeClass, `${mergedClsPrefix}-menu--${mode}`, finalResponsive && `${mergedClsPrefix}-menu--responsive`, this.mergedCollapsed && `${mergedClsPrefix}-menu--collapsed`],\n      style: this.cssVars\n    }), finalResponsive ? h(VOverflow, {\n      ref: \"overflowRef\",\n      onUpdateOverflow: this.onUpdateOverflow,\n      getCounter: this.getCounter,\n      onUpdateCount: this.onUpdateCount,\n      updateCounter: this.updateCounter,\n      style: {\n        width: '100%',\n        display: 'flex',\n        overflow: 'hidden'\n      }\n    }, {\n      default: renderMenuItemNodes,\n      counter: this.renderCounter\n    }) : renderMenuItemNodes());\n    return finalResponsive ? h(VResizeObserver, {\n      onResize: this.onResize\n    }, {\n      default: renderMainNode\n    }) : renderMainNode();\n  }\n});","import { createInjectionKey } from \"../../_utils/index.mjs\";\nexport const popconfirmInjectionKey = createInjectionKey('n-popconfirm');","import { computed, defineComponent, h, inject, toRef } from 'vue';\nimport { NBaseIcon } from \"../../_internal/index.mjs\";\nimport { WarningIcon } from \"../../_internal/icons/index.mjs\";\nimport { useConfig, useLocale, useThemeClass } from \"../../_mixins/index.mjs\";\nimport { keysOf, resolveSlot, resolveWrappedSlot } from \"../../_utils/index.mjs\";\nimport { NButton } from \"../../button/index.mjs\";\nimport { popconfirmInjectionKey } from \"./interface.mjs\";\nexport const panelProps = {\n  positiveText: String,\n  negativeText: String,\n  showIcon: {\n    type: Boolean,\n    default: true\n  },\n  onPositiveClick: {\n    type: Function,\n    required: true\n  },\n  onNegativeClick: {\n    type: Function,\n    required: true\n  }\n};\nexport const panelPropKeys = keysOf(panelProps);\nexport default defineComponent({\n  name: 'NPopconfirmPanel',\n  props: panelProps,\n  setup(props) {\n    const {\n      localeRef\n    } = useLocale('Popconfirm');\n    const {\n      inlineThemeDisabled\n    } = useConfig();\n    const {\n      mergedClsPrefixRef,\n      mergedThemeRef,\n      props: popconfirmProps\n    } = inject(popconfirmInjectionKey);\n    const cssVarsRef = computed(() => {\n      const {\n        common: {\n          cubicBezierEaseInOut\n        },\n        self: {\n          fontSize,\n          iconSize,\n          iconColor\n        }\n      } = mergedThemeRef.value;\n      return {\n        '--n-bezier': cubicBezierEaseInOut,\n        '--n-font-size': fontSize,\n        '--n-icon-size': iconSize,\n        '--n-icon-color': iconColor\n      };\n    });\n    const themeClassHandle = inlineThemeDisabled ? useThemeClass('popconfirm-panel', undefined, cssVarsRef, popconfirmProps) : undefined;\n    return Object.assign(Object.assign({}, useLocale('Popconfirm')), {\n      mergedClsPrefix: mergedClsPrefixRef,\n      cssVars: inlineThemeDisabled ? undefined : cssVarsRef,\n      localizedPositiveText: computed(() => {\n        return props.positiveText || localeRef.value.positiveText;\n      }),\n      localizedNegativeText: computed(() => {\n        return props.negativeText || localeRef.value.negativeText;\n      }),\n      positiveButtonProps: toRef(popconfirmProps, 'positiveButtonProps'),\n      negativeButtonProps: toRef(popconfirmProps, 'negativeButtonProps'),\n      handlePositiveClick(e) {\n        props.onPositiveClick(e);\n      },\n      handleNegativeClick(e) {\n        props.onNegativeClick(e);\n      },\n      themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,\n      onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender\n    });\n  },\n  render() {\n    var _a;\n    const {\n      mergedClsPrefix,\n      showIcon,\n      $slots\n    } = this;\n    const actionContentNode = resolveSlot($slots.action, () => this.negativeText === null && this.positiveText === null ? [] : [this.negativeText !== null && h(NButton, Object.assign({\n      size: \"small\",\n      onClick: this.handleNegativeClick\n    }, this.negativeButtonProps), {\n      default: () => this.localizedNegativeText\n    }), this.positiveText !== null && h(NButton, Object.assign({\n      size: \"small\",\n      type: \"primary\",\n      onClick: this.handlePositiveClick\n    }, this.positiveButtonProps), {\n      default: () => this.localizedPositiveText\n    })]);\n    (_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this);\n    return h(\"div\", {\n      class: [`${mergedClsPrefix}-popconfirm__panel`, this.themeClass],\n      style: this.cssVars\n    }, resolveWrappedSlot($slots.default, children => showIcon || children ? h(\"div\", {\n      class: `${mergedClsPrefix}-popconfirm__body`\n    }, showIcon ? h(\"div\", {\n      class: `${mergedClsPrefix}-popconfirm__icon`\n    }, resolveSlot($slots.icon, () => [h(NBaseIcon, {\n      clsPrefix: mergedClsPrefix\n    }, {\n      default: () => h(WarningIcon, null)\n    })])) : null, children) : null), actionContentNode ? h(\"div\", {\n      class: [`${mergedClsPrefix}-popconfirm__action`]\n    }, actionContentNode) : null);\n  }\n});","import { c, cB, cE } from \"../../../_utils/cssr/index.mjs\";\n// vars:\n// --n-font-size\n// --n-icon-size\n// --n-bezier\n// --n-icon-color\nexport default cB('popconfirm', [cE('body', `\n font-size: var(--n-font-size);\n display: flex;\n align-items: center;\n flex-wrap: nowrap;\n position: relative;\n `, [cE('icon', `\n display: flex;\n font-size: var(--n-icon-size);\n color: var(--n-icon-color);\n transition: color .3s var(--n-bezier);\n margin: 0 8px 0 0;\n `)]), cE('action', `\n display: flex;\n justify-content: flex-end;\n `, [c('&:not(:first-child)', 'margin-top: 8px'), cB('button', [c('&:not(:last-child)', 'margin-right: 8px;')])])]);","import { defineComponent, h, provide, ref } from 'vue';\nimport { useConfig, useTheme } from \"../../_mixins/index.mjs\";\nimport { call, keep, omit } from \"../../_utils/index.mjs\";\nimport { NPopover } from \"../../popover/index.mjs\";\nimport { popoverBaseProps } from \"../../popover/src/Popover.mjs\";\nimport { popconfirmLight } from \"../styles/index.mjs\";\nimport { popconfirmInjectionKey } from \"./interface.mjs\";\nimport PopconfirmPanel, { panelPropKeys } from \"./PopconfirmPanel.mjs\";\nimport style from \"./styles/index.cssr.mjs\";\nexport const popconfirmProps = Object.assign(Object.assign(Object.assign({}, useTheme.props), popoverBaseProps), {\n  positiveText: String,\n  negativeText: String,\n  showIcon: {\n    type: Boolean,\n    default: true\n  },\n  trigger: {\n    type: String,\n    default: 'click'\n  },\n  positiveButtonProps: Object,\n  negativeButtonProps: Object,\n  onPositiveClick: Function,\n  onNegativeClick: Function\n});\nexport default defineComponent({\n  name: 'Popconfirm',\n  props: popconfirmProps,\n  slots: Object,\n  __popover__: true,\n  setup(props) {\n    const {\n      mergedClsPrefixRef\n    } = useConfig();\n    const themeRef = useTheme('Popconfirm', '-popconfirm', style, popconfirmLight, props, mergedClsPrefixRef);\n    const popoverInstRef = ref(null);\n    function handlePositiveClick(e) {\n      var _a;\n      if (!((_a = popoverInstRef.value) === null || _a === void 0 ? void 0 : _a.getMergedShow())) return;\n      const {\n        onPositiveClick,\n        'onUpdate:show': onUpdateShow\n      } = props;\n      void Promise.resolve(onPositiveClick ? onPositiveClick(e) : true).then(value => {\n        var _a;\n        if (value === false) return;\n        (_a = popoverInstRef.value) === null || _a === void 0 ? void 0 : _a.setShow(false);\n        if (onUpdateShow) call(onUpdateShow, false);\n      });\n    }\n    function handleNegativeClick(e) {\n      var _a;\n      if (!((_a = popoverInstRef.value) === null || _a === void 0 ? void 0 : _a.getMergedShow())) return;\n      const {\n        onNegativeClick,\n        'onUpdate:show': onUpdateShow\n      } = props;\n      void Promise.resolve(onNegativeClick ? onNegativeClick(e) : true).then(value => {\n        var _a;\n        if (value === false) return;\n        (_a = popoverInstRef.value) === null || _a === void 0 ? void 0 : _a.setShow(false);\n        if (onUpdateShow) call(onUpdateShow, false);\n      });\n    }\n    provide(popconfirmInjectionKey, {\n      mergedThemeRef: themeRef,\n      mergedClsPrefixRef,\n      props\n    });\n    const returned = {\n      setShow(value) {\n        var _a;\n        (_a = popoverInstRef.value) === null || _a === void 0 ? void 0 : _a.setShow(value);\n      },\n      syncPosition() {\n        var _a;\n        (_a = popoverInstRef.value) === null || _a === void 0 ? void 0 : _a.syncPosition();\n      },\n      mergedTheme: themeRef,\n      popoverInstRef,\n      handlePositiveClick,\n      handleNegativeClick\n    };\n    return returned;\n  },\n  render() {\n    const {\n      $slots: slots,\n      $props: props,\n      mergedTheme\n    } = this;\n    return h(NPopover, omit(props, panelPropKeys, {\n      theme: mergedTheme.peers.Popover,\n      themeOverrides: mergedTheme.peerOverrides.Popover,\n      internalExtraClass: ['popconfirm'],\n      ref: 'popoverInstRef'\n    }), {\n      trigger: slots.trigger,\n      default: () => {\n        const panelProps = keep(props, panelPropKeys);\n        return h(PopconfirmPanel, Object.assign(Object.assign({}, panelProps), {\n          onPositiveClick: this.handlePositiveClick,\n          onNegativeClick: this.handleNegativeClick\n        }), slots);\n      }\n    });\n  }\n});","import { commonDark } from \"../../_styles/common/index.mjs\";\nconst qrcodeDark = {\n  name: 'QrCode',\n  common: commonDark,\n  self: vars => {\n    return {\n      borderRadius: vars.borderRadius\n    };\n  }\n};\nexport default qrcodeDark;","import { commonDark } from \"../../_styles/common/index.mjs\";\nexport const skeletonDark = {\n  name: 'Skeleton',\n  common: commonDark,\n  self(vars) {\n    const {\n      heightSmall,\n      heightMedium,\n      heightLarge,\n      borderRadius\n    } = vars;\n    return {\n      color: 'rgba(255, 255, 255, 0.12)',\n      colorEnd: 'rgba(255, 255, 255, 0.18)',\n      borderRadius,\n      heightSmall,\n      heightMedium,\n      heightLarge\n    };\n  }\n};","import { commonDark } from \"../../_styles/common/index.mjs\";\nconst splitDark = {\n  name: 'Split',\n  common: commonDark\n};\nexport default splitDark;","import { iconSwitchTransition } from \"../../../_styles/transitions/icon-switch.cssr.mjs\";\nimport { c, cB, cE, cM, cNotM } from \"../../../_utils/cssr/index.mjs\";\n// vars:\n// --n-bezier\n// --n-button-border-radius\n// --n-button-box-shadow\n// --n-button-color\n// --n-button-width\n// --n-button-width-pressed\n// --n-height\n// --n-offset\n// --n-rail-border-radius\n// --n-rail-color\n// --n-rail-color-active\n// --n-rail-height\n// --n-rail-width\n// --n-width\n// --n-box-shadow-focus\n// --n-loading-color\n// --n-text-color\n// --n-icon-color\nexport default cB('switch', `\n height: var(--n-height);\n min-width: var(--n-width);\n vertical-align: middle;\n user-select: none;\n -webkit-user-select: none;\n display: inline-flex;\n outline: none;\n justify-content: center;\n align-items: center;\n`, [cE('children-placeholder', `\n height: var(--n-rail-height);\n display: flex;\n flex-direction: column;\n overflow: hidden;\n pointer-events: none;\n visibility: hidden;\n `), cE('rail-placeholder', `\n display: flex;\n flex-wrap: none;\n `), cE('button-placeholder', `\n width: calc(1.75 * var(--n-rail-height));\n height: var(--n-rail-height);\n `), cB('base-loading', `\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translateX(-50%) translateY(-50%);\n font-size: calc(var(--n-button-width) - 4px);\n color: var(--n-loading-color);\n transition: color .3s var(--n-bezier);\n `, [iconSwitchTransition({\n  left: '50%',\n  top: '50%',\n  originalTransform: 'translateX(-50%) translateY(-50%)'\n})]), cE('checked, unchecked', `\n transition: color .3s var(--n-bezier);\n color: var(--n-text-color);\n box-sizing: border-box;\n position: absolute;\n white-space: nowrap;\n top: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n line-height: 1;\n `), cE('checked', `\n right: 0;\n padding-right: calc(1.25 * var(--n-rail-height) - var(--n-offset));\n `), cE('unchecked', `\n left: 0;\n justify-content: flex-end;\n padding-left: calc(1.25 * var(--n-rail-height) - var(--n-offset));\n `), c('&:focus', [cE('rail', `\n box-shadow: var(--n-box-shadow-focus);\n `)]), cM('round', [cE('rail', 'border-radius: calc(var(--n-rail-height) / 2);', [cE('button', 'border-radius: calc(var(--n-button-height) / 2);')])]), cNotM('disabled', [cNotM('icon', [cM('rubber-band', [cM('pressed', [cE('rail', [cE('button', 'max-width: var(--n-button-width-pressed);')])]), cE('rail', [c('&:active', [cE('button', 'max-width: var(--n-button-width-pressed);')])]), cM('active', [cM('pressed', [cE('rail', [cE('button', 'left: calc(100% - var(--n-offset) - var(--n-button-width-pressed));')])]), cE('rail', [c('&:active', [cE('button', 'left: calc(100% - var(--n-offset) - var(--n-button-width-pressed));')])])])])])]), cM('active', [cE('rail', [cE('button', 'left: calc(100% - var(--n-button-width) - var(--n-offset))')])]), cE('rail', `\n overflow: hidden;\n height: var(--n-rail-height);\n min-width: var(--n-rail-width);\n border-radius: var(--n-rail-border-radius);\n cursor: pointer;\n position: relative;\n transition:\n opacity .3s var(--n-bezier),\n background .3s var(--n-bezier),\n box-shadow .3s var(--n-bezier);\n background-color: var(--n-rail-color);\n `, [cE('button-icon', `\n color: var(--n-icon-color);\n transition: color .3s var(--n-bezier);\n font-size: calc(var(--n-button-height) - 4px);\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n line-height: 1;\n `, [iconSwitchTransition()]), cE('button', `\n align-items: center; \n top: var(--n-offset);\n left: var(--n-offset);\n height: var(--n-button-height);\n width: var(--n-button-width-pressed);\n max-width: var(--n-button-width);\n border-radius: var(--n-button-border-radius);\n background-color: var(--n-button-color);\n box-shadow: var(--n-button-box-shadow);\n box-sizing: border-box;\n cursor: inherit;\n content: \"\";\n position: absolute;\n transition:\n background-color .3s var(--n-bezier),\n left .3s var(--n-bezier),\n opacity .3s var(--n-bezier),\n max-width .3s var(--n-bezier),\n box-shadow .3s var(--n-bezier);\n `)]), cM('active', [cE('rail', 'background-color: var(--n-rail-color-active);')]), cM('loading', [cE('rail', `\n cursor: wait;\n `)]), cM('disabled', [cE('rail', `\n cursor: not-allowed;\n opacity: .5;\n `)])]);","import { depx, pxfy } from 'seemly';\nimport { useMergedState } from 'vooks';\nimport { computed, defineComponent, h, ref, toRef, watchEffect } from 'vue';\nimport { NBaseLoading, NIconSwitchTransition } from \"../../_internal/index.mjs\";\nimport { useConfig, useFormItem, useTheme, useThemeClass } from \"../../_mixins/index.mjs\";\nimport { call, createKey, isSlotEmpty, resolveWrappedSlot, warnOnce } from \"../../_utils/index.mjs\";\nimport { switchLight } from \"../styles/index.mjs\";\nimport style from \"./styles/index.cssr.mjs\";\nexport const switchProps = Object.assign(Object.assign({}, useTheme.props), {\n  size: {\n    type: String,\n    default: 'medium'\n  },\n  value: {\n    type: [String, Number, Boolean],\n    default: undefined\n  },\n  loading: Boolean,\n  defaultValue: {\n    type: [String, Number, Boolean],\n    default: false\n  },\n  disabled: {\n    type: Boolean,\n    default: undefined\n  },\n  round: {\n    type: Boolean,\n    default: true\n  },\n  'onUpdate:value': [Function, Array],\n  onUpdateValue: [Function, Array],\n  checkedValue: {\n    type: [String, Number, Boolean],\n    default: true\n  },\n  uncheckedValue: {\n    type: [String, Number, Boolean],\n    default: false\n  },\n  railStyle: Function,\n  rubberBand: {\n    type: Boolean,\n    default: true\n  },\n  /** @deprecated */\n  onChange: [Function, Array]\n});\nlet supportCssMax;\nexport default defineComponent({\n  name: 'Switch',\n  props: switchProps,\n  slots: Object,\n  setup(props) {\n    if (process.env.NODE_ENV !== 'production') {\n      watchEffect(() => {\n        if (props.onChange) {\n          warnOnce('switch', '`on-change` is deprecated, please use `on-update:value` instead.');\n        }\n      });\n    }\n    if (supportCssMax === undefined) {\n      if (typeof CSS !== 'undefined') {\n        if (typeof CSS.supports !== 'undefined') {\n          supportCssMax = CSS.supports('width', 'max(1px)');\n        } else {\n          supportCssMax = false;\n        }\n      } else {\n        // If you are using SSR, we assume that you are targeting browsers with\n        // recent versions\n        supportCssMax = true;\n      }\n    }\n    const {\n      mergedClsPrefixRef,\n      inlineThemeDisabled\n    } = useConfig(props);\n    const themeRef = useTheme('Switch', '-switch', style, switchLight, props, mergedClsPrefixRef);\n    const formItem = useFormItem(props);\n    const {\n      mergedSizeRef,\n      mergedDisabledRef\n    } = formItem;\n    const uncontrolledValueRef = ref(props.defaultValue);\n    const controlledValueRef = toRef(props, 'value');\n    const mergedValueRef = useMergedState(controlledValueRef, uncontrolledValueRef);\n    const checkedRef = computed(() => {\n      return mergedValueRef.value === props.checkedValue;\n    });\n    const pressedRef = ref(false);\n    const focusedRef = ref(false);\n    const mergedRailStyleRef = computed(() => {\n      const {\n        railStyle\n      } = props;\n      if (!railStyle) return undefined;\n      return railStyle({\n        focused: focusedRef.value,\n        checked: checkedRef.value\n      });\n    });\n    function doUpdateValue(value) {\n      const {\n        'onUpdate:value': _onUpdateValue,\n        onChange,\n        onUpdateValue\n      } = props;\n      const {\n        nTriggerFormInput,\n        nTriggerFormChange\n      } = formItem;\n      if (_onUpdateValue) call(_onUpdateValue, value);\n      if (onUpdateValue) call(onUpdateValue, value);\n      if (onChange) call(onChange, value);\n      uncontrolledValueRef.value = value;\n      nTriggerFormInput();\n      nTriggerFormChange();\n    }\n    function doFocus() {\n      const {\n        nTriggerFormFocus\n      } = formItem;\n      nTriggerFormFocus();\n    }\n    function doBlur() {\n      const {\n        nTriggerFormBlur\n      } = formItem;\n      nTriggerFormBlur();\n    }\n    function handleClick() {\n      if (props.loading || mergedDisabledRef.value) return;\n      if (mergedValueRef.value !== props.checkedValue) {\n        doUpdateValue(props.checkedValue);\n      } else {\n        doUpdateValue(props.uncheckedValue);\n      }\n    }\n    function handleFocus() {\n      focusedRef.value = true;\n      doFocus();\n    }\n    function handleBlur() {\n      focusedRef.value = false;\n      doBlur();\n      pressedRef.value = false;\n    }\n    function handleKeyup(e) {\n      if (props.loading || mergedDisabledRef.value) return;\n      if (e.key === ' ') {\n        if (mergedValueRef.value !== props.checkedValue) {\n          doUpdateValue(props.checkedValue);\n        } else {\n          doUpdateValue(props.uncheckedValue);\n        }\n        pressedRef.value = false;\n      }\n    }\n    function handleKeydown(e) {\n      if (props.loading || mergedDisabledRef.value) return;\n      if (e.key === ' ') {\n        e.preventDefault();\n        pressedRef.value = true;\n      }\n    }\n    const cssVarsRef = computed(() => {\n      const {\n        value: size\n      } = mergedSizeRef;\n      const {\n        self: {\n          opacityDisabled,\n          railColor,\n          railColorActive,\n          buttonBoxShadow,\n          buttonColor,\n          boxShadowFocus,\n          loadingColor,\n          textColor,\n          iconColor,\n          [createKey('buttonHeight', size)]: buttonHeight,\n          [createKey('buttonWidth', size)]: buttonWidth,\n          [createKey('buttonWidthPressed', size)]: buttonWidthPressed,\n          [createKey('railHeight', size)]: railHeight,\n          [createKey('railWidth', size)]: railWidth,\n          [createKey('railBorderRadius', size)]: railBorderRadius,\n          [createKey('buttonBorderRadius', size)]: buttonBorderRadius\n        },\n        common: {\n          cubicBezierEaseInOut\n        }\n      } = themeRef.value;\n      let offset;\n      let height;\n      let width;\n      if (supportCssMax) {\n        offset = `calc((${railHeight} - ${buttonHeight}) / 2)`;\n        height = `max(${railHeight}, ${buttonHeight})`;\n        width = `max(${railWidth}, calc(${railWidth} + ${buttonHeight} - ${railHeight}))`;\n      } else {\n        offset = pxfy((depx(railHeight) - depx(buttonHeight)) / 2);\n        height = pxfy(Math.max(depx(railHeight), depx(buttonHeight)));\n        width = depx(railHeight) > depx(buttonHeight) ? railWidth : pxfy(depx(railWidth) + depx(buttonHeight) - depx(railHeight));\n      }\n      return {\n        '--n-bezier': cubicBezierEaseInOut,\n        '--n-button-border-radius': buttonBorderRadius,\n        '--n-button-box-shadow': buttonBoxShadow,\n        '--n-button-color': buttonColor,\n        '--n-button-width': buttonWidth,\n        '--n-button-width-pressed': buttonWidthPressed,\n        '--n-button-height': buttonHeight,\n        '--n-height': height,\n        '--n-offset': offset,\n        '--n-opacity-disabled': opacityDisabled,\n        '--n-rail-border-radius': railBorderRadius,\n        '--n-rail-color': railColor,\n        '--n-rail-color-active': railColorActive,\n        '--n-rail-height': railHeight,\n        '--n-rail-width': railWidth,\n        '--n-width': width,\n        '--n-box-shadow-focus': boxShadowFocus,\n        '--n-loading-color': loadingColor,\n        '--n-text-color': textColor,\n        '--n-icon-color': iconColor\n      };\n    });\n    const themeClassHandle = inlineThemeDisabled ? useThemeClass('switch', computed(() => {\n      return mergedSizeRef.value[0];\n    }), cssVarsRef, props) : undefined;\n    return {\n      handleClick,\n      handleBlur,\n      handleFocus,\n      handleKeyup,\n      handleKeydown,\n      mergedRailStyle: mergedRailStyleRef,\n      pressed: pressedRef,\n      mergedClsPrefix: mergedClsPrefixRef,\n      mergedValue: mergedValueRef,\n      checked: checkedRef,\n      mergedDisabled: mergedDisabledRef,\n      cssVars: inlineThemeDisabled ? undefined : cssVarsRef,\n      themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,\n      onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender\n    };\n  },\n  render() {\n    const {\n      mergedClsPrefix,\n      mergedDisabled,\n      checked,\n      mergedRailStyle,\n      onRender,\n      $slots\n    } = this;\n    onRender === null || onRender === void 0 ? void 0 : onRender();\n    const {\n      checked: checkedSlot,\n      unchecked: uncheckedSlot,\n      icon: iconSlot,\n      'checked-icon': checkedIconSlot,\n      'unchecked-icon': uncheckedIconSlot\n    } = $slots;\n    const hasIcon = !(isSlotEmpty(iconSlot) && isSlotEmpty(checkedIconSlot) && isSlotEmpty(uncheckedIconSlot));\n    return h(\"div\", {\n      role: \"switch\",\n      \"aria-checked\": checked,\n      class: [`${mergedClsPrefix}-switch`, this.themeClass, hasIcon && `${mergedClsPrefix}-switch--icon`, checked && `${mergedClsPrefix}-switch--active`, mergedDisabled && `${mergedClsPrefix}-switch--disabled`, this.round && `${mergedClsPrefix}-switch--round`, this.loading && `${mergedClsPrefix}-switch--loading`, this.pressed && `${mergedClsPrefix}-switch--pressed`, this.rubberBand && `${mergedClsPrefix}-switch--rubber-band`],\n      tabindex: !this.mergedDisabled ? 0 : undefined,\n      style: this.cssVars,\n      onClick: this.handleClick,\n      onFocus: this.handleFocus,\n      onBlur: this.handleBlur,\n      onKeyup: this.handleKeyup,\n      onKeydown: this.handleKeydown\n    }, h(\"div\", {\n      class: `${mergedClsPrefix}-switch__rail`,\n      \"aria-hidden\": \"true\",\n      style: mergedRailStyle\n    }, resolveWrappedSlot(checkedSlot, checkedSlotChildren => resolveWrappedSlot(uncheckedSlot, uncheckedSlotChildren => {\n      if (checkedSlotChildren || uncheckedSlotChildren) {\n        return h(\"div\", {\n          \"aria-hidden\": true,\n          class: `${mergedClsPrefix}-switch__children-placeholder`\n        }, h(\"div\", {\n          class: `${mergedClsPrefix}-switch__rail-placeholder`\n        }, h(\"div\", {\n          class: `${mergedClsPrefix}-switch__button-placeholder`\n        }), checkedSlotChildren), h(\"div\", {\n          class: `${mergedClsPrefix}-switch__rail-placeholder`\n        }, h(\"div\", {\n          class: `${mergedClsPrefix}-switch__button-placeholder`\n        }), uncheckedSlotChildren));\n      }\n      return null;\n    })), h(\"div\", {\n      class: `${mergedClsPrefix}-switch__button`\n    }, resolveWrappedSlot(iconSlot, icon => resolveWrappedSlot(checkedIconSlot, checkedIcon => resolveWrappedSlot(uncheckedIconSlot, uncheckedIcon => {\n      return h(NIconSwitchTransition, null, {\n        default: () => this.loading ? h(NBaseLoading, {\n          key: \"loading\",\n          clsPrefix: mergedClsPrefix,\n          strokeWidth: 20\n        }) : this.checked && (checkedIcon || icon) ? h(\"div\", {\n          class: `${mergedClsPrefix}-switch__button-icon`,\n          key: checkedIcon ? 'checked-icon' : 'icon'\n        }, checkedIcon || icon) : !this.checked && (uncheckedIcon || icon) ? h(\"div\", {\n          class: `${mergedClsPrefix}-switch__button-icon`,\n          key: uncheckedIcon ? 'unchecked-icon' : 'icon'\n        }, uncheckedIcon || icon) : null\n      });\n    }))), resolveWrappedSlot(checkedSlot, children => children && h(\"div\", {\n      key: \"checked\",\n      class: `${mergedClsPrefix}-switch__checked`\n    }, children)), resolveWrappedSlot(uncheckedSlot, children => children && h(\"div\", {\n      key: \"unchecked\",\n      class: `${mergedClsPrefix}-switch__unchecked`\n    }, children)))));\n  }\n});","import { createInjectionKey } from \"../../_utils/index.mjs\";\nexport const tabsInjectionKey = createInjectionKey('n-tabs');","import { defineComponent, h, inject, watchEffect } from 'vue';\nimport { throwError, warnOnce } from \"../../_utils/index.mjs\";\nimport { tabsInjectionKey } from \"./interface.mjs\";\nexport const tabPaneProps = {\n  tab: [String, Number, Object, Function],\n  name: {\n    type: [String, Number],\n    required: true\n  },\n  disabled: Boolean,\n  displayDirective: {\n    type: String,\n    default: 'if'\n  },\n  closable: {\n    type: Boolean,\n    default: undefined\n  },\n  tabProps: Object,\n  /** @deprecated */\n  label: [String, Number, Object, Function]\n};\nexport default defineComponent({\n  __TAB_PANE__: true,\n  name: 'TabPane',\n  alias: ['TabPanel'],\n  props: tabPaneProps,\n  slots: Object,\n  setup(props) {\n    if (process.env.NODE_ENV !== 'production') {\n      watchEffect(() => {\n        if (props.label !== undefined) {\n          warnOnce('tab-pane', '`label` is deprecated, please use `tab` instead.');\n        }\n      });\n    }\n    const NTab = inject(tabsInjectionKey, null);\n    if (!NTab) {\n      throwError('tab-pane', '`n-tab-pane` must be placed inside `n-tabs`.');\n    }\n    return {\n      style: NTab.paneStyleRef,\n      class: NTab.paneClassRef,\n      mergedClsPrefix: NTab.mergedClsPrefixRef\n    };\n  },\n  render() {\n    return h(\"div\", {\n      class: [`${this.mergedClsPrefix}-tab-pane`, this.class],\n      style: this.style\n    }, this.$slots);\n  }\n});","import { computed, defineComponent, Fragment, h, inject, mergeProps } from 'vue';\nimport { NBaseClose, NBaseIcon } from \"../../_internal/index.mjs\";\nimport { AddIcon } from \"../../_internal/icons/index.mjs\";\nimport { omit, render } from \"../../_utils/index.mjs\";\nimport { tabsInjectionKey } from \"./interface.mjs\";\nimport { tabPaneProps } from \"./TabPane.mjs\";\nexport const tabProps = Object.assign({\n  internalLeftPadded: Boolean,\n  internalAddable: Boolean,\n  internalCreatedByPane: Boolean\n}, omit(tabPaneProps, ['displayDirective']));\nexport default defineComponent({\n  __TAB__: true,\n  inheritAttrs: false,\n  name: 'Tab',\n  props: tabProps,\n  setup(props) {\n    const {\n      mergedClsPrefixRef,\n      valueRef,\n      typeRef,\n      closableRef,\n      tabStyleRef,\n      addTabStyleRef,\n      tabClassRef,\n      addTabClassRef,\n      tabChangeIdRef,\n      onBeforeLeaveRef,\n      triggerRef,\n      handleAdd,\n      activateTab,\n      handleClose\n    } = inject(tabsInjectionKey);\n    return {\n      trigger: triggerRef,\n      mergedClosable: computed(() => {\n        if (props.internalAddable) return false;\n        const {\n          closable\n        } = props;\n        if (closable === undefined) return closableRef.value;\n        return closable;\n      }),\n      style: tabStyleRef,\n      addStyle: addTabStyleRef,\n      tabClass: tabClassRef,\n      addTabClass: addTabClassRef,\n      clsPrefix: mergedClsPrefixRef,\n      value: valueRef,\n      type: typeRef,\n      handleClose(e) {\n        e.stopPropagation();\n        if (props.disabled) return;\n        handleClose(props.name);\n      },\n      activateTab() {\n        if (props.disabled) return;\n        if (props.internalAddable) {\n          handleAdd();\n          return;\n        }\n        const {\n          name: nameProp\n        } = props;\n        const id = ++tabChangeIdRef.id;\n        if (nameProp !== valueRef.value) {\n          const {\n            value: onBeforeLeave\n          } = onBeforeLeaveRef;\n          if (!onBeforeLeave) {\n            activateTab(nameProp);\n          } else {\n            void Promise.resolve(onBeforeLeave(props.name, valueRef.value)).then(allowLeave => {\n              if (allowLeave && tabChangeIdRef.id === id) {\n                activateTab(nameProp);\n              }\n            });\n          }\n        }\n      }\n    };\n  },\n  render() {\n    const {\n      internalAddable,\n      clsPrefix,\n      name,\n      disabled,\n      label,\n      tab,\n      value,\n      mergedClosable,\n      trigger,\n      $slots: {\n        default: defaultSlot\n      }\n    } = this;\n    const mergedTab = label !== null && label !== void 0 ? label : tab;\n    return h(\"div\", {\n      class: `${clsPrefix}-tabs-tab-wrapper`\n    }, this.internalLeftPadded ? h(\"div\", {\n      class: `${clsPrefix}-tabs-tab-pad`\n    }) : null, h(\"div\", Object.assign({\n      key: name,\n      \"data-name\": name,\n      \"data-disabled\": disabled ? true : undefined\n    }, mergeProps({\n      class: [`${clsPrefix}-tabs-tab`, value === name && `${clsPrefix}-tabs-tab--active`, disabled && `${clsPrefix}-tabs-tab--disabled`, mergedClosable && `${clsPrefix}-tabs-tab--closable`, internalAddable && `${clsPrefix}-tabs-tab--addable`, internalAddable ? this.addTabClass : this.tabClass],\n      onClick: trigger === 'click' ? this.activateTab : undefined,\n      onMouseenter: trigger === 'hover' ? this.activateTab : undefined,\n      style: internalAddable ? this.addStyle : this.style\n    }, this.internalCreatedByPane ? this.tabProps || {} : this.$attrs)), h(\"span\", {\n      class: `${clsPrefix}-tabs-tab__label`\n    }, internalAddable ? h(Fragment, null, h(\"div\", {\n      class: `${clsPrefix}-tabs-tab__height-placeholder`\n    }, \"\\u00A0\"), h(NBaseIcon, {\n      clsPrefix: clsPrefix\n    }, {\n      default: () => h(AddIcon, null)\n    })) : defaultSlot ? defaultSlot() : typeof mergedTab === 'object' ? mergedTab // VNode\n    : render(mergedTab !== null && mergedTab !== void 0 ? mergedTab : name)), mergedClosable && this.type === 'card' ? h(NBaseClose, {\n      clsPrefix: clsPrefix,\n      class: `${clsPrefix}-tabs-tab__close`,\n      onClick: this.handleClose,\n      disabled: disabled\n    }) : null));\n  }\n});","import { c, cB, cE, cM, cNotM } from \"../../../_utils/cssr/index.mjs\";\n// vars:\n// --n-bezier\n// --n-close-size\n// --n-close-color-hover\n// --n-close-color-pressed\n// --n-close-icon-size\n// --n-close-icon-color\n// --n-close-icon-color-hover\n// --n-close-icon-color-pressed\n// --n-bar-color\n// --n-tab-font-size\n// --n-tab-text-color\n// --n-tab-text-color-active\n// --n-tab-text-color-disabled\n// --n-tab-text-color-hover\n// --n-pane-text-color\n// --n-tab-border-color\n// --n-tab-border-radius\n// --n-tab-color\n// --n-tab-font-weight\n// --n-tab-font-weight-active\n// --n-tab-gap\n// --n-tab-gap-vertical\n// --n-tab-padding\n// --n-pane-padding-left\n// --n-pane-padding-right\n// --n-pane-padding-top\n// --n-pane-padding-bottom\n// --n-color-segment\n// --n-font-weight-strong\n// --n-tab-color-segment\nexport default cB('tabs', `\n box-sizing: border-box;\n width: 100%;\n display: flex;\n flex-direction: column;\n transition:\n background-color .3s var(--n-bezier),\n border-color .3s var(--n-bezier);\n`, [cM('segment-type', [cB('tabs-rail', [c('&.transition-disabled', [cB('tabs-capsule', `\n transition: none;\n `)])])]), cM('top', [cB('tab-pane', `\n padding: var(--n-pane-padding-top) var(--n-pane-padding-right) var(--n-pane-padding-bottom) var(--n-pane-padding-left);\n `)]), cM('left', [cB('tab-pane', `\n padding: var(--n-pane-padding-right) var(--n-pane-padding-bottom) var(--n-pane-padding-left) var(--n-pane-padding-top);\n `)]), cM('left, right', `\n flex-direction: row;\n `, [cB('tabs-bar', `\n width: 2px;\n right: 0;\n transition:\n top .2s var(--n-bezier),\n max-height .2s var(--n-bezier),\n background-color .3s var(--n-bezier);\n `), cB('tabs-tab', `\n padding: var(--n-tab-padding-vertical); \n `)]), cM('right', `\n flex-direction: row-reverse;\n `, [cB('tab-pane', `\n padding: var(--n-pane-padding-left) var(--n-pane-padding-top) var(--n-pane-padding-right) var(--n-pane-padding-bottom);\n `), cB('tabs-bar', `\n left: 0;\n `)]), cM('bottom', `\n flex-direction: column-reverse;\n justify-content: flex-end;\n `, [cB('tab-pane', `\n padding: var(--n-pane-padding-bottom) var(--n-pane-padding-right) var(--n-pane-padding-top) var(--n-pane-padding-left);\n `), cB('tabs-bar', `\n top: 0;\n `)]), cB('tabs-rail', `\n position: relative;\n padding: 3px;\n border-radius: var(--n-tab-border-radius);\n width: 100%;\n background-color: var(--n-color-segment);\n transition: background-color .3s var(--n-bezier);\n display: flex;\n align-items: center;\n `, [cB('tabs-capsule', `\n border-radius: var(--n-tab-border-radius);\n position: absolute;\n pointer-events: none;\n background-color: var(--n-tab-color-segment);\n box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .08);\n transition: transform 0.3s var(--n-bezier);\n `), cB('tabs-tab-wrapper', `\n flex-basis: 0;\n flex-grow: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n `, [cB('tabs-tab', `\n overflow: hidden;\n border-radius: var(--n-tab-border-radius);\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n `, [cM('active', `\n font-weight: var(--n-font-weight-strong);\n color: var(--n-tab-text-color-active);\n `), c('&:hover', `\n color: var(--n-tab-text-color-hover);\n `)])])]), cM('flex', [cB('tabs-nav', `\n width: 100%;\n position: relative;\n `, [cB('tabs-wrapper', `\n width: 100%;\n `, [cB('tabs-tab', `\n margin-right: 0;\n `)])])]), cB('tabs-nav', `\n box-sizing: border-box;\n line-height: 1.5;\n display: flex;\n transition: border-color .3s var(--n-bezier);\n `, [cE('prefix, suffix', `\n display: flex;\n align-items: center;\n `), cE('prefix', 'padding-right: 16px;'), cE('suffix', 'padding-left: 16px;')]), cM('top, bottom', [cB('tabs-nav-scroll-wrapper', [c('&::before', `\n top: 0;\n bottom: 0;\n left: 0;\n width: 20px;\n `), c('&::after', `\n top: 0;\n bottom: 0;\n right: 0;\n width: 20px;\n `), cM('shadow-start', [c('&::before', `\n box-shadow: inset 10px 0 8px -8px rgba(0, 0, 0, .12);\n `)]), cM('shadow-end', [c('&::after', `\n box-shadow: inset -10px 0 8px -8px rgba(0, 0, 0, .12);\n `)])])]), cM('left, right', [cB('tabs-nav-scroll-content', `\n flex-direction: column;\n `), cB('tabs-nav-scroll-wrapper', [c('&::before', `\n top: 0;\n left: 0;\n right: 0;\n height: 20px;\n `), c('&::after', `\n bottom: 0;\n left: 0;\n right: 0;\n height: 20px;\n `), cM('shadow-start', [c('&::before', `\n box-shadow: inset 0 10px 8px -8px rgba(0, 0, 0, .12);\n `)]), cM('shadow-end', [c('&::after', `\n box-shadow: inset 0 -10px 8px -8px rgba(0, 0, 0, .12);\n `)])])]), cB('tabs-nav-scroll-wrapper', `\n flex: 1;\n position: relative;\n overflow: hidden;\n `, [cB('tabs-nav-y-scroll', `\n height: 100%;\n width: 100%;\n overflow-y: auto; \n scrollbar-width: none;\n `, [c('&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb', `\n width: 0;\n height: 0;\n display: none;\n `)]), c('&::before, &::after', `\n transition: box-shadow .3s var(--n-bezier);\n pointer-events: none;\n content: \"\";\n position: absolute;\n z-index: 1;\n `)]), cB('tabs-nav-scroll-content', `\n display: flex;\n position: relative;\n min-width: 100%;\n min-height: 100%;\n width: fit-content;\n box-sizing: border-box;\n `), cB('tabs-wrapper', `\n display: inline-flex;\n flex-wrap: nowrap;\n position: relative;\n `), cB('tabs-tab-wrapper', `\n display: flex;\n flex-wrap: nowrap;\n flex-shrink: 0;\n flex-grow: 0;\n `), cB('tabs-tab', `\n cursor: pointer;\n white-space: nowrap;\n flex-wrap: nowrap;\n display: inline-flex;\n align-items: center;\n color: var(--n-tab-text-color);\n font-size: var(--n-tab-font-size);\n background-clip: padding-box;\n padding: var(--n-tab-padding);\n transition:\n box-shadow .3s var(--n-bezier),\n color .3s var(--n-bezier),\n background-color .3s var(--n-bezier),\n border-color .3s var(--n-bezier);\n `, [cM('disabled', {\n  cursor: 'not-allowed'\n}), cE('close', `\n margin-left: 6px;\n transition:\n background-color .3s var(--n-bezier),\n color .3s var(--n-bezier);\n `), cE('label', `\n display: flex;\n align-items: center;\n z-index: 1;\n `)]), cB('tabs-bar', `\n position: absolute;\n bottom: 0;\n height: 2px;\n border-radius: 1px;\n background-color: var(--n-bar-color);\n transition:\n left .2s var(--n-bezier),\n max-width .2s var(--n-bezier),\n opacity .3s var(--n-bezier),\n background-color .3s var(--n-bezier);\n `, [c('&.transition-disabled', `\n transition: none;\n `), cM('disabled', `\n background-color: var(--n-tab-text-color-disabled)\n `)]), cB('tabs-pane-wrapper', `\n position: relative;\n overflow: hidden;\n transition: max-height .2s var(--n-bezier);\n `), cB('tab-pane', `\n color: var(--n-pane-text-color);\n width: 100%;\n transition:\n color .3s var(--n-bezier),\n background-color .3s var(--n-bezier),\n opacity .2s var(--n-bezier);\n left: 0;\n right: 0;\n top: 0;\n `, [c('&.next-transition-leave-active, &.prev-transition-leave-active, &.next-transition-enter-active, &.prev-transition-enter-active', `\n transition:\n color .3s var(--n-bezier),\n background-color .3s var(--n-bezier),\n transform .2s var(--n-bezier),\n opacity .2s var(--n-bezier);\n `), c('&.next-transition-leave-active, &.prev-transition-leave-active', `\n position: absolute;\n `), c('&.next-transition-enter-from, &.prev-transition-leave-to', `\n transform: translateX(32px);\n opacity: 0;\n `), c('&.next-transition-leave-to, &.prev-transition-enter-from', `\n transform: translateX(-32px);\n opacity: 0;\n `), c('&.next-transition-leave-from, &.next-transition-enter-to, &.prev-transition-leave-from, &.prev-transition-enter-to', `\n transform: translateX(0);\n opacity: 1;\n `)]), cB('tabs-tab-pad', `\n box-sizing: border-box;\n width: var(--n-tab-gap);\n flex-grow: 0;\n flex-shrink: 0;\n `), cM('line-type, bar-type', [cB('tabs-tab', `\n font-weight: var(--n-tab-font-weight);\n box-sizing: border-box;\n vertical-align: bottom;\n `, [c('&:hover', {\n  color: 'var(--n-tab-text-color-hover)'\n}), cM('active', `\n color: var(--n-tab-text-color-active);\n font-weight: var(--n-tab-font-weight-active);\n `), cM('disabled', {\n  color: 'var(--n-tab-text-color-disabled)'\n})])]), cB('tabs-nav', [cM('line-type', [cM('top', [cE('prefix, suffix', `\n border-bottom: 1px solid var(--n-tab-border-color);\n `), cB('tabs-nav-scroll-content', `\n border-bottom: 1px solid var(--n-tab-border-color);\n `), cB('tabs-bar', `\n bottom: -1px;\n `)]), cM('left', [cE('prefix, suffix', `\n border-right: 1px solid var(--n-tab-border-color);\n `), cB('tabs-nav-scroll-content', `\n border-right: 1px solid var(--n-tab-border-color);\n `), cB('tabs-bar', `\n right: -1px;\n `)]), cM('right', [cE('prefix, suffix', `\n border-left: 1px solid var(--n-tab-border-color);\n `), cB('tabs-nav-scroll-content', `\n border-left: 1px solid var(--n-tab-border-color);\n `), cB('tabs-bar', `\n left: -1px;\n `)]), cM('bottom', [cE('prefix, suffix', `\n border-top: 1px solid var(--n-tab-border-color);\n `), cB('tabs-nav-scroll-content', `\n border-top: 1px solid var(--n-tab-border-color);\n `), cB('tabs-bar', `\n top: -1px;\n `)]), cE('prefix, suffix', `\n transition: border-color .3s var(--n-bezier);\n `), cB('tabs-nav-scroll-content', `\n transition: border-color .3s var(--n-bezier);\n `), cB('tabs-bar', `\n border-radius: 0;\n `)]), cM('card-type', [cE('prefix, suffix', `\n transition: border-color .3s var(--n-bezier);\n `), cB('tabs-pad', `\n flex-grow: 1;\n transition: border-color .3s var(--n-bezier);\n `), cB('tabs-tab-pad', `\n transition: border-color .3s var(--n-bezier);\n `), cB('tabs-tab', `\n font-weight: var(--n-tab-font-weight);\n border: 1px solid var(--n-tab-border-color);\n background-color: var(--n-tab-color);\n box-sizing: border-box;\n position: relative;\n vertical-align: bottom;\n display: flex;\n justify-content: space-between;\n font-size: var(--n-tab-font-size);\n color: var(--n-tab-text-color);\n `, [cM('addable', `\n padding-left: 8px;\n padding-right: 8px;\n font-size: 16px;\n justify-content: center;\n `, [cE('height-placeholder', `\n width: 0;\n font-size: var(--n-tab-font-size);\n `), cNotM('disabled', [c('&:hover', `\n color: var(--n-tab-text-color-hover);\n `)])]), cM('closable', 'padding-right: 8px;'), cM('active', `\n background-color: #0000;\n font-weight: var(--n-tab-font-weight-active);\n color: var(--n-tab-text-color-active);\n `), cM('disabled', 'color: var(--n-tab-text-color-disabled);')])]), cM('left, right', `\n flex-direction: column; \n `, [cE('prefix, suffix', `\n padding: var(--n-tab-padding-vertical);\n `), cB('tabs-wrapper', `\n flex-direction: column;\n `), cB('tabs-tab-wrapper', `\n flex-direction: column;\n `, [cB('tabs-tab-pad', `\n height: var(--n-tab-gap-vertical);\n width: 100%;\n `)])]), cM('top', [cM('card-type', [cB('tabs-scroll-padding', 'border-bottom: 1px solid var(--n-tab-border-color);'), cE('prefix, suffix', `\n border-bottom: 1px solid var(--n-tab-border-color);\n `), cB('tabs-tab', `\n border-top-left-radius: var(--n-tab-border-radius);\n border-top-right-radius: var(--n-tab-border-radius);\n `, [cM('active', `\n border-bottom: 1px solid #0000;\n `)]), cB('tabs-tab-pad', `\n border-bottom: 1px solid var(--n-tab-border-color);\n `), cB('tabs-pad', `\n border-bottom: 1px solid var(--n-tab-border-color);\n `)])]), cM('left', [cM('card-type', [cB('tabs-scroll-padding', 'border-right: 1px solid var(--n-tab-border-color);'), cE('prefix, suffix', `\n border-right: 1px solid var(--n-tab-border-color);\n `), cB('tabs-tab', `\n border-top-left-radius: var(--n-tab-border-radius);\n border-bottom-left-radius: var(--n-tab-border-radius);\n `, [cM('active', `\n border-right: 1px solid #0000;\n `)]), cB('tabs-tab-pad', `\n border-right: 1px solid var(--n-tab-border-color);\n `), cB('tabs-pad', `\n border-right: 1px solid var(--n-tab-border-color);\n `)])]), cM('right', [cM('card-type', [cB('tabs-scroll-padding', 'border-left: 1px solid var(--n-tab-border-color);'), cE('prefix, suffix', `\n border-left: 1px solid var(--n-tab-border-color);\n `), cB('tabs-tab', `\n border-top-right-radius: var(--n-tab-border-radius);\n border-bottom-right-radius: var(--n-tab-border-radius);\n `, [cM('active', `\n border-left: 1px solid #0000;\n `)]), cB('tabs-tab-pad', `\n border-left: 1px solid var(--n-tab-border-color);\n `), cB('tabs-pad', `\n border-left: 1px solid var(--n-tab-border-color);\n `)])]), cM('bottom', [cM('card-type', [cB('tabs-scroll-padding', 'border-top: 1px solid var(--n-tab-border-color);'), cE('prefix, suffix', `\n border-top: 1px solid var(--n-tab-border-color);\n `), cB('tabs-tab', `\n border-bottom-left-radius: var(--n-tab-border-radius);\n border-bottom-right-radius: var(--n-tab-border-radius);\n `, [cM('active', `\n border-top: 1px solid #0000;\n `)]), cB('tabs-tab-pad', `\n border-top: 1px solid var(--n-tab-border-color);\n `), cB('tabs-pad', `\n border-top: 1px solid var(--n-tab-border-color);\n `)])])])]);","import { throttle } from 'lodash-es';\nimport { depx, getPadding } from 'seemly';\nimport { onFontsReady, useCompitable, useMergedState } from 'vooks';\nimport { cloneVNode, computed, defineComponent, h, nextTick, onMounted, provide, ref, toRef, TransitionGroup, vShow, watch, watchEffect, withDirectives } from 'vue';\nimport { VResizeObserver, VXScroll } from 'vueuc';\nimport { useConfig, useTheme, useThemeClass } from \"../../_mixins/index.mjs\";\nimport { call, createKey, flatten, resolveWrappedSlot, warnOnce } from \"../../_utils/index.mjs\";\nimport { tabsLight } from \"../styles/index.mjs\";\nimport { tabsInjectionKey } from \"./interface.mjs\";\nimport style from \"./styles/index.cssr.mjs\";\nimport Tab from \"./Tab.mjs\";\nexport const tabsProps = Object.assign(Object.assign({}, useTheme.props), {\n  value: [String, Number],\n  defaultValue: [String, Number],\n  trigger: {\n    type: String,\n    default: 'click'\n  },\n  type: {\n    type: String,\n    default: 'bar'\n  },\n  closable: Boolean,\n  justifyContent: String,\n  size: {\n    type: String,\n    default: 'medium'\n  },\n  placement: {\n    type: String,\n    default: 'top'\n  },\n  tabStyle: [String, Object],\n  tabClass: String,\n  addTabStyle: [String, Object],\n  addTabClass: String,\n  barWidth: Number,\n  paneClass: String,\n  paneStyle: [String, Object],\n  paneWrapperClass: String,\n  paneWrapperStyle: [String, Object],\n  addable: [Boolean, Object],\n  tabsPadding: {\n    type: Number,\n    default: 0\n  },\n  animated: Boolean,\n  onBeforeLeave: Function,\n  onAdd: Function,\n  'onUpdate:value': [Function, Array],\n  onUpdateValue: [Function, Array],\n  onClose: [Function, Array],\n  // deprecated\n  labelSize: String,\n  activeName: [String, Number],\n  onActiveNameChange: [Function, Array]\n});\nexport default defineComponent({\n  name: 'Tabs',\n  props: tabsProps,\n  slots: Object,\n  setup(props, {\n    slots\n  }) {\n    var _a, _b, _c, _d;\n    if (process.env.NODE_ENV !== 'production') {\n      watchEffect(() => {\n        if (props.labelSize !== undefined) {\n          warnOnce('tabs', '`label-size` is deprecated, please use `size` instead.');\n        }\n        if (props.activeName !== undefined) {\n          warnOnce('tabs', '`active-name` is deprecated, please use `value` instead.');\n        }\n        if (props.onActiveNameChange !== undefined) {\n          warnOnce('tabs', '`on-active-name-change` is deprecated, please use `on-update:value` instead.');\n        }\n      });\n    }\n    const {\n      mergedClsPrefixRef,\n      inlineThemeDisabled\n    } = useConfig(props);\n    const themeRef = useTheme('Tabs', '-tabs', style, tabsLight, props, mergedClsPrefixRef);\n    const tabsElRef = ref(null);\n    const barElRef = ref(null);\n    const scrollWrapperElRef = ref(null);\n    const addTabInstRef = ref(null);\n    const xScrollInstRef = ref(null);\n    const yScrollElRef = ref(null);\n    const startReachedRef = ref(true);\n    const endReachedRef = ref(true);\n    const compitableSizeRef = useCompitable(props, ['labelSize', 'size']);\n    const compitableValueRef = useCompitable(props, ['activeName', 'value']);\n    const uncontrolledValueRef = ref((_b = (_a = compitableValueRef.value) !== null && _a !== void 0 ? _a : props.defaultValue) !== null && _b !== void 0 ? _b : slots.default ? (_d = (_c = flatten(slots.default())[0]) === null || _c === void 0 ? void 0 : _c.props) === null || _d === void 0 ? void 0 : _d.name : null);\n    const mergedValueRef = useMergedState(compitableValueRef, uncontrolledValueRef);\n    const tabChangeIdRef = {\n      id: 0\n    };\n    const tabWrapperStyleRef = computed(() => {\n      if (!props.justifyContent || props.type === 'card') return undefined;\n      return {\n        display: 'flex',\n        justifyContent: props.justifyContent\n      };\n    });\n    watch(mergedValueRef, () => {\n      tabChangeIdRef.id = 0;\n      updateCurrentBarStyle();\n      updateCurrentScrollPosition();\n    });\n    function getCurrentEl() {\n      var _a;\n      const {\n        value\n      } = mergedValueRef;\n      if (value === null) return null;\n      const tabEl = (_a = tabsElRef.value) === null || _a === void 0 ? void 0 : _a.querySelector(`[data-name=\"${value}\"]`);\n      return tabEl;\n    }\n    function updateBarStyle(tabEl) {\n      if (props.type === 'card') return;\n      const {\n        value: barEl\n      } = barElRef;\n      if (!barEl) return;\n      const barIsHide = barEl.style.opacity === '0';\n      if (tabEl) {\n        const disabledClassName = `${mergedClsPrefixRef.value}-tabs-bar--disabled`;\n        const {\n          barWidth,\n          placement\n        } = props;\n        if (tabEl.dataset.disabled === 'true') {\n          barEl.classList.add(disabledClassName);\n        } else {\n          barEl.classList.remove(disabledClassName);\n        }\n        if (['top', 'bottom'].includes(placement)) {\n          clearBarStyle(['top', 'maxHeight', 'height']);\n          if (typeof barWidth === 'number' && tabEl.offsetWidth >= barWidth) {\n            const offsetDiffLeft = Math.floor((tabEl.offsetWidth - barWidth) / 2) + tabEl.offsetLeft;\n            barEl.style.left = `${offsetDiffLeft}px`;\n            barEl.style.maxWidth = `${barWidth}px`;\n          } else {\n            barEl.style.left = `${tabEl.offsetLeft}px`;\n            barEl.style.maxWidth = `${tabEl.offsetWidth}px`;\n          }\n          barEl.style.width = '8192px';\n          if (barIsHide) {\n            barEl.style.transition = 'none';\n          }\n          void barEl.offsetWidth;\n          if (barIsHide) {\n            barEl.style.transition = '';\n            barEl.style.opacity = '1';\n          }\n        } else {\n          clearBarStyle(['left', 'maxWidth', 'width']);\n          if (typeof barWidth === 'number' && tabEl.offsetHeight >= barWidth) {\n            const offsetDiffTop = Math.floor((tabEl.offsetHeight - barWidth) / 2) + tabEl.offsetTop;\n            barEl.style.top = `${offsetDiffTop}px`;\n            barEl.style.maxHeight = `${barWidth}px`;\n          } else {\n            barEl.style.top = `${tabEl.offsetTop}px`;\n            barEl.style.maxHeight = `${tabEl.offsetHeight}px`;\n          }\n          barEl.style.height = '8192px';\n          if (barIsHide) {\n            barEl.style.transition = 'none';\n          }\n          void barEl.offsetHeight;\n          if (barIsHide) {\n            barEl.style.transition = '';\n            barEl.style.opacity = '1';\n          }\n        }\n      }\n    }\n    function hideBarStyle() {\n      if (props.type === 'card') return;\n      const {\n        value: barEl\n      } = barElRef;\n      if (!barEl) return;\n      barEl.style.opacity = '0';\n    }\n    function clearBarStyle(styleProps) {\n      const {\n        value: barEl\n      } = barElRef;\n      if (!barEl) return;\n      for (const prop of styleProps) {\n        barEl.style[prop] = '';\n      }\n    }\n    function updateCurrentBarStyle() {\n      if (props.type === 'card') return;\n      const tabEl = getCurrentEl();\n      if (tabEl) {\n        updateBarStyle(tabEl);\n      } else {\n        hideBarStyle();\n      }\n    }\n    function updateCurrentScrollPosition() {\n      var _a;\n      const scrollWrapperEl = (_a = xScrollInstRef.value) === null || _a === void 0 ? void 0 : _a.$el;\n      if (!scrollWrapperEl) return;\n      const tabEl = getCurrentEl();\n      if (!tabEl) return;\n      const {\n        scrollLeft: scrollWrapperElScrollLeft,\n        offsetWidth: scrollWrapperElOffsetWidth\n      } = scrollWrapperEl;\n      const {\n        offsetLeft: tabElOffsetLeft,\n        offsetWidth: tabElOffsetWidth\n      } = tabEl;\n      if (scrollWrapperElScrollLeft > tabElOffsetLeft) {\n        scrollWrapperEl.scrollTo({\n          top: 0,\n          left: tabElOffsetLeft,\n          behavior: 'smooth'\n        });\n      } else if (tabElOffsetLeft + tabElOffsetWidth > scrollWrapperElScrollLeft + scrollWrapperElOffsetWidth) {\n        scrollWrapperEl.scrollTo({\n          top: 0,\n          left: tabElOffsetLeft + tabElOffsetWidth - scrollWrapperElOffsetWidth,\n          behavior: 'smooth'\n        });\n      }\n    }\n    const tabsPaneWrapperRef = ref(null);\n    let fromHeight = 0;\n    let hangingTransition = null;\n    function onAnimationBeforeLeave(el) {\n      const tabsPaneWrapperEl = tabsPaneWrapperRef.value;\n      if (tabsPaneWrapperEl) {\n        fromHeight = el.getBoundingClientRect().height;\n        const fromHeightPx = `${fromHeight}px`;\n        const applyFromStyle = () => {\n          tabsPaneWrapperEl.style.height = fromHeightPx;\n          tabsPaneWrapperEl.style.maxHeight = fromHeightPx;\n        };\n        if (!hangingTransition) {\n          hangingTransition = applyFromStyle;\n        } else {\n          applyFromStyle();\n          hangingTransition();\n          hangingTransition = null;\n        }\n      }\n    }\n    function onAnimationEnter(el) {\n      const tabsPaneWrapperEl = tabsPaneWrapperRef.value;\n      if (tabsPaneWrapperEl) {\n        const targetHeight = el.getBoundingClientRect().height;\n        const applyTargetStyle = () => {\n          void document.body.offsetHeight;\n          tabsPaneWrapperEl.style.maxHeight = `${targetHeight}px`;\n          tabsPaneWrapperEl.style.height = `${Math.max(fromHeight, targetHeight)}px`;\n        };\n        if (!hangingTransition) {\n          hangingTransition = applyTargetStyle;\n        } else {\n          hangingTransition();\n          hangingTransition = null;\n          applyTargetStyle();\n        }\n      }\n    }\n    function onAnimationAfterEnter() {\n      const tabsPaneWrapperEl = tabsPaneWrapperRef.value;\n      if (tabsPaneWrapperEl) {\n        tabsPaneWrapperEl.style.maxHeight = '';\n        tabsPaneWrapperEl.style.height = '';\n        const {\n          paneWrapperStyle\n        } = props;\n        if (typeof paneWrapperStyle === 'string') {\n          tabsPaneWrapperEl.style.cssText = paneWrapperStyle;\n        } else if (paneWrapperStyle) {\n          const {\n            maxHeight,\n            height\n          } = paneWrapperStyle;\n          if (maxHeight !== undefined) {\n            tabsPaneWrapperEl.style.maxHeight = maxHeight;\n          }\n          if (height !== undefined) {\n            tabsPaneWrapperEl.style.height = height;\n          }\n        }\n      }\n    }\n    const renderNameListRef = {\n      value: []\n    };\n    const animationDirectionRef = ref('next');\n    function activateTab(panelName) {\n      const currentValue = mergedValueRef.value;\n      let dir = 'next';\n      for (const name of renderNameListRef.value) {\n        if (name === currentValue) {\n          break;\n        }\n        if (name === panelName) {\n          dir = 'prev';\n          break;\n        }\n      }\n      animationDirectionRef.value = dir;\n      doUpdateValue(panelName);\n    }\n    function doUpdateValue(panelName) {\n      const {\n        onActiveNameChange,\n        onUpdateValue,\n        'onUpdate:value': _onUpdateValue\n      } = props;\n      if (onActiveNameChange) {\n        call(onActiveNameChange, panelName);\n      }\n      if (onUpdateValue) call(onUpdateValue, panelName);\n      if (_onUpdateValue) call(_onUpdateValue, panelName);\n      uncontrolledValueRef.value = panelName;\n    }\n    function handleClose(panelName) {\n      const {\n        onClose\n      } = props;\n      if (onClose) call(onClose, panelName);\n    }\n    let firstTimeUpdatePosition = true;\n    function updateBarPositionInstantly() {\n      const {\n        value: barEl\n      } = barElRef;\n      if (!barEl) return;\n      if (!firstTimeUpdatePosition) firstTimeUpdatePosition = false;\n      const disableTransitionClassName = 'transition-disabled';\n      barEl.classList.add(disableTransitionClassName);\n      updateCurrentBarStyle();\n      // here we don't need to force layout after update bar style\n      // since deriveScrollShadow will force layout\n      barEl.classList.remove(disableTransitionClassName);\n    }\n    const segmentCapsuleElRef = ref(null);\n    function updateSegmentPosition({\n      transitionDisabled\n    }) {\n      const tabsEl = tabsElRef.value;\n      if (!tabsEl) return;\n      if (transitionDisabled) tabsEl.classList.add('transition-disabled');\n      const activeTabEl = getCurrentEl();\n      if (activeTabEl && segmentCapsuleElRef.value) {\n        // move segment capsule to match the position of the active tab\n        segmentCapsuleElRef.value.style.width = `${activeTabEl.offsetWidth}px`;\n        segmentCapsuleElRef.value.style.height = `${activeTabEl.offsetHeight}px`;\n        segmentCapsuleElRef.value.style.transform = `translateX(${activeTabEl.offsetLeft - depx(getComputedStyle(tabsEl).paddingLeft)}px)`;\n        if (transitionDisabled) {\n          void segmentCapsuleElRef.value.offsetWidth;\n        }\n      }\n      if (transitionDisabled) {\n        tabsEl.classList.remove('transition-disabled');\n      }\n    }\n    watch([mergedValueRef], () => {\n      if (props.type === 'segment') {\n        void nextTick(() => {\n          updateSegmentPosition({\n            transitionDisabled: false\n          });\n        });\n      }\n    });\n    onMounted(() => {\n      if (props.type === 'segment') {\n        updateSegmentPosition({\n          transitionDisabled: true\n        });\n      }\n    });\n    let memorizedWidth = 0;\n    function _handleNavResize(entry) {\n      var _a, _b;\n      if (entry.contentRect.width === 0 && entry.contentRect.height === 0) {\n        return;\n      }\n      if (memorizedWidth === entry.contentRect.width) {\n        return;\n      }\n      memorizedWidth = entry.contentRect.width;\n      const {\n        type\n      } = props;\n      if (type === 'line' || type === 'bar') {\n        if (firstTimeUpdatePosition || ((_a = props.justifyContent) === null || _a === void 0 ? void 0 : _a.startsWith('space'))) {\n          updateBarPositionInstantly();\n        }\n      }\n      if (type !== 'segment') {\n        const {\n          placement\n        } = props;\n        deriveScrollShadow((placement === 'top' || placement === 'bottom' ? (_b = xScrollInstRef.value) === null || _b === void 0 ? void 0 : _b.$el : yScrollElRef.value) || null);\n      }\n    }\n    const handleNavResize = throttle(_handleNavResize, 64);\n    watch([() => props.justifyContent, () => props.size], () => {\n      void nextTick(() => {\n        const {\n          type\n        } = props;\n        if (type === 'line' || type === 'bar') {\n          updateBarPositionInstantly();\n        }\n      });\n    });\n    const addTabFixedRef = ref(false);\n    function _handleTabsResize(entry) {\n      var _a;\n      const {\n        target,\n        contentRect: {\n          width,\n          height\n        }\n      } = entry;\n      const containerWidth = target.parentElement.parentElement.offsetWidth;\n      const containerHeight = target.parentElement.parentElement.offsetHeight;\n      const {\n        placement\n      } = props;\n      if (!addTabFixedRef.value) {\n        if (placement === 'top' || placement === 'bottom') {\n          if (containerWidth < width) {\n            addTabFixedRef.value = true;\n          }\n        } else {\n          if (containerHeight < height) {\n            addTabFixedRef.value = true;\n          }\n        }\n      } else {\n        const {\n          value: addTabInst\n        } = addTabInstRef;\n        if (!addTabInst) return;\n        if (placement === 'top' || placement === 'bottom') {\n          if (containerWidth - width > addTabInst.$el.offsetWidth) {\n            addTabFixedRef.value = false;\n          }\n        } else {\n          if (containerHeight - height > addTabInst.$el.offsetHeight) {\n            addTabFixedRef.value = false;\n          }\n        }\n      }\n      deriveScrollShadow(((_a = xScrollInstRef.value) === null || _a === void 0 ? void 0 : _a.$el) || null);\n    }\n    const handleTabsResize = throttle(_handleTabsResize, 64);\n    function handleAdd() {\n      const {\n        onAdd\n      } = props;\n      if (onAdd) onAdd();\n      void nextTick(() => {\n        const currentEl = getCurrentEl();\n        const {\n          value: xScrollInst\n        } = xScrollInstRef;\n        if (!currentEl || !xScrollInst) return;\n        xScrollInst.scrollTo({\n          left: currentEl.offsetLeft,\n          top: 0,\n          behavior: 'smooth'\n        });\n      });\n    }\n    function deriveScrollShadow(el) {\n      if (!el) return;\n      const {\n        placement\n      } = props;\n      if (placement === 'top' || placement === 'bottom') {\n        const {\n          scrollLeft,\n          scrollWidth,\n          offsetWidth\n        } = el;\n        startReachedRef.value = scrollLeft <= 0;\n        endReachedRef.value = scrollLeft + offsetWidth >= scrollWidth;\n      } else {\n        const {\n          scrollTop,\n          scrollHeight,\n          offsetHeight\n        } = el;\n        startReachedRef.value = scrollTop <= 0;\n        endReachedRef.value = scrollTop + offsetHeight >= scrollHeight;\n      }\n    }\n    const handleScroll = throttle(e => {\n      deriveScrollShadow(e.target);\n    }, 64);\n    provide(tabsInjectionKey, {\n      triggerRef: toRef(props, 'trigger'),\n      tabStyleRef: toRef(props, 'tabStyle'),\n      tabClassRef: toRef(props, 'tabClass'),\n      addTabStyleRef: toRef(props, 'addTabStyle'),\n      addTabClassRef: toRef(props, 'addTabClass'),\n      paneClassRef: toRef(props, 'paneClass'),\n      paneStyleRef: toRef(props, 'paneStyle'),\n      mergedClsPrefixRef,\n      typeRef: toRef(props, 'type'),\n      closableRef: toRef(props, 'closable'),\n      valueRef: mergedValueRef,\n      tabChangeIdRef,\n      onBeforeLeaveRef: toRef(props, 'onBeforeLeave'),\n      activateTab,\n      handleClose,\n      handleAdd\n    });\n    onFontsReady(() => {\n      updateCurrentBarStyle();\n      updateCurrentScrollPosition();\n    });\n    // avoid useless rerender\n    watchEffect(() => {\n      const {\n        value: el\n      } = scrollWrapperElRef;\n      if (!el) return;\n      const {\n        value: clsPrefix\n      } = mergedClsPrefixRef;\n      const shadowStartClass = `${clsPrefix}-tabs-nav-scroll-wrapper--shadow-start`;\n      const shadowEndClass = `${clsPrefix}-tabs-nav-scroll-wrapper--shadow-end`;\n      if (startReachedRef.value) {\n        el.classList.remove(shadowStartClass);\n      } else {\n        el.classList.add(shadowStartClass);\n      }\n      if (endReachedRef.value) {\n        el.classList.remove(shadowEndClass);\n      } else {\n        el.classList.add(shadowEndClass);\n      }\n    });\n    const exposedMethods = {\n      syncBarPosition: () => {\n        updateCurrentBarStyle();\n      }\n    };\n    const handleSegmentResize = () => {\n      updateSegmentPosition({\n        transitionDisabled: true\n      });\n    };\n    const cssVarsRef = computed(() => {\n      const {\n        value: size\n      } = compitableSizeRef;\n      const {\n        type\n      } = props;\n      const typeSuffix = {\n        card: 'Card',\n        bar: 'Bar',\n        line: 'Line',\n        segment: 'Segment'\n      }[type];\n      const sizeType = `${size}${typeSuffix}`;\n      const {\n        self: {\n          barColor,\n          closeIconColor,\n          closeIconColorHover,\n          closeIconColorPressed,\n          tabColor,\n          tabBorderColor,\n          paneTextColor,\n          tabFontWeight,\n          tabBorderRadius,\n          tabFontWeightActive,\n          colorSegment,\n          fontWeightStrong,\n          tabColorSegment,\n          closeSize,\n          closeIconSize,\n          closeColorHover,\n          closeColorPressed,\n          closeBorderRadius,\n          [createKey('panePadding', size)]: panePadding,\n          [createKey('tabPadding', sizeType)]: tabPadding,\n          [createKey('tabPaddingVertical', sizeType)]: tabPaddingVertical,\n          [createKey('tabGap', sizeType)]: tabGap,\n          [createKey('tabGap', `${sizeType}Vertical`)]: tabGapVertical,\n          [createKey('tabTextColor', type)]: tabTextColor,\n          [createKey('tabTextColorActive', type)]: tabTextColorActive,\n          [createKey('tabTextColorHover', type)]: tabTextColorHover,\n          [createKey('tabTextColorDisabled', type)]: tabTextColorDisabled,\n          [createKey('tabFontSize', size)]: tabFontSize\n        },\n        common: {\n          cubicBezierEaseInOut\n        }\n      } = themeRef.value;\n      return {\n        '--n-bezier': cubicBezierEaseInOut,\n        '--n-color-segment': colorSegment,\n        '--n-bar-color': barColor,\n        '--n-tab-font-size': tabFontSize,\n        '--n-tab-text-color': tabTextColor,\n        '--n-tab-text-color-active': tabTextColorActive,\n        '--n-tab-text-color-disabled': tabTextColorDisabled,\n        '--n-tab-text-color-hover': tabTextColorHover,\n        '--n-pane-text-color': paneTextColor,\n        '--n-tab-border-color': tabBorderColor,\n        '--n-tab-border-radius': tabBorderRadius,\n        '--n-close-size': closeSize,\n        '--n-close-icon-size': closeIconSize,\n        '--n-close-color-hover': closeColorHover,\n        '--n-close-color-pressed': closeColorPressed,\n        '--n-close-border-radius': closeBorderRadius,\n        '--n-close-icon-color': closeIconColor,\n        '--n-close-icon-color-hover': closeIconColorHover,\n        '--n-close-icon-color-pressed': closeIconColorPressed,\n        '--n-tab-color': tabColor,\n        '--n-tab-font-weight': tabFontWeight,\n        '--n-tab-font-weight-active': tabFontWeightActive,\n        '--n-tab-padding': tabPadding,\n        '--n-tab-padding-vertical': tabPaddingVertical,\n        '--n-tab-gap': tabGap,\n        '--n-tab-gap-vertical': tabGapVertical,\n        '--n-pane-padding-left': getPadding(panePadding, 'left'),\n        '--n-pane-padding-right': getPadding(panePadding, 'right'),\n        '--n-pane-padding-top': getPadding(panePadding, 'top'),\n        '--n-pane-padding-bottom': getPadding(panePadding, 'bottom'),\n        '--n-font-weight-strong': fontWeightStrong,\n        '--n-tab-color-segment': tabColorSegment\n      };\n    });\n    const themeClassHandle = inlineThemeDisabled ? useThemeClass('tabs', computed(() => {\n      return `${compitableSizeRef.value[0]}${props.type[0]}`;\n    }), cssVarsRef, props) : undefined;\n    return Object.assign({\n      mergedClsPrefix: mergedClsPrefixRef,\n      mergedValue: mergedValueRef,\n      renderedNames: new Set(),\n      segmentCapsuleElRef,\n      tabsPaneWrapperRef,\n      tabsElRef,\n      barElRef,\n      addTabInstRef,\n      xScrollInstRef,\n      scrollWrapperElRef,\n      addTabFixed: addTabFixedRef,\n      tabWrapperStyle: tabWrapperStyleRef,\n      handleNavResize,\n      mergedSize: compitableSizeRef,\n      handleScroll,\n      handleTabsResize,\n      cssVars: inlineThemeDisabled ? undefined : cssVarsRef,\n      themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,\n      animationDirection: animationDirectionRef,\n      renderNameListRef,\n      yScrollElRef,\n      handleSegmentResize,\n      onAnimationBeforeLeave,\n      onAnimationEnter,\n      onAnimationAfterEnter,\n      onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender\n    }, exposedMethods);\n  },\n  render() {\n    const {\n      mergedClsPrefix,\n      type,\n      placement,\n      addTabFixed,\n      addable,\n      mergedSize,\n      renderNameListRef,\n      onRender,\n      paneWrapperClass,\n      paneWrapperStyle,\n      $slots: {\n        default: defaultSlot,\n        prefix: prefixSlot,\n        suffix: suffixSlot\n      }\n    } = this;\n    onRender === null || onRender === void 0 ? void 0 : onRender();\n    const tabPaneChildren = defaultSlot ? flatten(defaultSlot()).filter(v => {\n      return v.type.__TAB_PANE__ === true;\n    }) : [];\n    const tabChildren = defaultSlot ? flatten(defaultSlot()).filter(v => {\n      return v.type.__TAB__ === true;\n    }) : [];\n    const showPane = !tabChildren.length;\n    const isCard = type === 'card';\n    const isSegment = type === 'segment';\n    const mergedJustifyContent = !isCard && !isSegment && this.justifyContent;\n    renderNameListRef.value = [];\n    const scrollContent = () => {\n      const tabs = h(\"div\", {\n        style: this.tabWrapperStyle,\n        class: `${mergedClsPrefix}-tabs-wrapper`\n      }, mergedJustifyContent ? null : h(\"div\", {\n        class: `${mergedClsPrefix}-tabs-scroll-padding`,\n        style: placement === 'top' || placement === 'bottom' ? {\n          width: `${this.tabsPadding}px`\n        } : {\n          height: `${this.tabsPadding}px`\n        }\n      }), showPane ? tabPaneChildren.map((tabPaneVNode, index) => {\n        renderNameListRef.value.push(tabPaneVNode.props.name);\n        return justifyTabDynamicProps(h(Tab, Object.assign({}, tabPaneVNode.props, {\n          internalCreatedByPane: true,\n          internalLeftPadded: index !== 0 && (!mergedJustifyContent || mergedJustifyContent === 'center' || mergedJustifyContent === 'start' || mergedJustifyContent === 'end')\n        }), tabPaneVNode.children ? {\n          default: tabPaneVNode.children.tab\n        } : undefined));\n      }) : tabChildren.map((tabVNode, index) => {\n        renderNameListRef.value.push(tabVNode.props.name);\n        if (index !== 0 && !mergedJustifyContent) {\n          return justifyTabDynamicProps(createLeftPaddedTabVNode(tabVNode));\n        } else {\n          return justifyTabDynamicProps(tabVNode);\n        }\n      }), !addTabFixed && addable && isCard ? createAddTag(addable, (showPane ? tabPaneChildren.length : tabChildren.length) !== 0) : null, mergedJustifyContent ? null : h(\"div\", {\n        class: `${mergedClsPrefix}-tabs-scroll-padding`,\n        style: {\n          width: `${this.tabsPadding}px`\n        }\n      }));\n      return h(\"div\", {\n        ref: \"tabsElRef\",\n        class: `${mergedClsPrefix}-tabs-nav-scroll-content`\n      }, isCard && addable ? h(VResizeObserver, {\n        onResize: this.handleTabsResize\n      }, {\n        default: () => tabs\n      }) : tabs, isCard ? h(\"div\", {\n        class: `${mergedClsPrefix}-tabs-pad`\n      }) : null, isCard ? null : h(\"div\", {\n        ref: \"barElRef\",\n        class: `${mergedClsPrefix}-tabs-bar`\n      }));\n    };\n    const resolvedPlacement = isSegment ? 'top' : placement;\n    return h(\"div\", {\n      class: [`${mergedClsPrefix}-tabs`, this.themeClass, `${mergedClsPrefix}-tabs--${type}-type`, `${mergedClsPrefix}-tabs--${mergedSize}-size`, mergedJustifyContent && `${mergedClsPrefix}-tabs--flex`, `${mergedClsPrefix}-tabs--${resolvedPlacement}`],\n      style: this.cssVars\n    }, h(\"div\", {\n      class: [\n      // the class should be applied here since it's possible\n      // to make tabs nested in tabs, style may influence each\n      // other. adding a class will make it easy to write the\n      // style.\n      `${mergedClsPrefix}-tabs-nav--${type}-type`, `${mergedClsPrefix}-tabs-nav--${resolvedPlacement}`, `${mergedClsPrefix}-tabs-nav`]\n    }, resolveWrappedSlot(prefixSlot, children => children && h(\"div\", {\n      class: `${mergedClsPrefix}-tabs-nav__prefix`\n    }, children)), isSegment ? h(VResizeObserver, {\n      onResize: this.handleSegmentResize\n    }, {\n      default: () => h(\"div\", {\n        class: `${mergedClsPrefix}-tabs-rail`,\n        ref: \"tabsElRef\"\n      }, h(\"div\", {\n        class: `${mergedClsPrefix}-tabs-capsule`,\n        ref: \"segmentCapsuleElRef\"\n      }, h(\"div\", {\n        class: `${mergedClsPrefix}-tabs-wrapper`\n      }, h(\"div\", {\n        class: `${mergedClsPrefix}-tabs-tab`\n      }))), showPane ? tabPaneChildren.map((tabPaneVNode, index) => {\n        renderNameListRef.value.push(tabPaneVNode.props.name);\n        return h(Tab, Object.assign({}, tabPaneVNode.props, {\n          internalCreatedByPane: true,\n          internalLeftPadded: index !== 0\n        }), tabPaneVNode.children ? {\n          default: tabPaneVNode.children.tab\n        } : undefined);\n      }) : tabChildren.map((tabVNode, index) => {\n        renderNameListRef.value.push(tabVNode.props.name);\n        if (index === 0) {\n          return tabVNode;\n        } else {\n          return createLeftPaddedTabVNode(tabVNode);\n        }\n      }))\n    }) : h(VResizeObserver, {\n      onResize: this.handleNavResize\n    }, {\n      default: () => h(\"div\", {\n        class: `${mergedClsPrefix}-tabs-nav-scroll-wrapper`,\n        ref: \"scrollWrapperElRef\"\n      }, ['top', 'bottom'].includes(resolvedPlacement) ? h(VXScroll, {\n        ref: \"xScrollInstRef\",\n        onScroll: this.handleScroll\n      }, {\n        default: scrollContent\n      }) : h(\"div\", {\n        class: `${mergedClsPrefix}-tabs-nav-y-scroll`,\n        onScroll: this.handleScroll,\n        ref: \"yScrollElRef\"\n      }, scrollContent()))\n    }), addTabFixed && addable && isCard ? createAddTag(addable, true) : null, resolveWrappedSlot(suffixSlot, children => children && h(\"div\", {\n      class: `${mergedClsPrefix}-tabs-nav__suffix`\n    }, children))), showPane && (this.animated && (resolvedPlacement === 'top' || resolvedPlacement === 'bottom') ? h(\"div\", {\n      ref: \"tabsPaneWrapperRef\",\n      style: paneWrapperStyle,\n      class: [`${mergedClsPrefix}-tabs-pane-wrapper`, paneWrapperClass]\n    }, filterMapTabPanes(tabPaneChildren, this.mergedValue, this.renderedNames, this.onAnimationBeforeLeave, this.onAnimationEnter, this.onAnimationAfterEnter, this.animationDirection)) : filterMapTabPanes(tabPaneChildren, this.mergedValue, this.renderedNames)));\n  }\n});\nfunction filterMapTabPanes(tabPaneVNodes, value, renderedNames, onBeforeLeave, onEnter, onAfterEnter, animationDirection) {\n  const children = [];\n  tabPaneVNodes.forEach(vNode => {\n    const {\n      name,\n      displayDirective,\n      'display-directive': _displayDirective\n    } = vNode.props;\n    const matchDisplayDirective = directive => displayDirective === directive || _displayDirective === directive;\n    const show = value === name;\n    if (vNode.key !== undefined) {\n      vNode.key = name;\n    }\n    if (show || matchDisplayDirective('show') || matchDisplayDirective('show:lazy') && renderedNames.has(name)) {\n      if (!renderedNames.has(name)) {\n        renderedNames.add(name);\n      }\n      const useVShow = !matchDisplayDirective('if');\n      children.push(useVShow ? withDirectives(vNode, [[vShow, show]]) : vNode);\n    }\n  });\n  if (!animationDirection) {\n    return children;\n  }\n  return h(TransitionGroup, {\n    name: `${animationDirection}-transition`,\n    onBeforeLeave: onBeforeLeave,\n    onEnter: onEnter,\n    onAfterEnter: onAfterEnter\n  }, {\n    default: () => children\n  });\n}\nfunction createAddTag(addable, internalLeftPadded) {\n  return h(Tab, {\n    ref: \"addTabInstRef\",\n    key: \"__addable\",\n    name: \"__addable\",\n    internalCreatedByPane: true,\n    internalAddable: true,\n    internalLeftPadded: internalLeftPadded,\n    disabled: typeof addable === 'object' && addable.disabled\n  });\n}\nfunction createLeftPaddedTabVNode(tabVNode) {\n  const modifiedVNode = cloneVNode(tabVNode);\n  if (modifiedVNode.props) {\n    modifiedVNode.props.internalLeftPadded = true;\n  } else {\n    modifiedVNode.props = {\n      internalLeftPadded: true\n    };\n  }\n  return modifiedVNode;\n}\nfunction justifyTabDynamicProps(tabVNode) {\n  if (Array.isArray(tabVNode.dynamicProps)) {\n    if (!tabVNode.dynamicProps.includes('internalLeftPadded')) {\n      tabVNode.dynamicProps.push('internalLeftPadded');\n    }\n  } else {\n    tabVNode.dynamicProps = ['internalLeftPadded'];\n  }\n  return tabVNode;\n}","import { computed, inject } from 'vue';\nimport { commonLight } from \"../_styles/common/index.mjs\";\nimport { configProviderInjectionKey } from \"../config-provider/src/context.mjs\";\nexport function useThemeVars() {\n  const configProviderInjection = inject(configProviderInjectionKey, null);\n  return computed(() => {\n    if (configProviderInjection === null) return commonLight;\n    const {\n      mergedThemeRef: {\n        value: mergedTheme\n      },\n      mergedThemeOverridesRef: {\n        value: mergedThemeOverrides\n      }\n    } = configProviderInjection;\n    const currentThemeVars = (mergedTheme === null || mergedTheme === void 0 ? void 0 : mergedTheme.common) || commonLight;\n    if (mergedThemeOverrides === null || mergedThemeOverrides === void 0 ? void 0 : mergedThemeOverrides.common) {\n      return Object.assign({}, currentThemeVars, mergedThemeOverrides.common);\n    } else {\n      return currentThemeVars;\n    }\n  });\n}","import { commonLight } from \"../../_styles/common/index.mjs\";\nexport const self = () => ({});\nconst equationLight = {\n  name: 'Equation',\n  common: commonLight,\n  self\n};\nexport default equationLight;","import { commonDark } from \"../../_styles/common/index.mjs\";\nimport { self } from \"./light.mjs\";\nconst equationDark = {\n  name: 'Equation',\n  common: commonDark,\n  self\n};\nexport default equationDark;","import { commonDark } from \"../../_styles/common/index.mjs\";\nconst floatButtonGroupDark = {\n  name: 'FloatButtonGroup',\n  common: commonDark,\n  self(vars) {\n    const {\n      popoverColor,\n      dividerColor,\n      borderRadius\n    } = vars;\n    return {\n      color: popoverColor,\n      buttonBorderColor: dividerColor,\n      borderRadiusSquare: borderRadius,\n      boxShadow: '0 2px 8px 0px rgba(0, 0, 0, .12)'\n    };\n  }\n};\nexport default floatButtonGroupDark;","import { scrollbarDark } from \"../_internal/scrollbar/styles/index.mjs\";\nimport { commonDark } from \"../_styles/common/index.mjs\";\nimport { alertDark } from \"../alert/styles/index.mjs\";\nimport { anchorDark } from \"../anchor/styles/index.mjs\";\nimport { autoCompleteDark } from \"../auto-complete/styles/index.mjs\";\nimport { avatarGroupDark } from \"../avatar-group/styles/index.mjs\";\nimport { avatarDark } from \"../avatar/styles/index.mjs\";\nimport { backTopDark } from \"../back-top/styles/index.mjs\";\nimport { badgeDark } from \"../badge/styles/index.mjs\";\nimport { breadcrumbDark } from \"../breadcrumb/styles/index.mjs\";\nimport { buttonGroupDark } from \"../button-group/styles/index.mjs\";\nimport { buttonDark } from \"../button/styles/index.mjs\";\nimport { calendarDark } from \"../calendar/styles/index.mjs\";\nimport { cardDark } from \"../card/styles/index.mjs\";\nimport { carouselDark } from \"../carousel/styles/index.mjs\";\nimport { cascaderDark } from \"../cascader/styles/index.mjs\";\nimport { checkboxDark } from \"../checkbox/styles/index.mjs\";\nimport { codeDark } from \"../code/styles/index.mjs\";\nimport { collapseTransitionDark } from \"../collapse-transition/styles/index.mjs\";\nimport { collapseDark } from \"../collapse/styles/index.mjs\";\nimport { colorPickerDark } from \"../color-picker/styles/index.mjs\";\nimport { dataTableDark } from \"../data-table/styles/index.mjs\";\nimport { datePickerDark } from \"../date-picker/styles/index.mjs\";\nimport { descriptionsDark } from \"../descriptions/styles/index.mjs\";\nimport { dialogDark } from \"../dialog/styles/index.mjs\";\nimport { dividerDark } from \"../divider/styles/index.mjs\";\nimport { drawerDark } from \"../drawer/styles/index.mjs\";\nimport { dropdownDark } from \"../dropdown/styles/index.mjs\";\nimport { dynamicInputDark } from \"../dynamic-input/styles/index.mjs\";\nimport { dynamicTagsDark } from \"../dynamic-tags/styles/index.mjs\";\nimport { elementDark } from \"../element/styles/index.mjs\";\nimport { ellipsisDark } from \"../ellipsis/styles/index.mjs\";\nimport { emptyDark } from \"../empty/styles/index.mjs\";\nimport { equationDark } from \"../equation/styles/index.mjs\";\nimport { floatButtonGroupDark } from \"../float-button-group/styles/index.mjs\";\nimport { floatButtonDark } from \"../float-button/styles/index.mjs\";\nimport { formDark } from \"../form/styles/index.mjs\";\nimport { gradientTextDark } from \"../gradient-text/styles/index.mjs\";\nimport { iconWrapperDark } from \"../icon-wrapper/styles/index.mjs\";\nimport { iconDark } from \"../icon/styles/index.mjs\";\nimport { imageDark } from \"../image/styles/index.mjs\";\nimport { inputNumberDark } from \"../input-number/styles/index.mjs\";\nimport { inputDark } from \"../input/styles/index.mjs\";\nimport { layoutDark } from \"../layout/styles/index.mjs\";\nimport { rowDark } from \"../legacy-grid/styles/index.mjs\";\nimport { legacyTransferDark } from \"../legacy-transfer/styles/index.mjs\";\nimport { listDark } from \"../list/styles/index.mjs\";\nimport { loadingBarDark } from \"../loading-bar/styles/index.mjs\";\nimport { logDark } from \"../log/styles/index.mjs\";\nimport { marqueeDark } from \"../marquee/styles/index.mjs\";\nimport { mentionDark } from \"../mention/styles/index.mjs\";\nimport { menuDark } from \"../menu/styles/index.mjs\";\nimport { messageDark } from \"../message/styles/index.mjs\";\nimport { modalDark } from \"../modal/styles/index.mjs\";\nimport { notificationDark } from \"../notification/styles/index.mjs\";\nimport { pageHeaderDark } from \"../page-header/styles/index.mjs\";\nimport { paginationDark } from \"../pagination/styles/index.mjs\";\nimport { popconfirmDark } from \"../popconfirm/styles/index.mjs\";\nimport { popoverDark } from \"../popover/styles/index.mjs\";\nimport { popselectDark } from \"../popselect/styles/index.mjs\";\nimport { progressDark } from \"../progress/styles/index.mjs\";\nimport { qrcodeDark } from \"../qr-code/styles/index.mjs\";\nimport { radioDark } from \"../radio/styles/index.mjs\";\nimport { rateDark } from \"../rate/styles/index.mjs\";\nimport { resultDark } from \"../result/styles/index.mjs\";\nimport { selectDark } from \"../select/styles/index.mjs\";\nimport { skeletonDark } from \"../skeleton/styles/index.mjs\";\nimport { sliderDark } from \"../slider/styles/index.mjs\";\nimport { spaceDark } from \"../space/styles/index.mjs\";\nimport { spinDark } from \"../spin/styles/index.mjs\";\nimport { splitDark } from \"../split/styles/index.mjs\";\nimport { statisticDark } from \"../statistic/styles/index.mjs\";\nimport { stepsDark } from \"../steps/styles/index.mjs\";\nimport { flexDark, inputOtpDark } from \"../styles.mjs\";\nimport { switchDark } from \"../switch/styles/index.mjs\";\nimport { tableDark } from \"../table/styles/index.mjs\";\nimport { tabsDark } from \"../tabs/styles/index.mjs\";\nimport { tagDark } from \"../tag/styles/index.mjs\";\nimport { thingDark } from \"../thing/styles/index.mjs\";\nimport { timePickerDark } from \"../time-picker/styles/index.mjs\";\nimport { timelineDark } from \"../timeline/styles/index.mjs\";\nimport { tooltipDark } from \"../tooltip/styles/index.mjs\";\nimport { transferDark } from \"../transfer/styles/index.mjs\";\nimport { treeSelectDark } from \"../tree-select/styles/index.mjs\";\nimport { treeDark } from \"../tree/styles/index.mjs\";\nimport { typographyDark } from \"../typography/styles/index.mjs\";\nimport { uploadDark } from \"../upload/styles/index.mjs\";\nimport { watermarkDark } from \"../watermark/styles/index.mjs\";\nexport const darkTheme = {\n  name: 'dark',\n  common: commonDark,\n  Alert: alertDark,\n  Anchor: anchorDark,\n  AutoComplete: autoCompleteDark,\n  Avatar: avatarDark,\n  AvatarGroup: avatarGroupDark,\n  BackTop: backTopDark,\n  Badge: badgeDark,\n  Breadcrumb: breadcrumbDark,\n  Button: buttonDark,\n  ButtonGroup: buttonGroupDark,\n  Calendar: calendarDark,\n  Card: cardDark,\n  Carousel: carouselDark,\n  Cascader: cascaderDark,\n  Checkbox: checkboxDark,\n  Code: codeDark,\n  Collapse: collapseDark,\n  CollapseTransition: collapseTransitionDark,\n  ColorPicker: colorPickerDark,\n  DataTable: dataTableDark,\n  DatePicker: datePickerDark,\n  Descriptions: descriptionsDark,\n  Dialog: dialogDark,\n  Divider: dividerDark,\n  Drawer: drawerDark,\n  Dropdown: dropdownDark,\n  DynamicInput: dynamicInputDark,\n  DynamicTags: dynamicTagsDark,\n  Element: elementDark,\n  Empty: emptyDark,\n  Ellipsis: ellipsisDark,\n  Equation: equationDark,\n  Flex: flexDark,\n  Form: formDark,\n  GradientText: gradientTextDark,\n  Icon: iconDark,\n  IconWrapper: iconWrapperDark,\n  Image: imageDark,\n  Input: inputDark,\n  InputNumber: inputNumberDark,\n  InputOtp: inputOtpDark,\n  LegacyTransfer: legacyTransferDark,\n  Layout: layoutDark,\n  List: listDark,\n  LoadingBar: loadingBarDark,\n  Log: logDark,\n  Menu: menuDark,\n  Mention: mentionDark,\n  Message: messageDark,\n  Modal: modalDark,\n  Notification: notificationDark,\n  PageHeader: pageHeaderDark,\n  Pagination: paginationDark,\n  Popconfirm: popconfirmDark,\n  Popover: popoverDark,\n  Popselect: popselectDark,\n  Progress: progressDark,\n  QrCode: qrcodeDark,\n  Radio: radioDark,\n  Rate: rateDark,\n  Result: resultDark,\n  Row: rowDark,\n  Scrollbar: scrollbarDark,\n  Select: selectDark,\n  Skeleton: skeletonDark,\n  Slider: sliderDark,\n  Space: spaceDark,\n  Spin: spinDark,\n  Statistic: statisticDark,\n  Steps: stepsDark,\n  Switch: switchDark,\n  Table: tableDark,\n  Tabs: tabsDark,\n  Tag: tagDark,\n  Thing: thingDark,\n  TimePicker: timePickerDark,\n  Timeline: timelineDark,\n  Tooltip: tooltipDark,\n  Transfer: transferDark,\n  Tree: treeDark,\n  TreeSelect: treeSelectDark,\n  Typography: typographyDark,\n  Upload: uploadDark,\n  Watermark: watermarkDark,\n  Split: splitDark,\n  FloatButton: floatButtonDark,\n  FloatButtonGroup: floatButtonGroupDark,\n  Marquee: marqueeDark\n};","// these aren't really private, but nor are they really useful to document\n\n/**\n * @private\n */\nclass LuxonError extends Error {}\n\n/**\n * @private\n */\nexport class InvalidDateTimeError extends LuxonError {\n  constructor(reason) {\n    super(`Invalid DateTime: ${reason.toMessage()}`);\n  }\n}\n\n/**\n * @private\n */\nexport class InvalidIntervalError extends LuxonError {\n  constructor(reason) {\n    super(`Invalid Interval: ${reason.toMessage()}`);\n  }\n}\n\n/**\n * @private\n */\nexport class InvalidDurationError extends LuxonError {\n  constructor(reason) {\n    super(`Invalid Duration: ${reason.toMessage()}`);\n  }\n}\n\n/**\n * @private\n */\nexport class ConflictingSpecificationError extends LuxonError {}\n\n/**\n * @private\n */\nexport class InvalidUnitError extends LuxonError {\n  constructor(unit) {\n    super(`Invalid unit ${unit}`);\n  }\n}\n\n/**\n * @private\n */\nexport class InvalidArgumentError extends LuxonError {}\n\n/**\n * @private\n */\nexport class ZoneIsAbstractError extends LuxonError {\n  constructor() {\n    super(\"Zone is an abstract class\");\n  }\n}\n","/**\n * @private\n */\n\nconst n = \"numeric\",\n  s = \"short\",\n  l = \"long\";\n\nexport const DATE_SHORT = {\n  year: n,\n  month: n,\n  day: n,\n};\n\nexport const DATE_MED = {\n  year: n,\n  month: s,\n  day: n,\n};\n\nexport const DATE_MED_WITH_WEEKDAY = {\n  year: n,\n  month: s,\n  day: n,\n  weekday: s,\n};\n\nexport const DATE_FULL = {\n  year: n,\n  month: l,\n  day: n,\n};\n\nexport const DATE_HUGE = {\n  year: n,\n  month: l,\n  day: n,\n  weekday: l,\n};\n\nexport const TIME_SIMPLE = {\n  hour: n,\n  minute: n,\n};\n\nexport const TIME_WITH_SECONDS = {\n  hour: n,\n  minute: n,\n  second: n,\n};\n\nexport const TIME_WITH_SHORT_OFFSET = {\n  hour: n,\n  minute: n,\n  second: n,\n  timeZoneName: s,\n};\n\nexport const TIME_WITH_LONG_OFFSET = {\n  hour: n,\n  minute: n,\n  second: n,\n  timeZoneName: l,\n};\n\nexport const TIME_24_SIMPLE = {\n  hour: n,\n  minute: n,\n  hourCycle: \"h23\",\n};\n\nexport const TIME_24_WITH_SECONDS = {\n  hour: n,\n  minute: n,\n  second: n,\n  hourCycle: \"h23\",\n};\n\nexport const TIME_24_WITH_SHORT_OFFSET = {\n  hour: n,\n  minute: n,\n  second: n,\n  hourCycle: \"h23\",\n  timeZoneName: s,\n};\n\nexport const TIME_24_WITH_LONG_OFFSET = {\n  hour: n,\n  minute: n,\n  second: n,\n  hourCycle: \"h23\",\n  timeZoneName: l,\n};\n\nexport const DATETIME_SHORT = {\n  year: n,\n  month: n,\n  day: n,\n  hour: n,\n  minute: n,\n};\n\nexport const DATETIME_SHORT_WITH_SECONDS = {\n  year: n,\n  month: n,\n  day: n,\n  hour: n,\n  minute: n,\n  second: n,\n};\n\nexport const DATETIME_MED = {\n  year: n,\n  month: s,\n  day: n,\n  hour: n,\n  minute: n,\n};\n\nexport const DATETIME_MED_WITH_SECONDS = {\n  year: n,\n  month: s,\n  day: n,\n  hour: n,\n  minute: n,\n  second: n,\n};\n\nexport const DATETIME_MED_WITH_WEEKDAY = {\n  year: n,\n  month: s,\n  day: n,\n  weekday: s,\n  hour: n,\n  minute: n,\n};\n\nexport const DATETIME_FULL = {\n  year: n,\n  month: l,\n  day: n,\n  hour: n,\n  minute: n,\n  timeZoneName: s,\n};\n\nexport const DATETIME_FULL_WITH_SECONDS = {\n  year: n,\n  month: l,\n  day: n,\n  hour: n,\n  minute: n,\n  second: n,\n  timeZoneName: s,\n};\n\nexport const DATETIME_HUGE = {\n  year: n,\n  month: l,\n  day: n,\n  weekday: l,\n  hour: n,\n  minute: n,\n  timeZoneName: l,\n};\n\nexport const DATETIME_HUGE_WITH_SECONDS = {\n  year: n,\n  month: l,\n  day: n,\n  weekday: l,\n  hour: n,\n  minute: n,\n  second: n,\n  timeZoneName: l,\n};\n","/*\n  This is just a junk drawer, containing anything used across multiple classes.\n  Because Luxon is small(ish), this should stay small and we won't worry about splitting\n  it up into, say, parsingUtil.js and basicUtil.js and so on. But they are divided up by feature area.\n*/\n\nimport { InvalidArgumentError } from \"../errors.js\";\n\n/**\n * @private\n */\n\n// TYPES\n\nexport function isUndefined(o) {\n  return typeof o === \"undefined\";\n}\n\nexport function isNumber(o) {\n  return typeof o === \"number\";\n}\n\nexport function isInteger(o) {\n  return typeof o === \"number\" && o % 1 === 0;\n}\n\nexport function isString(o) {\n  return typeof o === \"string\";\n}\n\nexport function isDate(o) {\n  return Object.prototype.toString.call(o) === \"[object Date]\";\n}\n\n// CAPABILITIES\n\nexport function hasRelative() {\n  try {\n    return typeof Intl !== \"undefined\" && !!Intl.RelativeTimeFormat;\n  } catch (e) {\n    return false;\n  }\n}\n\n// OBJECTS AND ARRAYS\n\nexport function maybeArray(thing) {\n  return Array.isArray(thing) ? thing : [thing];\n}\n\nexport function bestBy(arr, by, compare) {\n  if (arr.length === 0) {\n    return undefined;\n  }\n  return arr.reduce((best, next) => {\n    const pair = [by(next), next];\n    if (!best) {\n      return pair;\n    } else if (compare(best[0], pair[0]) === best[0]) {\n      return best;\n    } else {\n      return pair;\n    }\n  }, null)[1];\n}\n\nexport function pick(obj, keys) {\n  return keys.reduce((a, k) => {\n    a[k] = obj[k];\n    return a;\n  }, {});\n}\n\nexport function hasOwnProperty(obj, prop) {\n  return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\n// NUMBERS AND STRINGS\n\nexport function integerBetween(thing, bottom, top) {\n  return isInteger(thing) && thing >= bottom && thing <= top;\n}\n\n// x % n but takes the sign of n instead of x\nexport function floorMod(x, n) {\n  return x - n * Math.floor(x / n);\n}\n\nexport function padStart(input, n = 2) {\n  const isNeg = input < 0;\n  let padded;\n  if (isNeg) {\n    padded = \"-\" + (\"\" + -input).padStart(n, \"0\");\n  } else {\n    padded = (\"\" + input).padStart(n, \"0\");\n  }\n  return padded;\n}\n\nexport function parseInteger(string) {\n  if (isUndefined(string) || string === null || string === \"\") {\n    return undefined;\n  } else {\n    return parseInt(string, 10);\n  }\n}\n\nexport function parseFloating(string) {\n  if (isUndefined(string) || string === null || string === \"\") {\n    return undefined;\n  } else {\n    return parseFloat(string);\n  }\n}\n\nexport function parseMillis(fraction) {\n  // Return undefined (instead of 0) in these cases, where fraction is not set\n  if (isUndefined(fraction) || fraction === null || fraction === \"\") {\n    return undefined;\n  } else {\n    const f = parseFloat(\"0.\" + fraction) * 1000;\n    return Math.floor(f);\n  }\n}\n\nexport function roundTo(number, digits, towardZero = false) {\n  const factor = 10 ** digits,\n    rounder = towardZero ? Math.trunc : Math.round;\n  return rounder(number * factor) / factor;\n}\n\n// DATE BASICS\n\nexport function isLeapYear(year) {\n  return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);\n}\n\nexport function daysInYear(year) {\n  return isLeapYear(year) ? 366 : 365;\n}\n\nexport function daysInMonth(year, month) {\n  const modMonth = floorMod(month - 1, 12) + 1,\n    modYear = year + (month - modMonth) / 12;\n\n  if (modMonth === 2) {\n    return isLeapYear(modYear) ? 29 : 28;\n  } else {\n    return [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][modMonth - 1];\n  }\n}\n\n// covert a calendar object to a local timestamp (epoch, but with the offset baked in)\nexport function objToLocalTS(obj) {\n  let d = Date.UTC(\n    obj.year,\n    obj.month - 1,\n    obj.day,\n    obj.hour,\n    obj.minute,\n    obj.second,\n    obj.millisecond\n  );\n\n  // for legacy reasons, years between 0 and 99 are interpreted as 19XX; revert that\n  if (obj.year < 100 && obj.year >= 0) {\n    d = new Date(d);\n    d.setUTCFullYear(d.getUTCFullYear() - 1900);\n  }\n  return +d;\n}\n\nexport function weeksInWeekYear(weekYear) {\n  const p1 =\n      (weekYear +\n        Math.floor(weekYear / 4) -\n        Math.floor(weekYear / 100) +\n        Math.floor(weekYear / 400)) %\n      7,\n    last = weekYear - 1,\n    p2 = (last + Math.floor(last / 4) - Math.floor(last / 100) + Math.floor(last / 400)) % 7;\n  return p1 === 4 || p2 === 3 ? 53 : 52;\n}\n\nexport function untruncateYear(year) {\n  if (year > 99) {\n    return year;\n  } else return year > 60 ? 1900 + year : 2000 + year;\n}\n\n// PARSING\n\nexport function parseZoneInfo(ts, offsetFormat, locale, timeZone = null) {\n  const date = new Date(ts),\n    intlOpts = {\n      hourCycle: \"h23\",\n      year: \"numeric\",\n      month: \"2-digit\",\n      day: \"2-digit\",\n      hour: \"2-digit\",\n      minute: \"2-digit\",\n    };\n\n  if (timeZone) {\n    intlOpts.timeZone = timeZone;\n  }\n\n  const modified = { timeZoneName: offsetFormat, ...intlOpts };\n\n  const parsed = new Intl.DateTimeFormat(locale, modified)\n    .formatToParts(date)\n    .find((m) => m.type.toLowerCase() === \"timezonename\");\n  return parsed ? parsed.value : null;\n}\n\n// signedOffset('-5', '30') -> -330\nexport function signedOffset(offHourStr, offMinuteStr) {\n  let offHour = parseInt(offHourStr, 10);\n\n  // don't || this because we want to preserve -0\n  if (Number.isNaN(offHour)) {\n    offHour = 0;\n  }\n\n  const offMin = parseInt(offMinuteStr, 10) || 0,\n    offMinSigned = offHour < 0 || Object.is(offHour, -0) ? -offMin : offMin;\n  return offHour * 60 + offMinSigned;\n}\n\n// COERCION\n\nexport function asNumber(value) {\n  const numericValue = Number(value);\n  if (typeof value === \"boolean\" || value === \"\" || Number.isNaN(numericValue))\n    throw new InvalidArgumentError(`Invalid unit value ${value}`);\n  return numericValue;\n}\n\nexport function normalizeObject(obj, normalizer) {\n  const normalized = {};\n  for (const u in obj) {\n    if (hasOwnProperty(obj, u)) {\n      const v = obj[u];\n      if (v === undefined || v === null) continue;\n      normalized[normalizer(u)] = asNumber(v);\n    }\n  }\n  return normalized;\n}\n\nexport function formatOffset(offset, format) {\n  const hours = Math.trunc(Math.abs(offset / 60)),\n    minutes = Math.trunc(Math.abs(offset % 60)),\n    sign = offset >= 0 ? \"+\" : \"-\";\n\n  switch (format) {\n    case \"short\":\n      return `${sign}${padStart(hours, 2)}:${padStart(minutes, 2)}`;\n    case \"narrow\":\n      return `${sign}${hours}${minutes > 0 ? `:${minutes}` : \"\"}`;\n    case \"techie\":\n      return `${sign}${padStart(hours, 2)}${padStart(minutes, 2)}`;\n    default:\n      throw new RangeError(`Value format ${format} is out of range for property format`);\n  }\n}\n\nexport function timeObject(obj) {\n  return pick(obj, [\"hour\", \"minute\", \"second\", \"millisecond\"]);\n}\n\nexport const ianaRegex =\n  /[A-Za-z_+-]{1,256}(?::?\\/[A-Za-z0-9_+-]{1,256}(?:\\/[A-Za-z0-9_+-]{1,256})?)?/;\n","import * as Formats from \"./formats.js\";\nimport { pick } from \"./util.js\";\n\nfunction stringify(obj) {\n  return JSON.stringify(obj, Object.keys(obj).sort());\n}\n\n/**\n * @private\n */\n\nexport const monthsLong = [\n  \"January\",\n  \"February\",\n  \"March\",\n  \"April\",\n  \"May\",\n  \"June\",\n  \"July\",\n  \"August\",\n  \"September\",\n  \"October\",\n  \"November\",\n  \"December\",\n];\n\nexport const monthsShort = [\n  \"Jan\",\n  \"Feb\",\n  \"Mar\",\n  \"Apr\",\n  \"May\",\n  \"Jun\",\n  \"Jul\",\n  \"Aug\",\n  \"Sep\",\n  \"Oct\",\n  \"Nov\",\n  \"Dec\",\n];\n\nexport const monthsNarrow = [\"J\", \"F\", \"M\", \"A\", \"M\", \"J\", \"J\", \"A\", \"S\", \"O\", \"N\", \"D\"];\n\nexport function months(length) {\n  switch (length) {\n    case \"narrow\":\n      return [...monthsNarrow];\n    case \"short\":\n      return [...monthsShort];\n    case \"long\":\n      return [...monthsLong];\n    case \"numeric\":\n      return [\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"11\", \"12\"];\n    case \"2-digit\":\n      return [\"01\", \"02\", \"03\", \"04\", \"05\", \"06\", \"07\", \"08\", \"09\", \"10\", \"11\", \"12\"];\n    default:\n      return null;\n  }\n}\n\nexport const weekdaysLong = [\n  \"Monday\",\n  \"Tuesday\",\n  \"Wednesday\",\n  \"Thursday\",\n  \"Friday\",\n  \"Saturday\",\n  \"Sunday\",\n];\n\nexport const weekdaysShort = [\"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\", \"Sun\"];\n\nexport const weekdaysNarrow = [\"M\", \"T\", \"W\", \"T\", \"F\", \"S\", \"S\"];\n\nexport function weekdays(length) {\n  switch (length) {\n    case \"narrow\":\n      return [...weekdaysNarrow];\n    case \"short\":\n      return [...weekdaysShort];\n    case \"long\":\n      return [...weekdaysLong];\n    case \"numeric\":\n      return [\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\"];\n    default:\n      return null;\n  }\n}\n\nexport const meridiems = [\"AM\", \"PM\"];\n\nexport const erasLong = [\"Before Christ\", \"Anno Domini\"];\n\nexport const erasShort = [\"BC\", \"AD\"];\n\nexport const erasNarrow = [\"B\", \"A\"];\n\nexport function eras(length) {\n  switch (length) {\n    case \"narrow\":\n      return [...erasNarrow];\n    case \"short\":\n      return [...erasShort];\n    case \"long\":\n      return [...erasLong];\n    default:\n      return null;\n  }\n}\n\nexport function meridiemForDateTime(dt) {\n  return meridiems[dt.hour < 12 ? 0 : 1];\n}\n\nexport function weekdayForDateTime(dt, length) {\n  return weekdays(length)[dt.weekday - 1];\n}\n\nexport function monthForDateTime(dt, length) {\n  return months(length)[dt.month - 1];\n}\n\nexport function eraForDateTime(dt, length) {\n  return eras(length)[dt.year < 0 ? 0 : 1];\n}\n\nexport function formatRelativeTime(unit, count, numeric = \"always\", narrow = false) {\n  const units = {\n    years: [\"year\", \"yr.\"],\n    quarters: [\"quarter\", \"qtr.\"],\n    months: [\"month\", \"mo.\"],\n    weeks: [\"week\", \"wk.\"],\n    days: [\"day\", \"day\", \"days\"],\n    hours: [\"hour\", \"hr.\"],\n    minutes: [\"minute\", \"min.\"],\n    seconds: [\"second\", \"sec.\"],\n  };\n\n  const lastable = [\"hours\", \"minutes\", \"seconds\"].indexOf(unit) === -1;\n\n  if (numeric === \"auto\" && lastable) {\n    const isDay = unit === \"days\";\n    switch (count) {\n      case 1:\n        return isDay ? \"tomorrow\" : `next ${units[unit][0]}`;\n      case -1:\n        return isDay ? \"yesterday\" : `last ${units[unit][0]}`;\n      case 0:\n        return isDay ? \"today\" : `this ${units[unit][0]}`;\n      default: // fall through\n    }\n  }\n\n  const isInPast = Object.is(count, -0) || count < 0,\n    fmtValue = Math.abs(count),\n    singular = fmtValue === 1,\n    lilUnits = units[unit],\n    fmtUnit = narrow\n      ? singular\n        ? lilUnits[1]\n        : lilUnits[2] || lilUnits[1]\n      : singular\n      ? units[unit][0]\n      : unit;\n  return isInPast ? `${fmtValue} ${fmtUnit} ago` : `in ${fmtValue} ${fmtUnit}`;\n}\n\nexport function formatString(knownFormat) {\n  // these all have the offsets removed because we don't have access to them\n  // without all the intl stuff this is backfilling\n  const filtered = pick(knownFormat, [\n      \"weekday\",\n      \"era\",\n      \"year\",\n      \"month\",\n      \"day\",\n      \"hour\",\n      \"minute\",\n      \"second\",\n      \"timeZoneName\",\n      \"hourCycle\",\n    ]),\n    key = stringify(filtered),\n    dateTimeHuge = \"EEEE, LLLL d, yyyy, h:mm a\";\n  switch (key) {\n    case stringify(Formats.DATE_SHORT):\n      return \"M/d/yyyy\";\n    case stringify(Formats.DATE_MED):\n      return \"LLL d, yyyy\";\n    case stringify(Formats.DATE_MED_WITH_WEEKDAY):\n      return \"EEE, LLL d, yyyy\";\n    case stringify(Formats.DATE_FULL):\n      return \"LLLL d, yyyy\";\n    case stringify(Formats.DATE_HUGE):\n      return \"EEEE, LLLL d, yyyy\";\n    case stringify(Formats.TIME_SIMPLE):\n      return \"h:mm a\";\n    case stringify(Formats.TIME_WITH_SECONDS):\n      return \"h:mm:ss a\";\n    case stringify(Formats.TIME_WITH_SHORT_OFFSET):\n      return \"h:mm a\";\n    case stringify(Formats.TIME_WITH_LONG_OFFSET):\n      return \"h:mm a\";\n    case stringify(Formats.TIME_24_SIMPLE):\n      return \"HH:mm\";\n    case stringify(Formats.TIME_24_WITH_SECONDS):\n      return \"HH:mm:ss\";\n    case stringify(Formats.TIME_24_WITH_SHORT_OFFSET):\n      return \"HH:mm\";\n    case stringify(Formats.TIME_24_WITH_LONG_OFFSET):\n      return \"HH:mm\";\n    case stringify(Formats.DATETIME_SHORT):\n      return \"M/d/yyyy, h:mm a\";\n    case stringify(Formats.DATETIME_MED):\n      return \"LLL d, yyyy, h:mm a\";\n    case stringify(Formats.DATETIME_FULL):\n      return \"LLLL d, yyyy, h:mm a\";\n    case stringify(Formats.DATETIME_HUGE):\n      return dateTimeHuge;\n    case stringify(Formats.DATETIME_SHORT_WITH_SECONDS):\n      return \"M/d/yyyy, h:mm:ss a\";\n    case stringify(Formats.DATETIME_MED_WITH_SECONDS):\n      return \"LLL d, yyyy, h:mm:ss a\";\n    case stringify(Formats.DATETIME_MED_WITH_WEEKDAY):\n      return \"EEE, d LLL yyyy, h:mm a\";\n    case stringify(Formats.DATETIME_FULL_WITH_SECONDS):\n      return \"LLLL d, yyyy, h:mm:ss a\";\n    case stringify(Formats.DATETIME_HUGE_WITH_SECONDS):\n      return \"EEEE, LLLL d, yyyy, h:mm:ss a\";\n    default:\n      return dateTimeHuge;\n  }\n}\n","import * as English from \"./english.js\";\nimport * as Formats from \"./formats.js\";\nimport { padStart } from \"./util.js\";\n\nfunction stringifyTokens(splits, tokenToString) {\n  let s = \"\";\n  for (const token of splits) {\n    if (token.literal) {\n      s += token.val;\n    } else {\n      s += tokenToString(token.val);\n    }\n  }\n  return s;\n}\n\nconst macroTokenToFormatOpts = {\n  D: Formats.DATE_SHORT,\n  DD: Formats.DATE_MED,\n  DDD: Formats.DATE_FULL,\n  DDDD: Formats.DATE_HUGE,\n  t: Formats.TIME_SIMPLE,\n  tt: Formats.TIME_WITH_SECONDS,\n  ttt: Formats.TIME_WITH_SHORT_OFFSET,\n  tttt: Formats.TIME_WITH_LONG_OFFSET,\n  T: Formats.TIME_24_SIMPLE,\n  TT: Formats.TIME_24_WITH_SECONDS,\n  TTT: Formats.TIME_24_WITH_SHORT_OFFSET,\n  TTTT: Formats.TIME_24_WITH_LONG_OFFSET,\n  f: Formats.DATETIME_SHORT,\n  ff: Formats.DATETIME_MED,\n  fff: Formats.DATETIME_FULL,\n  ffff: Formats.DATETIME_HUGE,\n  F: Formats.DATETIME_SHORT_WITH_SECONDS,\n  FF: Formats.DATETIME_MED_WITH_SECONDS,\n  FFF: Formats.DATETIME_FULL_WITH_SECONDS,\n  FFFF: Formats.DATETIME_HUGE_WITH_SECONDS,\n};\n\n/**\n * @private\n */\n\nexport default class Formatter {\n  static create(locale, opts = {}) {\n    return new Formatter(locale, opts);\n  }\n\n  static parseFormat(fmt) {\n    let current = null,\n      currentFull = \"\",\n      bracketed = false;\n    const splits = [];\n    for (let i = 0; i < fmt.length; i++) {\n      const c = fmt.charAt(i);\n      if (c === \"'\") {\n        if (currentFull.length > 0) {\n          splits.push({ literal: bracketed, val: currentFull });\n        }\n        current = null;\n        currentFull = \"\";\n        bracketed = !bracketed;\n      } else if (bracketed) {\n        currentFull += c;\n      } else if (c === current) {\n        currentFull += c;\n      } else {\n        if (currentFull.length > 0) {\n          splits.push({ literal: false, val: currentFull });\n        }\n        currentFull = c;\n        current = c;\n      }\n    }\n\n    if (currentFull.length > 0) {\n      splits.push({ literal: bracketed, val: currentFull });\n    }\n\n    return splits;\n  }\n\n  static macroTokenToFormatOpts(token) {\n    return macroTokenToFormatOpts[token];\n  }\n\n  constructor(locale, formatOpts) {\n    this.opts = formatOpts;\n    this.loc = locale;\n    this.systemLoc = null;\n  }\n\n  formatWithSystemDefault(dt, opts) {\n    if (this.systemLoc === null) {\n      this.systemLoc = this.loc.redefaultToSystem();\n    }\n    const df = this.systemLoc.dtFormatter(dt, { ...this.opts, ...opts });\n    return df.format();\n  }\n\n  formatDateTime(dt, opts = {}) {\n    const df = this.loc.dtFormatter(dt, { ...this.opts, ...opts });\n    return df.format();\n  }\n\n  formatDateTimeParts(dt, opts = {}) {\n    const df = this.loc.dtFormatter(dt, { ...this.opts, ...opts });\n    return df.formatToParts();\n  }\n\n  resolvedOptions(dt, opts = {}) {\n    const df = this.loc.dtFormatter(dt, { ...this.opts, ...opts });\n    return df.resolvedOptions();\n  }\n\n  num(n, p = 0) {\n    // we get some perf out of doing this here, annoyingly\n    if (this.opts.forceSimple) {\n      return padStart(n, p);\n    }\n\n    const opts = { ...this.opts };\n\n    if (p > 0) {\n      opts.padTo = p;\n    }\n\n    return this.loc.numberFormatter(opts).format(n);\n  }\n\n  formatDateTimeFromString(dt, fmt) {\n    const knownEnglish = this.loc.listingMode() === \"en\",\n      useDateTimeFormatter = this.loc.outputCalendar && this.loc.outputCalendar !== \"gregory\",\n      string = (opts, extract) => this.loc.extract(dt, opts, extract),\n      formatOffset = (opts) => {\n        if (dt.isOffsetFixed && dt.offset === 0 && opts.allowZ) {\n          return \"Z\";\n        }\n\n        return dt.isValid ? dt.zone.formatOffset(dt.ts, opts.format) : \"\";\n      },\n      meridiem = () =>\n        knownEnglish\n          ? English.meridiemForDateTime(dt)\n          : string({ hour: \"numeric\", hourCycle: \"h12\" }, \"dayperiod\"),\n      month = (length, standalone) =>\n        knownEnglish\n          ? English.monthForDateTime(dt, length)\n          : string(standalone ? { month: length } : { month: length, day: \"numeric\" }, \"month\"),\n      weekday = (length, standalone) =>\n        knownEnglish\n          ? English.weekdayForDateTime(dt, length)\n          : string(\n              standalone ? { weekday: length } : { weekday: length, month: \"long\", day: \"numeric\" },\n              \"weekday\"\n            ),\n      maybeMacro = (token) => {\n        const formatOpts = Formatter.macroTokenToFormatOpts(token);\n        if (formatOpts) {\n          return this.formatWithSystemDefault(dt, formatOpts);\n        } else {\n          return token;\n        }\n      },\n      era = (length) =>\n        knownEnglish ? English.eraForDateTime(dt, length) : string({ era: length }, \"era\"),\n      tokenToString = (token) => {\n        // Where possible: http://cldr.unicode.org/translation/date-time-1/date-time#TOC-Standalone-vs.-Format-Styles\n        switch (token) {\n          // ms\n          case \"S\":\n            return this.num(dt.millisecond);\n          case \"u\":\n          // falls through\n          case \"SSS\":\n            return this.num(dt.millisecond, 3);\n          // seconds\n          case \"s\":\n            return this.num(dt.second);\n          case \"ss\":\n            return this.num(dt.second, 2);\n          // fractional seconds\n          case \"uu\":\n            return this.num(Math.floor(dt.millisecond / 10), 2);\n          case \"uuu\":\n            return this.num(Math.floor(dt.millisecond / 100));\n          // minutes\n          case \"m\":\n            return this.num(dt.minute);\n          case \"mm\":\n            return this.num(dt.minute, 2);\n          // hours\n          case \"h\":\n            return this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12);\n          case \"hh\":\n            return this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12, 2);\n          case \"H\":\n            return this.num(dt.hour);\n          case \"HH\":\n            return this.num(dt.hour, 2);\n          // offset\n          case \"Z\":\n            // like +6\n            return formatOffset({ format: \"narrow\", allowZ: this.opts.allowZ });\n          case \"ZZ\":\n            // like +06:00\n            return formatOffset({ format: \"short\", allowZ: this.opts.allowZ });\n          case \"ZZZ\":\n            // like +0600\n            return formatOffset({ format: \"techie\", allowZ: this.opts.allowZ });\n          case \"ZZZZ\":\n            // like EST\n            return dt.zone.offsetName(dt.ts, { format: \"short\", locale: this.loc.locale });\n          case \"ZZZZZ\":\n            // like Eastern Standard Time\n            return dt.zone.offsetName(dt.ts, { format: \"long\", locale: this.loc.locale });\n          // zone\n          case \"z\":\n            // like America/New_York\n            return dt.zoneName;\n          // meridiems\n          case \"a\":\n            return meridiem();\n          // dates\n          case \"d\":\n            return useDateTimeFormatter ? string({ day: \"numeric\" }, \"day\") : this.num(dt.day);\n          case \"dd\":\n            return useDateTimeFormatter ? string({ day: \"2-digit\" }, \"day\") : this.num(dt.day, 2);\n          // weekdays - standalone\n          case \"c\":\n            // like 1\n            return this.num(dt.weekday);\n          case \"ccc\":\n            // like 'Tues'\n            return weekday(\"short\", true);\n          case \"cccc\":\n            // like 'Tuesday'\n            return weekday(\"long\", true);\n          case \"ccccc\":\n            // like 'T'\n            return weekday(\"narrow\", true);\n          // weekdays - format\n          case \"E\":\n            // like 1\n            return this.num(dt.weekday);\n          case \"EEE\":\n            // like 'Tues'\n            return weekday(\"short\", false);\n          case \"EEEE\":\n            // like 'Tuesday'\n            return weekday(\"long\", false);\n          case \"EEEEE\":\n            // like 'T'\n            return weekday(\"narrow\", false);\n          // months - standalone\n          case \"L\":\n            // like 1\n            return useDateTimeFormatter\n              ? string({ month: \"numeric\", day: \"numeric\" }, \"month\")\n              : this.num(dt.month);\n          case \"LL\":\n            // like 01, doesn't seem to work\n            return useDateTimeFormatter\n              ? string({ month: \"2-digit\", day: \"numeric\" }, \"month\")\n              : this.num(dt.month, 2);\n          case \"LLL\":\n            // like Jan\n            return month(\"short\", true);\n          case \"LLLL\":\n            // like January\n            return month(\"long\", true);\n          case \"LLLLL\":\n            // like J\n            return month(\"narrow\", true);\n          // months - format\n          case \"M\":\n            // like 1\n            return useDateTimeFormatter\n              ? string({ month: \"numeric\" }, \"month\")\n              : this.num(dt.month);\n          case \"MM\":\n            // like 01\n            return useDateTimeFormatter\n              ? string({ month: \"2-digit\" }, \"month\")\n              : this.num(dt.month, 2);\n          case \"MMM\":\n            // like Jan\n            return month(\"short\", false);\n          case \"MMMM\":\n            // like January\n            return month(\"long\", false);\n          case \"MMMMM\":\n            // like J\n            return month(\"narrow\", false);\n          // years\n          case \"y\":\n            // like 2014\n            return useDateTimeFormatter ? string({ year: \"numeric\" }, \"year\") : this.num(dt.year);\n          case \"yy\":\n            // like 14\n            return useDateTimeFormatter\n              ? string({ year: \"2-digit\" }, \"year\")\n              : this.num(dt.year.toString().slice(-2), 2);\n          case \"yyyy\":\n            // like 0012\n            return useDateTimeFormatter\n              ? string({ year: \"numeric\" }, \"year\")\n              : this.num(dt.year, 4);\n          case \"yyyyyy\":\n            // like 000012\n            return useDateTimeFormatter\n              ? string({ year: \"numeric\" }, \"year\")\n              : this.num(dt.year, 6);\n          // eras\n          case \"G\":\n            // like AD\n            return era(\"short\");\n          case \"GG\":\n            // like Anno Domini\n            return era(\"long\");\n          case \"GGGGG\":\n            return era(\"narrow\");\n          case \"kk\":\n            return this.num(dt.weekYear.toString().slice(-2), 2);\n          case \"kkkk\":\n            return this.num(dt.weekYear, 4);\n          case \"W\":\n            return this.num(dt.weekNumber);\n          case \"WW\":\n            return this.num(dt.weekNumber, 2);\n          case \"o\":\n            return this.num(dt.ordinal);\n          case \"ooo\":\n            return this.num(dt.ordinal, 3);\n          case \"q\":\n            // like 1\n            return this.num(dt.quarter);\n          case \"qq\":\n            // like 01\n            return this.num(dt.quarter, 2);\n          case \"X\":\n            return this.num(Math.floor(dt.ts / 1000));\n          case \"x\":\n            return this.num(dt.ts);\n          default:\n            return maybeMacro(token);\n        }\n      };\n\n    return stringifyTokens(Formatter.parseFormat(fmt), tokenToString);\n  }\n\n  formatDurationFromString(dur, fmt) {\n    const tokenToField = (token) => {\n        switch (token[0]) {\n          case \"S\":\n            return \"millisecond\";\n          case \"s\":\n            return \"second\";\n          case \"m\":\n            return \"minute\";\n          case \"h\":\n            return \"hour\";\n          case \"d\":\n            return \"day\";\n          case \"w\":\n            return \"week\";\n          case \"M\":\n            return \"month\";\n          case \"y\":\n            return \"year\";\n          default:\n            return null;\n        }\n      },\n      tokenToString = (lildur) => (token) => {\n        const mapped = tokenToField(token);\n        if (mapped) {\n          return this.num(lildur.get(mapped), token.length);\n        } else {\n          return token;\n        }\n      },\n      tokens = Formatter.parseFormat(fmt),\n      realTokens = tokens.reduce(\n        (found, { literal, val }) => (literal ? found : found.concat(val)),\n        []\n      ),\n      collapsed = dur.shiftTo(...realTokens.map(tokenToField).filter((t) => t));\n    return stringifyTokens(tokens, tokenToString(collapsed));\n  }\n}\n","export default class Invalid {\n  constructor(reason, explanation) {\n    this.reason = reason;\n    this.explanation = explanation;\n  }\n\n  toMessage() {\n    if (this.explanation) {\n      return `${this.reason}: ${this.explanation}`;\n    } else {\n      return this.reason;\n    }\n  }\n}\n","import { ZoneIsAbstractError } from \"./errors.js\";\n\n/**\n * @interface\n */\nexport default class Zone {\n  /**\n   * The type of zone\n   * @abstract\n   * @type {string}\n   */\n  get type() {\n    throw new ZoneIsAbstractError();\n  }\n\n  /**\n   * The name of this zone.\n   * @abstract\n   * @type {string}\n   */\n  get name() {\n    throw new ZoneIsAbstractError();\n  }\n\n  get ianaName() {\n    return this.name;\n  }\n\n  /**\n   * Returns whether the offset is known to be fixed for the whole year.\n   * @abstract\n   * @type {boolean}\n   */\n  get isUniversal() {\n    throw new ZoneIsAbstractError();\n  }\n\n  /**\n   * Returns the offset's common name (such as EST) at the specified timestamp\n   * @abstract\n   * @param {number} ts - Epoch milliseconds for which to get the name\n   * @param {Object} opts - Options to affect the format\n   * @param {string} opts.format - What style of offset to return. Accepts 'long' or 'short'.\n   * @param {string} opts.locale - What locale to return the offset name in.\n   * @return {string}\n   */\n  offsetName(ts, opts) {\n    throw new ZoneIsAbstractError();\n  }\n\n  /**\n   * Returns the offset's value as a string\n   * @abstract\n   * @param {number} ts - Epoch milliseconds for which to get the offset\n   * @param {string} format - What style of offset to return.\n   *                          Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively\n   * @return {string}\n   */\n  formatOffset(ts, format) {\n    throw new ZoneIsAbstractError();\n  }\n\n  /**\n   * Return the offset in minutes for this zone at the specified timestamp.\n   * @abstract\n   * @param {number} ts - Epoch milliseconds for which to compute the offset\n   * @return {number}\n   */\n  offset(ts) {\n    throw new ZoneIsAbstractError();\n  }\n\n  /**\n   * Return whether this Zone is equal to another zone\n   * @abstract\n   * @param {Zone} otherZone - the zone to compare\n   * @return {boolean}\n   */\n  equals(otherZone) {\n    throw new ZoneIsAbstractError();\n  }\n\n  /**\n   * Return whether this Zone is valid.\n   * @abstract\n   * @type {boolean}\n   */\n  get isValid() {\n    throw new ZoneIsAbstractError();\n  }\n}\n","import { formatOffset, parseZoneInfo } from \"../impl/util.js\";\nimport Zone from \"../zone.js\";\n\nlet singleton = null;\n\n/**\n * Represents the local zone for this JavaScript environment.\n * @implements {Zone}\n */\nexport default class SystemZone extends Zone {\n  /**\n   * Get a singleton instance of the local zone\n   * @return {SystemZone}\n   */\n  static get instance() {\n    if (singleton === null) {\n      singleton = new SystemZone();\n    }\n    return singleton;\n  }\n\n  /** @override **/\n  get type() {\n    return \"system\";\n  }\n\n  /** @override **/\n  get name() {\n    return new Intl.DateTimeFormat().resolvedOptions().timeZone;\n  }\n\n  /** @override **/\n  get isUniversal() {\n    return false;\n  }\n\n  /** @override **/\n  offsetName(ts, { format, locale }) {\n    return parseZoneInfo(ts, format, locale);\n  }\n\n  /** @override **/\n  formatOffset(ts, format) {\n    return formatOffset(this.offset(ts), format);\n  }\n\n  /** @override **/\n  offset(ts) {\n    return -new Date(ts).getTimezoneOffset();\n  }\n\n  /** @override **/\n  equals(otherZone) {\n    return otherZone.type === \"system\";\n  }\n\n  /** @override **/\n  get isValid() {\n    return true;\n  }\n}\n","import { formatOffset, parseZoneInfo, isUndefined, objToLocalTS } from \"../impl/util.js\";\nimport Zone from \"../zone.js\";\n\nlet dtfCache = {};\nfunction makeDTF(zone) {\n  if (!dtfCache[zone]) {\n    dtfCache[zone] = new Intl.DateTimeFormat(\"en-US\", {\n      hour12: false,\n      timeZone: zone,\n      year: \"numeric\",\n      month: \"2-digit\",\n      day: \"2-digit\",\n      hour: \"2-digit\",\n      minute: \"2-digit\",\n      second: \"2-digit\",\n      era: \"short\",\n    });\n  }\n  return dtfCache[zone];\n}\n\nconst typeToPos = {\n  year: 0,\n  month: 1,\n  day: 2,\n  era: 3,\n  hour: 4,\n  minute: 5,\n  second: 6,\n};\n\nfunction hackyOffset(dtf, date) {\n  const formatted = dtf.format(date).replace(/\\u200E/g, \"\"),\n    parsed = /(\\d+)\\/(\\d+)\\/(\\d+) (AD|BC),? (\\d+):(\\d+):(\\d+)/.exec(formatted),\n    [, fMonth, fDay, fYear, fadOrBc, fHour, fMinute, fSecond] = parsed;\n  return [fYear, fMonth, fDay, fadOrBc, fHour, fMinute, fSecond];\n}\n\nfunction partsOffset(dtf, date) {\n  const formatted = dtf.formatToParts(date);\n  const filled = [];\n  for (let i = 0; i < formatted.length; i++) {\n    const { type, value } = formatted[i];\n    const pos = typeToPos[type];\n\n    if (type === \"era\") {\n      filled[pos] = value;\n    } else if (!isUndefined(pos)) {\n      filled[pos] = parseInt(value, 10);\n    }\n  }\n  return filled;\n}\n\nlet ianaZoneCache = {};\n/**\n * A zone identified by an IANA identifier, like America/New_York\n * @implements {Zone}\n */\nexport default class IANAZone extends Zone {\n  /**\n   * @param {string} name - Zone name\n   * @return {IANAZone}\n   */\n  static create(name) {\n    if (!ianaZoneCache[name]) {\n      ianaZoneCache[name] = new IANAZone(name);\n    }\n    return ianaZoneCache[name];\n  }\n\n  /**\n   * Reset local caches. Should only be necessary in testing scenarios.\n   * @return {void}\n   */\n  static resetCache() {\n    ianaZoneCache = {};\n    dtfCache = {};\n  }\n\n  /**\n   * Returns whether the provided string is a valid specifier. This only checks the string's format, not that the specifier identifies a known zone; see isValidZone for that.\n   * @param {string} s - The string to check validity on\n   * @example IANAZone.isValidSpecifier(\"America/New_York\") //=> true\n   * @example IANAZone.isValidSpecifier(\"Sport~~blorp\") //=> false\n   * @deprecated This method returns false for some valid IANA names. Use isValidZone instead.\n   * @return {boolean}\n   */\n  static isValidSpecifier(s) {\n    return this.isValidZone(s);\n  }\n\n  /**\n   * Returns whether the provided string identifies a real zone\n   * @param {string} zone - The string to check\n   * @example IANAZone.isValidZone(\"America/New_York\") //=> true\n   * @example IANAZone.isValidZone(\"Fantasia/Castle\") //=> false\n   * @example IANAZone.isValidZone(\"Sport~~blorp\") //=> false\n   * @return {boolean}\n   */\n  static isValidZone(zone) {\n    if (!zone) {\n      return false;\n    }\n    try {\n      new Intl.DateTimeFormat(\"en-US\", { timeZone: zone }).format();\n      return true;\n    } catch (e) {\n      return false;\n    }\n  }\n\n  constructor(name) {\n    super();\n    /** @private **/\n    this.zoneName = name;\n    /** @private **/\n    this.valid = IANAZone.isValidZone(name);\n  }\n\n  /** @override **/\n  get type() {\n    return \"iana\";\n  }\n\n  /** @override **/\n  get name() {\n    return this.zoneName;\n  }\n\n  /** @override **/\n  get isUniversal() {\n    return false;\n  }\n\n  /** @override **/\n  offsetName(ts, { format, locale }) {\n    return parseZoneInfo(ts, format, locale, this.name);\n  }\n\n  /** @override **/\n  formatOffset(ts, format) {\n    return formatOffset(this.offset(ts), format);\n  }\n\n  /** @override **/\n  offset(ts) {\n    const date = new Date(ts);\n\n    if (isNaN(date)) return NaN;\n\n    const dtf = makeDTF(this.name);\n    let [year, month, day, adOrBc, hour, minute, second] = dtf.formatToParts\n      ? partsOffset(dtf, date)\n      : hackyOffset(dtf, date);\n\n    if (adOrBc === \"BC\") {\n      year = -Math.abs(year) + 1;\n    }\n\n    // because we're using hour12 and https://bugs.chromium.org/p/chromium/issues/detail?id=1025564&can=2&q=%2224%3A00%22%20datetimeformat\n    const adjustedHour = hour === 24 ? 0 : hour;\n\n    const asUTC = objToLocalTS({\n      year,\n      month,\n      day,\n      hour: adjustedHour,\n      minute,\n      second,\n      millisecond: 0,\n    });\n\n    let asTS = +date;\n    const over = asTS % 1000;\n    asTS -= over >= 0 ? over : 1000 + over;\n    return (asUTC - asTS) / (60 * 1000);\n  }\n\n  /** @override **/\n  equals(otherZone) {\n    return otherZone.type === \"iana\" && otherZone.name === this.name;\n  }\n\n  /** @override **/\n  get isValid() {\n    return this.valid;\n  }\n}\n","import { formatOffset, signedOffset } from \"../impl/util.js\";\nimport Zone from \"../zone.js\";\n\nlet singleton = null;\n\n/**\n * A zone with a fixed offset (meaning no DST)\n * @implements {Zone}\n */\nexport default class FixedOffsetZone extends Zone {\n  /**\n   * Get a singleton instance of UTC\n   * @return {FixedOffsetZone}\n   */\n  static get utcInstance() {\n    if (singleton === null) {\n      singleton = new FixedOffsetZone(0);\n    }\n    return singleton;\n  }\n\n  /**\n   * Get an instance with a specified offset\n   * @param {number} offset - The offset in minutes\n   * @return {FixedOffsetZone}\n   */\n  static instance(offset) {\n    return offset === 0 ? FixedOffsetZone.utcInstance : new FixedOffsetZone(offset);\n  }\n\n  /**\n   * Get an instance of FixedOffsetZone from a UTC offset string, like \"UTC+6\"\n   * @param {string} s - The offset string to parse\n   * @example FixedOffsetZone.parseSpecifier(\"UTC+6\")\n   * @example FixedOffsetZone.parseSpecifier(\"UTC+06\")\n   * @example FixedOffsetZone.parseSpecifier(\"UTC-6:00\")\n   * @return {FixedOffsetZone}\n   */\n  static parseSpecifier(s) {\n    if (s) {\n      const r = s.match(/^utc(?:([+-]\\d{1,2})(?::(\\d{2}))?)?$/i);\n      if (r) {\n        return new FixedOffsetZone(signedOffset(r[1], r[2]));\n      }\n    }\n    return null;\n  }\n\n  constructor(offset) {\n    super();\n    /** @private **/\n    this.fixed = offset;\n  }\n\n  /** @override **/\n  get type() {\n    return \"fixed\";\n  }\n\n  /** @override **/\n  get name() {\n    return this.fixed === 0 ? \"UTC\" : `UTC${formatOffset(this.fixed, \"narrow\")}`;\n  }\n\n  get ianaName() {\n    if (this.fixed === 0) {\n      return \"Etc/UTC\";\n    } else {\n      return `Etc/GMT${formatOffset(-this.fixed, \"narrow\")}`;\n    }\n  }\n\n  /** @override **/\n  offsetName() {\n    return this.name;\n  }\n\n  /** @override **/\n  formatOffset(ts, format) {\n    return formatOffset(this.fixed, format);\n  }\n\n  /** @override **/\n  get isUniversal() {\n    return true;\n  }\n\n  /** @override **/\n  offset() {\n    return this.fixed;\n  }\n\n  /** @override **/\n  equals(otherZone) {\n    return otherZone.type === \"fixed\" && otherZone.fixed === this.fixed;\n  }\n\n  /** @override **/\n  get isValid() {\n    return true;\n  }\n}\n","import Zone from \"../zone.js\";\n\n/**\n * A zone that failed to parse. You should never need to instantiate this.\n * @implements {Zone}\n */\nexport default class InvalidZone extends Zone {\n  constructor(zoneName) {\n    super();\n    /**  @private */\n    this.zoneName = zoneName;\n  }\n\n  /** @override **/\n  get type() {\n    return \"invalid\";\n  }\n\n  /** @override **/\n  get name() {\n    return this.zoneName;\n  }\n\n  /** @override **/\n  get isUniversal() {\n    return false;\n  }\n\n  /** @override **/\n  offsetName() {\n    return null;\n  }\n\n  /** @override **/\n  formatOffset() {\n    return \"\";\n  }\n\n  /** @override **/\n  offset() {\n    return NaN;\n  }\n\n  /** @override **/\n  equals() {\n    return false;\n  }\n\n  /** @override **/\n  get isValid() {\n    return false;\n  }\n}\n","/**\n * @private\n */\n\nimport Zone from \"../zone.js\";\nimport IANAZone from \"../zones/IANAZone.js\";\nimport FixedOffsetZone from \"../zones/fixedOffsetZone.js\";\nimport InvalidZone from \"../zones/invalidZone.js\";\n\nimport { isUndefined, isString, isNumber } from \"./util.js\";\n\nexport function normalizeZone(input, defaultZone) {\n  let offset;\n  if (isUndefined(input) || input === null) {\n    return defaultZone;\n  } else if (input instanceof Zone) {\n    return input;\n  } else if (isString(input)) {\n    const lowered = input.toLowerCase();\n    if (lowered === \"local\" || lowered === \"system\") return defaultZone;\n    else if (lowered === \"utc\" || lowered === \"gmt\") return FixedOffsetZone.utcInstance;\n    else return FixedOffsetZone.parseSpecifier(lowered) || IANAZone.create(input);\n  } else if (isNumber(input)) {\n    return FixedOffsetZone.instance(input);\n  } else if (typeof input === \"object\" && input.offset && typeof input.offset === \"number\") {\n    // This is dumb, but the instanceof check above doesn't seem to really work\n    // so we're duck checking it\n    return input;\n  } else {\n    return new InvalidZone(input);\n  }\n}\n","import SystemZone from \"./zones/systemZone.js\";\nimport IANAZone from \"./zones/IANAZone.js\";\nimport Locale from \"./impl/locale.js\";\n\nimport { normalizeZone } from \"./impl/zoneUtil.js\";\n\nlet now = () => Date.now(),\n  defaultZone = \"system\",\n  defaultLocale = null,\n  defaultNumberingSystem = null,\n  defaultOutputCalendar = null,\n  throwOnInvalid;\n\n/**\n * Settings contains static getters and setters that control Luxon's overall behavior. Luxon is a simple library with few options, but the ones it does have live here.\n */\nexport default class Settings {\n  /**\n   * Get the callback for returning the current timestamp.\n   * @type {function}\n   */\n  static get now() {\n    return now;\n  }\n\n  /**\n   * Set the callback for returning the current timestamp.\n   * The function should return a number, which will be interpreted as an Epoch millisecond count\n   * @type {function}\n   * @example Settings.now = () => Date.now() + 3000 // pretend it is 3 seconds in the future\n   * @example Settings.now = () => 0 // always pretend it's Jan 1, 1970 at midnight in UTC time\n   */\n  static set now(n) {\n    now = n;\n  }\n\n  /**\n   * Set the default time zone to create DateTimes in. Does not affect existing instances.\n   * Use the value \"system\" to reset this value to the system's time zone.\n   * @type {string}\n   */\n  static set defaultZone(zone) {\n    defaultZone = zone;\n  }\n\n  /**\n   * Get the default time zone object currently used to create DateTimes. Does not affect existing instances.\n   * The default value is the system's time zone (the one set on the machine that runs this code).\n   * @type {Zone}\n   */\n  static get defaultZone() {\n    return normalizeZone(defaultZone, SystemZone.instance);\n  }\n\n  /**\n   * Get the default locale to create DateTimes with. Does not affect existing instances.\n   * @type {string}\n   */\n  static get defaultLocale() {\n    return defaultLocale;\n  }\n\n  /**\n   * Set the default locale to create DateTimes with. Does not affect existing instances.\n   * @type {string}\n   */\n  static set defaultLocale(locale) {\n    defaultLocale = locale;\n  }\n\n  /**\n   * Get the default numbering system to create DateTimes with. Does not affect existing instances.\n   * @type {string}\n   */\n  static get defaultNumberingSystem() {\n    return defaultNumberingSystem;\n  }\n\n  /**\n   * Set the default numbering system to create DateTimes with. Does not affect existing instances.\n   * @type {string}\n   */\n  static set defaultNumberingSystem(numberingSystem) {\n    defaultNumberingSystem = numberingSystem;\n  }\n\n  /**\n   * Get the default output calendar to create DateTimes with. Does not affect existing instances.\n   * @type {string}\n   */\n  static get defaultOutputCalendar() {\n    return defaultOutputCalendar;\n  }\n\n  /**\n   * Set the default output calendar to create DateTimes with. Does not affect existing instances.\n   * @type {string}\n   */\n  static set defaultOutputCalendar(outputCalendar) {\n    defaultOutputCalendar = outputCalendar;\n  }\n\n  /**\n   * Get whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals\n   * @type {boolean}\n   */\n  static get throwOnInvalid() {\n    return throwOnInvalid;\n  }\n\n  /**\n   * Set whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals\n   * @type {boolean}\n   */\n  static set throwOnInvalid(t) {\n    throwOnInvalid = t;\n  }\n\n  /**\n   * Reset Luxon's global caches. Should only be necessary in testing scenarios.\n   * @return {void}\n   */\n  static resetCaches() {\n    Locale.resetCache();\n    IANAZone.resetCache();\n  }\n}\n","import { padStart, roundTo, hasRelative } from \"./util.js\";\nimport * as English from \"./english.js\";\nimport Settings from \"../settings.js\";\nimport DateTime from \"../datetime.js\";\nimport IANAZone from \"../zones/IANAZone.js\";\n\n// todo - remap caching\n\nlet intlLFCache = {};\nfunction getCachedLF(locString, opts = {}) {\n  const key = JSON.stringify([locString, opts]);\n  let dtf = intlLFCache[key];\n  if (!dtf) {\n    dtf = new Intl.ListFormat(locString, opts);\n    intlLFCache[key] = dtf;\n  }\n  return dtf;\n}\n\nlet intlDTCache = {};\nfunction getCachedDTF(locString, opts = {}) {\n  const key = JSON.stringify([locString, opts]);\n  let dtf = intlDTCache[key];\n  if (!dtf) {\n    dtf = new Intl.DateTimeFormat(locString, opts);\n    intlDTCache[key] = dtf;\n  }\n  return dtf;\n}\n\nlet intlNumCache = {};\nfunction getCachedINF(locString, opts = {}) {\n  const key = JSON.stringify([locString, opts]);\n  let inf = intlNumCache[key];\n  if (!inf) {\n    inf = new Intl.NumberFormat(locString, opts);\n    intlNumCache[key] = inf;\n  }\n  return inf;\n}\n\nlet intlRelCache = {};\nfunction getCachedRTF(locString, opts = {}) {\n  const { base, ...cacheKeyOpts } = opts; // exclude `base` from the options\n  const key = JSON.stringify([locString, cacheKeyOpts]);\n  let inf = intlRelCache[key];\n  if (!inf) {\n    inf = new Intl.RelativeTimeFormat(locString, opts);\n    intlRelCache[key] = inf;\n  }\n  return inf;\n}\n\nlet sysLocaleCache = null;\nfunction systemLocale() {\n  if (sysLocaleCache) {\n    return sysLocaleCache;\n  } else {\n    sysLocaleCache = new Intl.DateTimeFormat().resolvedOptions().locale;\n    return sysLocaleCache;\n  }\n}\n\nfunction parseLocaleString(localeStr) {\n  // I really want to avoid writing a BCP 47 parser\n  // see, e.g. https://github.com/wooorm/bcp-47\n  // Instead, we'll do this:\n\n  // a) if the string has no -u extensions, just leave it alone\n  // b) if it does, use Intl to resolve everything\n  // c) if Intl fails, try again without the -u\n\n  const uIndex = localeStr.indexOf(\"-u-\");\n  if (uIndex === -1) {\n    return [localeStr];\n  } else {\n    let options;\n    const smaller = localeStr.substring(0, uIndex);\n    try {\n      options = getCachedDTF(localeStr).resolvedOptions();\n    } catch (e) {\n      options = getCachedDTF(smaller).resolvedOptions();\n    }\n\n    const { numberingSystem, calendar } = options;\n    // return the smaller one so that we can append the calendar and numbering overrides to it\n    return [smaller, numberingSystem, calendar];\n  }\n}\n\nfunction intlConfigString(localeStr, numberingSystem, outputCalendar) {\n  if (outputCalendar || numberingSystem) {\n    localeStr += \"-u\";\n\n    if (outputCalendar) {\n      localeStr += `-ca-${outputCalendar}`;\n    }\n\n    if (numberingSystem) {\n      localeStr += `-nu-${numberingSystem}`;\n    }\n    return localeStr;\n  } else {\n    return localeStr;\n  }\n}\n\nfunction mapMonths(f) {\n  const ms = [];\n  for (let i = 1; i <= 12; i++) {\n    const dt = DateTime.utc(2016, i, 1);\n    ms.push(f(dt));\n  }\n  return ms;\n}\n\nfunction mapWeekdays(f) {\n  const ms = [];\n  for (let i = 1; i <= 7; i++) {\n    const dt = DateTime.utc(2016, 11, 13 + i);\n    ms.push(f(dt));\n  }\n  return ms;\n}\n\nfunction listStuff(loc, length, defaultOK, englishFn, intlFn) {\n  const mode = loc.listingMode(defaultOK);\n\n  if (mode === \"error\") {\n    return null;\n  } else if (mode === \"en\") {\n    return englishFn(length);\n  } else {\n    return intlFn(length);\n  }\n}\n\nfunction supportsFastNumbers(loc) {\n  if (loc.numberingSystem && loc.numberingSystem !== \"latn\") {\n    return false;\n  } else {\n    return (\n      loc.numberingSystem === \"latn\" ||\n      !loc.locale ||\n      loc.locale.startsWith(\"en\") ||\n      new Intl.DateTimeFormat(loc.intl).resolvedOptions().numberingSystem === \"latn\"\n    );\n  }\n}\n\n/**\n * @private\n */\n\nclass PolyNumberFormatter {\n  constructor(intl, forceSimple, opts) {\n    this.padTo = opts.padTo || 0;\n    this.floor = opts.floor || false;\n\n    const { padTo, floor, ...otherOpts } = opts;\n\n    if (!forceSimple || Object.keys(otherOpts).length > 0) {\n      const intlOpts = { useGrouping: false, ...opts };\n      if (opts.padTo > 0) intlOpts.minimumIntegerDigits = opts.padTo;\n      this.inf = getCachedINF(intl, intlOpts);\n    }\n  }\n\n  format(i) {\n    if (this.inf) {\n      const fixed = this.floor ? Math.floor(i) : i;\n      return this.inf.format(fixed);\n    } else {\n      // to match the browser's numberformatter defaults\n      const fixed = this.floor ? Math.floor(i) : roundTo(i, 3);\n      return padStart(fixed, this.padTo);\n    }\n  }\n}\n\n/**\n * @private\n */\n\nclass PolyDateFormatter {\n  constructor(dt, intl, opts) {\n    this.opts = opts;\n\n    let z;\n    if (dt.zone.isUniversal) {\n      // UTC-8 or Etc/UTC-8 are not part of tzdata, only Etc/GMT+8 and the like.\n      // That is why fixed-offset TZ is set to that unless it is:\n      // 1. Representing offset 0 when UTC is used to maintain previous behavior and does not become GMT.\n      // 2. Unsupported by the browser:\n      //    - some do not support Etc/\n      //    - < Etc/GMT-14, > Etc/GMT+12, and 30-minute or 45-minute offsets are not part of tzdata\n      const gmtOffset = -1 * (dt.offset / 60);\n      const offsetZ = gmtOffset >= 0 ? `Etc/GMT+${gmtOffset}` : `Etc/GMT${gmtOffset}`;\n      if (dt.offset !== 0 && IANAZone.create(offsetZ).valid) {\n        z = offsetZ;\n        this.dt = dt;\n      } else {\n        // Not all fixed-offset zones like Etc/+4:30 are present in tzdata.\n        // So we have to make do. Two cases:\n        // 1. The format options tell us to show the zone. We can't do that, so the best\n        // we can do is format the date in UTC.\n        // 2. The format options don't tell us to show the zone. Then we can adjust them\n        // the time and tell the formatter to show it to us in UTC, so that the time is right\n        // and the bad zone doesn't show up.\n        z = \"UTC\";\n        if (opts.timeZoneName) {\n          this.dt = dt;\n        } else {\n          this.dt = dt.offset === 0 ? dt : DateTime.fromMillis(dt.ts + dt.offset * 60 * 1000);\n        }\n      }\n    } else if (dt.zone.type === \"system\") {\n      this.dt = dt;\n    } else {\n      this.dt = dt;\n      z = dt.zone.name;\n    }\n\n    const intlOpts = { ...this.opts };\n    if (z) {\n      intlOpts.timeZone = z;\n    }\n    this.dtf = getCachedDTF(intl, intlOpts);\n  }\n\n  format() {\n    return this.dtf.format(this.dt.toJSDate());\n  }\n\n  formatToParts() {\n    return this.dtf.formatToParts(this.dt.toJSDate());\n  }\n\n  resolvedOptions() {\n    return this.dtf.resolvedOptions();\n  }\n}\n\n/**\n * @private\n */\nclass PolyRelFormatter {\n  constructor(intl, isEnglish, opts) {\n    this.opts = { style: \"long\", ...opts };\n    if (!isEnglish && hasRelative()) {\n      this.rtf = getCachedRTF(intl, opts);\n    }\n  }\n\n  format(count, unit) {\n    if (this.rtf) {\n      return this.rtf.format(count, unit);\n    } else {\n      return English.formatRelativeTime(unit, count, this.opts.numeric, this.opts.style !== \"long\");\n    }\n  }\n\n  formatToParts(count, unit) {\n    if (this.rtf) {\n      return this.rtf.formatToParts(count, unit);\n    } else {\n      return [];\n    }\n  }\n}\n\n/**\n * @private\n */\n\nexport default class Locale {\n  static fromOpts(opts) {\n    return Locale.create(opts.locale, opts.numberingSystem, opts.outputCalendar, opts.defaultToEN);\n  }\n\n  static create(locale, numberingSystem, outputCalendar, defaultToEN = false) {\n    const specifiedLocale = locale || Settings.defaultLocale;\n    // the system locale is useful for human readable strings but annoying for parsing/formatting known formats\n    const localeR = specifiedLocale || (defaultToEN ? \"en-US\" : systemLocale());\n    const numberingSystemR = numberingSystem || Settings.defaultNumberingSystem;\n    const outputCalendarR = outputCalendar || Settings.defaultOutputCalendar;\n    return new Locale(localeR, numberingSystemR, outputCalendarR, specifiedLocale);\n  }\n\n  static resetCache() {\n    sysLocaleCache = null;\n    intlDTCache = {};\n    intlNumCache = {};\n    intlRelCache = {};\n  }\n\n  static fromObject({ locale, numberingSystem, outputCalendar } = {}) {\n    return Locale.create(locale, numberingSystem, outputCalendar);\n  }\n\n  constructor(locale, numbering, outputCalendar, specifiedLocale) {\n    const [parsedLocale, parsedNumberingSystem, parsedOutputCalendar] = parseLocaleString(locale);\n\n    this.locale = parsedLocale;\n    this.numberingSystem = numbering || parsedNumberingSystem || null;\n    this.outputCalendar = outputCalendar || parsedOutputCalendar || null;\n    this.intl = intlConfigString(this.locale, this.numberingSystem, this.outputCalendar);\n\n    this.weekdaysCache = { format: {}, standalone: {} };\n    this.monthsCache = { format: {}, standalone: {} };\n    this.meridiemCache = null;\n    this.eraCache = {};\n\n    this.specifiedLocale = specifiedLocale;\n    this.fastNumbersCached = null;\n  }\n\n  get fastNumbers() {\n    if (this.fastNumbersCached == null) {\n      this.fastNumbersCached = supportsFastNumbers(this);\n    }\n\n    return this.fastNumbersCached;\n  }\n\n  listingMode() {\n    const isActuallyEn = this.isEnglish();\n    const hasNoWeirdness =\n      (this.numberingSystem === null || this.numberingSystem === \"latn\") &&\n      (this.outputCalendar === null || this.outputCalendar === \"gregory\");\n    return isActuallyEn && hasNoWeirdness ? \"en\" : \"intl\";\n  }\n\n  clone(alts) {\n    if (!alts || Object.getOwnPropertyNames(alts).length === 0) {\n      return this;\n    } else {\n      return Locale.create(\n        alts.locale || this.specifiedLocale,\n        alts.numberingSystem || this.numberingSystem,\n        alts.outputCalendar || this.outputCalendar,\n        alts.defaultToEN || false\n      );\n    }\n  }\n\n  redefaultToEN(alts = {}) {\n    return this.clone({ ...alts, defaultToEN: true });\n  }\n\n  redefaultToSystem(alts = {}) {\n    return this.clone({ ...alts, defaultToEN: false });\n  }\n\n  months(length, format = false, defaultOK = true) {\n    return listStuff(this, length, defaultOK, English.months, () => {\n      const intl = format ? { month: length, day: \"numeric\" } : { month: length },\n        formatStr = format ? \"format\" : \"standalone\";\n      if (!this.monthsCache[formatStr][length]) {\n        this.monthsCache[formatStr][length] = mapMonths((dt) => this.extract(dt, intl, \"month\"));\n      }\n      return this.monthsCache[formatStr][length];\n    });\n  }\n\n  weekdays(length, format = false, defaultOK = true) {\n    return listStuff(this, length, defaultOK, English.weekdays, () => {\n      const intl = format\n          ? { weekday: length, year: \"numeric\", month: \"long\", day: \"numeric\" }\n          : { weekday: length },\n        formatStr = format ? \"format\" : \"standalone\";\n      if (!this.weekdaysCache[formatStr][length]) {\n        this.weekdaysCache[formatStr][length] = mapWeekdays((dt) =>\n          this.extract(dt, intl, \"weekday\")\n        );\n      }\n      return this.weekdaysCache[formatStr][length];\n    });\n  }\n\n  meridiems(defaultOK = true) {\n    return listStuff(\n      this,\n      undefined,\n      defaultOK,\n      () => English.meridiems,\n      () => {\n        // In theory there could be aribitrary day periods. We're gonna assume there are exactly two\n        // for AM and PM. This is probably wrong, but it's makes parsing way easier.\n        if (!this.meridiemCache) {\n          const intl = { hour: \"numeric\", hourCycle: \"h12\" };\n          this.meridiemCache = [DateTime.utc(2016, 11, 13, 9), DateTime.utc(2016, 11, 13, 19)].map(\n            (dt) => this.extract(dt, intl, \"dayperiod\")\n          );\n        }\n\n        return this.meridiemCache;\n      }\n    );\n  }\n\n  eras(length, defaultOK = true) {\n    return listStuff(this, length, defaultOK, English.eras, () => {\n      const intl = { era: length };\n\n      // This is problematic. Different calendars are going to define eras totally differently. What I need is the minimum set of dates\n      // to definitely enumerate them.\n      if (!this.eraCache[length]) {\n        this.eraCache[length] = [DateTime.utc(-40, 1, 1), DateTime.utc(2017, 1, 1)].map((dt) =>\n          this.extract(dt, intl, \"era\")\n        );\n      }\n\n      return this.eraCache[length];\n    });\n  }\n\n  extract(dt, intlOpts, field) {\n    const df = this.dtFormatter(dt, intlOpts),\n      results = df.formatToParts(),\n      matching = results.find((m) => m.type.toLowerCase() === field);\n    return matching ? matching.value : null;\n  }\n\n  numberFormatter(opts = {}) {\n    // this forcesimple option is never used (the only caller short-circuits on it, but it seems safer to leave)\n    // (in contrast, the rest of the condition is used heavily)\n    return new PolyNumberFormatter(this.intl, opts.forceSimple || this.fastNumbers, opts);\n  }\n\n  dtFormatter(dt, intlOpts = {}) {\n    return new PolyDateFormatter(dt, this.intl, intlOpts);\n  }\n\n  relFormatter(opts = {}) {\n    return new PolyRelFormatter(this.intl, this.isEnglish(), opts);\n  }\n\n  listFormatter(opts = {}) {\n    return getCachedLF(this.intl, opts);\n  }\n\n  isEnglish() {\n    return (\n      this.locale === \"en\" ||\n      this.locale.toLowerCase() === \"en-us\" ||\n      new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith(\"en-us\")\n    );\n  }\n\n  equals(other) {\n    return (\n      this.locale === other.locale &&\n      this.numberingSystem === other.numberingSystem &&\n      this.outputCalendar === other.outputCalendar\n    );\n  }\n}\n","import {\n  untruncateYear,\n  signedOffset,\n  parseInteger,\n  parseMillis,\n  ianaRegex,\n  isUndefined,\n  parseFloating,\n} from \"./util.js\";\nimport * as English from \"./english.js\";\nimport FixedOffsetZone from \"../zones/fixedOffsetZone.js\";\nimport IANAZone from \"../zones/IANAZone.js\";\n\n/*\n * This file handles parsing for well-specified formats. Here's how it works:\n * Two things go into parsing: a regex to match with and an extractor to take apart the groups in the match.\n * An extractor is just a function that takes a regex match array and returns a { year: ..., month: ... } object\n * parse() does the work of executing the regex and applying the extractor. It takes multiple regex/extractor pairs to try in sequence.\n * Extractors can take a \"cursor\" representing the offset in the match to look at. This makes it easy to combine extractors.\n * combineExtractors() does the work of combining them, keeping track of the cursor through multiple extractions.\n * Some extractions are super dumb and simpleParse and fromStrings help DRY them.\n */\n\nfunction combineRegexes(...regexes) {\n  const full = regexes.reduce((f, r) => f + r.source, \"\");\n  return RegExp(`^${full}$`);\n}\n\nfunction combineExtractors(...extractors) {\n  return (m) =>\n    extractors\n      .reduce(\n        ([mergedVals, mergedZone, cursor], ex) => {\n          const [val, zone, next] = ex(m, cursor);\n          return [{ ...mergedVals, ...val }, zone || mergedZone, next];\n        },\n        [{}, null, 1]\n      )\n      .slice(0, 2);\n}\n\nfunction parse(s, ...patterns) {\n  if (s == null) {\n    return [null, null];\n  }\n\n  for (const [regex, extractor] of patterns) {\n    const m = regex.exec(s);\n    if (m) {\n      return extractor(m);\n    }\n  }\n  return [null, null];\n}\n\nfunction simpleParse(...keys) {\n  return (match, cursor) => {\n    const ret = {};\n    let i;\n\n    for (i = 0; i < keys.length; i++) {\n      ret[keys[i]] = parseInteger(match[cursor + i]);\n    }\n    return [ret, null, cursor + i];\n  };\n}\n\n// ISO and SQL parsing\nconst offsetRegex = /(?:(Z)|([+-]\\d\\d)(?::?(\\d\\d))?)/;\nconst isoExtendedZone = `(?:${offsetRegex.source}?(?:\\\\[(${ianaRegex.source})\\\\])?)?`;\nconst isoTimeBaseRegex = /(\\d\\d)(?::?(\\d\\d)(?::?(\\d\\d)(?:[.,](\\d{1,30}))?)?)?/;\nconst isoTimeRegex = RegExp(`${isoTimeBaseRegex.source}${isoExtendedZone}`);\nconst isoTimeExtensionRegex = RegExp(`(?:T${isoTimeRegex.source})?`);\nconst isoYmdRegex = /([+-]\\d{6}|\\d{4})(?:-?(\\d\\d)(?:-?(\\d\\d))?)?/;\nconst isoWeekRegex = /(\\d{4})-?W(\\d\\d)(?:-?(\\d))?/;\nconst isoOrdinalRegex = /(\\d{4})-?(\\d{3})/;\nconst extractISOWeekData = simpleParse(\"weekYear\", \"weekNumber\", \"weekDay\");\nconst extractISOOrdinalData = simpleParse(\"year\", \"ordinal\");\nconst sqlYmdRegex = /(\\d{4})-(\\d\\d)-(\\d\\d)/; // dumbed-down version of the ISO one\nconst sqlTimeRegex = RegExp(\n  `${isoTimeBaseRegex.source} ?(?:${offsetRegex.source}|(${ianaRegex.source}))?`\n);\nconst sqlTimeExtensionRegex = RegExp(`(?: ${sqlTimeRegex.source})?`);\n\nfunction int(match, pos, fallback) {\n  const m = match[pos];\n  return isUndefined(m) ? fallback : parseInteger(m);\n}\n\nfunction extractISOYmd(match, cursor) {\n  const item = {\n    year: int(match, cursor),\n    month: int(match, cursor + 1, 1),\n    day: int(match, cursor + 2, 1),\n  };\n\n  return [item, null, cursor + 3];\n}\n\nfunction extractISOTime(match, cursor) {\n  const item = {\n    hours: int(match, cursor, 0),\n    minutes: int(match, cursor + 1, 0),\n    seconds: int(match, cursor + 2, 0),\n    milliseconds: parseMillis(match[cursor + 3]),\n  };\n\n  return [item, null, cursor + 4];\n}\n\nfunction extractISOOffset(match, cursor) {\n  const local = !match[cursor] && !match[cursor + 1],\n    fullOffset = signedOffset(match[cursor + 1], match[cursor + 2]),\n    zone = local ? null : FixedOffsetZone.instance(fullOffset);\n  return [{}, zone, cursor + 3];\n}\n\nfunction extractIANAZone(match, cursor) {\n  const zone = match[cursor] ? IANAZone.create(match[cursor]) : null;\n  return [{}, zone, cursor + 1];\n}\n\n// ISO time parsing\n\nconst isoTimeOnly = RegExp(`^T?${isoTimeBaseRegex.source}$`);\n\n// ISO duration parsing\n\nconst isoDuration =\n  /^-?P(?:(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)Y)?(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)M)?(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)W)?(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)D)?(?:T(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)H)?(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)M)?(?:(-?\\d{1,20})(?:[.,](-?\\d{1,20}))?S)?)?)$/;\n\nfunction extractISODuration(match) {\n  const [s, yearStr, monthStr, weekStr, dayStr, hourStr, minuteStr, secondStr, millisecondsStr] =\n    match;\n\n  const hasNegativePrefix = s[0] === \"-\";\n  const negativeSeconds = secondStr && secondStr[0] === \"-\";\n\n  const maybeNegate = (num, force = false) =>\n    num !== undefined && (force || (num && hasNegativePrefix)) ? -num : num;\n\n  return [\n    {\n      years: maybeNegate(parseFloating(yearStr)),\n      months: maybeNegate(parseFloating(monthStr)),\n      weeks: maybeNegate(parseFloating(weekStr)),\n      days: maybeNegate(parseFloating(dayStr)),\n      hours: maybeNegate(parseFloating(hourStr)),\n      minutes: maybeNegate(parseFloating(minuteStr)),\n      seconds: maybeNegate(parseFloating(secondStr), secondStr === \"-0\"),\n      milliseconds: maybeNegate(parseMillis(millisecondsStr), negativeSeconds),\n    },\n  ];\n}\n\n// These are a little braindead. EDT *should* tell us that we're in, say, America/New_York\n// and not just that we're in -240 *right now*. But since I don't think these are used that often\n// I'm just going to ignore that\nconst obsOffsets = {\n  GMT: 0,\n  EDT: -4 * 60,\n  EST: -5 * 60,\n  CDT: -5 * 60,\n  CST: -6 * 60,\n  MDT: -6 * 60,\n  MST: -7 * 60,\n  PDT: -7 * 60,\n  PST: -8 * 60,\n};\n\nfunction fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {\n  const result = {\n    year: yearStr.length === 2 ? untruncateYear(parseInteger(yearStr)) : parseInteger(yearStr),\n    month: English.monthsShort.indexOf(monthStr) + 1,\n    day: parseInteger(dayStr),\n    hour: parseInteger(hourStr),\n    minute: parseInteger(minuteStr),\n  };\n\n  if (secondStr) result.second = parseInteger(secondStr);\n  if (weekdayStr) {\n    result.weekday =\n      weekdayStr.length > 3\n        ? English.weekdaysLong.indexOf(weekdayStr) + 1\n        : English.weekdaysShort.indexOf(weekdayStr) + 1;\n  }\n\n  return result;\n}\n\n// RFC 2822/5322\nconst rfc2822 =\n  /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\\d\\d)(\\d\\d)))$/;\n\nfunction extractRFC2822(match) {\n  const [\n      ,\n      weekdayStr,\n      dayStr,\n      monthStr,\n      yearStr,\n      hourStr,\n      minuteStr,\n      secondStr,\n      obsOffset,\n      milOffset,\n      offHourStr,\n      offMinuteStr,\n    ] = match,\n    result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);\n\n  let offset;\n  if (obsOffset) {\n    offset = obsOffsets[obsOffset];\n  } else if (milOffset) {\n    offset = 0;\n  } else {\n    offset = signedOffset(offHourStr, offMinuteStr);\n  }\n\n  return [result, new FixedOffsetZone(offset)];\n}\n\nfunction preprocessRFC2822(s) {\n  // Remove comments and folding whitespace and replace multiple-spaces with a single space\n  return s\n    .replace(/\\([^)]*\\)|[\\n\\t]/g, \" \")\n    .replace(/(\\s\\s+)/g, \" \")\n    .trim();\n}\n\n// http date\n\nconst rfc1123 =\n    /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\\d\\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\\d{4}) (\\d\\d):(\\d\\d):(\\d\\d) GMT$/,\n  rfc850 =\n    /^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\\d\\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\\d\\d) (\\d\\d):(\\d\\d):(\\d\\d) GMT$/,\n  ascii =\n    /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \\d|\\d\\d) (\\d\\d):(\\d\\d):(\\d\\d) (\\d{4})$/;\n\nfunction extractRFC1123Or850(match) {\n  const [, weekdayStr, dayStr, monthStr, yearStr, hourStr, minuteStr, secondStr] = match,\n    result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);\n  return [result, FixedOffsetZone.utcInstance];\n}\n\nfunction extractASCII(match) {\n  const [, weekdayStr, monthStr, dayStr, hourStr, minuteStr, secondStr, yearStr] = match,\n    result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);\n  return [result, FixedOffsetZone.utcInstance];\n}\n\nconst isoYmdWithTimeExtensionRegex = combineRegexes(isoYmdRegex, isoTimeExtensionRegex);\nconst isoWeekWithTimeExtensionRegex = combineRegexes(isoWeekRegex, isoTimeExtensionRegex);\nconst isoOrdinalWithTimeExtensionRegex = combineRegexes(isoOrdinalRegex, isoTimeExtensionRegex);\nconst isoTimeCombinedRegex = combineRegexes(isoTimeRegex);\n\nconst extractISOYmdTimeAndOffset = combineExtractors(\n  extractISOYmd,\n  extractISOTime,\n  extractISOOffset,\n  extractIANAZone\n);\nconst extractISOWeekTimeAndOffset = combineExtractors(\n  extractISOWeekData,\n  extractISOTime,\n  extractISOOffset,\n  extractIANAZone\n);\nconst extractISOOrdinalDateAndTime = combineExtractors(\n  extractISOOrdinalData,\n  extractISOTime,\n  extractISOOffset,\n  extractIANAZone\n);\nconst extractISOTimeAndOffset = combineExtractors(\n  extractISOTime,\n  extractISOOffset,\n  extractIANAZone\n);\n\n/*\n * @private\n */\n\nexport function parseISODate(s) {\n  return parse(\n    s,\n    [isoYmdWithTimeExtensionRegex, extractISOYmdTimeAndOffset],\n    [isoWeekWithTimeExtensionRegex, extractISOWeekTimeAndOffset],\n    [isoOrdinalWithTimeExtensionRegex, extractISOOrdinalDateAndTime],\n    [isoTimeCombinedRegex, extractISOTimeAndOffset]\n  );\n}\n\nexport function parseRFC2822Date(s) {\n  return parse(preprocessRFC2822(s), [rfc2822, extractRFC2822]);\n}\n\nexport function parseHTTPDate(s) {\n  return parse(\n    s,\n    [rfc1123, extractRFC1123Or850],\n    [rfc850, extractRFC1123Or850],\n    [ascii, extractASCII]\n  );\n}\n\nexport function parseISODuration(s) {\n  return parse(s, [isoDuration, extractISODuration]);\n}\n\nconst extractISOTimeOnly = combineExtractors(extractISOTime);\n\nexport function parseISOTimeOnly(s) {\n  return parse(s, [isoTimeOnly, extractISOTimeOnly]);\n}\n\nconst sqlYmdWithTimeExtensionRegex = combineRegexes(sqlYmdRegex, sqlTimeExtensionRegex);\nconst sqlTimeCombinedRegex = combineRegexes(sqlTimeRegex);\n\nconst extractISOTimeOffsetAndIANAZone = combineExtractors(\n  extractISOTime,\n  extractISOOffset,\n  extractIANAZone\n);\n\nexport function parseSQL(s) {\n  return parse(\n    s,\n    [sqlYmdWithTimeExtensionRegex, extractISOYmdTimeAndOffset],\n    [sqlTimeCombinedRegex, extractISOTimeOffsetAndIANAZone]\n  );\n}\n","import { InvalidArgumentError, InvalidDurationError, InvalidUnitError } from \"./errors.js\";\nimport Formatter from \"./impl/formatter.js\";\nimport Invalid from \"./impl/invalid.js\";\nimport Locale from \"./impl/locale.js\";\nimport { parseISODuration, parseISOTimeOnly } from \"./impl/regexParser.js\";\nimport {\n  asNumber,\n  hasOwnProperty,\n  isNumber,\n  isUndefined,\n  normalizeObject,\n  roundTo,\n} from \"./impl/util.js\";\nimport Settings from \"./settings.js\";\n\nconst INVALID = \"Invalid Duration\";\n\n// unit conversion constants\nexport const lowOrderMatrix = {\n    weeks: {\n      days: 7,\n      hours: 7 * 24,\n      minutes: 7 * 24 * 60,\n      seconds: 7 * 24 * 60 * 60,\n      milliseconds: 7 * 24 * 60 * 60 * 1000,\n    },\n    days: {\n      hours: 24,\n      minutes: 24 * 60,\n      seconds: 24 * 60 * 60,\n      milliseconds: 24 * 60 * 60 * 1000,\n    },\n    hours: { minutes: 60, seconds: 60 * 60, milliseconds: 60 * 60 * 1000 },\n    minutes: { seconds: 60, milliseconds: 60 * 1000 },\n    seconds: { milliseconds: 1000 },\n  },\n  casualMatrix = {\n    years: {\n      quarters: 4,\n      months: 12,\n      weeks: 52,\n      days: 365,\n      hours: 365 * 24,\n      minutes: 365 * 24 * 60,\n      seconds: 365 * 24 * 60 * 60,\n      milliseconds: 365 * 24 * 60 * 60 * 1000,\n    },\n    quarters: {\n      months: 3,\n      weeks: 13,\n      days: 91,\n      hours: 91 * 24,\n      minutes: 91 * 24 * 60,\n      seconds: 91 * 24 * 60 * 60,\n      milliseconds: 91 * 24 * 60 * 60 * 1000,\n    },\n    months: {\n      weeks: 4,\n      days: 30,\n      hours: 30 * 24,\n      minutes: 30 * 24 * 60,\n      seconds: 30 * 24 * 60 * 60,\n      milliseconds: 30 * 24 * 60 * 60 * 1000,\n    },\n\n    ...lowOrderMatrix,\n  },\n  daysInYearAccurate = 146097.0 / 400,\n  daysInMonthAccurate = 146097.0 / 4800,\n  accurateMatrix = {\n    years: {\n      quarters: 4,\n      months: 12,\n      weeks: daysInYearAccurate / 7,\n      days: daysInYearAccurate,\n      hours: daysInYearAccurate * 24,\n      minutes: daysInYearAccurate * 24 * 60,\n      seconds: daysInYearAccurate * 24 * 60 * 60,\n      milliseconds: daysInYearAccurate * 24 * 60 * 60 * 1000,\n    },\n    quarters: {\n      months: 3,\n      weeks: daysInYearAccurate / 28,\n      days: daysInYearAccurate / 4,\n      hours: (daysInYearAccurate * 24) / 4,\n      minutes: (daysInYearAccurate * 24 * 60) / 4,\n      seconds: (daysInYearAccurate * 24 * 60 * 60) / 4,\n      milliseconds: (daysInYearAccurate * 24 * 60 * 60 * 1000) / 4,\n    },\n    months: {\n      weeks: daysInMonthAccurate / 7,\n      days: daysInMonthAccurate,\n      hours: daysInMonthAccurate * 24,\n      minutes: daysInMonthAccurate * 24 * 60,\n      seconds: daysInMonthAccurate * 24 * 60 * 60,\n      milliseconds: daysInMonthAccurate * 24 * 60 * 60 * 1000,\n    },\n    ...lowOrderMatrix,\n  };\n\n// units ordered by size\nconst orderedUnits = [\n  \"years\",\n  \"quarters\",\n  \"months\",\n  \"weeks\",\n  \"days\",\n  \"hours\",\n  \"minutes\",\n  \"seconds\",\n  \"milliseconds\",\n];\n\nconst reverseUnits = orderedUnits.slice(0).reverse();\n\n// clone really means \"create another instance just like this one, but with these changes\"\nfunction clone(dur, alts, clear = false) {\n  // deep merge for vals\n  const conf = {\n    values: clear ? alts.values : { ...dur.values, ...(alts.values || {}) },\n    loc: dur.loc.clone(alts.loc),\n    conversionAccuracy: alts.conversionAccuracy || dur.conversionAccuracy,\n  };\n  return new Duration(conf);\n}\n\nfunction antiTrunc(n) {\n  return n < 0 ? Math.floor(n) : Math.ceil(n);\n}\n\n// NB: mutates parameters\nfunction convert(matrix, fromMap, fromUnit, toMap, toUnit) {\n  const conv = matrix[toUnit][fromUnit],\n    raw = fromMap[fromUnit] / conv,\n    sameSign = Math.sign(raw) === Math.sign(toMap[toUnit]),\n    // ok, so this is wild, but see the matrix in the tests\n    added =\n      !sameSign && toMap[toUnit] !== 0 && Math.abs(raw) <= 1 ? antiTrunc(raw) : Math.trunc(raw);\n  toMap[toUnit] += added;\n  fromMap[fromUnit] -= added * conv;\n}\n\n// NB: mutates parameters\nfunction normalizeValues(matrix, vals) {\n  reverseUnits.reduce((previous, current) => {\n    if (!isUndefined(vals[current])) {\n      if (previous) {\n        convert(matrix, vals, previous, vals, current);\n      }\n      return current;\n    } else {\n      return previous;\n    }\n  }, null);\n}\n\n/**\n * A Duration object represents a period of time, like \"2 months\" or \"1 day, 1 hour\". Conceptually, it's just a map of units to their quantities, accompanied by some additional configuration and methods for creating, parsing, interrogating, transforming, and formatting them. They can be used on their own or in conjunction with other Luxon types; for example, you can use {@link DateTime#plus} to add a Duration object to a DateTime, producing another DateTime.\n *\n * Here is a brief overview of commonly used methods and getters in Duration:\n *\n * * **Creation** To create a Duration, use {@link Duration#fromMillis}, {@link Duration#fromObject}, or {@link Duration#fromISO}.\n * * **Unit values** See the {@link Duration#years}, {@link Duration#months}, {@link Duration#weeks}, {@link Duration#days}, {@link Duration#hours}, {@link Duration#minutes}, {@link Duration#seconds}, {@link Duration#milliseconds} accessors.\n * * **Configuration** See  {@link Duration#locale} and {@link Duration#numberingSystem} accessors.\n * * **Transformation** To create new Durations out of old ones use {@link Duration#plus}, {@link Duration#minus}, {@link Duration#normalize}, {@link Duration#set}, {@link Duration#reconfigure}, {@link Duration#shiftTo}, and {@link Duration#negate}.\n * * **Output** To convert the Duration into other representations, see {@link Duration#as}, {@link Duration#toISO}, {@link Duration#toFormat}, and {@link Duration#toJSON}\n *\n * There's are more methods documented below. In addition, for more information on subtler topics like internationalization and validity, see the external documentation.\n */\nexport default class Duration {\n  /**\n   * @private\n   */\n  constructor(config) {\n    const accurate = config.conversionAccuracy === \"longterm\" || false;\n    /**\n     * @access private\n     */\n    this.values = config.values;\n    /**\n     * @access private\n     */\n    this.loc = config.loc || Locale.create();\n    /**\n     * @access private\n     */\n    this.conversionAccuracy = accurate ? \"longterm\" : \"casual\";\n    /**\n     * @access private\n     */\n    this.invalid = config.invalid || null;\n    /**\n     * @access private\n     */\n    this.matrix = accurate ? accurateMatrix : casualMatrix;\n    /**\n     * @access private\n     */\n    this.isLuxonDuration = true;\n  }\n\n  /**\n   * Create Duration from a number of milliseconds.\n   * @param {number} count of milliseconds\n   * @param {Object} opts - options for parsing\n   * @param {string} [opts.locale='en-US'] - the locale to use\n   * @param {string} opts.numberingSystem - the numbering system to use\n   * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n   * @return {Duration}\n   */\n  static fromMillis(count, opts) {\n    return Duration.fromObject({ milliseconds: count }, opts);\n  }\n\n  /**\n   * Create a Duration from a JavaScript object with keys like 'years' and 'hours'.\n   * If this object is empty then a zero milliseconds duration is returned.\n   * @param {Object} obj - the object to create the DateTime from\n   * @param {number} obj.years\n   * @param {number} obj.quarters\n   * @param {number} obj.months\n   * @param {number} obj.weeks\n   * @param {number} obj.days\n   * @param {number} obj.hours\n   * @param {number} obj.minutes\n   * @param {number} obj.seconds\n   * @param {number} obj.milliseconds\n   * @param {Object} [opts=[]] - options for creating this Duration\n   * @param {string} [opts.locale='en-US'] - the locale to use\n   * @param {string} opts.numberingSystem - the numbering system to use\n   * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n   * @return {Duration}\n   */\n  static fromObject(obj, opts = {}) {\n    if (obj == null || typeof obj !== \"object\") {\n      throw new InvalidArgumentError(\n        `Duration.fromObject: argument expected to be an object, got ${\n          obj === null ? \"null\" : typeof obj\n        }`\n      );\n    }\n\n    return new Duration({\n      values: normalizeObject(obj, Duration.normalizeUnit),\n      loc: Locale.fromObject(opts),\n      conversionAccuracy: opts.conversionAccuracy,\n    });\n  }\n\n  /**\n   * Create a Duration from DurationLike.\n   *\n   * @param {Object | number | Duration} durationLike\n   * One of:\n   * - object with keys like 'years' and 'hours'.\n   * - number representing milliseconds\n   * - Duration instance\n   * @return {Duration}\n   */\n  static fromDurationLike(durationLike) {\n    if (isNumber(durationLike)) {\n      return Duration.fromMillis(durationLike);\n    } else if (Duration.isDuration(durationLike)) {\n      return durationLike;\n    } else if (typeof durationLike === \"object\") {\n      return Duration.fromObject(durationLike);\n    } else {\n      throw new InvalidArgumentError(\n        `Unknown duration argument ${durationLike} of type ${typeof durationLike}`\n      );\n    }\n  }\n\n  /**\n   * Create a Duration from an ISO 8601 duration string.\n   * @param {string} text - text to parse\n   * @param {Object} opts - options for parsing\n   * @param {string} [opts.locale='en-US'] - the locale to use\n   * @param {string} opts.numberingSystem - the numbering system to use\n   * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n   * @see https://en.wikipedia.org/wiki/ISO_8601#Durations\n   * @example Duration.fromISO('P3Y6M1W4DT12H30M5S').toObject() //=> { years: 3, months: 6, weeks: 1, days: 4, hours: 12, minutes: 30, seconds: 5 }\n   * @example Duration.fromISO('PT23H').toObject() //=> { hours: 23 }\n   * @example Duration.fromISO('P5Y3M').toObject() //=> { years: 5, months: 3 }\n   * @return {Duration}\n   */\n  static fromISO(text, opts) {\n    const [parsed] = parseISODuration(text);\n    if (parsed) {\n      return Duration.fromObject(parsed, opts);\n    } else {\n      return Duration.invalid(\"unparsable\", `the input \"${text}\" can't be parsed as ISO 8601`);\n    }\n  }\n\n  /**\n   * Create a Duration from an ISO 8601 time string.\n   * @param {string} text - text to parse\n   * @param {Object} opts - options for parsing\n   * @param {string} [opts.locale='en-US'] - the locale to use\n   * @param {string} opts.numberingSystem - the numbering system to use\n   * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n   * @see https://en.wikipedia.org/wiki/ISO_8601#Times\n   * @example Duration.fromISOTime('11:22:33.444').toObject() //=> { hours: 11, minutes: 22, seconds: 33, milliseconds: 444 }\n   * @example Duration.fromISOTime('11:00').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }\n   * @example Duration.fromISOTime('T11:00').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }\n   * @example Duration.fromISOTime('1100').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }\n   * @example Duration.fromISOTime('T1100').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }\n   * @return {Duration}\n   */\n  static fromISOTime(text, opts) {\n    const [parsed] = parseISOTimeOnly(text);\n    if (parsed) {\n      return Duration.fromObject(parsed, opts);\n    } else {\n      return Duration.invalid(\"unparsable\", `the input \"${text}\" can't be parsed as ISO 8601`);\n    }\n  }\n\n  /**\n   * Create an invalid Duration.\n   * @param {string} reason - simple string of why this datetime is invalid. Should not contain parameters or anything else data-dependent\n   * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information\n   * @return {Duration}\n   */\n  static invalid(reason, explanation = null) {\n    if (!reason) {\n      throw new InvalidArgumentError(\"need to specify a reason the Duration is invalid\");\n    }\n\n    const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation);\n\n    if (Settings.throwOnInvalid) {\n      throw new InvalidDurationError(invalid);\n    } else {\n      return new Duration({ invalid });\n    }\n  }\n\n  /**\n   * @private\n   */\n  static normalizeUnit(unit) {\n    const normalized = {\n      year: \"years\",\n      years: \"years\",\n      quarter: \"quarters\",\n      quarters: \"quarters\",\n      month: \"months\",\n      months: \"months\",\n      week: \"weeks\",\n      weeks: \"weeks\",\n      day: \"days\",\n      days: \"days\",\n      hour: \"hours\",\n      hours: \"hours\",\n      minute: \"minutes\",\n      minutes: \"minutes\",\n      second: \"seconds\",\n      seconds: \"seconds\",\n      millisecond: \"milliseconds\",\n      milliseconds: \"milliseconds\",\n    }[unit ? unit.toLowerCase() : unit];\n\n    if (!normalized) throw new InvalidUnitError(unit);\n\n    return normalized;\n  }\n\n  /**\n   * Check if an object is a Duration. Works across context boundaries\n   * @param {object} o\n   * @return {boolean}\n   */\n  static isDuration(o) {\n    return (o && o.isLuxonDuration) || false;\n  }\n\n  /**\n   * Get  the locale of a Duration, such 'en-GB'\n   * @type {string}\n   */\n  get locale() {\n    return this.isValid ? this.loc.locale : null;\n  }\n\n  /**\n   * Get the numbering system of a Duration, such 'beng'. The numbering system is used when formatting the Duration\n   *\n   * @type {string}\n   */\n  get numberingSystem() {\n    return this.isValid ? this.loc.numberingSystem : null;\n  }\n\n  /**\n   * Returns a string representation of this Duration formatted according to the specified format string. You may use these tokens:\n   * * `S` for milliseconds\n   * * `s` for seconds\n   * * `m` for minutes\n   * * `h` for hours\n   * * `d` for days\n   * * `w` for weeks\n   * * `M` for months\n   * * `y` for years\n   * Notes:\n   * * Add padding by repeating the token, e.g. \"yy\" pads the years to two digits, \"hhhh\" pads the hours out to four digits\n   * * Tokens can be escaped by wrapping with single quotes.\n   * * The duration will be converted to the set of units in the format string using {@link Duration#shiftTo} and the Durations's conversion accuracy setting.\n   * @param {string} fmt - the format string\n   * @param {Object} opts - options\n   * @param {boolean} [opts.floor=true] - floor numerical values\n   * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat(\"y d s\") //=> \"1 6 2\"\n   * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat(\"yy dd sss\") //=> \"01 06 002\"\n   * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat(\"M S\") //=> \"12 518402000\"\n   * @return {string}\n   */\n  toFormat(fmt, opts = {}) {\n    // reverse-compat since 1.2; we always round down now, never up, and we do it by default\n    const fmtOpts = {\n      ...opts,\n      floor: opts.round !== false && opts.floor !== false,\n    };\n    return this.isValid\n      ? Formatter.create(this.loc, fmtOpts).formatDurationFromString(this, fmt)\n      : INVALID;\n  }\n\n  /**\n   * Returns a string representation of a Duration with all units included.\n   * To modify its behavior use the `listStyle` and any Intl.NumberFormat option, though `unitDisplay` is especially relevant.\n   * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat\n   * @param opts - On option object to override the formatting. Accepts the same keys as the options parameter of the native `Int.NumberFormat` constructor, as well as `listStyle`.\n   * @example\n   * ```js\n   * var dur = Duration.fromObject({ days: 1, hours: 5, minutes: 6 })\n   * dur.toHuman() //=> '1 day, 5 hours, 6 minutes'\n   * dur.toHuman({ listStyle: \"long\" }) //=> '1 day, 5 hours, and 6 minutes'\n   * dur.toHuman({ unitDisplay: \"short\" }) //=> '1 day, 5 hr, 6 min'\n   * ```\n   */\n  toHuman(opts = {}) {\n    const l = orderedUnits\n      .map((unit) => {\n        const val = this.values[unit];\n        if (isUndefined(val)) {\n          return null;\n        }\n        return this.loc\n          .numberFormatter({ style: \"unit\", unitDisplay: \"long\", ...opts, unit: unit.slice(0, -1) })\n          .format(val);\n      })\n      .filter((n) => n);\n\n    return this.loc\n      .listFormatter({ type: \"conjunction\", style: opts.listStyle || \"narrow\", ...opts })\n      .format(l);\n  }\n\n  /**\n   * Returns a JavaScript object with this Duration's values.\n   * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toObject() //=> { years: 1, days: 6, seconds: 2 }\n   * @return {Object}\n   */\n  toObject() {\n    if (!this.isValid) return {};\n    return { ...this.values };\n  }\n\n  /**\n   * Returns an ISO 8601-compliant string representation of this Duration.\n   * @see https://en.wikipedia.org/wiki/ISO_8601#Durations\n   * @example Duration.fromObject({ years: 3, seconds: 45 }).toISO() //=> 'P3YT45S'\n   * @example Duration.fromObject({ months: 4, seconds: 45 }).toISO() //=> 'P4MT45S'\n   * @example Duration.fromObject({ months: 5 }).toISO() //=> 'P5M'\n   * @example Duration.fromObject({ minutes: 5 }).toISO() //=> 'PT5M'\n   * @example Duration.fromObject({ milliseconds: 6 }).toISO() //=> 'PT0.006S'\n   * @return {string}\n   */\n  toISO() {\n    // we could use the formatter, but this is an easier way to get the minimum string\n    if (!this.isValid) return null;\n\n    let s = \"P\";\n    if (this.years !== 0) s += this.years + \"Y\";\n    if (this.months !== 0 || this.quarters !== 0) s += this.months + this.quarters * 3 + \"M\";\n    if (this.weeks !== 0) s += this.weeks + \"W\";\n    if (this.days !== 0) s += this.days + \"D\";\n    if (this.hours !== 0 || this.minutes !== 0 || this.seconds !== 0 || this.milliseconds !== 0)\n      s += \"T\";\n    if (this.hours !== 0) s += this.hours + \"H\";\n    if (this.minutes !== 0) s += this.minutes + \"M\";\n    if (this.seconds !== 0 || this.milliseconds !== 0)\n      // this will handle \"floating point madness\" by removing extra decimal places\n      // https://stackoverflow.com/questions/588004/is-floating-point-math-broken\n      s += roundTo(this.seconds + this.milliseconds / 1000, 3) + \"S\";\n    if (s === \"P\") s += \"T0S\";\n    return s;\n  }\n\n  /**\n   * Returns an ISO 8601-compliant string representation of this Duration, formatted as a time of day.\n   * Note that this will return null if the duration is invalid, negative, or equal to or greater than 24 hours.\n   * @see https://en.wikipedia.org/wiki/ISO_8601#Times\n   * @param {Object} opts - options\n   * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0\n   * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0\n   * @param {boolean} [opts.includePrefix=false] - include the `T` prefix\n   * @param {string} [opts.format='extended'] - choose between the basic and extended format\n   * @example Duration.fromObject({ hours: 11 }).toISOTime() //=> '11:00:00.000'\n   * @example Duration.fromObject({ hours: 11 }).toISOTime({ suppressMilliseconds: true }) //=> '11:00:00'\n   * @example Duration.fromObject({ hours: 11 }).toISOTime({ suppressSeconds: true }) //=> '11:00'\n   * @example Duration.fromObject({ hours: 11 }).toISOTime({ includePrefix: true }) //=> 'T11:00:00.000'\n   * @example Duration.fromObject({ hours: 11 }).toISOTime({ format: 'basic' }) //=> '110000.000'\n   * @return {string}\n   */\n  toISOTime(opts = {}) {\n    if (!this.isValid) return null;\n\n    const millis = this.toMillis();\n    if (millis < 0 || millis >= 86400000) return null;\n\n    opts = {\n      suppressMilliseconds: false,\n      suppressSeconds: false,\n      includePrefix: false,\n      format: \"extended\",\n      ...opts,\n    };\n\n    const value = this.shiftTo(\"hours\", \"minutes\", \"seconds\", \"milliseconds\");\n\n    let fmt = opts.format === \"basic\" ? \"hhmm\" : \"hh:mm\";\n\n    if (!opts.suppressSeconds || value.seconds !== 0 || value.milliseconds !== 0) {\n      fmt += opts.format === \"basic\" ? \"ss\" : \":ss\";\n      if (!opts.suppressMilliseconds || value.milliseconds !== 0) {\n        fmt += \".SSS\";\n      }\n    }\n\n    let str = value.toFormat(fmt);\n\n    if (opts.includePrefix) {\n      str = \"T\" + str;\n    }\n\n    return str;\n  }\n\n  /**\n   * Returns an ISO 8601 representation of this Duration appropriate for use in JSON.\n   * @return {string}\n   */\n  toJSON() {\n    return this.toISO();\n  }\n\n  /**\n   * Returns an ISO 8601 representation of this Duration appropriate for use in debugging.\n   * @return {string}\n   */\n  toString() {\n    return this.toISO();\n  }\n\n  /**\n   * Returns an milliseconds value of this Duration.\n   * @return {number}\n   */\n  toMillis() {\n    return this.as(\"milliseconds\");\n  }\n\n  /**\n   * Returns an milliseconds value of this Duration. Alias of {@link toMillis}\n   * @return {number}\n   */\n  valueOf() {\n    return this.toMillis();\n  }\n\n  /**\n   * Make this Duration longer by the specified amount. Return a newly-constructed Duration.\n   * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n   * @return {Duration}\n   */\n  plus(duration) {\n    if (!this.isValid) return this;\n\n    const dur = Duration.fromDurationLike(duration),\n      result = {};\n\n    for (const k of orderedUnits) {\n      if (hasOwnProperty(dur.values, k) || hasOwnProperty(this.values, k)) {\n        result[k] = dur.get(k) + this.get(k);\n      }\n    }\n\n    return clone(this, { values: result }, true);\n  }\n\n  /**\n   * Make this Duration shorter by the specified amount. Return a newly-constructed Duration.\n   * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n   * @return {Duration}\n   */\n  minus(duration) {\n    if (!this.isValid) return this;\n\n    const dur = Duration.fromDurationLike(duration);\n    return this.plus(dur.negate());\n  }\n\n  /**\n   * Scale this Duration by the specified amount. Return a newly-constructed Duration.\n   * @param {function} fn - The function to apply to each unit. Arity is 1 or 2: the value of the unit and, optionally, the unit name. Must return a number.\n   * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnits(x => x * 2) //=> { hours: 2, minutes: 60 }\n   * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnits((x, u) => u === \"hour\" ? x * 2 : x) //=> { hours: 2, minutes: 30 }\n   * @return {Duration}\n   */\n  mapUnits(fn) {\n    if (!this.isValid) return this;\n    const result = {};\n    for (const k of Object.keys(this.values)) {\n      result[k] = asNumber(fn(this.values[k], k));\n    }\n    return clone(this, { values: result }, true);\n  }\n\n  /**\n   * Get the value of unit.\n   * @param {string} unit - a unit such as 'minute' or 'day'\n   * @example Duration.fromObject({years: 2, days: 3}).get('years') //=> 2\n   * @example Duration.fromObject({years: 2, days: 3}).get('months') //=> 0\n   * @example Duration.fromObject({years: 2, days: 3}).get('days') //=> 3\n   * @return {number}\n   */\n  get(unit) {\n    return this[Duration.normalizeUnit(unit)];\n  }\n\n  /**\n   * \"Set\" the values of specified units. Return a newly-constructed Duration.\n   * @param {Object} values - a mapping of units to numbers\n   * @example dur.set({ years: 2017 })\n   * @example dur.set({ hours: 8, minutes: 30 })\n   * @return {Duration}\n   */\n  set(values) {\n    if (!this.isValid) return this;\n\n    const mixed = { ...this.values, ...normalizeObject(values, Duration.normalizeUnit) };\n    return clone(this, { values: mixed });\n  }\n\n  /**\n   * \"Set\" the locale and/or numberingSystem.  Returns a newly-constructed Duration.\n   * @example dur.reconfigure({ locale: 'en-GB' })\n   * @return {Duration}\n   */\n  reconfigure({ locale, numberingSystem, conversionAccuracy } = {}) {\n    const loc = this.loc.clone({ locale, numberingSystem }),\n      opts = { loc };\n\n    if (conversionAccuracy) {\n      opts.conversionAccuracy = conversionAccuracy;\n    }\n\n    return clone(this, opts);\n  }\n\n  /**\n   * Return the length of the duration in the specified unit.\n   * @param {string} unit - a unit such as 'minutes' or 'days'\n   * @example Duration.fromObject({years: 1}).as('days') //=> 365\n   * @example Duration.fromObject({years: 1}).as('months') //=> 12\n   * @example Duration.fromObject({hours: 60}).as('days') //=> 2.5\n   * @return {number}\n   */\n  as(unit) {\n    return this.isValid ? this.shiftTo(unit).get(unit) : NaN;\n  }\n\n  /**\n   * Reduce this Duration to its canonical representation in its current units.\n   * @example Duration.fromObject({ years: 2, days: 5000 }).normalize().toObject() //=> { years: 15, days: 255 }\n   * @example Duration.fromObject({ hours: 12, minutes: -45 }).normalize().toObject() //=> { hours: 11, minutes: 15 }\n   * @return {Duration}\n   */\n  normalize() {\n    if (!this.isValid) return this;\n    const vals = this.toObject();\n    normalizeValues(this.matrix, vals);\n    return clone(this, { values: vals }, true);\n  }\n\n  /**\n   * Convert this Duration into its representation in a different set of units.\n   * @example Duration.fromObject({ hours: 1, seconds: 30 }).shiftTo('minutes', 'milliseconds').toObject() //=> { minutes: 60, milliseconds: 30000 }\n   * @return {Duration}\n   */\n  shiftTo(...units) {\n    if (!this.isValid) return this;\n\n    if (units.length === 0) {\n      return this;\n    }\n\n    units = units.map((u) => Duration.normalizeUnit(u));\n\n    const built = {},\n      accumulated = {},\n      vals = this.toObject();\n    let lastUnit;\n\n    for (const k of orderedUnits) {\n      if (units.indexOf(k) >= 0) {\n        lastUnit = k;\n\n        let own = 0;\n\n        // anything we haven't boiled down yet should get boiled to this unit\n        for (const ak in accumulated) {\n          own += this.matrix[ak][k] * accumulated[ak];\n          accumulated[ak] = 0;\n        }\n\n        // plus anything that's already in this unit\n        if (isNumber(vals[k])) {\n          own += vals[k];\n        }\n\n        const i = Math.trunc(own);\n        built[k] = i;\n        accumulated[k] = (own * 1000 - i * 1000) / 1000;\n\n        // plus anything further down the chain that should be rolled up in to this\n        for (const down in vals) {\n          if (orderedUnits.indexOf(down) > orderedUnits.indexOf(k)) {\n            convert(this.matrix, vals, down, built, k);\n          }\n        }\n        // otherwise, keep it in the wings to boil it later\n      } else if (isNumber(vals[k])) {\n        accumulated[k] = vals[k];\n      }\n    }\n\n    // anything leftover becomes the decimal for the last unit\n    // lastUnit must be defined since units is not empty\n    for (const key in accumulated) {\n      if (accumulated[key] !== 0) {\n        built[lastUnit] +=\n          key === lastUnit ? accumulated[key] : accumulated[key] / this.matrix[lastUnit][key];\n      }\n    }\n\n    return clone(this, { values: built }, true).normalize();\n  }\n\n  /**\n   * Return the negative of this Duration.\n   * @example Duration.fromObject({ hours: 1, seconds: 30 }).negate().toObject() //=> { hours: -1, seconds: -30 }\n   * @return {Duration}\n   */\n  negate() {\n    if (!this.isValid) return this;\n    const negated = {};\n    for (const k of Object.keys(this.values)) {\n      negated[k] = this.values[k] === 0 ? 0 : -this.values[k];\n    }\n    return clone(this, { values: negated }, true);\n  }\n\n  /**\n   * Get the years.\n   * @type {number}\n   */\n  get years() {\n    return this.isValid ? this.values.years || 0 : NaN;\n  }\n\n  /**\n   * Get the quarters.\n   * @type {number}\n   */\n  get quarters() {\n    return this.isValid ? this.values.quarters || 0 : NaN;\n  }\n\n  /**\n   * Get the months.\n   * @type {number}\n   */\n  get months() {\n    return this.isValid ? this.values.months || 0 : NaN;\n  }\n\n  /**\n   * Get the weeks\n   * @type {number}\n   */\n  get weeks() {\n    return this.isValid ? this.values.weeks || 0 : NaN;\n  }\n\n  /**\n   * Get the days.\n   * @type {number}\n   */\n  get days() {\n    return this.isValid ? this.values.days || 0 : NaN;\n  }\n\n  /**\n   * Get the hours.\n   * @type {number}\n   */\n  get hours() {\n    return this.isValid ? this.values.hours || 0 : NaN;\n  }\n\n  /**\n   * Get the minutes.\n   * @type {number}\n   */\n  get minutes() {\n    return this.isValid ? this.values.minutes || 0 : NaN;\n  }\n\n  /**\n   * Get the seconds.\n   * @return {number}\n   */\n  get seconds() {\n    return this.isValid ? this.values.seconds || 0 : NaN;\n  }\n\n  /**\n   * Get the milliseconds.\n   * @return {number}\n   */\n  get milliseconds() {\n    return this.isValid ? this.values.milliseconds || 0 : NaN;\n  }\n\n  /**\n   * Returns whether the Duration is invalid. Invalid durations are returned by diff operations\n   * on invalid DateTimes or Intervals.\n   * @return {boolean}\n   */\n  get isValid() {\n    return this.invalid === null;\n  }\n\n  /**\n   * Returns an error code if this Duration became invalid, or null if the Duration is valid\n   * @return {string}\n   */\n  get invalidReason() {\n    return this.invalid ? this.invalid.reason : null;\n  }\n\n  /**\n   * Returns an explanation of why this Duration became invalid, or null if the Duration is valid\n   * @type {string}\n   */\n  get invalidExplanation() {\n    return this.invalid ? this.invalid.explanation : null;\n  }\n\n  /**\n   * Equality check\n   * Two Durations are equal iff they have the same units and the same values for each unit.\n   * @param {Duration} other\n   * @return {boolean}\n   */\n  equals(other) {\n    if (!this.isValid || !other.isValid) {\n      return false;\n    }\n\n    if (!this.loc.equals(other.loc)) {\n      return false;\n    }\n\n    function eq(v1, v2) {\n      // Consider 0 and undefined as equal\n      if (v1 === undefined || v1 === 0) return v2 === undefined || v2 === 0;\n      return v1 === v2;\n    }\n\n    for (const u of orderedUnits) {\n      if (!eq(this.values[u], other.values[u])) {\n        return false;\n      }\n    }\n    return true;\n  }\n}\n","import DateTime, { friendlyDateTime } from \"./datetime.js\";\nimport Duration from \"./duration.js\";\nimport Settings from \"./settings.js\";\nimport { InvalidArgumentError, InvalidIntervalError } from \"./errors.js\";\nimport Invalid from \"./impl/invalid.js\";\n\nconst INVALID = \"Invalid Interval\";\n\n// checks if the start is equal to or before the end\nfunction validateStartEnd(start, end) {\n  if (!start || !start.isValid) {\n    return Interval.invalid(\"missing or invalid start\");\n  } else if (!end || !end.isValid) {\n    return Interval.invalid(\"missing or invalid end\");\n  } else if (end < start) {\n    return Interval.invalid(\n      \"end before start\",\n      `The end of an interval must be after its start, but you had start=${start.toISO()} and end=${end.toISO()}`\n    );\n  } else {\n    return null;\n  }\n}\n\n/**\n * An Interval object represents a half-open interval of time, where each endpoint is a {@link DateTime}. Conceptually, it's a container for those two endpoints, accompanied by methods for creating, parsing, interrogating, comparing, transforming, and formatting them.\n *\n * Here is a brief overview of the most commonly used methods and getters in Interval:\n *\n * * **Creation** To create an Interval, use {@link Interval#fromDateTimes}, {@link Interval#after}, {@link Interval#before}, or {@link Interval#fromISO}.\n * * **Accessors** Use {@link Interval#start} and {@link Interval#end} to get the start and end.\n * * **Interrogation** To analyze the Interval, use {@link Interval#count}, {@link Interval#length}, {@link Interval#hasSame}, {@link Interval#contains}, {@link Interval#isAfter}, or {@link Interval#isBefore}.\n * * **Transformation** To create other Intervals out of this one, use {@link Interval#set}, {@link Interval#splitAt}, {@link Interval#splitBy}, {@link Interval#divideEqually}, {@link Interval#merge}, {@link Interval#xor}, {@link Interval#union}, {@link Interval#intersection}, or {@link Interval#difference}.\n * * **Comparison** To compare this Interval to another one, use {@link Interval#equals}, {@link Interval#overlaps}, {@link Interval#abutsStart}, {@link Interval#abutsEnd}, {@link Interval#engulfs}\n * * **Output** To convert the Interval into other representations, see {@link Interval#toString}, {@link Interval#toISO}, {@link Interval#toISODate}, {@link Interval#toISOTime}, {@link Interval#toFormat}, and {@link Interval#toDuration}.\n */\nexport default class Interval {\n  /**\n   * @private\n   */\n  constructor(config) {\n    /**\n     * @access private\n     */\n    this.s = config.start;\n    /**\n     * @access private\n     */\n    this.e = config.end;\n    /**\n     * @access private\n     */\n    this.invalid = config.invalid || null;\n    /**\n     * @access private\n     */\n    this.isLuxonInterval = true;\n  }\n\n  /**\n   * Create an invalid Interval.\n   * @param {string} reason - simple string of why this Interval is invalid. Should not contain parameters or anything else data-dependent\n   * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information\n   * @return {Interval}\n   */\n  static invalid(reason, explanation = null) {\n    if (!reason) {\n      throw new InvalidArgumentError(\"need to specify a reason the Interval is invalid\");\n    }\n\n    const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation);\n\n    if (Settings.throwOnInvalid) {\n      throw new InvalidIntervalError(invalid);\n    } else {\n      return new Interval({ invalid });\n    }\n  }\n\n  /**\n   * Create an Interval from a start DateTime and an end DateTime. Inclusive of the start but not the end.\n   * @param {DateTime|Date|Object} start\n   * @param {DateTime|Date|Object} end\n   * @return {Interval}\n   */\n  static fromDateTimes(start, end) {\n    const builtStart = friendlyDateTime(start),\n      builtEnd = friendlyDateTime(end);\n\n    const validateError = validateStartEnd(builtStart, builtEnd);\n\n    if (validateError == null) {\n      return new Interval({\n        start: builtStart,\n        end: builtEnd,\n      });\n    } else {\n      return validateError;\n    }\n  }\n\n  /**\n   * Create an Interval from a start DateTime and a Duration to extend to.\n   * @param {DateTime|Date|Object} start\n   * @param {Duration|Object|number} duration - the length of the Interval.\n   * @return {Interval}\n   */\n  static after(start, duration) {\n    const dur = Duration.fromDurationLike(duration),\n      dt = friendlyDateTime(start);\n    return Interval.fromDateTimes(dt, dt.plus(dur));\n  }\n\n  /**\n   * Create an Interval from an end DateTime and a Duration to extend backwards to.\n   * @param {DateTime|Date|Object} end\n   * @param {Duration|Object|number} duration - the length of the Interval.\n   * @return {Interval}\n   */\n  static before(end, duration) {\n    const dur = Duration.fromDurationLike(duration),\n      dt = friendlyDateTime(end);\n    return Interval.fromDateTimes(dt.minus(dur), dt);\n  }\n\n  /**\n   * Create an Interval from an ISO 8601 string.\n   * Accepts `<start>/<end>`, `<start>/<duration>`, and `<duration>/<end>` formats.\n   * @param {string} text - the ISO string to parse\n   * @param {Object} [opts] - options to pass {@link DateTime#fromISO} and optionally {@link Duration#fromISO}\n   * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n   * @return {Interval}\n   */\n  static fromISO(text, opts) {\n    const [s, e] = (text || \"\").split(\"/\", 2);\n    if (s && e) {\n      let start, startIsValid;\n      try {\n        start = DateTime.fromISO(s, opts);\n        startIsValid = start.isValid;\n      } catch (e) {\n        startIsValid = false;\n      }\n\n      let end, endIsValid;\n      try {\n        end = DateTime.fromISO(e, opts);\n        endIsValid = end.isValid;\n      } catch (e) {\n        endIsValid = false;\n      }\n\n      if (startIsValid && endIsValid) {\n        return Interval.fromDateTimes(start, end);\n      }\n\n      if (startIsValid) {\n        const dur = Duration.fromISO(e, opts);\n        if (dur.isValid) {\n          return Interval.after(start, dur);\n        }\n      } else if (endIsValid) {\n        const dur = Duration.fromISO(s, opts);\n        if (dur.isValid) {\n          return Interval.before(end, dur);\n        }\n      }\n    }\n    return Interval.invalid(\"unparsable\", `the input \"${text}\" can't be parsed as ISO 8601`);\n  }\n\n  /**\n   * Check if an object is an Interval. Works across context boundaries\n   * @param {object} o\n   * @return {boolean}\n   */\n  static isInterval(o) {\n    return (o && o.isLuxonInterval) || false;\n  }\n\n  /**\n   * Returns the start of the Interval\n   * @type {DateTime}\n   */\n  get start() {\n    return this.isValid ? this.s : null;\n  }\n\n  /**\n   * Returns the end of the Interval\n   * @type {DateTime}\n   */\n  get end() {\n    return this.isValid ? this.e : null;\n  }\n\n  /**\n   * Returns whether this Interval's end is at least its start, meaning that the Interval isn't 'backwards'.\n   * @type {boolean}\n   */\n  get isValid() {\n    return this.invalidReason === null;\n  }\n\n  /**\n   * Returns an error code if this Interval is invalid, or null if the Interval is valid\n   * @type {string}\n   */\n  get invalidReason() {\n    return this.invalid ? this.invalid.reason : null;\n  }\n\n  /**\n   * Returns an explanation of why this Interval became invalid, or null if the Interval is valid\n   * @type {string}\n   */\n  get invalidExplanation() {\n    return this.invalid ? this.invalid.explanation : null;\n  }\n\n  /**\n   * Returns the length of the Interval in the specified unit.\n   * @param {string} unit - the unit (such as 'hours' or 'days') to return the length in.\n   * @return {number}\n   */\n  length(unit = \"milliseconds\") {\n    return this.isValid ? this.toDuration(...[unit]).get(unit) : NaN;\n  }\n\n  /**\n   * Returns the count of minutes, hours, days, months, or years included in the Interval, even in part.\n   * Unlike {@link Interval#length} this counts sections of the calendar, not periods of time, e.g. specifying 'day'\n   * asks 'what dates are included in this interval?', not 'how many days long is this interval?'\n   * @param {string} [unit='milliseconds'] - the unit of time to count.\n   * @return {number}\n   */\n  count(unit = \"milliseconds\") {\n    if (!this.isValid) return NaN;\n    const start = this.start.startOf(unit),\n      end = this.end.startOf(unit);\n    return Math.floor(end.diff(start, unit).get(unit)) + 1;\n  }\n\n  /**\n   * Returns whether this Interval's start and end are both in the same unit of time\n   * @param {string} unit - the unit of time to check sameness on\n   * @return {boolean}\n   */\n  hasSame(unit) {\n    return this.isValid ? this.isEmpty() || this.e.minus(1).hasSame(this.s, unit) : false;\n  }\n\n  /**\n   * Return whether this Interval has the same start and end DateTimes.\n   * @return {boolean}\n   */\n  isEmpty() {\n    return this.s.valueOf() === this.e.valueOf();\n  }\n\n  /**\n   * Return whether this Interval's start is after the specified DateTime.\n   * @param {DateTime} dateTime\n   * @return {boolean}\n   */\n  isAfter(dateTime) {\n    if (!this.isValid) return false;\n    return this.s > dateTime;\n  }\n\n  /**\n   * Return whether this Interval's end is before the specified DateTime.\n   * @param {DateTime} dateTime\n   * @return {boolean}\n   */\n  isBefore(dateTime) {\n    if (!this.isValid) return false;\n    return this.e <= dateTime;\n  }\n\n  /**\n   * Return whether this Interval contains the specified DateTime.\n   * @param {DateTime} dateTime\n   * @return {boolean}\n   */\n  contains(dateTime) {\n    if (!this.isValid) return false;\n    return this.s <= dateTime && this.e > dateTime;\n  }\n\n  /**\n   * \"Sets\" the start and/or end dates. Returns a newly-constructed Interval.\n   * @param {Object} values - the values to set\n   * @param {DateTime} values.start - the starting DateTime\n   * @param {DateTime} values.end - the ending DateTime\n   * @return {Interval}\n   */\n  set({ start, end } = {}) {\n    if (!this.isValid) return this;\n    return Interval.fromDateTimes(start || this.s, end || this.e);\n  }\n\n  /**\n   * Split this Interval at each of the specified DateTimes\n   * @param {...DateTime} dateTimes - the unit of time to count.\n   * @return {Array}\n   */\n  splitAt(...dateTimes) {\n    if (!this.isValid) return [];\n    const sorted = dateTimes\n        .map(friendlyDateTime)\n        .filter((d) => this.contains(d))\n        .sort(),\n      results = [];\n    let { s } = this,\n      i = 0;\n\n    while (s < this.e) {\n      const added = sorted[i] || this.e,\n        next = +added > +this.e ? this.e : added;\n      results.push(Interval.fromDateTimes(s, next));\n      s = next;\n      i += 1;\n    }\n\n    return results;\n  }\n\n  /**\n   * Split this Interval into smaller Intervals, each of the specified length.\n   * Left over time is grouped into a smaller interval\n   * @param {Duration|Object|number} duration - The length of each resulting interval.\n   * @return {Array}\n   */\n  splitBy(duration) {\n    const dur = Duration.fromDurationLike(duration);\n\n    if (!this.isValid || !dur.isValid || dur.as(\"milliseconds\") === 0) {\n      return [];\n    }\n\n    let { s } = this,\n      idx = 1,\n      next;\n\n    const results = [];\n    while (s < this.e) {\n      const added = this.start.plus(dur.mapUnits((x) => x * idx));\n      next = +added > +this.e ? this.e : added;\n      results.push(Interval.fromDateTimes(s, next));\n      s = next;\n      idx += 1;\n    }\n\n    return results;\n  }\n\n  /**\n   * Split this Interval into the specified number of smaller intervals.\n   * @param {number} numberOfParts - The number of Intervals to divide the Interval into.\n   * @return {Array}\n   */\n  divideEqually(numberOfParts) {\n    if (!this.isValid) return [];\n    return this.splitBy(this.length() / numberOfParts).slice(0, numberOfParts);\n  }\n\n  /**\n   * Return whether this Interval overlaps with the specified Interval\n   * @param {Interval} other\n   * @return {boolean}\n   */\n  overlaps(other) {\n    return this.e > other.s && this.s < other.e;\n  }\n\n  /**\n   * Return whether this Interval's end is adjacent to the specified Interval's start.\n   * @param {Interval} other\n   * @return {boolean}\n   */\n  abutsStart(other) {\n    if (!this.isValid) return false;\n    return +this.e === +other.s;\n  }\n\n  /**\n   * Return whether this Interval's start is adjacent to the specified Interval's end.\n   * @param {Interval} other\n   * @return {boolean}\n   */\n  abutsEnd(other) {\n    if (!this.isValid) return false;\n    return +other.e === +this.s;\n  }\n\n  /**\n   * Return whether this Interval engulfs the start and end of the specified Interval.\n   * @param {Interval} other\n   * @return {boolean}\n   */\n  engulfs(other) {\n    if (!this.isValid) return false;\n    return this.s <= other.s && this.e >= other.e;\n  }\n\n  /**\n   * Return whether this Interval has the same start and end as the specified Interval.\n   * @param {Interval} other\n   * @return {boolean}\n   */\n  equals(other) {\n    if (!this.isValid || !other.isValid) {\n      return false;\n    }\n\n    return this.s.equals(other.s) && this.e.equals(other.e);\n  }\n\n  /**\n   * Return an Interval representing the intersection of this Interval and the specified Interval.\n   * Specifically, the resulting Interval has the maximum start time and the minimum end time of the two Intervals.\n   * Returns null if the intersection is empty, meaning, the intervals don't intersect.\n   * @param {Interval} other\n   * @return {Interval}\n   */\n  intersection(other) {\n    if (!this.isValid) return this;\n    const s = this.s > other.s ? this.s : other.s,\n      e = this.e < other.e ? this.e : other.e;\n\n    if (s >= e) {\n      return null;\n    } else {\n      return Interval.fromDateTimes(s, e);\n    }\n  }\n\n  /**\n   * Return an Interval representing the union of this Interval and the specified Interval.\n   * Specifically, the resulting Interval has the minimum start time and the maximum end time of the two Intervals.\n   * @param {Interval} other\n   * @return {Interval}\n   */\n  union(other) {\n    if (!this.isValid) return this;\n    const s = this.s < other.s ? this.s : other.s,\n      e = this.e > other.e ? this.e : other.e;\n    return Interval.fromDateTimes(s, e);\n  }\n\n  /**\n   * Merge an array of Intervals into a equivalent minimal set of Intervals.\n   * Combines overlapping and adjacent Intervals.\n   * @param {Array} intervals\n   * @return {Array}\n   */\n  static merge(intervals) {\n    const [found, final] = intervals\n      .sort((a, b) => a.s - b.s)\n      .reduce(\n        ([sofar, current], item) => {\n          if (!current) {\n            return [sofar, item];\n          } else if (current.overlaps(item) || current.abutsStart(item)) {\n            return [sofar, current.union(item)];\n          } else {\n            return [sofar.concat([current]), item];\n          }\n        },\n        [[], null]\n      );\n    if (final) {\n      found.push(final);\n    }\n    return found;\n  }\n\n  /**\n   * Return an array of Intervals representing the spans of time that only appear in one of the specified Intervals.\n   * @param {Array} intervals\n   * @return {Array}\n   */\n  static xor(intervals) {\n    let start = null,\n      currentCount = 0;\n    const results = [],\n      ends = intervals.map((i) => [\n        { time: i.s, type: \"s\" },\n        { time: i.e, type: \"e\" },\n      ]),\n      flattened = Array.prototype.concat(...ends),\n      arr = flattened.sort((a, b) => a.time - b.time);\n\n    for (const i of arr) {\n      currentCount += i.type === \"s\" ? 1 : -1;\n\n      if (currentCount === 1) {\n        start = i.time;\n      } else {\n        if (start && +start !== +i.time) {\n          results.push(Interval.fromDateTimes(start, i.time));\n        }\n\n        start = null;\n      }\n    }\n\n    return Interval.merge(results);\n  }\n\n  /**\n   * Return an Interval representing the span of time in this Interval that doesn't overlap with any of the specified Intervals.\n   * @param {...Interval} intervals\n   * @return {Array}\n   */\n  difference(...intervals) {\n    return Interval.xor([this].concat(intervals))\n      .map((i) => this.intersection(i))\n      .filter((i) => i && !i.isEmpty());\n  }\n\n  /**\n   * Returns a string representation of this Interval appropriate for debugging.\n   * @return {string}\n   */\n  toString() {\n    if (!this.isValid) return INVALID;\n    return `[${this.s.toISO()} – ${this.e.toISO()})`;\n  }\n\n  /**\n   * Returns an ISO 8601-compliant string representation of this Interval.\n   * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n   * @param {Object} opts - The same options as {@link DateTime#toISO}\n   * @return {string}\n   */\n  toISO(opts) {\n    if (!this.isValid) return INVALID;\n    return `${this.s.toISO(opts)}/${this.e.toISO(opts)}`;\n  }\n\n  /**\n   * Returns an ISO 8601-compliant string representation of date of this Interval.\n   * The time components are ignored.\n   * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n   * @return {string}\n   */\n  toISODate() {\n    if (!this.isValid) return INVALID;\n    return `${this.s.toISODate()}/${this.e.toISODate()}`;\n  }\n\n  /**\n   * Returns an ISO 8601-compliant string representation of time of this Interval.\n   * The date components are ignored.\n   * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n   * @param {Object} opts - The same options as {@link DateTime#toISO}\n   * @return {string}\n   */\n  toISOTime(opts) {\n    if (!this.isValid) return INVALID;\n    return `${this.s.toISOTime(opts)}/${this.e.toISOTime(opts)}`;\n  }\n\n  /**\n   * Returns a string representation of this Interval formatted according to the specified format string.\n   * @param {string} dateFormat - the format string. This string formats the start and end time. See {@link DateTime#toFormat} for details.\n   * @param {Object} opts - options\n   * @param {string} [opts.separator =  ' – '] - a separator to place between the start and end representations\n   * @return {string}\n   */\n  toFormat(dateFormat, { separator = \" – \" } = {}) {\n    if (!this.isValid) return INVALID;\n    return `${this.s.toFormat(dateFormat)}${separator}${this.e.toFormat(dateFormat)}`;\n  }\n\n  /**\n   * Return a Duration representing the time spanned by this interval.\n   * @param {string|string[]} [unit=['milliseconds']] - the unit or units (such as 'hours' or 'days') to include in the duration.\n   * @param {Object} opts - options that affect the creation of the Duration\n   * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n   * @example Interval.fromDateTimes(dt1, dt2).toDuration().toObject() //=> { milliseconds: 88489257 }\n   * @example Interval.fromDateTimes(dt1, dt2).toDuration('days').toObject() //=> { days: 1.0241812152777778 }\n   * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes']).toObject() //=> { hours: 24, minutes: 34.82095 }\n   * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes', 'seconds']).toObject() //=> { hours: 24, minutes: 34, seconds: 49.257 }\n   * @example Interval.fromDateTimes(dt1, dt2).toDuration('seconds').toObject() //=> { seconds: 88489.257 }\n   * @return {Duration}\n   */\n  toDuration(unit, opts) {\n    if (!this.isValid) {\n      return Duration.invalid(this.invalidReason);\n    }\n    return this.e.diff(this.s, unit, opts);\n  }\n\n  /**\n   * Run mapFn on the interval start and end, returning a new Interval from the resulting DateTimes\n   * @param {function} mapFn\n   * @return {Interval}\n   * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.toUTC())\n   * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.plus({ hours: 2 }))\n   */\n  mapEndpoints(mapFn) {\n    return Interval.fromDateTimes(mapFn(this.s), mapFn(this.e));\n  }\n}\n","import DateTime from \"./datetime.js\";\nimport Settings from \"./settings.js\";\nimport Locale from \"./impl/locale.js\";\nimport IANAZone from \"./zones/IANAZone.js\";\nimport { normalizeZone } from \"./impl/zoneUtil.js\";\n\nimport { hasRelative } from \"./impl/util.js\";\n\n/**\n * The Info class contains static methods for retrieving general time and date related data. For example, it has methods for finding out if a time zone has a DST, for listing the months in any supported locale, and for discovering which of Luxon features are available in the current environment.\n */\nexport default class Info {\n  /**\n   * Return whether the specified zone contains a DST.\n   * @param {string|Zone} [zone='local'] - Zone to check. Defaults to the environment's local zone.\n   * @return {boolean}\n   */\n  static hasDST(zone = Settings.defaultZone) {\n    const proto = DateTime.now().setZone(zone).set({ month: 12 });\n\n    return !zone.isUniversal && proto.offset !== proto.set({ month: 6 }).offset;\n  }\n\n  /**\n   * Return whether the specified zone is a valid IANA specifier.\n   * @param {string} zone - Zone to check\n   * @return {boolean}\n   */\n  static isValidIANAZone(zone) {\n    return IANAZone.isValidZone(zone);\n  }\n\n  /**\n   * Converts the input into a {@link Zone} instance.\n   *\n   * * If `input` is already a Zone instance, it is returned unchanged.\n   * * If `input` is a string containing a valid time zone name, a Zone instance\n   *   with that name is returned.\n   * * If `input` is a string that doesn't refer to a known time zone, a Zone\n   *   instance with {@link Zone#isValid} == false is returned.\n   * * If `input is a number, a Zone instance with the specified fixed offset\n   *   in minutes is returned.\n   * * If `input` is `null` or `undefined`, the default zone is returned.\n   * @param {string|Zone|number} [input] - the value to be converted\n   * @return {Zone}\n   */\n  static normalizeZone(input) {\n    return normalizeZone(input, Settings.defaultZone);\n  }\n\n  /**\n   * Return an array of standalone month names.\n   * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n   * @param {string} [length='long'] - the length of the month representation, such as \"numeric\", \"2-digit\", \"narrow\", \"short\", \"long\"\n   * @param {Object} opts - options\n   * @param {string} [opts.locale] - the locale code\n   * @param {string} [opts.numberingSystem=null] - the numbering system\n   * @param {string} [opts.locObj=null] - an existing locale object to use\n   * @param {string} [opts.outputCalendar='gregory'] - the calendar\n   * @example Info.months()[0] //=> 'January'\n   * @example Info.months('short')[0] //=> 'Jan'\n   * @example Info.months('numeric')[0] //=> '1'\n   * @example Info.months('short', { locale: 'fr-CA' } )[0] //=> 'janv.'\n   * @example Info.months('numeric', { locale: 'ar' })[0] //=> '١'\n   * @example Info.months('long', { outputCalendar: 'islamic' })[0] //=> 'Rabiʻ I'\n   * @return {Array}\n   */\n  static months(\n    length = \"long\",\n    { locale = null, numberingSystem = null, locObj = null, outputCalendar = \"gregory\" } = {}\n  ) {\n    return (locObj || Locale.create(locale, numberingSystem, outputCalendar)).months(length);\n  }\n\n  /**\n   * Return an array of format month names.\n   * Format months differ from standalone months in that they're meant to appear next to the day of the month. In some languages, that\n   * changes the string.\n   * See {@link Info#months}\n   * @param {string} [length='long'] - the length of the month representation, such as \"numeric\", \"2-digit\", \"narrow\", \"short\", \"long\"\n   * @param {Object} opts - options\n   * @param {string} [opts.locale] - the locale code\n   * @param {string} [opts.numberingSystem=null] - the numbering system\n   * @param {string} [opts.locObj=null] - an existing locale object to use\n   * @param {string} [opts.outputCalendar='gregory'] - the calendar\n   * @return {Array}\n   */\n  static monthsFormat(\n    length = \"long\",\n    { locale = null, numberingSystem = null, locObj = null, outputCalendar = \"gregory\" } = {}\n  ) {\n    return (locObj || Locale.create(locale, numberingSystem, outputCalendar)).months(length, true);\n  }\n\n  /**\n   * Return an array of standalone week names.\n   * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n   * @param {string} [length='long'] - the length of the weekday representation, such as \"narrow\", \"short\", \"long\".\n   * @param {Object} opts - options\n   * @param {string} [opts.locale] - the locale code\n   * @param {string} [opts.numberingSystem=null] - the numbering system\n   * @param {string} [opts.locObj=null] - an existing locale object to use\n   * @example Info.weekdays()[0] //=> 'Monday'\n   * @example Info.weekdays('short')[0] //=> 'Mon'\n   * @example Info.weekdays('short', { locale: 'fr-CA' })[0] //=> 'lun.'\n   * @example Info.weekdays('short', { locale: 'ar' })[0] //=> 'الاثنين'\n   * @return {Array}\n   */\n  static weekdays(length = \"long\", { locale = null, numberingSystem = null, locObj = null } = {}) {\n    return (locObj || Locale.create(locale, numberingSystem, null)).weekdays(length);\n  }\n\n  /**\n   * Return an array of format week names.\n   * Format weekdays differ from standalone weekdays in that they're meant to appear next to more date information. In some languages, that\n   * changes the string.\n   * See {@link Info#weekdays}\n   * @param {string} [length='long'] - the length of the month representation, such as \"narrow\", \"short\", \"long\".\n   * @param {Object} opts - options\n   * @param {string} [opts.locale=null] - the locale code\n   * @param {string} [opts.numberingSystem=null] - the numbering system\n   * @param {string} [opts.locObj=null] - an existing locale object to use\n   * @return {Array}\n   */\n  static weekdaysFormat(\n    length = \"long\",\n    { locale = null, numberingSystem = null, locObj = null } = {}\n  ) {\n    return (locObj || Locale.create(locale, numberingSystem, null)).weekdays(length, true);\n  }\n\n  /**\n   * Return an array of meridiems.\n   * @param {Object} opts - options\n   * @param {string} [opts.locale] - the locale code\n   * @example Info.meridiems() //=> [ 'AM', 'PM' ]\n   * @example Info.meridiems({ locale: 'my' }) //=> [ 'နံနက်', 'ညနေ' ]\n   * @return {Array}\n   */\n  static meridiems({ locale = null } = {}) {\n    return Locale.create(locale).meridiems();\n  }\n\n  /**\n   * Return an array of eras, such as ['BC', 'AD']. The locale can be specified, but the calendar system is always Gregorian.\n   * @param {string} [length='short'] - the length of the era representation, such as \"short\" or \"long\".\n   * @param {Object} opts - options\n   * @param {string} [opts.locale] - the locale code\n   * @example Info.eras() //=> [ 'BC', 'AD' ]\n   * @example Info.eras('long') //=> [ 'Before Christ', 'Anno Domini' ]\n   * @example Info.eras('long', { locale: 'fr' }) //=> [ 'avant Jésus-Christ', 'après Jésus-Christ' ]\n   * @return {Array}\n   */\n  static eras(length = \"short\", { locale = null } = {}) {\n    return Locale.create(locale, null, \"gregory\").eras(length);\n  }\n\n  /**\n   * Return the set of available features in this environment.\n   * Some features of Luxon are not available in all environments. For example, on older browsers, relative time formatting support is not available. Use this function to figure out if that's the case.\n   * Keys:\n   * * `relative`: whether this environment supports relative time formatting\n   * @example Info.features() //=> { relative: false }\n   * @return {Object}\n   */\n  static features() {\n    return { relative: hasRelative() };\n  }\n}\n","import Duration from \"../duration.js\";\n\nfunction dayDiff(earlier, later) {\n  const utcDayStart = (dt) => dt.toUTC(0, { keepLocalTime: true }).startOf(\"day\").valueOf(),\n    ms = utcDayStart(later) - utcDayStart(earlier);\n  return Math.floor(Duration.fromMillis(ms).as(\"days\"));\n}\n\nfunction highOrderDiffs(cursor, later, units) {\n  const differs = [\n    [\"years\", (a, b) => b.year - a.year],\n    [\"quarters\", (a, b) => b.quarter - a.quarter],\n    [\"months\", (a, b) => b.month - a.month + (b.year - a.year) * 12],\n    [\n      \"weeks\",\n      (a, b) => {\n        const days = dayDiff(a, b);\n        return (days - (days % 7)) / 7;\n      },\n    ],\n    [\"days\", dayDiff],\n  ];\n\n  const results = {};\n  let lowestOrder, highWater;\n\n  for (const [unit, differ] of differs) {\n    if (units.indexOf(unit) >= 0) {\n      lowestOrder = unit;\n\n      let delta = differ(cursor, later);\n      highWater = cursor.plus({ [unit]: delta });\n\n      if (highWater > later) {\n        cursor = cursor.plus({ [unit]: delta - 1 });\n        delta -= 1;\n      } else {\n        cursor = highWater;\n      }\n\n      results[unit] = delta;\n    }\n  }\n\n  return [cursor, results, highWater, lowestOrder];\n}\n\nexport default function (earlier, later, units, opts) {\n  let [cursor, results, highWater, lowestOrder] = highOrderDiffs(earlier, later, units);\n\n  const remainingMillis = later - cursor;\n\n  const lowerOrderUnits = units.filter(\n    (u) => [\"hours\", \"minutes\", \"seconds\", \"milliseconds\"].indexOf(u) >= 0\n  );\n\n  if (lowerOrderUnits.length === 0) {\n    if (highWater < later) {\n      highWater = cursor.plus({ [lowestOrder]: 1 });\n    }\n\n    if (highWater !== cursor) {\n      results[lowestOrder] = (results[lowestOrder] || 0) + remainingMillis / (highWater - cursor);\n    }\n  }\n\n  const duration = Duration.fromObject(results, opts);\n\n  if (lowerOrderUnits.length > 0) {\n    return Duration.fromMillis(remainingMillis, opts)\n      .shiftTo(...lowerOrderUnits)\n      .plus(duration);\n  } else {\n    return duration;\n  }\n}\n","const numberingSystems = {\n  arab: \"[\\u0660-\\u0669]\",\n  arabext: \"[\\u06F0-\\u06F9]\",\n  bali: \"[\\u1B50-\\u1B59]\",\n  beng: \"[\\u09E6-\\u09EF]\",\n  deva: \"[\\u0966-\\u096F]\",\n  fullwide: \"[\\uFF10-\\uFF19]\",\n  gujr: \"[\\u0AE6-\\u0AEF]\",\n  hanidec: \"[〇|一|二|三|四|五|六|七|八|九]\",\n  khmr: \"[\\u17E0-\\u17E9]\",\n  knda: \"[\\u0CE6-\\u0CEF]\",\n  laoo: \"[\\u0ED0-\\u0ED9]\",\n  limb: \"[\\u1946-\\u194F]\",\n  mlym: \"[\\u0D66-\\u0D6F]\",\n  mong: \"[\\u1810-\\u1819]\",\n  mymr: \"[\\u1040-\\u1049]\",\n  orya: \"[\\u0B66-\\u0B6F]\",\n  tamldec: \"[\\u0BE6-\\u0BEF]\",\n  telu: \"[\\u0C66-\\u0C6F]\",\n  thai: \"[\\u0E50-\\u0E59]\",\n  tibt: \"[\\u0F20-\\u0F29]\",\n  latn: \"\\\\d\",\n};\n\nconst numberingSystemsUTF16 = {\n  arab: [1632, 1641],\n  arabext: [1776, 1785],\n  bali: [6992, 7001],\n  beng: [2534, 2543],\n  deva: [2406, 2415],\n  fullwide: [65296, 65303],\n  gujr: [2790, 2799],\n  khmr: [6112, 6121],\n  knda: [3302, 3311],\n  laoo: [3792, 3801],\n  limb: [6470, 6479],\n  mlym: [3430, 3439],\n  mong: [6160, 6169],\n  mymr: [4160, 4169],\n  orya: [2918, 2927],\n  tamldec: [3046, 3055],\n  telu: [3174, 3183],\n  thai: [3664, 3673],\n  tibt: [3872, 3881],\n};\n\nconst hanidecChars = numberingSystems.hanidec.replace(/[\\[|\\]]/g, \"\").split(\"\");\n\nexport function parseDigits(str) {\n  let value = parseInt(str, 10);\n  if (isNaN(value)) {\n    value = \"\";\n    for (let i = 0; i < str.length; i++) {\n      const code = str.charCodeAt(i);\n\n      if (str[i].search(numberingSystems.hanidec) !== -1) {\n        value += hanidecChars.indexOf(str[i]);\n      } else {\n        for (const key in numberingSystemsUTF16) {\n          const [min, max] = numberingSystemsUTF16[key];\n          if (code >= min && code <= max) {\n            value += code - min;\n          }\n        }\n      }\n    }\n    return parseInt(value, 10);\n  } else {\n    return value;\n  }\n}\n\nexport function digitRegex({ numberingSystem }, append = \"\") {\n  return new RegExp(`${numberingSystems[numberingSystem || \"latn\"]}${append}`);\n}\n","import { parseMillis, isUndefined, untruncateYear, signedOffset, hasOwnProperty } from \"./util.js\";\nimport Formatter from \"./formatter.js\";\nimport FixedOffsetZone from \"../zones/fixedOffsetZone.js\";\nimport IANAZone from \"../zones/IANAZone.js\";\nimport DateTime from \"../datetime.js\";\nimport { digitRegex, parseDigits } from \"./digits.js\";\nimport { ConflictingSpecificationError } from \"../errors.js\";\n\nconst MISSING_FTP = \"missing Intl.DateTimeFormat.formatToParts support\";\n\nfunction intUnit(regex, post = (i) => i) {\n  return { regex, deser: ([s]) => post(parseDigits(s)) };\n}\n\nconst NBSP = String.fromCharCode(160);\nconst spaceOrNBSP = `[ ${NBSP}]`;\nconst spaceOrNBSPRegExp = new RegExp(spaceOrNBSP, \"g\");\n\nfunction fixListRegex(s) {\n  // make dots optional and also make them literal\n  // make space and non breakable space characters interchangeable\n  return s.replace(/\\./g, \"\\\\.?\").replace(spaceOrNBSPRegExp, spaceOrNBSP);\n}\n\nfunction stripInsensitivities(s) {\n  return s\n    .replace(/\\./g, \"\") // ignore dots that were made optional\n    .replace(spaceOrNBSPRegExp, \" \") // interchange space and nbsp\n    .toLowerCase();\n}\n\nfunction oneOf(strings, startIndex) {\n  if (strings === null) {\n    return null;\n  } else {\n    return {\n      regex: RegExp(strings.map(fixListRegex).join(\"|\")),\n      deser: ([s]) =>\n        strings.findIndex((i) => stripInsensitivities(s) === stripInsensitivities(i)) + startIndex,\n    };\n  }\n}\n\nfunction offset(regex, groups) {\n  return { regex, deser: ([, h, m]) => signedOffset(h, m), groups };\n}\n\nfunction simple(regex) {\n  return { regex, deser: ([s]) => s };\n}\n\nfunction escapeToken(value) {\n  return value.replace(/[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g, \"\\\\$&\");\n}\n\nfunction unitForToken(token, loc) {\n  const one = digitRegex(loc),\n    two = digitRegex(loc, \"{2}\"),\n    three = digitRegex(loc, \"{3}\"),\n    four = digitRegex(loc, \"{4}\"),\n    six = digitRegex(loc, \"{6}\"),\n    oneOrTwo = digitRegex(loc, \"{1,2}\"),\n    oneToThree = digitRegex(loc, \"{1,3}\"),\n    oneToSix = digitRegex(loc, \"{1,6}\"),\n    oneToNine = digitRegex(loc, \"{1,9}\"),\n    twoToFour = digitRegex(loc, \"{2,4}\"),\n    fourToSix = digitRegex(loc, \"{4,6}\"),\n    literal = (t) => ({ regex: RegExp(escapeToken(t.val)), deser: ([s]) => s, literal: true }),\n    unitate = (t) => {\n      if (token.literal) {\n        return literal(t);\n      }\n      switch (t.val) {\n        // era\n        case \"G\":\n          return oneOf(loc.eras(\"short\", false), 0);\n        case \"GG\":\n          return oneOf(loc.eras(\"long\", false), 0);\n        // years\n        case \"y\":\n          return intUnit(oneToSix);\n        case \"yy\":\n          return intUnit(twoToFour, untruncateYear);\n        case \"yyyy\":\n          return intUnit(four);\n        case \"yyyyy\":\n          return intUnit(fourToSix);\n        case \"yyyyyy\":\n          return intUnit(six);\n        // months\n        case \"M\":\n          return intUnit(oneOrTwo);\n        case \"MM\":\n          return intUnit(two);\n        case \"MMM\":\n          return oneOf(loc.months(\"short\", true, false), 1);\n        case \"MMMM\":\n          return oneOf(loc.months(\"long\", true, false), 1);\n        case \"L\":\n          return intUnit(oneOrTwo);\n        case \"LL\":\n          return intUnit(two);\n        case \"LLL\":\n          return oneOf(loc.months(\"short\", false, false), 1);\n        case \"LLLL\":\n          return oneOf(loc.months(\"long\", false, false), 1);\n        // dates\n        case \"d\":\n          return intUnit(oneOrTwo);\n        case \"dd\":\n          return intUnit(two);\n        // ordinals\n        case \"o\":\n          return intUnit(oneToThree);\n        case \"ooo\":\n          return intUnit(three);\n        // time\n        case \"HH\":\n          return intUnit(two);\n        case \"H\":\n          return intUnit(oneOrTwo);\n        case \"hh\":\n          return intUnit(two);\n        case \"h\":\n          return intUnit(oneOrTwo);\n        case \"mm\":\n          return intUnit(two);\n        case \"m\":\n          return intUnit(oneOrTwo);\n        case \"q\":\n          return intUnit(oneOrTwo);\n        case \"qq\":\n          return intUnit(two);\n        case \"s\":\n          return intUnit(oneOrTwo);\n        case \"ss\":\n          return intUnit(two);\n        case \"S\":\n          return intUnit(oneToThree);\n        case \"SSS\":\n          return intUnit(three);\n        case \"u\":\n          return simple(oneToNine);\n        case \"uu\":\n          return simple(oneOrTwo);\n        case \"uuu\":\n          return intUnit(one);\n        // meridiem\n        case \"a\":\n          return oneOf(loc.meridiems(), 0);\n        // weekYear (k)\n        case \"kkkk\":\n          return intUnit(four);\n        case \"kk\":\n          return intUnit(twoToFour, untruncateYear);\n        // weekNumber (W)\n        case \"W\":\n          return intUnit(oneOrTwo);\n        case \"WW\":\n          return intUnit(two);\n        // weekdays\n        case \"E\":\n        case \"c\":\n          return intUnit(one);\n        case \"EEE\":\n          return oneOf(loc.weekdays(\"short\", false, false), 1);\n        case \"EEEE\":\n          return oneOf(loc.weekdays(\"long\", false, false), 1);\n        case \"ccc\":\n          return oneOf(loc.weekdays(\"short\", true, false), 1);\n        case \"cccc\":\n          return oneOf(loc.weekdays(\"long\", true, false), 1);\n        // offset/zone\n        case \"Z\":\n        case \"ZZ\":\n          return offset(new RegExp(`([+-]${oneOrTwo.source})(?::(${two.source}))?`), 2);\n        case \"ZZZ\":\n          return offset(new RegExp(`([+-]${oneOrTwo.source})(${two.source})?`), 2);\n        // we don't support ZZZZ (PST) or ZZZZZ (Pacific Standard Time) in parsing\n        // because we don't have any way to figure out what they are\n        case \"z\":\n          return simple(/[a-z_+-/]{1,256}?/i);\n        default:\n          return literal(t);\n      }\n    };\n\n  const unit = unitate(token) || {\n    invalidReason: MISSING_FTP,\n  };\n\n  unit.token = token;\n\n  return unit;\n}\n\nconst partTypeStyleToTokenVal = {\n  year: {\n    \"2-digit\": \"yy\",\n    numeric: \"yyyyy\",\n  },\n  month: {\n    numeric: \"M\",\n    \"2-digit\": \"MM\",\n    short: \"MMM\",\n    long: \"MMMM\",\n  },\n  day: {\n    numeric: \"d\",\n    \"2-digit\": \"dd\",\n  },\n  weekday: {\n    short: \"EEE\",\n    long: \"EEEE\",\n  },\n  dayperiod: \"a\",\n  dayPeriod: \"a\",\n  hour: {\n    numeric: \"h\",\n    \"2-digit\": \"hh\",\n  },\n  minute: {\n    numeric: \"m\",\n    \"2-digit\": \"mm\",\n  },\n  second: {\n    numeric: \"s\",\n    \"2-digit\": \"ss\",\n  },\n};\n\nfunction tokenForPart(part, locale, formatOpts) {\n  const { type, value } = part;\n\n  if (type === \"literal\") {\n    return {\n      literal: true,\n      val: value,\n    };\n  }\n\n  const style = formatOpts[type];\n\n  let val = partTypeStyleToTokenVal[type];\n  if (typeof val === \"object\") {\n    val = val[style];\n  }\n\n  if (val) {\n    return {\n      literal: false,\n      val,\n    };\n  }\n\n  return undefined;\n}\n\nfunction buildRegex(units) {\n  const re = units.map((u) => u.regex).reduce((f, r) => `${f}(${r.source})`, \"\");\n  return [`^${re}$`, units];\n}\n\nfunction match(input, regex, handlers) {\n  const matches = input.match(regex);\n\n  if (matches) {\n    const all = {};\n    let matchIndex = 1;\n    for (const i in handlers) {\n      if (hasOwnProperty(handlers, i)) {\n        const h = handlers[i],\n          groups = h.groups ? h.groups + 1 : 1;\n        if (!h.literal && h.token) {\n          all[h.token.val[0]] = h.deser(matches.slice(matchIndex, matchIndex + groups));\n        }\n        matchIndex += groups;\n      }\n    }\n    return [matches, all];\n  } else {\n    return [matches, {}];\n  }\n}\n\nfunction dateTimeFromMatches(matches) {\n  const toField = (token) => {\n    switch (token) {\n      case \"S\":\n        return \"millisecond\";\n      case \"s\":\n        return \"second\";\n      case \"m\":\n        return \"minute\";\n      case \"h\":\n      case \"H\":\n        return \"hour\";\n      case \"d\":\n        return \"day\";\n      case \"o\":\n        return \"ordinal\";\n      case \"L\":\n      case \"M\":\n        return \"month\";\n      case \"y\":\n        return \"year\";\n      case \"E\":\n      case \"c\":\n        return \"weekday\";\n      case \"W\":\n        return \"weekNumber\";\n      case \"k\":\n        return \"weekYear\";\n      case \"q\":\n        return \"quarter\";\n      default:\n        return null;\n    }\n  };\n\n  let zone = null;\n  let specificOffset;\n  if (!isUndefined(matches.z)) {\n    zone = IANAZone.create(matches.z);\n  }\n\n  if (!isUndefined(matches.Z)) {\n    if (!zone) {\n      zone = new FixedOffsetZone(matches.Z);\n    }\n    specificOffset = matches.Z;\n  }\n\n  if (!isUndefined(matches.q)) {\n    matches.M = (matches.q - 1) * 3 + 1;\n  }\n\n  if (!isUndefined(matches.h)) {\n    if (matches.h < 12 && matches.a === 1) {\n      matches.h += 12;\n    } else if (matches.h === 12 && matches.a === 0) {\n      matches.h = 0;\n    }\n  }\n\n  if (matches.G === 0 && matches.y) {\n    matches.y = -matches.y;\n  }\n\n  if (!isUndefined(matches.u)) {\n    matches.S = parseMillis(matches.u);\n  }\n\n  const vals = Object.keys(matches).reduce((r, k) => {\n    const f = toField(k);\n    if (f) {\n      r[f] = matches[k];\n    }\n\n    return r;\n  }, {});\n\n  return [vals, zone, specificOffset];\n}\n\nlet dummyDateTimeCache = null;\n\nfunction getDummyDateTime() {\n  if (!dummyDateTimeCache) {\n    dummyDateTimeCache = DateTime.fromMillis(1555555555555);\n  }\n\n  return dummyDateTimeCache;\n}\n\nfunction maybeExpandMacroToken(token, locale) {\n  if (token.literal) {\n    return token;\n  }\n\n  const formatOpts = Formatter.macroTokenToFormatOpts(token.val);\n\n  if (!formatOpts) {\n    return token;\n  }\n\n  const formatter = Formatter.create(locale, formatOpts);\n  const parts = formatter.formatDateTimeParts(getDummyDateTime());\n\n  const tokens = parts.map((p) => tokenForPart(p, locale, formatOpts));\n\n  if (tokens.includes(undefined)) {\n    return token;\n  }\n\n  return tokens;\n}\n\nfunction expandMacroTokens(tokens, locale) {\n  return Array.prototype.concat(...tokens.map((t) => maybeExpandMacroToken(t, locale)));\n}\n\n/**\n * @private\n */\n\nexport function explainFromTokens(locale, input, format) {\n  const tokens = expandMacroTokens(Formatter.parseFormat(format), locale),\n    units = tokens.map((t) => unitForToken(t, locale)),\n    disqualifyingUnit = units.find((t) => t.invalidReason);\n\n  if (disqualifyingUnit) {\n    return { input, tokens, invalidReason: disqualifyingUnit.invalidReason };\n  } else {\n    const [regexString, handlers] = buildRegex(units),\n      regex = RegExp(regexString, \"i\"),\n      [rawMatches, matches] = match(input, regex, handlers),\n      [result, zone, specificOffset] = matches\n        ? dateTimeFromMatches(matches)\n        : [null, null, undefined];\n    if (hasOwnProperty(matches, \"a\") && hasOwnProperty(matches, \"H\")) {\n      throw new ConflictingSpecificationError(\n        \"Can't include meridiem when specifying 24-hour format\"\n      );\n    }\n    return { input, tokens, regex, rawMatches, matches, result, zone, specificOffset };\n  }\n}\n\nexport function parseFromTokens(locale, input, format) {\n  const { result, zone, specificOffset, invalidReason } = explainFromTokens(locale, input, format);\n  return [result, zone, specificOffset, invalidReason];\n}\n","import {\n  integerBetween,\n  isLeapYear,\n  timeObject,\n  daysInYear,\n  daysInMonth,\n  weeksInWeekYear,\n  isInteger,\n} from \"./util.js\";\nimport Invalid from \"./invalid.js\";\n\nconst nonLeapLadder = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334],\n  leapLadder = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335];\n\nfunction unitOutOfRange(unit, value) {\n  return new Invalid(\n    \"unit out of range\",\n    `you specified ${value} (of type ${typeof value}) as a ${unit}, which is invalid`\n  );\n}\n\nfunction dayOfWeek(year, month, day) {\n  const d = new Date(Date.UTC(year, month - 1, day));\n\n  if (year < 100 && year >= 0) {\n    d.setUTCFullYear(d.getUTCFullYear() - 1900);\n  }\n\n  const js = d.getUTCDay();\n\n  return js === 0 ? 7 : js;\n}\n\nfunction computeOrdinal(year, month, day) {\n  return day + (isLeapYear(year) ? leapLadder : nonLeapLadder)[month - 1];\n}\n\nfunction uncomputeOrdinal(year, ordinal) {\n  const table = isLeapYear(year) ? leapLadder : nonLeapLadder,\n    month0 = table.findIndex((i) => i < ordinal),\n    day = ordinal - table[month0];\n  return { month: month0 + 1, day };\n}\n\n/**\n * @private\n */\n\nexport function gregorianToWeek(gregObj) {\n  const { year, month, day } = gregObj,\n    ordinal = computeOrdinal(year, month, day),\n    weekday = dayOfWeek(year, month, day);\n\n  let weekNumber = Math.floor((ordinal - weekday + 10) / 7),\n    weekYear;\n\n  if (weekNumber < 1) {\n    weekYear = year - 1;\n    weekNumber = weeksInWeekYear(weekYear);\n  } else if (weekNumber > weeksInWeekYear(year)) {\n    weekYear = year + 1;\n    weekNumber = 1;\n  } else {\n    weekYear = year;\n  }\n\n  return { weekYear, weekNumber, weekday, ...timeObject(gregObj) };\n}\n\nexport function weekToGregorian(weekData) {\n  const { weekYear, weekNumber, weekday } = weekData,\n    weekdayOfJan4 = dayOfWeek(weekYear, 1, 4),\n    yearInDays = daysInYear(weekYear);\n\n  let ordinal = weekNumber * 7 + weekday - weekdayOfJan4 - 3,\n    year;\n\n  if (ordinal < 1) {\n    year = weekYear - 1;\n    ordinal += daysInYear(year);\n  } else if (ordinal > yearInDays) {\n    year = weekYear + 1;\n    ordinal -= daysInYear(weekYear);\n  } else {\n    year = weekYear;\n  }\n\n  const { month, day } = uncomputeOrdinal(year, ordinal);\n  return { year, month, day, ...timeObject(weekData) };\n}\n\nexport function gregorianToOrdinal(gregData) {\n  const { year, month, day } = gregData;\n  const ordinal = computeOrdinal(year, month, day);\n  return { year, ordinal, ...timeObject(gregData) };\n}\n\nexport function ordinalToGregorian(ordinalData) {\n  const { year, ordinal } = ordinalData;\n  const { month, day } = uncomputeOrdinal(year, ordinal);\n  return { year, month, day, ...timeObject(ordinalData) };\n}\n\nexport function hasInvalidWeekData(obj) {\n  const validYear = isInteger(obj.weekYear),\n    validWeek = integerBetween(obj.weekNumber, 1, weeksInWeekYear(obj.weekYear)),\n    validWeekday = integerBetween(obj.weekday, 1, 7);\n\n  if (!validYear) {\n    return unitOutOfRange(\"weekYear\", obj.weekYear);\n  } else if (!validWeek) {\n    return unitOutOfRange(\"week\", obj.week);\n  } else if (!validWeekday) {\n    return unitOutOfRange(\"weekday\", obj.weekday);\n  } else return false;\n}\n\nexport function hasInvalidOrdinalData(obj) {\n  const validYear = isInteger(obj.year),\n    validOrdinal = integerBetween(obj.ordinal, 1, daysInYear(obj.year));\n\n  if (!validYear) {\n    return unitOutOfRange(\"year\", obj.year);\n  } else if (!validOrdinal) {\n    return unitOutOfRange(\"ordinal\", obj.ordinal);\n  } else return false;\n}\n\nexport function hasInvalidGregorianData(obj) {\n  const validYear = isInteger(obj.year),\n    validMonth = integerBetween(obj.month, 1, 12),\n    validDay = integerBetween(obj.day, 1, daysInMonth(obj.year, obj.month));\n\n  if (!validYear) {\n    return unitOutOfRange(\"year\", obj.year);\n  } else if (!validMonth) {\n    return unitOutOfRange(\"month\", obj.month);\n  } else if (!validDay) {\n    return unitOutOfRange(\"day\", obj.day);\n  } else return false;\n}\n\nexport function hasInvalidTimeData(obj) {\n  const { hour, minute, second, millisecond } = obj;\n  const validHour =\n      integerBetween(hour, 0, 23) ||\n      (hour === 24 && minute === 0 && second === 0 && millisecond === 0),\n    validMinute = integerBetween(minute, 0, 59),\n    validSecond = integerBetween(second, 0, 59),\n    validMillisecond = integerBetween(millisecond, 0, 999);\n\n  if (!validHour) {\n    return unitOutOfRange(\"hour\", hour);\n  } else if (!validMinute) {\n    return unitOutOfRange(\"minute\", minute);\n  } else if (!validSecond) {\n    return unitOutOfRange(\"second\", second);\n  } else if (!validMillisecond) {\n    return unitOutOfRange(\"millisecond\", millisecond);\n  } else return false;\n}\n","import Duration from \"./duration.js\";\nimport Interval from \"./interval.js\";\nimport Settings from \"./settings.js\";\nimport Info from \"./info.js\";\nimport Formatter from \"./impl/formatter.js\";\nimport FixedOffsetZone from \"./zones/fixedOffsetZone.js\";\nimport Locale from \"./impl/locale.js\";\nimport {\n  isUndefined,\n  maybeArray,\n  isDate,\n  isNumber,\n  bestBy,\n  daysInMonth,\n  daysInYear,\n  isLeapYear,\n  weeksInWeekYear,\n  normalizeObject,\n  roundTo,\n  objToLocalTS,\n  padStart,\n} from \"./impl/util.js\";\nimport { normalizeZone } from \"./impl/zoneUtil.js\";\nimport diff from \"./impl/diff.js\";\nimport { parseRFC2822Date, parseISODate, parseHTTPDate, parseSQL } from \"./impl/regexParser.js\";\nimport { parseFromTokens, explainFromTokens } from \"./impl/tokenParser.js\";\nimport {\n  gregorianToWeek,\n  weekToGregorian,\n  gregorianToOrdinal,\n  ordinalToGregorian,\n  hasInvalidGregorianData,\n  hasInvalidWeekData,\n  hasInvalidOrdinalData,\n  hasInvalidTimeData,\n} from \"./impl/conversions.js\";\nimport * as Formats from \"./impl/formats.js\";\nimport {\n  InvalidArgumentError,\n  ConflictingSpecificationError,\n  InvalidUnitError,\n  InvalidDateTimeError,\n} from \"./errors.js\";\nimport Invalid from \"./impl/invalid.js\";\n\nconst INVALID = \"Invalid DateTime\";\nconst MAX_DATE = 8.64e15;\n\nfunction unsupportedZone(zone) {\n  return new Invalid(\"unsupported zone\", `the zone \"${zone.name}\" is not supported`);\n}\n\n// we cache week data on the DT object and this intermediates the cache\nfunction possiblyCachedWeekData(dt) {\n  if (dt.weekData === null) {\n    dt.weekData = gregorianToWeek(dt.c);\n  }\n  return dt.weekData;\n}\n\n// clone really means, \"make a new object with these modifications\". all \"setters\" really use this\n// to create a new object while only changing some of the properties\nfunction clone(inst, alts) {\n  const current = {\n    ts: inst.ts,\n    zone: inst.zone,\n    c: inst.c,\n    o: inst.o,\n    loc: inst.loc,\n    invalid: inst.invalid,\n  };\n  return new DateTime({ ...current, ...alts, old: current });\n}\n\n// find the right offset a given local time. The o input is our guess, which determines which\n// offset we'll pick in ambiguous cases (e.g. there are two 3 AMs b/c Fallback DST)\nfunction fixOffset(localTS, o, tz) {\n  // Our UTC time is just a guess because our offset is just a guess\n  let utcGuess = localTS - o * 60 * 1000;\n\n  // Test whether the zone matches the offset for this ts\n  const o2 = tz.offset(utcGuess);\n\n  // If so, offset didn't change and we're done\n  if (o === o2) {\n    return [utcGuess, o];\n  }\n\n  // If not, change the ts by the difference in the offset\n  utcGuess -= (o2 - o) * 60 * 1000;\n\n  // If that gives us the local time we want, we're done\n  const o3 = tz.offset(utcGuess);\n  if (o2 === o3) {\n    return [utcGuess, o2];\n  }\n\n  // If it's different, we're in a hole time. The offset has changed, but the we don't adjust the time\n  return [localTS - Math.min(o2, o3) * 60 * 1000, Math.max(o2, o3)];\n}\n\n// convert an epoch timestamp into a calendar object with the given offset\nfunction tsToObj(ts, offset) {\n  ts += offset * 60 * 1000;\n\n  const d = new Date(ts);\n\n  return {\n    year: d.getUTCFullYear(),\n    month: d.getUTCMonth() + 1,\n    day: d.getUTCDate(),\n    hour: d.getUTCHours(),\n    minute: d.getUTCMinutes(),\n    second: d.getUTCSeconds(),\n    millisecond: d.getUTCMilliseconds(),\n  };\n}\n\n// convert a calendar object to a epoch timestamp\nfunction objToTS(obj, offset, zone) {\n  return fixOffset(objToLocalTS(obj), offset, zone);\n}\n\n// create a new DT instance by adding a duration, adjusting for DSTs\nfunction adjustTime(inst, dur) {\n  const oPre = inst.o,\n    year = inst.c.year + Math.trunc(dur.years),\n    month = inst.c.month + Math.trunc(dur.months) + Math.trunc(dur.quarters) * 3,\n    c = {\n      ...inst.c,\n      year,\n      month,\n      day:\n        Math.min(inst.c.day, daysInMonth(year, month)) +\n        Math.trunc(dur.days) +\n        Math.trunc(dur.weeks) * 7,\n    },\n    millisToAdd = Duration.fromObject({\n      years: dur.years - Math.trunc(dur.years),\n      quarters: dur.quarters - Math.trunc(dur.quarters),\n      months: dur.months - Math.trunc(dur.months),\n      weeks: dur.weeks - Math.trunc(dur.weeks),\n      days: dur.days - Math.trunc(dur.days),\n      hours: dur.hours,\n      minutes: dur.minutes,\n      seconds: dur.seconds,\n      milliseconds: dur.milliseconds,\n    }).as(\"milliseconds\"),\n    localTS = objToLocalTS(c);\n\n  let [ts, o] = fixOffset(localTS, oPre, inst.zone);\n\n  if (millisToAdd !== 0) {\n    ts += millisToAdd;\n    // that could have changed the offset by going over a DST, but we want to keep the ts the same\n    o = inst.zone.offset(ts);\n  }\n\n  return { ts, o };\n}\n\n// helper useful in turning the results of parsing into real dates\n// by handling the zone options\nfunction parseDataToDateTime(parsed, parsedZone, opts, format, text, specificOffset) {\n  const { setZone, zone } = opts;\n  if (parsed && Object.keys(parsed).length !== 0) {\n    const interpretationZone = parsedZone || zone,\n      inst = DateTime.fromObject(parsed, {\n        ...opts,\n        zone: interpretationZone,\n        specificOffset,\n      });\n    return setZone ? inst : inst.setZone(zone);\n  } else {\n    return DateTime.invalid(\n      new Invalid(\"unparsable\", `the input \"${text}\" can't be parsed as ${format}`)\n    );\n  }\n}\n\n// if you want to output a technical format (e.g. RFC 2822), this helper\n// helps handle the details\nfunction toTechFormat(dt, format, allowZ = true) {\n  return dt.isValid\n    ? Formatter.create(Locale.create(\"en-US\"), {\n        allowZ,\n        forceSimple: true,\n      }).formatDateTimeFromString(dt, format)\n    : null;\n}\n\nfunction toISODate(o, extended) {\n  const longFormat = o.c.year > 9999 || o.c.year < 0;\n  let c = \"\";\n  if (longFormat && o.c.year >= 0) c += \"+\";\n  c += padStart(o.c.year, longFormat ? 6 : 4);\n\n  if (extended) {\n    c += \"-\";\n    c += padStart(o.c.month);\n    c += \"-\";\n    c += padStart(o.c.day);\n  } else {\n    c += padStart(o.c.month);\n    c += padStart(o.c.day);\n  }\n  return c;\n}\n\nfunction toISOTime(\n  o,\n  extended,\n  suppressSeconds,\n  suppressMilliseconds,\n  includeOffset,\n  extendedZone\n) {\n  let c = padStart(o.c.hour);\n  if (extended) {\n    c += \":\";\n    c += padStart(o.c.minute);\n    if (o.c.second !== 0 || !suppressSeconds) {\n      c += \":\";\n    }\n  } else {\n    c += padStart(o.c.minute);\n  }\n\n  if (o.c.second !== 0 || !suppressSeconds) {\n    c += padStart(o.c.second);\n\n    if (o.c.millisecond !== 0 || !suppressMilliseconds) {\n      c += \".\";\n      c += padStart(o.c.millisecond, 3);\n    }\n  }\n\n  if (includeOffset) {\n    if (o.isOffsetFixed && o.offset === 0 && !extendedZone) {\n      c += \"Z\";\n    } else if (o.o < 0) {\n      c += \"-\";\n      c += padStart(Math.trunc(-o.o / 60));\n      c += \":\";\n      c += padStart(Math.trunc(-o.o % 60));\n    } else {\n      c += \"+\";\n      c += padStart(Math.trunc(o.o / 60));\n      c += \":\";\n      c += padStart(Math.trunc(o.o % 60));\n    }\n  }\n\n  if (extendedZone) {\n    c += \"[\" + o.zone.ianaName + \"]\";\n  }\n  return c;\n}\n\n// defaults for unspecified units in the supported calendars\nconst defaultUnitValues = {\n    month: 1,\n    day: 1,\n    hour: 0,\n    minute: 0,\n    second: 0,\n    millisecond: 0,\n  },\n  defaultWeekUnitValues = {\n    weekNumber: 1,\n    weekday: 1,\n    hour: 0,\n    minute: 0,\n    second: 0,\n    millisecond: 0,\n  },\n  defaultOrdinalUnitValues = {\n    ordinal: 1,\n    hour: 0,\n    minute: 0,\n    second: 0,\n    millisecond: 0,\n  };\n\n// Units in the supported calendars, sorted by bigness\nconst orderedUnits = [\"year\", \"month\", \"day\", \"hour\", \"minute\", \"second\", \"millisecond\"],\n  orderedWeekUnits = [\n    \"weekYear\",\n    \"weekNumber\",\n    \"weekday\",\n    \"hour\",\n    \"minute\",\n    \"second\",\n    \"millisecond\",\n  ],\n  orderedOrdinalUnits = [\"year\", \"ordinal\", \"hour\", \"minute\", \"second\", \"millisecond\"];\n\n// standardize case and plurality in units\nfunction normalizeUnit(unit) {\n  const normalized = {\n    year: \"year\",\n    years: \"year\",\n    month: \"month\",\n    months: \"month\",\n    day: \"day\",\n    days: \"day\",\n    hour: \"hour\",\n    hours: \"hour\",\n    minute: \"minute\",\n    minutes: \"minute\",\n    quarter: \"quarter\",\n    quarters: \"quarter\",\n    second: \"second\",\n    seconds: \"second\",\n    millisecond: \"millisecond\",\n    milliseconds: \"millisecond\",\n    weekday: \"weekday\",\n    weekdays: \"weekday\",\n    weeknumber: \"weekNumber\",\n    weeksnumber: \"weekNumber\",\n    weeknumbers: \"weekNumber\",\n    weekyear: \"weekYear\",\n    weekyears: \"weekYear\",\n    ordinal: \"ordinal\",\n  }[unit.toLowerCase()];\n\n  if (!normalized) throw new InvalidUnitError(unit);\n\n  return normalized;\n}\n\n// this is a dumbed down version of fromObject() that runs about 60% faster\n// but doesn't do any validation, makes a bunch of assumptions about what units\n// are present, and so on.\nfunction quickDT(obj, opts) {\n  const zone = normalizeZone(opts.zone, Settings.defaultZone),\n    loc = Locale.fromObject(opts),\n    tsNow = Settings.now();\n\n  let ts, o;\n\n  // assume we have the higher-order units\n  if (!isUndefined(obj.year)) {\n    for (const u of orderedUnits) {\n      if (isUndefined(obj[u])) {\n        obj[u] = defaultUnitValues[u];\n      }\n    }\n\n    const invalid = hasInvalidGregorianData(obj) || hasInvalidTimeData(obj);\n    if (invalid) {\n      return DateTime.invalid(invalid);\n    }\n\n    const offsetProvis = zone.offset(tsNow);\n    [ts, o] = objToTS(obj, offsetProvis, zone);\n  } else {\n    ts = tsNow;\n  }\n\n  return new DateTime({ ts, zone, loc, o });\n}\n\nfunction diffRelative(start, end, opts) {\n  const round = isUndefined(opts.round) ? true : opts.round,\n    format = (c, unit) => {\n      c = roundTo(c, round || opts.calendary ? 0 : 2, true);\n      const formatter = end.loc.clone(opts).relFormatter(opts);\n      return formatter.format(c, unit);\n    },\n    differ = (unit) => {\n      if (opts.calendary) {\n        if (!end.hasSame(start, unit)) {\n          return end.startOf(unit).diff(start.startOf(unit), unit).get(unit);\n        } else return 0;\n      } else {\n        return end.diff(start, unit).get(unit);\n      }\n    };\n\n  if (opts.unit) {\n    return format(differ(opts.unit), opts.unit);\n  }\n\n  for (const unit of opts.units) {\n    const count = differ(unit);\n    if (Math.abs(count) >= 1) {\n      return format(count, unit);\n    }\n  }\n  return format(start > end ? -0 : 0, opts.units[opts.units.length - 1]);\n}\n\nfunction lastOpts(argList) {\n  let opts = {},\n    args;\n  if (argList.length > 0 && typeof argList[argList.length - 1] === \"object\") {\n    opts = argList[argList.length - 1];\n    args = Array.from(argList).slice(0, argList.length - 1);\n  } else {\n    args = Array.from(argList);\n  }\n  return [opts, args];\n}\n\n/**\n * A DateTime is an immutable data structure representing a specific date and time and accompanying methods. It contains class and instance methods for creating, parsing, interrogating, transforming, and formatting them.\n *\n * A DateTime comprises of:\n * * A timestamp. Each DateTime instance refers to a specific millisecond of the Unix epoch.\n * * A time zone. Each instance is considered in the context of a specific zone (by default the local system's zone).\n * * Configuration properties that effect how output strings are formatted, such as `locale`, `numberingSystem`, and `outputCalendar`.\n *\n * Here is a brief overview of the most commonly used functionality it provides:\n *\n * * **Creation**: To create a DateTime from its components, use one of its factory class methods: {@link DateTime#local}, {@link DateTime#utc}, and (most flexibly) {@link DateTime#fromObject}. To create one from a standard string format, use {@link DateTime#fromISO}, {@link DateTime#fromHTTP}, and {@link DateTime#fromRFC2822}. To create one from a custom string format, use {@link DateTime#fromFormat}. To create one from a native JS date, use {@link DateTime#fromJSDate}.\n * * **Gregorian calendar and time**: To examine the Gregorian properties of a DateTime individually (i.e as opposed to collectively through {@link DateTime#toObject}), use the {@link DateTime#year}, {@link DateTime#month},\n * {@link DateTime#day}, {@link DateTime#hour}, {@link DateTime#minute}, {@link DateTime#second}, {@link DateTime#millisecond} accessors.\n * * **Week calendar**: For ISO week calendar attributes, see the {@link DateTime#weekYear}, {@link DateTime#weekNumber}, and {@link DateTime#weekday} accessors.\n * * **Configuration** See the {@link DateTime#locale} and {@link DateTime#numberingSystem} accessors.\n * * **Transformation**: To transform the DateTime into other DateTimes, use {@link DateTime#set}, {@link DateTime#reconfigure}, {@link DateTime#setZone}, {@link DateTime#setLocale}, {@link DateTime.plus}, {@link DateTime#minus}, {@link DateTime#endOf}, {@link DateTime#startOf}, {@link DateTime#toUTC}, and {@link DateTime#toLocal}.\n * * **Output**: To convert the DateTime to other representations, use the {@link DateTime#toRelative}, {@link DateTime#toRelativeCalendar}, {@link DateTime#toJSON}, {@link DateTime#toISO}, {@link DateTime#toHTTP}, {@link DateTime#toObject}, {@link DateTime#toRFC2822}, {@link DateTime#toString}, {@link DateTime#toLocaleString}, {@link DateTime#toFormat}, {@link DateTime#toMillis} and {@link DateTime#toJSDate}.\n *\n * There's plenty others documented below. In addition, for more information on subtler topics like internationalization, time zones, alternative calendars, validity, and so on, see the external documentation.\n */\nexport default class DateTime {\n  /**\n   * @access private\n   */\n  constructor(config) {\n    const zone = config.zone || Settings.defaultZone;\n\n    let invalid =\n      config.invalid ||\n      (Number.isNaN(config.ts) ? new Invalid(\"invalid input\") : null) ||\n      (!zone.isValid ? unsupportedZone(zone) : null);\n    /**\n     * @access private\n     */\n    this.ts = isUndefined(config.ts) ? Settings.now() : config.ts;\n\n    let c = null,\n      o = null;\n    if (!invalid) {\n      const unchanged = config.old && config.old.ts === this.ts && config.old.zone.equals(zone);\n\n      if (unchanged) {\n        [c, o] = [config.old.c, config.old.o];\n      } else {\n        const ot = zone.offset(this.ts);\n        c = tsToObj(this.ts, ot);\n        invalid = Number.isNaN(c.year) ? new Invalid(\"invalid input\") : null;\n        c = invalid ? null : c;\n        o = invalid ? null : ot;\n      }\n    }\n\n    /**\n     * @access private\n     */\n    this._zone = zone;\n    /**\n     * @access private\n     */\n    this.loc = config.loc || Locale.create();\n    /**\n     * @access private\n     */\n    this.invalid = invalid;\n    /**\n     * @access private\n     */\n    this.weekData = null;\n    /**\n     * @access private\n     */\n    this.c = c;\n    /**\n     * @access private\n     */\n    this.o = o;\n    /**\n     * @access private\n     */\n    this.isLuxonDateTime = true;\n  }\n\n  // CONSTRUCT\n\n  /**\n   * Create a DateTime for the current instant, in the system's time zone.\n   *\n   * Use Settings to override these default values if needed.\n   * @example DateTime.now().toISO() //~> now in the ISO format\n   * @return {DateTime}\n   */\n  static now() {\n    return new DateTime({});\n  }\n\n  /**\n   * Create a local DateTime\n   * @param {number} [year] - The calendar year. If omitted (as in, call `local()` with no arguments), the current time will be used\n   * @param {number} [month=1] - The month, 1-indexed\n   * @param {number} [day=1] - The day of the month, 1-indexed\n   * @param {number} [hour=0] - The hour of the day, in 24-hour time\n   * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59\n   * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59\n   * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999\n   * @example DateTime.local()                                  //~> now\n   * @example DateTime.local({ zone: \"America/New_York\" })      //~> now, in US east coast time\n   * @example DateTime.local(2017)                              //~> 2017-01-01T00:00:00\n   * @example DateTime.local(2017, 3)                           //~> 2017-03-01T00:00:00\n   * @example DateTime.local(2017, 3, 12, { locale: \"fr\" })     //~> 2017-03-12T00:00:00, with a French locale\n   * @example DateTime.local(2017, 3, 12, 5)                    //~> 2017-03-12T05:00:00\n   * @example DateTime.local(2017, 3, 12, 5, { zone: \"utc\" })   //~> 2017-03-12T05:00:00, in UTC\n   * @example DateTime.local(2017, 3, 12, 5, 45)                //~> 2017-03-12T05:45:00\n   * @example DateTime.local(2017, 3, 12, 5, 45, 10)            //~> 2017-03-12T05:45:10\n   * @example DateTime.local(2017, 3, 12, 5, 45, 10, 765)       //~> 2017-03-12T05:45:10.765\n   * @return {DateTime}\n   */\n  static local() {\n    const [opts, args] = lastOpts(arguments),\n      [year, month, day, hour, minute, second, millisecond] = args;\n    return quickDT({ year, month, day, hour, minute, second, millisecond }, opts);\n  }\n\n  /**\n   * Create a DateTime in UTC\n   * @param {number} [year] - The calendar year. If omitted (as in, call `utc()` with no arguments), the current time will be used\n   * @param {number} [month=1] - The month, 1-indexed\n   * @param {number} [day=1] - The day of the month\n   * @param {number} [hour=0] - The hour of the day, in 24-hour time\n   * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59\n   * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59\n   * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999\n   * @param {Object} options - configuration options for the DateTime\n   * @param {string} [options.locale] - a locale to set on the resulting DateTime instance\n   * @param {string} [options.outputCalendar] - the output calendar to set on the resulting DateTime instance\n   * @param {string} [options.numberingSystem] - the numbering system to set on the resulting DateTime instance\n   * @example DateTime.utc()                                              //~> now\n   * @example DateTime.utc(2017)                                          //~> 2017-01-01T00:00:00Z\n   * @example DateTime.utc(2017, 3)                                       //~> 2017-03-01T00:00:00Z\n   * @example DateTime.utc(2017, 3, 12)                                   //~> 2017-03-12T00:00:00Z\n   * @example DateTime.utc(2017, 3, 12, 5)                                //~> 2017-03-12T05:00:00Z\n   * @example DateTime.utc(2017, 3, 12, 5, 45)                            //~> 2017-03-12T05:45:00Z\n   * @example DateTime.utc(2017, 3, 12, 5, 45, { locale: \"fr\" })          //~> 2017-03-12T05:45:00Z with a French locale\n   * @example DateTime.utc(2017, 3, 12, 5, 45, 10)                        //~> 2017-03-12T05:45:10Z\n   * @example DateTime.utc(2017, 3, 12, 5, 45, 10, 765, { locale: \"fr\" }) //~> 2017-03-12T05:45:10.765Z with a French locale\n   * @return {DateTime}\n   */\n  static utc() {\n    const [opts, args] = lastOpts(arguments),\n      [year, month, day, hour, minute, second, millisecond] = args;\n\n    opts.zone = FixedOffsetZone.utcInstance;\n    return quickDT({ year, month, day, hour, minute, second, millisecond }, opts);\n  }\n\n  /**\n   * Create a DateTime from a JavaScript Date object. Uses the default zone.\n   * @param {Date} date - a JavaScript Date object\n   * @param {Object} options - configuration options for the DateTime\n   * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into\n   * @return {DateTime}\n   */\n  static fromJSDate(date, options = {}) {\n    const ts = isDate(date) ? date.valueOf() : NaN;\n    if (Number.isNaN(ts)) {\n      return DateTime.invalid(\"invalid input\");\n    }\n\n    const zoneToUse = normalizeZone(options.zone, Settings.defaultZone);\n    if (!zoneToUse.isValid) {\n      return DateTime.invalid(unsupportedZone(zoneToUse));\n    }\n\n    return new DateTime({\n      ts: ts,\n      zone: zoneToUse,\n      loc: Locale.fromObject(options),\n    });\n  }\n\n  /**\n   * Create a DateTime from a number of milliseconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone.\n   * @param {number} milliseconds - a number of milliseconds since 1970 UTC\n   * @param {Object} options - configuration options for the DateTime\n   * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into\n   * @param {string} [options.locale] - a locale to set on the resulting DateTime instance\n   * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance\n   * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance\n   * @return {DateTime}\n   */\n  static fromMillis(milliseconds, options = {}) {\n    if (!isNumber(milliseconds)) {\n      throw new InvalidArgumentError(\n        `fromMillis requires a numerical input, but received a ${typeof milliseconds} with value ${milliseconds}`\n      );\n    } else if (milliseconds < -MAX_DATE || milliseconds > MAX_DATE) {\n      // this isn't perfect because because we can still end up out of range because of additional shifting, but it's a start\n      return DateTime.invalid(\"Timestamp out of range\");\n    } else {\n      return new DateTime({\n        ts: milliseconds,\n        zone: normalizeZone(options.zone, Settings.defaultZone),\n        loc: Locale.fromObject(options),\n      });\n    }\n  }\n\n  /**\n   * Create a DateTime from a number of seconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone.\n   * @param {number} seconds - a number of seconds since 1970 UTC\n   * @param {Object} options - configuration options for the DateTime\n   * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into\n   * @param {string} [options.locale] - a locale to set on the resulting DateTime instance\n   * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance\n   * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance\n   * @return {DateTime}\n   */\n  static fromSeconds(seconds, options = {}) {\n    if (!isNumber(seconds)) {\n      throw new InvalidArgumentError(\"fromSeconds requires a numerical input\");\n    } else {\n      return new DateTime({\n        ts: seconds * 1000,\n        zone: normalizeZone(options.zone, Settings.defaultZone),\n        loc: Locale.fromObject(options),\n      });\n    }\n  }\n\n  /**\n   * Create a DateTime from a JavaScript object with keys like 'year' and 'hour' with reasonable defaults.\n   * @param {Object} obj - the object to create the DateTime from\n   * @param {number} obj.year - a year, such as 1987\n   * @param {number} obj.month - a month, 1-12\n   * @param {number} obj.day - a day of the month, 1-31, depending on the month\n   * @param {number} obj.ordinal - day of the year, 1-365 or 366\n   * @param {number} obj.weekYear - an ISO week year\n   * @param {number} obj.weekNumber - an ISO week number, between 1 and 52 or 53, depending on the year\n   * @param {number} obj.weekday - an ISO weekday, 1-7, where 1 is Monday and 7 is Sunday\n   * @param {number} obj.hour - hour of the day, 0-23\n   * @param {number} obj.minute - minute of the hour, 0-59\n   * @param {number} obj.second - second of the minute, 0-59\n   * @param {number} obj.millisecond - millisecond of the second, 0-999\n   * @param {Object} opts - options for creating this DateTime\n   * @param {string|Zone} [opts.zone='local'] - interpret the numbers in the context of a particular zone. Can take any value taken as the first argument to setZone()\n   * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance\n   * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n   * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance\n   * @example DateTime.fromObject({ year: 1982, month: 5, day: 25}).toISODate() //=> '1982-05-25'\n   * @example DateTime.fromObject({ year: 1982 }).toISODate() //=> '1982-01-01'\n   * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }) //~> today at 10:26:06\n   * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'utc' }),\n   * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'local' })\n   * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'America/New_York' })\n   * @example DateTime.fromObject({ weekYear: 2016, weekNumber: 2, weekday: 3 }).toISODate() //=> '2016-01-13'\n   * @return {DateTime}\n   */\n  static fromObject(obj, opts = {}) {\n    obj = obj || {};\n    const zoneToUse = normalizeZone(opts.zone, Settings.defaultZone);\n    if (!zoneToUse.isValid) {\n      return DateTime.invalid(unsupportedZone(zoneToUse));\n    }\n\n    const tsNow = Settings.now(),\n      offsetProvis = !isUndefined(opts.specificOffset)\n        ? opts.specificOffset\n        : zoneToUse.offset(tsNow),\n      normalized = normalizeObject(obj, normalizeUnit),\n      containsOrdinal = !isUndefined(normalized.ordinal),\n      containsGregorYear = !isUndefined(normalized.year),\n      containsGregorMD = !isUndefined(normalized.month) || !isUndefined(normalized.day),\n      containsGregor = containsGregorYear || containsGregorMD,\n      definiteWeekDef = normalized.weekYear || normalized.weekNumber,\n      loc = Locale.fromObject(opts);\n\n    // cases:\n    // just a weekday -> this week's instance of that weekday, no worries\n    // (gregorian data or ordinal) + (weekYear or weekNumber) -> error\n    // (gregorian month or day) + ordinal -> error\n    // otherwise just use weeks or ordinals or gregorian, depending on what's specified\n\n    if ((containsGregor || containsOrdinal) && definiteWeekDef) {\n      throw new ConflictingSpecificationError(\n        \"Can't mix weekYear/weekNumber units with year/month/day or ordinals\"\n      );\n    }\n\n    if (containsGregorMD && containsOrdinal) {\n      throw new ConflictingSpecificationError(\"Can't mix ordinal dates with month/day\");\n    }\n\n    const useWeekData = definiteWeekDef || (normalized.weekday && !containsGregor);\n\n    // configure ourselves to deal with gregorian dates or week stuff\n    let units,\n      defaultValues,\n      objNow = tsToObj(tsNow, offsetProvis);\n    if (useWeekData) {\n      units = orderedWeekUnits;\n      defaultValues = defaultWeekUnitValues;\n      objNow = gregorianToWeek(objNow);\n    } else if (containsOrdinal) {\n      units = orderedOrdinalUnits;\n      defaultValues = defaultOrdinalUnitValues;\n      objNow = gregorianToOrdinal(objNow);\n    } else {\n      units = orderedUnits;\n      defaultValues = defaultUnitValues;\n    }\n\n    // set default values for missing stuff\n    let foundFirst = false;\n    for (const u of units) {\n      const v = normalized[u];\n      if (!isUndefined(v)) {\n        foundFirst = true;\n      } else if (foundFirst) {\n        normalized[u] = defaultValues[u];\n      } else {\n        normalized[u] = objNow[u];\n      }\n    }\n\n    // make sure the values we have are in range\n    const higherOrderInvalid = useWeekData\n        ? hasInvalidWeekData(normalized)\n        : containsOrdinal\n        ? hasInvalidOrdinalData(normalized)\n        : hasInvalidGregorianData(normalized),\n      invalid = higherOrderInvalid || hasInvalidTimeData(normalized);\n\n    if (invalid) {\n      return DateTime.invalid(invalid);\n    }\n\n    // compute the actual time\n    const gregorian = useWeekData\n        ? weekToGregorian(normalized)\n        : containsOrdinal\n        ? ordinalToGregorian(normalized)\n        : normalized,\n      [tsFinal, offsetFinal] = objToTS(gregorian, offsetProvis, zoneToUse),\n      inst = new DateTime({\n        ts: tsFinal,\n        zone: zoneToUse,\n        o: offsetFinal,\n        loc,\n      });\n\n    // gregorian data + weekday serves only to validate\n    if (normalized.weekday && containsGregor && obj.weekday !== inst.weekday) {\n      return DateTime.invalid(\n        \"mismatched weekday\",\n        `you can't specify both a weekday of ${normalized.weekday} and a date of ${inst.toISO()}`\n      );\n    }\n\n    return inst;\n  }\n\n  /**\n   * Create a DateTime from an ISO 8601 string\n   * @param {string} text - the ISO string\n   * @param {Object} opts - options to affect the creation\n   * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the time to this zone\n   * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one\n   * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance\n   * @param {string} [opts.outputCalendar] - the output calendar to set on the resulting DateTime instance\n   * @param {string} [opts.numberingSystem] - the numbering system to set on the resulting DateTime instance\n   * @example DateTime.fromISO('2016-05-25T09:08:34.123')\n   * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00')\n   * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00', {setZone: true})\n   * @example DateTime.fromISO('2016-05-25T09:08:34.123', {zone: 'utc'})\n   * @example DateTime.fromISO('2016-W05-4')\n   * @return {DateTime}\n   */\n  static fromISO(text, opts = {}) {\n    const [vals, parsedZone] = parseISODate(text);\n    return parseDataToDateTime(vals, parsedZone, opts, \"ISO 8601\", text);\n  }\n\n  /**\n   * Create a DateTime from an RFC 2822 string\n   * @param {string} text - the RFC 2822 string\n   * @param {Object} opts - options to affect the creation\n   * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since the offset is always specified in the string itself, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in.\n   * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one\n   * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance\n   * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n   * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance\n   * @example DateTime.fromRFC2822('25 Nov 2016 13:23:12 GMT')\n   * @example DateTime.fromRFC2822('Fri, 25 Nov 2016 13:23:12 +0600')\n   * @example DateTime.fromRFC2822('25 Nov 2016 13:23 Z')\n   * @return {DateTime}\n   */\n  static fromRFC2822(text, opts = {}) {\n    const [vals, parsedZone] = parseRFC2822Date(text);\n    return parseDataToDateTime(vals, parsedZone, opts, \"RFC 2822\", text);\n  }\n\n  /**\n   * Create a DateTime from an HTTP header date\n   * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1\n   * @param {string} text - the HTTP header date\n   * @param {Object} opts - options to affect the creation\n   * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since HTTP dates are always in UTC, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in.\n   * @param {boolean} [opts.setZone=false] - override the zone with the fixed-offset zone specified in the string. For HTTP dates, this is always UTC, so this option is equivalent to setting the `zone` option to 'utc', but this option is included for consistency with similar methods.\n   * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance\n   * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n   * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance\n   * @example DateTime.fromHTTP('Sun, 06 Nov 1994 08:49:37 GMT')\n   * @example DateTime.fromHTTP('Sunday, 06-Nov-94 08:49:37 GMT')\n   * @example DateTime.fromHTTP('Sun Nov  6 08:49:37 1994')\n   * @return {DateTime}\n   */\n  static fromHTTP(text, opts = {}) {\n    const [vals, parsedZone] = parseHTTPDate(text);\n    return parseDataToDateTime(vals, parsedZone, opts, \"HTTP\", opts);\n  }\n\n  /**\n   * Create a DateTime from an input string and format string.\n   * Defaults to en-US if no locale has been specified, regardless of the system's locale. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/#/parsing?id=table-of-tokens).\n   * @param {string} text - the string to parse\n   * @param {string} fmt - the format the string is expected to be in (see the link below for the formats)\n   * @param {Object} opts - options to affect the creation\n   * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone\n   * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one\n   * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale\n   * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system\n   * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n   * @return {DateTime}\n   */\n  static fromFormat(text, fmt, opts = {}) {\n    if (isUndefined(text) || isUndefined(fmt)) {\n      throw new InvalidArgumentError(\"fromFormat requires an input string and a format\");\n    }\n\n    const { locale = null, numberingSystem = null } = opts,\n      localeToUse = Locale.fromOpts({\n        locale,\n        numberingSystem,\n        defaultToEN: true,\n      }),\n      [vals, parsedZone, specificOffset, invalid] = parseFromTokens(localeToUse, text, fmt);\n    if (invalid) {\n      return DateTime.invalid(invalid);\n    } else {\n      return parseDataToDateTime(vals, parsedZone, opts, `format ${fmt}`, text, specificOffset);\n    }\n  }\n\n  /**\n   * @deprecated use fromFormat instead\n   */\n  static fromString(text, fmt, opts = {}) {\n    return DateTime.fromFormat(text, fmt, opts);\n  }\n\n  /**\n   * Create a DateTime from a SQL date, time, or datetime\n   * Defaults to en-US if no locale has been specified, regardless of the system's locale\n   * @param {string} text - the string to parse\n   * @param {Object} opts - options to affect the creation\n   * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone\n   * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one\n   * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale\n   * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system\n   * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n   * @example DateTime.fromSQL('2017-05-15')\n   * @example DateTime.fromSQL('2017-05-15 09:12:34')\n   * @example DateTime.fromSQL('2017-05-15 09:12:34.342')\n   * @example DateTime.fromSQL('2017-05-15 09:12:34.342+06:00')\n   * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles')\n   * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles', { setZone: true })\n   * @example DateTime.fromSQL('2017-05-15 09:12:34.342', { zone: 'America/Los_Angeles' })\n   * @example DateTime.fromSQL('09:12:34.342')\n   * @return {DateTime}\n   */\n  static fromSQL(text, opts = {}) {\n    const [vals, parsedZone] = parseSQL(text);\n    return parseDataToDateTime(vals, parsedZone, opts, \"SQL\", text);\n  }\n\n  /**\n   * Create an invalid DateTime.\n   * @param {string} reason - simple string of why this DateTime is invalid. Should not contain parameters or anything else data-dependent\n   * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information\n   * @return {DateTime}\n   */\n  static invalid(reason, explanation = null) {\n    if (!reason) {\n      throw new InvalidArgumentError(\"need to specify a reason the DateTime is invalid\");\n    }\n\n    const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation);\n\n    if (Settings.throwOnInvalid) {\n      throw new InvalidDateTimeError(invalid);\n    } else {\n      return new DateTime({ invalid });\n    }\n  }\n\n  /**\n   * Check if an object is an instance of DateTime. Works across context boundaries\n   * @param {object} o\n   * @return {boolean}\n   */\n  static isDateTime(o) {\n    return (o && o.isLuxonDateTime) || false;\n  }\n\n  // INFO\n\n  /**\n   * Get the value of unit.\n   * @param {string} unit - a unit such as 'minute' or 'day'\n   * @example DateTime.local(2017, 7, 4).get('month'); //=> 7\n   * @example DateTime.local(2017, 7, 4).get('day'); //=> 4\n   * @return {number}\n   */\n  get(unit) {\n    return this[unit];\n  }\n\n  /**\n   * Returns whether the DateTime is valid. Invalid DateTimes occur when:\n   * * The DateTime was created from invalid calendar information, such as the 13th month or February 30\n   * * The DateTime was created by an operation on another invalid date\n   * @type {boolean}\n   */\n  get isValid() {\n    return this.invalid === null;\n  }\n\n  /**\n   * Returns an error code if this DateTime is invalid, or null if the DateTime is valid\n   * @type {string}\n   */\n  get invalidReason() {\n    return this.invalid ? this.invalid.reason : null;\n  }\n\n  /**\n   * Returns an explanation of why this DateTime became invalid, or null if the DateTime is valid\n   * @type {string}\n   */\n  get invalidExplanation() {\n    return this.invalid ? this.invalid.explanation : null;\n  }\n\n  /**\n   * Get the locale of a DateTime, such 'en-GB'. The locale is used when formatting the DateTime\n   *\n   * @type {string}\n   */\n  get locale() {\n    return this.isValid ? this.loc.locale : null;\n  }\n\n  /**\n   * Get the numbering system of a DateTime, such 'beng'. The numbering system is used when formatting the DateTime\n   *\n   * @type {string}\n   */\n  get numberingSystem() {\n    return this.isValid ? this.loc.numberingSystem : null;\n  }\n\n  /**\n   * Get the output calendar of a DateTime, such 'islamic'. The output calendar is used when formatting the DateTime\n   *\n   * @type {string}\n   */\n  get outputCalendar() {\n    return this.isValid ? this.loc.outputCalendar : null;\n  }\n\n  /**\n   * Get the time zone associated with this DateTime.\n   * @type {Zone}\n   */\n  get zone() {\n    return this._zone;\n  }\n\n  /**\n   * Get the name of the time zone.\n   * @type {string}\n   */\n  get zoneName() {\n    return this.isValid ? this.zone.name : null;\n  }\n\n  /**\n   * Get the year\n   * @example DateTime.local(2017, 5, 25).year //=> 2017\n   * @type {number}\n   */\n  get year() {\n    return this.isValid ? this.c.year : NaN;\n  }\n\n  /**\n   * Get the quarter\n   * @example DateTime.local(2017, 5, 25).quarter //=> 2\n   * @type {number}\n   */\n  get quarter() {\n    return this.isValid ? Math.ceil(this.c.month / 3) : NaN;\n  }\n\n  /**\n   * Get the month (1-12).\n   * @example DateTime.local(2017, 5, 25).month //=> 5\n   * @type {number}\n   */\n  get month() {\n    return this.isValid ? this.c.month : NaN;\n  }\n\n  /**\n   * Get the day of the month (1-30ish).\n   * @example DateTime.local(2017, 5, 25).day //=> 25\n   * @type {number}\n   */\n  get day() {\n    return this.isValid ? this.c.day : NaN;\n  }\n\n  /**\n   * Get the hour of the day (0-23).\n   * @example DateTime.local(2017, 5, 25, 9).hour //=> 9\n   * @type {number}\n   */\n  get hour() {\n    return this.isValid ? this.c.hour : NaN;\n  }\n\n  /**\n   * Get the minute of the hour (0-59).\n   * @example DateTime.local(2017, 5, 25, 9, 30).minute //=> 30\n   * @type {number}\n   */\n  get minute() {\n    return this.isValid ? this.c.minute : NaN;\n  }\n\n  /**\n   * Get the second of the minute (0-59).\n   * @example DateTime.local(2017, 5, 25, 9, 30, 52).second //=> 52\n   * @type {number}\n   */\n  get second() {\n    return this.isValid ? this.c.second : NaN;\n  }\n\n  /**\n   * Get the millisecond of the second (0-999).\n   * @example DateTime.local(2017, 5, 25, 9, 30, 52, 654).millisecond //=> 654\n   * @type {number}\n   */\n  get millisecond() {\n    return this.isValid ? this.c.millisecond : NaN;\n  }\n\n  /**\n   * Get the week year\n   * @see https://en.wikipedia.org/wiki/ISO_week_date\n   * @example DateTime.local(2014, 12, 31).weekYear //=> 2015\n   * @type {number}\n   */\n  get weekYear() {\n    return this.isValid ? possiblyCachedWeekData(this).weekYear : NaN;\n  }\n\n  /**\n   * Get the week number of the week year (1-52ish).\n   * @see https://en.wikipedia.org/wiki/ISO_week_date\n   * @example DateTime.local(2017, 5, 25).weekNumber //=> 21\n   * @type {number}\n   */\n  get weekNumber() {\n    return this.isValid ? possiblyCachedWeekData(this).weekNumber : NaN;\n  }\n\n  /**\n   * Get the day of the week.\n   * 1 is Monday and 7 is Sunday\n   * @see https://en.wikipedia.org/wiki/ISO_week_date\n   * @example DateTime.local(2014, 11, 31).weekday //=> 4\n   * @type {number}\n   */\n  get weekday() {\n    return this.isValid ? possiblyCachedWeekData(this).weekday : NaN;\n  }\n\n  /**\n   * Get the ordinal (meaning the day of the year)\n   * @example DateTime.local(2017, 5, 25).ordinal //=> 145\n   * @type {number|DateTime}\n   */\n  get ordinal() {\n    return this.isValid ? gregorianToOrdinal(this.c).ordinal : NaN;\n  }\n\n  /**\n   * Get the human readable short month name, such as 'Oct'.\n   * Defaults to the system's locale if no locale has been specified\n   * @example DateTime.local(2017, 10, 30).monthShort //=> Oct\n   * @type {string}\n   */\n  get monthShort() {\n    return this.isValid ? Info.months(\"short\", { locObj: this.loc })[this.month - 1] : null;\n  }\n\n  /**\n   * Get the human readable long month name, such as 'October'.\n   * Defaults to the system's locale if no locale has been specified\n   * @example DateTime.local(2017, 10, 30).monthLong //=> October\n   * @type {string}\n   */\n  get monthLong() {\n    return this.isValid ? Info.months(\"long\", { locObj: this.loc })[this.month - 1] : null;\n  }\n\n  /**\n   * Get the human readable short weekday, such as 'Mon'.\n   * Defaults to the system's locale if no locale has been specified\n   * @example DateTime.local(2017, 10, 30).weekdayShort //=> Mon\n   * @type {string}\n   */\n  get weekdayShort() {\n    return this.isValid ? Info.weekdays(\"short\", { locObj: this.loc })[this.weekday - 1] : null;\n  }\n\n  /**\n   * Get the human readable long weekday, such as 'Monday'.\n   * Defaults to the system's locale if no locale has been specified\n   * @example DateTime.local(2017, 10, 30).weekdayLong //=> Monday\n   * @type {string}\n   */\n  get weekdayLong() {\n    return this.isValid ? Info.weekdays(\"long\", { locObj: this.loc })[this.weekday - 1] : null;\n  }\n\n  /**\n   * Get the UTC offset of this DateTime in minutes\n   * @example DateTime.now().offset //=> -240\n   * @example DateTime.utc().offset //=> 0\n   * @type {number}\n   */\n  get offset() {\n    return this.isValid ? +this.o : NaN;\n  }\n\n  /**\n   * Get the short human name for the zone's current offset, for example \"EST\" or \"EDT\".\n   * Defaults to the system's locale if no locale has been specified\n   * @type {string}\n   */\n  get offsetNameShort() {\n    if (this.isValid) {\n      return this.zone.offsetName(this.ts, {\n        format: \"short\",\n        locale: this.locale,\n      });\n    } else {\n      return null;\n    }\n  }\n\n  /**\n   * Get the long human name for the zone's current offset, for example \"Eastern Standard Time\" or \"Eastern Daylight Time\".\n   * Defaults to the system's locale if no locale has been specified\n   * @type {string}\n   */\n  get offsetNameLong() {\n    if (this.isValid) {\n      return this.zone.offsetName(this.ts, {\n        format: \"long\",\n        locale: this.locale,\n      });\n    } else {\n      return null;\n    }\n  }\n\n  /**\n   * Get whether this zone's offset ever changes, as in a DST.\n   * @type {boolean}\n   */\n  get isOffsetFixed() {\n    return this.isValid ? this.zone.isUniversal : null;\n  }\n\n  /**\n   * Get whether the DateTime is in a DST.\n   * @type {boolean}\n   */\n  get isInDST() {\n    if (this.isOffsetFixed) {\n      return false;\n    } else {\n      return (\n        this.offset > this.set({ month: 1, day: 1 }).offset ||\n        this.offset > this.set({ month: 5 }).offset\n      );\n    }\n  }\n\n  /**\n   * Returns true if this DateTime is in a leap year, false otherwise\n   * @example DateTime.local(2016).isInLeapYear //=> true\n   * @example DateTime.local(2013).isInLeapYear //=> false\n   * @type {boolean}\n   */\n  get isInLeapYear() {\n    return isLeapYear(this.year);\n  }\n\n  /**\n   * Returns the number of days in this DateTime's month\n   * @example DateTime.local(2016, 2).daysInMonth //=> 29\n   * @example DateTime.local(2016, 3).daysInMonth //=> 31\n   * @type {number}\n   */\n  get daysInMonth() {\n    return daysInMonth(this.year, this.month);\n  }\n\n  /**\n   * Returns the number of days in this DateTime's year\n   * @example DateTime.local(2016).daysInYear //=> 366\n   * @example DateTime.local(2013).daysInYear //=> 365\n   * @type {number}\n   */\n  get daysInYear() {\n    return this.isValid ? daysInYear(this.year) : NaN;\n  }\n\n  /**\n   * Returns the number of weeks in this DateTime's year\n   * @see https://en.wikipedia.org/wiki/ISO_week_date\n   * @example DateTime.local(2004).weeksInWeekYear //=> 53\n   * @example DateTime.local(2013).weeksInWeekYear //=> 52\n   * @type {number}\n   */\n  get weeksInWeekYear() {\n    return this.isValid ? weeksInWeekYear(this.weekYear) : NaN;\n  }\n\n  /**\n   * Returns the resolved Intl options for this DateTime.\n   * This is useful in understanding the behavior of formatting methods\n   * @param {Object} opts - the same options as toLocaleString\n   * @return {Object}\n   */\n  resolvedLocaleOptions(opts = {}) {\n    const { locale, numberingSystem, calendar } = Formatter.create(\n      this.loc.clone(opts),\n      opts\n    ).resolvedOptions(this);\n    return { locale, numberingSystem, outputCalendar: calendar };\n  }\n\n  // TRANSFORM\n\n  /**\n   * \"Set\" the DateTime's zone to UTC. Returns a newly-constructed DateTime.\n   *\n   * Equivalent to {@link DateTime#setZone}('utc')\n   * @param {number} [offset=0] - optionally, an offset from UTC in minutes\n   * @param {Object} [opts={}] - options to pass to `setZone()`\n   * @return {DateTime}\n   */\n  toUTC(offset = 0, opts = {}) {\n    return this.setZone(FixedOffsetZone.instance(offset), opts);\n  }\n\n  /**\n   * \"Set\" the DateTime's zone to the host's local zone. Returns a newly-constructed DateTime.\n   *\n   * Equivalent to `setZone('local')`\n   * @return {DateTime}\n   */\n  toLocal() {\n    return this.setZone(Settings.defaultZone);\n  }\n\n  /**\n   * \"Set\" the DateTime's zone to specified zone. Returns a newly-constructed DateTime.\n   *\n   * By default, the setter keeps the underlying time the same (as in, the same timestamp), but the new instance will report different local times and consider DSTs when making computations, as with {@link DateTime#plus}. You may wish to use {@link DateTime#toLocal} and {@link DateTime#toUTC} which provide simple convenience wrappers for commonly used zones.\n   * @param {string|Zone} [zone='local'] - a zone identifier. As a string, that can be any IANA zone supported by the host environment, or a fixed-offset name of the form 'UTC+3', or the strings 'local' or 'utc'. You may also supply an instance of a {@link DateTime#Zone} class.\n   * @param {Object} opts - options\n   * @param {boolean} [opts.keepLocalTime=false] - If true, adjust the underlying time so that the local time stays the same, but in the target zone. You should rarely need this.\n   * @return {DateTime}\n   */\n  setZone(zone, { keepLocalTime = false, keepCalendarTime = false } = {}) {\n    zone = normalizeZone(zone, Settings.defaultZone);\n    if (zone.equals(this.zone)) {\n      return this;\n    } else if (!zone.isValid) {\n      return DateTime.invalid(unsupportedZone(zone));\n    } else {\n      let newTS = this.ts;\n      if (keepLocalTime || keepCalendarTime) {\n        const offsetGuess = zone.offset(this.ts);\n        const asObj = this.toObject();\n        [newTS] = objToTS(asObj, offsetGuess, zone);\n      }\n      return clone(this, { ts: newTS, zone });\n    }\n  }\n\n  /**\n   * \"Set\" the locale, numberingSystem, or outputCalendar. Returns a newly-constructed DateTime.\n   * @param {Object} properties - the properties to set\n   * @example DateTime.local(2017, 5, 25).reconfigure({ locale: 'en-GB' })\n   * @return {DateTime}\n   */\n  reconfigure({ locale, numberingSystem, outputCalendar } = {}) {\n    const loc = this.loc.clone({ locale, numberingSystem, outputCalendar });\n    return clone(this, { loc });\n  }\n\n  /**\n   * \"Set\" the locale. Returns a newly-constructed DateTime.\n   * Just a convenient alias for reconfigure({ locale })\n   * @example DateTime.local(2017, 5, 25).setLocale('en-GB')\n   * @return {DateTime}\n   */\n  setLocale(locale) {\n    return this.reconfigure({ locale });\n  }\n\n  /**\n   * \"Set\" the values of specified units. Returns a newly-constructed DateTime.\n   * You can only set units with this method; for \"setting\" metadata, see {@link DateTime#reconfigure} and {@link DateTime#setZone}.\n   * @param {Object} values - a mapping of units to numbers\n   * @example dt.set({ year: 2017 })\n   * @example dt.set({ hour: 8, minute: 30 })\n   * @example dt.set({ weekday: 5 })\n   * @example dt.set({ year: 2005, ordinal: 234 })\n   * @return {DateTime}\n   */\n  set(values) {\n    if (!this.isValid) return this;\n\n    const normalized = normalizeObject(values, normalizeUnit),\n      settingWeekStuff =\n        !isUndefined(normalized.weekYear) ||\n        !isUndefined(normalized.weekNumber) ||\n        !isUndefined(normalized.weekday),\n      containsOrdinal = !isUndefined(normalized.ordinal),\n      containsGregorYear = !isUndefined(normalized.year),\n      containsGregorMD = !isUndefined(normalized.month) || !isUndefined(normalized.day),\n      containsGregor = containsGregorYear || containsGregorMD,\n      definiteWeekDef = normalized.weekYear || normalized.weekNumber;\n\n    if ((containsGregor || containsOrdinal) && definiteWeekDef) {\n      throw new ConflictingSpecificationError(\n        \"Can't mix weekYear/weekNumber units with year/month/day or ordinals\"\n      );\n    }\n\n    if (containsGregorMD && containsOrdinal) {\n      throw new ConflictingSpecificationError(\"Can't mix ordinal dates with month/day\");\n    }\n\n    let mixed;\n    if (settingWeekStuff) {\n      mixed = weekToGregorian({ ...gregorianToWeek(this.c), ...normalized });\n    } else if (!isUndefined(normalized.ordinal)) {\n      mixed = ordinalToGregorian({ ...gregorianToOrdinal(this.c), ...normalized });\n    } else {\n      mixed = { ...this.toObject(), ...normalized };\n\n      // if we didn't set the day but we ended up on an overflow date,\n      // use the last day of the right month\n      if (isUndefined(normalized.day)) {\n        mixed.day = Math.min(daysInMonth(mixed.year, mixed.month), mixed.day);\n      }\n    }\n\n    const [ts, o] = objToTS(mixed, this.o, this.zone);\n    return clone(this, { ts, o });\n  }\n\n  /**\n   * Add a period of time to this DateTime and return the resulting DateTime\n   *\n   * Adding hours, minutes, seconds, or milliseconds increases the timestamp by the right number of milliseconds. Adding days, months, or years shifts the calendar, accounting for DSTs and leap years along the way. Thus, `dt.plus({ hours: 24 })` may result in a different time than `dt.plus({ days: 1 })` if there's a DST shift in between.\n   * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n   * @example DateTime.now().plus(123) //~> in 123 milliseconds\n   * @example DateTime.now().plus({ minutes: 15 }) //~> in 15 minutes\n   * @example DateTime.now().plus({ days: 1 }) //~> this time tomorrow\n   * @example DateTime.now().plus({ days: -1 }) //~> this time yesterday\n   * @example DateTime.now().plus({ hours: 3, minutes: 13 }) //~> in 3 hr, 13 min\n   * @example DateTime.now().plus(Duration.fromObject({ hours: 3, minutes: 13 })) //~> in 3 hr, 13 min\n   * @return {DateTime}\n   */\n  plus(duration) {\n    if (!this.isValid) return this;\n    const dur = Duration.fromDurationLike(duration);\n    return clone(this, adjustTime(this, dur));\n  }\n\n  /**\n   * Subtract a period of time to this DateTime and return the resulting DateTime\n   * See {@link DateTime#plus}\n   * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n   @return {DateTime}\n   */\n  minus(duration) {\n    if (!this.isValid) return this;\n    const dur = Duration.fromDurationLike(duration).negate();\n    return clone(this, adjustTime(this, dur));\n  }\n\n  /**\n   * \"Set\" this DateTime to the beginning of a unit of time.\n   * @param {string} unit - The unit to go to the beginning of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'.\n   * @example DateTime.local(2014, 3, 3).startOf('month').toISODate(); //=> '2014-03-01'\n   * @example DateTime.local(2014, 3, 3).startOf('year').toISODate(); //=> '2014-01-01'\n   * @example DateTime.local(2014, 3, 3).startOf('week').toISODate(); //=> '2014-03-03', weeks always start on Mondays\n   * @example DateTime.local(2014, 3, 3, 5, 30).startOf('day').toISOTime(); //=> '00:00.000-05:00'\n   * @example DateTime.local(2014, 3, 3, 5, 30).startOf('hour').toISOTime(); //=> '05:00:00.000-05:00'\n   * @return {DateTime}\n   */\n  startOf(unit) {\n    if (!this.isValid) return this;\n    const o = {},\n      normalizedUnit = Duration.normalizeUnit(unit);\n    switch (normalizedUnit) {\n      case \"years\":\n        o.month = 1;\n      // falls through\n      case \"quarters\":\n      case \"months\":\n        o.day = 1;\n      // falls through\n      case \"weeks\":\n      case \"days\":\n        o.hour = 0;\n      // falls through\n      case \"hours\":\n        o.minute = 0;\n      // falls through\n      case \"minutes\":\n        o.second = 0;\n      // falls through\n      case \"seconds\":\n        o.millisecond = 0;\n        break;\n      case \"milliseconds\":\n        break;\n      // no default, invalid units throw in normalizeUnit()\n    }\n\n    if (normalizedUnit === \"weeks\") {\n      o.weekday = 1;\n    }\n\n    if (normalizedUnit === \"quarters\") {\n      const q = Math.ceil(this.month / 3);\n      o.month = (q - 1) * 3 + 1;\n    }\n\n    return this.set(o);\n  }\n\n  /**\n   * \"Set\" this DateTime to the end (meaning the last millisecond) of a unit of time\n   * @param {string} unit - The unit to go to the end of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'.\n   * @example DateTime.local(2014, 3, 3).endOf('month').toISO(); //=> '2014-03-31T23:59:59.999-05:00'\n   * @example DateTime.local(2014, 3, 3).endOf('year').toISO(); //=> '2014-12-31T23:59:59.999-05:00'\n   * @example DateTime.local(2014, 3, 3).endOf('week').toISO(); // => '2014-03-09T23:59:59.999-05:00', weeks start on Mondays\n   * @example DateTime.local(2014, 3, 3, 5, 30).endOf('day').toISO(); //=> '2014-03-03T23:59:59.999-05:00'\n   * @example DateTime.local(2014, 3, 3, 5, 30).endOf('hour').toISO(); //=> '2014-03-03T05:59:59.999-05:00'\n   * @return {DateTime}\n   */\n  endOf(unit) {\n    return this.isValid\n      ? this.plus({ [unit]: 1 })\n          .startOf(unit)\n          .minus(1)\n      : this;\n  }\n\n  // OUTPUT\n\n  /**\n   * Returns a string representation of this DateTime formatted according to the specified format string.\n   * **You may not want this.** See {@link DateTime#toLocaleString} for a more flexible formatting tool. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/#/formatting?id=table-of-tokens).\n   * Defaults to en-US if no locale has been specified, regardless of the system's locale.\n   * @param {string} fmt - the format string\n   * @param {Object} opts - opts to override the configuration options on this DateTime\n   * @example DateTime.now().toFormat('yyyy LLL dd') //=> '2017 Apr 22'\n   * @example DateTime.now().setLocale('fr').toFormat('yyyy LLL dd') //=> '2017 avr. 22'\n   * @example DateTime.now().toFormat('yyyy LLL dd', { locale: \"fr\" }) //=> '2017 avr. 22'\n   * @example DateTime.now().toFormat(\"HH 'hours and' mm 'minutes'\") //=> '20 hours and 55 minutes'\n   * @return {string}\n   */\n  toFormat(fmt, opts = {}) {\n    return this.isValid\n      ? Formatter.create(this.loc.redefaultToEN(opts)).formatDateTimeFromString(this, fmt)\n      : INVALID;\n  }\n\n  /**\n   * Returns a localized string representing this date. Accepts the same options as the Intl.DateTimeFormat constructor and any presets defined by Luxon, such as `DateTime.DATE_FULL` or `DateTime.TIME_SIMPLE`.\n   * The exact behavior of this method is browser-specific, but in general it will return an appropriate representation\n   * of the DateTime in the assigned locale.\n   * Defaults to the system's locale if no locale has been specified\n   * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n   * @param formatOpts {Object} - Intl.DateTimeFormat constructor options and configuration options\n   * @param {Object} opts - opts to override the configuration options on this DateTime\n   * @example DateTime.now().toLocaleString(); //=> 4/20/2017\n   * @example DateTime.now().setLocale('en-gb').toLocaleString(); //=> '20/04/2017'\n   * @example DateTime.now().toLocaleString({ locale: 'en-gb' }); //=> '20/04/2017'\n   * @example DateTime.now().toLocaleString(DateTime.DATE_FULL); //=> 'April 20, 2017'\n   * @example DateTime.now().toLocaleString(DateTime.TIME_SIMPLE); //=> '11:32 AM'\n   * @example DateTime.now().toLocaleString(DateTime.DATETIME_SHORT); //=> '4/20/2017, 11:32 AM'\n   * @example DateTime.now().toLocaleString({ weekday: 'long', month: 'long', day: '2-digit' }); //=> 'Thursday, April 20'\n   * @example DateTime.now().toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> 'Thu, Apr 20, 11:27 AM'\n   * @example DateTime.now().toLocaleString({ hour: '2-digit', minute: '2-digit', hourCycle: 'h23' }); //=> '11:32'\n   * @return {string}\n   */\n  toLocaleString(formatOpts = Formats.DATE_SHORT, opts = {}) {\n    return this.isValid\n      ? Formatter.create(this.loc.clone(opts), formatOpts).formatDateTime(this)\n      : INVALID;\n  }\n\n  /**\n   * Returns an array of format \"parts\", meaning individual tokens along with metadata. This is allows callers to post-process individual sections of the formatted output.\n   * Defaults to the system's locale if no locale has been specified\n   * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat/formatToParts\n   * @param opts {Object} - Intl.DateTimeFormat constructor options, same as `toLocaleString`.\n   * @example DateTime.now().toLocaleParts(); //=> [\n   *                                   //=>   { type: 'day', value: '25' },\n   *                                   //=>   { type: 'literal', value: '/' },\n   *                                   //=>   { type: 'month', value: '05' },\n   *                                   //=>   { type: 'literal', value: '/' },\n   *                                   //=>   { type: 'year', value: '1982' }\n   *                                   //=> ]\n   */\n  toLocaleParts(opts = {}) {\n    return this.isValid\n      ? Formatter.create(this.loc.clone(opts), opts).formatDateTimeParts(this)\n      : [];\n  }\n\n  /**\n   * Returns an ISO 8601-compliant string representation of this DateTime\n   * @param {Object} opts - options\n   * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0\n   * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0\n   * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n   * @param {boolean} [opts.extendedZone=true] - add the time zone format extension\n   * @param {string} [opts.format='extended'] - choose between the basic and extended format\n   * @example DateTime.utc(1983, 5, 25).toISO() //=> '1982-05-25T00:00:00.000Z'\n   * @example DateTime.now().toISO() //=> '2017-04-22T20:47:05.335-04:00'\n   * @example DateTime.now().toISO({ includeOffset: false }) //=> '2017-04-22T20:47:05.335'\n   * @example DateTime.now().toISO({ format: 'basic' }) //=> '20170422T204705.335-0400'\n   * @return {string}\n   */\n  toISO({\n    format = \"extended\",\n    suppressSeconds = false,\n    suppressMilliseconds = false,\n    includeOffset = true,\n    extendedZone = false,\n  } = {}) {\n    if (!this.isValid) {\n      return null;\n    }\n\n    const ext = format === \"extended\";\n\n    let c = toISODate(this, ext);\n    c += \"T\";\n    c += toISOTime(this, ext, suppressSeconds, suppressMilliseconds, includeOffset, extendedZone);\n    return c;\n  }\n\n  /**\n   * Returns an ISO 8601-compliant string representation of this DateTime's date component\n   * @param {Object} opts - options\n   * @param {string} [opts.format='extended'] - choose between the basic and extended format\n   * @example DateTime.utc(1982, 5, 25).toISODate() //=> '1982-05-25'\n   * @example DateTime.utc(1982, 5, 25).toISODate({ format: 'basic' }) //=> '19820525'\n   * @return {string}\n   */\n  toISODate({ format = \"extended\" } = {}) {\n    if (!this.isValid) {\n      return null;\n    }\n\n    return toISODate(this, format === \"extended\");\n  }\n\n  /**\n   * Returns an ISO 8601-compliant string representation of this DateTime's week date\n   * @example DateTime.utc(1982, 5, 25).toISOWeekDate() //=> '1982-W21-2'\n   * @return {string}\n   */\n  toISOWeekDate() {\n    return toTechFormat(this, \"kkkk-'W'WW-c\");\n  }\n\n  /**\n   * Returns an ISO 8601-compliant string representation of this DateTime's time component\n   * @param {Object} opts - options\n   * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0\n   * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0\n   * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n   * @param {boolean} [opts.extendedZone=true] - add the time zone format extension\n   * @param {boolean} [opts.includePrefix=false] - include the `T` prefix\n   * @param {string} [opts.format='extended'] - choose between the basic and extended format\n   * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime() //=> '07:34:19.361Z'\n   * @example DateTime.utc().set({ hour: 7, minute: 34, seconds: 0, milliseconds: 0 }).toISOTime({ suppressSeconds: true }) //=> '07:34Z'\n   * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ format: 'basic' }) //=> '073419.361Z'\n   * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ includePrefix: true }) //=> 'T07:34:19.361Z'\n   * @return {string}\n   */\n  toISOTime({\n    suppressMilliseconds = false,\n    suppressSeconds = false,\n    includeOffset = true,\n    includePrefix = false,\n    extendedZone = false,\n    format = \"extended\",\n  } = {}) {\n    if (!this.isValid) {\n      return null;\n    }\n\n    let c = includePrefix ? \"T\" : \"\";\n    return (\n      c +\n      toISOTime(\n        this,\n        format === \"extended\",\n        suppressSeconds,\n        suppressMilliseconds,\n        includeOffset,\n        extendedZone\n      )\n    );\n  }\n\n  /**\n   * Returns an RFC 2822-compatible string representation of this DateTime\n   * @example DateTime.utc(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 +0000'\n   * @example DateTime.local(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 -0400'\n   * @return {string}\n   */\n  toRFC2822() {\n    return toTechFormat(this, \"EEE, dd LLL yyyy HH:mm:ss ZZZ\", false);\n  }\n\n  /**\n   * Returns a string representation of this DateTime appropriate for use in HTTP headers. The output is always expressed in GMT.\n   * Specifically, the string conforms to RFC 1123.\n   * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1\n   * @example DateTime.utc(2014, 7, 13).toHTTP() //=> 'Sun, 13 Jul 2014 00:00:00 GMT'\n   * @example DateTime.utc(2014, 7, 13, 19).toHTTP() //=> 'Sun, 13 Jul 2014 19:00:00 GMT'\n   * @return {string}\n   */\n  toHTTP() {\n    return toTechFormat(this.toUTC(), \"EEE, dd LLL yyyy HH:mm:ss 'GMT'\");\n  }\n\n  /**\n   * Returns a string representation of this DateTime appropriate for use in SQL Date\n   * @example DateTime.utc(2014, 7, 13).toSQLDate() //=> '2014-07-13'\n   * @return {string}\n   */\n  toSQLDate() {\n    if (!this.isValid) {\n      return null;\n    }\n    return toISODate(this, true);\n  }\n\n  /**\n   * Returns a string representation of this DateTime appropriate for use in SQL Time\n   * @param {Object} opts - options\n   * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset.\n   * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n   * @param {boolean} [opts.includeOffsetSpace=true] - include the space between the time and the offset, such as '05:15:16.345 -04:00'\n   * @example DateTime.utc().toSQL() //=> '05:15:16.345'\n   * @example DateTime.now().toSQL() //=> '05:15:16.345 -04:00'\n   * @example DateTime.now().toSQL({ includeOffset: false }) //=> '05:15:16.345'\n   * @example DateTime.now().toSQL({ includeZone: false }) //=> '05:15:16.345 America/New_York'\n   * @return {string}\n   */\n  toSQLTime({ includeOffset = true, includeZone = false, includeOffsetSpace = true } = {}) {\n    let fmt = \"HH:mm:ss.SSS\";\n\n    if (includeZone || includeOffset) {\n      if (includeOffsetSpace) {\n        fmt += \" \";\n      }\n      if (includeZone) {\n        fmt += \"z\";\n      } else if (includeOffset) {\n        fmt += \"ZZ\";\n      }\n    }\n\n    return toTechFormat(this, fmt, true);\n  }\n\n  /**\n   * Returns a string representation of this DateTime appropriate for use in SQL DateTime\n   * @param {Object} opts - options\n   * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset.\n   * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n   * @param {boolean} [opts.includeOffsetSpace=true] - include the space between the time and the offset, such as '05:15:16.345 -04:00'\n   * @example DateTime.utc(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 Z'\n   * @example DateTime.local(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 -04:00'\n   * @example DateTime.local(2014, 7, 13).toSQL({ includeOffset: false }) //=> '2014-07-13 00:00:00.000'\n   * @example DateTime.local(2014, 7, 13).toSQL({ includeZone: true }) //=> '2014-07-13 00:00:00.000 America/New_York'\n   * @return {string}\n   */\n  toSQL(opts = {}) {\n    if (!this.isValid) {\n      return null;\n    }\n\n    return `${this.toSQLDate()} ${this.toSQLTime(opts)}`;\n  }\n\n  /**\n   * Returns a string representation of this DateTime appropriate for debugging\n   * @return {string}\n   */\n  toString() {\n    return this.isValid ? this.toISO() : INVALID;\n  }\n\n  /**\n   * Returns the epoch milliseconds of this DateTime. Alias of {@link DateTime#toMillis}\n   * @return {number}\n   */\n  valueOf() {\n    return this.toMillis();\n  }\n\n  /**\n   * Returns the epoch milliseconds of this DateTime.\n   * @return {number}\n   */\n  toMillis() {\n    return this.isValid ? this.ts : NaN;\n  }\n\n  /**\n   * Returns the epoch seconds of this DateTime.\n   * @return {number}\n   */\n  toSeconds() {\n    return this.isValid ? this.ts / 1000 : NaN;\n  }\n\n  /**\n   * Returns the epoch seconds (as a whole number) of this DateTime.\n   * @return {number}\n   */\n  toUnixInteger() {\n    return this.isValid ? Math.floor(this.ts / 1000) : NaN;\n  }\n\n  /**\n   * Returns an ISO 8601 representation of this DateTime appropriate for use in JSON.\n   * @return {string}\n   */\n  toJSON() {\n    return this.toISO();\n  }\n\n  /**\n   * Returns a BSON serializable equivalent to this DateTime.\n   * @return {Date}\n   */\n  toBSON() {\n    return this.toJSDate();\n  }\n\n  /**\n   * Returns a JavaScript object with this DateTime's year, month, day, and so on.\n   * @param opts - options for generating the object\n   * @param {boolean} [opts.includeConfig=false] - include configuration attributes in the output\n   * @example DateTime.now().toObject() //=> { year: 2017, month: 4, day: 22, hour: 20, minute: 49, second: 42, millisecond: 268 }\n   * @return {Object}\n   */\n  toObject(opts = {}) {\n    if (!this.isValid) return {};\n\n    const base = { ...this.c };\n\n    if (opts.includeConfig) {\n      base.outputCalendar = this.outputCalendar;\n      base.numberingSystem = this.loc.numberingSystem;\n      base.locale = this.loc.locale;\n    }\n    return base;\n  }\n\n  /**\n   * Returns a JavaScript Date equivalent to this DateTime.\n   * @return {Date}\n   */\n  toJSDate() {\n    return new Date(this.isValid ? this.ts : NaN);\n  }\n\n  // COMPARE\n\n  /**\n   * Return the difference between two DateTimes as a Duration.\n   * @param {DateTime} otherDateTime - the DateTime to compare this one to\n   * @param {string|string[]} [unit=['milliseconds']] - the unit or array of units (such as 'hours' or 'days') to include in the duration.\n   * @param {Object} opts - options that affect the creation of the Duration\n   * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n   * @example\n   * var i1 = DateTime.fromISO('1982-05-25T09:45'),\n   *     i2 = DateTime.fromISO('1983-10-14T10:30');\n   * i2.diff(i1).toObject() //=> { milliseconds: 43807500000 }\n   * i2.diff(i1, 'hours').toObject() //=> { hours: 12168.75 }\n   * i2.diff(i1, ['months', 'days']).toObject() //=> { months: 16, days: 19.03125 }\n   * i2.diff(i1, ['months', 'days', 'hours']).toObject() //=> { months: 16, days: 19, hours: 0.75 }\n   * @return {Duration}\n   */\n  diff(otherDateTime, unit = \"milliseconds\", opts = {}) {\n    if (!this.isValid || !otherDateTime.isValid) {\n      return Duration.invalid(\"created by diffing an invalid DateTime\");\n    }\n\n    const durOpts = { locale: this.locale, numberingSystem: this.numberingSystem, ...opts };\n\n    const units = maybeArray(unit).map(Duration.normalizeUnit),\n      otherIsLater = otherDateTime.valueOf() > this.valueOf(),\n      earlier = otherIsLater ? this : otherDateTime,\n      later = otherIsLater ? otherDateTime : this,\n      diffed = diff(earlier, later, units, durOpts);\n\n    return otherIsLater ? diffed.negate() : diffed;\n  }\n\n  /**\n   * Return the difference between this DateTime and right now.\n   * See {@link DateTime#diff}\n   * @param {string|string[]} [unit=['milliseconds']] - the unit or units units (such as 'hours' or 'days') to include in the duration\n   * @param {Object} opts - options that affect the creation of the Duration\n   * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n   * @return {Duration}\n   */\n  diffNow(unit = \"milliseconds\", opts = {}) {\n    return this.diff(DateTime.now(), unit, opts);\n  }\n\n  /**\n   * Return an Interval spanning between this DateTime and another DateTime\n   * @param {DateTime} otherDateTime - the other end point of the Interval\n   * @return {Interval}\n   */\n  until(otherDateTime) {\n    return this.isValid ? Interval.fromDateTimes(this, otherDateTime) : this;\n  }\n\n  /**\n   * Return whether this DateTime is in the same unit of time as another DateTime.\n   * Higher-order units must also be identical for this function to return `true`.\n   * Note that time zones are **ignored** in this comparison, which compares the **local** calendar time. Use {@link DateTime#setZone} to convert one of the dates if needed.\n   * @param {DateTime} otherDateTime - the other DateTime\n   * @param {string} unit - the unit of time to check sameness on\n   * @example DateTime.now().hasSame(otherDT, 'day'); //~> true if otherDT is in the same current calendar day\n   * @return {boolean}\n   */\n  hasSame(otherDateTime, unit) {\n    if (!this.isValid) return false;\n\n    const inputMs = otherDateTime.valueOf();\n    const adjustedToZone = this.setZone(otherDateTime.zone, { keepLocalTime: true });\n    return adjustedToZone.startOf(unit) <= inputMs && inputMs <= adjustedToZone.endOf(unit);\n  }\n\n  /**\n   * Equality check\n   * Two DateTimes are equal iff they represent the same millisecond, have the same zone and location, and are both valid.\n   * To compare just the millisecond values, use `+dt1 === +dt2`.\n   * @param {DateTime} other - the other DateTime\n   * @return {boolean}\n   */\n  equals(other) {\n    return (\n      this.isValid &&\n      other.isValid &&\n      this.valueOf() === other.valueOf() &&\n      this.zone.equals(other.zone) &&\n      this.loc.equals(other.loc)\n    );\n  }\n\n  /**\n   * Returns a string representation of a this time relative to now, such as \"in two days\". Can only internationalize if your\n   * platform supports Intl.RelativeTimeFormat. Rounds down by default.\n   * @param {Object} options - options that affect the output\n   * @param {DateTime} [options.base=DateTime.now()] - the DateTime to use as the basis to which this time is compared. Defaults to now.\n   * @param {string} [options.style=\"long\"] - the style of units, must be \"long\", \"short\", or \"narrow\"\n   * @param {string|string[]} options.unit - use a specific unit or array of units; if omitted, or an array, the method will pick the best unit. Use an array or one of \"years\", \"quarters\", \"months\", \"weeks\", \"days\", \"hours\", \"minutes\", or \"seconds\"\n   * @param {boolean} [options.round=true] - whether to round the numbers in the output.\n   * @param {number} [options.padding=0] - padding in milliseconds. This allows you to round up the result if it fits inside the threshold. Don't use in combination with {round: false} because the decimal output will include the padding.\n   * @param {string} options.locale - override the locale of this DateTime\n   * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this\n   * @example DateTime.now().plus({ days: 1 }).toRelative() //=> \"in 1 day\"\n   * @example DateTime.now().setLocale(\"es\").toRelative({ days: 1 }) //=> \"dentro de 1 día\"\n   * @example DateTime.now().plus({ days: 1 }).toRelative({ locale: \"fr\" }) //=> \"dans 23 heures\"\n   * @example DateTime.now().minus({ days: 2 }).toRelative() //=> \"2 days ago\"\n   * @example DateTime.now().minus({ days: 2 }).toRelative({ unit: \"hours\" }) //=> \"48 hours ago\"\n   * @example DateTime.now().minus({ hours: 36 }).toRelative({ round: false }) //=> \"1.5 days ago\"\n   */\n  toRelative(options = {}) {\n    if (!this.isValid) return null;\n    const base = options.base || DateTime.fromObject({}, { zone: this.zone }),\n      padding = options.padding ? (this < base ? -options.padding : options.padding) : 0;\n    let units = [\"years\", \"months\", \"days\", \"hours\", \"minutes\", \"seconds\"];\n    let unit = options.unit;\n    if (Array.isArray(options.unit)) {\n      units = options.unit;\n      unit = undefined;\n    }\n    return diffRelative(base, this.plus(padding), {\n      ...options,\n      numeric: \"always\",\n      units,\n      unit,\n    });\n  }\n\n  /**\n   * Returns a string representation of this date relative to today, such as \"yesterday\" or \"next month\".\n   * Only internationalizes on platforms that supports Intl.RelativeTimeFormat.\n   * @param {Object} options - options that affect the output\n   * @param {DateTime} [options.base=DateTime.now()] - the DateTime to use as the basis to which this time is compared. Defaults to now.\n   * @param {string} options.locale - override the locale of this DateTime\n   * @param {string} options.unit - use a specific unit; if omitted, the method will pick the unit. Use one of \"years\", \"quarters\", \"months\", \"weeks\", or \"days\"\n   * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this\n   * @example DateTime.now().plus({ days: 1 }).toRelativeCalendar() //=> \"tomorrow\"\n   * @example DateTime.now().setLocale(\"es\").plus({ days: 1 }).toRelative() //=> \"\"mañana\"\n   * @example DateTime.now().plus({ days: 1 }).toRelativeCalendar({ locale: \"fr\" }) //=> \"demain\"\n   * @example DateTime.now().minus({ days: 2 }).toRelativeCalendar() //=> \"2 days ago\"\n   */\n  toRelativeCalendar(options = {}) {\n    if (!this.isValid) return null;\n\n    return diffRelative(options.base || DateTime.fromObject({}, { zone: this.zone }), this, {\n      ...options,\n      numeric: \"auto\",\n      units: [\"years\", \"months\", \"days\"],\n      calendary: true,\n    });\n  }\n\n  /**\n   * Return the min of several date times\n   * @param {...DateTime} dateTimes - the DateTimes from which to choose the minimum\n   * @return {DateTime} the min DateTime, or undefined if called with no argument\n   */\n  static min(...dateTimes) {\n    if (!dateTimes.every(DateTime.isDateTime)) {\n      throw new InvalidArgumentError(\"min requires all arguments be DateTimes\");\n    }\n    return bestBy(dateTimes, (i) => i.valueOf(), Math.min);\n  }\n\n  /**\n   * Return the max of several date times\n   * @param {...DateTime} dateTimes - the DateTimes from which to choose the maximum\n   * @return {DateTime} the max DateTime, or undefined if called with no argument\n   */\n  static max(...dateTimes) {\n    if (!dateTimes.every(DateTime.isDateTime)) {\n      throw new InvalidArgumentError(\"max requires all arguments be DateTimes\");\n    }\n    return bestBy(dateTimes, (i) => i.valueOf(), Math.max);\n  }\n\n  // MISC\n\n  /**\n   * Explain how a string would be parsed by fromFormat()\n   * @param {string} text - the string to parse\n   * @param {string} fmt - the format the string is expected to be in (see description)\n   * @param {Object} options - options taken by fromFormat()\n   * @return {Object}\n   */\n  static fromFormatExplain(text, fmt, options = {}) {\n    const { locale = null, numberingSystem = null } = options,\n      localeToUse = Locale.fromOpts({\n        locale,\n        numberingSystem,\n        defaultToEN: true,\n      });\n    return explainFromTokens(localeToUse, text, fmt);\n  }\n\n  /**\n   * @deprecated use fromFormatExplain instead\n   */\n  static fromStringExplain(text, fmt, options = {}) {\n    return DateTime.fromFormatExplain(text, fmt, options);\n  }\n\n  // FORMAT PRESETS\n\n  /**\n   * {@link DateTime#toLocaleString} format like 10/14/1983\n   * @type {Object}\n   */\n  static get DATE_SHORT() {\n    return Formats.DATE_SHORT;\n  }\n\n  /**\n   * {@link DateTime#toLocaleString} format like 'Oct 14, 1983'\n   * @type {Object}\n   */\n  static get DATE_MED() {\n    return Formats.DATE_MED;\n  }\n\n  /**\n   * {@link DateTime#toLocaleString} format like 'Fri, Oct 14, 1983'\n   * @type {Object}\n   */\n  static get DATE_MED_WITH_WEEKDAY() {\n    return Formats.DATE_MED_WITH_WEEKDAY;\n  }\n\n  /**\n   * {@link DateTime#toLocaleString} format like 'October 14, 1983'\n   * @type {Object}\n   */\n  static get DATE_FULL() {\n    return Formats.DATE_FULL;\n  }\n\n  /**\n   * {@link DateTime#toLocaleString} format like 'Tuesday, October 14, 1983'\n   * @type {Object}\n   */\n  static get DATE_HUGE() {\n    return Formats.DATE_HUGE;\n  }\n\n  /**\n   * {@link DateTime#toLocaleString} format like '09:30 AM'. Only 12-hour if the locale is.\n   * @type {Object}\n   */\n  static get TIME_SIMPLE() {\n    return Formats.TIME_SIMPLE;\n  }\n\n  /**\n   * {@link DateTime#toLocaleString} format like '09:30:23 AM'. Only 12-hour if the locale is.\n   * @type {Object}\n   */\n  static get TIME_WITH_SECONDS() {\n    return Formats.TIME_WITH_SECONDS;\n  }\n\n  /**\n   * {@link DateTime#toLocaleString} format like '09:30:23 AM EDT'. Only 12-hour if the locale is.\n   * @type {Object}\n   */\n  static get TIME_WITH_SHORT_OFFSET() {\n    return Formats.TIME_WITH_SHORT_OFFSET;\n  }\n\n  /**\n   * {@link DateTime#toLocaleString} format like '09:30:23 AM Eastern Daylight Time'. Only 12-hour if the locale is.\n   * @type {Object}\n   */\n  static get TIME_WITH_LONG_OFFSET() {\n    return Formats.TIME_WITH_LONG_OFFSET;\n  }\n\n  /**\n   * {@link DateTime#toLocaleString} format like '09:30', always 24-hour.\n   * @type {Object}\n   */\n  static get TIME_24_SIMPLE() {\n    return Formats.TIME_24_SIMPLE;\n  }\n\n  /**\n   * {@link DateTime#toLocaleString} format like '09:30:23', always 24-hour.\n   * @type {Object}\n   */\n  static get TIME_24_WITH_SECONDS() {\n    return Formats.TIME_24_WITH_SECONDS;\n  }\n\n  /**\n   * {@link DateTime#toLocaleString} format like '09:30:23 EDT', always 24-hour.\n   * @type {Object}\n   */\n  static get TIME_24_WITH_SHORT_OFFSET() {\n    return Formats.TIME_24_WITH_SHORT_OFFSET;\n  }\n\n  /**\n   * {@link DateTime#toLocaleString} format like '09:30:23 Eastern Daylight Time', always 24-hour.\n   * @type {Object}\n   */\n  static get TIME_24_WITH_LONG_OFFSET() {\n    return Formats.TIME_24_WITH_LONG_OFFSET;\n  }\n\n  /**\n   * {@link DateTime#toLocaleString} format like '10/14/1983, 9:30 AM'. Only 12-hour if the locale is.\n   * @type {Object}\n   */\n  static get DATETIME_SHORT() {\n    return Formats.DATETIME_SHORT;\n  }\n\n  /**\n   * {@link DateTime#toLocaleString} format like '10/14/1983, 9:30:33 AM'. Only 12-hour if the locale is.\n   * @type {Object}\n   */\n  static get DATETIME_SHORT_WITH_SECONDS() {\n    return Formats.DATETIME_SHORT_WITH_SECONDS;\n  }\n\n  /**\n   * {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30 AM'. Only 12-hour if the locale is.\n   * @type {Object}\n   */\n  static get DATETIME_MED() {\n    return Formats.DATETIME_MED;\n  }\n\n  /**\n   * {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30:33 AM'. Only 12-hour if the locale is.\n   * @type {Object}\n   */\n  static get DATETIME_MED_WITH_SECONDS() {\n    return Formats.DATETIME_MED_WITH_SECONDS;\n  }\n\n  /**\n   * {@link DateTime#toLocaleString} format like 'Fri, 14 Oct 1983, 9:30 AM'. Only 12-hour if the locale is.\n   * @type {Object}\n   */\n  static get DATETIME_MED_WITH_WEEKDAY() {\n    return Formats.DATETIME_MED_WITH_WEEKDAY;\n  }\n\n  /**\n   * {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30 AM EDT'. Only 12-hour if the locale is.\n   * @type {Object}\n   */\n  static get DATETIME_FULL() {\n    return Formats.DATETIME_FULL;\n  }\n\n  /**\n   * {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30:33 AM EDT'. Only 12-hour if the locale is.\n   * @type {Object}\n   */\n  static get DATETIME_FULL_WITH_SECONDS() {\n    return Formats.DATETIME_FULL_WITH_SECONDS;\n  }\n\n  /**\n   * {@link DateTime#toLocaleString} format like 'Friday, October 14, 1983, 9:30 AM Eastern Daylight Time'. Only 12-hour if the locale is.\n   * @type {Object}\n   */\n  static get DATETIME_HUGE() {\n    return Formats.DATETIME_HUGE;\n  }\n\n  /**\n   * {@link DateTime#toLocaleString} format like 'Friday, October 14, 1983, 9:30:33 AM Eastern Daylight Time'. Only 12-hour if the locale is.\n   * @type {Object}\n   */\n  static get DATETIME_HUGE_WITH_SECONDS() {\n    return Formats.DATETIME_HUGE_WITH_SECONDS;\n  }\n}\n\n/**\n * @private\n */\nexport function friendlyDateTime(dateTimeish) {\n  if (DateTime.isDateTime(dateTimeish)) {\n    return dateTimeish;\n  } else if (dateTimeish && dateTimeish.valueOf && isNumber(dateTimeish.valueOf())) {\n    return DateTime.fromJSDate(dateTimeish);\n  } else if (dateTimeish && typeof dateTimeish === \"object\") {\n    return DateTime.fromObject(dateTimeish);\n  } else {\n    throw new InvalidArgumentError(\n      `Unknown datetime argument: ${dateTimeish}, of type ${typeof dateTimeish}`\n    );\n  }\n}\n","<template>\n  <n-space vertical justify=\"center\" align=\"center\">\n    <h4>Filter</h4>\n    <n-input-group>\n      <n-tag :bordered=\"false\" size=\"large\">&nbsp;Location</n-tag>\n      <n-radio-group\n        v-model:value=\"query.location\"\n        name=\"location_radio_button_group\"\n        size=\"medium\"\n        @update:value=\"changeLocation\"\n      >\n        <n-radio-button\n          v-for=\"option in locationOptions\"\n          :key=\"option.value\"\n          :value=\"option.value\"\n        >\n          {{ option.label }}\n        </n-radio-button>\n      </n-radio-group>\n    </n-input-group>\n    <n-input-group>\n      <n-tag :bordered=\"false\">&nbsp;Signal</n-tag>\n      <n-radio-group\n        v-model:value=\"query.signal\"\n        name=\"signal_radio_button_group\"\n        size=\"small\"\n        @update:value=\"changeSignal\"\n      >\n        <n-radio-button\n          v-for=\"option in signalOptions\"\n          :key=\"option.value\"\n          :value=\"option.value\"\n        >\n          {{ option.label }}\n        </n-radio-button>\n      </n-radio-group>\n    </n-input-group>\n    <n-input-group>\n      <n-tag :bordered=\"false\">&nbsp;Year</n-tag>\n      <n-radio-group\n        v-model:value=\"query.year\"\n        name=\"year_radio_button_group\"\n        size=\"small\"\n        @update:value=\"changeYear\"\n      >\n        <n-radio-button\n          v-for=\"option in yearOptions\"\n          :key=\"option.value\"\n          :value=\"option.value\"\n        >\n          {{ option.label }}\n        </n-radio-button>\n      </n-radio-group>\n    </n-input-group>\n  </n-space>\n  <div v-for=\"y in years\" :key=\"y\" class=\"year\">\n    <div class=\"year__title\">{{ y }}</div>\n    <n-grid x-gap=\"12\" cols=\"1 1000:3\">\n      <template v-for=\"m in [...Array(12).keys()].reverse()\" :key=\"m\">\n        <n-gi>\n          <router-link\n            v-if=\"getMonth(y, m)\"\n            :to=\"{\n              name: 'month',\n              query: {\n                location: query.location,\n                signal: query.signal,\n                year: y,\n                month: m + 1,\n              },\n            }\"\n          >\n            <span>{{ getMonthName(m) }}</span>\n            <img :src=\"getMonth(y, m).spectrogram\" class=\"spectrogram\" />\n          </router-link>\n          <div v-else class=\"nodata\" :style=\"noDataStyle\"></div>\n        </n-gi>\n      </template>\n    </n-grid>\n  </div>\n  <div v-if=\"!years.length && !loading\" class=\"banner\">No data to show.</div>\n</template>\n\n<script setup>\nimport { ref, reactive, computed, watch, onMounted } from 'vue';\nimport { useRouter } from 'vue-router';\n\nimport { Info } from 'luxon';\n\nimport {\n  NSpace,\n  NInputGroup,\n  NGrid,\n  NGi,\n  NTag,\n  NRadioGroup,\n  NRadioButton,\n  useThemeVars,\n} from 'naive-ui';\n\nimport { Recording } from '@/api/archive';\n\nimport debug from '@/debug';\n\nconst props = defineProps({\n  location: {\n    type: String,\n    default: '',\n  },\n  signal: {\n    type: String,\n    default: '',\n  },\n  year: {\n    type: String,\n    default: '',\n  },\n});\n\nconst router = useRouter();\nconst loading = ref(false);\nconst dates = ref([]);\nconst signals = ref([]);\nconst query = reactive({\n  location: props.location,\n  signal: props.signal,\n  year: props.year,\n});\n\nconst theme = useThemeVars();\n\n// computed\nconst years = computed(() => {\n  return dates.value\n    .map((date) => date.year)\n    .filter((year) => (query.year ? year === query.year : true))\n    .reverse();\n});\n\nconst locationOptions = computed(() => {\n  const options = [\n    {\n      value: 'HEL',\n      label: 'Heligoland',\n    },\n    {\n      value: 'SPI',\n      label: 'Spitzbergen',\n    },\n    {\n      value: 'BRE',\n      label: 'Bremerhaven',\n    },\n  ];\n  return options;\n});\nconst signalOptions = computed(() => {\n  const options = signals.value.map((s) => {\n    return {\n      label: s.name,\n      value: s.value,\n    };\n  });\n  return options;\n});\n\nconst yearOptions = computed(() => {\n  const y = dates.value.map((date) => date.year).reverse();\n  const options = y.map((year) => {\n    return {\n      label: year,\n      value: year.toString(),\n    };\n  });\n  options.unshift({\n    label: 'All',\n    value: null,\n  });\n  return options;\n});\n\n// methods\nconst updateRoute = () => {\n  router.push({ query });\n};\n\nconst changeYear = async (value) => {\n  query.year = value;\n  updateRoute();\n};\n\nconst changeLocation = async (value) => {\n  query.location = value;\n  query.year = null;\n  updateRoute();\n};\n\nconst changeSignal = async (value) => {\n  query.signal = value;\n  query.year = null;\n  updateRoute();\n};\n\nasync function fetch() {\n  loading.value = true;\n  signals.value = await Recording.signals({ location: query.location });\n  if (debug) {\n    console.log('fetch data for:', query.location, query.signal);\n  }\n  dates.value = await Recording.dates({\n    location: query.location,\n    signal: query.signal,\n  });\n  loading.value = false;\n}\n\nonMounted(async () => {\n  fetch();\n});\n\nwatch(\n  () => props.location,\n  async () => {\n    if (debug) {\n      console.log('location changed to:', props.location);\n    }\n    await fetch();\n  }\n);\n\nwatch(\n  () => props.signal,\n  async () => {\n    if (debug) {\n      console.log('signal changed to:', props.signal);\n    }\n    await fetch();\n  }\n);\n\nconst getMonthsForYear = (year) => {\n  return (dates.value.find((date) => date.year === year) || {}).months || null;\n};\n\nconst getMonth = (year, month) => {\n  const months = getMonthsForYear(year);\n  if (months !== null) {\n    return months.find((m) => m.month === month + 1);\n  }\n  return null;\n};\nconst getMonthName = (month) => {\n  return Info.months()[Number(month)];\n};\n\nconst noDataStyle = computed(() => {\n  return {\n    background: theme.value.modalColor,\n  };\n});\n</script>\n\n<style lang=\"scss\" scoped>\n.year {\n  &__title {\n    font-weight: bold;\n  }\n  margin-top: 30px;\n  margin-bottom: 30px;\n\n  .spectrogram {\n    width: 100%;\n  }\n  .nodata {\n    width: 100%;\n    height: 100%;\n  }\n}\n.banner {\n  font-size: 20pt;\n  padding-top: 100px;\n}\n</style>\n","import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, defineComponent } from 'vue'\nconst _hoisted_1 = {\n  xmlns: 'http://www.w3.org/2000/svg',\n  'xmlns:xlink': 'http://www.w3.org/1999/xlink',\n  viewBox: '0 0 20 20'\n}\nconst _hoisted_2 = /*#__PURE__*/ _createElementVNode(\n  'g',\n  {\n    fill: 'none'\n  },\n  [\n    /*#__PURE__*/ _createElementVNode('path', {\n      d: 'M10 2.5a.5.5 0 0 0-1 0V9H2.5a.5.5 0 0 0 0 1H9v6.5a.5.5 0 0 0 1 0V10h6.5a.5.5 0 0 0 0-1H10V2.5z',\n      fill: 'currentColor'\n    })\n  ],\n  -1\n  /* HOISTED */\n)\nconst _hoisted_3 = [_hoisted_2]\nexport default defineComponent({\n  name: 'Add20Regular',\n  render: function render(_ctx, _cache) {\n    return _openBlock(), _createElementBlock('svg', _hoisted_1, _hoisted_3)\n  }\n})\n","import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, defineComponent } from 'vue'\nconst _hoisted_1 = {\n  xmlns: 'http://www.w3.org/2000/svg',\n  'xmlns:xlink': 'http://www.w3.org/1999/xlink',\n  viewBox: '0 0 20 20'\n}\nconst _hoisted_2 = /*#__PURE__*/ _createElementVNode(\n  'g',\n  {\n    fill: 'none'\n  },\n  [\n    /*#__PURE__*/ _createElementVNode('path', {\n      d: 'M15.5 17a.5.5 0 0 1 .09.992L15.5 18h-11a.5.5 0 0 1-.09-.992L4.5 17h11zM10 2.002a.5.5 0 0 1 .492.41l.008.09l-.004 11.794l3.645-3.648a.5.5 0 0 1 .638-.059l.07.058a.5.5 0 0 1 .058.638l-.058.07l-4.492 4.5a.497.497 0 0 1-.255.136l-.106.01a.499.499 0 0 1-.395-.195l-4.457-4.451a.5.5 0 0 1 .637-.766l.07.058l3.645 3.641L9.5 2.502a.5.5 0 0 1 .5-.5z',\n      fill: 'currentColor'\n    })\n  ],\n  -1\n  /* HOISTED */\n)\nconst _hoisted_3 = [_hoisted_2]\nexport default defineComponent({\n  name: 'ArrowDownload20Regular',\n  render: function render(_ctx, _cache) {\n    return _openBlock(), _createElementBlock('svg', _hoisted_1, _hoisted_3)\n  }\n})\n","import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, defineComponent } from 'vue'\nconst _hoisted_1 = {\n  xmlns: 'http://www.w3.org/2000/svg',\n  'xmlns:xlink': 'http://www.w3.org/1999/xlink',\n  viewBox: '0 0 12 12'\n}\nconst _hoisted_2 = /*#__PURE__*/ _createElementVNode(\n  'g',\n  {\n    fill: 'none'\n  },\n  [\n    /*#__PURE__*/ _createElementVNode('path', {\n      d: 'M10.5 6a.5.5 0 0 0-.5-.5H3.207l2.647-2.646a.5.5 0 1 0-.708-.708l-3.5 3.5a.5.5 0 0 0 0 .708l3.5 3.5a.5.5 0 0 0 .708-.708L3.207 6.5H10a.5.5 0 0 0 .5-.5z',\n      fill: 'currentColor'\n    })\n  ],\n  -1\n  /* HOISTED */\n)\nconst _hoisted_3 = [_hoisted_2]\nexport default defineComponent({\n  name: 'ArrowLeft12Regular',\n  render: function render(_ctx, _cache) {\n    return _openBlock(), _createElementBlock('svg', _hoisted_1, _hoisted_3)\n  }\n})\n","import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, defineComponent } from 'vue'\nconst _hoisted_1 = {\n  xmlns: 'http://www.w3.org/2000/svg',\n  'xmlns:xlink': 'http://www.w3.org/1999/xlink',\n  viewBox: '0 0 20 20'\n}\nconst _hoisted_2 = /*#__PURE__*/ _createElementVNode(\n  'g',\n  {\n    fill: 'none'\n  },\n  [\n    /*#__PURE__*/ _createElementVNode('path', {\n      d: 'M13.5 5a.5.5 0 0 1 .492.41L14 5.5v9a.5.5 0 0 1-.992.09L13 14.5v-9a.5.5 0 0 1 .5-.5zm-7.854.146a.5.5 0 0 1 .638-.057l.07.057l4.5 4.5a.5.5 0 0 1 .057.638l-.057.07l-4.5 4.5a.5.5 0 0 1-.765-.638l.057-.07L9.793 10L5.646 5.854a.5.5 0 0 1 0-.708z',\n      fill: 'currentColor'\n    })\n  ],\n  -1\n  /* HOISTED */\n)\nconst _hoisted_3 = [_hoisted_2]\nexport default defineComponent({\n  name: 'ArrowNext20Regular',\n  render: function render(_ctx, _cache) {\n    return _openBlock(), _createElementBlock('svg', _hoisted_1, _hoisted_3)\n  }\n})\n","import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, defineComponent } from 'vue'\nconst _hoisted_1 = {\n  xmlns: 'http://www.w3.org/2000/svg',\n  'xmlns:xlink': 'http://www.w3.org/1999/xlink',\n  viewBox: '0 0 20 20'\n}\nconst _hoisted_2 = /*#__PURE__*/ _createElementVNode(\n  'g',\n  {\n    fill: 'none'\n  },\n  [\n    /*#__PURE__*/ _createElementVNode('path', {\n      d: 'M6 5a.5.5 0 0 0-.492.41L5.5 5.5v9a.5.5 0 0 0 .992.09l.008-.09v-9A.5.5 0 0 0 6 5zm7.854.146a.5.5 0 0 0-.638-.057l-.07.057l-4.5 4.5a.5.5 0 0 0-.057.638l.057.07l4.5 4.5a.5.5 0 0 0 .765-.638l-.057-.07L9.707 10l4.147-4.146a.5.5 0 0 0 0-.708z',\n      fill: 'currentColor'\n    })\n  ],\n  -1\n  /* HOISTED */\n)\nconst _hoisted_3 = [_hoisted_2]\nexport default defineComponent({\n  name: 'ArrowPrevious20Regular',\n  render: function render(_ctx, _cache) {\n    return _openBlock(), _createElementBlock('svg', _hoisted_1, _hoisted_3)\n  }\n})\n","import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, defineComponent } from 'vue'\nconst _hoisted_1 = {\n  xmlns: 'http://www.w3.org/2000/svg',\n  'xmlns:xlink': 'http://www.w3.org/1999/xlink',\n  viewBox: '0 0 20 20'\n}\nconst _hoisted_2 = /*#__PURE__*/ _createElementVNode(\n  'g',\n  {\n    fill: 'none'\n  },\n  [\n    /*#__PURE__*/ _createElementVNode('path', {\n      d: 'M10.48 13.842h4.92c.896 0 1.6-.713 1.6-1.566v-6.71C17 4.713 16.296 4 15.4 4H4.6C3.704 4 3 4.713 3 5.566v6.71c0 .853.704 1.566 1.6 1.566h1.6V17h.003l.002-.001l4.276-3.157zM6.8 17.803a1.009 1.009 0 0 1-1.4-.199a.978.978 0 0 1-.199-.59v-2.172h-.6c-1.436 0-2.6-1.149-2.6-2.566v-6.71C2 4.149 3.164 3 4.6 3h10.8C16.836 3 18 4.149 18 5.566v6.71c0 1.418-1.164 2.566-2.6 2.566h-4.59l-4.011 2.961z',\n      fill: 'currentColor'\n    })\n  ],\n  -1\n  /* HOISTED */\n)\nconst _hoisted_3 = [_hoisted_2]\nexport default defineComponent({\n  name: 'Comment20Regular',\n  render: function render(_ctx, _cache) {\n    return _openBlock(), _createElementBlock('svg', _hoisted_1, _hoisted_3)\n  }\n})\n","import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, defineComponent } from 'vue'\nconst _hoisted_1 = {\n  xmlns: 'http://www.w3.org/2000/svg',\n  'xmlns:xlink': 'http://www.w3.org/1999/xlink',\n  viewBox: '0 0 16 16'\n}\nconst _hoisted_2 = /*#__PURE__*/ _createElementVNode(\n  'g',\n  {\n    fill: 'none'\n  },\n  [\n    /*#__PURE__*/ _createElementVNode('path', {\n      d: 'M6.5 7v4a.5.5 0 0 0 1 0V7a.5.5 0 0 0-1 0zM9 6.5a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-1 0V7a.5.5 0 0 1 .5-.5zM10 4h3a.5.5 0 0 1 0 1h-.553l-.752 6.776A2.5 2.5 0 0 1 9.21 14H6.79a2.5 2.5 0 0 1-2.485-2.224L3.552 5H3a.5.5 0 0 1 0-1h3a2 2 0 1 1 4 0zM8 3a1 1 0 0 0-1 1h2a1 1 0 0 0-1-1zM4.559 5l.74 6.666A1.5 1.5 0 0 0 6.79 13h2.42a1.5 1.5 0 0 0 1.49-1.334L11.442 5H4.56z',\n      fill: 'currentColor'\n    })\n  ],\n  -1\n  /* HOISTED */\n)\nconst _hoisted_3 = [_hoisted_2]\nexport default defineComponent({\n  name: 'Delete16Regular',\n  render: function render(_ctx, _cache) {\n    return _openBlock(), _createElementBlock('svg', _hoisted_1, _hoisted_3)\n  }\n})\n","import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, defineComponent } from 'vue'\nconst _hoisted_1 = {\n  xmlns: 'http://www.w3.org/2000/svg',\n  'xmlns:xlink': 'http://www.w3.org/1999/xlink',\n  viewBox: '0 0 16 16'\n}\nconst _hoisted_2 = /*#__PURE__*/ _createElementVNode(\n  'g',\n  {\n    fill: 'none'\n  },\n  [\n    /*#__PURE__*/ _createElementVNode('path', {\n      d: 'M2.984 8.625v.003a.5.5 0 0 1-.612.355c-.431-.114-.355-.611-.355-.611l.018-.062s.026-.084.047-.145a6.7 6.7 0 0 1 1.117-1.982C4.096 5.089 5.605 4 8 4s3.904 1.089 4.802 2.183a6.7 6.7 0 0 1 1.117 1.982a4.077 4.077 0 0 1 .06.187l.003.013v.004l.001.002a.5.5 0 0 1-.966.258l-.001-.004l-.008-.025a4.872 4.872 0 0 0-.2-.52a5.696 5.696 0 0 0-.78-1.263C11.286 5.912 10.044 5 8 5c-2.044 0-3.285.912-4.028 1.817a5.7 5.7 0 0 0-.945 1.674a3.018 3.018 0 0 0-.035.109l-.008.025zM8 7a2.5 2.5 0 1 0 0 5a2.5 2.5 0 0 0 0-5zM6.5 9.5a1.5 1.5 0 1 1 3 0a1.5 1.5 0 0 1-3 0z',\n      fill: 'currentColor'\n    })\n  ],\n  -1\n  /* HOISTED */\n)\nconst _hoisted_3 = [_hoisted_2]\nexport default defineComponent({\n  name: 'Eye16Regular',\n  render: function render(_ctx, _cache) {\n    return _openBlock(), _createElementBlock('svg', _hoisted_1, _hoisted_3)\n  }\n})\n","import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, defineComponent } from 'vue'\nconst _hoisted_1 = {\n  xmlns: 'http://www.w3.org/2000/svg',\n  'xmlns:xlink': 'http://www.w3.org/1999/xlink',\n  viewBox: '0 0 16 16'\n}\nconst _hoisted_2 = /*#__PURE__*/ _createElementVNode(\n  'g',\n  {\n    fill: 'none'\n  },\n  [\n    /*#__PURE__*/ _createElementVNode('path', {\n      d: 'M10.12 10.827l4.026 4.027a.5.5 0 0 0 .708-.708l-13-13a.5.5 0 1 0-.708.708l3.23 3.23A5.987 5.987 0 0 0 3.2 6.182a6.7 6.7 0 0 0-1.117 1.982c-.021.061-.047.145-.047.145l-.018.062s-.076.497.355.611a.5.5 0 0 0 .611-.355l.001-.003l.008-.025l.035-.109a5.7 5.7 0 0 1 .945-1.674a4.94 4.94 0 0 1 1.124-1.014l1.578 1.578a2.5 2.5 0 1 0 3.446 3.446zm-.74-.74A1.5 1.5 0 1 1 7.413 8.12l1.969 1.968zM6.32 4.2l.854.854C7.434 5.019 7.709 5 8 5c2.044 0 3.286.912 4.028 1.817a5.695 5.695 0 0 1 .945 1.674c.017.048.028.085.035.109l.008.025v.003l.001.001a.5.5 0 0 0 .966-.257v-.003l-.001-.004l-.004-.013a2.3 2.3 0 0 0-.06-.187a6.7 6.7 0 0 0-1.117-1.982C11.905 5.088 10.396 4 8.002 4c-.618 0-1.177.072-1.681.199z',\n      fill: 'currentColor'\n    })\n  ],\n  -1\n  /* HOISTED */\n)\nconst _hoisted_3 = [_hoisted_2]\nexport default defineComponent({\n  name: 'EyeOff16Regular',\n  render: function render(_ctx, _cache) {\n    return _openBlock(), _createElementBlock('svg', _hoisted_1, _hoisted_3)\n  }\n})\n","import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, defineComponent } from 'vue'\nconst _hoisted_1 = {\n  xmlns: 'http://www.w3.org/2000/svg',\n  'xmlns:xlink': 'http://www.w3.org/1999/xlink',\n  viewBox: '0 0 20 20'\n}\nconst _hoisted_2 = /*#__PURE__*/ _createElementVNode(\n  'g',\n  {\n    fill: 'none'\n  },\n  [\n    /*#__PURE__*/ _createElementVNode('path', {\n      d: 'M14 7.5a1.5 1.5 0 1 1-3 0a1.5 1.5 0 0 1 3 0zm-1 0a.5.5 0 1 0-1 0a.5.5 0 0 0 1 0zM3 6a3 3 0 0 1 3-3h8a3 3 0 0 1 3 3v8a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3V6zm3-2a2 2 0 0 0-2 2v8c0 .373.102.722.28 1.02l4.669-4.588a1.5 1.5 0 0 1 2.102 0l4.67 4.588A1.99 1.99 0 0 0 16 14V6a2 2 0 0 0-2-2H6zm0 12h8c.37 0 .715-.1 1.012-.274l-4.662-4.58a.5.5 0 0 0-.7 0l-4.662 4.58A1.99 1.99 0 0 0 6 16z',\n      fill: 'currentColor'\n    })\n  ],\n  -1\n  /* HOISTED */\n)\nconst _hoisted_3 = [_hoisted_2]\nexport default defineComponent({\n  name: 'Image20Regular',\n  render: function render(_ctx, _cache) {\n    return _openBlock(), _createElementBlock('svg', _hoisted_1, _hoisted_3)\n  }\n})\n","import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, defineComponent } from 'vue'\nconst _hoisted_1 = {\n  xmlns: 'http://www.w3.org/2000/svg',\n  'xmlns:xlink': 'http://www.w3.org/1999/xlink',\n  viewBox: '0 0 20 20'\n}\nconst _hoisted_2 = /*#__PURE__*/ _createElementVNode(\n  'g',\n  {\n    fill: 'none'\n  },\n  [\n    /*#__PURE__*/ _createElementVNode('path', {\n      d: 'M4.5 2A1.5 1.5 0 0 0 3 3.5v13A1.5 1.5 0 0 0 4.5 18h2A1.5 1.5 0 0 0 8 16.5v-13A1.5 1.5 0 0 0 6.5 2h-2zm0 1h2a.5.5 0 0 1 .5.5v13a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1-.5-.5v-13a.5.5 0 0 1 .5-.5zm9-1A1.5 1.5 0 0 0 12 3.5v13a1.5 1.5 0 0 0 1.5 1.5h2a1.5 1.5 0 0 0 1.5-1.5v-13A1.5 1.5 0 0 0 15.5 2h-2zm0 1h2a.5.5 0 0 1 .5.5v13a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1-.5-.5v-13a.5.5 0 0 1 .5-.5z',\n      fill: 'currentColor'\n    })\n  ],\n  -1\n  /* HOISTED */\n)\nconst _hoisted_3 = [_hoisted_2]\nexport default defineComponent({\n  name: 'Pause20Regular',\n  render: function render(_ctx, _cache) {\n    return _openBlock(), _createElementBlock('svg', _hoisted_1, _hoisted_3)\n  }\n})\n","import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, defineComponent } from 'vue'\nconst _hoisted_1 = {\n  xmlns: 'http://www.w3.org/2000/svg',\n  'xmlns:xlink': 'http://www.w3.org/1999/xlink',\n  viewBox: '0 0 20 20'\n}\nconst _hoisted_2 = /*#__PURE__*/ _createElementVNode(\n  'g',\n  {\n    fill: 'none'\n  },\n  [\n    /*#__PURE__*/ _createElementVNode('path', {\n      d: 'M17.22 8.687a1.498 1.498 0 0 1 0 2.626l-9.997 5.499A1.5 1.5 0 0 1 5 15.499V4.501a1.5 1.5 0 0 1 2.223-1.313l9.997 5.499zm-.482 1.75a.5.5 0 0 0 0-.875L6.741 4.063A.5.5 0 0 0 6 4.501v10.998a.5.5 0 0 0 .741.438l9.997-5.5z',\n      fill: 'currentColor'\n    })\n  ],\n  -1\n  /* HOISTED */\n)\nconst _hoisted_3 = [_hoisted_2]\nexport default defineComponent({\n  name: 'Play20Regular',\n  render: function render(_ctx, _cache) {\n    return _openBlock(), _createElementBlock('svg', _hoisted_1, _hoisted_3)\n  }\n})\n","import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, defineComponent } from 'vue'\nconst _hoisted_1 = {\n  xmlns: 'http://www.w3.org/2000/svg',\n  'xmlns:xlink': 'http://www.w3.org/1999/xlink',\n  viewBox: '0 0 16 16'\n}\nconst _hoisted_2 = /*#__PURE__*/ _createElementVNode(\n  'g',\n  {\n    fill: 'none'\n  },\n  [\n    /*#__PURE__*/ _createElementVNode('path', {\n      d: 'M7.456 2a6 6 0 1 1-5.406 8.605a.5.5 0 0 1 .36-.71c1.276-.231 3.278-.937 4.078-3.07c.563-1.5.512-3.015.283-4.23a.5.5 0 0 1 .475-.591C7.316 2 7.386 2 7.456 2z',\n      fill: 'currentColor'\n    })\n  ],\n  -1\n  /* HOISTED */\n)\nconst _hoisted_3 = [_hoisted_2]\nexport default defineComponent({\n  name: 'WeatherMoon16Filled',\n  render: function render(_ctx, _cache) {\n    return _openBlock(), _createElementBlock('svg', _hoisted_1, _hoisted_3)\n  }\n})\n","import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, defineComponent } from 'vue'\nconst _hoisted_1 = {\n  xmlns: 'http://www.w3.org/2000/svg',\n  'xmlns:xlink': 'http://www.w3.org/1999/xlink',\n  viewBox: '0 0 16 16'\n}\nconst _hoisted_2 = /*#__PURE__*/ _createElementVNode(\n  'g',\n  {\n    fill: 'none'\n  },\n  [\n    /*#__PURE__*/ _createElementVNode('path', {\n      d: 'M8 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-1 0v-1A.5.5 0 0 1 8 1zm0 10a3 3 0 1 0 0-6a3 3 0 0 0 0 6zm0-1a2 2 0 1 1 0-4a2 2 0 0 1 0 4zm6.5-1.5a.5.5 0 0 0 0-1h-1a.5.5 0 0 0 0 1h1zM8 13a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-1 0v-1A.5.5 0 0 1 8 13zM2.5 8.5a.5.5 0 0 0 0-1h-1a.5.5 0 0 0 0 1h1zm.646-5.354a.5.5 0 0 1 .708 0l1 1a.5.5 0 1 1-.708.708l-1-1a.5.5 0 0 1 0-.708zm.708 9.708a.5.5 0 1 1-.708-.707l1-1a.5.5 0 0 1 .708.707l-1 1zm9-9.708a.5.5 0 0 0-.708 0l-1 1a.5.5 0 0 0 .708.708l1-1a.5.5 0 0 0 0-.708zm-.708 9.708a.5.5 0 0 0 .708-.707l-1-1a.5.5 0 0 0-.708.707l1 1z',\n      fill: 'currentColor'\n    })\n  ],\n  -1\n  /* HOISTED */\n)\nconst _hoisted_3 = [_hoisted_2]\nexport default defineComponent({\n  name: 'WeatherSunny16Regular',\n  render: function render(_ctx, _cache) {\n    return _openBlock(), _createElementBlock('svg', _hoisted_1, _hoisted_3)\n  }\n})\n","import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, defineComponent } from 'vue'\nconst _hoisted_1 = {\n  xmlns: 'http://www.w3.org/2000/svg',\n  'xmlns:xlink': 'http://www.w3.org/1999/xlink',\n  viewBox: '0 0 20 20'\n}\nconst _hoisted_2 = /*#__PURE__*/ _createElementVNode(\n  'g',\n  {\n    fill: 'none'\n  },\n  [\n    /*#__PURE__*/ _createElementVNode('path', {\n      d: 'M11.5 8.5A.5.5 0 0 0 11 8H9V6a.5.5 0 0 0-1 0v2H6a.5.5 0 0 0 0 1h2v2a.5.5 0 0 0 1 0V9h2a.5.5 0 0 0 .5-.5zM8.5 3a5.5 5.5 0 0 1 4.227 9.02l4.127 4.126a.5.5 0 0 1-.638.765l-.07-.057l-4.126-4.127A5.5 5.5 0 1 1 8.5 3zm0 1a4.5 4.5 0 1 0 0 9a4.5 4.5 0 0 0 0-9z',\n      fill: 'currentColor'\n    })\n  ],\n  -1\n  /* HOISTED */\n)\nconst _hoisted_3 = [_hoisted_2]\nexport default defineComponent({\n  name: 'ZoomIn20Regular',\n  render: function render(_ctx, _cache) {\n    return _openBlock(), _createElementBlock('svg', _hoisted_1, _hoisted_3)\n  }\n})\n","import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, defineComponent } from 'vue'\nconst _hoisted_1 = {\n  xmlns: 'http://www.w3.org/2000/svg',\n  'xmlns:xlink': 'http://www.w3.org/1999/xlink',\n  viewBox: '0 0 20 20'\n}\nconst _hoisted_2 = /*#__PURE__*/ _createElementVNode(\n  'g',\n  {\n    fill: 'none'\n  },\n  [\n    /*#__PURE__*/ _createElementVNode('path', {\n      d: 'M11 8a.5.5 0 0 1 0 1H6a.5.5 0 0 1 0-1h5zm3 .5a5.5 5.5 0 1 0-1.98 4.227l4.126 4.127l.07.057a.5.5 0 0 0 .638-.765l-4.127-4.126A5.478 5.478 0 0 0 14 8.5zm-10 0a4.5 4.5 0 1 1 9 0a4.5 4.5 0 0 1-9 0z',\n      fill: 'currentColor'\n    })\n  ],\n  -1\n  /* HOISTED */\n)\nconst _hoisted_3 = [_hoisted_2]\nexport default defineComponent({\n  name: 'ZoomOut20Regular',\n  render: function render(_ctx, _cache) {\n    return _openBlock(), _createElementBlock('svg', _hoisted_1, _hoisted_3)\n  }\n})\n","<template>\n  <div id=\"loading\">\n    <div v-show=\"loading\" class=\"v-spinner\">\n      <div\n        v-for=\"index in 10\"\n        :key=\"index\"\n        :style=\"[spinnerStyle]\"\n        class=\"v-scale\"\n      />\n    </div>\n  </div>\n</template>\n\n<script>\nimport { defineComponent } from 'vue';\n\nexport default defineComponent({\n  name: 'Loading',\n\n  props: {\n    loading: {\n      type: Boolean,\n      default: true,\n    },\n    color: {\n      type: String,\n      default: 'rgb(187, 255, 187)',\n    },\n    height: {\n      type: String,\n      default: '20px',\n    },\n    width: {\n      type: String,\n      default: '2px',\n    },\n    margin: {\n      type: String,\n      default: '2px',\n    },\n    radius: {\n      type: String,\n      default: '2px',\n    },\n  },\n  setup(props) {\n    return {\n      spinnerStyle: {\n        backgroundColor: props.color,\n        height: props.height,\n        width: props.width,\n        margin: props.margin,\n        borderRadius: props.radius,\n        display: 'inline-block',\n        animationFillMode: 'both',\n      },\n    };\n  },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@import '../style/_variables.scss';\n@import '../style/_mixins.scss';\n\n#loading {\n  z-index: 5000;\n  position: absolute;\n  top: 50%;\n  left: 50%;\n  transform: translate(-50%, -50%);\n}\n\n.v-spinner {\n  text-align: center;\n}\n\n.v-scale {\n  @include keyframes(scaleStretchDelay) {\n    0% {\n      animation-name: inherit;\n      animation-duration: inherit;\n      animation-iteration-count: inherit;\n      animation-direction: inherit;\n    }\n    50% {\n      transform: scaleY(0.4);\n      transform: scaleY(0.4);\n    }\n    100% {\n      transform: scaleY(1);\n      transform: scaleY(1);\n    }\n  }\n  @include animate(\n    scaleStretchDelay,\n    1s,\n    cubic-bezier(0.1, 2, 0.7, 2),\n    infinite\n  );\n  @include delay(animation, 100, 0.005s);\n}\n</style>\n","<template>\n  <div v-if=\"recording\" class=\"wrapper\" :style=\"itemStyle\" @click=\"onClick\">\n    <router-link\n      :to=\"{\n        name: 'play',\n        query: {\n          uuid: recording.uuid,\n          signal: signal,\n        },\n      }\"\n    >\n      <div class=\"item\"></div>\n      <div\n        v-if=\"props.hasAnnotation && mouseOverGrid\"\n        style=\"\n          display: inline-block;\n          color: white;\n          position: relative;\n          border: 1px solid transparent;\n          top: -20px;\n          left: -25px;\n        \"\n      >\n        >\n      </div>\n    </router-link>\n  </div>\n  <div v-else class=\"item\"></div>\n</template>\n\n<script setup>\nimport { computed } from 'vue';\n\nimport { useStore } from 'vuex';\n\nimport { useThemeVars } from 'naive-ui';\n\nconst theme = useThemeVars();\n\nconst props = defineProps({\n  item: {\n    type: Object,\n    default: () => ({}),\n  },\n  hasAnnotation: Boolean,\n  signal: {\n    type: String,\n    default: '',\n  },\n});\n\nconst store = useStore();\n\nconst recording = computed(() => {\n  return props.item.recording;\n});\n\nconst mouseOverGrid = computed(() => {\n  return store.getters['monthview/mouseover'];\n});\n\nconst itemStyle = computed(() => {\n  const col = theme.value.primaryColor;\n  const cursor = store.getters['monthview/cursor'];\n  if (\n    cursor !== null &&\n    props.item.day === cursor.day &&\n    props.item.hour === cursor.hour\n  ) {\n    return {\n      border: `1px solid ${col}`,\n    };\n  }\n  return {};\n});\n\nfunction onClick() {\n  store.commit('monthview/cursor', props.item);\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.item {\n  max-width: 100%;\n  height: 100%;\n}\n.wrapper:hover {\n  border: 1px solid rgb(187, 255, 187);\n}\n</style>\n","<template>\n  <Loading v-if=\"isLoading\" />\n  <div v-else>\n    <n-space justify=\"center\">\n      <n-input-group>\n        <n-tag :bordered=\"false\" round>\n          &nbsp;\n          <router-link\n            v-slot=\"{ navigate }\"\n            :to=\"{\n              name: 'year',\n              query: {\n                location: query.location,\n                signal: query.signal,\n              },\n            }\"\n            custom\n          >\n            <n-button\n              size=\"small\"\n              icon-placement=\"right\"\n              text\n              @click=\"navigate\"\n            >\n              {{ displayLocation }}\n              <template #icon>\n                <n-icon :component=\"ArrowLeft12Regular\" />\n              </template>\n            </n-button>\n          </router-link>\n        </n-tag>\n        <n-select\n          :value=\"signal\"\n          :options=\"signalOptions\"\n          filterable\n          size=\"small\"\n          :consistent-menu-width=\"false\"\n          @update:value=\"changeSignal\"\n        />\n        <n-select\n          :value=\"month\"\n          :options=\"monthOptions\"\n          filterable\n          size=\"small\"\n          :consistent-menu-width=\"false\"\n          @update:value=\"changeMonth\"\n        />\n        <n-select\n          :value=\"year\"\n          :options=\"yearOptions\"\n          filterable\n          size=\"small\"\n          :consistent-menu-width=\"false\"\n          @update:value=\"changeYear\"\n        />\n        <n-tag :bordered=\"false\" round>&nbsp;&nbsp;</n-tag>\n      </n-input-group>\n      <div\n        v-if=\"dates\"\n        :style=\"spectrogramStyle\"\n        class=\"spectrogram\"\n        @mouseenter=\"onMouseOver(true)\"\n        @mouseleave=\"onMouseOver(false)\"\n      >\n        <div :style=\"cellStyle\">dd\\hh</div>\n        <div\n          v-for=\"h in [...Array(24).keys()]\"\n          :key=\"h\"\n          :style=\"cellStyle\"\n          class=\"hour\"\n        >\n          {{ hourDisplay(h) }}\n        </div>\n        <div class=\"days\" :style=\"{ 'grid-row-end': daysInMonth + 2 }\">\n          <template v-for=\"d in [...Array(daysInMonth).keys()]\" :key=\"d\">\n            <router-link\n              v-slot=\"{ href }\"\n              :to=\"{\n                name: 'day',\n                query: {\n                  location: query.location,\n                  signal: query.signal,\n                  year: query.year,\n                  month: query.month,\n                  day: d + 1,\n                },\n              }\"\n              custom\n            >\n              <a :style=\"cellStyle\" :href=\"href\">\n                {{ dayDisplay(d) }}\n              </a>\n            </router-link>\n          </template>\n        </div>\n        <MonthItemView\n          v-for=\"(item, index) in datesMap\"\n          :key=\"index\"\n          :item=\"item\"\n          :signal=\"query.signal\"\n          :has-annotation=\"hasAnnotation(item)\"\n          :style=\"cellStyle\"\n          :mouse-over-grid=\"mouseOverGrid\"\n        />\n      </div>\n      <div v-else>No data available.</div>\n    </n-space>\n  </div>\n</template>\n\n<script setup>\nimport { computed, onMounted, onUnmounted, ref, reactive, watch } from 'vue';\n\nimport { useRouter } from 'vue-router';\nimport { DateTime, Info } from 'luxon';\n\nimport { useStore } from 'vuex';\n\nimport {\n  NSpace,\n  NIcon,\n  NInputGroup,\n  NButton,\n  NTag,\n  NSelect,\n  useThemeVars,\n} from 'naive-ui';\n\nimport { Recording } from '@/api/archive';\n\nimport { ArrowLeft12Regular } from '@vicons/fluent';\n\nimport Loading from '@/views/Loading.vue';\nimport MonthItemView from '@/views/MonthItemView.vue';\n\nimport debug from '@/debug';\n\nconst props = defineProps({\n  year: {\n    type: Number,\n    default: null,\n  },\n  month: {\n    type: Number,\n    default: null,\n  },\n  location: {\n    type: String,\n    default: null,\n  },\n  signal: {\n    type: String,\n    default: null,\n  },\n});\n\nconst router = useRouter();\nconst theme = useThemeVars();\nconst store = useStore();\n\nconst loading = ref(false);\nconst dates = ref([]);\nconst datesMap = ref(null);\nconst signals = ref([]);\nconst spectrogram = ref({});\nconst recordings = ref([]);\nconst annotations = ref([]);\nconst query = reactive({\n  location: props.location,\n  signal: props.signal,\n  year: props.year,\n  month: props.month,\n});\n\nconst width = ref(null);\n\nconst mouseOverGrid = ref(false);\n\nconst daysInMonth = computed(\n  () =>\n    DateTime.utc(parseInt(query.year, 10), parseInt(query.month, 10), 1)\n      .daysInMonth\n);\n\nasync function fetch() {\n  loading.value = true;\n  // fetch recordings\n  if (debug) {\n    console.log('fetch data with query:', query);\n  }\n  recordings.value = await Recording.filter({\n    year: query.year,\n    month: query.month,\n    location: query.location,\n    signal: query.signal,\n  });\n\n  annotations.value = await Recording.annotation({\n    year: query.year,\n    month: query.month,\n    location: query.location,\n    signal: query.signal,\n  });\n\n  // map recordings to [day][hour] matrix\n  const dateM = [...Array(daysInMonth.value)].map((D, d) =>\n    [...Array(24)].map((H, h) => {\n      return { day: d + 1, hour: h, recording: null };\n    })\n  );\n  recordings.value.forEach((recording) => {\n    const recDate = DateTime.fromISO(recording.date).toUTC();\n    dateM[recDate.day - 1][recDate.hour].recording = recording;\n  });\n  datesMap.value = dateM.flat();\n\n  // fetch spectrogram\n  if (debug) {\n    console.log('fetch spectrogram with query:', query);\n  }\n  spectrogram.value = await Recording.spectrogram({\n    year: query.year,\n    month: query.month,\n    location: query.location,\n    signal: query.signal,\n  });\n  if (debug) {\n    console.log('fetched spectrogram:', spectrogram.value);\n  }\n\n  loading.value = false;\n}\n\nasync function fetchDates() {\n  loading.value = true;\n  if (debug) {\n    console.log('fetch signals');\n  }\n  signals.value = await Recording.signals({\n    location: query.location,\n    year: query.year,\n    month: query.month,\n  });\n  if (debug) {\n    console.log('fetch dates with query:', query);\n  }\n  dates.value = await Recording.dates({\n    location: query.location,\n    signal: query.signal,\n  });\n  loading.value = false;\n}\n\nfunction hasAnnotation(item) {\n  if (item.recording === null) {\n    return false;\n  }\n  const filtered = annotations.value.filter((a) => {\n    return a.uuid === item.recording.uuid;\n  });\n  if (filtered.length > 0) {\n    return true;\n  }\n  return false;\n}\n\nfunction onResize() {\n  width.value = document.documentElement.clientWidth;\n}\n\nconst isLoading = computed(() => loading.value === true);\nconst availableYears = computed(() => dates.value.map((obj) => obj.year));\n\nconst availableMonthsForYear = (year) => {\n  if (dates.value === null) {\n    return null;\n  }\n  const months =\n    (dates.value.find((date) => date.year === Number(year)) || {}).months ||\n    null;\n  if (months !== null) {\n    return months.map((m) => m.month);\n  }\n  return null;\n};\n\nfunction updateRoute() {\n  router.push({ query });\n}\n\nfunction changeSignal(value) {\n  query.signal = value;\n  updateRoute();\n}\n\nfunction changeYear(value) {\n  const year = parseInt(value, 10);\n  const months = availableMonthsForYear(year);\n  query.year = year;\n  [query.month] = months;\n  updateRoute();\n}\n\nfunction changeMonth(value) {\n  query.month = parseInt(value, 10);\n  updateRoute();\n}\n\nwatch(\n  () => props.signal,\n  async () => {\n    if (debug) {\n      console.log('signal changed to:', props.signal);\n    }\n    await fetch();\n  }\n);\n\nwatch(\n  () => props.year,\n  async () => {\n    if (debug) {\n      console.log('year changed to:', props.year);\n    }\n    await fetch();\n  }\n);\n\nwatch(\n  () => props.month,\n  async () => {\n    if (debug) {\n      console.log('month changed to:', props.month);\n    }\n    await fetch();\n  }\n);\n\nonMounted(async () => {\n  if (debug) {\n    console.log('MontView.onMounted');\n  }\n\n  width.value = document.documentElement.clientWidth;\n  window.addEventListener('resize', onResize);\n\n  await fetchDates();\n  await fetch();\n});\n\nonUnmounted(() => {\n  window.removeEventListener('resize', onResize);\n});\n\nconst locationOptions = computed(() => {\n  const options = [\n    {\n      value: 'HEL',\n      label: 'Heligoland',\n    },\n    {\n      value: 'SPI',\n      label: 'Spitzbergen',\n    },\n    {\n      value: 'BRE',\n      label: 'Bremerhaven',\n    },\n  ];\n  return options;\n});\n\nconst displayLocation = computed(() => {\n  const location = locationOptions.value.filter((opt) => {\n    return opt.value === query.location;\n  });\n  return location[0].label;\n});\n\nconst yearOptions = computed(() => {\n  const options = availableYears.value.map((y) => {\n    return {\n      label: y,\n      value: y,\n    };\n  });\n  return options;\n});\n\nconst monthDisplay = (month) => {\n  return Info.months()[Number(month)];\n};\n\nconst signalOptions = computed(() => {\n  if (signals.value) {\n    return signals.value.map((s) => {\n      return {\n        label: s.name,\n        value: s.value,\n      };\n    });\n  }\n  return null;\n});\n\nconst monthOptions = computed(() => {\n  const months = availableMonthsForYear(query.year);\n  if (months == null) {\n    return [];\n  }\n  return months.map((m) => {\n    return {\n      label: monthDisplay(m - 1),\n      value: m,\n    };\n  });\n});\n\nconst dayDisplay = computed(() => {\n  return (day) => {\n    return String(day + 1).padStart(2, '0');\n  };\n});\nconst hourDisplay = computed(() => {\n  return (hour) => {\n    return String(hour).padStart(2, '0');\n  };\n});\nconst cellHeight = computed(() => {\n  return 19 * 0.9;\n});\nconst cellStyle = computed(() => {\n  return {\n    height: `${cellHeight.value}px`,\n    color: theme.value.primaryColor,\n  };\n});\n\nconst spectrogramStyle = computed(() => {\n  const w = (width.value / 30) * 0.9; // fixed tile_size width of month spectrogram\n  const h = cellHeight.value;\n  return {\n    'grid-template-columns': `repeat(25, ${w}px)`,\n    'background-image': `url(\"${spectrogram.value.url}\")`,\n    'background-size': `calc(24 * ${w}px) calc(${daysInMonth.value} * ${h}px)`,\n    'background-position': `${w}px ${h}px`,\n    'background-repeat': 'no-repeat',\n  };\n});\n\nfunction onMouseOver(value) {\n  store.commit('monthview/mouseover', value);\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.spectrogram {\n  margin-top: 30px;\n  display: grid;\n  text-align: center;\n  .days {\n    display: grid;\n    grid-row-start: 2;\n    justify-items: center;\n    align-items: center;\n  }\n}\n</style>\n","<template>\n  <main>\n    <nav class=\"inline\">\n      Zoom&nbsp;\n      <select v-model=\"ui.zoom.selected.value\" @change=\"onZoomSelect\">\n        <option\n          v-for=\"option in ui.zoom.options\"\n          :key=\"option.value\"\n          :value=\"option.value\"\n        >\n          {{ option.label }}\n        </option>\n      </select>\n    </nav>\n    <nav>\n      <div class=\"times\">\n        <router-link\n          v-for=\"(recording, index) in recordings\"\n          :key=\"index\"\n          :to=\"{ query: $route.query, hash: `#${hashForDate(recording.date)}` }\"\n          class=\"times__time\"\n          @click=\"scrollToId(hashForDate(recording.date))\"\n        >\n          {{ timeDisplay(recording.date, 'hh') }}\n        </router-link>\n      </div>\n    </nav>\n    <div class=\"recordings\">\n      <div\n        v-for=\"(recording, index) in recordings\"\n        :id=\"hashForDate(recording.date)\"\n        :key=\"index\"\n        class=\"recordings__item\"\n      >\n        <div>{{ timeDisplay(recording.date, 'long') }}</div>\n        <router-link\n          :to=\"{\n            name: 'play',\n            query: {\n              uuid: recording.uuid,\n            },\n          }\"\n        >\n          <img\n            :src=\"recording.hydro_spectrogram_large\"\n            :style=\"ui.zoom.selected.value\"\n          />\n        </router-link>\n      </div>\n    </div>\n  </main>\n</template>\n\n<script setup>\nimport { reactive, ref, onMounted, nextTick } from 'vue';\nimport { DateTime } from 'luxon';\nimport { useRoute } from 'vue-router';\n\nimport { Recording } from '@/api/archive';\n\nconst props = {\n  location: {\n    type: String,\n  },\n  year: {\n    type: Number,\n  },\n  month: {\n    type: Number,\n  },\n  day: {\n    type: Number,\n  },\n};\n\nconst route = useRoute();\nconst recordings = ref([]);\nconst query = reactive({\n  location: props.location,\n  year: props.year,\n  month: props.month,\n  day: props.day,\n});\n\nconst ui = ref({\n  zoom: {\n    selected: {\n      value: {\n        width: '100vw',\n        height: '60%',\n      },\n      label: 'Stretch window',\n    },\n    options: [\n      {\n        value: {\n          width: 'inherit',\n          height: 'inherit',\n        },\n        label: 'Actual size',\n      },\n      {\n        value: {\n          width: '100vw',\n          height: 'inherit',\n        },\n        label: 'Fit',\n      },\n      {\n        value: {\n          width: '50vw',\n          height: 'inherit',\n        },\n        label: 'Fit 2',\n      },\n      {\n        value: {\n          width: '25vw',\n          height: '60%',\n        },\n        label: 'Stretch 4',\n      },\n      {\n        value: {\n          width: '100vw',\n          height: '60%',\n        },\n        label: 'Stretch window',\n      },\n      {\n        value: {\n          width: '200vw',\n          height: '60%',\n        },\n        label: '2 x window',\n      },\n    ],\n  },\n});\n\nconst dateToISODate = (year, month = 1, day = 1) => {\n  return DateTime.fromObject({\n    year,\n    month,\n    day,\n  }).toISODate();\n};\n\nconst scrollToId = (id) => {\n  const el = document.getElementById(id);\n  if (el !== null) {\n    el.scrollIntoView({ inline: 'start', behavior: 'auto' });\n  } else {\n    console.warn('el not found for id', id);\n  }\n};\n\nonMounted(async () => {\n  const isoDate = dateToISODate(query.year, query.month, query.day);\n  Recording.filter({\n    date: isoDate,\n    location: query.location,\n  }).then(async (response) => {\n    recordings.value = response;\n    await nextTick(() => {\n      if (route.hash) {\n        setTimeout(() => {\n          scrollToId(route.hash.replace('#', ''));\n        }, 500); // hack to wait a bit until images are loaded\n      }\n    });\n  });\n});\n\nconst hashForDate = (date) => {\n  const dt = DateTime.fromISO(date).toUTC();\n  return dt.toLocaleString(DateTime.TIME_24_SIMPLE).replace(':', '');\n};\n\nconst timeDisplay = (date, fmt) => {\n  const dt = DateTime.fromISO(date).toUTC();\n  let f;\n  switch (fmt) {\n    case 'hh':\n      f = DateTime.TIME_24_SIMPLE;\n      break;\n    case 'long':\n      f = DateTime.DATETIME_FULL;\n      break;\n    default:\n      f = DateTime.DATETIME_SHORT;\n  }\n  return dt.toLocaleString(f);\n};\n</script>\n\n<style lang=\"scss\" scoped>\n@import '@/style/_variables.scss';\n\n.recordings {\n  position: relative;\n  overflow-x: scroll;\n  overflow-y: hidden;\n  white-space: nowrap;\n  &__item {\n    display: inline-block;\n    text-align: left;\n    float: none;\n    margin-left: 2px;\n  }\n}\n\nnav {\n  .times {\n    display: grid;\n    grid-template-columns: repeat(24, auto);\n    &__time {\n      padding: 0;\n    }\n  }\n}\n</style>\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports._registerNode = exports.Konva = exports.glob = void 0;\nconst PI_OVER_180 = Math.PI / 180;\nfunction detectBrowser() {\n    return (typeof window !== 'undefined' &&\n        ({}.toString.call(window) === '[object Window]' ||\n            {}.toString.call(window) === '[object global]'));\n}\nexports.glob = typeof global !== 'undefined'\n    ? global\n    : typeof window !== 'undefined'\n        ? window\n        : typeof WorkerGlobalScope !== 'undefined'\n            ? self\n            : {};\nexports.Konva = {\n    _global: exports.glob,\n    version: '9.3.20',\n    isBrowser: detectBrowser(),\n    isUnminified: /param/.test(function (param) { }.toString()),\n    dblClickWindow: 400,\n    getAngle(angle) {\n        return exports.Konva.angleDeg ? angle * PI_OVER_180 : angle;\n    },\n    enableTrace: false,\n    pointerEventsEnabled: true,\n    autoDrawEnabled: true,\n    hitOnDragEnabled: false,\n    capturePointerEventsEnabled: false,\n    _mouseListenClick: false,\n    _touchListenClick: false,\n    _pointerListenClick: false,\n    _mouseInDblClickWindow: false,\n    _touchInDblClickWindow: false,\n    _pointerInDblClickWindow: false,\n    _mouseDblClickPointerId: null,\n    _touchDblClickPointerId: null,\n    _pointerDblClickPointerId: null,\n    _fixTextRendering: false,\n    pixelRatio: (typeof window !== 'undefined' && window.devicePixelRatio) || 1,\n    dragDistance: 3,\n    angleDeg: true,\n    showWarnings: true,\n    dragButtons: [0, 1],\n    isDragging() {\n        return exports.Konva['DD'].isDragging;\n    },\n    isTransforming() {\n        var _a;\n        return (_a = exports.Konva['Transformer']) === null || _a === void 0 ? void 0 : _a.isTransforming();\n    },\n    isDragReady() {\n        return !!exports.Konva['DD'].node;\n    },\n    releaseCanvasOnDestroy: true,\n    document: exports.glob.document,\n    _injectGlobal(Konva) {\n        exports.glob.Konva = Konva;\n    },\n};\nconst _registerNode = (NodeClass) => {\n    exports.Konva[NodeClass.prototype.getClassName()] = NodeClass;\n};\nexports._registerNode = _registerNode;\nexports.Konva._injectGlobal(exports.Konva);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Util = exports.Transform = void 0;\nconst Global_1 = require(\"./Global\");\nclass Transform {\n    constructor(m = [1, 0, 0, 1, 0, 0]) {\n        this.dirty = false;\n        this.m = (m && m.slice()) || [1, 0, 0, 1, 0, 0];\n    }\n    reset() {\n        this.m[0] = 1;\n        this.m[1] = 0;\n        this.m[2] = 0;\n        this.m[3] = 1;\n        this.m[4] = 0;\n        this.m[5] = 0;\n    }\n    copy() {\n        return new Transform(this.m);\n    }\n    copyInto(tr) {\n        tr.m[0] = this.m[0];\n        tr.m[1] = this.m[1];\n        tr.m[2] = this.m[2];\n        tr.m[3] = this.m[3];\n        tr.m[4] = this.m[4];\n        tr.m[5] = this.m[5];\n    }\n    point(point) {\n        const m = this.m;\n        return {\n            x: m[0] * point.x + m[2] * point.y + m[4],\n            y: m[1] * point.x + m[3] * point.y + m[5],\n        };\n    }\n    translate(x, y) {\n        this.m[4] += this.m[0] * x + this.m[2] * y;\n        this.m[5] += this.m[1] * x + this.m[3] * y;\n        return this;\n    }\n    scale(sx, sy) {\n        this.m[0] *= sx;\n        this.m[1] *= sx;\n        this.m[2] *= sy;\n        this.m[3] *= sy;\n        return this;\n    }\n    rotate(rad) {\n        const c = Math.cos(rad);\n        const s = Math.sin(rad);\n        const m11 = this.m[0] * c + this.m[2] * s;\n        const m12 = this.m[1] * c + this.m[3] * s;\n        const m21 = this.m[0] * -s + this.m[2] * c;\n        const m22 = this.m[1] * -s + this.m[3] * c;\n        this.m[0] = m11;\n        this.m[1] = m12;\n        this.m[2] = m21;\n        this.m[3] = m22;\n        return this;\n    }\n    getTranslation() {\n        return {\n            x: this.m[4],\n            y: this.m[5],\n        };\n    }\n    skew(sx, sy) {\n        const m11 = this.m[0] + this.m[2] * sy;\n        const m12 = this.m[1] + this.m[3] * sy;\n        const m21 = this.m[2] + this.m[0] * sx;\n        const m22 = this.m[3] + this.m[1] * sx;\n        this.m[0] = m11;\n        this.m[1] = m12;\n        this.m[2] = m21;\n        this.m[3] = m22;\n        return this;\n    }\n    multiply(matrix) {\n        const m11 = this.m[0] * matrix.m[0] + this.m[2] * matrix.m[1];\n        const m12 = this.m[1] * matrix.m[0] + this.m[3] * matrix.m[1];\n        const m21 = this.m[0] * matrix.m[2] + this.m[2] * matrix.m[3];\n        const m22 = this.m[1] * matrix.m[2] + this.m[3] * matrix.m[3];\n        const dx = this.m[0] * matrix.m[4] + this.m[2] * matrix.m[5] + this.m[4];\n        const dy = this.m[1] * matrix.m[4] + this.m[3] * matrix.m[5] + this.m[5];\n        this.m[0] = m11;\n        this.m[1] = m12;\n        this.m[2] = m21;\n        this.m[3] = m22;\n        this.m[4] = dx;\n        this.m[5] = dy;\n        return this;\n    }\n    invert() {\n        const d = 1 / (this.m[0] * this.m[3] - this.m[1] * this.m[2]);\n        const m0 = this.m[3] * d;\n        const m1 = -this.m[1] * d;\n        const m2 = -this.m[2] * d;\n        const m3 = this.m[0] * d;\n        const m4 = d * (this.m[2] * this.m[5] - this.m[3] * this.m[4]);\n        const m5 = d * (this.m[1] * this.m[4] - this.m[0] * this.m[5]);\n        this.m[0] = m0;\n        this.m[1] = m1;\n        this.m[2] = m2;\n        this.m[3] = m3;\n        this.m[4] = m4;\n        this.m[5] = m5;\n        return this;\n    }\n    getMatrix() {\n        return this.m;\n    }\n    decompose() {\n        const a = this.m[0];\n        const b = this.m[1];\n        const c = this.m[2];\n        const d = this.m[3];\n        const e = this.m[4];\n        const f = this.m[5];\n        const delta = a * d - b * c;\n        const result = {\n            x: e,\n            y: f,\n            rotation: 0,\n            scaleX: 0,\n            scaleY: 0,\n            skewX: 0,\n            skewY: 0,\n        };\n        if (a != 0 || b != 0) {\n            const r = Math.sqrt(a * a + b * b);\n            result.rotation = b > 0 ? Math.acos(a / r) : -Math.acos(a / r);\n            result.scaleX = r;\n            result.scaleY = delta / r;\n            result.skewX = (a * c + b * d) / delta;\n            result.skewY = 0;\n        }\n        else if (c != 0 || d != 0) {\n            const s = Math.sqrt(c * c + d * d);\n            result.rotation =\n                Math.PI / 2 - (d > 0 ? Math.acos(-c / s) : -Math.acos(c / s));\n            result.scaleX = delta / s;\n            result.scaleY = s;\n            result.skewX = 0;\n            result.skewY = (a * c + b * d) / delta;\n        }\n        else {\n        }\n        result.rotation = exports.Util._getRotation(result.rotation);\n        return result;\n    }\n}\nexports.Transform = Transform;\nconst OBJECT_ARRAY = '[object Array]', OBJECT_NUMBER = '[object Number]', OBJECT_STRING = '[object String]', OBJECT_BOOLEAN = '[object Boolean]', PI_OVER_DEG180 = Math.PI / 180, DEG180_OVER_PI = 180 / Math.PI, HASH = '#', EMPTY_STRING = '', ZERO = '0', KONVA_WARNING = 'Konva warning: ', KONVA_ERROR = 'Konva error: ', RGB_PAREN = 'rgb(', COLORS = {\n    aliceblue: [240, 248, 255],\n    antiquewhite: [250, 235, 215],\n    aqua: [0, 255, 255],\n    aquamarine: [127, 255, 212],\n    azure: [240, 255, 255],\n    beige: [245, 245, 220],\n    bisque: [255, 228, 196],\n    black: [0, 0, 0],\n    blanchedalmond: [255, 235, 205],\n    blue: [0, 0, 255],\n    blueviolet: [138, 43, 226],\n    brown: [165, 42, 42],\n    burlywood: [222, 184, 135],\n    cadetblue: [95, 158, 160],\n    chartreuse: [127, 255, 0],\n    chocolate: [210, 105, 30],\n    coral: [255, 127, 80],\n    cornflowerblue: [100, 149, 237],\n    cornsilk: [255, 248, 220],\n    crimson: [220, 20, 60],\n    cyan: [0, 255, 255],\n    darkblue: [0, 0, 139],\n    darkcyan: [0, 139, 139],\n    darkgoldenrod: [184, 132, 11],\n    darkgray: [169, 169, 169],\n    darkgreen: [0, 100, 0],\n    darkgrey: [169, 169, 169],\n    darkkhaki: [189, 183, 107],\n    darkmagenta: [139, 0, 139],\n    darkolivegreen: [85, 107, 47],\n    darkorange: [255, 140, 0],\n    darkorchid: [153, 50, 204],\n    darkred: [139, 0, 0],\n    darksalmon: [233, 150, 122],\n    darkseagreen: [143, 188, 143],\n    darkslateblue: [72, 61, 139],\n    darkslategray: [47, 79, 79],\n    darkslategrey: [47, 79, 79],\n    darkturquoise: [0, 206, 209],\n    darkviolet: [148, 0, 211],\n    deeppink: [255, 20, 147],\n    deepskyblue: [0, 191, 255],\n    dimgray: [105, 105, 105],\n    dimgrey: [105, 105, 105],\n    dodgerblue: [30, 144, 255],\n    firebrick: [178, 34, 34],\n    floralwhite: [255, 255, 240],\n    forestgreen: [34, 139, 34],\n    fuchsia: [255, 0, 255],\n    gainsboro: [220, 220, 220],\n    ghostwhite: [248, 248, 255],\n    gold: [255, 215, 0],\n    goldenrod: [218, 165, 32],\n    gray: [128, 128, 128],\n    green: [0, 128, 0],\n    greenyellow: [173, 255, 47],\n    grey: [128, 128, 128],\n    honeydew: [240, 255, 240],\n    hotpink: [255, 105, 180],\n    indianred: [205, 92, 92],\n    indigo: [75, 0, 130],\n    ivory: [255, 255, 240],\n    khaki: [240, 230, 140],\n    lavender: [230, 230, 250],\n    lavenderblush: [255, 240, 245],\n    lawngreen: [124, 252, 0],\n    lemonchiffon: [255, 250, 205],\n    lightblue: [173, 216, 230],\n    lightcoral: [240, 128, 128],\n    lightcyan: [224, 255, 255],\n    lightgoldenrodyellow: [250, 250, 210],\n    lightgray: [211, 211, 211],\n    lightgreen: [144, 238, 144],\n    lightgrey: [211, 211, 211],\n    lightpink: [255, 182, 193],\n    lightsalmon: [255, 160, 122],\n    lightseagreen: [32, 178, 170],\n    lightskyblue: [135, 206, 250],\n    lightslategray: [119, 136, 153],\n    lightslategrey: [119, 136, 153],\n    lightsteelblue: [176, 196, 222],\n    lightyellow: [255, 255, 224],\n    lime: [0, 255, 0],\n    limegreen: [50, 205, 50],\n    linen: [250, 240, 230],\n    magenta: [255, 0, 255],\n    maroon: [128, 0, 0],\n    mediumaquamarine: [102, 205, 170],\n    mediumblue: [0, 0, 205],\n    mediumorchid: [186, 85, 211],\n    mediumpurple: [147, 112, 219],\n    mediumseagreen: [60, 179, 113],\n    mediumslateblue: [123, 104, 238],\n    mediumspringgreen: [0, 250, 154],\n    mediumturquoise: [72, 209, 204],\n    mediumvioletred: [199, 21, 133],\n    midnightblue: [25, 25, 112],\n    mintcream: [245, 255, 250],\n    mistyrose: [255, 228, 225],\n    moccasin: [255, 228, 181],\n    navajowhite: [255, 222, 173],\n    navy: [0, 0, 128],\n    oldlace: [253, 245, 230],\n    olive: [128, 128, 0],\n    olivedrab: [107, 142, 35],\n    orange: [255, 165, 0],\n    orangered: [255, 69, 0],\n    orchid: [218, 112, 214],\n    palegoldenrod: [238, 232, 170],\n    palegreen: [152, 251, 152],\n    paleturquoise: [175, 238, 238],\n    palevioletred: [219, 112, 147],\n    papayawhip: [255, 239, 213],\n    peachpuff: [255, 218, 185],\n    peru: [205, 133, 63],\n    pink: [255, 192, 203],\n    plum: [221, 160, 203],\n    powderblue: [176, 224, 230],\n    purple: [128, 0, 128],\n    rebeccapurple: [102, 51, 153],\n    red: [255, 0, 0],\n    rosybrown: [188, 143, 143],\n    royalblue: [65, 105, 225],\n    saddlebrown: [139, 69, 19],\n    salmon: [250, 128, 114],\n    sandybrown: [244, 164, 96],\n    seagreen: [46, 139, 87],\n    seashell: [255, 245, 238],\n    sienna: [160, 82, 45],\n    silver: [192, 192, 192],\n    skyblue: [135, 206, 235],\n    slateblue: [106, 90, 205],\n    slategray: [119, 128, 144],\n    slategrey: [119, 128, 144],\n    snow: [255, 255, 250],\n    springgreen: [0, 255, 127],\n    steelblue: [70, 130, 180],\n    tan: [210, 180, 140],\n    teal: [0, 128, 128],\n    thistle: [216, 191, 216],\n    transparent: [255, 255, 255, 0],\n    tomato: [255, 99, 71],\n    turquoise: [64, 224, 208],\n    violet: [238, 130, 238],\n    wheat: [245, 222, 179],\n    white: [255, 255, 255],\n    whitesmoke: [245, 245, 245],\n    yellow: [255, 255, 0],\n    yellowgreen: [154, 205, 5],\n}, RGB_REGEX = /rgb\\((\\d{1,3}),(\\d{1,3}),(\\d{1,3})\\)/;\nlet animQueue = [];\nconst req = (typeof requestAnimationFrame !== 'undefined' && requestAnimationFrame) ||\n    function (f) {\n        setTimeout(f, 60);\n    };\nexports.Util = {\n    _isElement(obj) {\n        return !!(obj && obj.nodeType == 1);\n    },\n    _isFunction(obj) {\n        return !!(obj && obj.constructor && obj.call && obj.apply);\n    },\n    _isPlainObject(obj) {\n        return !!obj && obj.constructor === Object;\n    },\n    _isArray(obj) {\n        return Object.prototype.toString.call(obj) === OBJECT_ARRAY;\n    },\n    _isNumber(obj) {\n        return (Object.prototype.toString.call(obj) === OBJECT_NUMBER &&\n            !isNaN(obj) &&\n            isFinite(obj));\n    },\n    _isString(obj) {\n        return Object.prototype.toString.call(obj) === OBJECT_STRING;\n    },\n    _isBoolean(obj) {\n        return Object.prototype.toString.call(obj) === OBJECT_BOOLEAN;\n    },\n    isObject(val) {\n        return val instanceof Object;\n    },\n    isValidSelector(selector) {\n        if (typeof selector !== 'string') {\n            return false;\n        }\n        const firstChar = selector[0];\n        return (firstChar === '#' ||\n            firstChar === '.' ||\n            firstChar === firstChar.toUpperCase());\n    },\n    _sign(number) {\n        if (number === 0) {\n            return 1;\n        }\n        if (number > 0) {\n            return 1;\n        }\n        else {\n            return -1;\n        }\n    },\n    requestAnimFrame(callback) {\n        animQueue.push(callback);\n        if (animQueue.length === 1) {\n            req(function () {\n                const queue = animQueue;\n                animQueue = [];\n                queue.forEach(function (cb) {\n                    cb();\n                });\n            });\n        }\n    },\n    createCanvasElement() {\n        const canvas = document.createElement('canvas');\n        try {\n            canvas.style = canvas.style || {};\n        }\n        catch (e) { }\n        return canvas;\n    },\n    createImageElement() {\n        return document.createElement('img');\n    },\n    _isInDocument(el) {\n        while ((el = el.parentNode)) {\n            if (el == document) {\n                return true;\n            }\n        }\n        return false;\n    },\n    _urlToImage(url, callback) {\n        const imageObj = exports.Util.createImageElement();\n        imageObj.onload = function () {\n            callback(imageObj);\n        };\n        imageObj.src = url;\n    },\n    _rgbToHex(r, g, b) {\n        return ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);\n    },\n    _hexToRgb(hex) {\n        hex = hex.replace(HASH, EMPTY_STRING);\n        const bigint = parseInt(hex, 16);\n        return {\n            r: (bigint >> 16) & 255,\n            g: (bigint >> 8) & 255,\n            b: bigint & 255,\n        };\n    },\n    getRandomColor() {\n        let randColor = ((Math.random() * 0xffffff) << 0).toString(16);\n        while (randColor.length < 6) {\n            randColor = ZERO + randColor;\n        }\n        return HASH + randColor;\n    },\n    getRGB(color) {\n        let rgb;\n        if (color in COLORS) {\n            rgb = COLORS[color];\n            return {\n                r: rgb[0],\n                g: rgb[1],\n                b: rgb[2],\n            };\n        }\n        else if (color[0] === HASH) {\n            return this._hexToRgb(color.substring(1));\n        }\n        else if (color.substr(0, 4) === RGB_PAREN) {\n            rgb = RGB_REGEX.exec(color.replace(/ /g, ''));\n            return {\n                r: parseInt(rgb[1], 10),\n                g: parseInt(rgb[2], 10),\n                b: parseInt(rgb[3], 10),\n            };\n        }\n        else {\n            return {\n                r: 0,\n                g: 0,\n                b: 0,\n            };\n        }\n    },\n    colorToRGBA(str) {\n        str = str || 'black';\n        return (exports.Util._namedColorToRBA(str) ||\n            exports.Util._hex3ColorToRGBA(str) ||\n            exports.Util._hex4ColorToRGBA(str) ||\n            exports.Util._hex6ColorToRGBA(str) ||\n            exports.Util._hex8ColorToRGBA(str) ||\n            exports.Util._rgbColorToRGBA(str) ||\n            exports.Util._rgbaColorToRGBA(str) ||\n            exports.Util._hslColorToRGBA(str));\n    },\n    _namedColorToRBA(str) {\n        const c = COLORS[str.toLowerCase()];\n        if (!c) {\n            return null;\n        }\n        return {\n            r: c[0],\n            g: c[1],\n            b: c[2],\n            a: 1,\n        };\n    },\n    _rgbColorToRGBA(str) {\n        if (str.indexOf('rgb(') === 0) {\n            str = str.match(/rgb\\(([^)]+)\\)/)[1];\n            const parts = str.split(/ *, */).map(Number);\n            return {\n                r: parts[0],\n                g: parts[1],\n                b: parts[2],\n                a: 1,\n            };\n        }\n    },\n    _rgbaColorToRGBA(str) {\n        if (str.indexOf('rgba(') === 0) {\n            str = str.match(/rgba\\(([^)]+)\\)/)[1];\n            const parts = str.split(/ *, */).map((n, index) => {\n                if (n.slice(-1) === '%') {\n                    return index === 3 ? parseInt(n) / 100 : (parseInt(n) / 100) * 255;\n                }\n                return Number(n);\n            });\n            return {\n                r: parts[0],\n                g: parts[1],\n                b: parts[2],\n                a: parts[3],\n            };\n        }\n    },\n    _hex8ColorToRGBA(str) {\n        if (str[0] === '#' && str.length === 9) {\n            return {\n                r: parseInt(str.slice(1, 3), 16),\n                g: parseInt(str.slice(3, 5), 16),\n                b: parseInt(str.slice(5, 7), 16),\n                a: parseInt(str.slice(7, 9), 16) / 0xff,\n            };\n        }\n    },\n    _hex6ColorToRGBA(str) {\n        if (str[0] === '#' && str.length === 7) {\n            return {\n                r: parseInt(str.slice(1, 3), 16),\n                g: parseInt(str.slice(3, 5), 16),\n                b: parseInt(str.slice(5, 7), 16),\n                a: 1,\n            };\n        }\n    },\n    _hex4ColorToRGBA(str) {\n        if (str[0] === '#' && str.length === 5) {\n            return {\n                r: parseInt(str[1] + str[1], 16),\n                g: parseInt(str[2] + str[2], 16),\n                b: parseInt(str[3] + str[3], 16),\n                a: parseInt(str[4] + str[4], 16) / 0xff,\n            };\n        }\n    },\n    _hex3ColorToRGBA(str) {\n        if (str[0] === '#' && str.length === 4) {\n            return {\n                r: parseInt(str[1] + str[1], 16),\n                g: parseInt(str[2] + str[2], 16),\n                b: parseInt(str[3] + str[3], 16),\n                a: 1,\n            };\n        }\n    },\n    _hslColorToRGBA(str) {\n        if (/hsl\\((\\d+),\\s*([\\d.]+)%,\\s*([\\d.]+)%\\)/g.test(str)) {\n            const [_, ...hsl] = /hsl\\((\\d+),\\s*([\\d.]+)%,\\s*([\\d.]+)%\\)/g.exec(str);\n            const h = Number(hsl[0]) / 360;\n            const s = Number(hsl[1]) / 100;\n            const l = Number(hsl[2]) / 100;\n            let t2;\n            let t3;\n            let val;\n            if (s === 0) {\n                val = l * 255;\n                return {\n                    r: Math.round(val),\n                    g: Math.round(val),\n                    b: Math.round(val),\n                    a: 1,\n                };\n            }\n            if (l < 0.5) {\n                t2 = l * (1 + s);\n            }\n            else {\n                t2 = l + s - l * s;\n            }\n            const t1 = 2 * l - t2;\n            const rgb = [0, 0, 0];\n            for (let i = 0; i < 3; i++) {\n                t3 = h + (1 / 3) * -(i - 1);\n                if (t3 < 0) {\n                    t3++;\n                }\n                if (t3 > 1) {\n                    t3--;\n                }\n                if (6 * t3 < 1) {\n                    val = t1 + (t2 - t1) * 6 * t3;\n                }\n                else if (2 * t3 < 1) {\n                    val = t2;\n                }\n                else if (3 * t3 < 2) {\n                    val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;\n                }\n                else {\n                    val = t1;\n                }\n                rgb[i] = val * 255;\n            }\n            return {\n                r: Math.round(rgb[0]),\n                g: Math.round(rgb[1]),\n                b: Math.round(rgb[2]),\n                a: 1,\n            };\n        }\n    },\n    haveIntersection(r1, r2) {\n        return !(r2.x > r1.x + r1.width ||\n            r2.x + r2.width < r1.x ||\n            r2.y > r1.y + r1.height ||\n            r2.y + r2.height < r1.y);\n    },\n    cloneObject(obj) {\n        const retObj = {};\n        for (const key in obj) {\n            if (this._isPlainObject(obj[key])) {\n                retObj[key] = this.cloneObject(obj[key]);\n            }\n            else if (this._isArray(obj[key])) {\n                retObj[key] = this.cloneArray(obj[key]);\n            }\n            else {\n                retObj[key] = obj[key];\n            }\n        }\n        return retObj;\n    },\n    cloneArray(arr) {\n        return arr.slice(0);\n    },\n    degToRad(deg) {\n        return deg * PI_OVER_DEG180;\n    },\n    radToDeg(rad) {\n        return rad * DEG180_OVER_PI;\n    },\n    _degToRad(deg) {\n        exports.Util.warn('Util._degToRad is removed. Please use public Util.degToRad instead.');\n        return exports.Util.degToRad(deg);\n    },\n    _radToDeg(rad) {\n        exports.Util.warn('Util._radToDeg is removed. Please use public Util.radToDeg instead.');\n        return exports.Util.radToDeg(rad);\n    },\n    _getRotation(radians) {\n        return Global_1.Konva.angleDeg ? exports.Util.radToDeg(radians) : radians;\n    },\n    _capitalize(str) {\n        return str.charAt(0).toUpperCase() + str.slice(1);\n    },\n    throw(str) {\n        throw new Error(KONVA_ERROR + str);\n    },\n    error(str) {\n        console.error(KONVA_ERROR + str);\n    },\n    warn(str) {\n        if (!Global_1.Konva.showWarnings) {\n            return;\n        }\n        console.warn(KONVA_WARNING + str);\n    },\n    each(obj, func) {\n        for (const key in obj) {\n            func(key, obj[key]);\n        }\n    },\n    _inRange(val, left, right) {\n        return left <= val && val < right;\n    },\n    _getProjectionToSegment(x1, y1, x2, y2, x3, y3) {\n        let x, y, dist;\n        const pd2 = (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2);\n        if (pd2 == 0) {\n            x = x1;\n            y = y1;\n            dist = (x3 - x2) * (x3 - x2) + (y3 - y2) * (y3 - y2);\n        }\n        else {\n            const u = ((x3 - x1) * (x2 - x1) + (y3 - y1) * (y2 - y1)) / pd2;\n            if (u < 0) {\n                x = x1;\n                y = y1;\n                dist = (x1 - x3) * (x1 - x3) + (y1 - y3) * (y1 - y3);\n            }\n            else if (u > 1.0) {\n                x = x2;\n                y = y2;\n                dist = (x2 - x3) * (x2 - x3) + (y2 - y3) * (y2 - y3);\n            }\n            else {\n                x = x1 + u * (x2 - x1);\n                y = y1 + u * (y2 - y1);\n                dist = (x - x3) * (x - x3) + (y - y3) * (y - y3);\n            }\n        }\n        return [x, y, dist];\n    },\n    _getProjectionToLine(pt, line, isClosed) {\n        const pc = exports.Util.cloneObject(pt);\n        let dist = Number.MAX_VALUE;\n        line.forEach(function (p1, i) {\n            if (!isClosed && i === line.length - 1) {\n                return;\n            }\n            const p2 = line[(i + 1) % line.length];\n            const proj = exports.Util._getProjectionToSegment(p1.x, p1.y, p2.x, p2.y, pt.x, pt.y);\n            const px = proj[0], py = proj[1], pdist = proj[2];\n            if (pdist < dist) {\n                pc.x = px;\n                pc.y = py;\n                dist = pdist;\n            }\n        });\n        return pc;\n    },\n    _prepareArrayForTween(startArray, endArray, isClosed) {\n        const start = [], end = [];\n        if (startArray.length > endArray.length) {\n            const temp = endArray;\n            endArray = startArray;\n            startArray = temp;\n        }\n        for (let n = 0; n < startArray.length; n += 2) {\n            start.push({\n                x: startArray[n],\n                y: startArray[n + 1],\n            });\n        }\n        for (let n = 0; n < endArray.length; n += 2) {\n            end.push({\n                x: endArray[n],\n                y: endArray[n + 1],\n            });\n        }\n        const newStart = [];\n        end.forEach(function (point) {\n            const pr = exports.Util._getProjectionToLine(point, start, isClosed);\n            newStart.push(pr.x);\n            newStart.push(pr.y);\n        });\n        return newStart;\n    },\n    _prepareToStringify(obj) {\n        let desc;\n        obj.visitedByCircularReferenceRemoval = true;\n        for (const key in obj) {\n            if (!(obj.hasOwnProperty(key) && obj[key] && typeof obj[key] == 'object')) {\n                continue;\n            }\n            desc = Object.getOwnPropertyDescriptor(obj, key);\n            if (obj[key].visitedByCircularReferenceRemoval ||\n                exports.Util._isElement(obj[key])) {\n                if (desc.configurable) {\n                    delete obj[key];\n                }\n                else {\n                    return null;\n                }\n            }\n            else if (exports.Util._prepareToStringify(obj[key]) === null) {\n                if (desc.configurable) {\n                    delete obj[key];\n                }\n                else {\n                    return null;\n                }\n            }\n        }\n        delete obj.visitedByCircularReferenceRemoval;\n        return obj;\n    },\n    _assign(target, source) {\n        for (const key in source) {\n            target[key] = source[key];\n        }\n        return target;\n    },\n    _getFirstPointerId(evt) {\n        if (!evt.touches) {\n            return evt.pointerId || 999;\n        }\n        else {\n            return evt.changedTouches[0].identifier;\n        }\n    },\n    releaseCanvas(...canvases) {\n        if (!Global_1.Konva.releaseCanvasOnDestroy)\n            return;\n        canvases.forEach((c) => {\n            c.width = 0;\n            c.height = 0;\n        });\n    },\n    drawRoundedRectPath(context, width, height, cornerRadius) {\n        let topLeft = 0;\n        let topRight = 0;\n        let bottomLeft = 0;\n        let bottomRight = 0;\n        if (typeof cornerRadius === 'number') {\n            topLeft =\n                topRight =\n                    bottomLeft =\n                        bottomRight =\n                            Math.min(cornerRadius, width / 2, height / 2);\n        }\n        else {\n            topLeft = Math.min(cornerRadius[0] || 0, width / 2, height / 2);\n            topRight = Math.min(cornerRadius[1] || 0, width / 2, height / 2);\n            bottomRight = Math.min(cornerRadius[2] || 0, width / 2, height / 2);\n            bottomLeft = Math.min(cornerRadius[3] || 0, width / 2, height / 2);\n        }\n        context.moveTo(topLeft, 0);\n        context.lineTo(width - topRight, 0);\n        context.arc(width - topRight, topRight, topRight, (Math.PI * 3) / 2, 0, false);\n        context.lineTo(width, height - bottomRight);\n        context.arc(width - bottomRight, height - bottomRight, bottomRight, 0, Math.PI / 2, false);\n        context.lineTo(bottomLeft, height);\n        context.arc(bottomLeft, height - bottomLeft, bottomLeft, Math.PI / 2, Math.PI, false);\n        context.lineTo(0, topLeft);\n        context.arc(topLeft, topLeft, topLeft, Math.PI, (Math.PI * 3) / 2, false);\n    },\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RGBComponent = RGBComponent;\nexports.alphaComponent = alphaComponent;\nexports.getNumberValidator = getNumberValidator;\nexports.getNumberOrArrayOfNumbersValidator = getNumberOrArrayOfNumbersValidator;\nexports.getNumberOrAutoValidator = getNumberOrAutoValidator;\nexports.getStringValidator = getStringValidator;\nexports.getStringOrGradientValidator = getStringOrGradientValidator;\nexports.getFunctionValidator = getFunctionValidator;\nexports.getNumberArrayValidator = getNumberArrayValidator;\nexports.getBooleanValidator = getBooleanValidator;\nexports.getComponentValidator = getComponentValidator;\nconst Global_1 = require(\"./Global\");\nconst Util_1 = require(\"./Util\");\nfunction _formatValue(val) {\n    if (Util_1.Util._isString(val)) {\n        return '\"' + val + '\"';\n    }\n    if (Object.prototype.toString.call(val) === '[object Number]') {\n        return val;\n    }\n    if (Util_1.Util._isBoolean(val)) {\n        return val;\n    }\n    return Object.prototype.toString.call(val);\n}\nfunction RGBComponent(val) {\n    if (val > 255) {\n        return 255;\n    }\n    else if (val < 0) {\n        return 0;\n    }\n    return Math.round(val);\n}\nfunction alphaComponent(val) {\n    if (val > 1) {\n        return 1;\n    }\n    else if (val < 0.0001) {\n        return 0.0001;\n    }\n    return val;\n}\nfunction getNumberValidator() {\n    if (Global_1.Konva.isUnminified) {\n        return function (val, attr) {\n            if (!Util_1.Util._isNumber(val)) {\n                Util_1.Util.warn(_formatValue(val) +\n                    ' is a not valid value for \"' +\n                    attr +\n                    '\" attribute. The value should be a number.');\n            }\n            return val;\n        };\n    }\n}\nfunction getNumberOrArrayOfNumbersValidator(noOfElements) {\n    if (Global_1.Konva.isUnminified) {\n        return function (val, attr) {\n            let isNumber = Util_1.Util._isNumber(val);\n            let isValidArray = Util_1.Util._isArray(val) && val.length == noOfElements;\n            if (!isNumber && !isValidArray) {\n                Util_1.Util.warn(_formatValue(val) +\n                    ' is a not valid value for \"' +\n                    attr +\n                    '\" attribute. The value should be a number or Array<number>(' +\n                    noOfElements +\n                    ')');\n            }\n            return val;\n        };\n    }\n}\nfunction getNumberOrAutoValidator() {\n    if (Global_1.Konva.isUnminified) {\n        return function (val, attr) {\n            var isNumber = Util_1.Util._isNumber(val);\n            var isAuto = val === 'auto';\n            if (!(isNumber || isAuto)) {\n                Util_1.Util.warn(_formatValue(val) +\n                    ' is a not valid value for \"' +\n                    attr +\n                    '\" attribute. The value should be a number or \"auto\".');\n            }\n            return val;\n        };\n    }\n}\nfunction getStringValidator() {\n    if (Global_1.Konva.isUnminified) {\n        return function (val, attr) {\n            if (!Util_1.Util._isString(val)) {\n                Util_1.Util.warn(_formatValue(val) +\n                    ' is a not valid value for \"' +\n                    attr +\n                    '\" attribute. The value should be a string.');\n            }\n            return val;\n        };\n    }\n}\nfunction getStringOrGradientValidator() {\n    if (Global_1.Konva.isUnminified) {\n        return function (val, attr) {\n            const isString = Util_1.Util._isString(val);\n            const isGradient = Object.prototype.toString.call(val) === '[object CanvasGradient]' ||\n                (val && val['addColorStop']);\n            if (!(isString || isGradient)) {\n                Util_1.Util.warn(_formatValue(val) +\n                    ' is a not valid value for \"' +\n                    attr +\n                    '\" attribute. The value should be a string or a native gradient.');\n            }\n            return val;\n        };\n    }\n}\nfunction getFunctionValidator() {\n    if (Global_1.Konva.isUnminified) {\n        return function (val, attr) {\n            if (!Util_1.Util._isFunction(val)) {\n                Util_1.Util.warn(_formatValue(val) +\n                    ' is a not valid value for \"' +\n                    attr +\n                    '\" attribute. The value should be a function.');\n            }\n            return val;\n        };\n    }\n}\nfunction getNumberArrayValidator() {\n    if (Global_1.Konva.isUnminified) {\n        return function (val, attr) {\n            const TypedArray = Int8Array ? Object.getPrototypeOf(Int8Array) : null;\n            if (TypedArray && val instanceof TypedArray) {\n                return val;\n            }\n            if (!Util_1.Util._isArray(val)) {\n                Util_1.Util.warn(_formatValue(val) +\n                    ' is a not valid value for \"' +\n                    attr +\n                    '\" attribute. The value should be a array of numbers.');\n            }\n            else {\n                val.forEach(function (item) {\n                    if (!Util_1.Util._isNumber(item)) {\n                        Util_1.Util.warn('\"' +\n                            attr +\n                            '\" attribute has non numeric element ' +\n                            item +\n                            '. Make sure that all elements are numbers.');\n                    }\n                });\n            }\n            return val;\n        };\n    }\n}\nfunction getBooleanValidator() {\n    if (Global_1.Konva.isUnminified) {\n        return function (val, attr) {\n            var isBool = val === true || val === false;\n            if (!isBool) {\n                Util_1.Util.warn(_formatValue(val) +\n                    ' is a not valid value for \"' +\n                    attr +\n                    '\" attribute. The value should be a boolean.');\n            }\n            return val;\n        };\n    }\n}\nfunction getComponentValidator(components) {\n    if (Global_1.Konva.isUnminified) {\n        return function (val, attr) {\n            if (val === undefined || val === null) {\n                return val;\n            }\n            if (!Util_1.Util.isObject(val)) {\n                Util_1.Util.warn(_formatValue(val) +\n                    ' is a not valid value for \"' +\n                    attr +\n                    '\" attribute. The value should be an object with properties ' +\n                    components);\n            }\n            return val;\n        };\n    }\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Factory = void 0;\nconst Util_1 = require(\"./Util\");\nconst Validators_1 = require(\"./Validators\");\nconst GET = 'get';\nconst SET = 'set';\nexports.Factory = {\n    addGetterSetter(constructor, attr, def, validator, after) {\n        exports.Factory.addGetter(constructor, attr, def);\n        exports.Factory.addSetter(constructor, attr, validator, after);\n        exports.Factory.addOverloadedGetterSetter(constructor, attr);\n    },\n    addGetter(constructor, attr, def) {\n        var method = GET + Util_1.Util._capitalize(attr);\n        constructor.prototype[method] =\n            constructor.prototype[method] ||\n                function () {\n                    const val = this.attrs[attr];\n                    return val === undefined ? def : val;\n                };\n    },\n    addSetter(constructor, attr, validator, after) {\n        var method = SET + Util_1.Util._capitalize(attr);\n        if (!constructor.prototype[method]) {\n            exports.Factory.overWriteSetter(constructor, attr, validator, after);\n        }\n    },\n    overWriteSetter(constructor, attr, validator, after) {\n        var method = SET + Util_1.Util._capitalize(attr);\n        constructor.prototype[method] = function (val) {\n            if (validator && val !== undefined && val !== null) {\n                val = validator.call(this, val, attr);\n            }\n            this._setAttr(attr, val);\n            if (after) {\n                after.call(this);\n            }\n            return this;\n        };\n    },\n    addComponentsGetterSetter(constructor, attr, components, validator, after) {\n        const len = components.length, capitalize = Util_1.Util._capitalize, getter = GET + capitalize(attr), setter = SET + capitalize(attr);\n        constructor.prototype[getter] = function () {\n            const ret = {};\n            for (let n = 0; n < len; n++) {\n                const component = components[n];\n                ret[component] = this.getAttr(attr + capitalize(component));\n            }\n            return ret;\n        };\n        const basicValidator = (0, Validators_1.getComponentValidator)(components);\n        constructor.prototype[setter] = function (val) {\n            const oldVal = this.attrs[attr];\n            if (validator) {\n                val = validator.call(this, val, attr);\n            }\n            if (basicValidator) {\n                basicValidator.call(this, val, attr);\n            }\n            for (const key in val) {\n                if (!val.hasOwnProperty(key)) {\n                    continue;\n                }\n                this._setAttr(attr + capitalize(key), val[key]);\n            }\n            if (!val) {\n                components.forEach((component) => {\n                    this._setAttr(attr + capitalize(component), undefined);\n                });\n            }\n            this._fireChangeEvent(attr, oldVal, val);\n            if (after) {\n                after.call(this);\n            }\n            return this;\n        };\n        exports.Factory.addOverloadedGetterSetter(constructor, attr);\n    },\n    addOverloadedGetterSetter(constructor, attr) {\n        var capitalizedAttr = Util_1.Util._capitalize(attr), setter = SET + capitalizedAttr, getter = GET + capitalizedAttr;\n        constructor.prototype[attr] = function () {\n            if (arguments.length) {\n                this[setter](arguments[0]);\n                return this;\n            }\n            return this[getter]();\n        };\n    },\n    addDeprecatedGetterSetter(constructor, attr, def, validator) {\n        Util_1.Util.error('Adding deprecated ' + attr);\n        const method = GET + Util_1.Util._capitalize(attr);\n        const message = attr +\n            ' property is deprecated and will be removed soon. Look at Konva change log for more information.';\n        constructor.prototype[method] = function () {\n            Util_1.Util.error(message);\n            const val = this.attrs[attr];\n            return val === undefined ? def : val;\n        };\n        exports.Factory.addSetter(constructor, attr, validator, function () {\n            Util_1.Util.error(message);\n        });\n        exports.Factory.addOverloadedGetterSetter(constructor, attr);\n    },\n    backCompat(constructor, methods) {\n        Util_1.Util.each(methods, function (oldMethodName, newMethodName) {\n            const method = constructor.prototype[newMethodName];\n            const oldGetter = GET + Util_1.Util._capitalize(oldMethodName);\n            const oldSetter = SET + Util_1.Util._capitalize(oldMethodName);\n            function deprecated() {\n                method.apply(this, arguments);\n                Util_1.Util.error('\"' +\n                    oldMethodName +\n                    '\" method is deprecated and will be removed soon. Use \"\"' +\n                    newMethodName +\n                    '\" instead.');\n            }\n            constructor.prototype[oldMethodName] = deprecated;\n            constructor.prototype[oldGetter] = deprecated;\n            constructor.prototype[oldSetter] = deprecated;\n        });\n    },\n    afterSetFilter() {\n        this._filterUpToDate = false;\n    },\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HitContext = exports.SceneContext = exports.Context = void 0;\nconst Util_1 = require(\"./Util\");\nconst Global_1 = require(\"./Global\");\nfunction simplifyArray(arr) {\n    const retArr = [], len = arr.length, util = Util_1.Util;\n    for (let n = 0; n < len; n++) {\n        let val = arr[n];\n        if (util._isNumber(val)) {\n            val = Math.round(val * 1000) / 1000;\n        }\n        else if (!util._isString(val)) {\n            val = val + '';\n        }\n        retArr.push(val);\n    }\n    return retArr;\n}\nconst COMMA = ',', OPEN_PAREN = '(', CLOSE_PAREN = ')', OPEN_PAREN_BRACKET = '([', CLOSE_BRACKET_PAREN = '])', SEMICOLON = ';', DOUBLE_PAREN = '()', EQUALS = '=', CONTEXT_METHODS = [\n    'arc',\n    'arcTo',\n    'beginPath',\n    'bezierCurveTo',\n    'clearRect',\n    'clip',\n    'closePath',\n    'createLinearGradient',\n    'createPattern',\n    'createRadialGradient',\n    'drawImage',\n    'ellipse',\n    'fill',\n    'fillText',\n    'getImageData',\n    'createImageData',\n    'lineTo',\n    'moveTo',\n    'putImageData',\n    'quadraticCurveTo',\n    'rect',\n    'roundRect',\n    'restore',\n    'rotate',\n    'save',\n    'scale',\n    'setLineDash',\n    'setTransform',\n    'stroke',\n    'strokeText',\n    'transform',\n    'translate',\n];\nconst CONTEXT_PROPERTIES = [\n    'fillStyle',\n    'strokeStyle',\n    'shadowColor',\n    'shadowBlur',\n    'shadowOffsetX',\n    'shadowOffsetY',\n    'letterSpacing',\n    'lineCap',\n    'lineDashOffset',\n    'lineJoin',\n    'lineWidth',\n    'miterLimit',\n    'direction',\n    'font',\n    'textAlign',\n    'textBaseline',\n    'globalAlpha',\n    'globalCompositeOperation',\n    'imageSmoothingEnabled',\n];\nconst traceArrMax = 100;\nclass Context {\n    constructor(canvas) {\n        this.canvas = canvas;\n        if (Global_1.Konva.enableTrace) {\n            this.traceArr = [];\n            this._enableTrace();\n        }\n    }\n    fillShape(shape) {\n        if (shape.fillEnabled()) {\n            this._fill(shape);\n        }\n    }\n    _fill(shape) {\n    }\n    strokeShape(shape) {\n        if (shape.hasStroke()) {\n            this._stroke(shape);\n        }\n    }\n    _stroke(shape) {\n    }\n    fillStrokeShape(shape) {\n        if (shape.attrs.fillAfterStrokeEnabled) {\n            this.strokeShape(shape);\n            this.fillShape(shape);\n        }\n        else {\n            this.fillShape(shape);\n            this.strokeShape(shape);\n        }\n    }\n    getTrace(relaxed, rounded) {\n        let traceArr = this.traceArr, len = traceArr.length, str = '', n, trace, method, args;\n        for (n = 0; n < len; n++) {\n            trace = traceArr[n];\n            method = trace.method;\n            if (method) {\n                args = trace.args;\n                str += method;\n                if (relaxed) {\n                    str += DOUBLE_PAREN;\n                }\n                else {\n                    if (Util_1.Util._isArray(args[0])) {\n                        str += OPEN_PAREN_BRACKET + args.join(COMMA) + CLOSE_BRACKET_PAREN;\n                    }\n                    else {\n                        if (rounded) {\n                            args = args.map((a) => typeof a === 'number' ? Math.floor(a) : a);\n                        }\n                        str += OPEN_PAREN + args.join(COMMA) + CLOSE_PAREN;\n                    }\n                }\n            }\n            else {\n                str += trace.property;\n                if (!relaxed) {\n                    str += EQUALS + trace.val;\n                }\n            }\n            str += SEMICOLON;\n        }\n        return str;\n    }\n    clearTrace() {\n        this.traceArr = [];\n    }\n    _trace(str) {\n        let traceArr = this.traceArr, len;\n        traceArr.push(str);\n        len = traceArr.length;\n        if (len >= traceArrMax) {\n            traceArr.shift();\n        }\n    }\n    reset() {\n        const pixelRatio = this.getCanvas().getPixelRatio();\n        this.setTransform(1 * pixelRatio, 0, 0, 1 * pixelRatio, 0, 0);\n    }\n    getCanvas() {\n        return this.canvas;\n    }\n    clear(bounds) {\n        const canvas = this.getCanvas();\n        if (bounds) {\n            this.clearRect(bounds.x || 0, bounds.y || 0, bounds.width || 0, bounds.height || 0);\n        }\n        else {\n            this.clearRect(0, 0, canvas.getWidth() / canvas.pixelRatio, canvas.getHeight() / canvas.pixelRatio);\n        }\n    }\n    _applyLineCap(shape) {\n        const lineCap = shape.attrs.lineCap;\n        if (lineCap) {\n            this.setAttr('lineCap', lineCap);\n        }\n    }\n    _applyOpacity(shape) {\n        const absOpacity = shape.getAbsoluteOpacity();\n        if (absOpacity !== 1) {\n            this.setAttr('globalAlpha', absOpacity);\n        }\n    }\n    _applyLineJoin(shape) {\n        const lineJoin = shape.attrs.lineJoin;\n        if (lineJoin) {\n            this.setAttr('lineJoin', lineJoin);\n        }\n    }\n    setAttr(attr, val) {\n        this._context[attr] = val;\n    }\n    arc(x, y, radius, startAngle, endAngle, counterClockwise) {\n        this._context.arc(x, y, radius, startAngle, endAngle, counterClockwise);\n    }\n    arcTo(x1, y1, x2, y2, radius) {\n        this._context.arcTo(x1, y1, x2, y2, radius);\n    }\n    beginPath() {\n        this._context.beginPath();\n    }\n    bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y) {\n        this._context.bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y);\n    }\n    clearRect(x, y, width, height) {\n        this._context.clearRect(x, y, width, height);\n    }\n    clip(...args) {\n        this._context.clip.apply(this._context, args);\n    }\n    closePath() {\n        this._context.closePath();\n    }\n    createImageData(width, height) {\n        const a = arguments;\n        if (a.length === 2) {\n            return this._context.createImageData(width, height);\n        }\n        else if (a.length === 1) {\n            return this._context.createImageData(width);\n        }\n    }\n    createLinearGradient(x0, y0, x1, y1) {\n        return this._context.createLinearGradient(x0, y0, x1, y1);\n    }\n    createPattern(image, repetition) {\n        return this._context.createPattern(image, repetition);\n    }\n    createRadialGradient(x0, y0, r0, x1, y1, r1) {\n        return this._context.createRadialGradient(x0, y0, r0, x1, y1, r1);\n    }\n    drawImage(image, sx, sy, sWidth, sHeight, dx, dy, dWidth, dHeight) {\n        const a = arguments, _context = this._context;\n        if (a.length === 3) {\n            _context.drawImage(image, sx, sy);\n        }\n        else if (a.length === 5) {\n            _context.drawImage(image, sx, sy, sWidth, sHeight);\n        }\n        else if (a.length === 9) {\n            _context.drawImage(image, sx, sy, sWidth, sHeight, dx, dy, dWidth, dHeight);\n        }\n    }\n    ellipse(x, y, radiusX, radiusY, rotation, startAngle, endAngle, counterclockwise) {\n        this._context.ellipse(x, y, radiusX, radiusY, rotation, startAngle, endAngle, counterclockwise);\n    }\n    isPointInPath(x, y, path, fillRule) {\n        if (path) {\n            return this._context.isPointInPath(path, x, y, fillRule);\n        }\n        return this._context.isPointInPath(x, y, fillRule);\n    }\n    fill(...args) {\n        this._context.fill.apply(this._context, args);\n    }\n    fillRect(x, y, width, height) {\n        this._context.fillRect(x, y, width, height);\n    }\n    strokeRect(x, y, width, height) {\n        this._context.strokeRect(x, y, width, height);\n    }\n    fillText(text, x, y, maxWidth) {\n        if (maxWidth) {\n            this._context.fillText(text, x, y, maxWidth);\n        }\n        else {\n            this._context.fillText(text, x, y);\n        }\n    }\n    measureText(text) {\n        return this._context.measureText(text);\n    }\n    getImageData(sx, sy, sw, sh) {\n        return this._context.getImageData(sx, sy, sw, sh);\n    }\n    lineTo(x, y) {\n        this._context.lineTo(x, y);\n    }\n    moveTo(x, y) {\n        this._context.moveTo(x, y);\n    }\n    rect(x, y, width, height) {\n        this._context.rect(x, y, width, height);\n    }\n    roundRect(x, y, width, height, radii) {\n        this._context.roundRect(x, y, width, height, radii);\n    }\n    putImageData(imageData, dx, dy) {\n        this._context.putImageData(imageData, dx, dy);\n    }\n    quadraticCurveTo(cpx, cpy, x, y) {\n        this._context.quadraticCurveTo(cpx, cpy, x, y);\n    }\n    restore() {\n        this._context.restore();\n    }\n    rotate(angle) {\n        this._context.rotate(angle);\n    }\n    save() {\n        this._context.save();\n    }\n    scale(x, y) {\n        this._context.scale(x, y);\n    }\n    setLineDash(segments) {\n        if (this._context.setLineDash) {\n            this._context.setLineDash(segments);\n        }\n        else if ('mozDash' in this._context) {\n            this._context['mozDash'] = segments;\n        }\n        else if ('webkitLineDash' in this._context) {\n            this._context['webkitLineDash'] = segments;\n        }\n    }\n    getLineDash() {\n        return this._context.getLineDash();\n    }\n    setTransform(a, b, c, d, e, f) {\n        this._context.setTransform(a, b, c, d, e, f);\n    }\n    stroke(path2d) {\n        if (path2d) {\n            this._context.stroke(path2d);\n        }\n        else {\n            this._context.stroke();\n        }\n    }\n    strokeText(text, x, y, maxWidth) {\n        this._context.strokeText(text, x, y, maxWidth);\n    }\n    transform(a, b, c, d, e, f) {\n        this._context.transform(a, b, c, d, e, f);\n    }\n    translate(x, y) {\n        this._context.translate(x, y);\n    }\n    _enableTrace() {\n        let that = this, len = CONTEXT_METHODS.length, origSetter = this.setAttr, n, args;\n        const func = function (methodName) {\n            let origMethod = that[methodName], ret;\n            that[methodName] = function () {\n                args = simplifyArray(Array.prototype.slice.call(arguments, 0));\n                ret = origMethod.apply(that, arguments);\n                that._trace({\n                    method: methodName,\n                    args: args,\n                });\n                return ret;\n            };\n        };\n        for (n = 0; n < len; n++) {\n            func(CONTEXT_METHODS[n]);\n        }\n        that.setAttr = function () {\n            origSetter.apply(that, arguments);\n            const prop = arguments[0];\n            let val = arguments[1];\n            if (prop === 'shadowOffsetX' ||\n                prop === 'shadowOffsetY' ||\n                prop === 'shadowBlur') {\n                val = val / this.canvas.getPixelRatio();\n            }\n            that._trace({\n                property: prop,\n                val: val,\n            });\n        };\n    }\n    _applyGlobalCompositeOperation(node) {\n        const op = node.attrs.globalCompositeOperation;\n        const def = !op || op === 'source-over';\n        if (!def) {\n            this.setAttr('globalCompositeOperation', op);\n        }\n    }\n}\nexports.Context = Context;\nCONTEXT_PROPERTIES.forEach(function (prop) {\n    Object.defineProperty(Context.prototype, prop, {\n        get() {\n            return this._context[prop];\n        },\n        set(val) {\n            this._context[prop] = val;\n        },\n    });\n});\nclass SceneContext extends Context {\n    constructor(canvas, { willReadFrequently = false } = {}) {\n        super(canvas);\n        this._context = canvas._canvas.getContext('2d', {\n            willReadFrequently,\n        });\n    }\n    _fillColor(shape) {\n        const fill = shape.fill();\n        this.setAttr('fillStyle', fill);\n        shape._fillFunc(this);\n    }\n    _fillPattern(shape) {\n        this.setAttr('fillStyle', shape._getFillPattern());\n        shape._fillFunc(this);\n    }\n    _fillLinearGradient(shape) {\n        const grd = shape._getLinearGradient();\n        if (grd) {\n            this.setAttr('fillStyle', grd);\n            shape._fillFunc(this);\n        }\n    }\n    _fillRadialGradient(shape) {\n        const grd = shape._getRadialGradient();\n        if (grd) {\n            this.setAttr('fillStyle', grd);\n            shape._fillFunc(this);\n        }\n    }\n    _fill(shape) {\n        const hasColor = shape.fill(), fillPriority = shape.getFillPriority();\n        if (hasColor && fillPriority === 'color') {\n            this._fillColor(shape);\n            return;\n        }\n        const hasPattern = shape.getFillPatternImage();\n        if (hasPattern && fillPriority === 'pattern') {\n            this._fillPattern(shape);\n            return;\n        }\n        const hasLinearGradient = shape.getFillLinearGradientColorStops();\n        if (hasLinearGradient && fillPriority === 'linear-gradient') {\n            this._fillLinearGradient(shape);\n            return;\n        }\n        const hasRadialGradient = shape.getFillRadialGradientColorStops();\n        if (hasRadialGradient && fillPriority === 'radial-gradient') {\n            this._fillRadialGradient(shape);\n            return;\n        }\n        if (hasColor) {\n            this._fillColor(shape);\n        }\n        else if (hasPattern) {\n            this._fillPattern(shape);\n        }\n        else if (hasLinearGradient) {\n            this._fillLinearGradient(shape);\n        }\n        else if (hasRadialGradient) {\n            this._fillRadialGradient(shape);\n        }\n    }\n    _strokeLinearGradient(shape) {\n        const start = shape.getStrokeLinearGradientStartPoint(), end = shape.getStrokeLinearGradientEndPoint(), colorStops = shape.getStrokeLinearGradientColorStops(), grd = this.createLinearGradient(start.x, start.y, end.x, end.y);\n        if (colorStops) {\n            for (let n = 0; n < colorStops.length; n += 2) {\n                grd.addColorStop(colorStops[n], colorStops[n + 1]);\n            }\n            this.setAttr('strokeStyle', grd);\n        }\n    }\n    _stroke(shape) {\n        const dash = shape.dash(), strokeScaleEnabled = shape.getStrokeScaleEnabled();\n        if (shape.hasStroke()) {\n            if (!strokeScaleEnabled) {\n                this.save();\n                const pixelRatio = this.getCanvas().getPixelRatio();\n                this.setTransform(pixelRatio, 0, 0, pixelRatio, 0, 0);\n            }\n            this._applyLineCap(shape);\n            if (dash && shape.dashEnabled()) {\n                this.setLineDash(dash);\n                this.setAttr('lineDashOffset', shape.dashOffset());\n            }\n            this.setAttr('lineWidth', shape.strokeWidth());\n            if (!shape.getShadowForStrokeEnabled()) {\n                this.setAttr('shadowColor', 'rgba(0,0,0,0)');\n            }\n            const hasLinearGradient = shape.getStrokeLinearGradientColorStops();\n            if (hasLinearGradient) {\n                this._strokeLinearGradient(shape);\n            }\n            else {\n                this.setAttr('strokeStyle', shape.stroke());\n            }\n            shape._strokeFunc(this);\n            if (!strokeScaleEnabled) {\n                this.restore();\n            }\n        }\n    }\n    _applyShadow(shape) {\n        var _a, _b, _c;\n        const color = (_a = shape.getShadowRGBA()) !== null && _a !== void 0 ? _a : 'black', blur = (_b = shape.getShadowBlur()) !== null && _b !== void 0 ? _b : 5, offset = (_c = shape.getShadowOffset()) !== null && _c !== void 0 ? _c : {\n            x: 0,\n            y: 0,\n        }, scale = shape.getAbsoluteScale(), ratio = this.canvas.getPixelRatio(), scaleX = scale.x * ratio, scaleY = scale.y * ratio;\n        this.setAttr('shadowColor', color);\n        this.setAttr('shadowBlur', blur * Math.min(Math.abs(scaleX), Math.abs(scaleY)));\n        this.setAttr('shadowOffsetX', offset.x * scaleX);\n        this.setAttr('shadowOffsetY', offset.y * scaleY);\n    }\n}\nexports.SceneContext = SceneContext;\nclass HitContext extends Context {\n    constructor(canvas) {\n        super(canvas);\n        this._context = canvas._canvas.getContext('2d', {\n            willReadFrequently: true,\n        });\n    }\n    _fill(shape) {\n        this.save();\n        this.setAttr('fillStyle', shape.colorKey);\n        shape._fillFuncHit(this);\n        this.restore();\n    }\n    strokeShape(shape) {\n        if (shape.hasHitStroke()) {\n            this._stroke(shape);\n        }\n    }\n    _stroke(shape) {\n        if (shape.hasHitStroke()) {\n            const strokeScaleEnabled = shape.getStrokeScaleEnabled();\n            if (!strokeScaleEnabled) {\n                this.save();\n                const pixelRatio = this.getCanvas().getPixelRatio();\n                this.setTransform(pixelRatio, 0, 0, pixelRatio, 0, 0);\n            }\n            this._applyLineCap(shape);\n            const hitStrokeWidth = shape.hitStrokeWidth();\n            const strokeWidth = hitStrokeWidth === 'auto' ? shape.strokeWidth() : hitStrokeWidth;\n            this.setAttr('lineWidth', strokeWidth);\n            this.setAttr('strokeStyle', shape.colorKey);\n            shape._strokeFuncHit(this);\n            if (!strokeScaleEnabled) {\n                this.restore();\n            }\n        }\n    }\n}\nexports.HitContext = HitContext;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HitCanvas = exports.SceneCanvas = exports.Canvas = void 0;\nconst Util_1 = require(\"./Util\");\nconst Context_1 = require(\"./Context\");\nconst Global_1 = require(\"./Global\");\nlet _pixelRatio;\nfunction getDevicePixelRatio() {\n    if (_pixelRatio) {\n        return _pixelRatio;\n    }\n    const canvas = Util_1.Util.createCanvasElement();\n    const context = canvas.getContext('2d');\n    _pixelRatio = (function () {\n        const devicePixelRatio = Global_1.Konva._global.devicePixelRatio || 1, backingStoreRatio = context.webkitBackingStorePixelRatio ||\n            context.mozBackingStorePixelRatio ||\n            context.msBackingStorePixelRatio ||\n            context.oBackingStorePixelRatio ||\n            context.backingStorePixelRatio ||\n            1;\n        return devicePixelRatio / backingStoreRatio;\n    })();\n    Util_1.Util.releaseCanvas(canvas);\n    return _pixelRatio;\n}\nclass Canvas {\n    constructor(config) {\n        this.pixelRatio = 1;\n        this.width = 0;\n        this.height = 0;\n        this.isCache = false;\n        const conf = config || {};\n        const pixelRatio = conf.pixelRatio || Global_1.Konva.pixelRatio || getDevicePixelRatio();\n        this.pixelRatio = pixelRatio;\n        this._canvas = Util_1.Util.createCanvasElement();\n        this._canvas.style.padding = '0';\n        this._canvas.style.margin = '0';\n        this._canvas.style.border = '0';\n        this._canvas.style.background = 'transparent';\n        this._canvas.style.position = 'absolute';\n        this._canvas.style.top = '0';\n        this._canvas.style.left = '0';\n    }\n    getContext() {\n        return this.context;\n    }\n    getPixelRatio() {\n        return this.pixelRatio;\n    }\n    setPixelRatio(pixelRatio) {\n        const previousRatio = this.pixelRatio;\n        this.pixelRatio = pixelRatio;\n        this.setSize(this.getWidth() / previousRatio, this.getHeight() / previousRatio);\n    }\n    setWidth(width) {\n        this.width = this._canvas.width = width * this.pixelRatio;\n        this._canvas.style.width = width + 'px';\n        const pixelRatio = this.pixelRatio, _context = this.getContext()._context;\n        _context.scale(pixelRatio, pixelRatio);\n    }\n    setHeight(height) {\n        this.height = this._canvas.height = height * this.pixelRatio;\n        this._canvas.style.height = height + 'px';\n        const pixelRatio = this.pixelRatio, _context = this.getContext()._context;\n        _context.scale(pixelRatio, pixelRatio);\n    }\n    getWidth() {\n        return this.width;\n    }\n    getHeight() {\n        return this.height;\n    }\n    setSize(width, height) {\n        this.setWidth(width || 0);\n        this.setHeight(height || 0);\n    }\n    toDataURL(mimeType, quality) {\n        try {\n            return this._canvas.toDataURL(mimeType, quality);\n        }\n        catch (e) {\n            try {\n                return this._canvas.toDataURL();\n            }\n            catch (err) {\n                Util_1.Util.error('Unable to get data URL. ' +\n                    err.message +\n                    ' For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html.');\n                return '';\n            }\n        }\n    }\n}\nexports.Canvas = Canvas;\nclass SceneCanvas extends Canvas {\n    constructor(config = { width: 0, height: 0, willReadFrequently: false }) {\n        super(config);\n        this.context = new Context_1.SceneContext(this, {\n            willReadFrequently: config.willReadFrequently,\n        });\n        this.setSize(config.width, config.height);\n    }\n}\nexports.SceneCanvas = SceneCanvas;\nclass HitCanvas extends Canvas {\n    constructor(config = { width: 0, height: 0 }) {\n        super(config);\n        this.hitCanvas = true;\n        this.context = new Context_1.HitContext(this);\n        this.setSize(config.width, config.height);\n    }\n}\nexports.HitCanvas = HitCanvas;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DD = void 0;\nconst Global_1 = require(\"./Global\");\nconst Util_1 = require(\"./Util\");\nexports.DD = {\n    get isDragging() {\n        let flag = false;\n        exports.DD._dragElements.forEach((elem) => {\n            if (elem.dragStatus === 'dragging') {\n                flag = true;\n            }\n        });\n        return flag;\n    },\n    justDragged: false,\n    get node() {\n        let node;\n        exports.DD._dragElements.forEach((elem) => {\n            node = elem.node;\n        });\n        return node;\n    },\n    _dragElements: new Map(),\n    _drag(evt) {\n        const nodesToFireEvents = [];\n        exports.DD._dragElements.forEach((elem, key) => {\n            const { node } = elem;\n            const stage = node.getStage();\n            stage.setPointersPositions(evt);\n            if (elem.pointerId === undefined) {\n                elem.pointerId = Util_1.Util._getFirstPointerId(evt);\n            }\n            const pos = stage._changedPointerPositions.find((pos) => pos.id === elem.pointerId);\n            if (!pos) {\n                return;\n            }\n            if (elem.dragStatus !== 'dragging') {\n                const dragDistance = node.dragDistance();\n                const distance = Math.max(Math.abs(pos.x - elem.startPointerPos.x), Math.abs(pos.y - elem.startPointerPos.y));\n                if (distance < dragDistance) {\n                    return;\n                }\n                node.startDrag({ evt });\n                if (!node.isDragging()) {\n                    return;\n                }\n            }\n            node._setDragPosition(evt, elem);\n            nodesToFireEvents.push(node);\n        });\n        nodesToFireEvents.forEach((node) => {\n            node.fire('dragmove', {\n                type: 'dragmove',\n                target: node,\n                evt: evt,\n            }, true);\n        });\n    },\n    _endDragBefore(evt) {\n        const drawNodes = [];\n        exports.DD._dragElements.forEach((elem) => {\n            const { node } = elem;\n            const stage = node.getStage();\n            if (evt) {\n                stage.setPointersPositions(evt);\n            }\n            const pos = stage._changedPointerPositions.find((pos) => pos.id === elem.pointerId);\n            if (!pos) {\n                return;\n            }\n            if (elem.dragStatus === 'dragging' || elem.dragStatus === 'stopped') {\n                exports.DD.justDragged = true;\n                Global_1.Konva._mouseListenClick = false;\n                Global_1.Konva._touchListenClick = false;\n                Global_1.Konva._pointerListenClick = false;\n                elem.dragStatus = 'stopped';\n            }\n            const drawNode = elem.node.getLayer() ||\n                (elem.node instanceof Global_1.Konva['Stage'] && elem.node);\n            if (drawNode && drawNodes.indexOf(drawNode) === -1) {\n                drawNodes.push(drawNode);\n            }\n        });\n        drawNodes.forEach((drawNode) => {\n            drawNode.draw();\n        });\n    },\n    _endDragAfter(evt) {\n        exports.DD._dragElements.forEach((elem, key) => {\n            if (elem.dragStatus === 'stopped') {\n                elem.node.fire('dragend', {\n                    type: 'dragend',\n                    target: elem.node,\n                    evt: evt,\n                }, true);\n            }\n            if (elem.dragStatus !== 'dragging') {\n                exports.DD._dragElements.delete(key);\n            }\n        });\n    },\n};\nif (Global_1.Konva.isBrowser) {\n    window.addEventListener('mouseup', exports.DD._endDragBefore, true);\n    window.addEventListener('touchend', exports.DD._endDragBefore, true);\n    window.addEventListener('touchcancel', exports.DD._endDragBefore, true);\n    window.addEventListener('mousemove', exports.DD._drag);\n    window.addEventListener('touchmove', exports.DD._drag);\n    window.addEventListener('mouseup', exports.DD._endDragAfter, false);\n    window.addEventListener('touchend', exports.DD._endDragAfter, false);\n    window.addEventListener('touchcancel', exports.DD._endDragAfter, false);\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Node = void 0;\nconst Util_1 = require(\"./Util\");\nconst Factory_1 = require(\"./Factory\");\nconst Canvas_1 = require(\"./Canvas\");\nconst Global_1 = require(\"./Global\");\nconst DragAndDrop_1 = require(\"./DragAndDrop\");\nconst Validators_1 = require(\"./Validators\");\nconst ABSOLUTE_OPACITY = 'absoluteOpacity', ALL_LISTENERS = 'allEventListeners', ABSOLUTE_TRANSFORM = 'absoluteTransform', ABSOLUTE_SCALE = 'absoluteScale', CANVAS = 'canvas', CHANGE = 'Change', CHILDREN = 'children', KONVA = 'konva', LISTENING = 'listening', MOUSEENTER = 'mouseenter', MOUSELEAVE = 'mouseleave', NAME = 'name', SET = 'set', SHAPE = 'Shape', SPACE = ' ', STAGE = 'stage', TRANSFORM = 'transform', UPPER_STAGE = 'Stage', VISIBLE = 'visible', TRANSFORM_CHANGE_STR = [\n    'xChange.konva',\n    'yChange.konva',\n    'scaleXChange.konva',\n    'scaleYChange.konva',\n    'skewXChange.konva',\n    'skewYChange.konva',\n    'rotationChange.konva',\n    'offsetXChange.konva',\n    'offsetYChange.konva',\n    'transformsEnabledChange.konva',\n].join(SPACE);\nlet idCounter = 1;\nclass Node {\n    constructor(config) {\n        this._id = idCounter++;\n        this.eventListeners = {};\n        this.attrs = {};\n        this.index = 0;\n        this._allEventListeners = null;\n        this.parent = null;\n        this._cache = new Map();\n        this._attachedDepsListeners = new Map();\n        this._lastPos = null;\n        this._batchingTransformChange = false;\n        this._needClearTransformCache = false;\n        this._filterUpToDate = false;\n        this._isUnderCache = false;\n        this._dragEventId = null;\n        this._shouldFireChangeEvents = false;\n        this.setAttrs(config);\n        this._shouldFireChangeEvents = true;\n    }\n    hasChildren() {\n        return false;\n    }\n    _clearCache(attr) {\n        if ((attr === TRANSFORM || attr === ABSOLUTE_TRANSFORM) &&\n            this._cache.get(attr)) {\n            this._cache.get(attr).dirty = true;\n        }\n        else if (attr) {\n            this._cache.delete(attr);\n        }\n        else {\n            this._cache.clear();\n        }\n    }\n    _getCache(attr, privateGetter) {\n        let cache = this._cache.get(attr);\n        const isTransform = attr === TRANSFORM || attr === ABSOLUTE_TRANSFORM;\n        const invalid = cache === undefined || (isTransform && cache.dirty === true);\n        if (invalid) {\n            cache = privateGetter.call(this);\n            this._cache.set(attr, cache);\n        }\n        return cache;\n    }\n    _calculate(name, deps, getter) {\n        if (!this._attachedDepsListeners.get(name)) {\n            const depsString = deps.map((dep) => dep + 'Change.konva').join(SPACE);\n            this.on(depsString, () => {\n                this._clearCache(name);\n            });\n            this._attachedDepsListeners.set(name, true);\n        }\n        return this._getCache(name, getter);\n    }\n    _getCanvasCache() {\n        return this._cache.get(CANVAS);\n    }\n    _clearSelfAndDescendantCache(attr) {\n        this._clearCache(attr);\n        if (attr === ABSOLUTE_TRANSFORM) {\n            this.fire('absoluteTransformChange');\n        }\n    }\n    clearCache() {\n        if (this._cache.has(CANVAS)) {\n            const { scene, filter, hit } = this._cache.get(CANVAS);\n            Util_1.Util.releaseCanvas(scene, filter, hit);\n            this._cache.delete(CANVAS);\n        }\n        this._clearSelfAndDescendantCache();\n        this._requestDraw();\n        return this;\n    }\n    cache(config) {\n        const conf = config || {};\n        let rect = {};\n        if (conf.x === undefined ||\n            conf.y === undefined ||\n            conf.width === undefined ||\n            conf.height === undefined) {\n            rect = this.getClientRect({\n                skipTransform: true,\n                relativeTo: this.getParent() || undefined,\n            });\n        }\n        let width = Math.ceil(conf.width || rect.width), height = Math.ceil(conf.height || rect.height), pixelRatio = conf.pixelRatio, x = conf.x === undefined ? Math.floor(rect.x) : conf.x, y = conf.y === undefined ? Math.floor(rect.y) : conf.y, offset = conf.offset || 0, drawBorder = conf.drawBorder || false, hitCanvasPixelRatio = conf.hitCanvasPixelRatio || 1;\n        if (!width || !height) {\n            Util_1.Util.error('Can not cache the node. Width or height of the node equals 0. Caching is skipped.');\n            return;\n        }\n        const extraPaddingX = Math.abs(Math.round(rect.x) - x) > 0.5 ? 1 : 0;\n        const extraPaddingY = Math.abs(Math.round(rect.y) - y) > 0.5 ? 1 : 0;\n        width += offset * 2 + extraPaddingX;\n        height += offset * 2 + extraPaddingY;\n        x -= offset;\n        y -= offset;\n        const cachedSceneCanvas = new Canvas_1.SceneCanvas({\n            pixelRatio: pixelRatio,\n            width: width,\n            height: height,\n        }), cachedFilterCanvas = new Canvas_1.SceneCanvas({\n            pixelRatio: pixelRatio,\n            width: 0,\n            height: 0,\n            willReadFrequently: true,\n        }), cachedHitCanvas = new Canvas_1.HitCanvas({\n            pixelRatio: hitCanvasPixelRatio,\n            width: width,\n            height: height,\n        }), sceneContext = cachedSceneCanvas.getContext(), hitContext = cachedHitCanvas.getContext();\n        cachedHitCanvas.isCache = true;\n        cachedSceneCanvas.isCache = true;\n        this._cache.delete(CANVAS);\n        this._filterUpToDate = false;\n        if (conf.imageSmoothingEnabled === false) {\n            cachedSceneCanvas.getContext()._context.imageSmoothingEnabled = false;\n            cachedFilterCanvas.getContext()._context.imageSmoothingEnabled = false;\n        }\n        sceneContext.save();\n        hitContext.save();\n        sceneContext.translate(-x, -y);\n        hitContext.translate(-x, -y);\n        this._isUnderCache = true;\n        this._clearSelfAndDescendantCache(ABSOLUTE_OPACITY);\n        this._clearSelfAndDescendantCache(ABSOLUTE_SCALE);\n        this.drawScene(cachedSceneCanvas, this);\n        this.drawHit(cachedHitCanvas, this);\n        this._isUnderCache = false;\n        sceneContext.restore();\n        hitContext.restore();\n        if (drawBorder) {\n            sceneContext.save();\n            sceneContext.beginPath();\n            sceneContext.rect(0, 0, width, height);\n            sceneContext.closePath();\n            sceneContext.setAttr('strokeStyle', 'red');\n            sceneContext.setAttr('lineWidth', 5);\n            sceneContext.stroke();\n            sceneContext.restore();\n        }\n        this._cache.set(CANVAS, {\n            scene: cachedSceneCanvas,\n            filter: cachedFilterCanvas,\n            hit: cachedHitCanvas,\n            x: x,\n            y: y,\n        });\n        this._requestDraw();\n        return this;\n    }\n    isCached() {\n        return this._cache.has(CANVAS);\n    }\n    getClientRect(config) {\n        throw new Error('abstract \"getClientRect\" method call');\n    }\n    _transformedRect(rect, top) {\n        const points = [\n            { x: rect.x, y: rect.y },\n            { x: rect.x + rect.width, y: rect.y },\n            { x: rect.x + rect.width, y: rect.y + rect.height },\n            { x: rect.x, y: rect.y + rect.height },\n        ];\n        let minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity;\n        const trans = this.getAbsoluteTransform(top);\n        points.forEach(function (point) {\n            const transformed = trans.point(point);\n            if (minX === undefined) {\n                minX = maxX = transformed.x;\n                minY = maxY = transformed.y;\n            }\n            minX = Math.min(minX, transformed.x);\n            minY = Math.min(minY, transformed.y);\n            maxX = Math.max(maxX, transformed.x);\n            maxY = Math.max(maxY, transformed.y);\n        });\n        return {\n            x: minX,\n            y: minY,\n            width: maxX - minX,\n            height: maxY - minY,\n        };\n    }\n    _drawCachedSceneCanvas(context) {\n        context.save();\n        context._applyOpacity(this);\n        context._applyGlobalCompositeOperation(this);\n        const canvasCache = this._getCanvasCache();\n        context.translate(canvasCache.x, canvasCache.y);\n        const cacheCanvas = this._getCachedSceneCanvas();\n        const ratio = cacheCanvas.pixelRatio;\n        context.drawImage(cacheCanvas._canvas, 0, 0, cacheCanvas.width / ratio, cacheCanvas.height / ratio);\n        context.restore();\n    }\n    _drawCachedHitCanvas(context) {\n        const canvasCache = this._getCanvasCache(), hitCanvas = canvasCache.hit;\n        context.save();\n        context.translate(canvasCache.x, canvasCache.y);\n        context.drawImage(hitCanvas._canvas, 0, 0, hitCanvas.width / hitCanvas.pixelRatio, hitCanvas.height / hitCanvas.pixelRatio);\n        context.restore();\n    }\n    _getCachedSceneCanvas() {\n        let filters = this.filters(), cachedCanvas = this._getCanvasCache(), sceneCanvas = cachedCanvas.scene, filterCanvas = cachedCanvas.filter, filterContext = filterCanvas.getContext(), len, imageData, n, filter;\n        if (filters) {\n            if (!this._filterUpToDate) {\n                const ratio = sceneCanvas.pixelRatio;\n                filterCanvas.setSize(sceneCanvas.width / sceneCanvas.pixelRatio, sceneCanvas.height / sceneCanvas.pixelRatio);\n                try {\n                    len = filters.length;\n                    filterContext.clear();\n                    filterContext.drawImage(sceneCanvas._canvas, 0, 0, sceneCanvas.getWidth() / ratio, sceneCanvas.getHeight() / ratio);\n                    imageData = filterContext.getImageData(0, 0, filterCanvas.getWidth(), filterCanvas.getHeight());\n                    for (n = 0; n < len; n++) {\n                        filter = filters[n];\n                        if (typeof filter !== 'function') {\n                            Util_1.Util.error('Filter should be type of function, but got ' +\n                                typeof filter +\n                                ' instead. Please check correct filters');\n                            continue;\n                        }\n                        filter.call(this, imageData);\n                        filterContext.putImageData(imageData, 0, 0);\n                    }\n                }\n                catch (e) {\n                    Util_1.Util.error('Unable to apply filter. ' +\n                        e.message +\n                        ' This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.');\n                }\n                this._filterUpToDate = true;\n            }\n            return filterCanvas;\n        }\n        return sceneCanvas;\n    }\n    on(evtStr, handler) {\n        this._cache && this._cache.delete(ALL_LISTENERS);\n        if (arguments.length === 3) {\n            return this._delegate.apply(this, arguments);\n        }\n        let events = evtStr.split(SPACE), len = events.length, n, event, parts, baseEvent, name;\n        for (n = 0; n < len; n++) {\n            event = events[n];\n            parts = event.split('.');\n            baseEvent = parts[0];\n            name = parts[1] || '';\n            if (!this.eventListeners[baseEvent]) {\n                this.eventListeners[baseEvent] = [];\n            }\n            this.eventListeners[baseEvent].push({\n                name: name,\n                handler: handler,\n            });\n        }\n        return this;\n    }\n    off(evtStr, callback) {\n        let events = (evtStr || '').split(SPACE), len = events.length, n, t, event, parts, baseEvent, name;\n        this._cache && this._cache.delete(ALL_LISTENERS);\n        if (!evtStr) {\n            for (t in this.eventListeners) {\n                this._off(t);\n            }\n        }\n        for (n = 0; n < len; n++) {\n            event = events[n];\n            parts = event.split('.');\n            baseEvent = parts[0];\n            name = parts[1];\n            if (baseEvent) {\n                if (this.eventListeners[baseEvent]) {\n                    this._off(baseEvent, name, callback);\n                }\n            }\n            else {\n                for (t in this.eventListeners) {\n                    this._off(t, name, callback);\n                }\n            }\n        }\n        return this;\n    }\n    dispatchEvent(evt) {\n        const e = {\n            target: this,\n            type: evt.type,\n            evt: evt,\n        };\n        this.fire(evt.type, e);\n        return this;\n    }\n    addEventListener(type, handler) {\n        this.on(type, function (evt) {\n            handler.call(this, evt.evt);\n        });\n        return this;\n    }\n    removeEventListener(type) {\n        this.off(type);\n        return this;\n    }\n    _delegate(event, selector, handler) {\n        const stopNode = this;\n        this.on(event, function (evt) {\n            const targets = evt.target.findAncestors(selector, true, stopNode);\n            for (let i = 0; i < targets.length; i++) {\n                evt = Util_1.Util.cloneObject(evt);\n                evt.currentTarget = targets[i];\n                handler.call(targets[i], evt);\n            }\n        });\n    }\n    remove() {\n        if (this.isDragging()) {\n            this.stopDrag();\n        }\n        DragAndDrop_1.DD._dragElements.delete(this._id);\n        this._remove();\n        return this;\n    }\n    _clearCaches() {\n        this._clearSelfAndDescendantCache(ABSOLUTE_TRANSFORM);\n        this._clearSelfAndDescendantCache(ABSOLUTE_OPACITY);\n        this._clearSelfAndDescendantCache(ABSOLUTE_SCALE);\n        this._clearSelfAndDescendantCache(STAGE);\n        this._clearSelfAndDescendantCache(VISIBLE);\n        this._clearSelfAndDescendantCache(LISTENING);\n    }\n    _remove() {\n        this._clearCaches();\n        const parent = this.getParent();\n        if (parent && parent.children) {\n            parent.children.splice(this.index, 1);\n            parent._setChildrenIndices();\n            this.parent = null;\n        }\n    }\n    destroy() {\n        this.remove();\n        this.clearCache();\n        return this;\n    }\n    getAttr(attr) {\n        const method = 'get' + Util_1.Util._capitalize(attr);\n        if (Util_1.Util._isFunction(this[method])) {\n            return this[method]();\n        }\n        return this.attrs[attr];\n    }\n    getAncestors() {\n        let parent = this.getParent(), ancestors = [];\n        while (parent) {\n            ancestors.push(parent);\n            parent = parent.getParent();\n        }\n        return ancestors;\n    }\n    getAttrs() {\n        return (this.attrs || {});\n    }\n    setAttrs(config) {\n        this._batchTransformChanges(() => {\n            let key, method;\n            if (!config) {\n                return this;\n            }\n            for (key in config) {\n                if (key === CHILDREN) {\n                    continue;\n                }\n                method = SET + Util_1.Util._capitalize(key);\n                if (Util_1.Util._isFunction(this[method])) {\n                    this[method](config[key]);\n                }\n                else {\n                    this._setAttr(key, config[key]);\n                }\n            }\n        });\n        return this;\n    }\n    isListening() {\n        return this._getCache(LISTENING, this._isListening);\n    }\n    _isListening(relativeTo) {\n        const listening = this.listening();\n        if (!listening) {\n            return false;\n        }\n        const parent = this.getParent();\n        if (parent && parent !== relativeTo && this !== relativeTo) {\n            return parent._isListening(relativeTo);\n        }\n        else {\n            return true;\n        }\n    }\n    isVisible() {\n        return this._getCache(VISIBLE, this._isVisible);\n    }\n    _isVisible(relativeTo) {\n        const visible = this.visible();\n        if (!visible) {\n            return false;\n        }\n        const parent = this.getParent();\n        if (parent && parent !== relativeTo && this !== relativeTo) {\n            return parent._isVisible(relativeTo);\n        }\n        else {\n            return true;\n        }\n    }\n    shouldDrawHit(top, skipDragCheck = false) {\n        if (top) {\n            return this._isVisible(top) && this._isListening(top);\n        }\n        const layer = this.getLayer();\n        let layerUnderDrag = false;\n        DragAndDrop_1.DD._dragElements.forEach((elem) => {\n            if (elem.dragStatus !== 'dragging') {\n                return;\n            }\n            else if (elem.node.nodeType === 'Stage') {\n                layerUnderDrag = true;\n            }\n            else if (elem.node.getLayer() === layer) {\n                layerUnderDrag = true;\n            }\n        });\n        const dragSkip = !skipDragCheck &&\n            !Global_1.Konva.hitOnDragEnabled &&\n            (layerUnderDrag || Global_1.Konva.isTransforming());\n        return this.isListening() && this.isVisible() && !dragSkip;\n    }\n    show() {\n        this.visible(true);\n        return this;\n    }\n    hide() {\n        this.visible(false);\n        return this;\n    }\n    getZIndex() {\n        return this.index || 0;\n    }\n    getAbsoluteZIndex() {\n        let depth = this.getDepth(), that = this, index = 0, nodes, len, n, child;\n        function addChildren(children) {\n            nodes = [];\n            len = children.length;\n            for (n = 0; n < len; n++) {\n                child = children[n];\n                index++;\n                if (child.nodeType !== SHAPE) {\n                    nodes = nodes.concat(child.getChildren().slice());\n                }\n                if (child._id === that._id) {\n                    n = len;\n                }\n            }\n            if (nodes.length > 0 && nodes[0].getDepth() <= depth) {\n                addChildren(nodes);\n            }\n        }\n        const stage = this.getStage();\n        if (that.nodeType !== UPPER_STAGE && stage) {\n            addChildren(stage.getChildren());\n        }\n        return index;\n    }\n    getDepth() {\n        let depth = 0, parent = this.parent;\n        while (parent) {\n            depth++;\n            parent = parent.parent;\n        }\n        return depth;\n    }\n    _batchTransformChanges(func) {\n        this._batchingTransformChange = true;\n        func();\n        this._batchingTransformChange = false;\n        if (this._needClearTransformCache) {\n            this._clearCache(TRANSFORM);\n            this._clearSelfAndDescendantCache(ABSOLUTE_TRANSFORM);\n        }\n        this._needClearTransformCache = false;\n    }\n    setPosition(pos) {\n        this._batchTransformChanges(() => {\n            this.x(pos.x);\n            this.y(pos.y);\n        });\n        return this;\n    }\n    getPosition() {\n        return {\n            x: this.x(),\n            y: this.y(),\n        };\n    }\n    getRelativePointerPosition() {\n        const stage = this.getStage();\n        if (!stage) {\n            return null;\n        }\n        const pos = stage.getPointerPosition();\n        if (!pos) {\n            return null;\n        }\n        const transform = this.getAbsoluteTransform().copy();\n        transform.invert();\n        return transform.point(pos);\n    }\n    getAbsolutePosition(top) {\n        let haveCachedParent = false;\n        let parent = this.parent;\n        while (parent) {\n            if (parent.isCached()) {\n                haveCachedParent = true;\n                break;\n            }\n            parent = parent.parent;\n        }\n        if (haveCachedParent && !top) {\n            top = true;\n        }\n        const absoluteMatrix = this.getAbsoluteTransform(top).getMatrix(), absoluteTransform = new Util_1.Transform(), offset = this.offset();\n        absoluteTransform.m = absoluteMatrix.slice();\n        absoluteTransform.translate(offset.x, offset.y);\n        return absoluteTransform.getTranslation();\n    }\n    setAbsolutePosition(pos) {\n        const { x, y, ...origTrans } = this._clearTransform();\n        this.attrs.x = x;\n        this.attrs.y = y;\n        this._clearCache(TRANSFORM);\n        const it = this._getAbsoluteTransform().copy();\n        it.invert();\n        it.translate(pos.x, pos.y);\n        pos = {\n            x: this.attrs.x + it.getTranslation().x,\n            y: this.attrs.y + it.getTranslation().y,\n        };\n        this._setTransform(origTrans);\n        this.setPosition({ x: pos.x, y: pos.y });\n        this._clearCache(TRANSFORM);\n        this._clearSelfAndDescendantCache(ABSOLUTE_TRANSFORM);\n        return this;\n    }\n    _setTransform(trans) {\n        let key;\n        for (key in trans) {\n            this.attrs[key] = trans[key];\n        }\n    }\n    _clearTransform() {\n        const trans = {\n            x: this.x(),\n            y: this.y(),\n            rotation: this.rotation(),\n            scaleX: this.scaleX(),\n            scaleY: this.scaleY(),\n            offsetX: this.offsetX(),\n            offsetY: this.offsetY(),\n            skewX: this.skewX(),\n            skewY: this.skewY(),\n        };\n        this.attrs.x = 0;\n        this.attrs.y = 0;\n        this.attrs.rotation = 0;\n        this.attrs.scaleX = 1;\n        this.attrs.scaleY = 1;\n        this.attrs.offsetX = 0;\n        this.attrs.offsetY = 0;\n        this.attrs.skewX = 0;\n        this.attrs.skewY = 0;\n        return trans;\n    }\n    move(change) {\n        let changeX = change.x, changeY = change.y, x = this.x(), y = this.y();\n        if (changeX !== undefined) {\n            x += changeX;\n        }\n        if (changeY !== undefined) {\n            y += changeY;\n        }\n        this.setPosition({ x: x, y: y });\n        return this;\n    }\n    _eachAncestorReverse(func, top) {\n        let family = [], parent = this.getParent(), len, n;\n        if (top && top._id === this._id) {\n            return;\n        }\n        family.unshift(this);\n        while (parent && (!top || parent._id !== top._id)) {\n            family.unshift(parent);\n            parent = parent.parent;\n        }\n        len = family.length;\n        for (n = 0; n < len; n++) {\n            func(family[n]);\n        }\n    }\n    rotate(theta) {\n        this.rotation(this.rotation() + theta);\n        return this;\n    }\n    moveToTop() {\n        if (!this.parent) {\n            Util_1.Util.warn('Node has no parent. moveToTop function is ignored.');\n            return false;\n        }\n        const index = this.index, len = this.parent.getChildren().length;\n        if (index < len - 1) {\n            this.parent.children.splice(index, 1);\n            this.parent.children.push(this);\n            this.parent._setChildrenIndices();\n            return true;\n        }\n        return false;\n    }\n    moveUp() {\n        if (!this.parent) {\n            Util_1.Util.warn('Node has no parent. moveUp function is ignored.');\n            return false;\n        }\n        const index = this.index, len = this.parent.getChildren().length;\n        if (index < len - 1) {\n            this.parent.children.splice(index, 1);\n            this.parent.children.splice(index + 1, 0, this);\n            this.parent._setChildrenIndices();\n            return true;\n        }\n        return false;\n    }\n    moveDown() {\n        if (!this.parent) {\n            Util_1.Util.warn('Node has no parent. moveDown function is ignored.');\n            return false;\n        }\n        const index = this.index;\n        if (index > 0) {\n            this.parent.children.splice(index, 1);\n            this.parent.children.splice(index - 1, 0, this);\n            this.parent._setChildrenIndices();\n            return true;\n        }\n        return false;\n    }\n    moveToBottom() {\n        if (!this.parent) {\n            Util_1.Util.warn('Node has no parent. moveToBottom function is ignored.');\n            return false;\n        }\n        const index = this.index;\n        if (index > 0) {\n            this.parent.children.splice(index, 1);\n            this.parent.children.unshift(this);\n            this.parent._setChildrenIndices();\n            return true;\n        }\n        return false;\n    }\n    setZIndex(zIndex) {\n        if (!this.parent) {\n            Util_1.Util.warn('Node has no parent. zIndex parameter is ignored.');\n            return this;\n        }\n        if (zIndex < 0 || zIndex >= this.parent.children.length) {\n            Util_1.Util.warn('Unexpected value ' +\n                zIndex +\n                ' for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to ' +\n                (this.parent.children.length - 1) +\n                '.');\n        }\n        const index = this.index;\n        this.parent.children.splice(index, 1);\n        this.parent.children.splice(zIndex, 0, this);\n        this.parent._setChildrenIndices();\n        return this;\n    }\n    getAbsoluteOpacity() {\n        return this._getCache(ABSOLUTE_OPACITY, this._getAbsoluteOpacity);\n    }\n    _getAbsoluteOpacity() {\n        let absOpacity = this.opacity();\n        const parent = this.getParent();\n        if (parent && !parent._isUnderCache) {\n            absOpacity *= parent.getAbsoluteOpacity();\n        }\n        return absOpacity;\n    }\n    moveTo(newContainer) {\n        if (this.getParent() !== newContainer) {\n            this._remove();\n            newContainer.add(this);\n        }\n        return this;\n    }\n    toObject() {\n        let attrs = this.getAttrs(), key, val, getter, defaultValue, nonPlainObject;\n        const obj = {\n            attrs: {},\n            className: this.getClassName(),\n        };\n        for (key in attrs) {\n            val = attrs[key];\n            nonPlainObject =\n                Util_1.Util.isObject(val) && !Util_1.Util._isPlainObject(val) && !Util_1.Util._isArray(val);\n            if (nonPlainObject) {\n                continue;\n            }\n            getter = typeof this[key] === 'function' && this[key];\n            delete attrs[key];\n            defaultValue = getter ? getter.call(this) : null;\n            attrs[key] = val;\n            if (defaultValue !== val) {\n                obj.attrs[key] = val;\n            }\n        }\n        return Util_1.Util._prepareToStringify(obj);\n    }\n    toJSON() {\n        return JSON.stringify(this.toObject());\n    }\n    getParent() {\n        return this.parent;\n    }\n    findAncestors(selector, includeSelf, stopNode) {\n        const res = [];\n        if (includeSelf && this._isMatch(selector)) {\n            res.push(this);\n        }\n        let ancestor = this.parent;\n        while (ancestor) {\n            if (ancestor === stopNode) {\n                return res;\n            }\n            if (ancestor._isMatch(selector)) {\n                res.push(ancestor);\n            }\n            ancestor = ancestor.parent;\n        }\n        return res;\n    }\n    isAncestorOf(node) {\n        return false;\n    }\n    findAncestor(selector, includeSelf, stopNode) {\n        return this.findAncestors(selector, includeSelf, stopNode)[0];\n    }\n    _isMatch(selector) {\n        if (!selector) {\n            return false;\n        }\n        if (typeof selector === 'function') {\n            return selector(this);\n        }\n        let selectorArr = selector.replace(/ /g, '').split(','), len = selectorArr.length, n, sel;\n        for (n = 0; n < len; n++) {\n            sel = selectorArr[n];\n            if (!Util_1.Util.isValidSelector(sel)) {\n                Util_1.Util.warn('Selector \"' +\n                    sel +\n                    '\" is invalid. Allowed selectors examples are \"#foo\", \".bar\" or \"Group\".');\n                Util_1.Util.warn('If you have a custom shape with such className, please change it to start with upper letter like \"Triangle\".');\n                Util_1.Util.warn('Konva is awesome, right?');\n            }\n            if (sel.charAt(0) === '#') {\n                if (this.id() === sel.slice(1)) {\n                    return true;\n                }\n            }\n            else if (sel.charAt(0) === '.') {\n                if (this.hasName(sel.slice(1))) {\n                    return true;\n                }\n            }\n            else if (this.className === sel || this.nodeType === sel) {\n                return true;\n            }\n        }\n        return false;\n    }\n    getLayer() {\n        const parent = this.getParent();\n        return parent ? parent.getLayer() : null;\n    }\n    getStage() {\n        return this._getCache(STAGE, this._getStage);\n    }\n    _getStage() {\n        const parent = this.getParent();\n        if (parent) {\n            return parent.getStage();\n        }\n        else {\n            return null;\n        }\n    }\n    fire(eventType, evt = {}, bubble) {\n        evt.target = evt.target || this;\n        if (bubble) {\n            this._fireAndBubble(eventType, evt);\n        }\n        else {\n            this._fire(eventType, evt);\n        }\n        return this;\n    }\n    getAbsoluteTransform(top) {\n        if (top) {\n            return this._getAbsoluteTransform(top);\n        }\n        else {\n            return this._getCache(ABSOLUTE_TRANSFORM, this._getAbsoluteTransform);\n        }\n    }\n    _getAbsoluteTransform(top) {\n        let at;\n        if (top) {\n            at = new Util_1.Transform();\n            this._eachAncestorReverse(function (node) {\n                const transformsEnabled = node.transformsEnabled();\n                if (transformsEnabled === 'all') {\n                    at.multiply(node.getTransform());\n                }\n                else if (transformsEnabled === 'position') {\n                    at.translate(node.x() - node.offsetX(), node.y() - node.offsetY());\n                }\n            }, top);\n            return at;\n        }\n        else {\n            at = this._cache.get(ABSOLUTE_TRANSFORM) || new Util_1.Transform();\n            if (this.parent) {\n                this.parent.getAbsoluteTransform().copyInto(at);\n            }\n            else {\n                at.reset();\n            }\n            const transformsEnabled = this.transformsEnabled();\n            if (transformsEnabled === 'all') {\n                at.multiply(this.getTransform());\n            }\n            else if (transformsEnabled === 'position') {\n                const x = this.attrs.x || 0;\n                const y = this.attrs.y || 0;\n                const offsetX = this.attrs.offsetX || 0;\n                const offsetY = this.attrs.offsetY || 0;\n                at.translate(x - offsetX, y - offsetY);\n            }\n            at.dirty = false;\n            return at;\n        }\n    }\n    getAbsoluteScale(top) {\n        let parent = this;\n        while (parent) {\n            if (parent._isUnderCache) {\n                top = parent;\n            }\n            parent = parent.getParent();\n        }\n        const transform = this.getAbsoluteTransform(top);\n        const attrs = transform.decompose();\n        return {\n            x: attrs.scaleX,\n            y: attrs.scaleY,\n        };\n    }\n    getAbsoluteRotation() {\n        return this.getAbsoluteTransform().decompose().rotation;\n    }\n    getTransform() {\n        return this._getCache(TRANSFORM, this._getTransform);\n    }\n    _getTransform() {\n        var _a, _b;\n        const m = this._cache.get(TRANSFORM) || new Util_1.Transform();\n        m.reset();\n        const x = this.x(), y = this.y(), rotation = Global_1.Konva.getAngle(this.rotation()), scaleX = (_a = this.attrs.scaleX) !== null && _a !== void 0 ? _a : 1, scaleY = (_b = this.attrs.scaleY) !== null && _b !== void 0 ? _b : 1, skewX = this.attrs.skewX || 0, skewY = this.attrs.skewY || 0, offsetX = this.attrs.offsetX || 0, offsetY = this.attrs.offsetY || 0;\n        if (x !== 0 || y !== 0) {\n            m.translate(x, y);\n        }\n        if (rotation !== 0) {\n            m.rotate(rotation);\n        }\n        if (skewX !== 0 || skewY !== 0) {\n            m.skew(skewX, skewY);\n        }\n        if (scaleX !== 1 || scaleY !== 1) {\n            m.scale(scaleX, scaleY);\n        }\n        if (offsetX !== 0 || offsetY !== 0) {\n            m.translate(-1 * offsetX, -1 * offsetY);\n        }\n        m.dirty = false;\n        return m;\n    }\n    clone(obj) {\n        let attrs = Util_1.Util.cloneObject(this.attrs), key, allListeners, len, n, listener;\n        for (key in obj) {\n            attrs[key] = obj[key];\n        }\n        const node = new this.constructor(attrs);\n        for (key in this.eventListeners) {\n            allListeners = this.eventListeners[key];\n            len = allListeners.length;\n            for (n = 0; n < len; n++) {\n                listener = allListeners[n];\n                if (listener.name.indexOf(KONVA) < 0) {\n                    if (!node.eventListeners[key]) {\n                        node.eventListeners[key] = [];\n                    }\n                    node.eventListeners[key].push(listener);\n                }\n            }\n        }\n        return node;\n    }\n    _toKonvaCanvas(config) {\n        config = config || {};\n        const box = this.getClientRect();\n        const stage = this.getStage(), x = config.x !== undefined ? config.x : Math.floor(box.x), y = config.y !== undefined ? config.y : Math.floor(box.y), pixelRatio = config.pixelRatio || 1, canvas = new Canvas_1.SceneCanvas({\n            width: config.width || Math.ceil(box.width) || (stage ? stage.width() : 0),\n            height: config.height ||\n                Math.ceil(box.height) ||\n                (stage ? stage.height() : 0),\n            pixelRatio: pixelRatio,\n        }), context = canvas.getContext();\n        const bufferCanvas = new Canvas_1.SceneCanvas({\n            width: canvas.width / canvas.pixelRatio + Math.abs(x),\n            height: canvas.height / canvas.pixelRatio + Math.abs(y),\n            pixelRatio: canvas.pixelRatio,\n        });\n        if (config.imageSmoothingEnabled === false) {\n            context._context.imageSmoothingEnabled = false;\n        }\n        context.save();\n        if (x || y) {\n            context.translate(-1 * x, -1 * y);\n        }\n        this.drawScene(canvas, undefined, bufferCanvas);\n        context.restore();\n        return canvas;\n    }\n    toCanvas(config) {\n        return this._toKonvaCanvas(config)._canvas;\n    }\n    toDataURL(config) {\n        config = config || {};\n        const mimeType = config.mimeType || null, quality = config.quality || null;\n        const url = this._toKonvaCanvas(config).toDataURL(mimeType, quality);\n        if (config.callback) {\n            config.callback(url);\n        }\n        return url;\n    }\n    toImage(config) {\n        return new Promise((resolve, reject) => {\n            try {\n                const callback = config === null || config === void 0 ? void 0 : config.callback;\n                if (callback)\n                    delete config.callback;\n                Util_1.Util._urlToImage(this.toDataURL(config), function (img) {\n                    resolve(img);\n                    callback === null || callback === void 0 ? void 0 : callback(img);\n                });\n            }\n            catch (err) {\n                reject(err);\n            }\n        });\n    }\n    toBlob(config) {\n        return new Promise((resolve, reject) => {\n            try {\n                const callback = config === null || config === void 0 ? void 0 : config.callback;\n                if (callback)\n                    delete config.callback;\n                this.toCanvas(config).toBlob((blob) => {\n                    resolve(blob);\n                    callback === null || callback === void 0 ? void 0 : callback(blob);\n                }, config === null || config === void 0 ? void 0 : config.mimeType, config === null || config === void 0 ? void 0 : config.quality);\n            }\n            catch (err) {\n                reject(err);\n            }\n        });\n    }\n    setSize(size) {\n        this.width(size.width);\n        this.height(size.height);\n        return this;\n    }\n    getSize() {\n        return {\n            width: this.width(),\n            height: this.height(),\n        };\n    }\n    getClassName() {\n        return this.className || this.nodeType;\n    }\n    getType() {\n        return this.nodeType;\n    }\n    getDragDistance() {\n        if (this.attrs.dragDistance !== undefined) {\n            return this.attrs.dragDistance;\n        }\n        else if (this.parent) {\n            return this.parent.getDragDistance();\n        }\n        else {\n            return Global_1.Konva.dragDistance;\n        }\n    }\n    _off(type, name, callback) {\n        let evtListeners = this.eventListeners[type], i, evtName, handler;\n        for (i = 0; i < evtListeners.length; i++) {\n            evtName = evtListeners[i].name;\n            handler = evtListeners[i].handler;\n            if ((evtName !== 'konva' || name === 'konva') &&\n                (!name || evtName === name) &&\n                (!callback || callback === handler)) {\n                evtListeners.splice(i, 1);\n                if (evtListeners.length === 0) {\n                    delete this.eventListeners[type];\n                    break;\n                }\n                i--;\n            }\n        }\n    }\n    _fireChangeEvent(attr, oldVal, newVal) {\n        this._fire(attr + CHANGE, {\n            oldVal: oldVal,\n            newVal: newVal,\n        });\n    }\n    addName(name) {\n        if (!this.hasName(name)) {\n            const oldName = this.name();\n            const newName = oldName ? oldName + ' ' + name : name;\n            this.name(newName);\n        }\n        return this;\n    }\n    hasName(name) {\n        if (!name) {\n            return false;\n        }\n        const fullName = this.name();\n        if (!fullName) {\n            return false;\n        }\n        const names = (fullName || '').split(/\\s/g);\n        return names.indexOf(name) !== -1;\n    }\n    removeName(name) {\n        const names = (this.name() || '').split(/\\s/g);\n        const index = names.indexOf(name);\n        if (index !== -1) {\n            names.splice(index, 1);\n            this.name(names.join(' '));\n        }\n        return this;\n    }\n    setAttr(attr, val) {\n        const func = this[SET + Util_1.Util._capitalize(attr)];\n        if (Util_1.Util._isFunction(func)) {\n            func.call(this, val);\n        }\n        else {\n            this._setAttr(attr, val);\n        }\n        return this;\n    }\n    _requestDraw() {\n        if (Global_1.Konva.autoDrawEnabled) {\n            const drawNode = this.getLayer() || this.getStage();\n            drawNode === null || drawNode === void 0 ? void 0 : drawNode.batchDraw();\n        }\n    }\n    _setAttr(key, val) {\n        const oldVal = this.attrs[key];\n        if (oldVal === val && !Util_1.Util.isObject(val)) {\n            return;\n        }\n        if (val === undefined || val === null) {\n            delete this.attrs[key];\n        }\n        else {\n            this.attrs[key] = val;\n        }\n        if (this._shouldFireChangeEvents) {\n            this._fireChangeEvent(key, oldVal, val);\n        }\n        this._requestDraw();\n    }\n    _setComponentAttr(key, component, val) {\n        let oldVal;\n        if (val !== undefined) {\n            oldVal = this.attrs[key];\n            if (!oldVal) {\n                this.attrs[key] = this.getAttr(key);\n            }\n            this.attrs[key][component] = val;\n            this._fireChangeEvent(key, oldVal, val);\n        }\n    }\n    _fireAndBubble(eventType, evt, compareShape) {\n        if (evt && this.nodeType === SHAPE) {\n            evt.target = this;\n        }\n        const shouldStop = (eventType === MOUSEENTER || eventType === MOUSELEAVE) &&\n            ((compareShape &&\n                (this === compareShape ||\n                    (this.isAncestorOf && this.isAncestorOf(compareShape)))) ||\n                (this.nodeType === 'Stage' && !compareShape));\n        if (!shouldStop) {\n            this._fire(eventType, evt);\n            const stopBubble = (eventType === MOUSEENTER || eventType === MOUSELEAVE) &&\n                compareShape &&\n                compareShape.isAncestorOf &&\n                compareShape.isAncestorOf(this) &&\n                !compareShape.isAncestorOf(this.parent);\n            if (((evt && !evt.cancelBubble) || !evt) &&\n                this.parent &&\n                this.parent.isListening() &&\n                !stopBubble) {\n                if (compareShape && compareShape.parent) {\n                    this._fireAndBubble.call(this.parent, eventType, evt, compareShape);\n                }\n                else {\n                    this._fireAndBubble.call(this.parent, eventType, evt);\n                }\n            }\n        }\n    }\n    _getProtoListeners(eventType) {\n        var _a, _b, _c;\n        const allListeners = (_a = this._cache.get(ALL_LISTENERS)) !== null && _a !== void 0 ? _a : {};\n        let events = allListeners === null || allListeners === void 0 ? void 0 : allListeners[eventType];\n        if (events === undefined) {\n            events = [];\n            let obj = Object.getPrototypeOf(this);\n            while (obj) {\n                const hierarchyEvents = (_c = (_b = obj.eventListeners) === null || _b === void 0 ? void 0 : _b[eventType]) !== null && _c !== void 0 ? _c : [];\n                events.push(...hierarchyEvents);\n                obj = Object.getPrototypeOf(obj);\n            }\n            allListeners[eventType] = events;\n            this._cache.set(ALL_LISTENERS, allListeners);\n        }\n        return events;\n    }\n    _fire(eventType, evt) {\n        evt = evt || {};\n        evt.currentTarget = this;\n        evt.type = eventType;\n        const topListeners = this._getProtoListeners(eventType);\n        if (topListeners) {\n            for (var i = 0; i < topListeners.length; i++) {\n                topListeners[i].handler.call(this, evt);\n            }\n        }\n        const selfListeners = this.eventListeners[eventType];\n        if (selfListeners) {\n            for (var i = 0; i < selfListeners.length; i++) {\n                selfListeners[i].handler.call(this, evt);\n            }\n        }\n    }\n    draw() {\n        this.drawScene();\n        this.drawHit();\n        return this;\n    }\n    _createDragElement(evt) {\n        const pointerId = evt ? evt.pointerId : undefined;\n        const stage = this.getStage();\n        const ap = this.getAbsolutePosition();\n        if (!stage) {\n            return;\n        }\n        const pos = stage._getPointerById(pointerId) ||\n            stage._changedPointerPositions[0] ||\n            ap;\n        DragAndDrop_1.DD._dragElements.set(this._id, {\n            node: this,\n            startPointerPos: pos,\n            offset: {\n                x: pos.x - ap.x,\n                y: pos.y - ap.y,\n            },\n            dragStatus: 'ready',\n            pointerId,\n        });\n    }\n    startDrag(evt, bubbleEvent = true) {\n        if (!DragAndDrop_1.DD._dragElements.has(this._id)) {\n            this._createDragElement(evt);\n        }\n        const elem = DragAndDrop_1.DD._dragElements.get(this._id);\n        elem.dragStatus = 'dragging';\n        this.fire('dragstart', {\n            type: 'dragstart',\n            target: this,\n            evt: evt && evt.evt,\n        }, bubbleEvent);\n    }\n    _setDragPosition(evt, elem) {\n        const pos = this.getStage()._getPointerById(elem.pointerId);\n        if (!pos) {\n            return;\n        }\n        let newNodePos = {\n            x: pos.x - elem.offset.x,\n            y: pos.y - elem.offset.y,\n        };\n        const dbf = this.dragBoundFunc();\n        if (dbf !== undefined) {\n            const bounded = dbf.call(this, newNodePos, evt);\n            if (!bounded) {\n                Util_1.Util.warn('dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.');\n            }\n            else {\n                newNodePos = bounded;\n            }\n        }\n        if (!this._lastPos ||\n            this._lastPos.x !== newNodePos.x ||\n            this._lastPos.y !== newNodePos.y) {\n            this.setAbsolutePosition(newNodePos);\n            this._requestDraw();\n        }\n        this._lastPos = newNodePos;\n    }\n    stopDrag(evt) {\n        const elem = DragAndDrop_1.DD._dragElements.get(this._id);\n        if (elem) {\n            elem.dragStatus = 'stopped';\n        }\n        DragAndDrop_1.DD._endDragBefore(evt);\n        DragAndDrop_1.DD._endDragAfter(evt);\n    }\n    setDraggable(draggable) {\n        this._setAttr('draggable', draggable);\n        this._dragChange();\n    }\n    isDragging() {\n        const elem = DragAndDrop_1.DD._dragElements.get(this._id);\n        return elem ? elem.dragStatus === 'dragging' : false;\n    }\n    _listenDrag() {\n        this._dragCleanup();\n        this.on('mousedown.konva touchstart.konva', function (evt) {\n            const shouldCheckButton = evt.evt['button'] !== undefined;\n            const canDrag = !shouldCheckButton || Global_1.Konva.dragButtons.indexOf(evt.evt['button']) >= 0;\n            if (!canDrag) {\n                return;\n            }\n            if (this.isDragging()) {\n                return;\n            }\n            let hasDraggingChild = false;\n            DragAndDrop_1.DD._dragElements.forEach((elem) => {\n                if (this.isAncestorOf(elem.node)) {\n                    hasDraggingChild = true;\n                }\n            });\n            if (!hasDraggingChild) {\n                this._createDragElement(evt);\n            }\n        });\n    }\n    _dragChange() {\n        if (this.attrs.draggable) {\n            this._listenDrag();\n        }\n        else {\n            this._dragCleanup();\n            const stage = this.getStage();\n            if (!stage) {\n                return;\n            }\n            const dragElement = DragAndDrop_1.DD._dragElements.get(this._id);\n            const isDragging = dragElement && dragElement.dragStatus === 'dragging';\n            const isReady = dragElement && dragElement.dragStatus === 'ready';\n            if (isDragging) {\n                this.stopDrag();\n            }\n            else if (isReady) {\n                DragAndDrop_1.DD._dragElements.delete(this._id);\n            }\n        }\n    }\n    _dragCleanup() {\n        this.off('mousedown.konva');\n        this.off('touchstart.konva');\n    }\n    isClientRectOnScreen(margin = { x: 0, y: 0 }) {\n        const stage = this.getStage();\n        if (!stage) {\n            return false;\n        }\n        const screenRect = {\n            x: -margin.x,\n            y: -margin.y,\n            width: stage.width() + 2 * margin.x,\n            height: stage.height() + 2 * margin.y,\n        };\n        return Util_1.Util.haveIntersection(screenRect, this.getClientRect());\n    }\n    static create(data, container) {\n        if (Util_1.Util._isString(data)) {\n            data = JSON.parse(data);\n        }\n        return this._createNode(data, container);\n    }\n    static _createNode(obj, container) {\n        let className = Node.prototype.getClassName.call(obj), children = obj.children, no, len, n;\n        if (container) {\n            obj.attrs.container = container;\n        }\n        if (!Global_1.Konva[className]) {\n            Util_1.Util.warn('Can not find a node with class name \"' +\n                className +\n                '\". Fallback to \"Shape\".');\n            className = 'Shape';\n        }\n        const Class = Global_1.Konva[className];\n        no = new Class(obj.attrs);\n        if (children) {\n            len = children.length;\n            for (n = 0; n < len; n++) {\n                no.add(Node._createNode(children[n]));\n            }\n        }\n        return no;\n    }\n}\nexports.Node = Node;\nNode.prototype.nodeType = 'Node';\nNode.prototype._attrsAffectingSize = [];\nNode.prototype.eventListeners = {};\nNode.prototype.on.call(Node.prototype, TRANSFORM_CHANGE_STR, function () {\n    if (this._batchingTransformChange) {\n        this._needClearTransformCache = true;\n        return;\n    }\n    this._clearCache(TRANSFORM);\n    this._clearSelfAndDescendantCache(ABSOLUTE_TRANSFORM);\n});\nNode.prototype.on.call(Node.prototype, 'visibleChange.konva', function () {\n    this._clearSelfAndDescendantCache(VISIBLE);\n});\nNode.prototype.on.call(Node.prototype, 'listeningChange.konva', function () {\n    this._clearSelfAndDescendantCache(LISTENING);\n});\nNode.prototype.on.call(Node.prototype, 'opacityChange.konva', function () {\n    this._clearSelfAndDescendantCache(ABSOLUTE_OPACITY);\n});\nconst addGetterSetter = Factory_1.Factory.addGetterSetter;\naddGetterSetter(Node, 'zIndex');\naddGetterSetter(Node, 'absolutePosition');\naddGetterSetter(Node, 'position');\naddGetterSetter(Node, 'x', 0, (0, Validators_1.getNumberValidator)());\naddGetterSetter(Node, 'y', 0, (0, Validators_1.getNumberValidator)());\naddGetterSetter(Node, 'globalCompositeOperation', 'source-over', (0, Validators_1.getStringValidator)());\naddGetterSetter(Node, 'opacity', 1, (0, Validators_1.getNumberValidator)());\naddGetterSetter(Node, 'name', '', (0, Validators_1.getStringValidator)());\naddGetterSetter(Node, 'id', '', (0, Validators_1.getStringValidator)());\naddGetterSetter(Node, 'rotation', 0, (0, Validators_1.getNumberValidator)());\nFactory_1.Factory.addComponentsGetterSetter(Node, 'scale', ['x', 'y']);\naddGetterSetter(Node, 'scaleX', 1, (0, Validators_1.getNumberValidator)());\naddGetterSetter(Node, 'scaleY', 1, (0, Validators_1.getNumberValidator)());\nFactory_1.Factory.addComponentsGetterSetter(Node, 'skew', ['x', 'y']);\naddGetterSetter(Node, 'skewX', 0, (0, Validators_1.getNumberValidator)());\naddGetterSetter(Node, 'skewY', 0, (0, Validators_1.getNumberValidator)());\nFactory_1.Factory.addComponentsGetterSetter(Node, 'offset', ['x', 'y']);\naddGetterSetter(Node, 'offsetX', 0, (0, Validators_1.getNumberValidator)());\naddGetterSetter(Node, 'offsetY', 0, (0, Validators_1.getNumberValidator)());\naddGetterSetter(Node, 'dragDistance', undefined, (0, Validators_1.getNumberValidator)());\naddGetterSetter(Node, 'width', 0, (0, Validators_1.getNumberValidator)());\naddGetterSetter(Node, 'height', 0, (0, Validators_1.getNumberValidator)());\naddGetterSetter(Node, 'listening', true, (0, Validators_1.getBooleanValidator)());\naddGetterSetter(Node, 'preventDefault', true, (0, Validators_1.getBooleanValidator)());\naddGetterSetter(Node, 'filters', undefined, function (val) {\n    this._filterUpToDate = false;\n    return val;\n});\naddGetterSetter(Node, 'visible', true, (0, Validators_1.getBooleanValidator)());\naddGetterSetter(Node, 'transformsEnabled', 'all', (0, Validators_1.getStringValidator)());\naddGetterSetter(Node, 'size');\naddGetterSetter(Node, 'dragBoundFunc');\naddGetterSetter(Node, 'draggable', false, (0, Validators_1.getBooleanValidator)());\nFactory_1.Factory.backCompat(Node, {\n    rotateDeg: 'rotate',\n    setRotationDeg: 'setRotation',\n    getRotationDeg: 'getRotation',\n});\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Container = void 0;\nconst Factory_1 = require(\"./Factory\");\nconst Node_1 = require(\"./Node\");\nconst Validators_1 = require(\"./Validators\");\nclass Container extends Node_1.Node {\n    constructor() {\n        super(...arguments);\n        this.children = [];\n    }\n    getChildren(filterFunc) {\n        if (!filterFunc) {\n            return this.children || [];\n        }\n        const children = this.children || [];\n        const results = [];\n        children.forEach(function (child) {\n            if (filterFunc(child)) {\n                results.push(child);\n            }\n        });\n        return results;\n    }\n    hasChildren() {\n        return this.getChildren().length > 0;\n    }\n    removeChildren() {\n        this.getChildren().forEach((child) => {\n            child.parent = null;\n            child.index = 0;\n            child.remove();\n        });\n        this.children = [];\n        this._requestDraw();\n        return this;\n    }\n    destroyChildren() {\n        this.getChildren().forEach((child) => {\n            child.parent = null;\n            child.index = 0;\n            child.destroy();\n        });\n        this.children = [];\n        this._requestDraw();\n        return this;\n    }\n    add(...children) {\n        if (children.length === 0) {\n            return this;\n        }\n        if (children.length > 1) {\n            for (let i = 0; i < children.length; i++) {\n                this.add(children[i]);\n            }\n            return this;\n        }\n        const child = children[0];\n        if (child.getParent()) {\n            child.moveTo(this);\n            return this;\n        }\n        this._validateAdd(child);\n        child.index = this.getChildren().length;\n        child.parent = this;\n        child._clearCaches();\n        this.getChildren().push(child);\n        this._fire('add', {\n            child: child,\n        });\n        this._requestDraw();\n        return this;\n    }\n    destroy() {\n        if (this.hasChildren()) {\n            this.destroyChildren();\n        }\n        super.destroy();\n        return this;\n    }\n    find(selector) {\n        return this._generalFind(selector, false);\n    }\n    findOne(selector) {\n        const result = this._generalFind(selector, true);\n        return result.length > 0 ? result[0] : undefined;\n    }\n    _generalFind(selector, findOne) {\n        const retArr = [];\n        this._descendants((node) => {\n            const valid = node._isMatch(selector);\n            if (valid) {\n                retArr.push(node);\n            }\n            if (valid && findOne) {\n                return true;\n            }\n            return false;\n        });\n        return retArr;\n    }\n    _descendants(fn) {\n        let shouldStop = false;\n        const children = this.getChildren();\n        for (const child of children) {\n            shouldStop = fn(child);\n            if (shouldStop) {\n                return true;\n            }\n            if (!child.hasChildren()) {\n                continue;\n            }\n            shouldStop = child._descendants(fn);\n            if (shouldStop) {\n                return true;\n            }\n        }\n        return false;\n    }\n    toObject() {\n        const obj = Node_1.Node.prototype.toObject.call(this);\n        obj.children = [];\n        this.getChildren().forEach((child) => {\n            obj.children.push(child.toObject());\n        });\n        return obj;\n    }\n    isAncestorOf(node) {\n        let parent = node.getParent();\n        while (parent) {\n            if (parent._id === this._id) {\n                return true;\n            }\n            parent = parent.getParent();\n        }\n        return false;\n    }\n    clone(obj) {\n        const node = Node_1.Node.prototype.clone.call(this, obj);\n        this.getChildren().forEach(function (no) {\n            node.add(no.clone());\n        });\n        return node;\n    }\n    getAllIntersections(pos) {\n        const arr = [];\n        this.find('Shape').forEach((shape) => {\n            if (shape.isVisible() && shape.intersects(pos)) {\n                arr.push(shape);\n            }\n        });\n        return arr;\n    }\n    _clearSelfAndDescendantCache(attr) {\n        var _a;\n        super._clearSelfAndDescendantCache(attr);\n        if (this.isCached()) {\n            return;\n        }\n        (_a = this.children) === null || _a === void 0 ? void 0 : _a.forEach(function (node) {\n            node._clearSelfAndDescendantCache(attr);\n        });\n    }\n    _setChildrenIndices() {\n        var _a;\n        (_a = this.children) === null || _a === void 0 ? void 0 : _a.forEach(function (child, n) {\n            child.index = n;\n        });\n        this._requestDraw();\n    }\n    drawScene(can, top, bufferCanvas) {\n        const layer = this.getLayer(), canvas = can || (layer && layer.getCanvas()), context = canvas && canvas.getContext(), cachedCanvas = this._getCanvasCache(), cachedSceneCanvas = cachedCanvas && cachedCanvas.scene;\n        const caching = canvas && canvas.isCache;\n        if (!this.isVisible() && !caching) {\n            return this;\n        }\n        if (cachedSceneCanvas) {\n            context.save();\n            const m = this.getAbsoluteTransform(top).getMatrix();\n            context.transform(m[0], m[1], m[2], m[3], m[4], m[5]);\n            this._drawCachedSceneCanvas(context);\n            context.restore();\n        }\n        else {\n            this._drawChildren('drawScene', canvas, top, bufferCanvas);\n        }\n        return this;\n    }\n    drawHit(can, top) {\n        if (!this.shouldDrawHit(top)) {\n            return this;\n        }\n        const layer = this.getLayer(), canvas = can || (layer && layer.hitCanvas), context = canvas && canvas.getContext(), cachedCanvas = this._getCanvasCache(), cachedHitCanvas = cachedCanvas && cachedCanvas.hit;\n        if (cachedHitCanvas) {\n            context.save();\n            const m = this.getAbsoluteTransform(top).getMatrix();\n            context.transform(m[0], m[1], m[2], m[3], m[4], m[5]);\n            this._drawCachedHitCanvas(context);\n            context.restore();\n        }\n        else {\n            this._drawChildren('drawHit', canvas, top);\n        }\n        return this;\n    }\n    _drawChildren(drawMethod, canvas, top, bufferCanvas) {\n        var _a;\n        const context = canvas && canvas.getContext(), clipWidth = this.clipWidth(), clipHeight = this.clipHeight(), clipFunc = this.clipFunc(), hasClip = (typeof clipWidth === 'number' && typeof clipHeight === 'number') ||\n            clipFunc;\n        const selfCache = top === this;\n        if (hasClip) {\n            context.save();\n            const transform = this.getAbsoluteTransform(top);\n            let m = transform.getMatrix();\n            context.transform(m[0], m[1], m[2], m[3], m[4], m[5]);\n            context.beginPath();\n            let clipArgs;\n            if (clipFunc) {\n                clipArgs = clipFunc.call(this, context, this);\n            }\n            else {\n                const clipX = this.clipX();\n                const clipY = this.clipY();\n                context.rect(clipX || 0, clipY || 0, clipWidth, clipHeight);\n            }\n            context.clip.apply(context, clipArgs);\n            m = transform.copy().invert().getMatrix();\n            context.transform(m[0], m[1], m[2], m[3], m[4], m[5]);\n        }\n        const hasComposition = !selfCache &&\n            this.globalCompositeOperation() !== 'source-over' &&\n            drawMethod === 'drawScene';\n        if (hasComposition) {\n            context.save();\n            context._applyGlobalCompositeOperation(this);\n        }\n        (_a = this.children) === null || _a === void 0 ? void 0 : _a.forEach(function (child) {\n            child[drawMethod](canvas, top, bufferCanvas);\n        });\n        if (hasComposition) {\n            context.restore();\n        }\n        if (hasClip) {\n            context.restore();\n        }\n    }\n    getClientRect(config = {}) {\n        var _a;\n        const skipTransform = config.skipTransform;\n        const relativeTo = config.relativeTo;\n        let minX, minY, maxX, maxY;\n        let selfRect = {\n            x: Infinity,\n            y: Infinity,\n            width: 0,\n            height: 0,\n        };\n        const that = this;\n        (_a = this.children) === null || _a === void 0 ? void 0 : _a.forEach(function (child) {\n            if (!child.visible()) {\n                return;\n            }\n            const rect = child.getClientRect({\n                relativeTo: that,\n                skipShadow: config.skipShadow,\n                skipStroke: config.skipStroke,\n            });\n            if (rect.width === 0 && rect.height === 0) {\n                return;\n            }\n            if (minX === undefined) {\n                minX = rect.x;\n                minY = rect.y;\n                maxX = rect.x + rect.width;\n                maxY = rect.y + rect.height;\n            }\n            else {\n                minX = Math.min(minX, rect.x);\n                minY = Math.min(minY, rect.y);\n                maxX = Math.max(maxX, rect.x + rect.width);\n                maxY = Math.max(maxY, rect.y + rect.height);\n            }\n        });\n        const shapes = this.find('Shape');\n        let hasVisible = false;\n        for (let i = 0; i < shapes.length; i++) {\n            const shape = shapes[i];\n            if (shape._isVisible(this)) {\n                hasVisible = true;\n                break;\n            }\n        }\n        if (hasVisible && minX !== undefined) {\n            selfRect = {\n                x: minX,\n                y: minY,\n                width: maxX - minX,\n                height: maxY - minY,\n            };\n        }\n        else {\n            selfRect = {\n                x: 0,\n                y: 0,\n                width: 0,\n                height: 0,\n            };\n        }\n        if (!skipTransform) {\n            return this._transformedRect(selfRect, relativeTo);\n        }\n        return selfRect;\n    }\n}\nexports.Container = Container;\nFactory_1.Factory.addComponentsGetterSetter(Container, 'clip', [\n    'x',\n    'y',\n    'width',\n    'height',\n]);\nFactory_1.Factory.addGetterSetter(Container, 'clipX', undefined, (0, Validators_1.getNumberValidator)());\nFactory_1.Factory.addGetterSetter(Container, 'clipY', undefined, (0, Validators_1.getNumberValidator)());\nFactory_1.Factory.addGetterSetter(Container, 'clipWidth', undefined, (0, Validators_1.getNumberValidator)());\nFactory_1.Factory.addGetterSetter(Container, 'clipHeight', undefined, (0, Validators_1.getNumberValidator)());\nFactory_1.Factory.addGetterSetter(Container, 'clipFunc');\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getCapturedShape = getCapturedShape;\nexports.createEvent = createEvent;\nexports.hasPointerCapture = hasPointerCapture;\nexports.setPointerCapture = setPointerCapture;\nexports.releaseCapture = releaseCapture;\nconst Global_1 = require(\"./Global\");\nconst Captures = new Map();\nconst SUPPORT_POINTER_EVENTS = Global_1.Konva._global['PointerEvent'] !== undefined;\nfunction getCapturedShape(pointerId) {\n    return Captures.get(pointerId);\n}\nfunction createEvent(evt) {\n    return {\n        evt,\n        pointerId: evt.pointerId,\n    };\n}\nfunction hasPointerCapture(pointerId, shape) {\n    return Captures.get(pointerId) === shape;\n}\nfunction setPointerCapture(pointerId, shape) {\n    releaseCapture(pointerId);\n    const stage = shape.getStage();\n    if (!stage)\n        return;\n    Captures.set(pointerId, shape);\n    if (SUPPORT_POINTER_EVENTS) {\n        shape._fire('gotpointercapture', createEvent(new PointerEvent('gotpointercapture')));\n    }\n}\nfunction releaseCapture(pointerId, target) {\n    const shape = Captures.get(pointerId);\n    if (!shape)\n        return;\n    const stage = shape.getStage();\n    if (stage && stage.content) {\n    }\n    Captures.delete(pointerId);\n    if (SUPPORT_POINTER_EVENTS) {\n        shape._fire('lostpointercapture', createEvent(new PointerEvent('lostpointercapture')));\n    }\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Stage = exports.stages = void 0;\nconst Util_1 = require(\"./Util\");\nconst Factory_1 = require(\"./Factory\");\nconst Container_1 = require(\"./Container\");\nconst Global_1 = require(\"./Global\");\nconst Canvas_1 = require(\"./Canvas\");\nconst DragAndDrop_1 = require(\"./DragAndDrop\");\nconst Global_2 = require(\"./Global\");\nconst PointerEvents = require(\"./PointerEvents\");\nconst STAGE = 'Stage', STRING = 'string', PX = 'px', MOUSEOUT = 'mouseout', MOUSELEAVE = 'mouseleave', MOUSEOVER = 'mouseover', MOUSEENTER = 'mouseenter', MOUSEMOVE = 'mousemove', MOUSEDOWN = 'mousedown', MOUSEUP = 'mouseup', POINTERMOVE = 'pointermove', POINTERDOWN = 'pointerdown', POINTERUP = 'pointerup', POINTERCANCEL = 'pointercancel', LOSTPOINTERCAPTURE = 'lostpointercapture', POINTEROUT = 'pointerout', POINTERLEAVE = 'pointerleave', POINTEROVER = 'pointerover', POINTERENTER = 'pointerenter', CONTEXTMENU = 'contextmenu', TOUCHSTART = 'touchstart', TOUCHEND = 'touchend', TOUCHMOVE = 'touchmove', TOUCHCANCEL = 'touchcancel', WHEEL = 'wheel', MAX_LAYERS_NUMBER = 5, EVENTS = [\n    [MOUSEENTER, '_pointerenter'],\n    [MOUSEDOWN, '_pointerdown'],\n    [MOUSEMOVE, '_pointermove'],\n    [MOUSEUP, '_pointerup'],\n    [MOUSELEAVE, '_pointerleave'],\n    [TOUCHSTART, '_pointerdown'],\n    [TOUCHMOVE, '_pointermove'],\n    [TOUCHEND, '_pointerup'],\n    [TOUCHCANCEL, '_pointercancel'],\n    [MOUSEOVER, '_pointerover'],\n    [WHEEL, '_wheel'],\n    [CONTEXTMENU, '_contextmenu'],\n    [POINTERDOWN, '_pointerdown'],\n    [POINTERMOVE, '_pointermove'],\n    [POINTERUP, '_pointerup'],\n    [POINTERCANCEL, '_pointercancel'],\n    [LOSTPOINTERCAPTURE, '_lostpointercapture'],\n];\nconst EVENTS_MAP = {\n    mouse: {\n        [POINTEROUT]: MOUSEOUT,\n        [POINTERLEAVE]: MOUSELEAVE,\n        [POINTEROVER]: MOUSEOVER,\n        [POINTERENTER]: MOUSEENTER,\n        [POINTERMOVE]: MOUSEMOVE,\n        [POINTERDOWN]: MOUSEDOWN,\n        [POINTERUP]: MOUSEUP,\n        [POINTERCANCEL]: 'mousecancel',\n        pointerclick: 'click',\n        pointerdblclick: 'dblclick',\n    },\n    touch: {\n        [POINTEROUT]: 'touchout',\n        [POINTERLEAVE]: 'touchleave',\n        [POINTEROVER]: 'touchover',\n        [POINTERENTER]: 'touchenter',\n        [POINTERMOVE]: TOUCHMOVE,\n        [POINTERDOWN]: TOUCHSTART,\n        [POINTERUP]: TOUCHEND,\n        [POINTERCANCEL]: TOUCHCANCEL,\n        pointerclick: 'tap',\n        pointerdblclick: 'dbltap',\n    },\n    pointer: {\n        [POINTEROUT]: POINTEROUT,\n        [POINTERLEAVE]: POINTERLEAVE,\n        [POINTEROVER]: POINTEROVER,\n        [POINTERENTER]: POINTERENTER,\n        [POINTERMOVE]: POINTERMOVE,\n        [POINTERDOWN]: POINTERDOWN,\n        [POINTERUP]: POINTERUP,\n        [POINTERCANCEL]: POINTERCANCEL,\n        pointerclick: 'pointerclick',\n        pointerdblclick: 'pointerdblclick',\n    },\n};\nconst getEventType = (type) => {\n    if (type.indexOf('pointer') >= 0) {\n        return 'pointer';\n    }\n    if (type.indexOf('touch') >= 0) {\n        return 'touch';\n    }\n    return 'mouse';\n};\nconst getEventsMap = (eventType) => {\n    const type = getEventType(eventType);\n    if (type === 'pointer') {\n        return Global_1.Konva.pointerEventsEnabled && EVENTS_MAP.pointer;\n    }\n    if (type === 'touch') {\n        return EVENTS_MAP.touch;\n    }\n    if (type === 'mouse') {\n        return EVENTS_MAP.mouse;\n    }\n};\nfunction checkNoClip(attrs = {}) {\n    if (attrs.clipFunc || attrs.clipWidth || attrs.clipHeight) {\n        Util_1.Util.warn('Stage does not support clipping. Please use clip for Layers or Groups.');\n    }\n    return attrs;\n}\nconst NO_POINTERS_MESSAGE = `Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);`;\nexports.stages = [];\nclass Stage extends Container_1.Container {\n    constructor(config) {\n        super(checkNoClip(config));\n        this._pointerPositions = [];\n        this._changedPointerPositions = [];\n        this._buildDOM();\n        this._bindContentEvents();\n        exports.stages.push(this);\n        this.on('widthChange.konva heightChange.konva', this._resizeDOM);\n        this.on('visibleChange.konva', this._checkVisibility);\n        this.on('clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva', () => {\n            checkNoClip(this.attrs);\n        });\n        this._checkVisibility();\n    }\n    _validateAdd(child) {\n        const isLayer = child.getType() === 'Layer';\n        const isFastLayer = child.getType() === 'FastLayer';\n        const valid = isLayer || isFastLayer;\n        if (!valid) {\n            Util_1.Util.throw('You may only add layers to the stage.');\n        }\n    }\n    _checkVisibility() {\n        if (!this.content) {\n            return;\n        }\n        const style = this.visible() ? '' : 'none';\n        this.content.style.display = style;\n    }\n    setContainer(container) {\n        if (typeof container === STRING) {\n            if (container.charAt(0) === '.') {\n                const className = container.slice(1);\n                container = document.getElementsByClassName(className)[0];\n            }\n            else {\n                var id;\n                if (container.charAt(0) !== '#') {\n                    id = container;\n                }\n                else {\n                    id = container.slice(1);\n                }\n                container = document.getElementById(id);\n            }\n            if (!container) {\n                throw 'Can not find container in document with id ' + id;\n            }\n        }\n        this._setAttr('container', container);\n        if (this.content) {\n            if (this.content.parentElement) {\n                this.content.parentElement.removeChild(this.content);\n            }\n            container.appendChild(this.content);\n        }\n        return this;\n    }\n    shouldDrawHit() {\n        return true;\n    }\n    clear() {\n        const layers = this.children, len = layers.length;\n        for (let n = 0; n < len; n++) {\n            layers[n].clear();\n        }\n        return this;\n    }\n    clone(obj) {\n        if (!obj) {\n            obj = {};\n        }\n        obj.container =\n            typeof document !== 'undefined' && document.createElement('div');\n        return Container_1.Container.prototype.clone.call(this, obj);\n    }\n    destroy() {\n        super.destroy();\n        const content = this.content;\n        if (content && Util_1.Util._isInDocument(content)) {\n            this.container().removeChild(content);\n        }\n        const index = exports.stages.indexOf(this);\n        if (index > -1) {\n            exports.stages.splice(index, 1);\n        }\n        Util_1.Util.releaseCanvas(this.bufferCanvas._canvas, this.bufferHitCanvas._canvas);\n        return this;\n    }\n    getPointerPosition() {\n        const pos = this._pointerPositions[0] || this._changedPointerPositions[0];\n        if (!pos) {\n            Util_1.Util.warn(NO_POINTERS_MESSAGE);\n            return null;\n        }\n        return {\n            x: pos.x,\n            y: pos.y,\n        };\n    }\n    _getPointerById(id) {\n        return this._pointerPositions.find((p) => p.id === id);\n    }\n    getPointersPositions() {\n        return this._pointerPositions;\n    }\n    getStage() {\n        return this;\n    }\n    getContent() {\n        return this.content;\n    }\n    _toKonvaCanvas(config) {\n        config = config || {};\n        config.x = config.x || 0;\n        config.y = config.y || 0;\n        config.width = config.width || this.width();\n        config.height = config.height || this.height();\n        const canvas = new Canvas_1.SceneCanvas({\n            width: config.width,\n            height: config.height,\n            pixelRatio: config.pixelRatio || 1,\n        });\n        const _context = canvas.getContext()._context;\n        const layers = this.children;\n        if (config.x || config.y) {\n            _context.translate(-1 * config.x, -1 * config.y);\n        }\n        layers.forEach(function (layer) {\n            if (!layer.isVisible()) {\n                return;\n            }\n            const layerCanvas = layer._toKonvaCanvas(config);\n            _context.drawImage(layerCanvas._canvas, config.x, config.y, layerCanvas.getWidth() / layerCanvas.getPixelRatio(), layerCanvas.getHeight() / layerCanvas.getPixelRatio());\n        });\n        return canvas;\n    }\n    getIntersection(pos) {\n        if (!pos) {\n            return null;\n        }\n        const layers = this.children, len = layers.length, end = len - 1;\n        for (let n = end; n >= 0; n--) {\n            const shape = layers[n].getIntersection(pos);\n            if (shape) {\n                return shape;\n            }\n        }\n        return null;\n    }\n    _resizeDOM() {\n        const width = this.width();\n        const height = this.height();\n        if (this.content) {\n            this.content.style.width = width + PX;\n            this.content.style.height = height + PX;\n        }\n        this.bufferCanvas.setSize(width, height);\n        this.bufferHitCanvas.setSize(width, height);\n        this.children.forEach((layer) => {\n            layer.setSize({ width, height });\n            layer.draw();\n        });\n    }\n    add(layer, ...rest) {\n        if (arguments.length > 1) {\n            for (let i = 0; i < arguments.length; i++) {\n                this.add(arguments[i]);\n            }\n            return this;\n        }\n        super.add(layer);\n        const length = this.children.length;\n        if (length > MAX_LAYERS_NUMBER) {\n            Util_1.Util.warn('The stage has ' +\n                length +\n                ' layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group.');\n        }\n        layer.setSize({ width: this.width(), height: this.height() });\n        layer.draw();\n        if (Global_1.Konva.isBrowser) {\n            this.content.appendChild(layer.canvas._canvas);\n        }\n        return this;\n    }\n    getParent() {\n        return null;\n    }\n    getLayer() {\n        return null;\n    }\n    hasPointerCapture(pointerId) {\n        return PointerEvents.hasPointerCapture(pointerId, this);\n    }\n    setPointerCapture(pointerId) {\n        PointerEvents.setPointerCapture(pointerId, this);\n    }\n    releaseCapture(pointerId) {\n        PointerEvents.releaseCapture(pointerId, this);\n    }\n    getLayers() {\n        return this.children;\n    }\n    _bindContentEvents() {\n        if (!Global_1.Konva.isBrowser) {\n            return;\n        }\n        EVENTS.forEach(([event, methodName]) => {\n            this.content.addEventListener(event, (evt) => {\n                this[methodName](evt);\n            }, { passive: false });\n        });\n    }\n    _pointerenter(evt) {\n        this.setPointersPositions(evt);\n        const events = getEventsMap(evt.type);\n        if (events) {\n            this._fire(events.pointerenter, {\n                evt: evt,\n                target: this,\n                currentTarget: this,\n            });\n        }\n    }\n    _pointerover(evt) {\n        this.setPointersPositions(evt);\n        const events = getEventsMap(evt.type);\n        if (events) {\n            this._fire(events.pointerover, {\n                evt: evt,\n                target: this,\n                currentTarget: this,\n            });\n        }\n    }\n    _getTargetShape(evenType) {\n        let shape = this[evenType + 'targetShape'];\n        if (shape && !shape.getStage()) {\n            shape = null;\n        }\n        return shape;\n    }\n    _pointerleave(evt) {\n        const events = getEventsMap(evt.type);\n        const eventType = getEventType(evt.type);\n        if (!events) {\n            return;\n        }\n        this.setPointersPositions(evt);\n        const targetShape = this._getTargetShape(eventType);\n        const eventsEnabled = !(Global_1.Konva.isDragging() || Global_1.Konva.isTransforming()) || Global_1.Konva.hitOnDragEnabled;\n        if (targetShape && eventsEnabled) {\n            targetShape._fireAndBubble(events.pointerout, { evt: evt });\n            targetShape._fireAndBubble(events.pointerleave, { evt: evt });\n            this._fire(events.pointerleave, {\n                evt: evt,\n                target: this,\n                currentTarget: this,\n            });\n            this[eventType + 'targetShape'] = null;\n        }\n        else if (eventsEnabled) {\n            this._fire(events.pointerleave, {\n                evt: evt,\n                target: this,\n                currentTarget: this,\n            });\n            this._fire(events.pointerout, {\n                evt: evt,\n                target: this,\n                currentTarget: this,\n            });\n        }\n        this.pointerPos = null;\n        this._pointerPositions = [];\n    }\n    _pointerdown(evt) {\n        const events = getEventsMap(evt.type);\n        const eventType = getEventType(evt.type);\n        if (!events) {\n            return;\n        }\n        this.setPointersPositions(evt);\n        let triggeredOnShape = false;\n        this._changedPointerPositions.forEach((pos) => {\n            const shape = this.getIntersection(pos);\n            DragAndDrop_1.DD.justDragged = false;\n            Global_1.Konva['_' + eventType + 'ListenClick'] = true;\n            if (!shape || !shape.isListening()) {\n                this[eventType + 'ClickStartShape'] = undefined;\n                return;\n            }\n            if (Global_1.Konva.capturePointerEventsEnabled) {\n                shape.setPointerCapture(pos.id);\n            }\n            this[eventType + 'ClickStartShape'] = shape;\n            shape._fireAndBubble(events.pointerdown, {\n                evt: evt,\n                pointerId: pos.id,\n            });\n            triggeredOnShape = true;\n            const isTouch = evt.type.indexOf('touch') >= 0;\n            if (shape.preventDefault() && evt.cancelable && isTouch) {\n                evt.preventDefault();\n            }\n        });\n        if (!triggeredOnShape) {\n            this._fire(events.pointerdown, {\n                evt: evt,\n                target: this,\n                currentTarget: this,\n                pointerId: this._pointerPositions[0].id,\n            });\n        }\n    }\n    _pointermove(evt) {\n        const events = getEventsMap(evt.type);\n        const eventType = getEventType(evt.type);\n        if (!events) {\n            return;\n        }\n        if (Global_1.Konva.isDragging() && DragAndDrop_1.DD.node.preventDefault() && evt.cancelable) {\n            evt.preventDefault();\n        }\n        this.setPointersPositions(evt);\n        const eventsEnabled = !(Global_1.Konva.isDragging() || Global_1.Konva.isTransforming()) || Global_1.Konva.hitOnDragEnabled;\n        if (!eventsEnabled) {\n            return;\n        }\n        const processedShapesIds = {};\n        let triggeredOnShape = false;\n        const targetShape = this._getTargetShape(eventType);\n        this._changedPointerPositions.forEach((pos) => {\n            const shape = (PointerEvents.getCapturedShape(pos.id) ||\n                this.getIntersection(pos));\n            const pointerId = pos.id;\n            const event = { evt: evt, pointerId };\n            const differentTarget = targetShape !== shape;\n            if (differentTarget && targetShape) {\n                targetShape._fireAndBubble(events.pointerout, { ...event }, shape);\n                targetShape._fireAndBubble(events.pointerleave, { ...event }, shape);\n            }\n            if (shape) {\n                if (processedShapesIds[shape._id]) {\n                    return;\n                }\n                processedShapesIds[shape._id] = true;\n            }\n            if (shape && shape.isListening()) {\n                triggeredOnShape = true;\n                if (differentTarget) {\n                    shape._fireAndBubble(events.pointerover, { ...event }, targetShape);\n                    shape._fireAndBubble(events.pointerenter, { ...event }, targetShape);\n                    this[eventType + 'targetShape'] = shape;\n                }\n                shape._fireAndBubble(events.pointermove, { ...event });\n            }\n            else {\n                if (targetShape) {\n                    this._fire(events.pointerover, {\n                        evt: evt,\n                        target: this,\n                        currentTarget: this,\n                        pointerId,\n                    });\n                    this[eventType + 'targetShape'] = null;\n                }\n            }\n        });\n        if (!triggeredOnShape) {\n            this._fire(events.pointermove, {\n                evt: evt,\n                target: this,\n                currentTarget: this,\n                pointerId: this._changedPointerPositions[0].id,\n            });\n        }\n    }\n    _pointerup(evt) {\n        const events = getEventsMap(evt.type);\n        const eventType = getEventType(evt.type);\n        if (!events) {\n            return;\n        }\n        this.setPointersPositions(evt);\n        const clickStartShape = this[eventType + 'ClickStartShape'];\n        const clickEndShape = this[eventType + 'ClickEndShape'];\n        const processedShapesIds = {};\n        let triggeredOnShape = false;\n        this._changedPointerPositions.forEach((pos) => {\n            const shape = (PointerEvents.getCapturedShape(pos.id) ||\n                this.getIntersection(pos));\n            if (shape) {\n                shape.releaseCapture(pos.id);\n                if (processedShapesIds[shape._id]) {\n                    return;\n                }\n                processedShapesIds[shape._id] = true;\n            }\n            const pointerId = pos.id;\n            const event = { evt: evt, pointerId };\n            let fireDblClick = false;\n            if (Global_1.Konva['_' + eventType + 'InDblClickWindow']) {\n                fireDblClick = true;\n                clearTimeout(this[eventType + 'DblTimeout']);\n            }\n            else if (!DragAndDrop_1.DD.justDragged) {\n                Global_1.Konva['_' + eventType + 'InDblClickWindow'] = true;\n                clearTimeout(this[eventType + 'DblTimeout']);\n            }\n            this[eventType + 'DblTimeout'] = setTimeout(function () {\n                Global_1.Konva['_' + eventType + 'InDblClickWindow'] = false;\n            }, Global_1.Konva.dblClickWindow);\n            if (shape && shape.isListening()) {\n                triggeredOnShape = true;\n                this[eventType + 'ClickEndShape'] = shape;\n                shape._fireAndBubble(events.pointerup, { ...event });\n                if (Global_1.Konva['_' + eventType + 'ListenClick'] &&\n                    clickStartShape &&\n                    clickStartShape === shape) {\n                    shape._fireAndBubble(events.pointerclick, { ...event });\n                    if (fireDblClick && clickEndShape && clickEndShape === shape) {\n                        shape._fireAndBubble(events.pointerdblclick, { ...event });\n                    }\n                }\n            }\n            else {\n                this[eventType + 'ClickEndShape'] = null;\n                if (Global_1.Konva['_' + eventType + 'ListenClick']) {\n                    this._fire(events.pointerclick, {\n                        evt: evt,\n                        target: this,\n                        currentTarget: this,\n                        pointerId,\n                    });\n                }\n                if (fireDblClick) {\n                    this._fire(events.pointerdblclick, {\n                        evt: evt,\n                        target: this,\n                        currentTarget: this,\n                        pointerId,\n                    });\n                }\n            }\n        });\n        if (!triggeredOnShape) {\n            this._fire(events.pointerup, {\n                evt: evt,\n                target: this,\n                currentTarget: this,\n                pointerId: this._changedPointerPositions[0].id,\n            });\n        }\n        Global_1.Konva['_' + eventType + 'ListenClick'] = false;\n        if (evt.cancelable && eventType !== 'touch' && eventType !== 'pointer') {\n            evt.preventDefault();\n        }\n    }\n    _contextmenu(evt) {\n        this.setPointersPositions(evt);\n        const shape = this.getIntersection(this.getPointerPosition());\n        if (shape && shape.isListening()) {\n            shape._fireAndBubble(CONTEXTMENU, { evt: evt });\n        }\n        else {\n            this._fire(CONTEXTMENU, {\n                evt: evt,\n                target: this,\n                currentTarget: this,\n            });\n        }\n    }\n    _wheel(evt) {\n        this.setPointersPositions(evt);\n        const shape = this.getIntersection(this.getPointerPosition());\n        if (shape && shape.isListening()) {\n            shape._fireAndBubble(WHEEL, { evt: evt });\n        }\n        else {\n            this._fire(WHEEL, {\n                evt: evt,\n                target: this,\n                currentTarget: this,\n            });\n        }\n    }\n    _pointercancel(evt) {\n        this.setPointersPositions(evt);\n        const shape = PointerEvents.getCapturedShape(evt.pointerId) ||\n            this.getIntersection(this.getPointerPosition());\n        if (shape) {\n            shape._fireAndBubble(POINTERUP, PointerEvents.createEvent(evt));\n        }\n        PointerEvents.releaseCapture(evt.pointerId);\n    }\n    _lostpointercapture(evt) {\n        PointerEvents.releaseCapture(evt.pointerId);\n    }\n    setPointersPositions(evt) {\n        const contentPosition = this._getContentPosition();\n        let x = null, y = null;\n        evt = evt ? evt : window.event;\n        if (evt.touches !== undefined) {\n            this._pointerPositions = [];\n            this._changedPointerPositions = [];\n            Array.prototype.forEach.call(evt.touches, (touch) => {\n                this._pointerPositions.push({\n                    id: touch.identifier,\n                    x: (touch.clientX - contentPosition.left) / contentPosition.scaleX,\n                    y: (touch.clientY - contentPosition.top) / contentPosition.scaleY,\n                });\n            });\n            Array.prototype.forEach.call(evt.changedTouches || evt.touches, (touch) => {\n                this._changedPointerPositions.push({\n                    id: touch.identifier,\n                    x: (touch.clientX - contentPosition.left) / contentPosition.scaleX,\n                    y: (touch.clientY - contentPosition.top) / contentPosition.scaleY,\n                });\n            });\n        }\n        else {\n            x = (evt.clientX - contentPosition.left) / contentPosition.scaleX;\n            y = (evt.clientY - contentPosition.top) / contentPosition.scaleY;\n            this.pointerPos = {\n                x: x,\n                y: y,\n            };\n            this._pointerPositions = [{ x, y, id: Util_1.Util._getFirstPointerId(evt) }];\n            this._changedPointerPositions = [\n                { x, y, id: Util_1.Util._getFirstPointerId(evt) },\n            ];\n        }\n    }\n    _setPointerPosition(evt) {\n        Util_1.Util.warn('Method _setPointerPosition is deprecated. Use \"stage.setPointersPositions(event)\" instead.');\n        this.setPointersPositions(evt);\n    }\n    _getContentPosition() {\n        if (!this.content || !this.content.getBoundingClientRect) {\n            return {\n                top: 0,\n                left: 0,\n                scaleX: 1,\n                scaleY: 1,\n            };\n        }\n        const rect = this.content.getBoundingClientRect();\n        return {\n            top: rect.top,\n            left: rect.left,\n            scaleX: rect.width / this.content.clientWidth || 1,\n            scaleY: rect.height / this.content.clientHeight || 1,\n        };\n    }\n    _buildDOM() {\n        this.bufferCanvas = new Canvas_1.SceneCanvas({\n            width: this.width(),\n            height: this.height(),\n        });\n        this.bufferHitCanvas = new Canvas_1.HitCanvas({\n            pixelRatio: 1,\n            width: this.width(),\n            height: this.height(),\n        });\n        if (!Global_1.Konva.isBrowser) {\n            return;\n        }\n        const container = this.container();\n        if (!container) {\n            throw 'Stage has no container. A container is required.';\n        }\n        container.innerHTML = '';\n        this.content = document.createElement('div');\n        this.content.style.position = 'relative';\n        this.content.style.userSelect = 'none';\n        this.content.className = 'konvajs-content';\n        this.content.setAttribute('role', 'presentation');\n        container.appendChild(this.content);\n        this._resizeDOM();\n    }\n    cache() {\n        Util_1.Util.warn('Cache function is not allowed for stage. You may use cache only for layers, groups and shapes.');\n        return this;\n    }\n    clearCache() {\n        return this;\n    }\n    batchDraw() {\n        this.getChildren().forEach(function (layer) {\n            layer.batchDraw();\n        });\n        return this;\n    }\n}\nexports.Stage = Stage;\nStage.prototype.nodeType = STAGE;\n(0, Global_2._registerNode)(Stage);\nFactory_1.Factory.addGetterSetter(Stage, 'container');\nif (Global_1.Konva.isBrowser) {\n    document.addEventListener('visibilitychange', () => {\n        exports.stages.forEach((stage) => {\n            stage.batchDraw();\n        });\n    });\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Shape = exports.shapes = void 0;\nconst Global_1 = require(\"./Global\");\nconst Util_1 = require(\"./Util\");\nconst Factory_1 = require(\"./Factory\");\nconst Node_1 = require(\"./Node\");\nconst Validators_1 = require(\"./Validators\");\nconst Global_2 = require(\"./Global\");\nconst PointerEvents = require(\"./PointerEvents\");\nconst HAS_SHADOW = 'hasShadow';\nconst SHADOW_RGBA = 'shadowRGBA';\nconst patternImage = 'patternImage';\nconst linearGradient = 'linearGradient';\nconst radialGradient = 'radialGradient';\nlet dummyContext;\nfunction getDummyContext() {\n    if (dummyContext) {\n        return dummyContext;\n    }\n    dummyContext = Util_1.Util.createCanvasElement().getContext('2d');\n    return dummyContext;\n}\nexports.shapes = {};\nfunction _fillFunc(context) {\n    const fillRule = this.attrs.fillRule;\n    if (fillRule) {\n        context.fill(fillRule);\n    }\n    else {\n        context.fill();\n    }\n}\nfunction _strokeFunc(context) {\n    context.stroke();\n}\nfunction _fillFuncHit(context) {\n    const fillRule = this.attrs.fillRule;\n    if (fillRule) {\n        context.fill(fillRule);\n    }\n    else {\n        context.fill();\n    }\n}\nfunction _strokeFuncHit(context) {\n    context.stroke();\n}\nfunction _clearHasShadowCache() {\n    this._clearCache(HAS_SHADOW);\n}\nfunction _clearGetShadowRGBACache() {\n    this._clearCache(SHADOW_RGBA);\n}\nfunction _clearFillPatternCache() {\n    this._clearCache(patternImage);\n}\nfunction _clearLinearGradientCache() {\n    this._clearCache(linearGradient);\n}\nfunction _clearRadialGradientCache() {\n    this._clearCache(radialGradient);\n}\nclass Shape extends Node_1.Node {\n    constructor(config) {\n        super(config);\n        let key;\n        while (true) {\n            key = Util_1.Util.getRandomColor();\n            if (key && !(key in exports.shapes)) {\n                break;\n            }\n        }\n        this.colorKey = key;\n        exports.shapes[key] = this;\n    }\n    getContext() {\n        Util_1.Util.warn('shape.getContext() method is deprecated. Please do not use it.');\n        return this.getLayer().getContext();\n    }\n    getCanvas() {\n        Util_1.Util.warn('shape.getCanvas() method is deprecated. Please do not use it.');\n        return this.getLayer().getCanvas();\n    }\n    getSceneFunc() {\n        return this.attrs.sceneFunc || this['_sceneFunc'];\n    }\n    getHitFunc() {\n        return this.attrs.hitFunc || this['_hitFunc'];\n    }\n    hasShadow() {\n        return this._getCache(HAS_SHADOW, this._hasShadow);\n    }\n    _hasShadow() {\n        return (this.shadowEnabled() &&\n            this.shadowOpacity() !== 0 &&\n            !!(this.shadowColor() ||\n                this.shadowBlur() ||\n                this.shadowOffsetX() ||\n                this.shadowOffsetY()));\n    }\n    _getFillPattern() {\n        return this._getCache(patternImage, this.__getFillPattern);\n    }\n    __getFillPattern() {\n        if (this.fillPatternImage()) {\n            const ctx = getDummyContext();\n            const pattern = ctx.createPattern(this.fillPatternImage(), this.fillPatternRepeat() || 'repeat');\n            if (pattern && pattern.setTransform) {\n                const tr = new Util_1.Transform();\n                tr.translate(this.fillPatternX(), this.fillPatternY());\n                tr.rotate(Global_1.Konva.getAngle(this.fillPatternRotation()));\n                tr.scale(this.fillPatternScaleX(), this.fillPatternScaleY());\n                tr.translate(-1 * this.fillPatternOffsetX(), -1 * this.fillPatternOffsetY());\n                const m = tr.getMatrix();\n                const matrix = typeof DOMMatrix === 'undefined'\n                    ? {\n                        a: m[0],\n                        b: m[1],\n                        c: m[2],\n                        d: m[3],\n                        e: m[4],\n                        f: m[5],\n                    }\n                    : new DOMMatrix(m);\n                pattern.setTransform(matrix);\n            }\n            return pattern;\n        }\n    }\n    _getLinearGradient() {\n        return this._getCache(linearGradient, this.__getLinearGradient);\n    }\n    __getLinearGradient() {\n        const colorStops = this.fillLinearGradientColorStops();\n        if (colorStops) {\n            const ctx = getDummyContext();\n            const start = this.fillLinearGradientStartPoint();\n            const end = this.fillLinearGradientEndPoint();\n            const grd = ctx.createLinearGradient(start.x, start.y, end.x, end.y);\n            for (let n = 0; n < colorStops.length; n += 2) {\n                grd.addColorStop(colorStops[n], colorStops[n + 1]);\n            }\n            return grd;\n        }\n    }\n    _getRadialGradient() {\n        return this._getCache(radialGradient, this.__getRadialGradient);\n    }\n    __getRadialGradient() {\n        const colorStops = this.fillRadialGradientColorStops();\n        if (colorStops) {\n            const ctx = getDummyContext();\n            const start = this.fillRadialGradientStartPoint();\n            const end = this.fillRadialGradientEndPoint();\n            const grd = ctx.createRadialGradient(start.x, start.y, this.fillRadialGradientStartRadius(), end.x, end.y, this.fillRadialGradientEndRadius());\n            for (let n = 0; n < colorStops.length; n += 2) {\n                grd.addColorStop(colorStops[n], colorStops[n + 1]);\n            }\n            return grd;\n        }\n    }\n    getShadowRGBA() {\n        return this._getCache(SHADOW_RGBA, this._getShadowRGBA);\n    }\n    _getShadowRGBA() {\n        if (!this.hasShadow()) {\n            return;\n        }\n        const rgba = Util_1.Util.colorToRGBA(this.shadowColor());\n        if (rgba) {\n            return ('rgba(' +\n                rgba.r +\n                ',' +\n                rgba.g +\n                ',' +\n                rgba.b +\n                ',' +\n                rgba.a * (this.shadowOpacity() || 1) +\n                ')');\n        }\n    }\n    hasFill() {\n        return this._calculate('hasFill', [\n            'fillEnabled',\n            'fill',\n            'fillPatternImage',\n            'fillLinearGradientColorStops',\n            'fillRadialGradientColorStops',\n        ], () => {\n            return (this.fillEnabled() &&\n                !!(this.fill() ||\n                    this.fillPatternImage() ||\n                    this.fillLinearGradientColorStops() ||\n                    this.fillRadialGradientColorStops()));\n        });\n    }\n    hasStroke() {\n        return this._calculate('hasStroke', [\n            'strokeEnabled',\n            'strokeWidth',\n            'stroke',\n            'strokeLinearGradientColorStops',\n        ], () => {\n            return (this.strokeEnabled() &&\n                this.strokeWidth() &&\n                !!(this.stroke() || this.strokeLinearGradientColorStops()));\n        });\n    }\n    hasHitStroke() {\n        const width = this.hitStrokeWidth();\n        if (width === 'auto') {\n            return this.hasStroke();\n        }\n        return this.strokeEnabled() && !!width;\n    }\n    intersects(point) {\n        const stage = this.getStage();\n        if (!stage) {\n            return false;\n        }\n        const bufferHitCanvas = stage.bufferHitCanvas;\n        bufferHitCanvas.getContext().clear();\n        this.drawHit(bufferHitCanvas, undefined, true);\n        const p = bufferHitCanvas.context.getImageData(Math.round(point.x), Math.round(point.y), 1, 1).data;\n        return p[3] > 0;\n    }\n    destroy() {\n        Node_1.Node.prototype.destroy.call(this);\n        delete exports.shapes[this.colorKey];\n        delete this.colorKey;\n        return this;\n    }\n    _useBufferCanvas(forceFill) {\n        var _a;\n        const perfectDrawEnabled = (_a = this.attrs.perfectDrawEnabled) !== null && _a !== void 0 ? _a : true;\n        if (!perfectDrawEnabled) {\n            return false;\n        }\n        const hasFill = forceFill || this.hasFill();\n        const hasStroke = this.hasStroke();\n        const isTransparent = this.getAbsoluteOpacity() !== 1;\n        if (hasFill && hasStroke && isTransparent) {\n            return true;\n        }\n        const hasShadow = this.hasShadow();\n        const strokeForShadow = this.shadowForStrokeEnabled();\n        if (hasFill && hasStroke && hasShadow && strokeForShadow) {\n            return true;\n        }\n        return false;\n    }\n    setStrokeHitEnabled(val) {\n        Util_1.Util.warn('strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead.');\n        if (val) {\n            this.hitStrokeWidth('auto');\n        }\n        else {\n            this.hitStrokeWidth(0);\n        }\n    }\n    getStrokeHitEnabled() {\n        if (this.hitStrokeWidth() === 0) {\n            return false;\n        }\n        else {\n            return true;\n        }\n    }\n    getSelfRect() {\n        const size = this.size();\n        return {\n            x: this._centroid ? -size.width / 2 : 0,\n            y: this._centroid ? -size.height / 2 : 0,\n            width: size.width,\n            height: size.height,\n        };\n    }\n    getClientRect(config = {}) {\n        let hasCachedParent = false;\n        let parent = this.getParent();\n        while (parent) {\n            if (parent.isCached()) {\n                hasCachedParent = true;\n                break;\n            }\n            parent = parent.getParent();\n        }\n        const skipTransform = config.skipTransform;\n        const relativeTo = config.relativeTo || (hasCachedParent && this.getStage()) || undefined;\n        const fillRect = this.getSelfRect();\n        const applyStroke = !config.skipStroke && this.hasStroke();\n        const strokeWidth = (applyStroke && this.strokeWidth()) || 0;\n        const fillAndStrokeWidth = fillRect.width + strokeWidth;\n        const fillAndStrokeHeight = fillRect.height + strokeWidth;\n        const applyShadow = !config.skipShadow && this.hasShadow();\n        const shadowOffsetX = applyShadow ? this.shadowOffsetX() : 0;\n        const shadowOffsetY = applyShadow ? this.shadowOffsetY() : 0;\n        const preWidth = fillAndStrokeWidth + Math.abs(shadowOffsetX);\n        const preHeight = fillAndStrokeHeight + Math.abs(shadowOffsetY);\n        const blurRadius = (applyShadow && this.shadowBlur()) || 0;\n        const width = preWidth + blurRadius * 2;\n        const height = preHeight + blurRadius * 2;\n        const rect = {\n            width: width,\n            height: height,\n            x: -(strokeWidth / 2 + blurRadius) +\n                Math.min(shadowOffsetX, 0) +\n                fillRect.x,\n            y: -(strokeWidth / 2 + blurRadius) +\n                Math.min(shadowOffsetY, 0) +\n                fillRect.y,\n        };\n        if (!skipTransform) {\n            return this._transformedRect(rect, relativeTo);\n        }\n        return rect;\n    }\n    drawScene(can, top, bufferCanvas) {\n        const layer = this.getLayer();\n        let canvas = can || layer.getCanvas(), context = canvas.getContext(), cachedCanvas = this._getCanvasCache(), drawFunc = this.getSceneFunc(), hasShadow = this.hasShadow(), stage, bufferContext;\n        const skipBuffer = canvas.isCache;\n        const cachingSelf = top === this;\n        if (!this.isVisible() && !cachingSelf) {\n            return this;\n        }\n        if (cachedCanvas) {\n            context.save();\n            const m = this.getAbsoluteTransform(top).getMatrix();\n            context.transform(m[0], m[1], m[2], m[3], m[4], m[5]);\n            this._drawCachedSceneCanvas(context);\n            context.restore();\n            return this;\n        }\n        if (!drawFunc) {\n            return this;\n        }\n        context.save();\n        if (this._useBufferCanvas() && !skipBuffer) {\n            stage = this.getStage();\n            const bc = bufferCanvas || stage.bufferCanvas;\n            bufferContext = bc.getContext();\n            bufferContext.clear();\n            bufferContext.save();\n            bufferContext._applyLineJoin(this);\n            var o = this.getAbsoluteTransform(top).getMatrix();\n            bufferContext.transform(o[0], o[1], o[2], o[3], o[4], o[5]);\n            drawFunc.call(this, bufferContext, this);\n            bufferContext.restore();\n            const ratio = bc.pixelRatio;\n            if (hasShadow) {\n                context._applyShadow(this);\n            }\n            context._applyOpacity(this);\n            context._applyGlobalCompositeOperation(this);\n            context.drawImage(bc._canvas, 0, 0, bc.width / ratio, bc.height / ratio);\n        }\n        else {\n            context._applyLineJoin(this);\n            if (!cachingSelf) {\n                var o = this.getAbsoluteTransform(top).getMatrix();\n                context.transform(o[0], o[1], o[2], o[3], o[4], o[5]);\n                context._applyOpacity(this);\n                context._applyGlobalCompositeOperation(this);\n            }\n            if (hasShadow) {\n                context._applyShadow(this);\n            }\n            drawFunc.call(this, context, this);\n        }\n        context.restore();\n        return this;\n    }\n    drawHit(can, top, skipDragCheck = false) {\n        if (!this.shouldDrawHit(top, skipDragCheck)) {\n            return this;\n        }\n        const layer = this.getLayer(), canvas = can || layer.hitCanvas, context = canvas && canvas.getContext(), drawFunc = this.hitFunc() || this.sceneFunc(), cachedCanvas = this._getCanvasCache(), cachedHitCanvas = cachedCanvas && cachedCanvas.hit;\n        if (!this.colorKey) {\n            Util_1.Util.warn('Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()');\n        }\n        if (cachedHitCanvas) {\n            context.save();\n            const m = this.getAbsoluteTransform(top).getMatrix();\n            context.transform(m[0], m[1], m[2], m[3], m[4], m[5]);\n            this._drawCachedHitCanvas(context);\n            context.restore();\n            return this;\n        }\n        if (!drawFunc) {\n            return this;\n        }\n        context.save();\n        context._applyLineJoin(this);\n        const selfCache = this === top;\n        if (!selfCache) {\n            const o = this.getAbsoluteTransform(top).getMatrix();\n            context.transform(o[0], o[1], o[2], o[3], o[4], o[5]);\n        }\n        drawFunc.call(this, context, this);\n        context.restore();\n        return this;\n    }\n    drawHitFromCache(alphaThreshold = 0) {\n        const cachedCanvas = this._getCanvasCache(), sceneCanvas = this._getCachedSceneCanvas(), hitCanvas = cachedCanvas.hit, hitContext = hitCanvas.getContext(), hitWidth = hitCanvas.getWidth(), hitHeight = hitCanvas.getHeight();\n        hitContext.clear();\n        hitContext.drawImage(sceneCanvas._canvas, 0, 0, hitWidth, hitHeight);\n        try {\n            const hitImageData = hitContext.getImageData(0, 0, hitWidth, hitHeight);\n            const hitData = hitImageData.data;\n            const len = hitData.length;\n            const rgbColorKey = Util_1.Util._hexToRgb(this.colorKey);\n            for (let i = 0; i < len; i += 4) {\n                const alpha = hitData[i + 3];\n                if (alpha > alphaThreshold) {\n                    hitData[i] = rgbColorKey.r;\n                    hitData[i + 1] = rgbColorKey.g;\n                    hitData[i + 2] = rgbColorKey.b;\n                    hitData[i + 3] = 255;\n                }\n                else {\n                    hitData[i + 3] = 0;\n                }\n            }\n            hitContext.putImageData(hitImageData, 0, 0);\n        }\n        catch (e) {\n            Util_1.Util.error('Unable to draw hit graph from cached scene canvas. ' + e.message);\n        }\n        return this;\n    }\n    hasPointerCapture(pointerId) {\n        return PointerEvents.hasPointerCapture(pointerId, this);\n    }\n    setPointerCapture(pointerId) {\n        PointerEvents.setPointerCapture(pointerId, this);\n    }\n    releaseCapture(pointerId) {\n        PointerEvents.releaseCapture(pointerId, this);\n    }\n}\nexports.Shape = Shape;\nShape.prototype._fillFunc = _fillFunc;\nShape.prototype._strokeFunc = _strokeFunc;\nShape.prototype._fillFuncHit = _fillFuncHit;\nShape.prototype._strokeFuncHit = _strokeFuncHit;\nShape.prototype._centroid = false;\nShape.prototype.nodeType = 'Shape';\n(0, Global_2._registerNode)(Shape);\nShape.prototype.eventListeners = {};\nShape.prototype.on.call(Shape.prototype, 'shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva', _clearHasShadowCache);\nShape.prototype.on.call(Shape.prototype, 'shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva', _clearGetShadowRGBACache);\nShape.prototype.on.call(Shape.prototype, 'fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva', _clearFillPatternCache);\nShape.prototype.on.call(Shape.prototype, 'fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva', _clearLinearGradientCache);\nShape.prototype.on.call(Shape.prototype, 'fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva', _clearRadialGradientCache);\nFactory_1.Factory.addGetterSetter(Shape, 'stroke', undefined, (0, Validators_1.getStringOrGradientValidator)());\nFactory_1.Factory.addGetterSetter(Shape, 'strokeWidth', 2, (0, Validators_1.getNumberValidator)());\nFactory_1.Factory.addGetterSetter(Shape, 'fillAfterStrokeEnabled', false);\nFactory_1.Factory.addGetterSetter(Shape, 'hitStrokeWidth', 'auto', (0, Validators_1.getNumberOrAutoValidator)());\nFactory_1.Factory.addGetterSetter(Shape, 'strokeHitEnabled', true, (0, Validators_1.getBooleanValidator)());\nFactory_1.Factory.addGetterSetter(Shape, 'perfectDrawEnabled', true, (0, Validators_1.getBooleanValidator)());\nFactory_1.Factory.addGetterSetter(Shape, 'shadowForStrokeEnabled', true, (0, Validators_1.getBooleanValidator)());\nFactory_1.Factory.addGetterSetter(Shape, 'lineJoin');\nFactory_1.Factory.addGetterSetter(Shape, 'lineCap');\nFactory_1.Factory.addGetterSetter(Shape, 'sceneFunc');\nFactory_1.Factory.addGetterSetter(Shape, 'hitFunc');\nFactory_1.Factory.addGetterSetter(Shape, 'dash');\nFactory_1.Factory.addGetterSetter(Shape, 'dashOffset', 0, (0, Validators_1.getNumberValidator)());\nFactory_1.Factory.addGetterSetter(Shape, 'shadowColor', undefined, (0, Validators_1.getStringValidator)());\nFactory_1.Factory.addGetterSetter(Shape, 'shadowBlur', 0, (0, Validators_1.getNumberValidator)());\nFactory_1.Factory.addGetterSetter(Shape, 'shadowOpacity', 1, (0, Validators_1.getNumberValidator)());\nFactory_1.Factory.addComponentsGetterSetter(Shape, 'shadowOffset', ['x', 'y']);\nFactory_1.Factory.addGetterSetter(Shape, 'shadowOffsetX', 0, (0, Validators_1.getNumberValidator)());\nFactory_1.Factory.addGetterSetter(Shape, 'shadowOffsetY', 0, (0, Validators_1.getNumberValidator)());\nFactory_1.Factory.addGetterSetter(Shape, 'fillPatternImage');\nFactory_1.Factory.addGetterSetter(Shape, 'fill', undefined, (0, Validators_1.getStringOrGradientValidator)());\nFactory_1.Factory.addGetterSetter(Shape, 'fillPatternX', 0, (0, Validators_1.getNumberValidator)());\nFactory_1.Factory.addGetterSetter(Shape, 'fillPatternY', 0, (0, Validators_1.getNumberValidator)());\nFactory_1.Factory.addGetterSetter(Shape, 'fillLinearGradientColorStops');\nFactory_1.Factory.addGetterSetter(Shape, 'strokeLinearGradientColorStops');\nFactory_1.Factory.addGetterSetter(Shape, 'fillRadialGradientStartRadius', 0);\nFactory_1.Factory.addGetterSetter(Shape, 'fillRadialGradientEndRadius', 0);\nFactory_1.Factory.addGetterSetter(Shape, 'fillRadialGradientColorStops');\nFactory_1.Factory.addGetterSetter(Shape, 'fillPatternRepeat', 'repeat');\nFactory_1.Factory.addGetterSetter(Shape, 'fillEnabled', true);\nFactory_1.Factory.addGetterSetter(Shape, 'strokeEnabled', true);\nFactory_1.Factory.addGetterSetter(Shape, 'shadowEnabled', true);\nFactory_1.Factory.addGetterSetter(Shape, 'dashEnabled', true);\nFactory_1.Factory.addGetterSetter(Shape, 'strokeScaleEnabled', true);\nFactory_1.Factory.addGetterSetter(Shape, 'fillPriority', 'color');\nFactory_1.Factory.addComponentsGetterSetter(Shape, 'fillPatternOffset', ['x', 'y']);\nFactory_1.Factory.addGetterSetter(Shape, 'fillPatternOffsetX', 0, (0, Validators_1.getNumberValidator)());\nFactory_1.Factory.addGetterSetter(Shape, 'fillPatternOffsetY', 0, (0, Validators_1.getNumberValidator)());\nFactory_1.Factory.addComponentsGetterSetter(Shape, 'fillPatternScale', ['x', 'y']);\nFactory_1.Factory.addGetterSetter(Shape, 'fillPatternScaleX', 1, (0, Validators_1.getNumberValidator)());\nFactory_1.Factory.addGetterSetter(Shape, 'fillPatternScaleY', 1, (0, Validators_1.getNumberValidator)());\nFactory_1.Factory.addComponentsGetterSetter(Shape, 'fillLinearGradientStartPoint', [\n    'x',\n    'y',\n]);\nFactory_1.Factory.addComponentsGetterSetter(Shape, 'strokeLinearGradientStartPoint', [\n    'x',\n    'y',\n]);\nFactory_1.Factory.addGetterSetter(Shape, 'fillLinearGradientStartPointX', 0);\nFactory_1.Factory.addGetterSetter(Shape, 'strokeLinearGradientStartPointX', 0);\nFactory_1.Factory.addGetterSetter(Shape, 'fillLinearGradientStartPointY', 0);\nFactory_1.Factory.addGetterSetter(Shape, 'strokeLinearGradientStartPointY', 0);\nFactory_1.Factory.addComponentsGetterSetter(Shape, 'fillLinearGradientEndPoint', [\n    'x',\n    'y',\n]);\nFactory_1.Factory.addComponentsGetterSetter(Shape, 'strokeLinearGradientEndPoint', [\n    'x',\n    'y',\n]);\nFactory_1.Factory.addGetterSetter(Shape, 'fillLinearGradientEndPointX', 0);\nFactory_1.Factory.addGetterSetter(Shape, 'strokeLinearGradientEndPointX', 0);\nFactory_1.Factory.addGetterSetter(Shape, 'fillLinearGradientEndPointY', 0);\nFactory_1.Factory.addGetterSetter(Shape, 'strokeLinearGradientEndPointY', 0);\nFactory_1.Factory.addComponentsGetterSetter(Shape, 'fillRadialGradientStartPoint', [\n    'x',\n    'y',\n]);\nFactory_1.Factory.addGetterSetter(Shape, 'fillRadialGradientStartPointX', 0);\nFactory_1.Factory.addGetterSetter(Shape, 'fillRadialGradientStartPointY', 0);\nFactory_1.Factory.addComponentsGetterSetter(Shape, 'fillRadialGradientEndPoint', [\n    'x',\n    'y',\n]);\nFactory_1.Factory.addGetterSetter(Shape, 'fillRadialGradientEndPointX', 0);\nFactory_1.Factory.addGetterSetter(Shape, 'fillRadialGradientEndPointY', 0);\nFactory_1.Factory.addGetterSetter(Shape, 'fillPatternRotation', 0);\nFactory_1.Factory.addGetterSetter(Shape, 'fillRule', undefined, (0, Validators_1.getStringValidator)());\nFactory_1.Factory.backCompat(Shape, {\n    dashArray: 'dash',\n    getDashArray: 'getDash',\n    setDashArray: 'getDash',\n    drawFunc: 'sceneFunc',\n    getDrawFunc: 'getSceneFunc',\n    setDrawFunc: 'setSceneFunc',\n    drawHitFunc: 'hitFunc',\n    getDrawHitFunc: 'getHitFunc',\n    setDrawHitFunc: 'setHitFunc',\n});\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Layer = void 0;\nconst Util_1 = require(\"./Util\");\nconst Container_1 = require(\"./Container\");\nconst Node_1 = require(\"./Node\");\nconst Factory_1 = require(\"./Factory\");\nconst Canvas_1 = require(\"./Canvas\");\nconst Validators_1 = require(\"./Validators\");\nconst Shape_1 = require(\"./Shape\");\nconst Global_1 = require(\"./Global\");\nconst HASH = '#', BEFORE_DRAW = 'beforeDraw', DRAW = 'draw', INTERSECTION_OFFSETS = [\n    { x: 0, y: 0 },\n    { x: -1, y: -1 },\n    { x: 1, y: -1 },\n    { x: 1, y: 1 },\n    { x: -1, y: 1 },\n], INTERSECTION_OFFSETS_LEN = INTERSECTION_OFFSETS.length;\nclass Layer extends Container_1.Container {\n    constructor(config) {\n        super(config);\n        this.canvas = new Canvas_1.SceneCanvas();\n        this.hitCanvas = new Canvas_1.HitCanvas({\n            pixelRatio: 1,\n        });\n        this._waitingForDraw = false;\n        this.on('visibleChange.konva', this._checkVisibility);\n        this._checkVisibility();\n        this.on('imageSmoothingEnabledChange.konva', this._setSmoothEnabled);\n        this._setSmoothEnabled();\n    }\n    createPNGStream() {\n        const c = this.canvas._canvas;\n        return c.createPNGStream();\n    }\n    getCanvas() {\n        return this.canvas;\n    }\n    getNativeCanvasElement() {\n        return this.canvas._canvas;\n    }\n    getHitCanvas() {\n        return this.hitCanvas;\n    }\n    getContext() {\n        return this.getCanvas().getContext();\n    }\n    clear(bounds) {\n        this.getContext().clear(bounds);\n        this.getHitCanvas().getContext().clear(bounds);\n        return this;\n    }\n    setZIndex(index) {\n        super.setZIndex(index);\n        const stage = this.getStage();\n        if (stage && stage.content) {\n            stage.content.removeChild(this.getNativeCanvasElement());\n            if (index < stage.children.length - 1) {\n                stage.content.insertBefore(this.getNativeCanvasElement(), stage.children[index + 1].getCanvas()._canvas);\n            }\n            else {\n                stage.content.appendChild(this.getNativeCanvasElement());\n            }\n        }\n        return this;\n    }\n    moveToTop() {\n        Node_1.Node.prototype.moveToTop.call(this);\n        const stage = this.getStage();\n        if (stage && stage.content) {\n            stage.content.removeChild(this.getNativeCanvasElement());\n            stage.content.appendChild(this.getNativeCanvasElement());\n        }\n        return true;\n    }\n    moveUp() {\n        const moved = Node_1.Node.prototype.moveUp.call(this);\n        if (!moved) {\n            return false;\n        }\n        const stage = this.getStage();\n        if (!stage || !stage.content) {\n            return false;\n        }\n        stage.content.removeChild(this.getNativeCanvasElement());\n        if (this.index < stage.children.length - 1) {\n            stage.content.insertBefore(this.getNativeCanvasElement(), stage.children[this.index + 1].getCanvas()._canvas);\n        }\n        else {\n            stage.content.appendChild(this.getNativeCanvasElement());\n        }\n        return true;\n    }\n    moveDown() {\n        if (Node_1.Node.prototype.moveDown.call(this)) {\n            const stage = this.getStage();\n            if (stage) {\n                const children = stage.children;\n                if (stage.content) {\n                    stage.content.removeChild(this.getNativeCanvasElement());\n                    stage.content.insertBefore(this.getNativeCanvasElement(), children[this.index + 1].getCanvas()._canvas);\n                }\n            }\n            return true;\n        }\n        return false;\n    }\n    moveToBottom() {\n        if (Node_1.Node.prototype.moveToBottom.call(this)) {\n            const stage = this.getStage();\n            if (stage) {\n                const children = stage.children;\n                if (stage.content) {\n                    stage.content.removeChild(this.getNativeCanvasElement());\n                    stage.content.insertBefore(this.getNativeCanvasElement(), children[1].getCanvas()._canvas);\n                }\n            }\n            return true;\n        }\n        return false;\n    }\n    getLayer() {\n        return this;\n    }\n    remove() {\n        const _canvas = this.getNativeCanvasElement();\n        Node_1.Node.prototype.remove.call(this);\n        if (_canvas && _canvas.parentNode && Util_1.Util._isInDocument(_canvas)) {\n            _canvas.parentNode.removeChild(_canvas);\n        }\n        return this;\n    }\n    getStage() {\n        return this.parent;\n    }\n    setSize({ width, height }) {\n        this.canvas.setSize(width, height);\n        this.hitCanvas.setSize(width, height);\n        this._setSmoothEnabled();\n        return this;\n    }\n    _validateAdd(child) {\n        const type = child.getType();\n        if (type !== 'Group' && type !== 'Shape') {\n            Util_1.Util.throw('You may only add groups and shapes to a layer.');\n        }\n    }\n    _toKonvaCanvas(config) {\n        config = config || {};\n        config.width = config.width || this.getWidth();\n        config.height = config.height || this.getHeight();\n        config.x = config.x !== undefined ? config.x : this.x();\n        config.y = config.y !== undefined ? config.y : this.y();\n        return Node_1.Node.prototype._toKonvaCanvas.call(this, config);\n    }\n    _checkVisibility() {\n        const visible = this.visible();\n        if (visible) {\n            this.canvas._canvas.style.display = 'block';\n        }\n        else {\n            this.canvas._canvas.style.display = 'none';\n        }\n    }\n    _setSmoothEnabled() {\n        this.getContext()._context.imageSmoothingEnabled =\n            this.imageSmoothingEnabled();\n    }\n    getWidth() {\n        if (this.parent) {\n            return this.parent.width();\n        }\n    }\n    setWidth() {\n        Util_1.Util.warn('Can not change width of layer. Use \"stage.width(value)\" function instead.');\n    }\n    getHeight() {\n        if (this.parent) {\n            return this.parent.height();\n        }\n    }\n    setHeight() {\n        Util_1.Util.warn('Can not change height of layer. Use \"stage.height(value)\" function instead.');\n    }\n    batchDraw() {\n        if (!this._waitingForDraw) {\n            this._waitingForDraw = true;\n            Util_1.Util.requestAnimFrame(() => {\n                this.draw();\n                this._waitingForDraw = false;\n            });\n        }\n        return this;\n    }\n    getIntersection(pos) {\n        if (!this.isListening() || !this.isVisible()) {\n            return null;\n        }\n        let spiralSearchDistance = 1;\n        let continueSearch = false;\n        while (true) {\n            for (let i = 0; i < INTERSECTION_OFFSETS_LEN; i++) {\n                const intersectionOffset = INTERSECTION_OFFSETS[i];\n                const obj = this._getIntersection({\n                    x: pos.x + intersectionOffset.x * spiralSearchDistance,\n                    y: pos.y + intersectionOffset.y * spiralSearchDistance,\n                });\n                const shape = obj.shape;\n                if (shape) {\n                    return shape;\n                }\n                continueSearch = !!obj.antialiased;\n                if (!obj.antialiased) {\n                    break;\n                }\n            }\n            if (continueSearch) {\n                spiralSearchDistance += 1;\n            }\n            else {\n                return null;\n            }\n        }\n    }\n    _getIntersection(pos) {\n        const ratio = this.hitCanvas.pixelRatio;\n        const p = this.hitCanvas.context.getImageData(Math.round(pos.x * ratio), Math.round(pos.y * ratio), 1, 1).data;\n        const p3 = p[3];\n        if (p3 === 255) {\n            const colorKey = Util_1.Util._rgbToHex(p[0], p[1], p[2]);\n            const shape = Shape_1.shapes[HASH + colorKey];\n            if (shape) {\n                return {\n                    shape: shape,\n                };\n            }\n            return {\n                antialiased: true,\n            };\n        }\n        else if (p3 > 0) {\n            return {\n                antialiased: true,\n            };\n        }\n        return {};\n    }\n    drawScene(can, top) {\n        const layer = this.getLayer(), canvas = can || (layer && layer.getCanvas());\n        this._fire(BEFORE_DRAW, {\n            node: this,\n        });\n        if (this.clearBeforeDraw()) {\n            canvas.getContext().clear();\n        }\n        Container_1.Container.prototype.drawScene.call(this, canvas, top);\n        this._fire(DRAW, {\n            node: this,\n        });\n        return this;\n    }\n    drawHit(can, top) {\n        const layer = this.getLayer(), canvas = can || (layer && layer.hitCanvas);\n        if (layer && layer.clearBeforeDraw()) {\n            layer.getHitCanvas().getContext().clear();\n        }\n        Container_1.Container.prototype.drawHit.call(this, canvas, top);\n        return this;\n    }\n    enableHitGraph() {\n        this.hitGraphEnabled(true);\n        return this;\n    }\n    disableHitGraph() {\n        this.hitGraphEnabled(false);\n        return this;\n    }\n    setHitGraphEnabled(val) {\n        Util_1.Util.warn('hitGraphEnabled method is deprecated. Please use layer.listening() instead.');\n        this.listening(val);\n    }\n    getHitGraphEnabled(val) {\n        Util_1.Util.warn('hitGraphEnabled method is deprecated. Please use layer.listening() instead.');\n        return this.listening();\n    }\n    toggleHitCanvas() {\n        if (!this.parent || !this.parent['content']) {\n            return;\n        }\n        const parent = this.parent;\n        const added = !!this.hitCanvas._canvas.parentNode;\n        if (added) {\n            parent.content.removeChild(this.hitCanvas._canvas);\n        }\n        else {\n            parent.content.appendChild(this.hitCanvas._canvas);\n        }\n    }\n    destroy() {\n        Util_1.Util.releaseCanvas(this.getNativeCanvasElement(), this.getHitCanvas()._canvas);\n        return super.destroy();\n    }\n}\nexports.Layer = Layer;\nLayer.prototype.nodeType = 'Layer';\n(0, Global_1._registerNode)(Layer);\nFactory_1.Factory.addGetterSetter(Layer, 'imageSmoothingEnabled', true);\nFactory_1.Factory.addGetterSetter(Layer, 'clearBeforeDraw', true);\nFactory_1.Factory.addGetterSetter(Layer, 'hitGraphEnabled', true, (0, Validators_1.getBooleanValidator)());\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.FastLayer = void 0;\nconst Util_1 = require(\"./Util\");\nconst Layer_1 = require(\"./Layer\");\nconst Global_1 = require(\"./Global\");\nclass FastLayer extends Layer_1.Layer {\n    constructor(attrs) {\n        super(attrs);\n        this.listening(false);\n        Util_1.Util.warn('Konva.Fast layer is deprecated. Please use \"new Konva.Layer({ listening: false })\" instead.');\n    }\n}\nexports.FastLayer = FastLayer;\nFastLayer.prototype.nodeType = 'FastLayer';\n(0, Global_1._registerNode)(FastLayer);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Group = void 0;\nconst Util_1 = require(\"./Util\");\nconst Container_1 = require(\"./Container\");\nconst Global_1 = require(\"./Global\");\nclass Group extends Container_1.Container {\n    _validateAdd(child) {\n        const type = child.getType();\n        if (type !== 'Group' && type !== 'Shape') {\n            Util_1.Util.throw('You may only add groups and shapes to groups.');\n        }\n    }\n}\nexports.Group = Group;\nGroup.prototype.nodeType = 'Group';\n(0, Global_1._registerNode)(Group);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Animation = void 0;\nconst Global_1 = require(\"./Global\");\nconst Util_1 = require(\"./Util\");\nconst now = (function () {\n    if (Global_1.glob.performance && Global_1.glob.performance.now) {\n        return function () {\n            return Global_1.glob.performance.now();\n        };\n    }\n    return function () {\n        return new Date().getTime();\n    };\n})();\nclass Animation {\n    constructor(func, layers) {\n        this.id = Animation.animIdCounter++;\n        this.frame = {\n            time: 0,\n            timeDiff: 0,\n            lastTime: now(),\n            frameRate: 0,\n        };\n        this.func = func;\n        this.setLayers(layers);\n    }\n    setLayers(layers) {\n        let lays = [];\n        if (layers) {\n            lays = Array.isArray(layers) ? layers : [layers];\n        }\n        this.layers = lays;\n        return this;\n    }\n    getLayers() {\n        return this.layers;\n    }\n    addLayer(layer) {\n        const layers = this.layers;\n        const len = layers.length;\n        for (let n = 0; n < len; n++) {\n            if (layers[n]._id === layer._id) {\n                return false;\n            }\n        }\n        this.layers.push(layer);\n        return true;\n    }\n    isRunning() {\n        const a = Animation;\n        const animations = a.animations;\n        const len = animations.length;\n        for (let n = 0; n < len; n++) {\n            if (animations[n].id === this.id) {\n                return true;\n            }\n        }\n        return false;\n    }\n    start() {\n        this.stop();\n        this.frame.timeDiff = 0;\n        this.frame.lastTime = now();\n        Animation._addAnimation(this);\n        return this;\n    }\n    stop() {\n        Animation._removeAnimation(this);\n        return this;\n    }\n    _updateFrameObject(time) {\n        this.frame.timeDiff = time - this.frame.lastTime;\n        this.frame.lastTime = time;\n        this.frame.time += this.frame.timeDiff;\n        this.frame.frameRate = 1000 / this.frame.timeDiff;\n    }\n    static _addAnimation(anim) {\n        this.animations.push(anim);\n        this._handleAnimation();\n    }\n    static _removeAnimation(anim) {\n        const id = anim.id;\n        const animations = this.animations;\n        const len = animations.length;\n        for (let n = 0; n < len; n++) {\n            if (animations[n].id === id) {\n                this.animations.splice(n, 1);\n                break;\n            }\n        }\n    }\n    static _runFrames() {\n        const layerHash = {};\n        const animations = this.animations;\n        for (let n = 0; n < animations.length; n++) {\n            const anim = animations[n];\n            const layers = anim.layers;\n            const func = anim.func;\n            anim._updateFrameObject(now());\n            const layersLen = layers.length;\n            let needRedraw;\n            if (func) {\n                needRedraw = func.call(anim, anim.frame) !== false;\n            }\n            else {\n                needRedraw = true;\n            }\n            if (!needRedraw) {\n                continue;\n            }\n            for (let i = 0; i < layersLen; i++) {\n                const layer = layers[i];\n                if (layer._id !== undefined) {\n                    layerHash[layer._id] = layer;\n                }\n            }\n        }\n        for (const key in layerHash) {\n            if (!layerHash.hasOwnProperty(key)) {\n                continue;\n            }\n            layerHash[key].batchDraw();\n        }\n    }\n    static _animationLoop() {\n        const Anim = Animation;\n        if (Anim.animations.length) {\n            Anim._runFrames();\n            Util_1.Util.requestAnimFrame(Anim._animationLoop);\n        }\n        else {\n            Anim.animRunning = false;\n        }\n    }\n    static _handleAnimation() {\n        if (!this.animRunning) {\n            this.animRunning = true;\n            Util_1.Util.requestAnimFrame(this._animationLoop);\n        }\n    }\n}\nexports.Animation = Animation;\nAnimation.animations = [];\nAnimation.animIdCounter = 0;\nAnimation.animRunning = false;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Easings = exports.Tween = void 0;\nconst Util_1 = require(\"./Util\");\nconst Animation_1 = require(\"./Animation\");\nconst Node_1 = require(\"./Node\");\nconst Global_1 = require(\"./Global\");\nconst blacklist = {\n    node: 1,\n    duration: 1,\n    easing: 1,\n    onFinish: 1,\n    yoyo: 1,\n}, PAUSED = 1, PLAYING = 2, REVERSING = 3, colorAttrs = ['fill', 'stroke', 'shadowColor'];\nlet idCounter = 0;\nclass TweenEngine {\n    constructor(prop, propFunc, func, begin, finish, duration, yoyo) {\n        this.prop = prop;\n        this.propFunc = propFunc;\n        this.begin = begin;\n        this._pos = begin;\n        this.duration = duration;\n        this._change = 0;\n        this.prevPos = 0;\n        this.yoyo = yoyo;\n        this._time = 0;\n        this._position = 0;\n        this._startTime = 0;\n        this._finish = 0;\n        this.func = func;\n        this._change = finish - this.begin;\n        this.pause();\n    }\n    fire(str) {\n        const handler = this[str];\n        if (handler) {\n            handler();\n        }\n    }\n    setTime(t) {\n        if (t > this.duration) {\n            if (this.yoyo) {\n                this._time = this.duration;\n                this.reverse();\n            }\n            else {\n                this.finish();\n            }\n        }\n        else if (t < 0) {\n            if (this.yoyo) {\n                this._time = 0;\n                this.play();\n            }\n            else {\n                this.reset();\n            }\n        }\n        else {\n            this._time = t;\n            this.update();\n        }\n    }\n    getTime() {\n        return this._time;\n    }\n    setPosition(p) {\n        this.prevPos = this._pos;\n        this.propFunc(p);\n        this._pos = p;\n    }\n    getPosition(t) {\n        if (t === undefined) {\n            t = this._time;\n        }\n        return this.func(t, this.begin, this._change, this.duration);\n    }\n    play() {\n        this.state = PLAYING;\n        this._startTime = this.getTimer() - this._time;\n        this.onEnterFrame();\n        this.fire('onPlay');\n    }\n    reverse() {\n        this.state = REVERSING;\n        this._time = this.duration - this._time;\n        this._startTime = this.getTimer() - this._time;\n        this.onEnterFrame();\n        this.fire('onReverse');\n    }\n    seek(t) {\n        this.pause();\n        this._time = t;\n        this.update();\n        this.fire('onSeek');\n    }\n    reset() {\n        this.pause();\n        this._time = 0;\n        this.update();\n        this.fire('onReset');\n    }\n    finish() {\n        this.pause();\n        this._time = this.duration;\n        this.update();\n        this.fire('onFinish');\n    }\n    update() {\n        this.setPosition(this.getPosition(this._time));\n        this.fire('onUpdate');\n    }\n    onEnterFrame() {\n        const t = this.getTimer() - this._startTime;\n        if (this.state === PLAYING) {\n            this.setTime(t);\n        }\n        else if (this.state === REVERSING) {\n            this.setTime(this.duration - t);\n        }\n    }\n    pause() {\n        this.state = PAUSED;\n        this.fire('onPause');\n    }\n    getTimer() {\n        return new Date().getTime();\n    }\n}\nclass Tween {\n    constructor(config) {\n        const that = this, node = config.node, nodeId = node._id, easing = config.easing || exports.Easings.Linear, yoyo = !!config.yoyo;\n        let duration, key;\n        if (typeof config.duration === 'undefined') {\n            duration = 0.3;\n        }\n        else if (config.duration === 0) {\n            duration = 0.001;\n        }\n        else {\n            duration = config.duration;\n        }\n        this.node = node;\n        this._id = idCounter++;\n        const layers = node.getLayer() ||\n            (node instanceof Global_1.Konva['Stage'] ? node.getLayers() : null);\n        if (!layers) {\n            Util_1.Util.error('Tween constructor have `node` that is not in a layer. Please add node into layer first.');\n        }\n        this.anim = new Animation_1.Animation(function () {\n            that.tween.onEnterFrame();\n        }, layers);\n        this.tween = new TweenEngine(key, function (i) {\n            that._tweenFunc(i);\n        }, easing, 0, 1, duration * 1000, yoyo);\n        this._addListeners();\n        if (!Tween.attrs[nodeId]) {\n            Tween.attrs[nodeId] = {};\n        }\n        if (!Tween.attrs[nodeId][this._id]) {\n            Tween.attrs[nodeId][this._id] = {};\n        }\n        if (!Tween.tweens[nodeId]) {\n            Tween.tweens[nodeId] = {};\n        }\n        for (key in config) {\n            if (blacklist[key] === undefined) {\n                this._addAttr(key, config[key]);\n            }\n        }\n        this.reset();\n        this.onFinish = config.onFinish;\n        this.onReset = config.onReset;\n        this.onUpdate = config.onUpdate;\n    }\n    _addAttr(key, end) {\n        const node = this.node, nodeId = node._id;\n        let diff, len, trueEnd, trueStart, endRGBA;\n        const tweenId = Tween.tweens[nodeId][key];\n        if (tweenId) {\n            delete Tween.attrs[nodeId][tweenId][key];\n        }\n        let start = node.getAttr(key);\n        if (Util_1.Util._isArray(end)) {\n            diff = [];\n            len = Math.max(end.length, start.length);\n            if (key === 'points' && end.length !== start.length) {\n                if (end.length > start.length) {\n                    trueStart = start;\n                    start = Util_1.Util._prepareArrayForTween(start, end, node.closed());\n                }\n                else {\n                    trueEnd = end;\n                    end = Util_1.Util._prepareArrayForTween(end, start, node.closed());\n                }\n            }\n            if (key.indexOf('fill') === 0) {\n                for (let n = 0; n < len; n++) {\n                    if (n % 2 === 0) {\n                        diff.push(end[n] - start[n]);\n                    }\n                    else {\n                        const startRGBA = Util_1.Util.colorToRGBA(start[n]);\n                        endRGBA = Util_1.Util.colorToRGBA(end[n]);\n                        start[n] = startRGBA;\n                        diff.push({\n                            r: endRGBA.r - startRGBA.r,\n                            g: endRGBA.g - startRGBA.g,\n                            b: endRGBA.b - startRGBA.b,\n                            a: endRGBA.a - startRGBA.a,\n                        });\n                    }\n                }\n            }\n            else {\n                for (let n = 0; n < len; n++) {\n                    diff.push(end[n] - start[n]);\n                }\n            }\n        }\n        else if (colorAttrs.indexOf(key) !== -1) {\n            start = Util_1.Util.colorToRGBA(start);\n            endRGBA = Util_1.Util.colorToRGBA(end);\n            diff = {\n                r: endRGBA.r - start.r,\n                g: endRGBA.g - start.g,\n                b: endRGBA.b - start.b,\n                a: endRGBA.a - start.a,\n            };\n        }\n        else {\n            diff = end - start;\n        }\n        Tween.attrs[nodeId][this._id][key] = {\n            start: start,\n            diff: diff,\n            end: end,\n            trueEnd: trueEnd,\n            trueStart: trueStart,\n        };\n        Tween.tweens[nodeId][key] = this._id;\n    }\n    _tweenFunc(i) {\n        const node = this.node, attrs = Tween.attrs[node._id][this._id];\n        let key, attr, start, diff, newVal, n, len, end;\n        for (key in attrs) {\n            attr = attrs[key];\n            start = attr.start;\n            diff = attr.diff;\n            end = attr.end;\n            if (Util_1.Util._isArray(start)) {\n                newVal = [];\n                len = Math.max(start.length, end.length);\n                if (key.indexOf('fill') === 0) {\n                    for (n = 0; n < len; n++) {\n                        if (n % 2 === 0) {\n                            newVal.push((start[n] || 0) + diff[n] * i);\n                        }\n                        else {\n                            newVal.push('rgba(' +\n                                Math.round(start[n].r + diff[n].r * i) +\n                                ',' +\n                                Math.round(start[n].g + diff[n].g * i) +\n                                ',' +\n                                Math.round(start[n].b + diff[n].b * i) +\n                                ',' +\n                                (start[n].a + diff[n].a * i) +\n                                ')');\n                        }\n                    }\n                }\n                else {\n                    for (n = 0; n < len; n++) {\n                        newVal.push((start[n] || 0) + diff[n] * i);\n                    }\n                }\n            }\n            else if (colorAttrs.indexOf(key) !== -1) {\n                newVal =\n                    'rgba(' +\n                        Math.round(start.r + diff.r * i) +\n                        ',' +\n                        Math.round(start.g + diff.g * i) +\n                        ',' +\n                        Math.round(start.b + diff.b * i) +\n                        ',' +\n                        (start.a + diff.a * i) +\n                        ')';\n            }\n            else {\n                newVal = start + diff * i;\n            }\n            node.setAttr(key, newVal);\n        }\n    }\n    _addListeners() {\n        this.tween.onPlay = () => {\n            this.anim.start();\n        };\n        this.tween.onReverse = () => {\n            this.anim.start();\n        };\n        this.tween.onPause = () => {\n            this.anim.stop();\n        };\n        this.tween.onFinish = () => {\n            const node = this.node;\n            const attrs = Tween.attrs[node._id][this._id];\n            if (attrs.points && attrs.points.trueEnd) {\n                node.setAttr('points', attrs.points.trueEnd);\n            }\n            if (this.onFinish) {\n                this.onFinish.call(this);\n            }\n        };\n        this.tween.onReset = () => {\n            const node = this.node;\n            const attrs = Tween.attrs[node._id][this._id];\n            if (attrs.points && attrs.points.trueStart) {\n                node.points(attrs.points.trueStart);\n            }\n            if (this.onReset) {\n                this.onReset();\n            }\n        };\n        this.tween.onUpdate = () => {\n            if (this.onUpdate) {\n                this.onUpdate.call(this);\n            }\n        };\n    }\n    play() {\n        this.tween.play();\n        return this;\n    }\n    reverse() {\n        this.tween.reverse();\n        return this;\n    }\n    reset() {\n        this.tween.reset();\n        return this;\n    }\n    seek(t) {\n        this.tween.seek(t * 1000);\n        return this;\n    }\n    pause() {\n        this.tween.pause();\n        return this;\n    }\n    finish() {\n        this.tween.finish();\n        return this;\n    }\n    destroy() {\n        const nodeId = this.node._id, thisId = this._id, attrs = Tween.tweens[nodeId];\n        this.pause();\n        for (const key in attrs) {\n            delete Tween.tweens[nodeId][key];\n        }\n        delete Tween.attrs[nodeId][thisId];\n    }\n}\nexports.Tween = Tween;\nTween.attrs = {};\nTween.tweens = {};\nNode_1.Node.prototype.to = function (params) {\n    const onFinish = params.onFinish;\n    params.node = this;\n    params.onFinish = function () {\n        this.destroy();\n        if (onFinish) {\n            onFinish();\n        }\n    };\n    const tween = new Tween(params);\n    tween.play();\n};\nexports.Easings = {\n    BackEaseIn(t, b, c, d) {\n        const s = 1.70158;\n        return c * (t /= d) * t * ((s + 1) * t - s) + b;\n    },\n    BackEaseOut(t, b, c, d) {\n        const s = 1.70158;\n        return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b;\n    },\n    BackEaseInOut(t, b, c, d) {\n        let s = 1.70158;\n        if ((t /= d / 2) < 1) {\n            return (c / 2) * (t * t * (((s *= 1.525) + 1) * t - s)) + b;\n        }\n        return (c / 2) * ((t -= 2) * t * (((s *= 1.525) + 1) * t + s) + 2) + b;\n    },\n    ElasticEaseIn(t, b, c, d, a, p) {\n        let s = 0;\n        if (t === 0) {\n            return b;\n        }\n        if ((t /= d) === 1) {\n            return b + c;\n        }\n        if (!p) {\n            p = d * 0.3;\n        }\n        if (!a || a < Math.abs(c)) {\n            a = c;\n            s = p / 4;\n        }\n        else {\n            s = (p / (2 * Math.PI)) * Math.asin(c / a);\n        }\n        return (-(a *\n            Math.pow(2, 10 * (t -= 1)) *\n            Math.sin(((t * d - s) * (2 * Math.PI)) / p)) + b);\n    },\n    ElasticEaseOut(t, b, c, d, a, p) {\n        let s = 0;\n        if (t === 0) {\n            return b;\n        }\n        if ((t /= d) === 1) {\n            return b + c;\n        }\n        if (!p) {\n            p = d * 0.3;\n        }\n        if (!a || a < Math.abs(c)) {\n            a = c;\n            s = p / 4;\n        }\n        else {\n            s = (p / (2 * Math.PI)) * Math.asin(c / a);\n        }\n        return (a * Math.pow(2, -10 * t) * Math.sin(((t * d - s) * (2 * Math.PI)) / p) +\n            c +\n            b);\n    },\n    ElasticEaseInOut(t, b, c, d, a, p) {\n        let s = 0;\n        if (t === 0) {\n            return b;\n        }\n        if ((t /= d / 2) === 2) {\n            return b + c;\n        }\n        if (!p) {\n            p = d * (0.3 * 1.5);\n        }\n        if (!a || a < Math.abs(c)) {\n            a = c;\n            s = p / 4;\n        }\n        else {\n            s = (p / (2 * Math.PI)) * Math.asin(c / a);\n        }\n        if (t < 1) {\n            return (-0.5 *\n                (a *\n                    Math.pow(2, 10 * (t -= 1)) *\n                    Math.sin(((t * d - s) * (2 * Math.PI)) / p)) +\n                b);\n        }\n        return (a *\n            Math.pow(2, -10 * (t -= 1)) *\n            Math.sin(((t * d - s) * (2 * Math.PI)) / p) *\n            0.5 +\n            c +\n            b);\n    },\n    BounceEaseOut(t, b, c, d) {\n        if ((t /= d) < 1 / 2.75) {\n            return c * (7.5625 * t * t) + b;\n        }\n        else if (t < 2 / 2.75) {\n            return c * (7.5625 * (t -= 1.5 / 2.75) * t + 0.75) + b;\n        }\n        else if (t < 2.5 / 2.75) {\n            return c * (7.5625 * (t -= 2.25 / 2.75) * t + 0.9375) + b;\n        }\n        else {\n            return c * (7.5625 * (t -= 2.625 / 2.75) * t + 0.984375) + b;\n        }\n    },\n    BounceEaseIn(t, b, c, d) {\n        return c - exports.Easings.BounceEaseOut(d - t, 0, c, d) + b;\n    },\n    BounceEaseInOut(t, b, c, d) {\n        if (t < d / 2) {\n            return exports.Easings.BounceEaseIn(t * 2, 0, c, d) * 0.5 + b;\n        }\n        else {\n            return exports.Easings.BounceEaseOut(t * 2 - d, 0, c, d) * 0.5 + c * 0.5 + b;\n        }\n    },\n    EaseIn(t, b, c, d) {\n        return c * (t /= d) * t + b;\n    },\n    EaseOut(t, b, c, d) {\n        return -c * (t /= d) * (t - 2) + b;\n    },\n    EaseInOut(t, b, c, d) {\n        if ((t /= d / 2) < 1) {\n            return (c / 2) * t * t + b;\n        }\n        return (-c / 2) * (--t * (t - 2) - 1) + b;\n    },\n    StrongEaseIn(t, b, c, d) {\n        return c * (t /= d) * t * t * t * t + b;\n    },\n    StrongEaseOut(t, b, c, d) {\n        return c * ((t = t / d - 1) * t * t * t * t + 1) + b;\n    },\n    StrongEaseInOut(t, b, c, d) {\n        if ((t /= d / 2) < 1) {\n            return (c / 2) * t * t * t * t * t + b;\n        }\n        return (c / 2) * ((t -= 2) * t * t * t * t + 2) + b;\n    },\n    Linear(t, b, c, d) {\n        return (c * t) / d + b;\n    },\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Konva = void 0;\nconst Global_1 = require(\"./Global\");\nconst Util_1 = require(\"./Util\");\nconst Node_1 = require(\"./Node\");\nconst Container_1 = require(\"./Container\");\nconst Stage_1 = require(\"./Stage\");\nconst Layer_1 = require(\"./Layer\");\nconst FastLayer_1 = require(\"./FastLayer\");\nconst Group_1 = require(\"./Group\");\nconst DragAndDrop_1 = require(\"./DragAndDrop\");\nconst Shape_1 = require(\"./Shape\");\nconst Animation_1 = require(\"./Animation\");\nconst Tween_1 = require(\"./Tween\");\nconst Context_1 = require(\"./Context\");\nconst Canvas_1 = require(\"./Canvas\");\nexports.Konva = Util_1.Util._assign(Global_1.Konva, {\n    Util: Util_1.Util,\n    Transform: Util_1.Transform,\n    Node: Node_1.Node,\n    Container: Container_1.Container,\n    Stage: Stage_1.Stage,\n    stages: Stage_1.stages,\n    Layer: Layer_1.Layer,\n    FastLayer: FastLayer_1.FastLayer,\n    Group: Group_1.Group,\n    DD: DragAndDrop_1.DD,\n    Shape: Shape_1.Shape,\n    shapes: Shape_1.shapes,\n    Animation: Animation_1.Animation,\n    Tween: Tween_1.Tween,\n    Easings: Tween_1.Easings,\n    Context: Context_1.Context,\n    Canvas: Canvas_1.Canvas,\n});\nexports.default = exports.Konva;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Konva = void 0;\nvar _CoreInternals_1 = require(\"./_CoreInternals\");\nObject.defineProperty(exports, \"Konva\", { enumerable: true, get: function () { return _CoreInternals_1.Konva; } });\nconst _CoreInternals_2 = require(\"./_CoreInternals\");\nmodule.exports = _CoreInternals_2.Konva;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Line = void 0;\nconst Factory_1 = require(\"../Factory\");\nconst Global_1 = require(\"../Global\");\nconst Shape_1 = require(\"../Shape\");\nconst Validators_1 = require(\"../Validators\");\nfunction getControlPoints(x0, y0, x1, y1, x2, y2, t) {\n    const d01 = Math.sqrt(Math.pow(x1 - x0, 2) + Math.pow(y1 - y0, 2)), d12 = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2)), fa = (t * d01) / (d01 + d12), fb = (t * d12) / (d01 + d12), p1x = x1 - fa * (x2 - x0), p1y = y1 - fa * (y2 - y0), p2x = x1 + fb * (x2 - x0), p2y = y1 + fb * (y2 - y0);\n    return [p1x, p1y, p2x, p2y];\n}\nfunction expandPoints(p, tension) {\n    const len = p.length, allPoints = [];\n    for (let n = 2; n < len - 2; n += 2) {\n        const cp = getControlPoints(p[n - 2], p[n - 1], p[n], p[n + 1], p[n + 2], p[n + 3], tension);\n        if (isNaN(cp[0])) {\n            continue;\n        }\n        allPoints.push(cp[0]);\n        allPoints.push(cp[1]);\n        allPoints.push(p[n]);\n        allPoints.push(p[n + 1]);\n        allPoints.push(cp[2]);\n        allPoints.push(cp[3]);\n    }\n    return allPoints;\n}\nclass Line extends Shape_1.Shape {\n    constructor(config) {\n        super(config);\n        this.on('pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva', function () {\n            this._clearCache('tensionPoints');\n        });\n    }\n    _sceneFunc(context) {\n        let points = this.points(), length = points.length, tension = this.tension(), closed = this.closed(), bezier = this.bezier(), tp, len, n;\n        if (!length) {\n            return;\n        }\n        context.beginPath();\n        context.moveTo(points[0], points[1]);\n        if (tension !== 0 && length > 4) {\n            tp = this.getTensionPoints();\n            len = tp.length;\n            n = closed ? 0 : 4;\n            if (!closed) {\n                context.quadraticCurveTo(tp[0], tp[1], tp[2], tp[3]);\n            }\n            while (n < len - 2) {\n                context.bezierCurveTo(tp[n++], tp[n++], tp[n++], tp[n++], tp[n++], tp[n++]);\n            }\n            if (!closed) {\n                context.quadraticCurveTo(tp[len - 2], tp[len - 1], points[length - 2], points[length - 1]);\n            }\n        }\n        else if (bezier) {\n            n = 2;\n            while (n < length) {\n                context.bezierCurveTo(points[n++], points[n++], points[n++], points[n++], points[n++], points[n++]);\n            }\n        }\n        else {\n            for (n = 2; n < length; n += 2) {\n                context.lineTo(points[n], points[n + 1]);\n            }\n        }\n        if (closed) {\n            context.closePath();\n            context.fillStrokeShape(this);\n        }\n        else {\n            context.strokeShape(this);\n        }\n    }\n    getTensionPoints() {\n        return this._getCache('tensionPoints', this._getTensionPoints);\n    }\n    _getTensionPoints() {\n        if (this.closed()) {\n            return this._getTensionPointsClosed();\n        }\n        else {\n            return expandPoints(this.points(), this.tension());\n        }\n    }\n    _getTensionPointsClosed() {\n        const p = this.points(), len = p.length, tension = this.tension(), firstControlPoints = getControlPoints(p[len - 2], p[len - 1], p[0], p[1], p[2], p[3], tension), lastControlPoints = getControlPoints(p[len - 4], p[len - 3], p[len - 2], p[len - 1], p[0], p[1], tension), middle = expandPoints(p, tension), tp = [firstControlPoints[2], firstControlPoints[3]]\n            .concat(middle)\n            .concat([\n            lastControlPoints[0],\n            lastControlPoints[1],\n            p[len - 2],\n            p[len - 1],\n            lastControlPoints[2],\n            lastControlPoints[3],\n            firstControlPoints[0],\n            firstControlPoints[1],\n            p[0],\n            p[1],\n        ]);\n        return tp;\n    }\n    getWidth() {\n        return this.getSelfRect().width;\n    }\n    getHeight() {\n        return this.getSelfRect().height;\n    }\n    getSelfRect() {\n        let points = this.points();\n        if (points.length < 4) {\n            return {\n                x: points[0] || 0,\n                y: points[1] || 0,\n                width: 0,\n                height: 0,\n            };\n        }\n        if (this.tension() !== 0) {\n            points = [\n                points[0],\n                points[1],\n                ...this._getTensionPoints(),\n                points[points.length - 2],\n                points[points.length - 1],\n            ];\n        }\n        else {\n            points = this.points();\n        }\n        let minX = points[0];\n        let maxX = points[0];\n        let minY = points[1];\n        let maxY = points[1];\n        let x, y;\n        for (let i = 0; i < points.length / 2; i++) {\n            x = points[i * 2];\n            y = points[i * 2 + 1];\n            minX = Math.min(minX, x);\n            maxX = Math.max(maxX, x);\n            minY = Math.min(minY, y);\n            maxY = Math.max(maxY, y);\n        }\n        return {\n            x: minX,\n            y: minY,\n            width: maxX - minX,\n            height: maxY - minY,\n        };\n    }\n}\nexports.Line = Line;\nLine.prototype.className = 'Line';\nLine.prototype._attrsAffectingSize = ['points', 'bezier', 'tension'];\n(0, Global_1._registerNode)(Line);\nFactory_1.Factory.addGetterSetter(Line, 'closed', false);\nFactory_1.Factory.addGetterSetter(Line, 'bezier', false);\nFactory_1.Factory.addGetterSetter(Line, 'tension', 0, (0, Validators_1.getNumberValidator)());\nFactory_1.Factory.addGetterSetter(Line, 'points', [], (0, Validators_1.getNumberArrayValidator)());\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Rect = void 0;\nconst Factory_1 = require(\"../Factory\");\nconst Shape_1 = require(\"../Shape\");\nconst Global_1 = require(\"../Global\");\nconst Util_1 = require(\"../Util\");\nconst Validators_1 = require(\"../Validators\");\nclass Rect extends Shape_1.Shape {\n    _sceneFunc(context) {\n        const cornerRadius = this.cornerRadius(), width = this.width(), height = this.height();\n        context.beginPath();\n        if (!cornerRadius) {\n            context.rect(0, 0, width, height);\n        }\n        else {\n            Util_1.Util.drawRoundedRectPath(context, width, height, cornerRadius);\n        }\n        context.closePath();\n        context.fillStrokeShape(this);\n    }\n}\nexports.Rect = Rect;\nRect.prototype.className = 'Rect';\n(0, Global_1._registerNode)(Rect);\nFactory_1.Factory.addGetterSetter(Rect, 'cornerRadius', 0, (0, Validators_1.getNumberOrArrayOfNumbersValidator)(4));\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Text = void 0;\nexports.stringToArray = stringToArray;\nconst Util_1 = require(\"../Util\");\nconst Factory_1 = require(\"../Factory\");\nconst Shape_1 = require(\"../Shape\");\nconst Global_1 = require(\"../Global\");\nconst Validators_1 = require(\"../Validators\");\nconst Global_2 = require(\"../Global\");\nfunction stringToArray(string) {\n    return [...string].reduce((acc, char, index, array) => {\n        if (/\\p{Emoji}/u.test(char)) {\n            const nextChar = array[index + 1];\n            if (nextChar && /\\p{Emoji_Modifier}|\\u200D/u.test(nextChar)) {\n                acc.push(char + nextChar);\n                array[index + 1] = '';\n            }\n            else {\n                acc.push(char);\n            }\n        }\n        else if (/\\p{Regional_Indicator}{2}/u.test(char + (array[index + 1] || ''))) {\n            acc.push(char + array[index + 1]);\n        }\n        else if (index > 0 && /\\p{Mn}|\\p{Me}|\\p{Mc}/u.test(char)) {\n            acc[acc.length - 1] += char;\n        }\n        else if (char) {\n            acc.push(char);\n        }\n        return acc;\n    }, []);\n}\nconst AUTO = 'auto', CENTER = 'center', INHERIT = 'inherit', JUSTIFY = 'justify', CHANGE_KONVA = 'Change.konva', CONTEXT_2D = '2d', DASH = '-', LEFT = 'left', TEXT = 'text', TEXT_UPPER = 'Text', TOP = 'top', BOTTOM = 'bottom', MIDDLE = 'middle', NORMAL = 'normal', PX_SPACE = 'px ', SPACE = ' ', RIGHT = 'right', RTL = 'rtl', WORD = 'word', CHAR = 'char', NONE = 'none', ELLIPSIS = '…', ATTR_CHANGE_LIST = [\n    'direction',\n    'fontFamily',\n    'fontSize',\n    'fontStyle',\n    'fontVariant',\n    'padding',\n    'align',\n    'verticalAlign',\n    'lineHeight',\n    'text',\n    'width',\n    'height',\n    'wrap',\n    'ellipsis',\n    'letterSpacing',\n], attrChangeListLen = ATTR_CHANGE_LIST.length;\nfunction normalizeFontFamily(fontFamily) {\n    return fontFamily\n        .split(',')\n        .map((family) => {\n        family = family.trim();\n        const hasSpace = family.indexOf(' ') >= 0;\n        const hasQuotes = family.indexOf('\"') >= 0 || family.indexOf(\"'\") >= 0;\n        if (hasSpace && !hasQuotes) {\n            family = `\"${family}\"`;\n        }\n        return family;\n    })\n        .join(', ');\n}\nlet dummyContext;\nfunction getDummyContext() {\n    if (dummyContext) {\n        return dummyContext;\n    }\n    dummyContext = Util_1.Util.createCanvasElement().getContext(CONTEXT_2D);\n    return dummyContext;\n}\nfunction _fillFunc(context) {\n    context.fillText(this._partialText, this._partialTextX, this._partialTextY);\n}\nfunction _strokeFunc(context) {\n    context.setAttr('miterLimit', 2);\n    context.strokeText(this._partialText, this._partialTextX, this._partialTextY);\n}\nfunction checkDefaultFill(config) {\n    config = config || {};\n    if (!config.fillLinearGradientColorStops &&\n        !config.fillRadialGradientColorStops &&\n        !config.fillPatternImage) {\n        config.fill = config.fill || 'black';\n    }\n    return config;\n}\nclass Text extends Shape_1.Shape {\n    constructor(config) {\n        super(checkDefaultFill(config));\n        this._partialTextX = 0;\n        this._partialTextY = 0;\n        for (let n = 0; n < attrChangeListLen; n++) {\n            this.on(ATTR_CHANGE_LIST[n] + CHANGE_KONVA, this._setTextData);\n        }\n        this._setTextData();\n    }\n    _sceneFunc(context) {\n        const textArr = this.textArr, textArrLen = textArr.length;\n        if (!this.text()) {\n            return;\n        }\n        let padding = this.padding(), fontSize = this.fontSize(), lineHeightPx = this.lineHeight() * fontSize, verticalAlign = this.verticalAlign(), direction = this.direction(), alignY = 0, align = this.align(), totalWidth = this.getWidth(), letterSpacing = this.letterSpacing(), fill = this.fill(), textDecoration = this.textDecoration(), shouldUnderline = textDecoration.indexOf('underline') !== -1, shouldLineThrough = textDecoration.indexOf('line-through') !== -1, n;\n        direction = direction === INHERIT ? context.direction : direction;\n        let translateY = lineHeightPx / 2;\n        let baseline = MIDDLE;\n        if (Global_1.Konva._fixTextRendering) {\n            const metrics = this.measureSize('M');\n            baseline = 'alphabetic';\n            translateY =\n                (metrics.fontBoundingBoxAscent - metrics.fontBoundingBoxDescent) / 2 +\n                    lineHeightPx / 2;\n        }\n        var lineTranslateX = 0;\n        var lineTranslateY = 0;\n        if (direction === RTL) {\n            context.setAttr('direction', direction);\n        }\n        context.setAttr('font', this._getContextFont());\n        context.setAttr('textBaseline', baseline);\n        context.setAttr('textAlign', LEFT);\n        if (verticalAlign === MIDDLE) {\n            alignY = (this.getHeight() - textArrLen * lineHeightPx - padding * 2) / 2;\n        }\n        else if (verticalAlign === BOTTOM) {\n            alignY = this.getHeight() - textArrLen * lineHeightPx - padding * 2;\n        }\n        context.translate(padding, alignY + padding);\n        for (n = 0; n < textArrLen; n++) {\n            var lineTranslateX = 0;\n            var lineTranslateY = 0;\n            var obj = textArr[n], text = obj.text, width = obj.width, lastLine = obj.lastInParagraph, spacesNumber, oneWord, lineWidth;\n            context.save();\n            if (align === RIGHT) {\n                lineTranslateX += totalWidth - width - padding * 2;\n            }\n            else if (align === CENTER) {\n                lineTranslateX += (totalWidth - width - padding * 2) / 2;\n            }\n            if (shouldUnderline) {\n                context.save();\n                context.beginPath();\n                const yOffset = Global_1.Konva._fixTextRendering\n                    ? Math.round(fontSize / 4)\n                    : Math.round(fontSize / 2);\n                const x = lineTranslateX;\n                const y = translateY + lineTranslateY + yOffset;\n                context.moveTo(x, y);\n                spacesNumber = text.split(' ').length - 1;\n                oneWord = spacesNumber === 0;\n                lineWidth =\n                    align === JUSTIFY && !lastLine ? totalWidth - padding * 2 : width;\n                context.lineTo(x + Math.round(lineWidth), y);\n                context.lineWidth = fontSize / 15;\n                const gradient = this._getLinearGradient();\n                context.strokeStyle = gradient || fill;\n                context.stroke();\n                context.restore();\n            }\n            if (shouldLineThrough) {\n                context.save();\n                context.beginPath();\n                const yOffset = Global_1.Konva._fixTextRendering ? -Math.round(fontSize / 4) : 0;\n                context.moveTo(lineTranslateX, translateY + lineTranslateY + yOffset);\n                spacesNumber = text.split(' ').length - 1;\n                oneWord = spacesNumber === 0;\n                lineWidth =\n                    align === JUSTIFY && !lastLine ? totalWidth - padding * 2 : width;\n                context.lineTo(lineTranslateX + Math.round(lineWidth), translateY + lineTranslateY + yOffset);\n                context.lineWidth = fontSize / 15;\n                const gradient = this._getLinearGradient();\n                context.strokeStyle = gradient || fill;\n                context.stroke();\n                context.restore();\n            }\n            if (direction !== RTL && (letterSpacing !== 0 || align === JUSTIFY)) {\n                spacesNumber = text.split(' ').length - 1;\n                const array = stringToArray(text);\n                for (let li = 0; li < array.length; li++) {\n                    const letter = array[li];\n                    if (letter === ' ' && !lastLine && align === JUSTIFY) {\n                        lineTranslateX += (totalWidth - padding * 2 - width) / spacesNumber;\n                    }\n                    this._partialTextX = lineTranslateX;\n                    this._partialTextY = translateY + lineTranslateY;\n                    this._partialText = letter;\n                    context.fillStrokeShape(this);\n                    lineTranslateX += this.measureSize(letter).width + letterSpacing;\n                }\n            }\n            else {\n                if (letterSpacing !== 0) {\n                    context.setAttr('letterSpacing', `${letterSpacing}px`);\n                }\n                this._partialTextX = lineTranslateX;\n                this._partialTextY = translateY + lineTranslateY;\n                this._partialText = text;\n                context.fillStrokeShape(this);\n            }\n            context.restore();\n            if (textArrLen > 1) {\n                translateY += lineHeightPx;\n            }\n        }\n    }\n    _hitFunc(context) {\n        const width = this.getWidth(), height = this.getHeight();\n        context.beginPath();\n        context.rect(0, 0, width, height);\n        context.closePath();\n        context.fillStrokeShape(this);\n    }\n    setText(text) {\n        const str = Util_1.Util._isString(text)\n            ? text\n            : text === null || text === undefined\n                ? ''\n                : text + '';\n        this._setAttr(TEXT, str);\n        return this;\n    }\n    getWidth() {\n        const isAuto = this.attrs.width === AUTO || this.attrs.width === undefined;\n        return isAuto ? this.getTextWidth() + this.padding() * 2 : this.attrs.width;\n    }\n    getHeight() {\n        const isAuto = this.attrs.height === AUTO || this.attrs.height === undefined;\n        return isAuto\n            ? this.fontSize() * this.textArr.length * this.lineHeight() +\n                this.padding() * 2\n            : this.attrs.height;\n    }\n    getTextWidth() {\n        return this.textWidth;\n    }\n    getTextHeight() {\n        Util_1.Util.warn('text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height.');\n        return this.textHeight;\n    }\n    measureSize(text) {\n        var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;\n        let _context = getDummyContext(), fontSize = this.fontSize(), metrics;\n        _context.save();\n        _context.font = this._getContextFont();\n        metrics = _context.measureText(text);\n        _context.restore();\n        const scaleFactor = fontSize / 100;\n        return {\n            actualBoundingBoxAscent: (_a = metrics.actualBoundingBoxAscent) !== null && _a !== void 0 ? _a : 71.58203125 * scaleFactor,\n            actualBoundingBoxDescent: (_b = metrics.actualBoundingBoxDescent) !== null && _b !== void 0 ? _b : 0,\n            actualBoundingBoxLeft: (_c = metrics.actualBoundingBoxLeft) !== null && _c !== void 0 ? _c : -7.421875 * scaleFactor,\n            actualBoundingBoxRight: (_d = metrics.actualBoundingBoxRight) !== null && _d !== void 0 ? _d : 75.732421875 * scaleFactor,\n            alphabeticBaseline: (_e = metrics.alphabeticBaseline) !== null && _e !== void 0 ? _e : 0,\n            emHeightAscent: (_f = metrics.emHeightAscent) !== null && _f !== void 0 ? _f : 100 * scaleFactor,\n            emHeightDescent: (_g = metrics.emHeightDescent) !== null && _g !== void 0 ? _g : -20 * scaleFactor,\n            fontBoundingBoxAscent: (_h = metrics.fontBoundingBoxAscent) !== null && _h !== void 0 ? _h : 91 * scaleFactor,\n            fontBoundingBoxDescent: (_j = metrics.fontBoundingBoxDescent) !== null && _j !== void 0 ? _j : 21 * scaleFactor,\n            hangingBaseline: (_k = metrics.hangingBaseline) !== null && _k !== void 0 ? _k : 72.80000305175781 * scaleFactor,\n            ideographicBaseline: (_l = metrics.ideographicBaseline) !== null && _l !== void 0 ? _l : -21 * scaleFactor,\n            width: metrics.width,\n            height: fontSize,\n        };\n    }\n    _getContextFont() {\n        return (this.fontStyle() +\n            SPACE +\n            this.fontVariant() +\n            SPACE +\n            (this.fontSize() + PX_SPACE) +\n            normalizeFontFamily(this.fontFamily()));\n    }\n    _addTextLine(line) {\n        const align = this.align();\n        if (align === JUSTIFY) {\n            line = line.trim();\n        }\n        const width = this._getTextWidth(line);\n        return this.textArr.push({\n            text: line,\n            width: width,\n            lastInParagraph: false,\n        });\n    }\n    _getTextWidth(text) {\n        const letterSpacing = this.letterSpacing();\n        const length = text.length;\n        return getDummyContext().measureText(text).width + letterSpacing * length;\n    }\n    _setTextData() {\n        let lines = this.text().split('\\n'), fontSize = +this.fontSize(), textWidth = 0, lineHeightPx = this.lineHeight() * fontSize, width = this.attrs.width, height = this.attrs.height, fixedWidth = width !== AUTO && width !== undefined, fixedHeight = height !== AUTO && height !== undefined, padding = this.padding(), maxWidth = width - padding * 2, maxHeightPx = height - padding * 2, currentHeightPx = 0, wrap = this.wrap(), shouldWrap = wrap !== NONE, wrapAtWord = wrap !== CHAR && shouldWrap, shouldAddEllipsis = this.ellipsis();\n        this.textArr = [];\n        getDummyContext().font = this._getContextFont();\n        const additionalWidth = shouldAddEllipsis\n            ? this._getTextWidth(ELLIPSIS)\n            : 0;\n        for (let i = 0, max = lines.length; i < max; ++i) {\n            let line = lines[i];\n            let lineWidth = this._getTextWidth(line);\n            if (fixedWidth && lineWidth > maxWidth) {\n                while (line.length > 0) {\n                    let low = 0, high = stringToArray(line).length, match = '', matchWidth = 0;\n                    while (low < high) {\n                        const mid = (low + high) >>> 1, lineArray = stringToArray(line), substr = lineArray.slice(0, mid + 1).join(''), substrWidth = this._getTextWidth(substr);\n                        const shouldConsiderEllipsis = shouldAddEllipsis &&\n                            fixedHeight &&\n                            currentHeightPx + lineHeightPx > maxHeightPx;\n                        const effectiveWidth = shouldConsiderEllipsis\n                            ? substrWidth + additionalWidth\n                            : substrWidth;\n                        if (effectiveWidth <= maxWidth) {\n                            low = mid + 1;\n                            match = substr;\n                            matchWidth = substrWidth;\n                        }\n                        else {\n                            high = mid;\n                        }\n                    }\n                    if (match) {\n                        if (wrapAtWord) {\n                            const lineArray = stringToArray(line);\n                            const matchArray = stringToArray(match);\n                            const nextChar = lineArray[matchArray.length];\n                            const nextIsSpaceOrDash = nextChar === SPACE || nextChar === DASH;\n                            let wrapIndex;\n                            if (nextIsSpaceOrDash && matchWidth <= maxWidth) {\n                                wrapIndex = matchArray.length;\n                            }\n                            else {\n                                const lastSpaceIndex = matchArray.lastIndexOf(SPACE);\n                                const lastDashIndex = matchArray.lastIndexOf(DASH);\n                                wrapIndex = Math.max(lastSpaceIndex, lastDashIndex) + 1;\n                            }\n                            if (wrapIndex > 0) {\n                                low = wrapIndex;\n                                match = lineArray.slice(0, low).join('');\n                                matchWidth = this._getTextWidth(match);\n                            }\n                        }\n                        match = match.trimRight();\n                        this._addTextLine(match);\n                        textWidth = Math.max(textWidth, matchWidth);\n                        currentHeightPx += lineHeightPx;\n                        const shouldHandleEllipsis = this._shouldHandleEllipsis(currentHeightPx);\n                        if (shouldHandleEllipsis) {\n                            this._tryToAddEllipsisToLastLine();\n                            break;\n                        }\n                        const lineArray = stringToArray(line);\n                        line = lineArray.slice(low).join('').trimLeft();\n                        if (line.length > 0) {\n                            lineWidth = this._getTextWidth(line);\n                            if (lineWidth <= maxWidth) {\n                                this._addTextLine(line);\n                                currentHeightPx += lineHeightPx;\n                                textWidth = Math.max(textWidth, lineWidth);\n                                break;\n                            }\n                        }\n                    }\n                    else {\n                        break;\n                    }\n                }\n            }\n            else {\n                this._addTextLine(line);\n                currentHeightPx += lineHeightPx;\n                textWidth = Math.max(textWidth, lineWidth);\n                if (this._shouldHandleEllipsis(currentHeightPx) && i < max - 1) {\n                    this._tryToAddEllipsisToLastLine();\n                }\n            }\n            if (this.textArr[this.textArr.length - 1]) {\n                this.textArr[this.textArr.length - 1].lastInParagraph = true;\n            }\n            if (fixedHeight && currentHeightPx + lineHeightPx > maxHeightPx) {\n                break;\n            }\n        }\n        this.textHeight = fontSize;\n        this.textWidth = textWidth;\n    }\n    _shouldHandleEllipsis(currentHeightPx) {\n        const fontSize = +this.fontSize(), lineHeightPx = this.lineHeight() * fontSize, height = this.attrs.height, fixedHeight = height !== AUTO && height !== undefined, padding = this.padding(), maxHeightPx = height - padding * 2, wrap = this.wrap(), shouldWrap = wrap !== NONE;\n        return (!shouldWrap ||\n            (fixedHeight && currentHeightPx + lineHeightPx > maxHeightPx));\n    }\n    _tryToAddEllipsisToLastLine() {\n        const width = this.attrs.width, fixedWidth = width !== AUTO && width !== undefined, padding = this.padding(), maxWidth = width - padding * 2, shouldAddEllipsis = this.ellipsis();\n        const lastLine = this.textArr[this.textArr.length - 1];\n        if (!lastLine || !shouldAddEllipsis) {\n            return;\n        }\n        if (fixedWidth) {\n            const haveSpace = this._getTextWidth(lastLine.text + ELLIPSIS) < maxWidth;\n            if (!haveSpace) {\n                lastLine.text = lastLine.text.slice(0, lastLine.text.length - 3);\n            }\n        }\n        this.textArr.splice(this.textArr.length - 1, 1);\n        this._addTextLine(lastLine.text + ELLIPSIS);\n    }\n    getStrokeScaleEnabled() {\n        return true;\n    }\n    _useBufferCanvas() {\n        const hasLine = this.textDecoration().indexOf('underline') !== -1 ||\n            this.textDecoration().indexOf('line-through') !== -1;\n        const hasShadow = this.hasShadow();\n        if (hasLine && hasShadow) {\n            return true;\n        }\n        return super._useBufferCanvas();\n    }\n}\nexports.Text = Text;\nText.prototype._fillFunc = _fillFunc;\nText.prototype._strokeFunc = _strokeFunc;\nText.prototype.className = TEXT_UPPER;\nText.prototype._attrsAffectingSize = [\n    'text',\n    'fontSize',\n    'padding',\n    'wrap',\n    'lineHeight',\n    'letterSpacing',\n];\n(0, Global_2._registerNode)(Text);\nFactory_1.Factory.overWriteSetter(Text, 'width', (0, Validators_1.getNumberOrAutoValidator)());\nFactory_1.Factory.overWriteSetter(Text, 'height', (0, Validators_1.getNumberOrAutoValidator)());\nFactory_1.Factory.addGetterSetter(Text, 'direction', INHERIT);\nFactory_1.Factory.addGetterSetter(Text, 'fontFamily', 'Arial');\nFactory_1.Factory.addGetterSetter(Text, 'fontSize', 12, (0, Validators_1.getNumberValidator)());\nFactory_1.Factory.addGetterSetter(Text, 'fontStyle', NORMAL);\nFactory_1.Factory.addGetterSetter(Text, 'fontVariant', NORMAL);\nFactory_1.Factory.addGetterSetter(Text, 'padding', 0, (0, Validators_1.getNumberValidator)());\nFactory_1.Factory.addGetterSetter(Text, 'align', LEFT);\nFactory_1.Factory.addGetterSetter(Text, 'verticalAlign', TOP);\nFactory_1.Factory.addGetterSetter(Text, 'lineHeight', 1, (0, Validators_1.getNumberValidator)());\nFactory_1.Factory.addGetterSetter(Text, 'wrap', WORD);\nFactory_1.Factory.addGetterSetter(Text, 'ellipsis', false, (0, Validators_1.getBooleanValidator)());\nFactory_1.Factory.addGetterSetter(Text, 'letterSpacing', 0, (0, Validators_1.getNumberValidator)());\nFactory_1.Factory.addGetterSetter(Text, 'text', '', (0, Validators_1.getStringValidator)());\nFactory_1.Factory.addGetterSetter(Text, 'textDecoration', '');\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Image = void 0;\nconst Util_1 = require(\"../Util\");\nconst Factory_1 = require(\"../Factory\");\nconst Shape_1 = require(\"../Shape\");\nconst Global_1 = require(\"../Global\");\nconst Validators_1 = require(\"../Validators\");\nclass Image extends Shape_1.Shape {\n    constructor(attrs) {\n        super(attrs);\n        this._loadListener = () => {\n            this._requestDraw();\n        };\n        this.on('imageChange.konva', (props) => {\n            this._removeImageLoad(props.oldVal);\n            this._setImageLoad();\n        });\n        this._setImageLoad();\n    }\n    _setImageLoad() {\n        const image = this.image();\n        if (image && image.complete) {\n            return;\n        }\n        if (image && image.readyState === 4) {\n            return;\n        }\n        if (image && image['addEventListener']) {\n            image['addEventListener']('load', this._loadListener);\n        }\n    }\n    _removeImageLoad(image) {\n        if (image && image['removeEventListener']) {\n            image['removeEventListener']('load', this._loadListener);\n        }\n    }\n    destroy() {\n        this._removeImageLoad(this.image());\n        super.destroy();\n        return this;\n    }\n    _useBufferCanvas() {\n        const hasCornerRadius = !!this.cornerRadius();\n        const hasShadow = this.hasShadow();\n        if (hasCornerRadius && hasShadow) {\n            return true;\n        }\n        return super._useBufferCanvas(true);\n    }\n    _sceneFunc(context) {\n        const width = this.getWidth();\n        const height = this.getHeight();\n        const cornerRadius = this.cornerRadius();\n        const image = this.attrs.image;\n        let params;\n        if (image) {\n            const cropWidth = this.attrs.cropWidth;\n            const cropHeight = this.attrs.cropHeight;\n            if (cropWidth && cropHeight) {\n                params = [\n                    image,\n                    this.cropX(),\n                    this.cropY(),\n                    cropWidth,\n                    cropHeight,\n                    0,\n                    0,\n                    width,\n                    height,\n                ];\n            }\n            else {\n                params = [image, 0, 0, width, height];\n            }\n        }\n        if (this.hasFill() || this.hasStroke() || cornerRadius) {\n            context.beginPath();\n            cornerRadius\n                ? Util_1.Util.drawRoundedRectPath(context, width, height, cornerRadius)\n                : context.rect(0, 0, width, height);\n            context.closePath();\n            context.fillStrokeShape(this);\n        }\n        if (image) {\n            if (cornerRadius) {\n                context.clip();\n            }\n            context.drawImage.apply(context, params);\n        }\n    }\n    _hitFunc(context) {\n        const width = this.width(), height = this.height(), cornerRadius = this.cornerRadius();\n        context.beginPath();\n        if (!cornerRadius) {\n            context.rect(0, 0, width, height);\n        }\n        else {\n            Util_1.Util.drawRoundedRectPath(context, width, height, cornerRadius);\n        }\n        context.closePath();\n        context.fillStrokeShape(this);\n    }\n    getWidth() {\n        var _a, _b;\n        return (_a = this.attrs.width) !== null && _a !== void 0 ? _a : (_b = this.image()) === null || _b === void 0 ? void 0 : _b.width;\n    }\n    getHeight() {\n        var _a, _b;\n        return (_a = this.attrs.height) !== null && _a !== void 0 ? _a : (_b = this.image()) === null || _b === void 0 ? void 0 : _b.height;\n    }\n    static fromURL(url, callback, onError = null) {\n        const img = Util_1.Util.createImageElement();\n        img.onload = function () {\n            const image = new Image({\n                image: img,\n            });\n            callback(image);\n        };\n        img.onerror = onError;\n        img.crossOrigin = 'Anonymous';\n        img.src = url;\n    }\n}\nexports.Image = Image;\nImage.prototype.className = 'Image';\n(0, Global_1._registerNode)(Image);\nFactory_1.Factory.addGetterSetter(Image, 'cornerRadius', 0, (0, Validators_1.getNumberOrArrayOfNumbersValidator)(4));\nFactory_1.Factory.addGetterSetter(Image, 'image');\nFactory_1.Factory.addComponentsGetterSetter(Image, 'crop', ['x', 'y', 'width', 'height']);\nFactory_1.Factory.addGetterSetter(Image, 'cropX', 0, (0, Validators_1.getNumberValidator)());\nFactory_1.Factory.addGetterSetter(Image, 'cropY', 0, (0, Validators_1.getNumberValidator)());\nFactory_1.Factory.addGetterSetter(Image, 'cropWidth', 0, (0, Validators_1.getNumberValidator)());\nFactory_1.Factory.addGetterSetter(Image, 'cropHeight', 0, (0, Validators_1.getNumberValidator)());\n","/**\n * Provides access to the waveform data for a single audio channel.\n */\nfunction WaveformDataChannel(waveformData, channelIndex) {\n  this._waveformData = waveformData;\n  this._channelIndex = channelIndex;\n}\n/**\n * Returns the waveform minimum at the given index position.\n */\n\n\nWaveformDataChannel.prototype.min_sample = function (index) {\n  var offset = (index * this._waveformData.channels + this._channelIndex) * 2;\n  return this._waveformData._at(offset);\n};\n/**\n * Returns the waveform maximum at the given index position.\n */\n\n\nWaveformDataChannel.prototype.max_sample = function (index) {\n  var offset = (index * this._waveformData.channels + this._channelIndex) * 2 + 1;\n  return this._waveformData._at(offset);\n};\n/**\n * Sets the waveform minimum at the given index position.\n */\n\n\nWaveformDataChannel.prototype.set_min_sample = function (index, sample) {\n  var offset = (index * this._waveformData.channels + this._channelIndex) * 2;\n  return this._waveformData._set_at(offset, sample);\n};\n/**\n * Sets the waveform maximum at the given index position.\n */\n\n\nWaveformDataChannel.prototype.set_max_sample = function (index, sample) {\n  var offset = (index * this._waveformData.channels + this._channelIndex) * 2 + 1;\n  return this._waveformData._set_at(offset, sample);\n};\n/**\n * Returns all the waveform minimum values as an array.\n */\n\n\nWaveformDataChannel.prototype.min_array = function () {\n  return this._waveformData._offsetValues(0, this._waveformData.length, this._channelIndex * 2);\n};\n/**\n * Returns all the waveform maximum values as an array.\n */\n\n\nWaveformDataChannel.prototype.max_array = function () {\n  return this._waveformData._offsetValues(0, this._waveformData.length, this._channelIndex * 2 + 1);\n};\n\n/**\n * AudioBuffer-based WaveformData generator\n *\n * Adapted from BlockFile::CalcSummary in Audacity, with permission.\n * See https://code.google.com/p/audacity/source/browse/audacity-src/trunk/src/BlockFile.cpp\n */\nvar INT8_MAX = 127;\nvar INT8_MIN = -128;\n\nfunction calculateWaveformDataLength(audio_sample_count, scale) {\n  var data_length = Math.floor(audio_sample_count / scale);\n  var samples_remaining = audio_sample_count - data_length * scale;\n\n  if (samples_remaining > 0) {\n    data_length++;\n  }\n\n  return data_length;\n}\n\nfunction generateWaveformData(options) {\n  var scale = options.scale;\n  var amplitude_scale = options.amplitude_scale;\n  var split_channels = options.split_channels;\n  var length = options.length;\n  var sample_rate = options.sample_rate;\n  var channels = options.channels.map(function (channel) {\n    return new Float32Array(channel);\n  });\n  var output_channels = split_channels ? channels.length : 1;\n  var version = output_channels === 1 ? 1 : 2;\n  var header_size = version === 1 ? 20 : 24;\n  var data_length = calculateWaveformDataLength(length, scale);\n  var total_size = header_size + data_length * 2 * output_channels;\n  var buffer = new ArrayBuffer(total_size);\n  var data_view = new DataView(buffer);\n  var scale_counter = 0;\n  var offset = header_size;\n  var channel, i;\n  var min_value = new Array(output_channels);\n  var max_value = new Array(output_channels);\n\n  for (channel = 0; channel < output_channels; channel++) {\n    min_value[channel] = Infinity;\n    max_value[channel] = -Infinity;\n  }\n\n  data_view.setInt32(0, version, true); // Version\n\n  data_view.setUint32(4, 1, true); // Is 8 bit?\n\n  data_view.setInt32(8, sample_rate, true); // Sample rate\n\n  data_view.setInt32(12, scale, true); // Scale\n\n  data_view.setInt32(16, data_length, true); // Length\n\n  if (version === 2) {\n    data_view.setInt32(20, output_channels, true);\n  }\n\n  for (i = 0; i < length; i++) {\n    var sample = 0;\n\n    if (output_channels === 1) {\n      for (channel = 0; channel < channels.length; ++channel) {\n        sample += channels[channel][i];\n      }\n\n      sample = Math.floor(INT8_MAX * sample * amplitude_scale / channels.length);\n\n      if (sample < min_value[0]) {\n        min_value[0] = sample;\n\n        if (min_value[0] < INT8_MIN) {\n          min_value[0] = INT8_MIN;\n        }\n      }\n\n      if (sample > max_value[0]) {\n        max_value[0] = sample;\n\n        if (max_value[0] > INT8_MAX) {\n          max_value[0] = INT8_MAX;\n        }\n      }\n    } else {\n      for (channel = 0; channel < output_channels; ++channel) {\n        sample = Math.floor(INT8_MAX * channels[channel][i] * amplitude_scale);\n\n        if (sample < min_value[channel]) {\n          min_value[channel] = sample;\n\n          if (min_value[channel] < INT8_MIN) {\n            min_value[channel] = INT8_MIN;\n          }\n        }\n\n        if (sample > max_value[channel]) {\n          max_value[channel] = sample;\n\n          if (max_value[channel] > INT8_MAX) {\n            max_value[channel] = INT8_MAX;\n          }\n        }\n      }\n    }\n\n    if (++scale_counter === scale) {\n      for (channel = 0; channel < output_channels; channel++) {\n        data_view.setInt8(offset++, min_value[channel]);\n        data_view.setInt8(offset++, max_value[channel]);\n        min_value[channel] = Infinity;\n        max_value[channel] = -Infinity;\n      }\n\n      scale_counter = 0;\n    }\n  }\n\n  if (scale_counter > 0) {\n    for (channel = 0; channel < output_channels; channel++) {\n      data_view.setInt8(offset++, min_value[channel]);\n      data_view.setInt8(offset++, max_value[channel]);\n    }\n  }\n\n  return buffer;\n}\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\n  return _typeof(obj);\n}\n\nfunction isJsonWaveformData(data) {\n  return data && _typeof(data) === \"object\" && \"sample_rate\" in data && \"samples_per_pixel\" in data && \"bits\" in data && \"length\" in data && \"data\" in data;\n}\nfunction isBinaryWaveformData(data) {\n  var isCompatible = data && _typeof(data) === \"object\" && \"byteLength\" in data;\n\n  if (isCompatible) {\n    var view = new DataView(data);\n    var version = view.getInt32(0, true);\n\n    if (version !== 1 && version !== 2) {\n      throw new TypeError(\"WaveformData.create(): This waveform data version not supported\");\n    }\n  }\n\n  return isCompatible;\n}\nfunction convertJsonToBinary(data) {\n  var waveformData = data.data;\n  var channels = data.channels || 1;\n  var header_size = 24; // version 2\n\n  var bytes_per_sample = data.bits === 8 ? 1 : 2;\n  var expected_length = data.length * 2 * channels;\n\n  if (waveformData.length !== expected_length) {\n    throw new Error(\"WaveformData.create(): Length mismatch in JSON waveform data\");\n  }\n\n  var total_size = header_size + waveformData.length * bytes_per_sample;\n  var array_buffer = new ArrayBuffer(total_size);\n  var data_object = new DataView(array_buffer);\n  data_object.setInt32(0, 2, true); // Version\n\n  data_object.setUint32(4, data.bits === 8, true);\n  data_object.setInt32(8, data.sample_rate, true);\n  data_object.setInt32(12, data.samples_per_pixel, true);\n  data_object.setInt32(16, data.length, true);\n  data_object.setInt32(20, channels, true);\n  var index = header_size;\n  var i;\n\n  if (data.bits === 8) {\n    for (i = 0; i < waveformData.length; i++) {\n      data_object.setInt8(index++, waveformData[i], true);\n    }\n  } else {\n    for (i = 0; i < waveformData.length; i++) {\n      data_object.setInt16(index, waveformData[i], true);\n      index += 2;\n    }\n  }\n\n  return array_buffer;\n}\n\nfunction decodeBase64(base64, enableUnicode) {\n    var binaryString = atob(base64);\n    if (enableUnicode) {\n        var binaryView = new Uint8Array(binaryString.length);\n        for (var i = 0, n = binaryString.length; i < n; ++i) {\n            binaryView[i] = binaryString.charCodeAt(i);\n        }\n        return String.fromCharCode.apply(null, new Uint16Array(binaryView.buffer));\n    }\n    return binaryString;\n}\n\nfunction createURL(base64, sourcemapArg, enableUnicodeArg) {\n    var sourcemap = sourcemapArg === undefined ? null : sourcemapArg;\n    var enableUnicode = enableUnicodeArg === undefined ? false : enableUnicodeArg;\n    var source = decodeBase64(base64, enableUnicode);\n    var start = source.indexOf('\\n', 10) + 1;\n    var body = source.substring(start) + (sourcemap ? '\\/\\/# sourceMappingURL=' + sourcemap : '');\n    var blob = new Blob([body], { type: 'application/javascript' });\n    return URL.createObjectURL(blob);\n}\n\nfunction createBase64WorkerFactory(base64, sourcemapArg, enableUnicodeArg) {\n    var url;\n    return function WorkerFactory(options) {\n        url = url || createURL(base64, sourcemapArg, enableUnicodeArg);\n        return new Worker(url, options);\n    };\n}\n\nvar WorkerFactory = createBase64WorkerFactory('Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24gKCkgewogICd1c2Ugc3RyaWN0JzsKCiAgLyoqCiAgICogQXVkaW9CdWZmZXItYmFzZWQgV2F2ZWZvcm1EYXRhIGdlbmVyYXRvcgogICAqCiAgICogQWRhcHRlZCBmcm9tIEJsb2NrRmlsZTo6Q2FsY1N1bW1hcnkgaW4gQXVkYWNpdHksIHdpdGggcGVybWlzc2lvbi4KICAgKiBTZWUgaHR0cHM6Ly9jb2RlLmdvb2dsZS5jb20vcC9hdWRhY2l0eS9zb3VyY2UvYnJvd3NlL2F1ZGFjaXR5LXNyYy90cnVuay9zcmMvQmxvY2tGaWxlLmNwcAogICAqLwogIHZhciBJTlQ4X01BWCA9IDEyNzsKICB2YXIgSU5UOF9NSU4gPSAtMTI4OwoKICBmdW5jdGlvbiBjYWxjdWxhdGVXYXZlZm9ybURhdGFMZW5ndGgoYXVkaW9fc2FtcGxlX2NvdW50LCBzY2FsZSkgewogICAgdmFyIGRhdGFfbGVuZ3RoID0gTWF0aC5mbG9vcihhdWRpb19zYW1wbGVfY291bnQgLyBzY2FsZSk7CiAgICB2YXIgc2FtcGxlc19yZW1haW5pbmcgPSBhdWRpb19zYW1wbGVfY291bnQgLSBkYXRhX2xlbmd0aCAqIHNjYWxlOwoKICAgIGlmIChzYW1wbGVzX3JlbWFpbmluZyA+IDApIHsKICAgICAgZGF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SBjaGFubmVsc1tjaGFubmVsXVtpXTsKICAgICAgICB9CgogICAgICAgIHNhbXBsZSA9IE1hdGguZmxvb3IoSU5UOF9NQVggKiBzYW1wbGUgKiBhbXBsaXR1ZGVfc2NhbGUgLyBjaGFubmVscy5sZW5ndGgpOwoKICAgICAgICBpZiAoc2FtcGxlIDwgbWluX3ZhbHVlWzBdKSB7CiAgICAgICAgICBtaW5fdmFsdWVbMF0gPSBzYW1wbGU7CgogICAgICAgICAgaWYgKG1pbl92YWx1ZVswXSA8IElOVDhfTUlOKSB7CiAgICAgICAgICAgIG1pbl92YWx1ZVswXSA9IElOVDhfTUlOOwogICAgICAgICAgfQogICAgICAgIH0KCiAgICAgICAgaWYgKHNhbXBsZSA+IG1heF92YWx1ZVswXSkgewogICAgICAgICAgbWF4X3ZhbHVlWzBdID0gc2FtcGxlOwoKICAgICAgICAgIGlmIChtYXhfdmFsdWVbMF0gPiBJTlQ4X01BWCkgewogICAgICAgICAgICBtYXhfdmFsdWVbMF0gPSBJTlQ4X01BWDsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0gZWxzZSB7CiAgICAgICAgZm9yIChjaGFubmVsID0gMDsgY2hhbm5lbCA8IG91dHB1dF9jaGFubmVsczsgKytjaGFubmVsKSB7CiAgICAgICAgICBzYW1wbGUgPSBNYXRoLmZsb29yKElOVDhfTUFYICogY2hhbm5lbHNbY2hhbm5lbF1baV0gKiBhbXBsaXR1ZGVfc2NhbGUpOwoKICAgICAgICAgIGlmIChzYW1wbGUgPCBtaW5fdmFsdWVbY2hhbm5lbF0pIHsKICAgICAgICAgICAgbWluX3ZhbHVlW2NoYW5uZWxdID0gc2FtcGxlOwoKICAgICAgICAgICAgaWYgKG1pbl92YWx1ZVtjaGFubmVsXSA8IElOVDhfTUlOKSB7CiAgICAgICAgICAgICAgbWluX3ZhbHVlW2NoYW5uZWxdID0gSU5UOF9NSU47CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KCiAgICAgICAgICBpZiAoc2FtcGxlID4gbWF4X3ZhbHVlW2NoYW5uZWxdKSB7CiAgICAgICAgICAgIG1heF92YWx1ZVtjaGFubmVsXSA9IHNhbXBsZTsKCiAgICAgICAgICAgIGlmIChtYXhfdmFsdWVbY2hhbm5lbF0gPiBJTlQ4X01BWCkgewogICAgICAgICAgICAgIG1heF92YWx1ZVtjaGFubmVsXSA9IElOVDhfTUFYOwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CgogICAgICBpZiAoKytzY2FsZV9jb3VudGVyID09PSBzY2FsZSkgewogICAgICAgIGZvciAoY2hhbm5lbCA9IDA7IGNoYW5uZWwgPCBvdXRwdXRfY2hhbm5lbHM7IGNoYW5uZWwrKykgewogICAgICAgICAgZGF0YV92aWV3LnNldEludDgob2Zmc2V0KyssIG1pbl92YWx1ZVtjaGFubmVsXSk7CiAgICAgICAgICBkYXRhX3ZpZXcuc2V0SW50OChvZmZzZXQrKywgbWF4X3ZhbHVlW2NoYW5uZWxdKTsKICAgICAgICAgIG1pbl92YWx1ZVtjaGFubmVsXSA9IEluZmluaXR5OwogICAgICAgICAgbWF4X3ZhbHVlW2NoYW5uZWxdID0gLUluZmluaXR5OwogICAgICAgIH0KCiAgICAgICAgc2NhbGVfY291bnRlciA9IDA7CiAgICAgIH0KICAgIH0KCiAgICBpZiAoc2NhbGVfY291bnRlciA+IDApIHsKICAgICAgZm9yIChjaGFubmVsID0gMDsgY2hhbm5lbCA8IG91dHB1dF9jaGFubmVsczsgY2hhbm5lbCsrKSB7CiAgICAgICAgZGF0YV92aWV3LnNldEludDgob2Zmc2V0KyssIG1pbl92YWx1ZVtjaGFubmVsXSk7CiAgICAgICAgZGF0YV92aWV3LnNldEludDgob2Zmc2V0KyssIG1heF92YWx1ZVtjaGFubmVsXSk7CiAgICAgIH0KICAgIH0KCiAgICByZXR1cm4gYnVmZmVyOwogIH0KCiAgb25tZXNzYWdlID0gZnVuY3Rpb24gb25tZXNzYWdlKGV2dCkgewogICAgdmFyIGJ1ZmZlciA9IGdlbmVyYXRlV2F2ZWZvcm1EYXRhKGV2dC5kYXRhKTsgLy8gVHJhbnNmZXIgYnVmZmVyIHRvIHRoZSBjYWxsaW5nIHRocmVhZAoKICAgIHRoaXMucG9zdE1lc3NhZ2UoYnVmZmVyLCBbYnVmZmVyXSk7CiAgICB0aGlzLmNsb3NlKCk7CiAgfTsKCn0pKCk7Cgo=', null, false);\n/* eslint-enable */\n\n/**\n * Provides access to waveform data.\n */\n\nfunction WaveformData(data) {\n  if (isJsonWaveformData(data)) {\n    data = convertJsonToBinary(data);\n  }\n\n  if (isBinaryWaveformData(data)) {\n    this._data = new DataView(data);\n    this._offset = this._version() === 2 ? 24 : 20;\n    this._channels = [];\n\n    for (var channel = 0; channel < this.channels; channel++) {\n      this._channels[channel] = new WaveformDataChannel(this, channel);\n    }\n  } else {\n    throw new TypeError(\"WaveformData.create(): Unknown data format\");\n  }\n}\n\nvar defaultOptions = {\n  scale: 512,\n  amplitude_scale: 1.0,\n  split_channels: false,\n  disable_worker: false\n};\n\nfunction getOptions(options) {\n  var opts = {\n    scale: options.scale || defaultOptions.scale,\n    amplitude_scale: options.amplitude_scale || defaultOptions.amplitude_scale,\n    split_channels: options.split_channels || defaultOptions.split_channels,\n    disable_worker: options.disable_worker || defaultOptions.disable_worker\n  };\n  return opts;\n}\n\nfunction getChannelData(audio_buffer) {\n  var channels = [];\n\n  for (var i = 0; i < audio_buffer.numberOfChannels; ++i) {\n    channels.push(audio_buffer.getChannelData(i).buffer);\n  }\n\n  return channels;\n}\n\nfunction createFromAudioBuffer(audio_buffer, options, callback) {\n  var channels = getChannelData(audio_buffer);\n\n  if (options.disable_worker) {\n    var buffer = generateWaveformData({\n      scale: options.scale,\n      amplitude_scale: options.amplitude_scale,\n      split_channels: options.split_channels,\n      length: audio_buffer.length,\n      sample_rate: audio_buffer.sampleRate,\n      channels: channels\n    });\n    callback(null, new WaveformData(buffer), audio_buffer);\n  } else {\n    var worker = new WorkerFactory();\n\n    worker.onmessage = function (evt) {\n      callback(null, new WaveformData(evt.data), audio_buffer);\n    };\n\n    worker.postMessage({\n      scale: options.scale,\n      amplitude_scale: options.amplitude_scale,\n      split_channels: options.split_channels,\n      length: audio_buffer.length,\n      sample_rate: audio_buffer.sampleRate,\n      channels: channels\n    }, channels);\n  }\n}\n\nfunction createFromArrayBuffer(audioContext, audioData, options, callback) {\n  // The following function is a workaround for a Webkit bug where decodeAudioData\n  // invokes the errorCallback with null instead of a DOMException.\n  // See https://webaudio.github.io/web-audio-api/#dom-baseaudiocontext-decodeaudiodata\n  // and http://stackoverflow.com/q/10365335/103396\n  function errorCallback(error) {\n    if (!error) {\n      error = new DOMException(\"EncodingError\");\n    }\n\n    callback(error);\n  }\n\n  audioContext.decodeAudioData(audioData, function (audio_buffer) {\n    createFromAudioBuffer(audio_buffer, options, callback);\n  }, errorCallback);\n}\n/**\n * Creates and returns a WaveformData instance from the given waveform data.\n */\n\n\nWaveformData.create = function create(data) {\n  return new WaveformData(data);\n};\n/**\n * Creates a WaveformData instance from audio.\n */\n\n\nWaveformData.createFromAudio = function (options, callback) {\n  var opts = getOptions(options);\n\n  if (options.audio_context && options.array_buffer) {\n    return createFromArrayBuffer(options.audio_context, options.array_buffer, opts, callback);\n  } else if (options.audio_buffer) {\n    return createFromAudioBuffer(options.audio_buffer, opts, callback);\n  } else {\n    throw new TypeError( // eslint-disable-next-line\n    \"WaveformData.createFromAudio(): Pass either an AudioContext and ArrayBuffer, or an AudioBuffer object\");\n  }\n};\n\nWaveformData.prototype = {\n  /**\n   * Creates and returns a new WaveformData object with resampled data.\n   * Use this method to create waveform data at different zoom levels.\n   *\n   * Adapted from Sequence::GetWaveDisplay in Audacity, with permission.\n   * https://code.google.com/p/audacity/source/browse/audacity-src/trunk/src/Sequence.cpp\n   */\n  resample: function resample(options) {\n    options.scale = typeof options.scale === \"number\" ? options.scale : null;\n    options.width = typeof options.width === \"number\" ? options.width : null;\n\n    if (options.width != null && options.width <= 0) {\n      throw new RangeError(\"WaveformData.resample(): width should be a positive integer value\");\n    }\n\n    if (options.scale != null && options.scale <= 0) {\n      throw new RangeError(\"WaveformData.resample(): scale should be a positive integer value\");\n    }\n\n    if (!options.scale && !options.width) {\n      throw new Error(\"WaveformData.resample(): Missing scale or width option\");\n    } // Scale we want to reach\n\n\n    var output_samples_per_pixel = options.scale || Math.floor(this.duration * this.sample_rate / options.width);\n    var scale = this.scale; // scale we are coming from\n    // The amount of data we want to resample i.e. final zoom want to resample\n    // all data but for intermediate zoom we want to resample subset\n\n    var input_buffer_size = this.length;\n    var input_buffer_length_samples = input_buffer_size * this.scale;\n    var output_buffer_length_samples = Math.ceil(input_buffer_length_samples / output_samples_per_pixel);\n    var output_header_size = 24; // version 2\n\n    var bytes_per_sample = this.bits === 8 ? 1 : 2;\n    var total_size = output_header_size + output_buffer_length_samples * 2 * this.channels * bytes_per_sample;\n    var output_data = new ArrayBuffer(total_size);\n    var output_dataview = new DataView(output_data);\n    output_dataview.setInt32(0, 2, true); // Version\n\n    output_dataview.setUint32(4, this.bits === 8, true); // Is 8 bit?\n\n    output_dataview.setInt32(8, this.sample_rate, true);\n    output_dataview.setInt32(12, output_samples_per_pixel, true);\n    output_dataview.setInt32(16, output_buffer_length_samples, true);\n    output_dataview.setInt32(20, this.channels, true);\n    var waveform_data = new WaveformData(output_data);\n    var input_index = 0;\n    var output_index = 0;\n    var channels = this.channels;\n    var min = new Array(channels);\n    var max = new Array(channels);\n    var channel;\n\n    for (channel = 0; channel < channels; ++channel) {\n      if (input_buffer_size > 0) {\n        min[channel] = this.channel(channel).min_sample(input_index);\n        max[channel] = this.channel(channel).max_sample(input_index);\n      } else {\n        min[channel] = 0;\n        max[channel] = 0;\n      }\n    }\n\n    var min_value = this.bits === 8 ? -128 : -32768;\n    var max_value = this.bits === 8 ? 127 : 32767;\n\n    if (output_samples_per_pixel < scale) {\n      throw new Error(\"WaveformData.resample(): Zoom level \" + output_samples_per_pixel + \" too low, minimum: \" + scale);\n    }\n\n    var where, prev_where, stop, value, last_input_index;\n\n    function sample_at_pixel(x) {\n      return Math.floor(x * output_samples_per_pixel);\n    }\n\n    while (input_index < input_buffer_size) {\n      while (Math.floor(sample_at_pixel(output_index) / scale) === input_index) {\n        if (output_index > 0) {\n          for (channel = 0; channel < channels; ++channel) {\n            waveform_data.channel(channel).set_min_sample(output_index - 1, min[channel]);\n            waveform_data.channel(channel).set_max_sample(output_index - 1, max[channel]);\n          }\n        }\n\n        last_input_index = input_index;\n        output_index++;\n        where = sample_at_pixel(output_index);\n        prev_where = sample_at_pixel(output_index - 1);\n\n        if (where !== prev_where) {\n          for (channel = 0; channel < channels; ++channel) {\n            min[channel] = max_value;\n            max[channel] = min_value;\n          }\n        }\n      }\n\n      where = sample_at_pixel(output_index);\n      stop = Math.floor(where / scale);\n\n      if (stop > input_buffer_size) {\n        stop = input_buffer_size;\n      }\n\n      while (input_index < stop) {\n        for (channel = 0; channel < channels; ++channel) {\n          value = this.channel(channel).min_sample(input_index);\n\n          if (value < min[channel]) {\n            min[channel] = value;\n          }\n\n          value = this.channel(channel).max_sample(input_index);\n\n          if (value > max[channel]) {\n            max[channel] = value;\n          }\n        }\n\n        input_index++;\n      }\n    }\n\n    if (input_index !== last_input_index) {\n      for (channel = 0; channel < channels; ++channel) {\n        waveform_data.channel(channel).set_min_sample(output_index - 1, min[channel]);\n        waveform_data.channel(channel).set_max_sample(output_index - 1, max[channel]);\n      }\n    }\n\n    return waveform_data;\n  },\n\n  /**\n   * Concatenates with one or more other waveforms, returning a new WaveformData object.\n   */\n  concat: function concat() {\n    var self = this;\n    var otherWaveforms = Array.prototype.slice.call(arguments); // Check that all the supplied waveforms are compatible\n\n    otherWaveforms.forEach(function (otherWaveform) {\n      if (self.channels !== otherWaveform.channels || self.sample_rate !== otherWaveform.sample_rate || self.bits !== otherWaveform.bits || self.scale !== otherWaveform.scale) {\n        throw new Error(\"WaveformData.concat(): Waveforms are incompatible\");\n      }\n    });\n\n    var combinedBuffer = this._concatBuffers.apply(this, otherWaveforms);\n\n    return WaveformData.create(combinedBuffer);\n  },\n\n  /**\n   * Returns a new ArrayBuffer with the concatenated waveform.\n   * All waveforms must have identical metadata (version, channels, etc)\n   */\n  _concatBuffers: function _concatBuffers() {\n    var otherWaveforms = Array.prototype.slice.call(arguments);\n    var headerSize = this._offset;\n    var totalSize = headerSize;\n    var totalDataLength = 0;\n    var bufferCollection = [this].concat(otherWaveforms).map(function (w) {\n      return w._data.buffer;\n    });\n    var i, buffer;\n\n    for (i = 0; i < bufferCollection.length; i++) {\n      buffer = bufferCollection[i];\n      var dataSize = new DataView(buffer).getInt32(16, true);\n      totalSize += buffer.byteLength - headerSize;\n      totalDataLength += dataSize;\n    }\n\n    var totalBuffer = new ArrayBuffer(totalSize);\n    var sourceHeader = new DataView(bufferCollection[0]);\n    var totalBufferView = new DataView(totalBuffer); // Copy the header from the first chunk\n\n    for (i = 0; i < headerSize; i++) {\n      totalBufferView.setUint8(i, sourceHeader.getUint8(i));\n    } // Rewrite the data-length header item to reflect all of the samples concatenated together\n\n\n    totalBufferView.setInt32(16, totalDataLength, true);\n    var offset = 0;\n    var dataOfTotalBuffer = new Uint8Array(totalBuffer, headerSize);\n\n    for (i = 0; i < bufferCollection.length; i++) {\n      buffer = bufferCollection[i];\n      dataOfTotalBuffer.set(new Uint8Array(buffer, headerSize), offset);\n      offset += buffer.byteLength - headerSize;\n    }\n\n    return totalBuffer;\n  },\n\n  /**\n   * Return the unpacked values for a particular offset.\n   */\n  _offsetValues: function getOffsetValues(start, length, correction) {\n    var values = [];\n    var channels = this.channels;\n    correction += start * channels * 2; // offset the positioning query\n\n    for (var i = 0; i < length; i++) {\n      values.push(this._at(i * channels * 2 + correction));\n    }\n\n    return values;\n  },\n\n  /**\n   * Returns the data format version number.\n   */\n  _version: function _version() {\n    return this._data.getInt32(0, true);\n  },\n\n  /**\n   * Returns the length of the waveform, in pixels.\n   */\n  get length() {\n    return this._data.getUint32(16, true);\n  },\n\n  /**\n   * Returns the number of bits per sample, either 8 or 16.\n   */\n  get bits() {\n    var bits = Boolean(this._data.getUint32(4, true));\n    return bits ? 8 : 16;\n  },\n\n  /**\n   * Returns the (approximate) duration of the audio file, in seconds.\n   */\n  get duration() {\n    return this.length * this.scale / this.sample_rate;\n  },\n\n  /**\n   * Returns the number of pixels per second.\n   */\n  get pixels_per_second() {\n    return this.sample_rate / this.scale;\n  },\n\n  /**\n   * Returns the amount of time represented by a single pixel, in seconds.\n   */\n  get seconds_per_pixel() {\n    return this.scale / this.sample_rate;\n  },\n\n  /**\n   * Returns the number of waveform channels.\n   */\n  get channels() {\n    if (this._version() === 2) {\n      return this._data.getInt32(20, true);\n    } else {\n      return 1;\n    }\n  },\n\n  /**\n   * Returns a waveform channel.\n   */\n  channel: function channel(index) {\n    if (index >= 0 && index < this._channels.length) {\n      return this._channels[index];\n    } else {\n      throw new RangeError(\"Invalid channel: \" + index);\n    }\n  },\n\n  /**\n   * Returns the number of audio samples per second.\n   */\n  get sample_rate() {\n    return this._data.getInt32(8, true);\n  },\n\n  /**\n   * Returns the number of audio samples per pixel.\n   */\n  get scale() {\n    return this._data.getInt32(12, true);\n  },\n\n  /**\n   * Returns a waveform data value at a specific offset.\n   */\n  _at: function at_sample(index) {\n    if (this.bits === 8) {\n      return this._data.getInt8(this._offset + index);\n    } else {\n      return this._data.getInt16(this._offset + index * 2, true);\n    }\n  },\n\n  /**\n   * Sets a waveform data value at a specific offset.\n   */\n  _set_at: function set_at(index, sample) {\n    if (this.bits === 8) {\n      return this._data.setInt8(this._offset + index, sample);\n    } else {\n      return this._data.setInt16(this._offset + index * 2, sample, true);\n    }\n  },\n\n  /**\n   * Returns the waveform data index position for a given time.\n   */\n  at_time: function at_time(time) {\n    return Math.floor(time * this.sample_rate / this.scale);\n  },\n\n  /**\n   * Returns the time in seconds for a given index.\n   */\n  time: function time(index) {\n    return index * this.scale / this.sample_rate;\n  },\n\n  /**\n   * Returns an object containing the waveform data.\n   */\n  toJSON: function toJSON() {\n    var waveform = {\n      version: 2,\n      channels: this.channels,\n      sample_rate: this.sample_rate,\n      samples_per_pixel: this.scale,\n      bits: this.bits,\n      length: this.length,\n      data: []\n    };\n\n    for (var i = 0; i < this.length; i++) {\n      for (var channel = 0; channel < this.channels; channel++) {\n        waveform.data.push(this.channel(channel).min_sample(i));\n        waveform.data.push(this.channel(channel).max_sample(i));\n      }\n    }\n\n    return waveform;\n  },\n\n  /**\n   * Returns the waveform data in binary format as an ArrayBuffer.\n   */\n  toArrayBuffer: function toArrayBuffer() {\n    return this._data.buffer;\n  }\n};\n\nexport { WaveformData as default };\n","import Konva from 'konva/lib/Core';\nimport { Line } from 'konva/lib/shapes/Line';\nimport { Rect } from 'konva/lib/shapes/Rect';\nimport { Text } from 'konva/lib/shapes/Text';\nimport { Animation } from 'konva/lib/Animation';\nimport 'konva/lib/shapes/Image';\nimport WaveformData from 'waveform-data';\n\nfunction getDefaultExportFromCjs (x) {\n\treturn x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;\n}\n\nvar eventemitter3 = {exports: {}};\n\nvar hasRequiredEventemitter3;\nfunction requireEventemitter3() {\n  if (hasRequiredEventemitter3) return eventemitter3.exports;\n  hasRequiredEventemitter3 = 1;\n  (function (module) {\n\n    var 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     */\n    function 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    //\n    if (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     */\n    function 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     */\n    function addListener(emitter, event, fn, context, once) {\n      if (typeof fn !== 'function') {\n        throw new TypeError('The listener must be a function');\n      }\n      var listener = new EE(fn, context || emitter, once),\n        evt = prefix ? prefix + event : event;\n      if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);else emitter._events[evt] = [emitter._events[evt], listener];\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     */\n    function clearEvent(emitter, evt) {\n      if (--emitter._eventsCount === 0) emitter._events = new Events();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     */\n    function 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     */\n    EventEmitter.prototype.eventNames = function eventNames() {\n      var names = [],\n        events,\n        name;\n      if (this._eventsCount === 0) return names;\n      for (name in events = this._events) {\n        if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n      }\n      if (Object.getOwnPropertySymbols) {\n        return names.concat(Object.getOwnPropertySymbols(events));\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     */\n    EventEmitter.prototype.listeners = function listeners(event) {\n      var evt = prefix ? prefix + event : event,\n        handlers = this._events[evt];\n      if (!handlers) return [];\n      if (handlers.fn) return [handlers.fn];\n      for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n        ee[i] = handlers[i].fn;\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     */\n    EventEmitter.prototype.listenerCount = function listenerCount(event) {\n      var evt = prefix ? prefix + event : event,\n        listeners = this._events[evt];\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     */\n    EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n      var evt = prefix ? prefix + event : event;\n      if (!this._events[evt]) return false;\n      var listeners = this._events[evt],\n        len = arguments.length,\n        args,\n        i;\n      if (listeners.fn) {\n        if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n        switch (len) {\n          case 1:\n            return listeners.fn.call(listeners.context), true;\n          case 2:\n            return listeners.fn.call(listeners.context, a1), true;\n          case 3:\n            return listeners.fn.call(listeners.context, a1, a2), true;\n          case 4:\n            return listeners.fn.call(listeners.context, a1, a2, a3), true;\n          case 5:\n            return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n          case 6:\n            return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n        }\n        for (i = 1, args = new Array(len - 1); i < len; i++) {\n          args[i - 1] = arguments[i];\n        }\n        listeners.fn.apply(listeners.context, args);\n      } else {\n        var length = listeners.length,\n          j;\n        for (i = 0; i < length; i++) {\n          if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n          switch (len) {\n            case 1:\n              listeners[i].fn.call(listeners[i].context);\n              break;\n            case 2:\n              listeners[i].fn.call(listeners[i].context, a1);\n              break;\n            case 3:\n              listeners[i].fn.call(listeners[i].context, a1, a2);\n              break;\n            case 4:\n              listeners[i].fn.call(listeners[i].context, a1, a2, a3);\n              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              listeners[i].fn.apply(listeners[i].context, args);\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     */\n    EventEmitter.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     */\n    EventEmitter.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     */\n    EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n      var evt = prefix ? prefix + event : event;\n      if (!this._events[evt]) return this;\n      if (!fn) {\n        clearEvent(this, evt);\n        return this;\n      }\n      var listeners = this._events[evt];\n      if (listeners.fn) {\n        if (listeners.fn === fn && (!once || listeners.once) && (!context || listeners.context === context)) {\n          clearEvent(this, evt);\n        }\n      } else {\n        for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n          if (listeners[i].fn !== fn || once && !listeners[i].once || context && listeners[i].context !== context) {\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;else clearEvent(this, evt);\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     */\n    EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n      var evt;\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      return this;\n    };\n\n    //\n    // Alias methods names because people roll like that.\n    //\n    EventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n    EventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n    //\n    // Expose the prefix.\n    //\n    EventEmitter.prefixed = prefix;\n\n    //\n    // Allow `EventEmitter` to be imported as module namespace.\n    //\n    EventEmitter.EventEmitter = EventEmitter;\n\n    //\n    // Expose the module.\n    //\n    {\n      module.exports = EventEmitter;\n    }\n  })(eventemitter3);\n  return eventemitter3.exports;\n}\n\nvar eventemitter3Exports = requireEventemitter3();\nvar EventEmitter = /*@__PURE__*/getDefaultExportFromCjs(eventemitter3Exports);\n\nfunction _typeof(o) {\n  \"@babel/helpers - typeof\";\n\n  return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n    return typeof o;\n  } : function (o) {\n    return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n  }, _typeof(o);\n}\n\n/**\n * @file\n *\n * Defines the {@link Cue} class.\n *\n * @module cue\n */\n\n/**\n * A cue represents an event to be triggered at some point on the media\n * timeline.\n *\n * @class\n * @alias Cue\n *\n * @param {Number} time Cue time, in seconds.\n * @param {Number} type Cue mark type, either <code>Cue.POINT</code>,\n *   <code>Cue.SEGMENT_START</code>, or <code>Cue.SEGMENT_END</code>.\n * @param {String} id The id of the {@link Point} or {@link Segment}.\n */\n\nfunction Cue(time, type, id) {\n  this.time = time;\n  this.type = type;\n  this.id = id;\n}\n\n/**\n  * @constant\n  * @type {Number}\n  */\n\nCue.POINT = 0;\nCue.SEGMENT_START = 1;\nCue.SEGMENT_END = 2;\n\n/**\n * Callback function for use with Array.prototype.sort().\n *\n * @static\n * @param {Cue} a\n * @param {Cue} b\n * @return {Number}\n */\n\nCue.sorter = function (a, b) {\n  return a.time - b.time;\n};\n\nfunction zeroPad(number, precision) {\n  number = number.toString();\n  while (number.length < precision) {\n    number = '0' + number;\n  }\n  return number;\n}\n\n/**\n * Returns a formatted time string.\n *\n * @param {Number} time The time to be formatted, in seconds.\n * @param {Number} precision Decimal places to which time is displayed\n * @returns {String}\n */\n\nfunction formatTime(time, precision) {\n  var result = [];\n  var fractionSeconds = Math.floor(time % 1 * Math.pow(10, precision));\n  var seconds = Math.floor(time);\n  var minutes = Math.floor(seconds / 60);\n  var hours = Math.floor(minutes / 60);\n  if (hours > 0) {\n    result.push(hours); // Hours\n  }\n  result.push(minutes % 60); // Mins\n  result.push(seconds % 60); // Seconds\n\n  for (var i = 0; i < result.length; i++) {\n    result[i] = zeroPad(result[i], 2);\n  }\n  result = result.join(':');\n  if (precision > 0) {\n    result += '.' + zeroPad(fractionSeconds, precision);\n  }\n  return result;\n}\n\n/**\n * Rounds the given value up to the nearest given multiple.\n *\n * @param {Number} value\n * @param {Number} multiple\n * @returns {Number}\n *\n * @example\n * roundUpToNearest(5.5, 3); // returns 6\n * roundUpToNearest(141.0, 10); // returns 150\n * roundUpToNearest(-5.5, 3); // returns -6\n */\n\nfunction roundUpToNearest(value, multiple) {\n  if (multiple === 0) {\n    return 0;\n  }\n  var multiplier = 1;\n  if (value < 0.0) {\n    multiplier = -1;\n    value = -value;\n  }\n  var roundedUp = Math.ceil(value);\n  return multiplier * ((roundedUp + multiple - 1) / multiple | 0) * multiple;\n}\nfunction clamp(value, min, max) {\n  if (value < min) {\n    return min;\n  } else if (value > max) {\n    return max;\n  } else {\n    return value;\n  }\n}\nfunction objectHasProperty(object, field) {\n  return Object.prototype.hasOwnProperty.call(object, field);\n}\nfunction extend(to, from) {\n  for (var key in from) {\n    if (objectHasProperty(from, key)) {\n      to[key] = from[key];\n    }\n  }\n  return to;\n}\n\n/**\n * Checks whether the given array contains values in ascending order.\n *\n * @param {Array<Number>} array The array to test\n * @returns {Boolean}\n */\n\nfunction isInAscendingOrder(array) {\n  if (array.length === 0) {\n    return true;\n  }\n  var value = array[0];\n  for (var i = 1; i < array.length; i++) {\n    if (value >= array[i]) {\n      return false;\n    }\n    value = array[i];\n  }\n  return true;\n}\n\n/**\n * Checks whether the given value is a number.\n *\n * @param {Number} value The value to test\n * @returns {Boolean}\n */\n\nfunction isNumber(value) {\n  return typeof value === 'number';\n}\n\n/**\n * Checks whether the given value is a finite number.\n *\n * @param {Number} value The value to test\n * @returns {Boolean}\n */\n\nfunction isFinite(value) {\n  if (typeof value !== 'number') {\n    return false;\n  }\n\n  // Check for NaN and infinity\n  // eslint-disable-next-line no-self-compare\n  if (value !== value || value === Infinity || value === -Infinity) {\n    return false;\n  }\n  return true;\n}\n\n/**\n * Checks whether the given value is a valid timestamp.\n *\n * @param {Number} value The value to test\n * @returns {Boolean}\n */\n\nfunction isValidTime(value) {\n  return typeof value === 'number' && Number.isFinite(value);\n}\n\n/**\n * Checks whether the given value is a valid object.\n *\n * @param {Object|Array} value The value to test\n * @returns {Boolean}\n */\n\nfunction isObject(value) {\n  return value !== null && _typeof(value) === 'object' && !Array.isArray(value);\n}\n\n/**\n * Checks whether the given value is a valid string.\n *\n * @param {String} value The value to test\n * @returns {Boolean}\n */\n\nfunction isString(value) {\n  return typeof value === 'string';\n}\n\n/**\n * Checks whether the given value is a valid ArrayBuffer.\n *\n * @param {ArrayBuffer} value The value to test\n * @returns {Boolean}\n */\n\nfunction isArrayBuffer(value) {\n  return Object.prototype.toString.call(value).includes('ArrayBuffer');\n}\n\n/**\n * Checks whether the given value is null or undefined.\n *\n * @param {Object} value The value to test\n * @returns {Boolean}\n */\n\nfunction isNullOrUndefined(value) {\n  return value === undefined || value === null;\n}\n\n/**\n * Checks whether the given value is a function.\n *\n * @param {Function} value The value to test\n * @returns {Boolean}\n */\n\nfunction isFunction(value) {\n  return typeof value === 'function';\n}\n\n/**\n * Checks whether the given value is a boolean.\n *\n * @param {Function} value The value to test\n * @returns {Boolean}\n */\n\nfunction isBoolean(value) {\n  return value === true || value === false;\n}\n\n/**\n * Checks whether the given value is a valid HTML element.\n *\n * @param {HTMLElement} value The value to test\n * @returns {Boolean}\n */\n\nfunction isHTMLElement(value) {\n  return value instanceof HTMLElement;\n}\n\n/**\n * Checks whether the given value is an array\n *\n * @param {Function} value The value to test\n * @returns {Boolean}\n */\n\nfunction isArray(value) {\n  return Array.isArray(value);\n}\n\n/**\n * Checks whether the given value is a valid linear gradient color\n *\n * @param {Function} value The value to test\n * @returns {Boolean}\n */\n\nfunction isLinearGradientColor(value) {\n  return isObject(value) && objectHasProperty(value, 'linearGradientStart') && objectHasProperty(value, 'linearGradientEnd') && objectHasProperty(value, 'linearGradientColorStops') && isNumber(value.linearGradientStart) && isNumber(value.linearGradientEnd) && isArray(value.linearGradientColorStops) && value.linearGradientColorStops.length === 2;\n}\nfunction getMarkerObject(obj) {\n  while (obj.parent !== null) {\n    if (obj.parent instanceof Konva.Layer) {\n      return obj;\n    }\n    obj = obj.parent;\n  }\n  return null;\n}\n\nvar isHeadless = /HeadlessChrome/.test(navigator.userAgent);\nfunction windowIsVisible() {\n  if (isHeadless || navigator.webdriver) {\n    return false;\n  }\n  return (typeof document === \"undefined\" ? \"undefined\" : _typeof(document)) === 'object' && 'visibilityState' in document && document.visibilityState === 'visible';\n}\nvar requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;\nvar cancelAnimationFrame = window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame || window.msCancelAnimationFrame;\nvar eventTypes = {\n  forward: {},\n  reverse: {}\n};\nvar EVENT_TYPE_POINT = 0;\nvar EVENT_TYPE_SEGMENT_ENTER = 1;\nvar EVENT_TYPE_SEGMENT_EXIT = 2;\neventTypes.forward[Cue.POINT] = EVENT_TYPE_POINT;\neventTypes.forward[Cue.SEGMENT_START] = EVENT_TYPE_SEGMENT_ENTER;\neventTypes.forward[Cue.SEGMENT_END] = EVENT_TYPE_SEGMENT_EXIT;\neventTypes.reverse[Cue.POINT] = EVENT_TYPE_POINT;\neventTypes.reverse[Cue.SEGMENT_START] = EVENT_TYPE_SEGMENT_EXIT;\neventTypes.reverse[Cue.SEGMENT_END] = EVENT_TYPE_SEGMENT_ENTER;\nvar eventNames = {};\neventNames[EVENT_TYPE_POINT] = 'points.enter';\neventNames[EVENT_TYPE_SEGMENT_ENTER] = 'segments.enter';\neventNames[EVENT_TYPE_SEGMENT_EXIT] = 'segments.exit';\nvar eventAttributes = {};\neventAttributes[EVENT_TYPE_POINT] = 'point';\neventAttributes[EVENT_TYPE_SEGMENT_ENTER] = 'segment';\neventAttributes[EVENT_TYPE_SEGMENT_EXIT] = 'segment';\n\n/**\n * Given a cue instance, returns the corresponding {@link Point}\n * {@link Segment}.\n *\n * @param {Peaks} peaks\n * @param {Cue} cue\n * @return {Point|Segment}\n * @throws {Error}\n */\n\nfunction getPointOrSegment(peaks, cue) {\n  switch (cue.type) {\n    case Cue.POINT:\n      return peaks.points.getPoint(cue.id);\n    case Cue.SEGMENT_START:\n    case Cue.SEGMENT_END:\n      return peaks.segments.getSegment(cue.id);\n    default:\n      throw new Error('getPointOrSegment: id not found?');\n  }\n}\n\n/**\n * CueEmitter is responsible for emitting <code>points.enter</code>,\n * <code>segments.enter</code>, and <code>segments.exit</code> events.\n *\n * @class\n * @alias CueEmitter\n *\n * @param {Peaks} peaks Parent {@link Peaks} instance.\n */\n\nfunction CueEmitter(peaks) {\n  this._cues = [];\n  this._peaks = peaks;\n  this._previousTime = -1;\n  this._updateCues = this._updateCues.bind(this);\n  this._onPlaying = this._onPlaying.bind(this);\n  this._onSeeked = this._onSeeked.bind(this);\n  this._onTimeUpdate = this._onTimeUpdate.bind(this);\n  this._onAnimationFrame = this._onAnimationFrame.bind(this);\n  this._rAFHandle = null;\n  this._activeSegments = {};\n  this._attachEventHandlers();\n}\n\n/**\n * This function is bound to all {@link Peaks} events relating to mutated\n * [Points]{@link Point} or [Segments]{@link Segment}, and updates the\n * list of cues accordingly.\n *\n * @private\n */\n\nCueEmitter.prototype._updateCues = function () {\n  var self = this;\n  var points = self._peaks.points.getPoints();\n  var segments = self._peaks.segments.getSegments();\n  self._cues.length = 0;\n  points.forEach(function (point) {\n    self._cues.push(new Cue(point.time, Cue.POINT, point.id));\n  });\n  segments.forEach(function (segment) {\n    self._cues.push(new Cue(segment.startTime, Cue.SEGMENT_START, segment.id));\n    self._cues.push(new Cue(segment.endTime, Cue.SEGMENT_END, segment.id));\n  });\n  self._cues.sort(Cue.sorter);\n  var time = self._peaks.player.getCurrentTime();\n  self._updateActiveSegments(time);\n};\n\n/**\n * Emits events for any cues passed through during media playback.\n *\n * @param {Number} time The current time on the media timeline.\n * @param {Number} previousTime The previous time on the media timeline when\n *   this function was called.\n */\n\nCueEmitter.prototype._onUpdate = function (time, previousTime) {\n  var isForward = time > previousTime;\n  var start;\n  var end;\n  var step;\n  if (isForward) {\n    start = 0;\n    end = this._cues.length;\n    step = 1;\n  } else {\n    start = this._cues.length - 1;\n    end = -1;\n    step = -1;\n  }\n\n  // Cues are sorted.\n\n  for (var i = start; isForward ? i < end : i > end; i += step) {\n    var cue = this._cues[i];\n    if (isForward ? cue.time > previousTime : cue.time < previousTime) {\n      if (isForward ? cue.time > time : cue.time < time) {\n        break;\n      }\n\n      // Cue falls between time and previousTime.\n\n      var marker = getPointOrSegment(this._peaks, cue);\n      var eventType = isForward ? eventTypes.forward[cue.type] : eventTypes.reverse[cue.type];\n      if (eventType === EVENT_TYPE_SEGMENT_ENTER) {\n        this._activeSegments[marker.id] = marker;\n      } else if (eventType === EVENT_TYPE_SEGMENT_EXIT) {\n        delete this._activeSegments[marker.id];\n      }\n      var event = {\n        time: time\n      };\n      event[eventAttributes[eventType]] = marker;\n      this._peaks.emit(eventNames[eventType], event);\n    }\n  }\n};\n\n// The next handler and onAnimationFrame are bound together\n// when the window isn't in focus, rAF is throttled\n// falling back to timeUpdate.\n\nCueEmitter.prototype._onTimeUpdate = function (time) {\n  if (windowIsVisible()) {\n    return;\n  }\n  if (this._peaks.player.isPlaying() && !this._peaks.player.isSeeking()) {\n    this._onUpdate(time, this._previousTime);\n  }\n  this._previousTime = time;\n};\nCueEmitter.prototype._onAnimationFrame = function () {\n  var time = this._peaks.player.getCurrentTime();\n  if (!this._peaks.player.isSeeking()) {\n    this._onUpdate(time, this._previousTime);\n  }\n  this._previousTime = time;\n  if (this._peaks.player.isPlaying()) {\n    this._rAFHandle = requestAnimationFrame(this._onAnimationFrame);\n  }\n};\nCueEmitter.prototype._onPlaying = function () {\n  this._previousTime = this._peaks.player.getCurrentTime();\n  this._rAFHandle = requestAnimationFrame(this._onAnimationFrame);\n};\nCueEmitter.prototype._onSeeked = function (time) {\n  this._previousTime = time;\n  this._updateActiveSegments(time);\n};\nfunction getSegmentIdComparator(id) {\n  return function compareSegmentIds(segment) {\n    return segment.id === id;\n  };\n}\n\n/**\n * The active segments is the set of all segments which overlap the current\n * playhead position. This function updates that set and emits\n * <code>segments.enter</code> and <code>segments.exit</code> events.\n */\n\nCueEmitter.prototype._updateActiveSegments = function (time) {\n  var self = this;\n  var activeSegments = self._peaks.segments.getSegmentsAtTime(time);\n\n  // Remove any segments no longer active.\n\n  for (var id in self._activeSegments) {\n    if (objectHasProperty(self._activeSegments, id)) {\n      var segment = activeSegments.find(getSegmentIdComparator(id));\n      if (!segment) {\n        self._peaks.emit('segments.exit', {\n          segment: self._activeSegments[id],\n          time: time\n        });\n        delete self._activeSegments[id];\n      }\n    }\n  }\n\n  // Add new active segments.\n\n  activeSegments.forEach(function (segment) {\n    if (!(segment.id in self._activeSegments)) {\n      self._activeSegments[segment.id] = segment;\n      self._peaks.emit('segments.enter', {\n        segment: segment,\n        time: time\n      });\n    }\n  });\n};\nvar events = ['points.update', 'points.dragmove', 'points.add', 'points.remove', 'points.remove_all', 'segments.update', 'segments.dragged', 'segments.add', 'segments.remove', 'segments.remove_all'];\nCueEmitter.prototype._attachEventHandlers = function () {\n  this._peaks.on('player.timeupdate', this._onTimeUpdate);\n  this._peaks.on('player.playing', this._onPlaying);\n  this._peaks.on('player.seeked', this._onSeeked);\n  for (var i = 0; i < events.length; i++) {\n    this._peaks.on(events[i], this._updateCues);\n  }\n  this._updateCues();\n};\nCueEmitter.prototype._detachEventHandlers = function () {\n  this._peaks.off('player.timeupdate', this._onTimeUpdate);\n  this._peaks.off('player.playing', this._onPlaying);\n  this._peaks.off('player.seeked', this._onSeeked);\n  for (var i = 0; i < events.length; i++) {\n    this._peaks.off(events[i], this._updateCues);\n  }\n};\nCueEmitter.prototype.destroy = function () {\n  if (this._rAFHandle) {\n    cancelAnimationFrame(this._rAFHandle);\n    this._rAFHandle = null;\n  }\n  this._detachEventHandlers();\n  this._previousTime = -1;\n};\n\n/**\n * @file\n *\n * Defines the {@link Point} class.\n *\n * @module point\n */\n\nvar pointOptions = ['id', 'pid', 'time', 'labelText', 'color', 'editable'];\nvar invalidOptions$1 = ['update', 'isVisible', 'peaks', 'pid'];\nfunction setDefaultPointOptions(options, peaksOptions) {\n  if (isNullOrUndefined(options.labelText)) {\n    options.labelText = '';\n  }\n  if (isNullOrUndefined(options.editable)) {\n    options.editable = false;\n  }\n  if (isNullOrUndefined(options.color)) {\n    options.color = peaksOptions.pointMarkerColor;\n  }\n}\nfunction validatePointOptions(options, updating) {\n  var context = updating ? 'update()' : 'add()';\n  if (!updating || updating && objectHasProperty(options, 'time')) {\n    if (!isValidTime(options.time)) {\n      throw new TypeError('peaks.points.' + context + ': time should be a numeric value');\n    }\n  }\n  if (options.time < 0) {\n    throw new RangeError('peaks.points.' + context + ': time should not be negative');\n  }\n  if (objectHasProperty(options, 'labelText') && !isString(options.labelText)) {\n    throw new TypeError('peaks.points.' + context + ': labelText must be a string');\n  }\n  if (objectHasProperty(options, 'editable') && !isBoolean(options.editable)) {\n    throw new TypeError('peaks.points.' + context + ': editable must be true or false');\n  }\n  if (objectHasProperty(options, 'color') && !isString(options.color) && !isLinearGradientColor(options.color)) {\n    // eslint-disable-next-line @stylistic/js/max-len\n    throw new TypeError('peaks.points.' + context + ': color must be a string or a valid linear gradient object');\n  }\n  invalidOptions$1.forEach(function (name) {\n    if (objectHasProperty(options, name)) {\n      throw new Error('peaks.points.' + context + ': invalid option name: ' + name);\n    }\n  });\n  pointOptions.forEach(function (name) {\n    if (objectHasProperty(options, '_' + name)) {\n      throw new Error('peaks.points.' + context + ': invalid option name: _' + name);\n    }\n  });\n}\n\n/**\n * A point is a single instant of time, with associated label and color.\n *\n * @class\n * @alias Point\n *\n * @param {Peaks} peaks A reference to the Peaks instance.\n * @param {Number} pid An internal unique identifier for the point.\n * @param {PointOptions} options User specified point attributes.\n */\n\nfunction Point(peaks, pid, options) {\n  this._peaks = peaks;\n  this._pid = pid;\n  this._setUserData(options);\n}\nPoint.prototype._setUserData = function (options) {\n  for (var key in options) {\n    if (objectHasProperty(options, key)) {\n      if (pointOptions.indexOf(key) === -1) {\n        this[key] = options[key];\n      } else {\n        this['_' + key] = options[key];\n      }\n    }\n  }\n};\nObject.defineProperties(Point.prototype, {\n  id: {\n    enumerable: true,\n    get: function get() {\n      return this._id;\n    }\n  },\n  pid: {\n    enumerable: true,\n    get: function get() {\n      return this._pid;\n    }\n  },\n  time: {\n    enumerable: true,\n    get: function get() {\n      return this._time;\n    }\n  },\n  labelText: {\n    get: function get() {\n      return this._labelText;\n    }\n  },\n  color: {\n    enumerable: true,\n    get: function get() {\n      return this._color;\n    }\n  },\n  editable: {\n    enumerable: true,\n    get: function get() {\n      return this._editable;\n    }\n  }\n});\nPoint.prototype.update = function (options) {\n  validatePointOptions(options, true);\n  if (objectHasProperty(options, 'id')) {\n    if (isNullOrUndefined(options.id)) {\n      throw new TypeError('point.update(): invalid id');\n    }\n    this._peaks.points.updatePointId(this, options.id);\n  }\n  this._setUserData(options);\n  this._peaks.emit('points.update', this, options);\n};\n\n/**\n * Returns <code>true</code> if the point lies with in a given time range.\n *\n * @param {Number} startTime The start of the time region, in seconds.\n * @param {Number} endTime The end of the time region, in seconds.\n * @returns {Boolean}\n */\n\nPoint.prototype.isVisible = function (startTime, endTime) {\n  return this.time >= startTime && this.time < endTime;\n};\nPoint.prototype._setTime = function (time) {\n  this._time = time;\n};\n\n/**\n * @file\n *\n * Defines the {@link WaveformPoints} class.\n *\n * @module waveform-points\n */\n\n\n/**\n * Point parameters.\n *\n * @typedef {Object} PointOptions\n * @global\n * @property {Number} time Point time, in seconds.\n * @property {Boolean=} editable If <code>true</code> the point time can be\n *   adjusted via the user interface.\n *   Default: <code>false</code>.\n * @property {String=} color Point marker color.\n *   Default: a random color.\n * @property {String=} labelText Point label text.\n *   Default: an empty string.\n * @property {String=} id A unique point identifier.\n *   Default: an automatically generated identifier.\n * @property {*} data Optional application-specific data.\n */\n\n/**\n * Handles all functionality related to the adding, removing and manipulation\n * of points. A point is a single instant of time.\n *\n * @class\n * @alias WaveformPoints\n *\n * @param {Peaks} peaks The parent Peaks object.\n */\n\nfunction WaveformPoints(peaks) {\n  this._peaks = peaks;\n  this._points = [];\n  this._pointsById = {};\n  this._pointsByPid = {};\n  this._pointIdCounter = 0;\n  this._pointPid = 0;\n}\n\n/**\n * Returns a new unique point id value.\n *\n * @returns {String}\n */\n\nWaveformPoints.prototype._getNextPointId = function () {\n  return 'peaks.point.' + this._pointIdCounter++;\n};\n\n/**\n * Returns a new unique point id value, for internal use within\n * Peaks.js only.\n *\n * @returns {Number}\n */\n\nWaveformPoints.prototype._getNextPid = function () {\n  return this._pointPid++;\n};\n\n/**\n * Adds a new point object.\n *\n * @private\n * @param {Point} point\n */\n\nWaveformPoints.prototype._addPoint = function (point) {\n  this._points.push(point);\n  this._pointsById[point.id] = point;\n  this._pointsByPid[point.pid] = point;\n};\n\n/**\n * Creates a new point object.\n *\n * @private\n * @param {PointOptions} options\n * @returns {Point}\n */\n\nWaveformPoints.prototype._createPoint = function (options) {\n  var pointOptions = {};\n  extend(pointOptions, options);\n  if (isNullOrUndefined(pointOptions.id)) {\n    pointOptions.id = this._getNextPointId();\n  }\n  var pid = this._getNextPid();\n  setDefaultPointOptions(pointOptions, this._peaks.options);\n  validatePointOptions(pointOptions, false);\n  return new Point(this._peaks, pid, pointOptions);\n};\n\n/**\n * Returns all points.\n *\n * @returns {Array<Point>}\n */\n\nWaveformPoints.prototype.getPoints = function () {\n  return this._points;\n};\n\n/**\n * Returns the point with the given id, or <code>undefined</code> if not found.\n *\n * @param {String} id\n * @returns {Point}\n */\n\nWaveformPoints.prototype.getPoint = function (id) {\n  return this._pointsById[id];\n};\n\n/**\n * Returns all points within a given time region.\n *\n * @param {Number} startTime The start of the time region, in seconds.\n * @param {Number} endTime The end of the time region, in seconds.\n * @returns {Array<Point>}\n */\n\nWaveformPoints.prototype.find = function (startTime, endTime) {\n  return this._points.filter(function (point) {\n    return point.isVisible(startTime, endTime);\n  });\n};\n\n/**\n * Adds one or more points to the timeline.\n *\n * @param {PointOptions|Array<PointOptions>} pointOrPoints\n *\n * @returns Point|Array<Point>\n */\n\nWaveformPoints.prototype.add = function /* pointOrPoints */\n() {\n  var self = this;\n  var arrayArgs = Array.isArray(arguments[0]);\n  var points = arrayArgs ? arguments[0] : Array.prototype.slice.call(arguments);\n  points = points.map(function (pointOptions) {\n    var point = self._createPoint(pointOptions);\n    if (objectHasProperty(self._pointsById, point.id)) {\n      throw new Error('peaks.points.add(): duplicate id');\n    }\n    return point;\n  });\n  points.forEach(function (point) {\n    self._addPoint(point);\n  });\n  this._peaks.emit('points.add', {\n    points: points\n  });\n  return arrayArgs ? points : points[0];\n};\nWaveformPoints.prototype.updatePointId = function (point, newPointId) {\n  if (this._pointsById[point.id]) {\n    if (this._pointsById[newPointId]) {\n      throw new Error('point.update(): duplicate id');\n    } else {\n      delete this._pointsById[point.id];\n      this._pointsById[newPointId] = point;\n    }\n  }\n};\n\n/**\n * Returns the indexes of points that match the given predicate.\n *\n * @private\n * @param {Function} predicate Predicate function to find matching points.\n * @returns {Array<Number>} An array of indexes into the points array of\n *   the matching elements.\n */\n\nWaveformPoints.prototype._findPoint = function (predicate) {\n  var indexes = [];\n  for (var i = 0, length = this._points.length; i < length; i++) {\n    if (predicate(this._points[i])) {\n      indexes.push(i);\n    }\n  }\n  return indexes;\n};\n\n/**\n * Removes the points at the given array indexes.\n *\n * @private\n * @param {Array<Number>} indexes The array indexes to remove.\n * @returns {Array<Point>} The removed {@link Point} objects.\n */\n\nWaveformPoints.prototype._removeIndexes = function (indexes) {\n  var removed = [];\n  for (var i = 0; i < indexes.length; i++) {\n    var index = indexes[i] - removed.length;\n    var itemRemoved = this._points.splice(index, 1)[0];\n    delete this._pointsById[itemRemoved.id];\n    delete this._pointsByPid[itemRemoved.pid];\n    removed.push(itemRemoved);\n  }\n  return removed;\n};\n\n/**\n * Removes all points that match a given predicate function.\n *\n * After removing the points, this function emits a\n * <code>points.remove</code> event with the removed {@link Point}\n * objects.\n *\n * @private\n * @param {Function} predicate A predicate function that identifies which\n *   points to remove.\n * @returns {Array<Point>} The removed {@link Points} objects.\n */\n\nWaveformPoints.prototype._removePoints = function (predicate) {\n  var indexes = this._findPoint(predicate);\n  var removed = this._removeIndexes(indexes);\n  this._peaks.emit('points.remove', {\n    points: removed\n  });\n  return removed;\n};\n\n/**\n * Removes the given point.\n *\n * @param {Point} point The point to remove.\n * @returns {Array<Point>} The removed points.\n */\n\nWaveformPoints.prototype.remove = function (point) {\n  return this._removePoints(function (p) {\n    return p === point;\n  });\n};\n\n/**\n * Removes any points with the given id.\n *\n * @param {String} id\n * @returns {Array<Point>} The removed {@link Point} objects.\n */\n\nWaveformPoints.prototype.removeById = function (pointId) {\n  return this._removePoints(function (point) {\n    return point.id === pointId;\n  });\n};\n\n/**\n * Removes any points at the given time.\n *\n * @param {Number} time\n * @returns {Array<Point>} The removed {@link Point} objects.\n */\n\nWaveformPoints.prototype.removeByTime = function (time) {\n  return this._removePoints(function (point) {\n    return point.time === time;\n  });\n};\n\n/**\n * Removes all points.\n *\n * After removing the points, this function emits a\n * <code>points.remove_all</code> event.\n */\n\nWaveformPoints.prototype.removeAll = function () {\n  this._points = [];\n  this._pointsById = {};\n  this._pointsByPid = {};\n  this._peaks.emit('points.remove_all');\n};\n\n/**\n * @file\n *\n * Defines the {@link Segment} class.\n *\n * @module segment\n */\n\nvar segmentOptions = ['id', 'pid', 'startTime', 'endTime', 'labelText', 'color', 'borderColor', 'markers', 'overlay', 'editable'];\nvar invalidOptions = ['update', 'isVisible', 'peaks', 'pid'];\nfunction setDefaultSegmentOptions(options, globalSegmentOptions) {\n  if (isNullOrUndefined(options.color)) {\n    if (globalSegmentOptions.overlay) {\n      options.color = globalSegmentOptions.overlayColor;\n    } else {\n      options.color = globalSegmentOptions.waveformColor;\n    }\n  }\n  if (isNullOrUndefined(options.borderColor)) {\n    options.borderColor = globalSegmentOptions.overlayBorderColor;\n  }\n  if (isNullOrUndefined(options.labelText)) {\n    options.labelText = '';\n  }\n  if (isNullOrUndefined(options.markers)) {\n    options.markers = globalSegmentOptions.markers;\n  }\n  if (isNullOrUndefined(options.overlay)) {\n    options.overlay = globalSegmentOptions.overlay;\n  }\n  if (isNullOrUndefined(options.editable)) {\n    options.editable = false;\n  }\n}\nfunction validateSegmentOptions(options, updating) {\n  var context = updating ? 'update()' : 'add()';\n  if (objectHasProperty(options, 'startTime') && !isValidTime(options.startTime)) {\n    throw new TypeError('peaks.segments.' + context + ': startTime should be a valid number');\n  }\n  if (objectHasProperty(options, 'endTime') && !isValidTime(options.endTime)) {\n    throw new TypeError('peaks.segments.' + context + ': endTime should be a valid number');\n  }\n  if (!updating) {\n    if (!objectHasProperty(options, 'startTime') || !objectHasProperty(options, 'endTime')) {\n      throw new TypeError('peaks.segments.' + context + ': missing startTime or endTime');\n    }\n  }\n  if (options.startTime < 0) {\n    throw new RangeError('peaks.segments.' + context + ': startTime should not be negative');\n  }\n  if (options.endTime < 0) {\n    throw new RangeError('peaks.segments.' + context + ': endTime should not be negative');\n  }\n  if (options.endTime < options.startTime) {\n    // eslint-disable-next-line @stylistic/js/max-len\n    throw new RangeError('peaks.segments.' + context + ': endTime should not be less than startTime');\n  }\n  if (objectHasProperty(options, 'labelText') && !isString(options.labelText)) {\n    throw new TypeError('peaks.segments.' + context + ': labelText must be a string');\n  }\n  if (updating && objectHasProperty(options, 'markers')) {\n    throw new TypeError('peaks.segments.' + context + ': cannot update markers attribute');\n  }\n  if (objectHasProperty(options, 'markers') && !isBoolean(options.markers)) {\n    throw new TypeError('peaks.segments.' + context + ': markers must be true or false');\n  }\n  if (updating && objectHasProperty(options, 'overlay')) {\n    throw new TypeError('peaks.segments.' + context + ': cannot update overlay attribute');\n  }\n  if (objectHasProperty(options, 'overlay') && !isBoolean(options.overlay)) {\n    throw new TypeError('peaks.segments.' + context + ': overlay must be true or false');\n  }\n  if (objectHasProperty(options, 'editable') && !isBoolean(options.editable)) {\n    throw new TypeError('peaks.segments.' + context + ': editable must be true or false');\n  }\n  if (objectHasProperty(options, 'color') && !isString(options.color) && !isLinearGradientColor(options.color)) {\n    // eslint-disable-next-line @stylistic/js/max-len\n    throw new TypeError('peaks.segments.' + context + ': color must be a string or a valid linear gradient object');\n  }\n  if (objectHasProperty(options, 'borderColor') && !isString(options.borderColor)) {\n    throw new TypeError('peaks.segments.' + context + ': borderColor must be a string');\n  }\n  invalidOptions.forEach(function (name) {\n    if (objectHasProperty(options, name)) {\n      throw new Error('peaks.segments.' + context + ': invalid option name: ' + name);\n    }\n  });\n  segmentOptions.forEach(function (name) {\n    if (objectHasProperty(options, '_' + name)) {\n      throw new Error('peaks.segments.' + context + ': invalid option name: _' + name);\n    }\n  });\n}\n\n/**\n * A segment is a region of time, with associated label and color.\n *\n * @class\n * @alias Segment\n *\n * @param {Peaks} peaks A reference to the Peaks instance.\n * @param {Number} pid An internal unique identifier for the segment.\n * @param {SegmentOptions} options User specified segment attributes.\n */\n\nfunction Segment(peaks, pid, options) {\n  this._peaks = peaks;\n  this._pid = pid;\n  this._id = options.id;\n  this._startTime = options.startTime;\n  this._endTime = options.endTime;\n  this._labelText = options.labelText;\n  this._color = options.color;\n  this._borderColor = options.borderColor;\n  this._editable = options.editable;\n  this._markers = options.markers;\n  this._overlay = options.overlay;\n  this._setUserData(options);\n}\nSegment.prototype._setUserData = function (options) {\n  for (var key in options) {\n    if (objectHasProperty(options, key)) {\n      if (segmentOptions.indexOf(key) === -1) {\n        this[key] = options[key];\n      } else {\n        this['_' + key] = options[key];\n      }\n    }\n  }\n};\nObject.defineProperties(Segment.prototype, {\n  id: {\n    enumerable: true,\n    get: function get() {\n      return this._id;\n    }\n  },\n  pid: {\n    enumerable: true,\n    get: function get() {\n      return this._pid;\n    }\n  },\n  startTime: {\n    enumerable: true,\n    get: function get() {\n      return this._startTime;\n    }\n  },\n  endTime: {\n    enumerable: true,\n    get: function get() {\n      return this._endTime;\n    }\n  },\n  labelText: {\n    enumerable: true,\n    get: function get() {\n      return this._labelText;\n    }\n  },\n  color: {\n    enumerable: true,\n    get: function get() {\n      return this._color;\n    }\n  },\n  borderColor: {\n    enumerable: true,\n    get: function get() {\n      return this._borderColor;\n    }\n  },\n  markers: {\n    enumerable: true,\n    get: function get() {\n      return this._markers;\n    }\n  },\n  overlay: {\n    enumerable: true,\n    get: function get() {\n      return this._overlay;\n    }\n  },\n  editable: {\n    enumerable: true,\n    get: function get() {\n      return this._editable;\n    }\n  }\n});\nSegment.prototype.update = function (options) {\n  validateSegmentOptions(options, true);\n  if (objectHasProperty(options, 'id')) {\n    if (isNullOrUndefined(options.id)) {\n      throw new TypeError('segment.update(): invalid id');\n    }\n    this._peaks.segments.updateSegmentId(this, options.id);\n  }\n  this._setUserData(options);\n  this._peaks.emit('segments.update', this, options);\n};\n\n/**\n * Returns <code>true</code> if the segment overlaps a given time region.\n *\n * @param {Number} startTime The start of the time region, in seconds.\n * @param {Number} endTime The end of the time region, in seconds.\n * @returns {Boolean}\n */\n\nSegment.prototype.isVisible = function (startTime, endTime) {\n  // A special case, where the segment has zero duration\n  // and is at the start of the region.\n  if (this.startTime === this.endTime && this.startTime === startTime) {\n    return true;\n  }\n\n  // Segment ends before start of region.\n  if (this.endTime <= startTime) {\n    return false;\n  }\n\n  // Segment starts after end of region\n  if (this.startTime >= endTime) {\n    return false;\n  }\n  return true;\n};\nSegment.prototype._setStartTime = function (time) {\n  this._startTime = time;\n};\nSegment.prototype._setEndTime = function (time) {\n  this._endTime = time;\n};\n\n/**\n * @file\n *\n * Defines the {@link WaveformSegments} class.\n *\n * @module waveform-segments\n */\n\n\n/**\n * Segment parameters.\n *\n * @typedef {Object} SegmentOptions\n * @global\n * @property {Number} startTime Segment start time, in seconds.\n * @property {Number} endTime Segment end time, in seconds.\n * @property {Boolean=} editable If <code>true</code> the segment start and\n *   end times can be adjusted via the user interface.\n *   Default: <code>false</code>.\n * @property {String=} color Segment waveform color.\n *   Default: Set by the <code>segmentOptions.waveformColor</code> option\n *   or the <code>segmentOptions.overlayColor</code> option.\n * @property {String=} borderColor Segment border color.\n *   Default: Set by the <code>segmentOptions.overlayBorderColor</code> option.\n * @property {String=} labelText Segment label text.\n *   Default: an empty string.\n * @property {String=} id A unique segment identifier.\n *   Default: an automatically generated identifier.\n * @property {*} data Optional application specific data.\n */\n\n/**\n * Handles all functionality related to the adding, removing and manipulation\n * of segments.\n *\n * @class\n * @alias WaveformSegments\n *\n * @param {Peaks} peaks The parent Peaks object.\n */\n\nfunction WaveformSegments(peaks) {\n  this._peaks = peaks;\n  this._segments = [];\n  this._segmentsById = {};\n  this._segmentsByPid = {};\n  this._segmentIdCounter = 0;\n  this._segmentPid = 0;\n  this._isInserting = false;\n}\n\n/**\n * Returns a new unique segment id value.\n *\n * @private\n * @returns {String}\n */\n\nWaveformSegments.prototype._getNextSegmentId = function () {\n  return 'peaks.segment.' + this._segmentIdCounter++;\n};\n\n/**\n * Returns a new unique segment id value, for internal use within\n * Peaks.js only.\n *\n * @private\n * @returns {Number}\n */\n\nWaveformSegments.prototype._getNextPid = function () {\n  return this._segmentPid++;\n};\n\n/**\n * Adds a new segment object.\n *\n * @private\n * @param {Segment} segment\n */\n\nWaveformSegments.prototype._addSegment = function (segment) {\n  this._segments.push(segment);\n  this._segmentsById[segment.id] = segment;\n  this._segmentsByPid[segment.pid] = segment;\n};\n\n/**\n * Creates a new segment object.\n *\n * @private\n * @param {SegmentOptions} options\n * @return {Segment}\n */\n\nWaveformSegments.prototype._createSegment = function (options) {\n  var segmentOptions = {};\n  extend(segmentOptions, options);\n  if (isNullOrUndefined(segmentOptions.id)) {\n    segmentOptions.id = this._getNextSegmentId();\n  }\n  var pid = this._getNextPid();\n  setDefaultSegmentOptions(segmentOptions, this._peaks.options.segmentOptions);\n  validateSegmentOptions(segmentOptions, false);\n  return new Segment(this._peaks, pid, segmentOptions);\n};\n\n/**\n * Returns all segments.\n *\n * @returns {Array<Segment>}\n */\n\nWaveformSegments.prototype.getSegments = function () {\n  return this._segments;\n};\n\n/**\n * Returns the segment with the given id, or <code>undefined</code> if not found.\n *\n * @param {String} id\n * @returns {Segment}\n */\n\nWaveformSegments.prototype.getSegment = function (id) {\n  return this._segmentsById[id];\n};\n\n/**\n * Returns all segments that overlap a given point in time.\n *\n * @param {Number} time\n * @returns {Array<Segment>}\n */\n\nWaveformSegments.prototype.getSegmentsAtTime = function (time) {\n  return this._segments.filter(function (segment) {\n    return time >= segment.startTime && time < segment.endTime;\n  });\n};\n\n/**\n * Returns all segments that overlap a given time region.\n *\n * @param {Number} startTime The start of the time region, in seconds.\n * @param {Number} endTime The end of the time region, in seconds.\n *\n * @returns {Array<Segment>}\n */\n\nWaveformSegments.prototype.find = function (startTime, endTime) {\n  return this._segments.filter(function (segment) {\n    return segment.isVisible(startTime, endTime);\n  });\n};\n\n/**\n * Returns a copy of the segments array, sorted by ascending segment start time.\n *\n * @returns {Array<Segment>}\n */\n\nWaveformSegments.prototype._getSortedSegments = function () {\n  return this._segments.slice().sort(function (a, b) {\n    return a.startTime - b.startTime;\n  });\n};\nWaveformSegments.prototype.findPreviousSegment = function (segment) {\n  var sortedSegments = this._getSortedSegments();\n  var index = sortedSegments.findIndex(function (s) {\n    return s.id === segment.id;\n  });\n  if (index !== -1) {\n    return sortedSegments[index - 1];\n  }\n  return undefined;\n};\nWaveformSegments.prototype.findNextSegment = function (segment) {\n  var sortedSegments = this._getSortedSegments();\n  var index = sortedSegments.findIndex(function (s) {\n    return s.id === segment.id;\n  });\n  if (index !== -1) {\n    return sortedSegments[index + 1];\n  }\n  return undefined;\n};\n\n/**\n * Adds one or more segments to the timeline.\n *\n * @param {SegmentOptions|Array<SegmentOptions>} segmentOrSegments\n *\n * @returns Segment|Array<Segment>\n */\n\nWaveformSegments.prototype.add = function /* segmentOrSegments */\n() {\n  var self = this;\n  var arrayArgs = Array.isArray(arguments[0]);\n  var segments = arrayArgs ? arguments[0] : Array.prototype.slice.call(arguments);\n  segments = segments.map(function (segmentOptions) {\n    var segment = self._createSegment(segmentOptions);\n    if (objectHasProperty(self._segmentsById, segment.id)) {\n      throw new Error('peaks.segments.add(): duplicate id');\n    }\n    return segment;\n  });\n  segments.forEach(function (segment) {\n    self._addSegment(segment);\n  });\n  this._peaks.emit('segments.add', {\n    segments: segments,\n    insert: this._isInserting\n  });\n  return arrayArgs ? segments : segments[0];\n};\nWaveformSegments.prototype.updateSegmentId = function (segment, newSegmentId) {\n  if (this._segmentsById[segment.id]) {\n    if (this._segmentsById[newSegmentId]) {\n      throw new Error('segment.update(): duplicate id');\n    } else {\n      delete this._segmentsById[segment.id];\n      this._segmentsById[newSegmentId] = segment;\n    }\n  }\n};\n\n/**\n * Returns the indexes of segments that match the given predicate.\n *\n * @private\n * @param {Function} predicate Predicate function to find matching segments.\n * @returns {Array<Number>} An array of indexes into the segments array of\n *   the matching elements.\n */\n\nWaveformSegments.prototype._findSegment = function (predicate) {\n  var indexes = [];\n  for (var i = 0, length = this._segments.length; i < length; i++) {\n    if (predicate(this._segments[i])) {\n      indexes.push(i);\n    }\n  }\n  return indexes;\n};\n\n/**\n * Removes the segments at the given array indexes.\n *\n * @private\n * @param {Array<Number>} indexes The array indexes to remove.\n * @returns {Array<Segment>} The removed {@link Segment} objects.\n */\n\nWaveformSegments.prototype._removeIndexes = function (indexes) {\n  var removed = [];\n  for (var i = 0; i < indexes.length; i++) {\n    var index = indexes[i] - removed.length;\n    var itemRemoved = this._segments.splice(index, 1)[0];\n    delete this._segmentsById[itemRemoved.id];\n    delete this._segmentsByPid[itemRemoved.pid];\n    removed.push(itemRemoved);\n  }\n  return removed;\n};\n\n/**\n * Removes all segments that match a given predicate function.\n *\n * After removing the segments, this function also emits a\n * <code>segments.remove</code> event with the removed {@link Segment}\n * objects.\n *\n * @private\n * @param {Function} predicate A predicate function that identifies which\n *   segments to remove.\n * @returns {Array<Segment>} The removed {@link Segment} objects.\n */\n\nWaveformSegments.prototype._removeSegments = function (predicate) {\n  var indexes = this._findSegment(predicate);\n  var removed = this._removeIndexes(indexes);\n  this._peaks.emit('segments.remove', {\n    segments: removed\n  });\n  return removed;\n};\n\n/**\n * Removes the given segment.\n *\n * @param {Segment} segment The segment to remove.\n * @returns {Array<Segment>} The removed segment.\n */\n\nWaveformSegments.prototype.remove = function (segment) {\n  return this._removeSegments(function (s) {\n    return s === segment;\n  });\n};\n\n/**\n * Removes any segments with the given id.\n *\n * @param {String} id\n * @returns {Array<Segment>} The removed {@link Segment} objects.\n */\n\nWaveformSegments.prototype.removeById = function (segmentId) {\n  return this._removeSegments(function (segment) {\n    return segment.id === segmentId;\n  });\n};\n\n/**\n * Removes any segments with the given start time, and optional end time.\n *\n * @param {Number} startTime Segments with this start time are removed.\n * @param {Number?} endTime If present, only segments with both the given\n *   start time and end time are removed.\n * @returns {Array<Segment>} The removed {@link Segment} objects.\n */\n\nWaveformSegments.prototype.removeByTime = function (startTime, endTime) {\n  endTime = typeof endTime === 'number' ? endTime : 0;\n  var filter;\n  if (endTime > 0) {\n    filter = function filter(segment) {\n      return segment.startTime === startTime && segment.endTime === endTime;\n    };\n  } else {\n    filter = function filter(segment) {\n      return segment.startTime === startTime;\n    };\n  }\n  return this._removeSegments(filter);\n};\n\n/**\n * Removes all segments.\n *\n * After removing the segments, this function emits a\n * <code>segments.remove_all</code> event.\n */\n\nWaveformSegments.prototype.removeAll = function () {\n  this._segments = [];\n  this._segmentsById = {};\n  this._segmentsByPid = {};\n  this._peaks.emit('segments.remove_all');\n};\nWaveformSegments.prototype.setInserting = function (value) {\n  this._isInserting = value;\n};\nWaveformSegments.prototype.isInserting = function () {\n  return this._isInserting;\n};\n\n/**\n * @file\n *\n * Defines the {@link KeyboardHandler} class.\n *\n * @module keyboard-handler\n */\n\nvar nodes = ['OBJECT', 'TEXTAREA', 'INPUT', 'SELECT', 'OPTION'];\nvar SPACE = 32,\n  TAB = 9,\n  LEFT_ARROW = 37,\n  RIGHT_ARROW = 39;\nvar keys = [SPACE, TAB, LEFT_ARROW, RIGHT_ARROW];\n\n/**\n * Configures keyboard event handling.\n *\n * @class\n * @alias KeyboardHandler\n *\n * @param {EventEmitter} eventEmitter\n */\n\nfunction KeyboardHandler(eventEmitter) {\n  this.eventEmitter = eventEmitter;\n  this._handleKeyEvent = this._handleKeyEvent.bind(this);\n  document.addEventListener('keydown', this._handleKeyEvent);\n  document.addEventListener('keypress', this._handleKeyEvent);\n  document.addEventListener('keyup', this._handleKeyEvent);\n}\n\n/**\n * Keyboard event handler function.\n *\n * @note Arrow keys only triggered on keydown, not keypress.\n *\n * @param {KeyboardEvent} event\n * @private\n */\n\nKeyboardHandler.prototype._handleKeyEvent = function handleKeyEvent(event) {\n  if (nodes.indexOf(event.target.nodeName) === -1) {\n    if (keys.indexOf(event.type) > -1) {\n      event.preventDefault();\n    }\n    if (event.type === 'keydown' || event.type === 'keypress') {\n      switch (event.keyCode) {\n        case SPACE:\n          this.eventEmitter.emit('keyboard.space');\n          break;\n        case TAB:\n          this.eventEmitter.emit('keyboard.tab');\n          break;\n      }\n    } else if (event.type === 'keyup') {\n      switch (event.keyCode) {\n        case LEFT_ARROW:\n          if (event.shiftKey) {\n            this.eventEmitter.emit('keyboard.shift_left');\n          } else {\n            this.eventEmitter.emit('keyboard.left');\n          }\n          break;\n        case RIGHT_ARROW:\n          if (event.shiftKey) {\n            this.eventEmitter.emit('keyboard.shift_right');\n          } else {\n            this.eventEmitter.emit('keyboard.right');\n          }\n          break;\n      }\n    }\n  }\n};\nKeyboardHandler.prototype.destroy = function () {\n  document.removeEventListener('keydown', this._handleKeyEvent);\n  document.removeEventListener('keypress', this._handleKeyEvent);\n  document.removeEventListener('keyup', this._handleKeyEvent);\n};\n\n/**\n * @file\n *\n * Implementation of {@link Player} adapter based on an <code>&lt;audio&gt;</code>\n * or <code>&lt;video&gt;</code> HTML element.\n *\n * @module mediaelement-player\n */\n\n/**\n * Checks whether the given HTMLMediaElement has either a src attribute\n * or any child <code>&lt;source&gt;</code> nodes.\n */\n\nfunction mediaElementHasSource(mediaElement) {\n  if (mediaElement.src) {\n    return true;\n  }\n  if (mediaElement.querySelector('source')) {\n    return true;\n  }\n  return false;\n}\n\n/**\n * A wrapper for interfacing with the HTMLMediaElement API.\n * Initializes the player for a given media element.\n *\n * @class\n * @alias MediaElementPlayer\n * @param {HTMLMediaElement} mediaElement The HTML <code>&lt;audio&gt;</code>\n *   or <code>&lt;video&gt;</code> element to associate with the\n *   {@link Peaks} instance.\n */\n\nfunction MediaElementPlayer(mediaElement) {\n  this._mediaElement = mediaElement;\n}\n\n/**\n * Adds an event listener to the media element.\n *\n * @private\n * @param {String} type The event type to listen for.\n * @param {Function} callback An event handler function.\n */\n\nMediaElementPlayer.prototype._addMediaListener = function (type, callback) {\n  this._listeners.push({\n    type: type,\n    callback: callback\n  });\n  this._mediaElement.addEventListener(type, callback);\n};\nMediaElementPlayer.prototype.init = function (eventEmitter) {\n  var self = this;\n  self._eventEmitter = eventEmitter;\n  self._listeners = [];\n  self._duration = self.getDuration();\n  self._addMediaListener('timeupdate', function () {\n    self._eventEmitter.emit('player.timeupdate', self.getCurrentTime());\n  });\n  self._addMediaListener('playing', function () {\n    self._eventEmitter.emit('player.playing', self.getCurrentTime());\n  });\n  self._addMediaListener('pause', function () {\n    self._eventEmitter.emit('player.pause', self.getCurrentTime());\n  });\n  self._addMediaListener('ended', function () {\n    self._eventEmitter.emit('player.ended');\n  });\n  self._addMediaListener('seeked', function () {\n    self._eventEmitter.emit('player.seeked', self.getCurrentTime());\n  });\n  self._addMediaListener('canplay', function () {\n    self._eventEmitter.emit('player.canplay');\n  });\n  self._addMediaListener('error', function (event) {\n    self._eventEmitter.emit('player.error', event.target.error);\n  });\n  self._interval = null;\n  if (!mediaElementHasSource(self._mediaElement)) {\n    return Promise.resolve();\n  } else if (self._mediaElement.error && self._mediaElement.error.code === MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED) {\n    // The media element has a source, but the format is not supported.\n    return Promise.reject(self._mediaElement.error);\n  }\n  return new Promise(function (resolve, reject) {\n    function eventHandler(event) {\n      self._mediaElement.removeEventListener('loadedmetadata', eventHandler);\n      self._mediaElement.removeEventListener('error', eventHandler);\n      if (event.type === 'loadedmetadata') {\n        resolve();\n      } else {\n        reject(event.target.error);\n      }\n    }\n\n    // If the media element has preload=\"none\", clicking to seek in the\n    // waveform won't work, so here we force the media to load.\n    if (self._mediaElement.readyState === HTMLMediaElement.HAVE_NOTHING) {\n      // Wait for the readyState to change to HAVE_METADATA so we know the\n      // duration is valid, otherwise it could be NaN.\n      self._mediaElement.addEventListener('loadedmetadata', eventHandler);\n      self._mediaElement.addEventListener('error', eventHandler);\n      self._mediaElement.load();\n    } else {\n      resolve();\n    }\n  });\n};\n\n/**\n * Cleans up the player object, removing all event listeners from the\n * associated media element.\n */\n\nMediaElementPlayer.prototype.destroy = function () {\n  for (var i = 0; i < this._listeners.length; i++) {\n    var listener = this._listeners[i];\n    this._mediaElement.removeEventListener(listener.type, listener.callback);\n  }\n  this._listeners.length = 0;\n  this._mediaElement = null;\n};\nMediaElementPlayer.prototype.play = function () {\n  return this._mediaElement.play();\n};\nMediaElementPlayer.prototype.pause = function () {\n  this._mediaElement.pause();\n};\nMediaElementPlayer.prototype.isPlaying = function () {\n  return !this._mediaElement.paused;\n};\nMediaElementPlayer.prototype.isSeeking = function () {\n  return this._mediaElement.seeking;\n};\nMediaElementPlayer.prototype.getCurrentTime = function () {\n  return this._mediaElement.currentTime;\n};\nMediaElementPlayer.prototype.getDuration = function () {\n  return this._mediaElement.duration;\n};\nMediaElementPlayer.prototype.seek = function (time) {\n  this._mediaElement.currentTime = time;\n};\nfunction SetSourceHandler(eventEmitter, mediaElement) {\n  this._eventEmitter = eventEmitter;\n  this._mediaElement = mediaElement;\n  this._playerCanPlayHandler = this._playerCanPlayHandler.bind(this);\n  this._playerErrorHandler = this._playerErrorHandler.bind(this);\n}\nSetSourceHandler.prototype.setSource = function (options, callback) {\n  var self = this;\n  self._options = options;\n  self._callback = callback;\n  self._eventEmitter.on('player.canplay', self._playerCanPlayHandler);\n  self._eventEmitter.on('player.error', self._playerErrorHandler);\n  return new Promise(function (resolve, reject) {\n    self._resolve = resolve;\n    self._reject = reject;\n    self._eventEmitter.on('player.canplay', self._playerCanPlayHandler);\n    self._eventEmitter.on('player.error', self._playerErrorHandler);\n    self._mediaElement.setAttribute('src', options.mediaUrl);\n\n    // Force the media element to load, in case the media element\n    // has preload=\"none\".\n    if (self._mediaElement.readyState === HTMLMediaElement.HAVE_NOTHING) {\n      self._mediaElement.load();\n    }\n  });\n};\nSetSourceHandler.prototype._reset = function () {\n  this._eventEmitter.removeListener('player.canplay', this._playerCanPlayHandler);\n  this._eventEmitter.removeListener('player.error', this._playerErrorHandler);\n};\nSetSourceHandler.prototype._playerCanPlayHandler = function () {\n  this._reset();\n  this._resolve();\n};\nSetSourceHandler.prototype._playerErrorHandler = function (err) {\n  this._reset();\n\n  // Return the MediaError object from the media element\n  this._reject(err);\n};\nMediaElementPlayer.prototype.setSource = function (options) {\n  if (!options.mediaUrl) {\n    // eslint-disable-next-line @stylistic/js/max-len\n    return Promise.reject(new Error('peaks.setSource(): options must contain a mediaUrl when using mediaElement'));\n  }\n  var setSourceHandler = new SetSourceHandler(this._eventEmitter, this._mediaElement);\n  return setSourceHandler.setSource(options);\n};\n\n/**\n * @file\n *\n * A general audio player class which interfaces with external audio players.\n * The default audio player in Peaks.js is {@link MediaElementPlayer}.\n *\n * @module player\n */\n\nfunction getAllPropertiesFrom(adapter) {\n  var allProperties = [];\n  var obj = adapter;\n  while (obj) {\n    Object.getOwnPropertyNames(obj).forEach(function (p) {\n      allProperties.push(p);\n    });\n    obj = Object.getPrototypeOf(obj);\n  }\n  return allProperties;\n}\nfunction validateAdapter(adapter) {\n  var publicAdapterMethods = ['init', 'destroy', 'play', 'pause', 'isPlaying', 'isSeeking', 'getCurrentTime', 'getDuration', 'seek'];\n  var allProperties = getAllPropertiesFrom(adapter);\n  publicAdapterMethods.forEach(function (method) {\n    if (!allProperties.includes(method)) {\n      throw new TypeError('Peaks.init(): Player method ' + method + ' is undefined');\n    }\n    if (typeof adapter[method] !== 'function') {\n      throw new TypeError('Peaks.init(): Player method ' + method + ' is not a function');\n    }\n  });\n}\n\n/**\n * A wrapper for interfacing with an external player API.\n *\n * @class\n * @alias Player\n *\n * @param {Peaks} peaks The parent {@link Peaks} object.\n * @param {Adapter} adapter The player adapter.\n */\n\nfunction Player(peaks, adapter) {\n  this._peaks = peaks;\n  this._playingSegment = false;\n  this._segment = null;\n  this._loop = false;\n  this._playSegmentTimerCallback = this._playSegmentTimerCallback.bind(this);\n  validateAdapter(adapter);\n  this._adapter = adapter;\n}\nPlayer.prototype.init = function () {\n  return this._adapter.init(this._peaks);\n};\n\n/**\n * Cleans up the player object.\n */\n\nPlayer.prototype.destroy = function () {\n  this._adapter.destroy();\n};\n\n/**\n * Starts playback.\n * @returns {Promise}\n */\n\nPlayer.prototype.play = function () {\n  return this._adapter.play();\n};\n\n/**\n * Pauses playback.\n */\n\nPlayer.prototype.pause = function () {\n  this._adapter.pause();\n};\n\n/**\n * @returns {Boolean} <code>true</code> if playing, <code>false</code>\n * otherwise.\n */\n\nPlayer.prototype.isPlaying = function () {\n  return this._adapter.isPlaying();\n};\n\n/**\n * @returns {boolean} <code>true</code> if seeking\n */\n\nPlayer.prototype.isSeeking = function () {\n  return this._adapter.isSeeking();\n};\n\n/**\n * Returns the current playback time position, in seconds.\n *\n * @returns {Number}\n */\n\nPlayer.prototype.getCurrentTime = function () {\n  return this._adapter.getCurrentTime();\n};\n\n/**\n * Returns the media duration, in seconds.\n *\n * @returns {Number}\n */\n\nPlayer.prototype.getDuration = function () {\n  return this._adapter.getDuration();\n};\n\n/**\n * Seeks to a given time position within the media.\n *\n * @param {Number} time The time position, in seconds.\n */\n\nPlayer.prototype.seek = function (time) {\n  if (!isValidTime(time)) {\n    this._peaks._logger('peaks.player.seek(): parameter must be a valid time, in seconds');\n    return;\n  }\n  this._adapter.seek(time);\n};\n\n/**\n * Plays the given segment.\n *\n * @param {Segment} segment The segment denoting the time region to play.\n * @param {Boolean} loop If true, playback is looped.\n */\n\nPlayer.prototype.playSegment = function (segment, loop) {\n  var self = this;\n  if (!segment || !isValidTime(segment.startTime) || !isValidTime(segment.endTime)) {\n    return Promise.reject(new Error('peaks.player.playSegment(): parameter must be a segment object'));\n  }\n  self._segment = segment;\n  self._loop = loop;\n\n  // Set audio time to segment start time\n  self.seek(segment.startTime);\n  self._peaks.once('player.playing', function () {\n    if (!self._playingSegment) {\n      self._playingSegment = true;\n\n      // We need to use requestAnimationFrame here as the timeupdate event\n      // doesn't fire often enough.\n      window.requestAnimationFrame(self._playSegmentTimerCallback);\n    }\n  });\n\n  // Start playing audio\n  return self.play();\n};\nPlayer.prototype._playSegmentTimerCallback = function () {\n  if (!this.isPlaying()) {\n    this._playingSegment = false;\n    return;\n  } else if (this.getCurrentTime() >= this._segment.endTime) {\n    if (this._loop) {\n      this.seek(this._segment.startTime);\n    } else {\n      this.pause();\n      this._peaks.emit('player.ended');\n      this._playingSegment = false;\n      return;\n    }\n  }\n  window.requestAnimationFrame(this._playSegmentTimerCallback);\n};\nPlayer.prototype._setSource = function (options) {\n  return this._adapter.setSource(options);\n};\n\n/**\n * @file\n *\n * Defines the {@link DefaultPointMarker} class.\n *\n * @module default-point-marker\n */\n\n\n/**\n * Creates a point marker handle.\n *\n * @class\n * @alias DefaultPointMarker\n *\n * @param {CreatePointMarkerOptions} options\n */\n\nfunction DefaultPointMarker(options) {\n  this._options = options;\n  this._draggable = options.editable;\n}\nDefaultPointMarker.prototype.init = function (group) {\n  var handleWidth = 10;\n  var handleHeight = 20;\n  var handleX = -5 + 0.5; // Place in the middle of the marker\n\n  // Label\n\n  if (this._options.view === 'zoomview') {\n    // Label - create with default y, the real value is set in fitToView().\n    this._label = new Text({\n      x: 2,\n      y: 0,\n      text: this._options.point.labelText,\n      textAlign: 'left',\n      fontFamily: this._options.fontFamily || 'sans-serif',\n      fontSize: this._options.fontSize || 10,\n      fontStyle: this._options.fontStyle || 'normal',\n      fill: '#000'\n    });\n  }\n\n  // Handle - create with default y, the real value is set in fitToView().\n\n  this._handle = new Rect({\n    x: handleX,\n    y: 0,\n    width: handleWidth,\n    height: handleHeight,\n    fill: this._options.color,\n    visible: this._draggable\n  });\n\n  // Line - create with default y and points, the real values\n  // are set in fitToView().\n  this._line = new Line({\n    x: 0,\n    y: 0,\n    stroke: this._options.color,\n    strokeWidth: 1\n  });\n\n  // Time label - create with default y, the real value is set\n  // in fitToView().\n  this._time = new Text({\n    x: -24,\n    y: 0,\n    text: this._options.layer.formatTime(this._options.point.time),\n    fontFamily: this._options.fontFamily,\n    fontSize: this._options.fontSize,\n    fontStyle: this._options.fontStyle,\n    fill: '#000',\n    textAlign: 'center'\n  });\n  this._time.hide();\n  group.add(this._handle);\n  group.add(this._line);\n  if (this._label) {\n    group.add(this._label);\n  }\n  group.add(this._time);\n  this.fitToView();\n  this.bindEventHandlers(group);\n};\nDefaultPointMarker.prototype.bindEventHandlers = function (group) {\n  var self = this;\n  self._handle.on('mouseover touchstart', function () {\n    if (self._draggable) {\n      // Position text to the left of the marker\n      self._time.setX(-24 - self._time.getWidth());\n      self._time.show();\n    }\n  });\n  self._handle.on('mouseout touchend', function () {\n    if (self._draggable) {\n      self._time.hide();\n    }\n  });\n  group.on('dragstart', function () {\n    self._time.setX(-24 - self._time.getWidth());\n    self._time.show();\n  });\n  group.on('dragend', function () {\n    self._time.hide();\n  });\n};\nDefaultPointMarker.prototype.fitToView = function () {\n  var height = this._options.layer.getHeight();\n  this._line.points([0.5, 0, 0.5, height]);\n  if (this._label) {\n    this._label.y(12);\n  }\n  if (this._handle) {\n    this._handle.y(height / 2 - 10.5);\n  }\n  if (this._time) {\n    this._time.y(height / 2 - 5);\n  }\n};\nDefaultPointMarker.prototype.update = function (options) {\n  if (options.time !== undefined) {\n    if (this._time) {\n      this._time.setText(this._options.layer.formatTime(options.time));\n    }\n  }\n  if (options.labelText !== undefined) {\n    if (this._label) {\n      this._label.text(options.labelText);\n    }\n  }\n  if (options.color !== undefined) {\n    if (this._handle) {\n      this._handle.fill(options.color);\n    }\n    this._line.stroke(options.color);\n  }\n  if (options.editable !== undefined) {\n    this._draggable = options.editable;\n    this._handle.visible(this._draggable);\n  }\n};\n\n/**\n * @file\n *\n * Defines the {@link DefaultSegmentMarker} class.\n *\n * @module default-segment-marker\n */\n\n\n/**\n * Creates a segment marker handle.\n *\n * @class\n * @alias DefaultSegmentMarker\n *\n * @param {CreateSegmentMarkerOptions} options\n */\n\nfunction DefaultSegmentMarker(options) {\n  this._options = options;\n  this._editable = options.editable;\n}\nDefaultSegmentMarker.prototype.init = function (group) {\n  var handleWidth = 10;\n  var handleHeight = 20;\n  var handleX = -5 + 0.5; // Place in the middle of the marker\n\n  var xPosition = this._options.startMarker ? -24 : 24;\n  var time = this._options.startMarker ? this._options.segment.startTime : this._options.segment.endTime;\n\n  // Label - create with default y, the real value is set in fitToView().\n  this._label = new Text({\n    x: xPosition,\n    y: 0,\n    text: this._options.layer.formatTime(time),\n    fontFamily: this._options.fontFamily,\n    fontSize: this._options.fontSize,\n    fontStyle: this._options.fontStyle,\n    fill: '#000',\n    textAlign: 'center',\n    visible: this._editable\n  });\n  this._label.hide();\n\n  // Handle - create with default y, the real value is set in fitToView().\n  this._handle = new Rect({\n    x: handleX,\n    y: 0,\n    width: handleWidth,\n    height: handleHeight,\n    fill: this._options.color,\n    stroke: this._options.color,\n    strokeWidth: 1,\n    visible: this._editable\n  });\n\n  // Vertical Line - create with default y and points, the real values\n  // are set in fitToView().\n  this._line = new Line({\n    x: 0,\n    y: 0,\n    stroke: this._options.color,\n    strokeWidth: 1,\n    visible: this._editable\n  });\n  group.add(this._label);\n  group.add(this._line);\n  group.add(this._handle);\n  this.fitToView();\n  this.bindEventHandlers(group);\n};\nDefaultSegmentMarker.prototype.bindEventHandlers = function (group) {\n  var self = this;\n  var xPosition = self._options.startMarker ? -24 : 24;\n  group.on('dragstart', function () {\n    if (self._options.startMarker) {\n      self._label.setX(xPosition - self._label.getWidth());\n    }\n    self._label.show();\n  });\n  group.on('dragend', function () {\n    self._label.hide();\n  });\n  self._handle.on('mouseover touchstart', function () {\n    if (self._options.startMarker) {\n      self._label.setX(xPosition - self._label.getWidth());\n    }\n    self._label.show();\n  });\n  self._handle.on('mouseout touchend', function () {\n    self._label.hide();\n  });\n};\nDefaultSegmentMarker.prototype.fitToView = function () {\n  var height = this._options.layer.getHeight();\n  this._label.y(height / 2 - 5);\n  this._handle.y(height / 2 - 10.5);\n  this._line.points([0.5, 0, 0.5, height]);\n};\nDefaultSegmentMarker.prototype.update = function (options) {\n  if (options.startTime !== undefined && this._options.startMarker) {\n    this._label.text(this._options.layer.formatTime(options.startTime));\n  }\n  if (options.endTime !== undefined && !this._options.startMarker) {\n    this._label.text(this._options.layer.formatTime(options.endTime));\n  }\n  if (options.editable !== undefined) {\n    this._editable = options.editable;\n    this._label.visible(this._editable);\n    this._handle.visible(this._editable);\n    this._line.visible(this._editable);\n  }\n};\n\n/**\n * @file\n *\n * Factory functions for creating point and segment marker handles.\n *\n * @module marker-factories\n */\n\n\n/**\n * Parameters for the {@link createSegmentMarker} function.\n *\n * @typedef {Object} CreateSegmentMarkerOptions\n * @global\n * @property {Segment} segment\n * @property {Boolean} draggable If true, marker is draggable.\n * @property {Boolean} startMarker\n * @property {String} color\n * @property {String} fontFamily\n * @property {Number} fontSize\n * @property {String} fontStyle\n * @property {Layer} layer\n * @property {String} view\n * @property {SegmentDisplayOptions} segmentOptions\n */\n\n/**\n * Creates a left or right side segment marker handle.\n *\n * @param {CreateSegmentMarkerOptions} options\n * @returns {Marker}\n */\n\nfunction createSegmentMarker(options) {\n  if (options.view === 'zoomview' || options.view === 'spectrogramZoomview') {\n    return new DefaultSegmentMarker(options);\n  }\n  return null;\n}\n\n/**\n * Parameters for the {@link createSegmentLabel} function.\n *\n * @typedef {Object} SegmentLabelOptions\n * @global\n * @property {Segment} segment The {@link Segment} object associated with this\n *   label.\n * @property {String} view The name of the view that the label is being\n *   created in, either <code>zoomview</code> or <code>overview</code>.\n * @property {SegmentsLayer} layer\n * @property {String} fontFamily\n * @property {Number} fontSize\n * @property {String} fontStyle\n */\n\n/**\n * Creates a Konva object that renders information about a segment, such as\n * its label text.\n *\n * @param {SegmentLabelOptions} options\n * @returns {Konva.Text}\n */\n\nfunction createSegmentLabel(options) {\n  return new Text({\n    x: 12,\n    y: 12,\n    text: options.segment.labelText,\n    textAlign: 'center',\n    fontFamily: options.fontFamily || 'sans-serif',\n    fontSize: options.fontSize || 12,\n    fontStyle: options.fontStyle || 'normal',\n    fill: '#000'\n  });\n}\n\n/**\n * Parameters for the {@link createPointMarker} function.\n *\n * @typedef {Object} CreatePointMarkerOptions\n * @global\n * @property {Point} point\n * @property {Boolean} editable If true, marker is draggable.\n * @property {String} color\n * @property {Layer} layer\n * @property {String} view\n * @property {String} fontFamily\n * @property {Number} fontSize\n * @property {String} fontStyle\n */\n\n/**\n * Creates a point marker handle.\n *\n * @param {CreatePointMarkerOptions} options\n * @returns {Marker}\n */\n\nfunction createPointMarker(options) {\n  return new DefaultPointMarker(options);\n}\n\n/**\n * @file\n *\n * Defines the {@link HighlightLayer} class.\n *\n * @module highlight-layer\n */\n\n\n/**\n * Highlight layer options\n *\n * @typedef {Object} HighlightLayerOptions\n * @global\n * @property {Number} highlightOffset\n * @property {String} highlightColor\n * @property {String} highlightStrokeColor\n * @property {Number} highlightOpacity\n * @property {Number} highlightCornerRadius\n */\n\n/**\n * Creates the highlight region that shows the position of the zoomable\n * waveform view in the overview waveform.\n *\n * @class\n * @alias HighlightLayer\n *\n * @param {WaveformOverview} view\n * @param {HighlightLayerOptions} options\n */\n\nfunction HighlightLayer(view, options) {\n  this._view = view;\n  this._offset = options.highlightOffset;\n  this._color = options.highlightColor;\n  this._layer = new Konva.Layer({\n    listening: false\n  });\n  this._highlightRect = null;\n  this._startTime = null;\n  this._endTime = null;\n  this._strokeColor = options.highlightStrokeColor;\n  this._opacity = options.highlightOpacity;\n  this._cornerRadius = options.highlightCornerRadius;\n}\nHighlightLayer.prototype.addToStage = function (stage) {\n  stage.add(this._layer);\n};\nHighlightLayer.prototype.showHighlight = function (startTime, endTime) {\n  if (!this._highlightRect) {\n    this._createHighlightRect(startTime, endTime);\n  }\n  this._update(startTime, endTime);\n};\n\n/**\n * Updates the position of the highlight region.\n *\n * @param {Number} startTime The start of the highlight region, in seconds.\n * @param {Number} endTime The end of the highlight region, in seconds.\n */\n\nHighlightLayer.prototype._update = function (startTime, endTime) {\n  this._startTime = startTime;\n  this._endTime = endTime;\n  var startOffset = this._view.timeToPixels(startTime);\n  var endOffset = this._view.timeToPixels(endTime);\n  this._highlightRect.setAttrs({\n    x: startOffset,\n    width: endOffset - startOffset\n  });\n};\nHighlightLayer.prototype._createHighlightRect = function (startTime, endTime) {\n  this._startTime = startTime;\n  this._endTime = endTime;\n  var startOffset = this._view.timeToPixels(startTime);\n  var endOffset = this._view.timeToPixels(endTime);\n\n  // Create with default y and height, the real values are set in fitToView().\n  this._highlightRect = new Rect({\n    x: startOffset,\n    y: 0,\n    width: endOffset - startOffset,\n    height: 0,\n    stroke: this._strokeColor,\n    strokeWidth: 1,\n    fill: this._color,\n    opacity: this._opacity,\n    cornerRadius: this._cornerRadius\n  });\n  this.fitToView();\n  this._layer.add(this._highlightRect);\n};\nHighlightLayer.prototype.removeHighlight = function () {\n  if (this._highlightRect) {\n    this._highlightRect.destroy();\n    this._highlightRect = null;\n  }\n};\nHighlightLayer.prototype.updateHighlight = function () {\n  if (this._highlightRect) {\n    this._update(this._startTime, this._endTime);\n  }\n};\nHighlightLayer.prototype.fitToView = function () {\n  if (this._highlightRect) {\n    var height = this._view.getHeight();\n    var offset = clamp(this._offset, 0, Math.floor(height / 2));\n    this._highlightRect.setAttrs({\n      y: offset,\n      height: height - offset * 2\n    });\n  }\n};\n\n/**\n * @file\n *\n * Defines the {@link PointMarker} class.\n *\n * @module point-marker\n */\n\n\n/**\n * Parameters for the {@link PointMarker} constructor.\n *\n * @typedef {Object} PointMarkerOptions\n * @global\n * @property {Point} point Point object with timestamp.\n * @property {Boolean} editable If true, marker is draggable.\n * @property {Marker} marker\n * @property {Function} onclick\n * @property {Function} onDblClick\n * @property {Function} onDragStart\n * @property {Function} onDragMove Callback during mouse drag operations.\n * @property {Function} onDragEnd\n * @property {Function} dragBoundFunc\n * @property {Function} onMouseEnter\n * @property {Function} onMouseLeave\n * @property {Function} onContextMenu\n */\n\n/**\n * Creates a point marker handle.\n *\n * @class\n * @alias PointMarker\n *\n * @param {PointMarkerOptions} options\n */\n\nfunction PointMarker(options) {\n  this._point = options.point;\n  this._marker = options.marker;\n  this._draggable = options.draggable;\n  this._onDragStart = options.onDragStart;\n  this._onDragMove = options.onDragMove;\n  this._onDragEnd = options.onDragEnd;\n  this._dragBoundFunc = options.dragBoundFunc;\n  this._onMouseEnter = options.onMouseEnter;\n  this._onMouseLeave = options.onMouseLeave;\n  this._group = new Konva.Group({\n    name: 'point-marker',\n    point: this._point,\n    draggable: this._draggable,\n    dragBoundFunc: options.dragBoundFunc\n  });\n  this._bindDefaultEventHandlers();\n  this._marker.init(this._group);\n}\nPointMarker.prototype._bindDefaultEventHandlers = function () {\n  var self = this;\n  self._group.on('dragstart', function (event) {\n    self._onDragStart(event, self._point);\n  });\n  self._group.on('dragmove', function (event) {\n    self._onDragMove(event, self._point);\n  });\n  self._group.on('dragend', function (event) {\n    self._onDragEnd(event, self._point);\n  });\n  self._group.on('mouseenter', function (event) {\n    self._onMouseEnter(event, self._point);\n  });\n  self._group.on('mouseleave', function (event) {\n    self._onMouseLeave(event, self._point);\n  });\n};\n\n/**\n * @param {Konva.Layer} layer\n */\n\nPointMarker.prototype.addToLayer = function (layer) {\n  layer.add(this._group);\n};\nPointMarker.prototype.fitToView = function () {\n  this._marker.fitToView();\n};\nPointMarker.prototype.getPoint = function () {\n  return this._point;\n};\nPointMarker.prototype.getX = function () {\n  return this._group.getX();\n};\nPointMarker.prototype.setX = function (x) {\n  this._group.setX(x);\n};\nPointMarker.prototype.getWidth = function () {\n  return this._group.getWidth();\n};\nPointMarker.prototype.getAbsolutePosition = function () {\n  return this._group.getAbsolutePosition();\n};\nPointMarker.prototype.update = function (options) {\n  if (options.editable !== undefined) {\n    this._group.draggable(options.editable);\n  }\n  if (this._marker.update) {\n    this._marker.update(options);\n  }\n};\nPointMarker.prototype.destroy = function () {\n  if (this._marker.destroy) {\n    this._marker.destroy();\n  }\n  this._group.destroyChildren();\n  this._group.destroy();\n};\n\n/**\n * @file\n *\n * Defines the {@link PointsLayer} class.\n *\n * @module points-layer\n */\n\n\n/**\n * Creates a Konva.Layer that displays point markers against the audio\n * waveform.\n *\n * @class\n * @alias PointsLayer\n *\n * @param {Peaks} peaks\n * @param {WaveformOverview|WaveformZoomView} view\n * @param {Boolean} enableEditing\n */\n\nfunction PointsLayer(peaks, view, enableEditing) {\n  this._peaks = peaks;\n  this._view = view;\n  this._enableEditing = enableEditing;\n  this._pointMarkers = {};\n  this._layer = new Konva.Layer();\n  this._onPointsDrag = this._onPointsDrag.bind(this);\n  this._onPointMarkerDragStart = this._onPointMarkerDragStart.bind(this);\n  this._onPointMarkerDragMove = this._onPointMarkerDragMove.bind(this);\n  this._onPointMarkerDragEnd = this._onPointMarkerDragEnd.bind(this);\n  this._pointMarkerDragBoundFunc = this._pointMarkerDragBoundFunc.bind(this);\n  this._onPointMarkerMouseEnter = this._onPointMarkerMouseEnter.bind(this);\n  this._onPointMarkerMouseLeave = this._onPointMarkerMouseLeave.bind(this);\n  this._onPointsUpdate = this._onPointsUpdate.bind(this);\n  this._onPointsAdd = this._onPointsAdd.bind(this);\n  this._onPointsRemove = this._onPointsRemove.bind(this);\n  this._onPointsRemoveAll = this._onPointsRemoveAll.bind(this);\n  this._peaks.on('points.update', this._onPointsUpdate);\n  this._peaks.on('points.add', this._onPointsAdd);\n  this._peaks.on('points.remove', this._onPointsRemove);\n  this._peaks.on('points.remove_all', this._onPointsRemoveAll);\n  this._peaks.on('points.dragstart', this._onPointsDrag);\n  this._peaks.on('points.dragmove', this._onPointsDrag);\n  this._peaks.on('points.dragend', this._onPointsDrag);\n}\n\n/**\n * Adds the layer to the given {Konva.Stage}.\n *\n * @param {Konva.Stage} stage\n */\n\nPointsLayer.prototype.addToStage = function (stage) {\n  stage.add(this._layer);\n};\nPointsLayer.prototype.setListening = function (listening) {\n  this._layer.listening(listening);\n};\nPointsLayer.prototype.enableEditing = function (enable) {\n  this._enableEditing = enable;\n};\nPointsLayer.prototype.getPointMarker = function (point) {\n  return this._pointMarkers[point.pid];\n};\nPointsLayer.prototype.formatTime = function (time) {\n  return this._view.formatTime(time);\n};\nPointsLayer.prototype._onPointsUpdate = function (point, options) {\n  var frameStartTime = this._view.getStartTime();\n  var frameEndTime = this._view.getEndTime();\n  var pointMarker = this.getPointMarker(point);\n  var isVisible = point.isVisible(frameStartTime, frameEndTime);\n  if (pointMarker && !isVisible) {\n    // Remove point marker that is no longer visible.\n    this._removePoint(point);\n  } else if (!pointMarker && isVisible) {\n    // Add point marker for visible point.\n    this._updatePoint(point);\n  } else if (pointMarker && isVisible) {\n    // Update the point marker with the changed attributes.\n    if (objectHasProperty(options, 'time')) {\n      var pointMarkerOffset = this._view.timeToPixels(point.time);\n      var pointMarkerX = pointMarkerOffset - this._view.getFrameOffset();\n      pointMarker.setX(pointMarkerX);\n    }\n    pointMarker.update(options);\n  }\n};\nPointsLayer.prototype._onPointsAdd = function (event) {\n  var self = this;\n  var frameStartTime = self._view.getStartTime();\n  var frameEndTime = self._view.getEndTime();\n  event.points.forEach(function (point) {\n    if (point.isVisible(frameStartTime, frameEndTime)) {\n      self._updatePoint(point);\n    }\n  });\n};\nPointsLayer.prototype._onPointsRemove = function (event) {\n  var self = this;\n  event.points.forEach(function (point) {\n    self._removePoint(point);\n  });\n};\nPointsLayer.prototype._onPointsRemoveAll = function () {\n  this._layer.removeChildren();\n  this._pointMarkers = {};\n};\n\n/**\n * Creates the Konva UI objects for a given point.\n *\n * @private\n * @param {Point} point\n * @returns {PointMarker}\n */\n\nPointsLayer.prototype._createPointMarker = function (point) {\n  var editable = this._enableEditing && point.editable;\n  var viewOptions = this._view.getViewOptions();\n  var marker = this._peaks.options.createPointMarker({\n    point: point,\n    editable: editable,\n    color: point.color,\n    fontFamily: viewOptions.fontFamily,\n    fontSize: viewOptions.fontSize,\n    fontStyle: viewOptions.fontStyle,\n    layer: this,\n    view: this._view.getName()\n  });\n  return new PointMarker({\n    point: point,\n    draggable: editable,\n    marker: marker,\n    onDragStart: this._onPointMarkerDragStart,\n    onDragMove: this._onPointMarkerDragMove,\n    onDragEnd: this._onPointMarkerDragEnd,\n    dragBoundFunc: this._pointMarkerDragBoundFunc,\n    onMouseEnter: this._onPointMarkerMouseEnter,\n    onMouseLeave: this._onPointMarkerMouseLeave\n  });\n};\nPointsLayer.prototype.getHeight = function () {\n  return this._view.getHeight();\n};\n\n/**\n * Adds a Konva UI object to the layer for a given point.\n *\n * @private\n * @param {Point} point\n * @returns {PointMarker}\n */\n\nPointsLayer.prototype._addPointMarker = function (point) {\n  var pointMarker = this._createPointMarker(point);\n  this._pointMarkers[point.pid] = pointMarker;\n  pointMarker.addToLayer(this._layer);\n  return pointMarker;\n};\nPointsLayer.prototype._onPointsDrag = function (event) {\n  var pointMarker = this._updatePoint(event.point);\n  pointMarker.update({\n    time: event.point.time\n  });\n};\n\n/**\n * @param {KonvaEventObject} event\n * @param {Point} point\n */\n\nPointsLayer.prototype._onPointMarkerMouseEnter = function (event, point) {\n  this._peaks.emit('points.mouseenter', {\n    point: point,\n    evt: event.evt\n  });\n};\n\n/**\n * @param {KonvaEventObject} event\n * @param {Point} point\n */\n\nPointsLayer.prototype._onPointMarkerMouseLeave = function (event, point) {\n  this._peaks.emit('points.mouseleave', {\n    point: point,\n    evt: event.evt\n  });\n};\n\n/**\n * @param {KonvaEventObject} event\n * @param {Point} point\n */\n\nPointsLayer.prototype._onPointMarkerDragStart = function (event, point) {\n  this._dragPointMarker = this.getPointMarker(point);\n  this._peaks.emit('points.dragstart', {\n    point: point,\n    evt: event.evt\n  });\n};\n\n/**\n * @param {KonvaEventObject} event\n * @param {Point} point\n */\n\nPointsLayer.prototype._onPointMarkerDragMove = function (event, point) {\n  var pointMarker = this._pointMarkers[point.pid];\n  var markerX = pointMarker.getX();\n  var offset = markerX + pointMarker.getWidth();\n  point._setTime(this._view.pixelOffsetToTime(offset));\n  this._peaks.emit('points.dragmove', {\n    point: point,\n    evt: event.evt\n  });\n};\n\n/**\n * @param {KonvaEventObject} event\n * @param {Point} point\n */\n\nPointsLayer.prototype._onPointMarkerDragEnd = function (event, point) {\n  this._dragPointMarker = null;\n  this._peaks.emit('points.dragend', {\n    point: point,\n    evt: event.evt\n  });\n};\nPointsLayer.prototype._pointMarkerDragBoundFunc = function (pos) {\n  // Allow the marker to be moved horizontally but not vertically.\n  return {\n    x: clamp(pos.x, 0, this._view.getWidth()),\n    y: this._dragPointMarker.getAbsolutePosition().y\n  };\n};\n\n/**\n * Updates the positions of all displayed points in the view.\n *\n * @param {Number} startTime The start of the visible range in the view,\n *   in seconds.\n * @param {Number} endTime The end of the visible range in the view,\n *   in seconds.\n */\n\nPointsLayer.prototype.updatePoints = function (startTime, endTime) {\n  // Update all points in the visible time range.\n  var points = this._peaks.points.find(startTime, endTime);\n  points.forEach(this._updatePoint.bind(this));\n\n  // TODO: In the overview all points are visible, so no need to do this.\n  this._removeInvisiblePoints(startTime, endTime);\n};\n\n/**\n * @private\n * @param {Point} point\n */\n\nPointsLayer.prototype._updatePoint = function (point) {\n  var pointMarker = this.getPointMarker(point);\n  if (!pointMarker) {\n    pointMarker = this._addPointMarker(point);\n  }\n  var pointMarkerOffset = this._view.timeToPixels(point.time);\n  var pointMarkerX = pointMarkerOffset - this._view.getFrameOffset();\n  pointMarker.setX(pointMarkerX);\n  return pointMarker;\n};\n\n/**\n * Remove any points that are not visible, i.e., are outside the given time\n * range.\n *\n * @private\n * @param {Number} startTime The start of the visible time range, in seconds.\n * @param {Number} endTime The end of the visible time range, in seconds.\n */\n\nPointsLayer.prototype._removeInvisiblePoints = function (startTime, endTime) {\n  for (var pointPid in this._pointMarkers) {\n    if (objectHasProperty(this._pointMarkers, pointPid)) {\n      var point = this._pointMarkers[pointPid].getPoint();\n      if (!point.isVisible(startTime, endTime)) {\n        this._removePoint(point);\n      }\n    }\n  }\n};\n\n/**\n * Removes the UI object for a given point.\n *\n * @private\n * @param {Point} point\n */\n\nPointsLayer.prototype._removePoint = function (point) {\n  var pointMarker = this.getPointMarker(point);\n  if (pointMarker) {\n    pointMarker.destroy();\n    delete this._pointMarkers[point.pid];\n  }\n};\n\n/**\n * Toggles visibility of the points layer.\n *\n * @param {Boolean} visible\n */\n\nPointsLayer.prototype.setVisible = function (visible) {\n  this._layer.setVisible(visible);\n};\nPointsLayer.prototype.destroy = function () {\n  this._peaks.off('points.update', this._onPointsUpdate);\n  this._peaks.off('points.add', this._onPointsAdd);\n  this._peaks.off('points.remove', this._onPointsRemove);\n  this._peaks.off('points.remove_all', this._onPointsRemoveAll);\n  this._peaks.off('points.dragstart', this._onPointsDrag);\n  this._peaks.off('points.dragmove', this._onPointsDrag);\n  this._peaks.off('points.dragend', this._onPointsDrag);\n};\nPointsLayer.prototype.fitToView = function () {\n  for (var pointPid in this._pointMarkers) {\n    if (objectHasProperty(this._pointMarkers, pointPid)) {\n      var pointMarker = this._pointMarkers[pointPid];\n      pointMarker.fitToView();\n    }\n  }\n};\nPointsLayer.prototype.draw = function () {\n  this._layer.draw();\n};\n\n/**\n * @file\n *\n * Defines the {@link PlayheadLayer} class.\n *\n * @module playhead-layer\n */\n\n\n/**\n * Creates a Konva.Layer that displays a playhead marker.\n *\n * @class\n * @alias PlayheadLayer\n *\n * @param {Player} player\n * @param {WaveformOverview|WaveformZoomView} view\n * @param {Object} options\n * @param {Boolean} options.showPlayheadTime If <code>true</code> The playback time position\n *   is shown next to the playhead.\n * @param {String} options.playheadColor\n * @param {String} options.playheadTextColor\n * @param {String} options.playheadBackgroundColor\n * @param {Number} options.playheadPadding\n * @param {Number} options.playheadWidth\n * @param {String} options.playheadFontFamily\n * @param {Number} options.playheadFontSize\n * @param {String} options.playheadFontStyle\n */\n\nfunction PlayheadLayer(player, view, options) {\n  this._player = player;\n  this._view = view;\n  this._playheadPixel = 0;\n  this._playheadLineAnimation = null;\n  this._playheadVisible = false;\n  this._playheadColor = options.playheadColor;\n  this._playheadTextColor = options.playheadTextColor;\n  this._playheadBackgroundColor = options.playheadBackgroundColor;\n  this._playheadPadding = options.playheadPadding;\n  this._playheadWidth = options.playheadWidth;\n  this._playheadFontFamily = options.playheadFontFamily;\n  this._playheadFontSize = options.playheadFontSize;\n  this._playheadFontStyle = options.playheadFontStyle;\n  this._playheadLayer = new Konva.Layer({\n    listening: false\n  });\n  this._createPlayhead();\n  if (options.showPlayheadTime) {\n    this._createPlayheadText();\n  }\n  this.fitToView();\n  this.zoomLevelChanged();\n}\n\n/**\n * Adds the layer to the given {Konva.Stage}.\n *\n * @param {Konva.Stage} stage\n */\n\nPlayheadLayer.prototype.addToStage = function (stage) {\n  stage.add(this._playheadLayer);\n};\n\n/**\n * Decides whether to use an animation to update the playhead position.\n *\n * If the zoom level is such that the number of pixels per second of audio is\n * low, we can use timeupdate events from the HTMLMediaElement to\n * set the playhead position. Otherwise, we use an animation to update the\n * playhead position more smoothly. The animation is CPU intensive, so we\n * avoid using it where possible.\n */\n\nPlayheadLayer.prototype.zoomLevelChanged = function () {\n  var pixelsPerSecond = this._view.timeToPixels(1.0);\n  this._useAnimation = pixelsPerSecond >= 5;\n  if (this._useAnimation) {\n    if (this._player.isPlaying() && !this._playheadLineAnimation) {\n      // Start the animation\n      this._start();\n    }\n  } else {\n    if (this._playheadLineAnimation) {\n      // Stop the animation\n      var time = this._player.getCurrentTime();\n      this.stop(time);\n    }\n  }\n};\n\n/**\n * Resizes the playhead UI objects to fit the available space in the\n * view.\n */\n\nPlayheadLayer.prototype.fitToView = function () {\n  var height = this._view.getHeight();\n  this._playheadLine.points([0.5, 0, 0.5, height]);\n  if (this._playheadText) {\n    this._playheadText.y(12);\n  }\n};\n\n/**\n * Creates the playhead UI objects.\n *\n * @private\n * @param {String} color\n */\n\nPlayheadLayer.prototype._createPlayhead = function () {\n  // Create with default points, the real values are set in fitToView().\n  this._playheadLine = new Line({\n    stroke: this._playheadColor,\n    strokeWidth: this._playheadWidth\n  });\n  this._playheadGroup = new Konva.Group({\n    x: 0,\n    y: 0\n  });\n  this._playheadGroup.add(this._playheadLine);\n  this._playheadLayer.add(this._playheadGroup);\n};\nPlayheadLayer.prototype._createPlayheadText = function () {\n  var self = this;\n  var time = self._player.getCurrentTime();\n  var text = self._view.formatTime(time);\n\n  // Create with default y, the real value is set in fitToView().\n  self._playheadText = new Text({\n    x: 0,\n    y: 0,\n    padding: self._playheadPadding,\n    text: text,\n    fontSize: self._playheadFontSize,\n    fontFamily: self._playheadFontFamily,\n    fontStyle: self._playheadFontStyle,\n    fill: self._playheadTextColor,\n    align: 'right',\n    sceneFunc: function sceneFunc(context, shape) {\n      var width = shape.width();\n      var height = shape.height() + 2 * self._playheadPadding;\n      context.fillStyle = self._playheadBackgroundColor;\n      context.fillRect(0, -self._playheadPadding, width, height);\n      shape._sceneFunc(context);\n    }\n  });\n  self._playheadGroup.add(self._playheadText);\n};\n\n/**\n * Updates the playhead position.\n *\n * @param {Number} time Current playhead position, in seconds.\n */\n\nPlayheadLayer.prototype.updatePlayheadTime = function (time) {\n  this._syncPlayhead(time);\n  if (this._player.isPlaying()) {\n    this._start();\n  }\n};\n\n/**\n * Updates the playhead position.\n *\n * @private\n * @param {Number} time Current playhead position, in seconds.\n */\n\nPlayheadLayer.prototype._syncPlayhead = function (time) {\n  var pixelIndex = this._view.timeToPixels(time);\n  var frameOffset = this._view.getFrameOffset();\n  var width = this._view.getWidth();\n  var isVisible = pixelIndex >= frameOffset && pixelIndex <= frameOffset + width;\n  this._playheadPixel = pixelIndex;\n  if (isVisible) {\n    var playheadX = this._playheadPixel - frameOffset;\n    if (!this._playheadVisible) {\n      this._playheadVisible = true;\n      this._playheadGroup.show();\n    }\n    this._playheadGroup.setX(playheadX);\n    if (this._playheadText) {\n      var text = this._view.formatTime(time);\n      var playheadTextWidth = this._playheadText.width();\n      this._playheadText.setText(text);\n      if (playheadTextWidth + playheadX > width - 2) {\n        this._playheadText.setX(-playheadTextWidth);\n      } else if (playheadTextWidth + playheadX < width) {\n        this._playheadText.setX(0);\n      }\n    }\n  } else {\n    if (this._playheadVisible) {\n      this._playheadVisible = false;\n      this._playheadGroup.hide();\n    }\n  }\n  if (this._view.playheadPosChanged) {\n    this._view.playheadPosChanged(time);\n  }\n};\n\n/**\n * Starts a playhead animation in sync with the media playback.\n *\n * @private\n */\n\nPlayheadLayer.prototype._start = function () {\n  var self = this;\n  if (self._playheadLineAnimation) {\n    self._playheadLineAnimation.stop();\n    self._playheadLineAnimation = null;\n  }\n  if (!self._useAnimation) {\n    return;\n  }\n  var lastPlayheadPosition = null;\n  self._playheadLineAnimation = new Animation(function () {\n    var time = self._player.getCurrentTime();\n    var playheadPosition = self._view.timeToPixels(time);\n    if (playheadPosition !== lastPlayheadPosition) {\n      self._syncPlayhead(time);\n      lastPlayheadPosition = playheadPosition;\n    }\n  }, self._playheadLayer);\n  self._playheadLineAnimation.start();\n};\nPlayheadLayer.prototype.stop = function (time) {\n  if (this._playheadLineAnimation) {\n    this._playheadLineAnimation.stop();\n    this._playheadLineAnimation = null;\n  }\n  this._syncPlayhead(time);\n};\nPlayheadLayer.prototype.getPlayheadPixel = function () {\n  return this._playheadPixel;\n};\nPlayheadLayer.prototype.showPlayheadTime = function (show) {\n  if (show) {\n    if (!this._playheadText) {\n      // Create it\n      this._createPlayheadText(this._playheadTextColor, this._playheadBackgroundColor, this._playheadPadding);\n      this.fitToView();\n    }\n  } else {\n    if (this._playheadText) {\n      this._playheadText.remove();\n      this._playheadText.destroy();\n      this._playheadText = null;\n    }\n  }\n};\nPlayheadLayer.prototype.updatePlayheadText = function () {\n  if (this._playheadText) {\n    var time = this._player.getCurrentTime();\n    var text = this._view.formatTime(time);\n    this._playheadText.setText(text);\n  }\n};\nPlayheadLayer.prototype.destroy = function () {\n  if (this._playheadLineAnimation) {\n    this._playheadLineAnimation.stop();\n    this._playheadLineAnimation = null;\n  }\n};\n\n/**\n * @file\n *\n * Defines the {@link OverlaySegmentMarker} class.\n *\n * @module overlay-segment-marker\n */\n\n\n/**\n * Creates a segment marker handle.\n *\n * @class\n * @alias OverlaySegmentMarker\n *\n * @param {CreateSegmentMarkerOptions} options\n */\n\nfunction OverlaySegmentMarker(options) {\n  this._options = options;\n}\nOverlaySegmentMarker.prototype.init = function (group) {\n  var handleWidth = 10;\n  var handleHeight = 20;\n  var handleX = -5 + 0.5; // Place in the middle of the marker\n\n  var xPosition = this._options.startMarker ? -24 : 24;\n  var time = this._options.startMarker ? this._options.segment.startTime : this._options.segment.endTime;\n\n  // Label - create with default y, the real value is set in fitToView().\n  this._label = new Text({\n    x: xPosition,\n    y: 0,\n    text: this._options.layer.formatTime(time),\n    fontFamily: this._options.fontFamily,\n    fontSize: this._options.fontSize,\n    fontStyle: this._options.fontStyle,\n    fill: '#000',\n    textAlign: 'center',\n    visible: false\n  });\n\n  // Handle - create with default y, the real value is set in fitToView().\n  this._handle = new Rect({\n    x: handleX,\n    y: 0,\n    width: handleWidth,\n    height: handleHeight\n  });\n  group.add(this._label);\n  group.add(this._handle);\n  this.fitToView();\n  this.bindEventHandlers(group);\n};\nOverlaySegmentMarker.prototype.bindEventHandlers = function (group) {\n  var self = this;\n  var xPosition = self._options.startMarker ? -24 : 24;\n  group.on('dragstart', function () {\n    if (self._options.startMarker) {\n      self._label.setX(xPosition - self._label.getWidth());\n    }\n    self._label.show();\n  });\n  group.on('dragend', function () {\n    self._label.hide();\n  });\n  self._handle.on('mouseover touchstart', function () {\n    if (self._options.startMarker) {\n      self._label.setX(xPosition - self._label.getWidth());\n    }\n    self._label.show();\n    document.body.style.cursor = 'ew-resize';\n  });\n  self._handle.on('mouseout touchend', function () {\n    self._label.hide();\n    document.body.style.cursor = 'default';\n  });\n};\nOverlaySegmentMarker.prototype.fitToView = function () {\n  var viewHeight = this._options.layer.getHeight();\n  var overlayOffset = this._options.segmentOptions.overlayOffset;\n  var overlayRectHeight = clamp(0, viewHeight - 2 * overlayOffset);\n  this._label.y(viewHeight / 2 - 5);\n  this._handle.y(overlayOffset);\n  this._handle.height(overlayRectHeight);\n};\nOverlaySegmentMarker.prototype.update = function (options) {\n  if (options.startTime !== undefined && this._options.startMarker) {\n    this._label.text(this._options.layer.formatTime(options.startTime));\n  }\n  if (options.endTime !== undefined && !this._options.startMarker) {\n    this._label.text(this._options.layer.formatTime(options.endTime));\n  }\n};\n\n/**\n * @file\n *\n * Defines the {@link SegmentMarker} class.\n *\n * @module segment-marker\n */\n\n\n/**\n * Parameters for the {@link SegmentMarker} constructor.\n *\n * @typedef {Object} SegmentMarkerOptions\n * @global\n * @property {Segment} segment\n * @property {SegmentShape} segmentShape\n * @property {Boolean} editable If true, marker is draggable.\n * @property {Boolean} startMarker If <code>true</code>, the marker indicates\n *   the start time of the segment. If <code>false</code>, the marker\n *   indicates the end time of the segment.\n * @property {Function} onDragStart\n * @property {Function} onDragMove\n * @property {Function} onDragEnd\n * @property {Function} dragBoundFunc\n */\n\n/**\n * Creates a segment handle marker for the start or end of a segment.\n *\n * @class\n * @alias SegmentMarker\n *\n * @param {SegmentMarkerOptions} options\n */\n\nfunction SegmentMarker(options) {\n  var self = this;\n  self._segment = options.segment;\n  self._marker = options.marker;\n  self._segmentShape = options.segmentShape;\n  self._editable = options.editable;\n  self._startMarker = options.startMarker;\n  self._onClick = options.onClick;\n  self._onDragStart = options.onDragStart;\n  self._onDragMove = options.onDragMove;\n  self._onDragEnd = options.onDragEnd;\n  self._group = new Konva.Group({\n    name: 'segment-marker',\n    segment: self._segment,\n    draggable: self._editable,\n    visible: self._editable,\n    dragBoundFunc: function dragBoundFunc(pos) {\n      return options.dragBoundFunc(self, pos);\n    }\n  });\n  self._bindDefaultEventHandlers();\n  self._marker.init(self._group);\n}\nSegmentMarker.prototype._bindDefaultEventHandlers = function () {\n  var self = this;\n  self._group.on('click', function (event) {\n    self._onClick(self, event);\n  });\n  self._group.on('dragstart', function (event) {\n    self._onDragStart(self, event);\n  });\n  self._group.on('dragmove', function (event) {\n    self._onDragMove(self, event);\n  });\n  self._group.on('dragend', function (event) {\n    self._onDragEnd(self, event);\n  });\n};\nSegmentMarker.prototype.addToLayer = function (layer) {\n  layer.add(this._group);\n};\nSegmentMarker.prototype.moveToTop = function () {\n  this._group.moveToTop();\n};\nSegmentMarker.prototype.fitToView = function () {\n  this._marker.fitToView();\n};\nSegmentMarker.prototype.getSegment = function () {\n  return this._segment;\n};\nSegmentMarker.prototype.getX = function () {\n  return this._group.getX();\n};\nSegmentMarker.prototype.setX = function (x) {\n  this._group.setX(x);\n};\nSegmentMarker.prototype.getWidth = function () {\n  return this._group.getWidth();\n};\nSegmentMarker.prototype.getAbsolutePosition = function () {\n  return this._group.getAbsolutePosition();\n};\nSegmentMarker.prototype.isStartMarker = function () {\n  return this._startMarker;\n};\nSegmentMarker.prototype.update = function (options) {\n  if (options.editable !== undefined) {\n    this._group.visible(options.editable);\n    this._group.draggable(options.editable);\n  }\n  if (this._marker.update) {\n    this._marker.update(options);\n  }\n};\nSegmentMarker.prototype.destroy = function () {\n  if (this._marker.destroy) {\n    this._marker.destroy();\n  }\n  this._group.destroyChildren();\n  this._group.destroy();\n};\nSegmentMarker.prototype.startDrag = function () {\n  this._group.startDrag();\n};\nSegmentMarker.prototype.stopDrag = function () {\n  this._group.stopDrag();\n};\n\n/**\n * @file\n *\n * Defines the {@link WaveformShape} class.\n *\n * @module waveform-shape\n */\n\n\n/**\n * Waveform shape options.\n *\n * @typedef {Object} WaveformShapeOptions\n * @global\n * @property {String | LinearGradientColor} color Waveform color.\n * @property {WaveformOverview|WaveformZoomView} view The view object\n *   that contains the waveform shape.\n * @property {Segment?} segment If given, render a waveform image\n *   covering the segment's time range. Otherwise, render the entire\n *   waveform duration.\n */\n\n/**\n * Creates a Konva.Shape object that renders a waveform image.\n *\n * @class\n * @alias WaveformShape\n *\n * @param {WaveformShapeOptions} options\n */\n\nfunction WaveformShape(options) {\n  this._color = options.color;\n  var shapeOptions = {};\n  if (isString(options.color)) {\n    shapeOptions.fill = options.color;\n  } else if (isLinearGradientColor(options.color)) {\n    var startY = options.view._height * (options.color.linearGradientStart / 100);\n    var endY = options.view._height * (options.color.linearGradientEnd / 100);\n    shapeOptions.fillLinearGradientStartPointY = startY;\n    shapeOptions.fillLinearGradientEndPointY = endY;\n    shapeOptions.fillLinearGradientColorStops = [0, options.color.linearGradientColorStops[0], 1, options.color.linearGradientColorStops[1]];\n  } else {\n    throw new TypeError('Unknown type for color property');\n  }\n  this._shape = new Konva.Shape(shapeOptions);\n  this._view = options.view;\n  this._segment = options.segment;\n  this._shape.sceneFunc(this._sceneFunc.bind(this));\n}\nWaveformShape.prototype.getX = function () {\n  return this._shape.getX();\n};\nWaveformShape.prototype.setX = function (x) {\n  return this._shape.setX(x);\n};\nWaveformShape.prototype.setSegment = function (segment) {\n  this._segment = segment;\n};\nWaveformShape.prototype.setWaveformColor = function (color) {\n  if (isString(color)) {\n    this._shape.fill(color);\n    this._shape.fillLinearGradientStartPointY(null);\n    this._shape.fillLinearGradientEndPointY(null);\n    this._shape.fillLinearGradientColorStops(null);\n  } else if (isLinearGradientColor(color)) {\n    this._shape.fill(null);\n    var startY = this._view._height * (color.linearGradientStart / 100);\n    var endY = this._view._height * (color.linearGradientEnd / 100);\n    this._shape.fillLinearGradientStartPointY(startY);\n    this._shape.fillLinearGradientEndPointY(endY);\n    this._shape.fillLinearGradientColorStops([0, color.linearGradientColorStops[0], 1, color.linearGradientColorStops[1]]);\n  } else {\n    throw new TypeError('Unknown type for color property');\n  }\n};\nWaveformShape.prototype.fitToView = function () {\n  this.setWaveformColor(this._color);\n};\nWaveformShape.prototype._sceneFunc = function (context) {\n  var frameOffset = this._view.getFrameOffset();\n  var width = this._view.getWidth();\n  var height = this._view.getHeight();\n  this._drawWaveform(context, this._view.getWaveformData(), frameOffset, this._segment ? this._view.timeToPixels(this._segment.startTime) : frameOffset, this._segment ? this._view.timeToPixels(this._segment.endTime) : frameOffset + width, width, height);\n};\n\n/**\n * Draws a waveform on a canvas context.\n *\n * @param {Konva.Context} context The canvas context to draw on.\n * @param {WaveformData} waveformData The waveform data to draw.\n * @param {Number} frameOffset The start position of the waveform shown\n *   in the view, in pixels.\n * @param {Number} startPixels The start position of the waveform to draw,\n *   in pixels.\n * @param {Number} endPixels The end position of the waveform to draw,\n *   in pixels.\n * @param {Number} width The width of the waveform area, in pixels.\n * @param {Number} height The height of the waveform area, in pixels.\n */\n\nWaveformShape.prototype._drawWaveform = function (context, waveformData, frameOffset, startPixels, endPixels, width, height) {\n  if (startPixels < frameOffset) {\n    startPixels = frameOffset;\n  }\n  var limit = frameOffset + width;\n  if (endPixels > limit) {\n    endPixels = limit;\n  }\n  if (endPixels > waveformData.length - 1) {\n    endPixels = waveformData.length - 1;\n  }\n  var channels = waveformData.channels;\n  var waveformTop = 0;\n  var waveformHeight = Math.floor(height / channels);\n  for (var i = 0; i < channels; i++) {\n    if (i === channels - 1) {\n      waveformHeight = height - (channels - 1) * waveformHeight;\n    }\n    this._drawChannel(context, waveformData.channel(i), frameOffset, startPixels, endPixels, waveformTop, waveformHeight);\n    waveformTop += waveformHeight;\n  }\n};\n\n/**\n * Draws a single waveform channel on a canvas context.\n *\n * @param {Konva.Context} context The canvas context to draw on.\n * @param {WaveformDataChannel} channel The waveform data to draw.\n * @param {Number} frameOffset The start position of the waveform shown\n *   in the view, in pixels.\n * @param {Number} startPixels The start position of the waveform to draw,\n *   in pixels.\n * @param {Number} endPixels The end position of the waveform to draw,\n *   in pixels.\n * @param {Number} top The top of the waveform channel area, in pixels.\n * @param {Number} height The height of the waveform channel area, in pixels.\n */\n\nWaveformShape.prototype._drawChannel = function (context, channel, frameOffset, startPixels, endPixels, top, height) {\n  var x, amplitude;\n  var amplitudeScale = this._view.getAmplitudeScale();\n  var lineX, lineY;\n  context.beginPath();\n  for (x = startPixels; x <= endPixels; x++) {\n    amplitude = channel.min_sample(x);\n    lineX = x - frameOffset + 0.5;\n    lineY = top + WaveformShape.scaleY(amplitude, height, amplitudeScale) + 0.5;\n    context.lineTo(lineX, lineY);\n  }\n  for (x = endPixels; x >= startPixels; x--) {\n    amplitude = channel.max_sample(x);\n    lineX = x - frameOffset + 0.5;\n    lineY = top + WaveformShape.scaleY(amplitude, height, amplitudeScale) + 1.0;\n    context.lineTo(lineX, lineY);\n  }\n  context.closePath();\n  context.fillShape(this._shape);\n};\nWaveformShape.prototype.addToLayer = function (layer) {\n  layer.add(this._shape);\n};\nWaveformShape.prototype.destroy = function () {\n  this._shape.destroy();\n  this._shape = null;\n};\nWaveformShape.prototype.on = function (event, handler) {\n  this._shape.on(event, handler);\n};\nWaveformShape.prototype.off = function (event, handler) {\n  this._shape.off(event, handler);\n};\n\n/**\n * Scales the waveform data for drawing on a canvas context.\n *\n * @see {@link https://stats.stackexchange.com/questions/281162}\n *\n * @todo Assumes 8-bit waveform data (-128 to 127 range)\n *\n * @param {Number} amplitude The waveform data point amplitude.\n * @param {Number} height The height of the waveform, in pixels.\n * @param {Number} scale Amplitude scaling factor.\n * @returns {Number} The scaled waveform data point.\n */\n\nWaveformShape.scaleY = function (amplitude, height, scale) {\n  var y = -(height - 1) * (amplitude * scale + 128) / 255 + (height - 1);\n  return clamp(Math.floor(y), 0, height - 1);\n};\n\n/**\n * @file\n *\n * Defines the {@link SegmentShape} class.\n *\n * @module segment-shape\n */\n\n\n/**\n * Options that control segments' visual appearance\n *\n * @typedef {Object} SegmentDisplayOptions\n * @global\n * @property {Boolean} markers\n * @property {Boolean} overlay\n * @property {String} startMarkerColor\n * @property {String} endMarkerColor\n * @property {String} waveformColor\n * @property {String} overlayColor\n * @property {Number} overlayOpacity\n * @property {String} overlayBorderColor\n * @property {Number} overlayBorderWidth\n * @property {Number} overlayCornerRadius\n * @property {Number} overlayOffset\n * @property {String} overlayLabelAlign\n * @property {String} overlayLabelVerticalAlign\n * @property {Number} overlayLabelPadding\n * @property {String} overlayLabelColor\n * @property {String} overlayFontFamily\n * @property {Number} overlayFontSize\n * @property {String} overlayFontStyle\n */\n\n/**\n * Creates a waveform segment shape with optional start and end markers.\n *\n * @class\n * @alias SegmentShape\n *\n * @param {Segment} segment\n * @param {Peaks} peaks\n * @param {SegmentsLayer} layer\n * @param {WaveformOverview|WaveformZoomView} view\n */\n\nfunction SegmentShape(segment, peaks, layer, view) {\n  this._segment = segment;\n  this._peaks = peaks;\n  this._layer = layer;\n  this._view = view;\n  this._label = null;\n  this._startMarker = null;\n  this._endMarker = null;\n  this._color = segment.color;\n  this._borderColor = segment.borderColor;\n  this._draggable = this._segment.editable && this._view.isSegmentDraggingEnabled();\n  this._dragging = false;\n  var viewOptions = view.getViewOptions();\n  var segmentOptions = viewOptions.segmentOptions;\n  this._overlayOffset = segmentOptions.overlayOffset;\n  if (!segment.overlay) {\n    this._waveformShape = new WaveformShape({\n      color: segment.color,\n      view: view,\n      segment: segment\n    });\n  }\n  this._onMouseEnter = this._onMouseEnter.bind(this);\n  this._onMouseLeave = this._onMouseLeave.bind(this);\n  this._onMouseDown = this._onMouseDown.bind(this);\n  this._onMouseUp = this._onMouseUp.bind(this);\n  this._dragBoundFunc = this._dragBoundFunc.bind(this);\n  this._onSegmentDragStart = this._onSegmentDragStart.bind(this);\n  this._onSegmentDragMove = this._onSegmentDragMove.bind(this);\n  this._onSegmentDragEnd = this._onSegmentDragEnd.bind(this);\n\n  // Event handlers for markers\n  this._onSegmentMarkerClick = this._onSegmentMarkerClick.bind(this);\n  this._onSegmentMarkerDragStart = this._onSegmentMarkerDragStart.bind(this);\n  this._onSegmentMarkerDragMove = this._onSegmentMarkerDragMove.bind(this);\n  this._onSegmentMarkerDragEnd = this._onSegmentMarkerDragEnd.bind(this);\n  this._segmentMarkerDragBoundFunc = this._segmentMarkerDragBoundFunc.bind(this);\n  this._label = this._peaks.options.createSegmentLabel({\n    segment: segment,\n    view: this._view.getName(),\n    layer: this._layer,\n    fontFamily: viewOptions.fontFamily,\n    fontSize: viewOptions.fontSize,\n    fontStyle: viewOptions.fontStyle\n  });\n  if (this._label) {\n    this._label.hide();\n  }\n\n  // Create with default y and height, the real values are set in fitToView().\n  var segmentStartOffset = this._view.timeToPixelOffset(this._segment.startTime);\n  var segmentEndOffset = this._view.timeToPixelOffset(this._segment.endTime);\n  var overlayRectHeight = clamp(0, this._view.getHeight() - 2 * this._overlayOffset);\n\n  // The clip rectangle prevents text in the overlay from appearing\n  // outside the overlay.\n\n  this._overlay = new Konva.Group({\n    name: 'segment-overlay',\n    segment: this._segment,\n    x: segmentStartOffset,\n    y: 0,\n    width: segmentEndOffset - segmentStartOffset,\n    height: this._view.getHeight(),\n    clipX: 0,\n    clipY: this._overlayOffset,\n    clipWidth: segmentEndOffset - segmentStartOffset,\n    clipHeight: overlayRectHeight,\n    draggable: this._draggable,\n    dragBoundFunc: this._dragBoundFunc\n  });\n  var overlayBorderColor, overlayBorderWidth, overlayColor, overlayOpacity, overlayCornerRadius;\n  if (segment.overlay) {\n    overlayBorderColor = this._borderColor || segmentOptions.overlayBorderColor;\n    overlayBorderWidth = segmentOptions.overlayBorderWidth;\n    overlayColor = this._color || segmentOptions.overlayColor;\n    overlayOpacity = segmentOptions.overlayOpacity;\n    overlayCornerRadius = segmentOptions.overlayCornerRadius;\n  }\n  this._overlayRect = new Konva.Rect({\n    x: 0,\n    y: this._overlayOffset,\n    width: segmentEndOffset - segmentStartOffset,\n    stroke: overlayBorderColor,\n    strokeWidth: overlayBorderWidth,\n    height: overlayRectHeight,\n    fill: overlayColor,\n    opacity: overlayOpacity,\n    cornerRadius: overlayCornerRadius\n  });\n  this._overlay.add(this._overlayRect);\n  if (segment.overlay) {\n    this._overlayText = new Konva.Text({\n      x: 0,\n      y: this._overlayOffset,\n      text: this._segment.labelText,\n      fontFamily: segmentOptions.overlayFontFamily,\n      fontSize: segmentOptions.overlayFontSize,\n      fontStyle: segmentOptions.overlayFontStyle,\n      fill: segmentOptions.overlayLabelColor,\n      listening: false,\n      align: segmentOptions.overlayLabelAlign,\n      width: segmentEndOffset - segmentStartOffset,\n      verticalAlign: segmentOptions.overlayLabelVerticalAlign,\n      height: overlayRectHeight,\n      padding: segmentOptions.overlayLabelPadding\n    });\n    this._overlay.add(this._overlayText);\n  }\n\n  // Set up event handlers to show/hide the segment label text when the user\n  // hovers the mouse over the segment.\n  this._overlay.on('mouseenter', this._onMouseEnter);\n  this._overlay.on('mouseleave', this._onMouseLeave);\n  this._overlay.on('mousedown', this._onMouseDown);\n  this._overlay.on('mouseup', this._onMouseUp);\n  if (this._draggable) {\n    this._overlay.on('dragstart', this._onSegmentDragStart);\n    this._overlay.on('dragmove', this._onSegmentDragMove);\n    this._overlay.on('dragend', this._onSegmentDragEnd);\n  }\n  this._createMarkers();\n}\nfunction createOverlayMarker(options) {\n  return new OverlaySegmentMarker(options);\n}\nSegmentShape.prototype._createMarkers = function () {\n  var editable = this._layer.isEditingEnabled() && this._segment.editable;\n  var viewOptions = this._view.getViewOptions();\n  var segmentOptions = viewOptions.segmentOptions;\n  var createSegmentMarker, startMarker, endMarker;\n  if (this._segment.markers) {\n    createSegmentMarker = this._peaks.options.createSegmentMarker;\n  } else if (this._segment.overlay) {\n    createSegmentMarker = createOverlayMarker;\n  }\n  if (createSegmentMarker) {\n    startMarker = createSegmentMarker({\n      segment: this._segment,\n      editable: editable,\n      startMarker: true,\n      color: segmentOptions.startMarkerColor,\n      fontFamily: viewOptions.fontFamily,\n      fontSize: viewOptions.fontSize,\n      fontStyle: viewOptions.fontStyle,\n      layer: this._layer,\n      view: this._view.getName(),\n      segmentOptions: this._view.getViewOptions().segmentOptions\n    });\n  }\n  if (startMarker) {\n    this._startMarker = new SegmentMarker({\n      segment: this._segment,\n      segmentShape: this,\n      editable: editable,\n      startMarker: true,\n      marker: startMarker,\n      onClick: this._onSegmentMarkerClick,\n      onDragStart: this._onSegmentMarkerDragStart,\n      onDragMove: this._onSegmentMarkerDragMove,\n      onDragEnd: this._onSegmentMarkerDragEnd,\n      dragBoundFunc: this._segmentMarkerDragBoundFunc\n    });\n  }\n  if (createSegmentMarker) {\n    endMarker = createSegmentMarker({\n      segment: this._segment,\n      editable: editable,\n      startMarker: false,\n      color: segmentOptions.endMarkerColor,\n      fontFamily: viewOptions.fontFamily,\n      fontSize: viewOptions.fontSize,\n      fontStyle: viewOptions.fontStyle,\n      layer: this._layer,\n      view: this._view.getName(),\n      segmentOptions: this._view.getViewOptions().segmentOptions\n    });\n  }\n  if (endMarker) {\n    this._endMarker = new SegmentMarker({\n      segment: this._segment,\n      segmentShape: this,\n      editable: editable,\n      startMarker: false,\n      marker: endMarker,\n      onClick: this._onSegmentMarkerClick,\n      onDragStart: this._onSegmentMarkerDragStart,\n      onDragMove: this._onSegmentMarkerDragMove,\n      onDragEnd: this._onSegmentMarkerDragEnd,\n      dragBoundFunc: this._segmentMarkerDragBoundFunc\n    });\n  }\n};\nSegmentShape.prototype._dragBoundFunc = function (pos) {\n  // Allow the segment to be moved horizontally but not vertically.\n  return {\n    x: pos.x,\n    y: 0\n  };\n};\n\n/**\n * Update the segment shape after the segment's attributes have changed.\n */\n\nSegmentShape.prototype.update = function (options) {\n  var segmentStartOffset = this._view.timeToPixelOffset(this._segment.startTime);\n  var segmentEndOffset = this._view.timeToPixelOffset(this._segment.endTime);\n  var width = segmentEndOffset - segmentStartOffset;\n  var marker;\n  if (marker = this.getStartMarker()) {\n    marker.setX(segmentStartOffset - marker.getWidth());\n    if (options) {\n      marker.update(options);\n    }\n  }\n  if (marker = this.getEndMarker()) {\n    marker.setX(segmentEndOffset);\n    if (options) {\n      marker.update(options);\n    }\n  }\n  this._color = this._segment.color;\n  this._borderColor = this._segment.bordercolor;\n  if (this._label) {\n    this._label.text(this._segment.labelText);\n  }\n  if (this._overlayText) {\n    this._overlayText.text(this._segment.labelText);\n  }\n  if (this._segment.overlay) {\n    if (this._color) {\n      this._overlayRect.fill(this._color);\n    }\n    if (this._borderColor) {\n      this._overlayRect.stroke(this._borderColor);\n    }\n  } else {\n    this._waveformShape.setWaveformColor(this._segment.color);\n  }\n\n  // While dragging, the overlay position is controlled in _onSegmentDragMove().\n\n  if (!this._dragging) {\n    if (this._overlay) {\n      this._overlay.setAttrs({\n        x: segmentStartOffset,\n        width: width,\n        clipWidth: width < 1 ? 1 : width\n      });\n      this._overlayRect.setAttrs({\n        x: 0,\n        width: width\n      });\n      if (this._overlayText) {\n        this._overlayText.setAttrs({\n          width: width\n        });\n      }\n    }\n  }\n};\nSegmentShape.prototype.getSegment = function () {\n  return this._segment;\n};\nSegmentShape.prototype.getStartMarker = function () {\n  return this._startMarker;\n};\nSegmentShape.prototype.getEndMarker = function () {\n  return this._endMarker;\n};\nSegmentShape.prototype.addToLayer = function (layer) {\n  if (this._waveformShape) {\n    this._waveformShape.addToLayer(layer);\n  }\n  if (this._label) {\n    layer.add(this._label);\n  }\n  if (this._overlay) {\n    layer.add(this._overlay);\n  }\n  if (this._startMarker) {\n    this._startMarker.addToLayer(layer);\n  }\n  if (this._endMarker) {\n    this._endMarker.addToLayer(layer);\n  }\n};\nSegmentShape.prototype.isDragging = function () {\n  return this._dragging;\n};\nSegmentShape.prototype._onMouseEnter = function (event) {\n  if (this._label) {\n    this._label.moveToTop();\n    this._label.show();\n  }\n  this._peaks.emit('segments.mouseenter', {\n    segment: this._segment,\n    evt: event.evt\n  });\n};\nSegmentShape.prototype._onMouseLeave = function (event) {\n  if (this._label) {\n    this._label.hide();\n  }\n  this._peaks.emit('segments.mouseleave', {\n    segment: this._segment,\n    evt: event.evt\n  });\n};\nSegmentShape.prototype._onMouseDown = function (event) {\n  this._peaks.emit('segments.mousedown', {\n    segment: this._segment,\n    evt: event.evt\n  });\n};\nSegmentShape.prototype._onMouseUp = function (event) {\n  this._peaks.emit('segments.mouseup', {\n    segment: this._segment,\n    evt: event.evt\n  });\n};\nSegmentShape.prototype.segmentClicked = function (eventName, event) {\n  this._moveToTop();\n  this._peaks.emit('segments.' + eventName, event);\n};\nSegmentShape.prototype._moveToTop = function () {\n  this._overlay.moveToTop();\n  this._layer.moveSegmentMarkersToTop();\n};\nSegmentShape.prototype.enableSegmentDragging = function (enable) {\n  if (!this._segment.editable) {\n    return;\n  }\n  if (!this._draggable && enable) {\n    this._overlay.on('dragstart', this._onSegmentDragStart);\n    this._overlay.on('dragmove', this._onSegmentDragMove);\n    this._overlay.on('dragend', this._onSegmentDragEnd);\n  } else if (this._draggable && !enable) {\n    this._overlay.off('dragstart', this._onSegmentDragStart);\n    this._overlay.off('dragmove', this._onSegmentDragMove);\n    this._overlay.off('dragend', this._onSegmentDragEnd);\n  }\n  this._overlay.draggable(enable);\n  this._draggable = enable;\n};\nSegmentShape.prototype._setPreviousAndNextSegments = function () {\n  if (this._view.getSegmentDragMode() !== 'overlap') {\n    this._nextSegment = this._peaks.segments.findNextSegment(this._segment);\n    this._previousSegment = this._peaks.segments.findPreviousSegment(this._segment);\n  } else {\n    this._nextSegment = null;\n    this._previousSegment = null;\n  }\n};\nSegmentShape.prototype._onSegmentDragStart = function (event) {\n  this._setPreviousAndNextSegments();\n  this._dragging = true;\n  this._dragStartX = this._overlay.getX();\n  this._dragStartTime = this._segment.startTime;\n  this._dragEndTime = this._segment.endTime;\n  this._peaks.emit('segments.dragstart', {\n    segment: this._segment,\n    marker: false,\n    startMarker: false,\n    evt: event.evt\n  });\n};\nSegmentShape.prototype._onSegmentDragMove = function (event) {\n  var x = this._overlay.getX();\n  var offsetX = x - this._dragStartX;\n  var timeOffset = this._view.pixelsToTime(offsetX);\n\n  // The WaveformShape for a segment fills the canvas width\n  // but only draws a subset of the horizontal range. When dragged\n  // we need to keep the shape object in its position but\n  // update the segment start and end time so that the right\n  // subset is drawn.\n\n  // Calculate new segment start/end time based on drag position. We'll\n  // correct this later based on the drag mode, to prevent overlapping\n  // segments or to compress the adjacent segment.\n\n  var startTime = this._dragStartTime + timeOffset;\n  var endTime = this._dragEndTime + timeOffset;\n  var segmentDuration = this._segment.endTime - this._segment.startTime;\n  var dragMode;\n  var minSegmentWidth = this._view.getMinSegmentDragWidth();\n  var minSegmentDuration = this._view.pixelsToTime(minSegmentWidth);\n  var previousSegmentUpdated = false;\n  var nextSegmentUpdated = false;\n\n  // Prevent the segment from being dragged beyond the start of the waveform.\n\n  if (startTime < 0) {\n    startTime = 0;\n    endTime = segmentDuration;\n    this._overlay.setX(this._view.timeToPixelOffset(startTime));\n  }\n\n  // Adjust segment position if it now overlaps the previous segment?\n\n  if (this._previousSegment) {\n    var previousSegmentEndX = this._view.timeToPixelOffset(this._previousSegment.endTime);\n    if (startTime < this._previousSegment.endTime) {\n      dragMode = this._view.getSegmentDragMode();\n      if (dragMode === 'no-overlap' || dragMode === 'compress' && !this._previousSegment.editable) {\n        startTime = this._previousSegment.endTime;\n        endTime = startTime + segmentDuration;\n        this._overlay.setX(previousSegmentEndX);\n      } else if (dragMode === 'compress') {\n        var previousSegmentEndTime = startTime;\n        var minPreviousSegmentEndTime = this._previousSegment.startTime + minSegmentDuration;\n        if (previousSegmentEndTime < minPreviousSegmentEndTime) {\n          previousSegmentEndTime = minPreviousSegmentEndTime;\n          previousSegmentEndX = this._view.timeToPixelOffset(previousSegmentEndTime);\n          this._overlay.setX(previousSegmentEndX);\n          startTime = previousSegmentEndTime;\n          endTime = startTime + segmentDuration;\n        }\n        this._previousSegment.update({\n          endTime: previousSegmentEndTime\n        });\n        previousSegmentUpdated = true;\n      }\n    }\n  }\n\n  // Adjust segment position if it now overlaps the following segment?\n\n  if (this._nextSegment) {\n    var nextSegmentStartX = this._view.timeToPixelOffset(this._nextSegment.startTime);\n    if (endTime > this._nextSegment.startTime) {\n      dragMode = this._view.getSegmentDragMode();\n      if (dragMode === 'no-overlap' || dragMode === 'compress' && !this._nextSegment.editable) {\n        endTime = this._nextSegment.startTime;\n        startTime = endTime - segmentDuration;\n        this._overlay.setX(nextSegmentStartX - this._overlay.getWidth());\n      } else if (dragMode === 'compress') {\n        var nextSegmentStartTime = endTime;\n        var maxNextSegmentStartTime = this._nextSegment.endTime - minSegmentDuration;\n        if (nextSegmentStartTime > maxNextSegmentStartTime) {\n          nextSegmentStartTime = maxNextSegmentStartTime;\n          nextSegmentStartX = this._view.timeToPixelOffset(nextSegmentStartTime);\n          this._overlay.setX(nextSegmentStartX - this._overlay.getWidth());\n          endTime = nextSegmentStartTime;\n          startTime = endTime - segmentDuration;\n        }\n        this._nextSegment.update({\n          startTime: nextSegmentStartTime\n        });\n        nextSegmentUpdated = true;\n      }\n    }\n  }\n  this._segment._setStartTime(startTime);\n  this._segment._setEndTime(endTime);\n  this._peaks.emit('segments.dragged', {\n    segment: this._segment,\n    marker: false,\n    startMarker: false,\n    evt: event.evt\n  });\n  if (previousSegmentUpdated) {\n    this._peaks.emit('segments.dragged', {\n      segment: this._previousSegment,\n      marker: false,\n      startMarker: false,\n      evt: event.evt\n    });\n  } else if (nextSegmentUpdated) {\n    this._peaks.emit('segments.dragged', {\n      segment: this._nextSegment,\n      marker: false,\n      startMarker: false,\n      evt: event.evt\n    });\n  }\n};\nSegmentShape.prototype._onSegmentDragEnd = function (event) {\n  this._dragging = false;\n  this._peaks.emit('segments.dragend', {\n    segment: this._segment,\n    marker: false,\n    startMarker: false,\n    evt: event.evt\n  });\n};\nSegmentShape.prototype.moveMarkersToTop = function () {\n  if (this._startMarker) {\n    this._startMarker.moveToTop();\n  }\n  if (this._endMarker) {\n    this._endMarker.moveToTop();\n  }\n};\nSegmentShape.prototype.startDrag = function () {\n  if (this._endMarker) {\n    this._endMarker.startDrag();\n  }\n};\nSegmentShape.prototype.stopDrag = function () {\n  if (this._endMarker) {\n    this._endMarker.stopDrag();\n  }\n};\n\n/**\n * @param {SegmentMarker} segmentMarker\n */\n\nSegmentShape.prototype._onSegmentMarkerDragStart = function (segmentMarker, event) {\n  this._setPreviousAndNextSegments();\n\n  // Move this segment to the top of the z-order, so that it remains on top\n  // of any adjacent segments that the marker is dragged over.\n  this._moveToTop();\n  this._startMarkerX = this._startMarker.getX();\n  this._endMarkerX = this._endMarker.getX();\n  this._peaks.emit('segments.dragstart', {\n    segment: this._segment,\n    marker: true,\n    startMarker: segmentMarker.isStartMarker(),\n    evt: event.evt\n  });\n};\n\n/**\n * @param {SegmentMarker} segmentMarker\n */\n\nSegmentShape.prototype._onSegmentMarkerDragMove = function (segmentMarker, event) {\n  if (segmentMarker.isStartMarker()) {\n    this._segmentStartMarkerDragMove(segmentMarker, event);\n    segmentMarker.update({\n      startTime: this._segment.startTime\n    });\n  } else {\n    this._segmentEndMarkerDragMove(segmentMarker, event);\n    segmentMarker.update({\n      endTime: this._segment.endTime\n    });\n  }\n};\nfunction getDuration(segment) {\n  return segment.endTime - segment.startTime;\n}\nSegmentShape.prototype._segmentStartMarkerDragMove = function (segmentMarker, event) {\n  var width = this._view.getWidth();\n  var startMarkerX = this._startMarker.getX();\n  var endMarkerX = this._endMarker.getX();\n  var minSegmentDuration = this._view.pixelsToTime(50);\n  var minSegmentWidth = this._view.getMinSegmentDragWidth();\n  var upperLimit = this._endMarker.getX() - minSegmentWidth;\n  if (upperLimit > width) {\n    upperLimit = width;\n  }\n  var previousSegmentVisible = false;\n  var previousSegmentUpdated = false;\n  var previousSegmentEndX;\n  if (this._previousSegment) {\n    previousSegmentEndX = this._view.timeToPixelOffset(this._previousSegment.endTime);\n    previousSegmentVisible = previousSegmentEndX >= 0;\n  }\n  if (startMarkerX > upperLimit) {\n    segmentMarker.setX(upperLimit);\n    this._overlay.clipWidth(upperLimit - endMarkerX);\n    if (minSegmentWidth === 0 && upperLimit < width) {\n      this._segment._setStartTime(this._segment.endTime);\n    } else {\n      this._segment._setStartTime(this._view.pixelOffsetToTime(upperLimit));\n    }\n  } else if (this._previousSegment && previousSegmentVisible) {\n    var dragMode = this._view.getSegmentDragMode();\n    var fixedPreviousSegment = dragMode === 'no-overlap' || dragMode === 'compress' && !this._previousSegment.editable;\n    var compressPreviousSegment = dragMode === 'compress' && this._previousSegment.editable;\n    if (startMarkerX <= previousSegmentEndX) {\n      if (fixedPreviousSegment) {\n        segmentMarker.setX(previousSegmentEndX);\n        this._overlay.clipWidth(previousSegmentEndX - endMarkerX);\n        this._segment._setStartTime(this._previousSegment.endTime);\n      } else if (compressPreviousSegment) {\n        var previousSegmentDuration = getDuration(this._previousSegment);\n        if (previousSegmentDuration < minSegmentDuration) {\n          minSegmentDuration = previousSegmentDuration;\n        }\n        var lowerLimit = this._view.timeToPixelOffset(this._previousSegment.startTime + minSegmentDuration);\n        if (startMarkerX < lowerLimit) {\n          startMarkerX = lowerLimit;\n        }\n        segmentMarker.setX(startMarkerX);\n        this._overlay.clipWidth(endMarkerX - startMarkerX);\n        this._segment._setStartTime(this._view.pixelOffsetToTime(startMarkerX));\n        this._previousSegment.update({\n          endTime: this._view.pixelOffsetToTime(startMarkerX)\n        });\n        previousSegmentUpdated = true;\n      }\n    } else {\n      if (startMarkerX < 0) {\n        startMarkerX = 0;\n      }\n      segmentMarker.setX(startMarkerX);\n      this._overlay.clipWidth(endMarkerX - startMarkerX);\n      this._segment._setStartTime(this._view.pixelOffsetToTime(startMarkerX));\n    }\n  } else {\n    if (startMarkerX < 0) {\n      startMarkerX = 0;\n    }\n    segmentMarker.setX(startMarkerX);\n    this._overlay.clipWidth(endMarkerX - startMarkerX);\n    this._segment._setStartTime(this._view.pixelOffsetToTime(startMarkerX));\n  }\n  this._peaks.emit('segments.dragged', {\n    segment: this._segment,\n    marker: true,\n    startMarker: true,\n    evt: event.evt\n  });\n  if (previousSegmentUpdated) {\n    this._peaks.emit('segments.dragged', {\n      segment: this._previousSegment,\n      marker: true,\n      startMarker: false,\n      evt: event.evt\n    });\n  }\n};\nSegmentShape.prototype._segmentEndMarkerDragMove = function (segmentMarker, event) {\n  var width = this._view.getWidth();\n  var startMarkerX = this._startMarker.getX();\n  var endMarkerX = this._endMarker.getX();\n  var minSegmentDuration = this._view.pixelsToTime(50);\n  var minSegmentWidth = this._view.getMinSegmentDragWidth();\n  var lowerLimit = this._startMarker.getX() + minSegmentWidth;\n  if (lowerLimit < 0) {\n    lowerLimit = 0;\n  }\n  var nextSegmentVisible = false;\n  var nextSegmentUpdated = false;\n  var nextSegmentStartX;\n  if (this._nextSegment) {\n    nextSegmentStartX = this._view.timeToPixelOffset(this._nextSegment.startTime);\n    nextSegmentVisible = nextSegmentStartX < width;\n  }\n  if (endMarkerX < lowerLimit) {\n    segmentMarker.setX(lowerLimit);\n    this._overlay.clipWidth(lowerLimit - startMarkerX);\n    if (minSegmentWidth === 0 && lowerLimit > 0) {\n      this._segment._setEndTime(this._segment.startTime);\n    } else {\n      this._segment._setEndTime(this._view.pixelOffsetToTime(lowerLimit));\n    }\n  } else if (this._nextSegment && nextSegmentVisible) {\n    var dragMode = this._view.getSegmentDragMode();\n    var fixedNextSegment = dragMode === 'no-overlap' || dragMode === 'compress' && !this._nextSegment.editable;\n    var compressNextSegment = dragMode === 'compress' && this._nextSegment.editable;\n    if (endMarkerX >= nextSegmentStartX) {\n      if (fixedNextSegment) {\n        segmentMarker.setX(nextSegmentStartX);\n        this._overlay.clipWidth(nextSegmentStartX - startMarkerX);\n        this._segment._setEndTime(this._nextSegment.startTime);\n      } else if (compressNextSegment) {\n        var nextSegmentDuration = getDuration(this._nextSegment);\n        if (nextSegmentDuration < minSegmentDuration) {\n          minSegmentDuration = nextSegmentDuration;\n        }\n        var upperLimit = this._view.timeToPixelOffset(this._nextSegment.endTime - minSegmentDuration);\n        if (endMarkerX > upperLimit) {\n          endMarkerX = upperLimit;\n        }\n        segmentMarker.setX(endMarkerX);\n        this._overlay.clipWidth(endMarkerX - startMarkerX);\n        this._segment._setEndTime(this._view.pixelOffsetToTime(endMarkerX));\n        this._nextSegment.update({\n          startTime: this._view.pixelOffsetToTime(endMarkerX)\n        });\n        nextSegmentUpdated = true;\n      }\n    } else {\n      if (endMarkerX > width) {\n        endMarkerX = width;\n      }\n      segmentMarker.setX(endMarkerX);\n      this._overlay.clipWidth(endMarkerX - startMarkerX);\n      this._segment._setEndTime(this._view.pixelOffsetToTime(endMarkerX));\n    }\n  } else {\n    if (endMarkerX > width) {\n      endMarkerX = width;\n    }\n    segmentMarker.setX(endMarkerX);\n    this._overlay.clipWidth(endMarkerX - startMarkerX);\n    this._segment._setEndTime(this._view.pixelOffsetToTime(endMarkerX));\n  }\n  this._peaks.emit('segments.dragged', {\n    segment: this._segment,\n    marker: true,\n    startMarker: false,\n    evt: event.evt\n  });\n  if (nextSegmentUpdated) {\n    this._peaks.emit('segments.dragged', {\n      segment: this._nextSegment,\n      marker: true,\n      startMarker: true,\n      evt: event.evt\n    });\n  }\n};\n\n/**\n * @param {SegmentMarker} segmentMarker\n */\n\nSegmentShape.prototype._onSegmentMarkerDragEnd = function (segmentMarker, event) {\n  this._nextSegment = null;\n  this._previousSegment = null;\n  var startMarker = segmentMarker.isStartMarker();\n  this._peaks.emit('segments.dragend', {\n    segment: this._segment,\n    marker: true,\n    startMarker: startMarker,\n    evt: event.evt\n  });\n};\nSegmentShape.prototype._segmentMarkerDragBoundFunc = function (segmentMarker, pos) {\n  // Allow the marker to be moved horizontally but not vertically.\n  return {\n    x: pos.x,\n    y: segmentMarker.getAbsolutePosition().y\n  };\n};\nSegmentShape.prototype._onSegmentMarkerClick = function () {\n  // Move this segment to the top of the z-order.\n  this._moveToTop();\n};\nSegmentShape.prototype.fitToView = function () {\n  if (this._startMarker) {\n    this._startMarker.fitToView();\n  }\n  if (this._endMarker) {\n    this._endMarker.fitToView();\n  }\n  if (this._overlay) {\n    var height = this._view.getHeight();\n    var overlayRectHeight = clamp(0, height - this._overlayOffset * 2);\n    this._overlay.setAttrs({\n      y: 0,\n      height: height,\n      clipY: this._overlayOffset,\n      clipHeight: overlayRectHeight\n    });\n    this._overlayRect.setAttrs({\n      y: this._overlayOffset,\n      height: overlayRectHeight\n    });\n    if (this._overlayText) {\n      this._overlayText.setAttrs({\n        y: this._overlayOffset,\n        height: overlayRectHeight\n      });\n    }\n  }\n};\nSegmentShape.prototype.destroy = function () {\n  if (this._waveformShape) {\n    this._waveformShape.destroy();\n  }\n  if (this._label) {\n    this._label.destroy();\n  }\n  if (this._startMarker) {\n    this._startMarker.destroy();\n  }\n  if (this._endMarker) {\n    this._endMarker.destroy();\n  }\n  if (this._overlay) {\n    this._overlay.destroy();\n  }\n};\n\n/**\n * @file\n *\n * Defines the {@link SegmentsLayer} class.\n *\n * @module segments-layer\n */\n\n\n/**\n * Creates a Konva.Layer that displays segment markers against the audio\n * waveform.\n *\n * @class\n * @alias SegmentsLayer\n *\n * @param {Peaks} peaks\n * @param {WaveformOverview|WaveformZoomView} view\n * @param {Boolean} enableEditing\n */\n\nfunction SegmentsLayer(peaks, view, enableEditing) {\n  this._peaks = peaks;\n  this._view = view;\n  this._enableEditing = enableEditing;\n  this._segmentShapes = {};\n  this._layer = new Konva.Layer();\n  this._onSegmentsUpdate = this._onSegmentsUpdate.bind(this);\n  this._onSegmentsAdd = this._onSegmentsAdd.bind(this);\n  this._onSegmentsRemove = this._onSegmentsRemove.bind(this);\n  this._onSegmentsRemoveAll = this._onSegmentsRemoveAll.bind(this);\n  this._onSegmentsDragged = this._onSegmentsDragged.bind(this);\n  this._peaks.on('segments.update', this._onSegmentsUpdate);\n  this._peaks.on('segments.add', this._onSegmentsAdd);\n  this._peaks.on('segments.remove', this._onSegmentsRemove);\n  this._peaks.on('segments.remove_all', this._onSegmentsRemoveAll);\n  this._peaks.on('segments.dragged', this._onSegmentsDragged);\n}\n\n/**\n * Adds the layer to the given {Konva.Stage}.\n *\n * @param {Konva.Stage} stage\n */\n\nSegmentsLayer.prototype.addToStage = function (stage) {\n  stage.add(this._layer);\n};\nSegmentsLayer.prototype.setListening = function (listening) {\n  this._layer.listening(listening);\n};\nSegmentsLayer.prototype.enableEditing = function (enable) {\n  this._enableEditing = enable;\n};\nSegmentsLayer.prototype.isEditingEnabled = function () {\n  return this._enableEditing;\n};\nSegmentsLayer.prototype.enableSegmentDragging = function (enable) {\n  for (var segmentPid in this._segmentShapes) {\n    if (objectHasProperty(this._segmentShapes, segmentPid)) {\n      this._segmentShapes[segmentPid].enableSegmentDragging(enable);\n    }\n  }\n};\nSegmentsLayer.prototype.getSegmentShape = function (segment) {\n  return this._segmentShapes[segment.pid];\n};\nSegmentsLayer.prototype.formatTime = function (time) {\n  return this._view.formatTime(time);\n};\nSegmentsLayer.prototype._onSegmentsUpdate = function (segment, options) {\n  var frameStartTime = this._view.getStartTime();\n  var frameEndTime = this._view.getEndTime();\n  var segmentShape = this.getSegmentShape(segment);\n  var isVisible = segment.isVisible(frameStartTime, frameEndTime);\n  if (segmentShape && !isVisible) {\n    // Remove segment shape that is no longer visible.\n\n    if (!segmentShape.isDragging()) {\n      this._removeSegment(segment);\n    }\n  } else if (!segmentShape && isVisible) {\n    // Add segment shape for visible segment.\n    segmentShape = this._updateSegment(segment);\n  } else if (segmentShape && isVisible) {\n    // Update the segment shape with the changed attributes.\n    segmentShape.update(options);\n  }\n};\nSegmentsLayer.prototype._onSegmentsAdd = function (event) {\n  var self = this;\n  var frameStartTime = self._view.getStartTime();\n  var frameEndTime = self._view.getEndTime();\n  event.segments.forEach(function (segment) {\n    if (segment.isVisible(frameStartTime, frameEndTime)) {\n      var segmentShape = self._addSegmentShape(segment);\n      segmentShape.update();\n    }\n  });\n\n  // Ensure segment markers are always draggable.\n  this.moveSegmentMarkersToTop();\n};\nSegmentsLayer.prototype._onSegmentsRemove = function (event) {\n  var self = this;\n  event.segments.forEach(function (segment) {\n    self._removeSegment(segment);\n  });\n};\nSegmentsLayer.prototype._onSegmentsRemoveAll = function () {\n  this._layer.removeChildren();\n  this._segmentShapes = {};\n};\nSegmentsLayer.prototype._onSegmentsDragged = function (event) {\n  this._updateSegment(event.segment);\n};\n\n/**\n * Creates the Konva UI objects for a given segment.\n *\n * @private\n * @param {Segment} segment\n * @returns {SegmentShape}\n */\n\nSegmentsLayer.prototype._createSegmentShape = function (segment) {\n  return new SegmentShape(segment, this._peaks, this, this._view);\n};\n\n/**\n * Adds a Konva UI object to the layer for a given segment.\n *\n * @private\n * @param {Segment} segment\n * @returns {SegmentShape}\n */\n\nSegmentsLayer.prototype._addSegmentShape = function (segment) {\n  var segmentShape = this._createSegmentShape(segment);\n  segmentShape.addToLayer(this._layer);\n  this._segmentShapes[segment.pid] = segmentShape;\n  return segmentShape;\n};\n\n/**\n * Updates the positions of all displayed segments in the view.\n *\n * @param {Number} startTime The start of the visible range in the view,\n *   in seconds.\n * @param {Number} endTime The end of the visible range in the view,\n *   in seconds.\n */\n\nSegmentsLayer.prototype.updateSegments = function (startTime, endTime) {\n  // Update segments in visible time range.\n  var segments = this._peaks.segments.find(startTime, endTime);\n  segments.forEach(this._updateSegment.bind(this));\n\n  // TODO: In the overview all segments are visible, so no need to do this.\n  this._removeInvisibleSegments(startTime, endTime);\n};\n\n/**\n * @private\n * @param {Segment} segment\n */\n\nSegmentsLayer.prototype._updateSegment = function (segment) {\n  var segmentShape = this.getSegmentShape(segment);\n  if (!segmentShape) {\n    segmentShape = this._addSegmentShape(segment);\n  }\n  segmentShape.update();\n};\n\n/**\n * Removes any segments that are not visible, i.e., are not within and do not\n * overlap the given time range.\n *\n * @private\n * @param {Number} startTime The start of the visible time range, in seconds.\n * @param {Number} endTime The end of the visible time range, in seconds.\n */\n\nSegmentsLayer.prototype._removeInvisibleSegments = function (startTime, endTime) {\n  for (var segmentPid in this._segmentShapes) {\n    if (objectHasProperty(this._segmentShapes, segmentPid)) {\n      var segment = this._segmentShapes[segmentPid].getSegment();\n      if (!segment.isVisible(startTime, endTime)) {\n        this._removeSegment(segment);\n      }\n    }\n  }\n};\n\n/**\n * Removes the given segment from the view.\n *\n * @param {Segment} segment\n */\n\nSegmentsLayer.prototype._removeSegment = function (segment) {\n  var segmentShape = this._segmentShapes[segment.pid];\n  if (segmentShape) {\n    segmentShape.destroy();\n    delete this._segmentShapes[segment.pid];\n  }\n};\n\n/**\n * Moves all segment markers to the top of the z-order,\n * so the user can always drag them.\n */\n\nSegmentsLayer.prototype.moveSegmentMarkersToTop = function () {\n  for (var segmentPid in this._segmentShapes) {\n    if (objectHasProperty(this._segmentShapes, segmentPid)) {\n      this._segmentShapes[segmentPid].moveMarkersToTop();\n    }\n  }\n};\n\n/**\n * Toggles visibility of the segments layer.\n *\n * @param {Boolean} visible\n */\n\nSegmentsLayer.prototype.setVisible = function (visible) {\n  this._layer.setVisible(visible);\n};\nSegmentsLayer.prototype.segmentClicked = function (eventName, event) {\n  var segmentShape = this._segmentShapes[event.segment.pid];\n  if (segmentShape) {\n    segmentShape.segmentClicked(eventName, event);\n  }\n};\nSegmentsLayer.prototype.destroy = function () {\n  this._peaks.off('segments.update', this._onSegmentsUpdate);\n  this._peaks.off('segments.add', this._onSegmentsAdd);\n  this._peaks.off('segments.remove', this._onSegmentsRemove);\n  this._peaks.off('segments.remove_all', this._onSegmentsRemoveAll);\n  this._peaks.off('segments.dragged', this._onSegmentsDragged);\n};\nSegmentsLayer.prototype.fitToView = function () {\n  for (var segmentPid in this._segmentShapes) {\n    if (objectHasProperty(this._segmentShapes, segmentPid)) {\n      var segmentShape = this._segmentShapes[segmentPid];\n      segmentShape.fitToView();\n    }\n  }\n};\nSegmentsLayer.prototype.draw = function () {\n  this._layer.draw();\n};\nSegmentsLayer.prototype.getHeight = function () {\n  return this._layer.getHeight();\n};\n\n/**\n * @file\n *\n * Defines the {@link WaveformAxis} class.\n *\n * @module waveform-axis\n */\n\n\n/**\n * Creates the waveform axis shapes and adds them to the given view layer.\n *\n * @class\n * @alias WaveformAxis\n *\n * @param {WaveformOverview|WaveformZoomView} view\n * @param {Object} options\n * @param {String} options.axisGridlineColor\n * @param {String} options.axisLabelColor\n * @param {Boolean} options.showAxisLabels\n * @param {Function} options.formatAxisTime\n * @param {String} options.fontFamily\n * @param {Number} options.fontSize\n * @param {String} options.fontStyle\n */\n\nfunction WaveformAxis(view, options) {\n  var self = this;\n  self._axisGridlineColor = options.axisGridlineColor;\n  self._axisLabelColor = options.axisLabelColor;\n  self._showAxisLabels = options.showAxisLabels;\n  self._axisTopMarkerHeight = options.axisTopMarkerHeight;\n  self._axisBottomMarkerHeight = options.axisBottomMarkerHeight;\n  if (options.formatAxisTime) {\n    self._formatAxisTime = options.formatAxisTime;\n  } else {\n    self._formatAxisTime = function (time) {\n      // precision = 0, drops the fractional seconds\n      return formatTime(time, 0);\n    };\n  }\n  self._axisLabelFont = WaveformAxis._buildFontString(options.fontFamily, options.fontSize, options.fontStyle);\n  self._axisShape = new Konva.Shape({\n    sceneFunc: function sceneFunc(context) {\n      self._drawAxis(context, view);\n    }\n  });\n}\nWaveformAxis._buildFontString = function (fontFamily, fontSize, fontStyle) {\n  if (!fontSize) {\n    fontSize = 11;\n  }\n  if (!fontFamily) {\n    fontFamily = 'sans-serif';\n  }\n  if (!fontStyle) {\n    fontStyle = 'normal';\n  }\n  return fontStyle + ' ' + fontSize + 'px ' + fontFamily;\n};\nWaveformAxis.prototype.addToLayer = function (layer) {\n  layer.add(this._axisShape);\n};\nWaveformAxis.prototype.showAxisLabels = function (show, options) {\n  this._showAxisLabels = show;\n  if (options) {\n    if (objectHasProperty(options, 'topMarkerHeight')) {\n      this._axisTopMarkerHeight = options.topMarkerHeight;\n    }\n    if (objectHasProperty(options, 'bottomMarkerHeight')) {\n      this._axisBottomMarkerHeight = options.bottomMarkerHeight;\n    }\n  }\n};\nWaveformAxis.prototype.setAxisLabelColor = function (color) {\n  this._axisLabelColor = color;\n};\nWaveformAxis.prototype.setAxisGridlineColor = function (color) {\n  this._axisGridlineColor = color;\n};\n\n/**\n * Returns number of seconds for each x-axis marker, appropriate for the\n * current zoom level, ensuring that markers are not too close together\n * and that markers are placed at intuitive time intervals (i.e., every 1,\n * 2, 5, 10, 20, 30 seconds, then every 1, 2, 5, 10, 20, 30 minutes, then\n * every 1, 2, 5, 10, 20, 30 hours).\n *\n * @param {WaveformOverview|WaveformZoomView} view\n * @returns {Number}\n */\n\nWaveformAxis.prototype._getAxisLabelScale = function (view) {\n  var baseSecs = 1; // seconds\n  var steps = [1, 2, 5, 10, 20, 30];\n  var minSpacing = 60;\n  var index = 0;\n  var secs;\n  for (;;) {\n    secs = baseSecs * steps[index];\n    var pixels = view.timeToPixels(secs);\n    if (pixels < minSpacing) {\n      if (++index === steps.length) {\n        baseSecs *= 60; // seconds -> minutes -> hours\n        index = 0;\n      }\n    } else {\n      break;\n    }\n  }\n  return secs;\n};\n\n/**\n * Draws the time axis and labels onto a view.\n *\n * @param {Konva.Context} context The context to draw on.\n * @param {WaveformOverview|WaveformZoomView} view\n */\n\nWaveformAxis.prototype._drawAxis = function (context, view) {\n  var currentFrameStartTime = view.getStartTime();\n\n  // Time interval between axis markers (seconds)\n  var axisLabelIntervalSecs = this._getAxisLabelScale(view);\n\n  // Time of first axis marker (seconds)\n  var firstAxisLabelSecs = roundUpToNearest(currentFrameStartTime, axisLabelIntervalSecs);\n\n  // Distance between waveform start time and first axis marker (seconds)\n  var axisLabelOffsetSecs = firstAxisLabelSecs - currentFrameStartTime;\n\n  // Distance between waveform start time and first axis marker (pixels)\n  var axisLabelOffsetPixels = view.timeToPixels(axisLabelOffsetSecs);\n  context.setAttr('strokeStyle', this._axisGridlineColor);\n  context.setAttr('lineWidth', 1);\n\n  // Set text style\n  context.setAttr('font', this._axisLabelFont);\n  context.setAttr('fillStyle', this._axisLabelColor);\n  context.setAttr('textAlign', 'left');\n  context.setAttr('textBaseline', 'bottom');\n  var width = view.getWidth();\n  var height = view.getHeight();\n  var secs = firstAxisLabelSecs;\n  for (;;) {\n    // Position of axis marker (pixels)\n    var x = axisLabelOffsetPixels + view.timeToPixels(secs - firstAxisLabelSecs);\n    if (x >= width) {\n      break;\n    }\n    if (this._axisTopMarkerHeight > 0) {\n      context.beginPath();\n      context.moveTo(x + 0.5, 0);\n      context.lineTo(x + 0.5, 0 + this._axisTopMarkerHeight);\n      context.stroke();\n    }\n    if (this._axisBottomMarkerHeight > 0) {\n      context.beginPath();\n      context.moveTo(x + 0.5, height);\n      context.lineTo(x + 0.5, height - this._axisBottomMarkerHeight);\n      context.stroke();\n    }\n    if (this._showAxisLabels) {\n      var label = this._formatAxisTime(secs);\n      var labelWidth = context.measureText(label).width;\n      var labelX = x - labelWidth / 2;\n      var labelY = height - 1 - this._axisBottomMarkerHeight;\n      if (labelX >= 0) {\n        context.fillText(label, labelX, labelY);\n      }\n    }\n    secs += axisLabelIntervalSecs;\n  }\n};\n\n/**\n * @file\n *\n * Defines the {@link WaveformView} class.\n *\n * @module waveform-view\n */\n\nfunction WaveformView(waveformData, container, peaks, viewOptions) {\n  var self = this;\n  self._container = container;\n  self._peaks = peaks;\n  self._options = peaks.options;\n  self._viewOptions = viewOptions;\n  self._originalWaveformData = waveformData;\n  self._data = waveformData;\n\n  // The pixel offset of the current frame being displayed\n  self._frameOffset = 0;\n  self._width = container.clientWidth;\n  self._height = container.clientHeight;\n  self._amplitudeScale = 1.0;\n  self._waveformColor = self._viewOptions.waveformColor;\n  self._playedWaveformColor = self._viewOptions.playedWaveformColor;\n  self._timeLabelPrecision = self._viewOptions.timeLabelPrecision;\n  if (self._viewOptions.formatPlayheadTime) {\n    self._formatPlayheadTime = self._viewOptions.formatPlayheadTime;\n  } else {\n    self._formatPlayheadTime = function (time) {\n      return formatTime(time, self._timeLabelPrecision);\n    };\n  }\n  self._enableSeek = true;\n  self.initWaveformData();\n\n  // Disable warning: The stage has 6 layers.\n  // Recommended maximum number of layers is 3-5.\n  Konva.showWarnings = false;\n  self._stage = new Konva.Stage({\n    container: container,\n    width: self._width,\n    height: self._height\n  });\n  self._createWaveform();\n  if (self._viewOptions.enableSegments) {\n    self._segmentsLayer = new SegmentsLayer(peaks, self, self._viewOptions.enableEditing);\n    self._segmentsLayer.addToStage(self._stage);\n  }\n  if (self._viewOptions.enablePoints) {\n    self._pointsLayer = new PointsLayer(peaks, self, self._viewOptions.enableEditing);\n    self._pointsLayer.addToStage(self._stage);\n  }\n  self.initHighlightLayer();\n  self._createAxisLabels();\n  self._playheadLayer = new PlayheadLayer(self._peaks.player, self, self._viewOptions);\n  self._playheadLayer.addToStage(self._stage);\n  self._onClick = self._onClick.bind(self);\n  self._onDblClick = self._onDblClick.bind(self);\n  self._onContextMenu = self._onContextMenu.bind(self);\n  self._stage.on('click', self._onClick);\n  self._stage.on('dblclick', self._onDblClick);\n  self._stage.on('contextmenu', self._onContextMenu);\n}\nWaveformView.prototype.getViewOptions = function () {\n  return this._viewOptions;\n};\n\n/**\n * @returns {WaveformData} The view's waveform data.\n */\n\nWaveformView.prototype.getWaveformData = function () {\n  return this._data;\n};\nWaveformView.prototype.setWaveformData = function (waveformData) {\n  this._data = waveformData;\n};\n\n/**\n * Returns the pixel index for a given time, for the current zoom level.\n *\n * @param {Number} time Time, in seconds.\n * @returns {Number} Pixel index.\n */\n\nWaveformView.prototype.timeToPixels = function (time) {\n  return Math.floor(time * this._data.sample_rate / this._data.scale);\n};\n\n/**\n * Returns the time for a given pixel index, for the current zoom level.\n *\n * @param {Number} pixels Pixel index.\n * @returns {Number} Time, in seconds.\n */\n\nWaveformView.prototype.pixelsToTime = function (pixels) {\n  return pixels * this._data.scale / this._data.sample_rate;\n};\n\n/**\n * Returns the time for a given pixel offset (relative to the\n * current scroll position), for the current zoom level.\n *\n * @param {Number} offset Offset from left-visible-edge of view\n * @returns {Number} Time, in seconds.\n */\n\nWaveformView.prototype.pixelOffsetToTime = function (offset) {\n  var pixels = this._frameOffset + offset;\n  return pixels * this._data.scale / this._data.sample_rate;\n};\nWaveformView.prototype.timeToPixelOffset = function (time) {\n  return Math.floor(time * this._data.sample_rate / this._data.scale) - this._frameOffset;\n};\n\n/**\n * @returns {Number} The start position of the waveform shown in the view,\n *   in pixels.\n */\n\nWaveformView.prototype.getFrameOffset = function () {\n  return this._frameOffset;\n};\n\n/**\n * @returns {Number} The width of the view, in pixels.\n */\n\nWaveformView.prototype.getWidth = function () {\n  return this._width;\n};\n\n/**\n * @returns {Number} The height of the view, in pixels.\n */\n\nWaveformView.prototype.getHeight = function () {\n  return this._height;\n};\n\n/**\n * @returns {Number} The time at the left edge of the waveform view.\n */\n\nWaveformView.prototype.getStartTime = function () {\n  return this.pixelOffsetToTime(0);\n};\n\n/**\n * @returns {Number} The time at the right edge of the waveform view.\n */\n\nWaveformView.prototype.getEndTime = function () {\n  return this.pixelOffsetToTime(this._width);\n};\n\n/**\n * @returns {Number} The media duration, in seconds.\n */\n\nWaveformView.prototype._getDuration = function () {\n  return this._peaks.player.getDuration();\n};\nWaveformView.prototype._createWaveform = function () {\n  this._waveformLayer = new Konva.Layer({\n    listening: false\n  });\n  this._createWaveformShapes();\n  this._stage.add(this._waveformLayer);\n};\nWaveformView.prototype._createWaveformShapes = function () {\n  if (!this._waveformShape) {\n    this._waveformShape = new WaveformShape({\n      color: this._waveformColor,\n      view: this\n    });\n    this._waveformShape.addToLayer(this._waveformLayer);\n  }\n  if (this._playedWaveformColor && !this._playedWaveformShape) {\n    var time = this._peaks.player.getCurrentTime();\n    this._playedSegment = {\n      startTime: 0,\n      endTime: time\n    };\n    this._unplayedSegment = {\n      startTime: time,\n      endTime: this._getDuration()\n    };\n    this._waveformShape.setSegment(this._unplayedSegment);\n    this._playedWaveformShape = new WaveformShape({\n      color: this._playedWaveformColor,\n      view: this,\n      segment: this._playedSegment\n    });\n    this._playedWaveformShape.addToLayer(this._waveformLayer);\n  }\n};\nWaveformView.prototype.setWaveformColor = function (color) {\n  this._waveformColor = color;\n  this._waveformShape.setWaveformColor(color);\n};\nWaveformView.prototype.setPlayedWaveformColor = function (color) {\n  this._playedWaveformColor = color;\n  if (color) {\n    if (!this._playedWaveformShape) {\n      this._createWaveformShapes();\n    }\n    this._playedWaveformShape.setWaveformColor(color);\n  } else {\n    if (this._playedWaveformShape) {\n      this._destroyPlayedWaveformShape();\n    }\n  }\n};\nWaveformView.prototype._destroyPlayedWaveformShape = function () {\n  this._waveformShape.setSegment(null);\n  this._playedWaveformShape.destroy();\n  this._playedWaveformShape = null;\n  this._playedSegment = null;\n  this._unplayedSegment = null;\n};\nWaveformView.prototype._createAxisLabels = function () {\n  this._axisLayer = new Konva.Layer({\n    listening: false\n  });\n  this._axis = new WaveformAxis(this, this._viewOptions);\n  this._axis.addToLayer(this._axisLayer);\n  this._stage.add(this._axisLayer);\n};\nWaveformView.prototype.showAxisLabels = function (show, options) {\n  this._axis.showAxisLabels(show, options);\n  this._axisLayer.draw();\n};\nWaveformView.prototype.setAxisLabelColor = function (color) {\n  this._axis.setAxisLabelColor(color);\n  this._axisLayer.draw();\n};\nWaveformView.prototype.setAxisGridlineColor = function (color) {\n  this._axis.setAxisGridlineColor(color);\n  this._axisLayer.draw();\n};\nWaveformView.prototype.showPlayheadTime = function (show) {\n  this._playheadLayer.showPlayheadTime(show);\n};\nWaveformView.prototype.setTimeLabelPrecision = function (precision) {\n  this._timeLabelPrecision = precision;\n  this._playheadLayer.updatePlayheadText();\n};\nWaveformView.prototype.formatTime = function (time) {\n  return this._formatPlayheadTime(time);\n};\n\n/**\n * Adjusts the amplitude scale of waveform shown in the view, which allows\n * users to zoom the waveform vertically.\n *\n * @param {Number} scale The new amplitude scale factor\n */\n\nWaveformView.prototype.setAmplitudeScale = function (scale) {\n  if (!isNumber(scale) || !isFinite(scale)) {\n    throw new Error('view.setAmplitudeScale(): Scale must be a valid number');\n  }\n  this._amplitudeScale = scale;\n  this.drawWaveformLayer();\n  if (this._segmentsLayer) {\n    this._segmentsLayer.draw();\n  }\n};\nWaveformView.prototype.getAmplitudeScale = function () {\n  return this._amplitudeScale;\n};\nWaveformView.prototype.enableSeek = function (enable) {\n  this._enableSeek = enable;\n};\nWaveformView.prototype.isSeekEnabled = function () {\n  return this._enableSeek;\n};\nWaveformView.prototype._onClick = function (event) {\n  this._clickHandler(event, 'click');\n};\nWaveformView.prototype._onDblClick = function (event) {\n  this._clickHandler(event, 'dblclick');\n};\nWaveformView.prototype._onContextMenu = function (event) {\n  this._clickHandler(event, 'contextmenu');\n};\nWaveformView.prototype._clickHandler = function (event, eventName) {\n  var offsetX = event.evt.offsetX;\n  if (offsetX < 0) {\n    offsetX = 0;\n  }\n  var emitViewEvent = true;\n  if (event.target !== this._stage) {\n    var marker = getMarkerObject(event.target);\n    if (marker) {\n      if (marker.attrs.name === 'point-marker') {\n        var point = marker.getAttr('point');\n        if (point) {\n          this._peaks.emit('points.' + eventName, {\n            point: point,\n            evt: event.evt,\n            preventViewEvent: function preventViewEvent() {\n              emitViewEvent = false;\n            }\n          });\n        }\n      } else if (marker.attrs.name === 'segment-overlay') {\n        var segment = marker.getAttr('segment');\n        if (segment) {\n          var clickEvent = {\n            segment: segment,\n            evt: event.evt,\n            preventViewEvent: function preventViewEvent() {\n              emitViewEvent = false;\n            }\n          };\n          if (this._segmentsLayer) {\n            this._segmentsLayer.segmentClicked(eventName, clickEvent);\n          }\n        }\n      }\n    }\n  }\n  if (emitViewEvent) {\n    var time = this.pixelOffsetToTime(offsetX);\n    var viewName = this.getName();\n    this._peaks.emit(viewName + '.' + eventName, {\n      time: time,\n      evt: event.evt\n    });\n  }\n};\nWaveformView.prototype.updatePlayheadTime = function (time) {\n  this._playheadLayer.updatePlayheadTime(time);\n};\nWaveformView.prototype.playheadPosChanged = function (time) {\n  if (this._playedWaveformShape) {\n    this._playedSegment.endTime = time;\n    this._unplayedSegment.startTime = time;\n    this.drawWaveformLayer();\n  }\n};\nWaveformView.prototype.drawWaveformLayer = function () {\n  this._waveformLayer.draw();\n};\nWaveformView.prototype.enableMarkerEditing = function (enable) {\n  if (this._segmentsLayer) {\n    this._segmentsLayer.enableEditing(enable);\n  }\n  if (this._pointsLayer) {\n    this._pointsLayer.enableEditing(enable);\n  }\n};\n\n/**\n * Called when the user starts or stops dragging the playhead.\n * We use this to disable interaction with the points and segments layers,\n * e.g., so that when the user drags the playhead over a marker, the timestamp\n * labels don't appear.\n */\n\nWaveformView.prototype.dragSeek = function (dragging) {\n  if (this._segmentsLayer) {\n    this._segmentsLayer.setListening(!dragging);\n  }\n  if (this._pointsLayer) {\n    this._pointsLayer.setListening(!dragging);\n  }\n};\nWaveformView.prototype.fitToContainer = function () {\n  if (this._container.clientWidth === 0 && this._container.clientHeight === 0) {\n    return;\n  }\n  var updateWaveform = false;\n  if (this._container.clientWidth !== this._width) {\n    this._width = this._container.clientWidth;\n    this._stage.setWidth(this._width);\n    updateWaveform = this.containerWidthChange();\n  }\n  var heightChanged = false;\n  if (this._container.clientHeight !== this._height) {\n    this._height = this._container.clientHeight;\n    this._stage.setHeight(this._height);\n    this._waveformShape.fitToView();\n    this._playheadLayer.fitToView();\n    this.containerHeightChange();\n    heightChanged = true;\n  }\n  if (updateWaveform) {\n    this.updateWaveform(this._frameOffset, true);\n  } else if (heightChanged) {\n    if (this._segmentsLayer) {\n      this._segmentsLayer.fitToView();\n    }\n    if (this._pointsLayer) {\n      this._pointsLayer.fitToView();\n    }\n  }\n};\nWaveformView.prototype.destroy = function () {\n  this._playheadLayer.destroy();\n  if (this._segmentsLayer) {\n    this._segmentsLayer.destroy();\n  }\n  if (this._pointsLayer) {\n    this._pointsLayer.destroy();\n  }\n  if (this._stage) {\n    this._stage.destroy();\n    this._stage = null;\n  }\n};\n\n/**\n * @file\n *\n * Defines the {@link MouseDragHandler} class.\n *\n * @module mouse-drag-handler\n */\n\n\n/**\n * An object to receive callbacks on mouse drag events. Each function is\n * called with the current mouse X position, relative to the stage's\n * container HTML element.\n *\n * @typedef {Object} MouseDragHandlers\n * @global\n * @property {Function} onMouseDown Mouse down event handler.\n * @property {Function} onMouseMove Mouse move event handler.\n * @property {Function} onMouseUp Mouse up event handler.\n */\n\n/**\n * Creates a handler for mouse events to allow interaction with the waveform\n * views by clicking and dragging the mouse.\n *\n * @class\n * @alias MouseDragHandler\n *\n * @param {Konva.Stage} stage\n * @param {MouseDragHandlers} handlers\n */\n\nfunction MouseDragHandler(stage, handlers) {\n  this._stage = stage;\n  this._handlers = handlers;\n  this._dragging = false;\n  this._mouseDown = this._mouseDown.bind(this);\n  this._mouseUp = this._mouseUp.bind(this);\n  this._mouseMove = this._mouseMove.bind(this);\n  this._stage.on('mousedown', this._mouseDown);\n  this._stage.on('touchstart', this._mouseDown);\n  this._lastMouseClientX = null;\n}\n\n/**\n * Mouse down event handler.\n *\n * @param {MouseEvent} event\n */\n\nMouseDragHandler.prototype._mouseDown = function (event) {\n  var segment = null;\n  if (event.type === 'mousedown' && event.evt.button !== 0) {\n    // Mouse drag only applies to the primary mouse button.\n    // The secondary button may be used to show a context menu\n    // and we don't want to also treat this as a mouse drag operation.\n    return;\n  }\n  var marker = getMarkerObject(event.target);\n  if (marker) {\n    // Avoid interfering with drag/drop of point and segment markers.\n    if (marker.attrs.name === 'point-marker' || marker.attrs.name === 'segment-marker') {\n      return;\n    }\n\n    // Check if we're dragging a segment.\n    if (marker.attrs.name === 'segment-overlay') {\n      segment = marker;\n    }\n  }\n  this._lastMouseClientX = Math.floor(event.type === 'touchstart' ? event.evt.touches[0].clientX : event.evt.clientX);\n  if (this._handlers.onMouseDown) {\n    var mouseDownPosX = this._getMousePosX(this._lastMouseClientX);\n    this._handlers.onMouseDown(mouseDownPosX, segment);\n  }\n\n  // Use the window mousemove and mouseup handlers instead of the\n  // Konva.Stage ones so that we still receive events if the user moves the\n  // mouse outside the stage.\n  window.addEventListener('mousemove', this._mouseMove, {\n    capture: false,\n    passive: true\n  });\n  window.addEventListener('touchmove', this._mouseMove, {\n    capture: false,\n    passive: true\n  });\n  window.addEventListener('mouseup', this._mouseUp, {\n    capture: false,\n    passive: true\n  });\n  window.addEventListener('touchend', this._mouseUp, {\n    capture: false /* , passive: true */\n  });\n  window.addEventListener('blur', this._mouseUp, {\n    capture: false,\n    passive: true\n  });\n};\n\n/**\n * Mouse move event handler.\n *\n * @param {MouseEvent} event\n */\n\nMouseDragHandler.prototype._mouseMove = function (event) {\n  var clientX = Math.floor(event.type === 'touchmove' ? event.changedTouches[0].clientX : event.clientX);\n\n  // Don't update on vertical mouse movement.\n  if (clientX === this._lastMouseClientX) {\n    return;\n  }\n  this._lastMouseClientX = clientX;\n  this._dragging = true;\n  if (this._handlers.onMouseMove) {\n    var mousePosX = this._getMousePosX(clientX);\n    this._handlers.onMouseMove(mousePosX);\n  }\n};\n\n/**\n * Mouse up event handler.\n *\n * @param {MouseEvent} event\n */\n\nMouseDragHandler.prototype._mouseUp = function (event) {\n  var clientX;\n  if (event.type === 'touchend') {\n    clientX = Math.floor(event.changedTouches[0].clientX);\n    if (event.cancelable) {\n      event.preventDefault();\n    }\n  } else {\n    clientX = Math.floor(event.clientX);\n  }\n  if (this._handlers.onMouseUp) {\n    var mousePosX = this._getMousePosX(clientX);\n    this._handlers.onMouseUp(mousePosX);\n  }\n  window.removeEventListener('mousemove', this._mouseMove, {\n    capture: false\n  });\n  window.removeEventListener('touchmove', this._mouseMove, {\n    capture: false\n  });\n  window.removeEventListener('mouseup', this._mouseUp, {\n    capture: false\n  });\n  window.removeEventListener('touchend', this._mouseUp, {\n    capture: false\n  });\n  window.removeEventListener('blur', this._mouseUp, {\n    capture: false\n  });\n  this._dragging = false;\n};\n\n/**\n * @returns {Number} The mouse X position, relative to the container that\n * received the mouse down event.\n *\n * @private\n * @param {Number} clientX Mouse client X position.\n */\n\nMouseDragHandler.prototype._getMousePosX = function (clientX) {\n  var containerPos = this._stage.getContainer().getBoundingClientRect();\n  return Math.floor(clientX - containerPos.left);\n};\n\n/**\n * Returns <code>true</code> if the mouse is being dragged, i.e., moved with\n * the mouse button held down.\n *\n * @returns {Boolean}\n */\n\nMouseDragHandler.prototype.isDragging = function () {\n  return this._dragging;\n};\nMouseDragHandler.prototype.destroy = function () {\n  this._stage.off('mousedown', this._mouseDown);\n  this._stage.off('touchstart', this._mouseDown);\n};\n\n/**\n * @file\n *\n * Defines the {@link SeekMouseDragHandler} class.\n *\n * @module seek-mouse-drag-handler\n */\n\n\n/**\n * Creates a handler for mouse events to allow seeking the waveform\n * views by clicking and dragging the mouse.\n *\n * @class\n * @alias SeekMouseDragHandler\n *\n * @param {Peaks} peaks\n * @param {WaveformOverview} view\n */\n\nfunction SeekMouseDragHandler(peaks, view) {\n  this._peaks = peaks;\n  this._view = view;\n  this._firstMove = false;\n  this._onMouseDown = this._onMouseDown.bind(this);\n  this._onMouseMove = this._onMouseMove.bind(this);\n  this._onMouseUp = this._onMouseUp.bind(this);\n  this._mouseDragHandler = new MouseDragHandler(view._stage, {\n    onMouseDown: this._onMouseDown,\n    onMouseMove: this._onMouseMove,\n    onMouseUp: this._onMouseUp\n  });\n}\nSeekMouseDragHandler.prototype._onMouseDown = function (mousePosX) {\n  this._firstMove = true;\n  this._seek(mousePosX);\n};\nSeekMouseDragHandler.prototype._onMouseMove = function (mousePosX) {\n  if (this._firstMove) {\n    this._view.dragSeek(true);\n    this._firstMove = false;\n  }\n  this._seek(mousePosX);\n};\nSeekMouseDragHandler.prototype._onMouseUp = function () {\n  this._view.dragSeek(false);\n};\nSeekMouseDragHandler.prototype._seek = function (mousePosX) {\n  if (!this._view.isSeekEnabled()) {\n    return;\n  }\n  mousePosX = clamp(mousePosX, 0, this._width);\n  var time = this._view.pixelsToTime(mousePosX);\n  var duration = this._peaks.player.getDuration();\n\n  // Prevent the playhead position from jumping by limiting click\n  // handling to the waveform duration.\n  if (time > duration) {\n    time = duration;\n  }\n\n  // Update the playhead position. This gives a smoother visual update\n  // than if we only use the player.timeupdate event.\n  this._view.updatePlayheadTime(time);\n  this._peaks.player.seek(time);\n};\nSeekMouseDragHandler.prototype.destroy = function () {\n  this._mouseDragHandler.destroy();\n};\n\n/**\n * @file\n *\n * Defines the {@link WaveformOverview} class.\n *\n * @module waveform-overview\n */\n\n\n/**\n * Creates the overview waveform view.\n *\n * @class\n * @alias WaveformOverview\n *\n * @param {WaveformData} waveformData\n * @param {HTMLElement} container\n * @param {Peaks} peaks\n */\n\nfunction WaveformOverview(waveformData, container, peaks) {\n  var self = this;\n  WaveformView.call(self, waveformData, container, peaks, peaks.options.overview);\n\n  // Bind event handlers\n  self._onTimeUpdate = self._onTimeUpdate.bind(self);\n  self._onPlaying = self._onPlaying.bind(self);\n  self._onPause = self._onPause.bind(self);\n  self._onZoomviewUpdate = self._onZoomviewUpdate.bind(self);\n\n  // Register event handlers\n  peaks.on('player.timeupdate', self._onTimeUpdate);\n  peaks.on('player.playing', self._onPlaying);\n  peaks.on('player.pause', self._onPause);\n  peaks.on('zoomview.update', self._onZoomviewUpdate);\n  var time = self._peaks.player.getCurrentTime();\n  self._playheadLayer.updatePlayheadTime(time);\n  self._mouseDragHandler = new SeekMouseDragHandler(peaks, self);\n  var zoomview = peaks.views.getView('zoomview');\n  if (zoomview) {\n    self._highlightLayer.showHighlight(zoomview.getStartTime(), zoomview.getEndTime());\n  }\n}\nWaveformOverview.prototype = Object.create(WaveformView.prototype);\nWaveformOverview.prototype.initWaveformData = function () {\n  if (this._width !== 0) {\n    this._resampleAndSetWaveformData(this._originalWaveformData, this._width);\n  }\n};\nWaveformOverview.prototype.initHighlightLayer = function () {\n  this._highlightLayer = new HighlightLayer(this, this._viewOptions);\n  this._highlightLayer.addToStage(this._stage);\n};\nWaveformOverview.prototype.isSegmentDraggingEnabled = function () {\n  return false;\n};\nWaveformOverview.prototype.getName = function () {\n  return 'overview';\n};\nWaveformOverview.prototype._onTimeUpdate = function (time) {\n  this._playheadLayer.updatePlayheadTime(time);\n};\nWaveformOverview.prototype._onPlaying = function (time) {\n  this._playheadLayer.updatePlayheadTime(time);\n};\nWaveformOverview.prototype._onPause = function (time) {\n  this._playheadLayer.stop(time);\n};\nWaveformOverview.prototype._onZoomviewUpdate = function (event) {\n  this.showHighlight(event.startTime, event.endTime);\n};\nWaveformOverview.prototype.showHighlight = function (startTime, endTime) {\n  this._highlightLayer.showHighlight(startTime, endTime);\n};\nWaveformOverview.prototype.setWaveformData = function (waveformData) {\n  this._originalWaveformData = waveformData;\n  if (this._width !== 0) {\n    this._resampleAndSetWaveformData(waveformData, this._width);\n  } else {\n    this._data = waveformData;\n  }\n  this.updateWaveform();\n};\nWaveformOverview.prototype._resampleAndSetWaveformData = function (waveformData, width) {\n  try {\n    this._data = waveformData.resample({\n      width: width\n    });\n    return true;\n  } catch (error) {\n    // eslint-disable-line no-unused-vars\n    // This error usually indicates that the waveform length\n    // is less than the container width. Ignore, and use the\n    // given waveform data\n    this._data = waveformData;\n    return false;\n  }\n};\nWaveformOverview.prototype.removeHighlightRect = function () {\n  this._highlightLayer.removeHighlight();\n};\nWaveformOverview.prototype.updateWaveform = function /* frameOffset, forceUpdate */\n() {\n  this._waveformLayer.draw();\n  this._axisLayer.draw();\n  var playheadTime = this._peaks.player.getCurrentTime();\n  this._playheadLayer.updatePlayheadTime(playheadTime);\n  this._highlightLayer.updateHighlight();\n  var frameStartTime = 0;\n  var frameEndTime = this.pixelsToTime(this._width);\n  if (this._pointsLayer) {\n    this._pointsLayer.updatePoints(frameStartTime, frameEndTime);\n  }\n  if (this._segmentsLayer) {\n    this._segmentsLayer.updateSegments(frameStartTime, frameEndTime);\n  }\n};\nWaveformOverview.prototype.containerWidthChange = function () {\n  return this._resampleAndSetWaveformData(this._originalWaveformData, this._width);\n};\nWaveformOverview.prototype.containerHeightChange = function () {\n  this._highlightLayer.fitToView();\n};\nWaveformOverview.prototype.destroy = function () {\n  // Unregister event handlers\n  this._peaks.off('player.playing', this._onPlaying);\n  this._peaks.off('player.pause', this._onPause);\n  this._peaks.off('player.timeupdate', this._onTimeUpdate);\n  this._peaks.off('zoomview.update', this._onZoomviewUpdate);\n  this._mouseDragHandler.destroy();\n  WaveformView.prototype.destroy.call(this);\n};\n\nfunction SpectrogramImage(opacity, view) {\n  var self = this;\n  self._view = view;\n  self._opacity = opacity;\n  self.setImage();\n}\nSpectrogramImage.prototype.setImage = function () {\n  var _this = this;\n  this._data = this._view.getSpectrogramData();\n  if (!this._data) {\n    return;\n  }\n  this._image = new Konva.Image();\n  this._view._spectrogramLayer.add(this._image);\n  var img = new window.Image();\n  img.onload = function () {\n    var width = _this._view.getWidth();\n    var height = _this._view.getHeight();\n    _this._image.setAttrs({\n      image: img,\n      width: width,\n      height: height,\n      crop: _this._data.crop,\n      opacity: 0,\n      draggable: false\n    });\n    _this.update(0);\n    _this._image.to({\n      opacity: _this._opacity\n    });\n  };\n  img.src = this._data.image;\n};\nSpectrogramImage.prototype.update = function (frameOffset) {\n  if (this._view.getName() !== 'spectrogramZoomview') {\n    return;\n  }\n  var totalDuration = this._view._peaks.player.getDuration();\n  var duration = Math.min(totalDuration, Math.abs(this._view.getEndTime() - this._view.getStartTime()));\n  var totalWidth = this._data.crop.width;\n  var width = totalWidth / totalDuration * duration;\n  var timeOffset = this._view.pixelsToTime(frameOffset);\n  var offset = totalWidth / totalDuration * timeOffset;\n  var x = this._data.crop.x + offset;\n  this._image.crop({\n    x: x,\n    y: this._data.crop.y,\n    width: width,\n    height: this._data.crop.height\n  });\n};\nSpectrogramImage.prototype.fitToView = function () {};\nSpectrogramImage.prototype.setOpacity = function (opacity) {\n  this._opacity = opacity;\n  this._image.to({\n    opacity: opacity\n  });\n};\nSpectrogramImage.prototype.destroy = function () {\n  this._image.destroy();\n  this._image = null;\n};\nSpectrogramImage.prototype.on = function (event, handler) {\n  this._image.on(event, handler);\n};\nSpectrogramImage.prototype.off = function (event, handler) {\n  this._image.off(event, handler);\n};\n\n/**\n * @file\n *\n * Defines the {@link SpectrogramView} class.\n *\n * @module waveform-view\n */\n\nfunction SpectrogramView(waveformData, spectrogramData, container, peaks, viewOptions) {\n  var self = this;\n  self._container = container;\n  self._peaks = peaks;\n  self._options = peaks.options;\n  self._viewOptions = viewOptions;\n  self._originalWaveformData = waveformData;\n  self._data = waveformData;\n  self._spectrogramData = spectrogramData;\n\n  // The pixel offset of the current frame being displayed\n  self._frameOffset = 0;\n  self._width = container.clientWidth;\n  self._height = container.clientHeight;\n  self._amplitudeScale = 1.0;\n  self._waveformColor = self._viewOptions.waveformColor;\n  self._playedWaveformColor = self._viewOptions.playedWaveformColor;\n  self._spectrogramOpacity = self._viewOptions.spectrogramOpacity;\n  self._timeLabelPrecision = self._viewOptions.timeLabelPrecision;\n  if (self._viewOptions.formatPlayheadTime) {\n    self._formatPlayheadTime = self._viewOptions.formatPlayheadTime;\n  } else {\n    self._formatPlayheadTime = function (time) {\n      return formatTime(time, self._timeLabelPrecision);\n    };\n  }\n  self._enableSeek = true;\n  self.initWaveformData();\n\n  // Disable warning: The stage has 6 layers.\n  // Recommended maximum number of layers is 3-5.\n  Konva.showWarnings = false;\n  self._stage = new Konva.Stage({\n    container: container,\n    width: self._width,\n    height: self._height\n  });\n  if (self._viewOptions.showSpectrogram) {\n    self._createSpectrogram();\n  }\n  self._createWaveform();\n  if (self._viewOptions.enableSegments) {\n    self._segmentsLayer = new SegmentsLayer(peaks, self, self._viewOptions.enableEditing);\n    self._segmentsLayer.addToStage(self._stage);\n  }\n  if (self._viewOptions.enablePoints) {\n    self._pointsLayer = new PointsLayer(peaks, self, self._viewOptions.enableEditing);\n    self._pointsLayer.addToStage(self._stage);\n  }\n  self.initHighlightLayer();\n  self._createAxisLabels();\n  self._playheadLayer = new PlayheadLayer(self._peaks.player, self, self._viewOptions);\n  self._playheadLayer.addToStage(self._stage);\n  self._onClick = self._onClick.bind(self);\n  self._onDblClick = self._onDblClick.bind(self);\n  self._onContextMenu = self._onContextMenu.bind(self);\n  self._stage.on('click', self._onClick);\n  self._stage.on('dblclick', self._onDblClick);\n  self._stage.on('contextmenu', self._onContextMenu);\n}\nSpectrogramView.prototype.getViewOptions = function () {\n  return this._viewOptions;\n};\n\n/**\n * @returns {WaveformData} The view's waveform data.\n */\n\nSpectrogramView.prototype.getWaveformData = function () {\n  return this._data;\n};\nSpectrogramView.prototype.setWaveformData = function (waveformData) {\n  this._data = waveformData;\n};\nSpectrogramView.prototype.getSpectrogramData = function () {\n  return this._spectrogramData;\n};\nSpectrogramView.prototype.setSpectrogramData = function (spectrogramData) {\n  this._spectrogramData = spectrogramData;\n  this._spectrogramImage.destroy();\n  this._spectrogramImage.setImage();\n};\n\n/**\n * Returns the pixel index for a given time, for the current zoom level.\n *\n * @param {Number} time Time, in seconds.\n * @returns {Number} Pixel index.\n */\n\nSpectrogramView.prototype.timeToPixels = function (time) {\n  return Math.floor(time * this._data.sample_rate / this._data.scale);\n};\n\n/**\n * Returns the time for a given pixel index, for the current zoom level.\n *\n * @param {Number} pixels Pixel index.\n * @returns {Number} Time, in seconds.\n */\n\nSpectrogramView.prototype.pixelsToTime = function (pixels) {\n  return pixels * this._data.scale / this._data.sample_rate;\n};\n\n/**\n * Returns the time for a given pixel offset (relative to the\n * current scroll position), for the current zoom level.\n *\n * @param {Number} offset Offset from left-visible-edge of view\n * @returns {Number} Time, in seconds.\n */\n\nSpectrogramView.prototype.pixelOffsetToTime = function (offset) {\n  var pixels = this._frameOffset + offset;\n  return pixels * this._data.scale / this._data.sample_rate;\n};\nSpectrogramView.prototype.timeToPixelOffset = function (time) {\n  return Math.floor(time * this._data.sample_rate / this._data.scale) - this._frameOffset;\n};\n\n/**\n * @returns {Number} The start position of the waveform shown in the view,\n *   in pixels.\n */\n\nSpectrogramView.prototype.getFrameOffset = function () {\n  return this._frameOffset;\n};\n\n/**\n * @returns {Number} The width of the view, in pixels.\n */\n\nSpectrogramView.prototype.getWidth = function () {\n  return this._width;\n};\n\n/**\n * @returns {Number} The height of the view, in pixels.\n */\n\nSpectrogramView.prototype.getHeight = function () {\n  return this._height;\n};\n\n/**\n * @returns {Number} The time at the left edge of the waveform view.\n */\n\nSpectrogramView.prototype.getStartTime = function () {\n  return this.pixelOffsetToTime(0);\n};\n\n/**\n * @returns {Number} The time at the right edge of the waveform view.\n */\n\nSpectrogramView.prototype.getEndTime = function () {\n  return this.pixelOffsetToTime(this._width);\n};\n\n/**\n * @returns {Number} The media duration, in seconds.\n */\n\nSpectrogramView.prototype._getDuration = function () {\n  return this._peaks.player.getDuration();\n};\nSpectrogramView.prototype._createWaveform = function () {\n  this._waveformLayer = new Konva.Layer({\n    listening: false\n  });\n  this._createWaveformShapes();\n  if (this._viewOptions.showWaveform) {\n    this._stage.add(this._waveformLayer);\n  }\n};\nSpectrogramView.prototype._createSpectrogram = function () {\n  this._spectrogramLayer = new Konva.Layer({\n    listening: false\n  });\n  if (!this._spectrogramImage) {\n    this._spectrogramImage = new SpectrogramImage(this._spectrogramOpacity, this);\n  }\n  this._stage.add(this._spectrogramLayer);\n};\nSpectrogramView.prototype._createWaveformShapes = function () {\n  if (!this._waveformShape) {\n    this._waveformShape = new WaveformShape({\n      color: this._waveformColor,\n      view: this\n    });\n    this._waveformShape.addToLayer(this._waveformLayer);\n  }\n  if (this._playedWaveformColor && !this._playedWaveformShape) {\n    var time = this._peaks.player.getCurrentTime();\n    this._playedSegment = {\n      startTime: 0,\n      endTime: time\n    };\n    this._unplayedSegment = {\n      startTime: time,\n      endTime: this._getDuration()\n    };\n    this._waveformShape.setSegment(this._unplayedSegment);\n    this._playedWaveformShape = new WaveformShape({\n      color: this._playedWaveformColor,\n      view: this,\n      segment: this._playedSegment\n    });\n    this._playedWaveformShape.addToLayer(this._waveformLayer);\n  }\n};\nSpectrogramView.prototype.setWaveformOpacity = function (opacity) {\n  this._waveformShape._shape.to({\n    opacity: opacity\n  });\n};\nSpectrogramView.prototype.setWaveformColor = function (color) {\n  this._waveformColor = color;\n  this._waveformShape.setWaveformColor(color);\n};\nSpectrogramView.prototype.setPlayedWaveformColor = function (color) {\n  this._playedWaveformColor = color;\n  if (color) {\n    if (!this._playedWaveformShape) {\n      this._createWaveformShapes();\n    }\n    this._playedWaveformShape.setWaveformColor(color);\n  } else {\n    if (this._playedWaveformShape) {\n      this._destroyPlayedWaveformShape();\n    }\n  }\n};\nSpectrogramView.prototype._destroyPlayedWaveformShape = function () {\n  this._waveformShape.setSegment(null);\n  this._playedWaveformShape.destroy();\n  this._playedWaveformShape = null;\n  this._playedSegment = null;\n  this._unplayedSegment = null;\n};\nSpectrogramView.prototype._createAxisLabels = function () {\n  this._axisLayer = new Konva.Layer({\n    listening: false\n  });\n  this._axis = new WaveformAxis(this, this._viewOptions);\n  this._axis.addToLayer(this._axisLayer);\n  this._stage.add(this._axisLayer);\n};\nSpectrogramView.prototype.showAxisLabels = function (show, options) {\n  this._axis.showAxisLabels(show, options);\n  this._axisLayer.draw();\n};\nSpectrogramView.prototype.setAxisLabelColor = function (color) {\n  this._axis.setAxisLabelColor(color);\n  this._axisLayer.draw();\n};\nSpectrogramView.prototype.setAxisGridlineColor = function (color) {\n  this._axis.setAxisGridlineColor(color);\n  this._axisLayer.draw();\n};\nSpectrogramView.prototype.showPlayheadTime = function (show) {\n  this._playheadLayer.showPlayheadTime(show);\n};\nSpectrogramView.prototype.setTimeLabelPrecision = function (precision) {\n  this._timeLabelPrecision = precision;\n  this._playheadLayer.updatePlayheadText();\n};\nSpectrogramView.prototype.formatTime = function (time) {\n  return this._formatPlayheadTime(time);\n};\n\n/**\n * Adjusts the opacity of the spectrogram shown in the view.\n *\n * @param {Number} opacity The new opacity factor\n */\n\nSpectrogramView.prototype.setOpacity = function (opacity) {\n  if (!isNumber(opacity) || !isFinite(opacity)) {\n    throw new Error('view.setOpacity(): Opacity must be a valid number');\n  }\n  this._spectrogramOpacity = opacity;\n  if (this._spectrogramImage) {\n    this._spectrogramImage.setOpacity(this._spectrogramOpacity);\n  }\n};\n\n/**\n * Adjusts the amplitude scale of waveform shown in the view, which allows\n * users to zoom the waveform vertically.\n *\n * @param {Number} scale The new amplitude scale factor\n */\n\nSpectrogramView.prototype.setAmplitudeScale = function (scale) {\n  if (!isNumber(scale) || !isFinite(scale)) {\n    throw new Error('view.setAmplitudeScale(): Scale must be a valid number');\n  }\n  this._amplitudeScale = scale;\n  this.drawWaveformLayer();\n  if (this._segmentsLayer) {\n    this._segmentsLayer.draw();\n  }\n};\nSpectrogramView.prototype.getAmplitudeScale = function () {\n  return this._amplitudeScale;\n};\nSpectrogramView.prototype.enableSeek = function (enable) {\n  this._enableSeek = enable;\n};\nSpectrogramView.prototype.isSeekEnabled = function () {\n  return this._enableSeek;\n};\nSpectrogramView.prototype._onClick = function (event) {\n  this._clickHandler(event, 'click');\n};\nSpectrogramView.prototype._onDblClick = function (event) {\n  this._clickHandler(event, 'dblclick');\n};\nSpectrogramView.prototype._onContextMenu = function (event) {\n  this._clickHandler(event, 'contextmenu');\n};\nSpectrogramView.prototype._clickHandler = function (event, eventName) {\n  var offsetX = event.evt.offsetX;\n  if (offsetX < 0) {\n    offsetX = 0;\n  }\n  var emitViewEvent = true;\n  if (event.target !== this._stage) {\n    var marker = getMarkerObject(event.target);\n    if (marker) {\n      if (marker.attrs.name === 'point-marker') {\n        var point = marker.getAttr('point');\n        if (point) {\n          this._peaks.emit('points.' + eventName, {\n            point: point,\n            evt: event.evt,\n            preventViewEvent: function preventViewEvent() {\n              emitViewEvent = false;\n            }\n          });\n        }\n      } else if (marker.attrs.name === 'segment-overlay') {\n        var segment = marker.getAttr('segment');\n        if (segment) {\n          var clickEvent = {\n            segment: segment,\n            evt: event.evt,\n            preventViewEvent: function preventViewEvent() {\n              emitViewEvent = false;\n            }\n          };\n          if (this._segmentsLayer) {\n            this._segmentsLayer.segmentClicked(eventName, clickEvent);\n          }\n        }\n      }\n    }\n  }\n  if (emitViewEvent) {\n    var time = this.pixelOffsetToTime(offsetX);\n    var viewName = this.getName();\n    this._peaks.emit(viewName + '.' + eventName, {\n      time: time,\n      evt: event.evt\n    });\n  }\n};\nSpectrogramView.prototype.updatePlayheadTime = function (time) {\n  this._playheadLayer.updatePlayheadTime(time);\n};\nSpectrogramView.prototype.playheadPosChanged = function (time) {\n  if (this._playedWaveformShape) {\n    this._playedSegment.endTime = time;\n    this._unplayedSegment.startTime = time;\n    this.drawWaveformLayer();\n  }\n};\nSpectrogramView.prototype.drawWaveformLayer = function () {\n  this._waveformLayer.draw();\n};\nSpectrogramView.prototype.enableMarkerEditing = function (enable) {\n  if (this._segmentsLayer) {\n    this._segmentsLayer.enableEditing(enable);\n  }\n  if (this._pointsLayer) {\n    this._pointsLayer.enableEditing(enable);\n  }\n};\n\n/**\n * Called when the user starts or stops dragging the playhead.\n * We use this to disable interaction with the points and segments layers,\n * e.g., so that when the user drags the playhead over a marker, the timestamp\n * labels don't appear.\n */\n\nSpectrogramView.prototype.dragSeek = function (dragging) {\n  if (this._segmentsLayer) {\n    this._segmentsLayer.setListening(!dragging);\n  }\n  if (this._pointsLayer) {\n    this._pointsLayer.setListening(!dragging);\n  }\n};\nSpectrogramView.prototype.fitToContainer = function () {\n  if (this._container.clientWidth === 0 && this._container.clientHeight === 0) {\n    return;\n  }\n  var updateWaveform = false;\n  if (this._container.clientWidth !== this._width) {\n    this._width = this._container.clientWidth;\n    this._stage.setWidth(this._width);\n    updateWaveform = this.containerWidthChange();\n  }\n  var heightChanged = false;\n  if (this._container.clientHeight !== this._height) {\n    this._height = this._container.clientHeight;\n    this._stage.setHeight(this._height);\n    this._waveformShape.fitToView();\n    this._playheadLayer.fitToView();\n    this.containerHeightChange();\n    heightChanged = true;\n  }\n  if (updateWaveform) {\n    this.updateWaveform(this._frameOffset, true);\n  } else if (heightChanged) {\n    if (this._segmentsLayer) {\n      this._segmentsLayer.fitToView();\n    }\n    if (this._pointsLayer) {\n      this._pointsLayer.fitToView();\n    }\n  }\n};\nSpectrogramView.prototype.destroy = function () {\n  this._playheadLayer.destroy();\n  if (this._segmentsLayer) {\n    this._segmentsLayer.destroy();\n  }\n  if (this._pointsLayer) {\n    this._pointsLayer.destroy();\n  }\n  if (this._stage) {\n    this._stage.destroy();\n    this._stage = null;\n  }\n};\n\n/**\n * @file\n *\n * Defines the {@link SpectrogramOverview} class.\n *\n * @module waveform-overview\n */\n\n\n/**\n * Creates the overview waveform view.\n *\n * @class\n * @alias SpectrogramOverview\n *\n * @param {WaveformData} waveformData\n * @param {HTMLElement} container\n * @param {Peaks} peaks\n */\n\nfunction SpectrogramOverview(waveformData, spectrogramData, container, peaks) {\n  var self = this;\n  SpectrogramView.call(self, waveformData, spectrogramData, container, peaks, peaks.options.spectrogramOverview);\n\n  // Bind event handlers\n  self._onTimeUpdate = self._onTimeUpdate.bind(self);\n  self._onPlaying = self._onPlaying.bind(self);\n  self._onPause = self._onPause.bind(self);\n  self._onZoomviewUpdate = self._onZoomviewUpdate.bind(self);\n\n  // Register event handlers\n  peaks.on('player.timeupdate', self._onTimeUpdate);\n  peaks.on('player.playing', self._onPlaying);\n  peaks.on('player.pause', self._onPause);\n  peaks.on('zoomview.update', self._onZoomviewUpdate);\n  var time = self._peaks.player.getCurrentTime();\n  self._playheadLayer.updatePlayheadTime(time);\n  self._mouseDragHandler = new SeekMouseDragHandler(peaks, self);\n  var zoomview = peaks.views.getView('spectrogramZoomview');\n  if (zoomview) {\n    self._highlightLayer.showHighlight(zoomview.getStartTime(), zoomview.getEndTime());\n  }\n}\nSpectrogramOverview.prototype = Object.create(SpectrogramView.prototype);\nSpectrogramOverview.prototype.initWaveformData = function () {\n  if (this._width !== 0) {\n    this._resampleAndSetWaveformData(this._originalWaveformData, this._width);\n  }\n};\nSpectrogramOverview.prototype.initHighlightLayer = function () {\n  this._highlightLayer = new HighlightLayer(this, this._viewOptions);\n  this._highlightLayer.addToStage(this._stage);\n};\nSpectrogramOverview.prototype.isSegmentDraggingEnabled = function () {\n  return false;\n};\nSpectrogramOverview.prototype.getName = function () {\n  return 'spectrogramOverview';\n};\nSpectrogramOverview.prototype._onTimeUpdate = function (time) {\n  this._playheadLayer.updatePlayheadTime(time);\n};\nSpectrogramOverview.prototype._onPlaying = function (time) {\n  this._playheadLayer.updatePlayheadTime(time);\n};\nSpectrogramOverview.prototype._onPause = function (time) {\n  this._playheadLayer.stop(time);\n};\nSpectrogramOverview.prototype._onZoomviewUpdate = function (event) {\n  this.showHighlight(event.startTime, event.endTime);\n};\nSpectrogramOverview.prototype.showHighlight = function (startTime, endTime) {\n  this._highlightLayer.showHighlight(startTime, endTime);\n};\nSpectrogramOverview.prototype.setWaveformData = function (waveformData) {\n  this._originalWaveformData = waveformData;\n  if (this._width !== 0) {\n    this._resampleAndSetWaveformData(waveformData, this._width);\n  } else {\n    this._data = waveformData;\n  }\n  this.updateWaveform();\n};\nSpectrogramOverview.prototype._resampleAndSetWaveformData = function (waveformData, width) {\n  try {\n    this._data = waveformData.resample({\n      width: width\n    });\n    return true;\n  } catch (error) {\n    // eslint-disable-line no-unused-vars\n    // This error usually indicates that the waveform length\n    // is less than the container width. Ignore, and use the\n    // given waveform data\n    this._data = waveformData;\n    return false;\n  }\n};\nSpectrogramOverview.prototype.removeHighlightRect = function () {\n  this._highlightLayer.removeHighlight();\n};\nSpectrogramOverview.prototype.updateWaveform = function /* frameOffset, forceUpdate */\n() {\n  this._waveformLayer.draw();\n  this._axisLayer.draw();\n  var playheadTime = this._peaks.player.getCurrentTime();\n  this._playheadLayer.updatePlayheadTime(playheadTime);\n  this._highlightLayer.updateHighlight();\n  var frameStartTime = 0;\n  var frameEndTime = this.pixelsToTime(this._width);\n  if (this._pointsLayer) {\n    this._pointsLayer.updatePoints(frameStartTime, frameEndTime);\n  }\n  if (this._segmentsLayer) {\n    this._segmentsLayer.updateSegments(frameStartTime, frameEndTime);\n  }\n};\nSpectrogramOverview.prototype.containerWidthChange = function () {\n  var result = this._resampleAndSetWaveformData(this._originalWaveformData, this._width);\n  this._spectrogramImage.update();\n  return result;\n};\nSpectrogramOverview.prototype.containerHeightChange = function () {\n  this._spectrogramImage.update();\n  this._highlightLayer.fitToView();\n};\nSpectrogramOverview.prototype.destroy = function () {\n  // Unregister event handlers\n  this._peaks.off('player.playing', this._onPlaying);\n  this._peaks.off('player.pause', this._onPause);\n  this._peaks.off('player.timeupdate', this._onTimeUpdate);\n  this._peaks.off('zoomview.update', this._onZoomviewUpdate);\n  this._mouseDragHandler.destroy();\n  SpectrogramView.prototype.destroy.call(this);\n};\n\n/**\n * @file\n *\n * Defines the {@link InsertSegmentMouseDragHandler} class.\n *\n * @module insert-segment-mouse-drag-handler\n */\n\n\n/**\n * Creates a handler for mouse events to allow inserting new waveform\n * segments by clicking and dragging the mouse.\n *\n * @class\n * @alias InsertSegmentMouseDragHandler\n *\n * @param {Peaks} peaks\n * @param {WaveformZoomView} view\n */\n\nfunction InsertSegmentMouseDragHandler(peaks, view) {\n  this._peaks = peaks;\n  this._view = view;\n  this._onMouseDown = this._onMouseDown.bind(this);\n  this._onMouseMove = this._onMouseMove.bind(this);\n  this._onMouseUp = this._onMouseUp.bind(this);\n  this._mouseDragHandler = new MouseDragHandler(view._stage, {\n    onMouseDown: this._onMouseDown,\n    onMouseMove: this._onMouseMove,\n    onMouseUp: this._onMouseUp\n  });\n}\nInsertSegmentMouseDragHandler.prototype.isDragging = function () {\n  return this._mouseDragHandler.isDragging();\n};\nInsertSegmentMouseDragHandler.prototype._reset = function () {\n  this._insertSegment = null;\n  this._insertSegmentShape = null;\n  this._segmentIsDraggable = false;\n  this._peaks.segments.setInserting(false);\n};\nInsertSegmentMouseDragHandler.prototype._onMouseDown = function (mousePosX, segment) {\n  this._reset();\n  this._segment = segment;\n  if (this._segment) {\n    if (this._view.getSegmentDragMode() !== 'overlap') {\n      return;\n    } else {\n      // The user has clicked within a segment. We want to prevent\n      // the segment from being dragged while the user inserts a new\n      // segment. So we temporarily make the segment non-draggable,\n      // and restore its draggable state in onMouseUp().\n      this._segmentIsDraggable = this._segment.draggable();\n      this._segment.draggable(false);\n    }\n  }\n  var time = this._view.pixelsToTime(mousePosX + this._view.getFrameOffset());\n  this._peaks.segments.setInserting(true);\n  this._insertSegment = this._peaks.segments.add({\n    startTime: time,\n    endTime: time,\n    editable: true\n  });\n  this._insertSegmentShape = this._view._segmentsLayer.getSegmentShape(this._insertSegment);\n  if (this._insertSegmentShape) {\n    this._insertSegmentShape.moveMarkersToTop();\n    this._insertSegmentShape.startDrag();\n  }\n};\nInsertSegmentMouseDragHandler.prototype._onMouseMove = function () {};\nInsertSegmentMouseDragHandler.prototype._onMouseUp = function () {\n  if (!this._insertSegment) {\n    return;\n  }\n  if (this._insertSegmentShape) {\n    this._insertSegmentShape.stopDrag();\n    this._insertSegmentShape = null;\n  }\n\n  // If the user was dragging within an existing segment,\n  // restore the segment's original draggable state.\n  if (this._segment && this._segmentIsDraggable) {\n    this._segment.draggable(true);\n  }\n  this._peaks.emit('segments.insert', {\n    segment: this._insertSegment\n  });\n  this._peaks.segments.setInserting(false);\n};\nInsertSegmentMouseDragHandler.prototype.destroy = function () {\n  this._mouseDragHandler.destroy();\n};\n\n/**\n * @file\n *\n * Defines the {@link ScrollMouseDragHandler} class.\n *\n * @module scroll-mouse-drag-handler\n */\n\n\n/**\n * Creates a handler for mouse events to allow scrolling the zoomable\n * waveform view by clicking and dragging the mouse.\n *\n * @class\n * @alias ScrollMouseDragHandler\n *\n * @param {Peaks} peaks\n * @param {WaveformZoomView} view\n */\n\nfunction ScrollMouseDragHandler(peaks, view) {\n  this._peaks = peaks;\n  this._view = view;\n  this._seeking = false;\n  this._firstMove = false;\n  this._segment = null;\n  this._segmentIsDraggable = false;\n  this._initialFrameOffset = 0;\n  this._mouseDownX = 0;\n  this._onMouseDown = this._onMouseDown.bind(this);\n  this._onMouseMove = this._onMouseMove.bind(this);\n  this._onMouseUp = this._onMouseUp.bind(this);\n  this._mouseDragHandler = new MouseDragHandler(view._stage, {\n    onMouseDown: this._onMouseDown,\n    onMouseMove: this._onMouseMove,\n    onMouseUp: this._onMouseUp\n  });\n}\nScrollMouseDragHandler.prototype.isDragging = function () {\n  return this._mouseDragHandler.isDragging();\n};\nScrollMouseDragHandler.prototype._onMouseDown = function (mousePosX, segment) {\n  this._seeking = false;\n  this._firstMove = true;\n  if (segment && !segment.attrs.draggable) {\n    this._segment = null;\n  } else {\n    this._segment = segment;\n  }\n  var playheadOffset = this._view.getPlayheadOffset();\n  if (this._view.isSeekEnabled() && Math.abs(mousePosX - playheadOffset) <= this._view.getPlayheadClickTolerance()) {\n    this._seeking = true;\n\n    // The user has clicked near the playhead, and the playhead is within\n    // a segment. In this case we want to allow the playhead to move, but\n    // prevent the segment from being dragged. So we temporarily make the\n    // segment non-draggable, and restore its draggable state in onMouseUp().\n    if (this._segment) {\n      this._segmentIsDraggable = this._segment.draggable();\n      this._segment.draggable(false);\n    }\n  }\n  if (this._seeking) {\n    mousePosX = clamp(mousePosX, 0, this._view.getWidth());\n    var time = this._view.pixelsToTime(mousePosX + this._view.getFrameOffset());\n    this._seek(time);\n  } else {\n    this._initialFrameOffset = this._view.getFrameOffset();\n    this._mouseDownX = mousePosX;\n  }\n};\nScrollMouseDragHandler.prototype._onMouseMove = function (mousePosX) {\n  // Prevent scrolling the waveform if the user is dragging a segment.\n  if (this._segment && !this._seeking) {\n    return;\n  }\n  if (this._seeking) {\n    if (this._firstMove) {\n      this._view.dragSeek(true);\n      this._firstMove = false;\n    }\n    mousePosX = clamp(mousePosX, 0, this._view.getWidth());\n    var time = this._view.pixelsToTime(mousePosX + this._view.getFrameOffset());\n    this._seek(time);\n  } else {\n    // TODO: Prevent scrolling when zoomed to fit the waveform to the\n    // view width. Sometimes the waveform is a few pixels longer.\n    if (!this._view.isAutoZoom()) {\n      // Moving the mouse to the left increases the time position of the\n      // left-hand edge of the visible waveform.\n      var diff = this._mouseDownX - mousePosX;\n      var newFrameOffset = this._initialFrameOffset + diff;\n      if (newFrameOffset !== this._initialFrameOffset) {\n        this._view.updateWaveform(newFrameOffset);\n      }\n    }\n  }\n};\nScrollMouseDragHandler.prototype._onMouseUp = function () {\n  if (this._seeking) {\n    this._view.dragSeek(false);\n  } else {\n    // Set playhead position only on click release, when not dragging.\n    if (this._view._enableSeek && !this._mouseDragHandler.isDragging()) {\n      var time = this._view.pixelOffsetToTime(this._mouseDownX);\n      this._seek(time);\n    }\n  }\n\n  // If the user was dragging within an existing segment,\n  // restore the segment's original draggable state.\n  if (this._segment && this._seeking) {\n    if (this._segmentIsDraggable) {\n      this._segment.draggable(true);\n    }\n  }\n};\nScrollMouseDragHandler.prototype._seek = function (time) {\n  var duration = this._peaks.player.getDuration();\n\n  // Prevent the playhead position from jumping by limiting click\n  // handling to the waveform duration.\n  if (time > duration) {\n    time = duration;\n  }\n\n  // Update the playhead position. This gives a smoother visual update\n  // than if we only use the player.timeupdate event.\n  this._view.updatePlayheadTime(time);\n  this._peaks.player.seek(time);\n};\nScrollMouseDragHandler.prototype.destroy = function () {\n  this._mouseDragHandler.destroy();\n};\n\n/**\n * @file\n *\n * Defines the {@link WaveformZoomView} class.\n *\n * @module waveform-zoomview\n */\n\n\n/**\n * Creates a zoomable waveform view.\n *\n * @class\n * @alias WaveformZoomView\n *\n * @param {WaveformData} waveformData\n * @param {HTMLElement} container\n * @param {Peaks} peaks\n */\n\nfunction WaveformZoomView(waveformData, container, peaks) {\n  var self = this;\n  WaveformView.call(self, waveformData, container, peaks, peaks.options.zoomview);\n\n  // Bind event handlers\n  self._onTimeUpdate = self._onTimeUpdate.bind(self);\n  self._onPlaying = self._onPlaying.bind(self);\n  self._onPause = self._onPause.bind(self);\n  self._onKeyboardLeft = self._onKeyboardLeft.bind(self);\n  self._onKeyboardRight = self._onKeyboardRight.bind(self);\n  self._onKeyboardShiftLeft = self._onKeyboardShiftLeft.bind(self);\n  self._onKeyboardShiftRight = self._onKeyboardShiftRight.bind(self);\n\n  // Register event handlers\n  self._peaks.on('player.timeupdate', self._onTimeUpdate);\n  self._peaks.on('player.playing', self._onPlaying);\n  self._peaks.on('player.pause', self._onPause);\n  self._peaks.on('keyboard.left', self._onKeyboardLeft);\n  self._peaks.on('keyboard.right', self._onKeyboardRight);\n  self._peaks.on('keyboard.shift_left', self._onKeyboardShiftLeft);\n  self._peaks.on('keyboard.shift_right', self._onKeyboardShiftRight);\n  self._autoScroll = self._viewOptions.autoScroll;\n  self._autoScrollOffset = self._viewOptions.autoScrollOffset;\n  self._enableSegmentDragging = false;\n  self._segmentDragMode = 'overlap';\n  self._minSegmentDragWidth = 0;\n  self._insertSegmentShape = null;\n  self._playheadClickTolerance = self._viewOptions.playheadClickTolerance;\n  self._zoomLevelAuto = false;\n  self._zoomLevelSeconds = null;\n  var time = self._peaks.player.getCurrentTime();\n  self._syncPlayhead(time);\n  self._mouseDragHandler = new ScrollMouseDragHandler(peaks, self);\n  self._onWheel = self._onWheel.bind(self);\n  self._onWheelCaptureVerticalScroll = self._onWheelCaptureVerticalScroll.bind(self);\n  self.setWheelMode(self._viewOptions.wheelMode);\n  self._peaks.emit('zoomview.update', {\n    startTime: 0,\n    endTime: self.getEndTime()\n  });\n}\nWaveformZoomView.prototype = Object.create(WaveformView.prototype);\nWaveformZoomView.prototype.initWaveformData = function () {\n  this._enableWaveformCache = this._options.waveformCache;\n  this._initWaveformCache();\n  var initialZoomLevel = this._peaks.zoom.getZoomLevel();\n  this._resampleData({\n    scale: initialZoomLevel\n  });\n};\nWaveformZoomView.prototype._initWaveformCache = function () {\n  if (this._enableWaveformCache) {\n    this._waveformData = new Map();\n    this._waveformData.set(this._originalWaveformData.scale, this._originalWaveformData);\n    this._waveformScales = [this._originalWaveformData.scale];\n  }\n};\nWaveformZoomView.prototype.initHighlightLayer = function () {};\nWaveformZoomView.prototype.setWheelMode = function (mode, options) {\n  if (!options) {\n    options = {};\n  }\n  if (mode !== this._wheelMode || options.captureVerticalScroll !== this._captureVerticalScroll) {\n    this._stage.off('wheel');\n    this._wheelMode = mode;\n    this._captureVerticalScroll = options.captureVerticalScroll;\n    switch (mode) {\n      case 'scroll':\n        if (options.captureVerticalScroll) {\n          this._stage.on('wheel', this._onWheelCaptureVerticalScroll);\n        } else {\n          this._stage.on('wheel', this._onWheel);\n        }\n        break;\n    }\n  }\n};\nWaveformZoomView.prototype._onWheel = function (event) {\n  var wheelEvent = event.evt;\n  var delta;\n  if (wheelEvent.shiftKey) {\n    if (wheelEvent.deltaY !== 0) {\n      delta = wheelEvent.deltaY;\n    } else if (wheelEvent.deltaX !== 0) {\n      delta = wheelEvent.deltaX;\n    } else {\n      return;\n    }\n  } else {\n    // Ignore the event if it looks like the user is scrolling vertically\n    // down the page\n    if (Math.abs(wheelEvent.deltaX) < Math.abs(wheelEvent.deltaY)) {\n      return;\n    }\n    delta = wheelEvent.deltaX;\n  }\n  if (wheelEvent.deltaMode === WheelEvent.DOM_DELTA_PAGE) {\n    delta *= this._width;\n  }\n  wheelEvent.preventDefault();\n  var frameOffset = clamp(this._frameOffset + Math.floor(delta), 0, this._pixelLength - this._width);\n  this.updateWaveform(frameOffset, false);\n};\nWaveformZoomView.prototype._onWheelCaptureVerticalScroll = function (event) {\n  var wheelEvent = event.evt;\n  var delta = Math.abs(wheelEvent.deltaX) < Math.abs(wheelEvent.deltaY) ? wheelEvent.deltaY : wheelEvent.deltaX;\n  wheelEvent.preventDefault();\n  var frameOffset = clamp(this._frameOffset + Math.floor(delta), 0, this._pixelLength - this._width);\n  this.updateWaveform(frameOffset, false);\n};\nWaveformZoomView.prototype.setWaveformDragMode = function (mode) {\n  if (this._segmentsLayer) {\n    this._mouseDragHandler.destroy();\n    this.dragSeek(false);\n    if (mode === 'insert-segment') {\n      this._mouseDragHandler = new InsertSegmentMouseDragHandler(this._peaks, this);\n    } else {\n      this._mouseDragHandler = new ScrollMouseDragHandler(this._peaks, this);\n    }\n  }\n};\nWaveformZoomView.prototype.enableSegmentDragging = function (enable) {\n  this._enableSegmentDragging = enable;\n\n  // Update all existing segments\n  if (this._segmentsLayer) {\n    this._segmentsLayer.enableSegmentDragging(enable);\n  }\n};\nWaveformZoomView.prototype.isSegmentDraggingEnabled = function () {\n  return this._enableSegmentDragging;\n};\nWaveformZoomView.prototype.setSegmentDragMode = function (mode) {\n  this._segmentDragMode = mode;\n};\nWaveformZoomView.prototype.getSegmentDragMode = function () {\n  return this._segmentDragMode;\n};\nWaveformZoomView.prototype.getName = function () {\n  return 'zoomview';\n};\nWaveformZoomView.prototype._onTimeUpdate = function (time) {\n  if (this._mouseDragHandler.isDragging()) {\n    return;\n  }\n  this._syncPlayhead(time);\n};\nWaveformZoomView.prototype._onPlaying = function (time) {\n  this._playheadLayer.updatePlayheadTime(time);\n};\nWaveformZoomView.prototype._onPause = function (time) {\n  this._playheadLayer.stop(time);\n};\nWaveformZoomView.prototype._onKeyboardLeft = function () {\n  this._keyboardScroll(-1, false);\n};\nWaveformZoomView.prototype._onKeyboardRight = function () {\n  this._keyboardScroll(1, false);\n};\nWaveformZoomView.prototype._onKeyboardShiftLeft = function () {\n  this._keyboardScroll(-1, true);\n};\nWaveformZoomView.prototype._onKeyboardShiftRight = function () {\n  this._keyboardScroll(1, true);\n};\nWaveformZoomView.prototype._keyboardScroll = function (direction, large) {\n  var increment;\n  if (large) {\n    increment = direction * this._width;\n  } else {\n    increment = direction * this.timeToPixels(this._options.nudgeIncrement);\n  }\n  this.scrollWaveform({\n    pixels: increment\n  });\n};\nWaveformZoomView.prototype.setWaveformData = function (waveformData) {\n  this._originalWaveformData = waveformData;\n  // Clear cached waveforms\n  this._initWaveformCache();\n\n  // Don't update the UI here, call setZoom().\n};\n\n/**\n * Returns the position of the playhead marker, in pixels relative to the\n * left hand side of the waveform view.\n *\n * @return {Number}\n */\n\nWaveformZoomView.prototype.getPlayheadOffset = function () {\n  return this._playheadLayer.getPlayheadPixel() - this._frameOffset;\n};\nWaveformZoomView.prototype.getPlayheadClickTolerance = function () {\n  return this._playheadClickTolerance;\n};\nWaveformZoomView.prototype._syncPlayhead = function (time) {\n  this._playheadLayer.updatePlayheadTime(time);\n  if (this._autoScroll && !this._zoomLevelAuto) {\n    // Check for the playhead reaching the right-hand side of the window.\n\n    var pixelIndex = this.timeToPixels(time);\n\n    // TODO: move this code to animation function?\n    // TODO: don't scroll if user has positioned view manually (e.g., using\n    // the keyboard)\n    var endThreshold = this._frameOffset + this._width - this._autoScrollOffset;\n    var frameOffset = this._frameOffset;\n    if (pixelIndex >= endThreshold || pixelIndex < frameOffset) {\n      // Put the playhead at 100 pixels from the left edge\n      frameOffset = pixelIndex - this._autoScrollOffset;\n      if (frameOffset < 0) {\n        frameOffset = 0;\n      }\n      this.updateWaveform(frameOffset, false);\n    }\n  }\n};\nWaveformZoomView.prototype._getScale = function (duration) {\n  return Math.floor(duration * this._data.sample_rate / this._width);\n};\nfunction isAutoScale$1(options) {\n  return objectHasProperty(options, 'scale') && options.scale === 'auto' || objectHasProperty(options, 'seconds') && options.seconds === 'auto';\n}\n\n/**\n * Options for [WaveformZoomView.setZoom]{@link WaveformZoomView#setZoom}.\n *\n * @typedef {Object} SetZoomOptions\n * @global\n * @property {Number|String} scale Zoom level, in samples per pixel, or 'auto'\n *   to fit the entire waveform to the view width\n * @property {Number|String} seconds Number of seconds to fit to the view width,\n *   or 'auto' to fit the entire waveform to the view width\n */\n\n/**\n * Changes the zoom level.\n *\n * @param {SetZoomOptions} options\n * @returns {Boolean}\n */\n\nWaveformZoomView.prototype.setZoom = function (options) {\n  var scale;\n  if (isAutoScale$1(options)) {\n    // Use waveform duration, to match WaveformOverview\n    var seconds = this._originalWaveformData.duration;\n    this._zoomLevelAuto = true;\n    this._zoomLevelSeconds = null;\n    scale = this._getScale(seconds);\n  } else {\n    if (objectHasProperty(options, 'scale')) {\n      this._zoomLevelSeconds = null;\n      scale = Math.floor(options.scale);\n    } else if (objectHasProperty(options, 'seconds')) {\n      if (!isValidTime(options.seconds)) {\n        return false;\n      }\n      this._zoomLevelSeconds = options.seconds;\n      scale = this._getScale(options.seconds);\n    }\n    this._zoomLevelAuto = false;\n  }\n  if (scale < this._originalWaveformData.scale) {\n    // eslint-disable-next-line @stylistic/js/max-len\n    this._peaks._logger('peaks.zoomview.setZoom(): zoom level must be at least ' + this._originalWaveformData.scale);\n    scale = this._originalWaveformData.scale;\n  }\n  var currentTime = this._peaks.player.getCurrentTime();\n  var apexTime;\n  var playheadOffsetPixels = this.getPlayheadOffset();\n  if (playheadOffsetPixels >= 0 && playheadOffsetPixels < this._width) {\n    // Playhead is visible. Change the zoom level while keeping the\n    // playhead at the same position in the window.\n    apexTime = currentTime;\n  } else {\n    // Playhead is not visible. Change the zoom level while keeping the\n    // centre of the window at the same position in the waveform.\n    playheadOffsetPixels = Math.floor(this._width / 2);\n    apexTime = this.pixelOffsetToTime(playheadOffsetPixels);\n  }\n  var prevScale = this._scale;\n  this._resampleData({\n    scale: scale\n  });\n  var apexPixel = this.timeToPixels(apexTime);\n  var frameOffset = apexPixel - playheadOffsetPixels;\n  this.updateWaveform(frameOffset, true);\n  this._playheadLayer.zoomLevelChanged();\n\n  // Update the playhead position after zooming.\n  this._playheadLayer.updatePlayheadTime(currentTime);\n  this._peaks.emit('zoom.update', {\n    currentZoom: scale,\n    previousZoom: prevScale\n  });\n  return true;\n};\nWaveformZoomView.prototype._resampleData = function (options) {\n  var scale = options.scale;\n  if (this._enableWaveformCache) {\n    if (!this._waveformData.has(scale)) {\n      var sourceWaveform = this._originalWaveformData;\n\n      // Resample from the next lowest available zoom level\n\n      for (var i = 0; i < this._waveformScales.length; i++) {\n        if (this._waveformScales[i] < scale) {\n          sourceWaveform = this._waveformData.get(this._waveformScales[i]);\n        } else {\n          break;\n        }\n      }\n      this._waveformData.set(scale, sourceWaveform.resample(options));\n      this._waveformScales.push(scale);\n      this._waveformScales.sort(function (a, b) {\n        return a - b; // Ascending order\n      });\n    }\n    this._data = this._waveformData.get(scale);\n  } else {\n    this._data = this._originalWaveformData.resample(options);\n  }\n  this._scale = this._data.scale;\n  this._pixelLength = this._data.length;\n};\nWaveformZoomView.prototype.isAutoZoom = function () {\n  return this._zoomLevelAuto;\n};\nWaveformZoomView.prototype.setStartTime = function (time) {\n  if (time < 0) {\n    time = 0;\n  }\n  if (this._zoomLevelAuto) {\n    time = 0;\n  }\n  this.updateWaveform(this.timeToPixels(time), false);\n};\n\n/**\n * @returns {Number} The length of the waveform, in pixels.\n */\n\nWaveformZoomView.prototype.getPixelLength = function () {\n  return this._pixelLength;\n};\n\n/**\n * Scrolls the region of waveform shown in the view.\n *\n * @param {Number} scrollAmount How far to scroll, in pixels\n */\n\nWaveformZoomView.prototype.scrollWaveform = function (options) {\n  var scrollAmount;\n  if (objectHasProperty(options, 'pixels')) {\n    scrollAmount = Math.floor(options.pixels);\n  } else if (objectHasProperty(options, 'seconds')) {\n    scrollAmount = this.timeToPixels(options.seconds);\n  } else {\n    throw new TypeError('view.scrollWaveform(): Missing umber of pixels or seconds');\n  }\n  this.updateWaveform(this._frameOffset + scrollAmount, false);\n};\n\n/**\n * Updates the region of waveform shown in the view.\n *\n * @param {Number} frameOffset The new frame offset, in pixels.\n * @param {Boolean} forceUpdate Forces the waveform view to be redrawn, if the\n *   frameOffset is unchanged.\n */\n\nWaveformZoomView.prototype.updateWaveform = function (frameOffset, forceUpdate) {\n  var upperLimit;\n  if (this._pixelLength < this._width) {\n    // Total waveform is shorter than viewport, so reset the offset to 0.\n    frameOffset = 0;\n    upperLimit = this._width;\n  } else {\n    // Calculate the very last possible position.\n    upperLimit = this._pixelLength - this._width;\n  }\n  frameOffset = clamp(frameOffset, 0, upperLimit);\n  if (!forceUpdate && frameOffset === this._frameOffset) {\n    return;\n  }\n  this._frameOffset = frameOffset;\n\n  // Display playhead if it is within the zoom frame width.\n  var playheadPixel = this._playheadLayer.getPlayheadPixel();\n  this._playheadLayer.updatePlayheadTime(this.pixelsToTime(playheadPixel));\n  this.drawWaveformLayer();\n  this._axisLayer.draw();\n  var frameStartTime = this.getStartTime();\n  var frameEndTime = this.getEndTime();\n  if (this._pointsLayer) {\n    this._pointsLayer.updatePoints(frameStartTime, frameEndTime);\n  }\n  if (this._segmentsLayer) {\n    this._segmentsLayer.updateSegments(frameStartTime, frameEndTime);\n  }\n  this._peaks.emit('zoomview.update', {\n    startTime: frameStartTime,\n    endTime: frameEndTime\n  });\n};\nWaveformZoomView.prototype.enableAutoScroll = function (enable, options) {\n  if (!options) {\n    options = {};\n  }\n  this._autoScroll = enable;\n  if (objectHasProperty(options, 'offset')) {\n    this._autoScrollOffset = options.offset;\n  }\n};\nWaveformZoomView.prototype.getMinSegmentDragWidth = function () {\n  return this._insertSegmentShape ? 0 : this._minSegmentDragWidth;\n};\nWaveformZoomView.prototype.setMinSegmentDragWidth = function (width) {\n  this._minSegmentDragWidth = width;\n};\nWaveformZoomView.prototype.containerWidthChange = function () {\n  var resample = false;\n  var resampleOptions;\n  if (this._zoomLevelAuto) {\n    resample = true;\n    resampleOptions = {\n      width: this._width\n    };\n  } else if (this._zoomLevelSeconds !== null) {\n    resample = true;\n    resampleOptions = {\n      scale: this._getScale(this._zoomLevelSeconds)\n    };\n  }\n  if (resample) {\n    try {\n      this._resampleData(resampleOptions);\n    } catch (error) {// eslint-disable-line no-unused-vars\n      // Ignore, and leave this._data as it was\n    }\n  }\n  return true;\n};\nWaveformZoomView.prototype.containerHeightChange = function () {\n  // Nothing\n};\nWaveformZoomView.prototype.getStage = function () {\n  return this._stage;\n};\nWaveformZoomView.prototype.getSegmentsLayer = function () {\n  return this._segmentsLayer;\n};\nWaveformZoomView.prototype.destroy = function () {\n  // Unregister event handlers\n  this._peaks.off('player.playing', this._onPlaying);\n  this._peaks.off('player.pause', this._onPause);\n  this._peaks.off('player.timeupdate', this._onTimeUpdate);\n  this._peaks.off('keyboard.left', this._onKeyboardLeft);\n  this._peaks.off('keyboard.right', this._onKeyboardRight);\n  this._peaks.off('keyboard.shift_left', this._onKeyboardShiftLeft);\n  this._peaks.off('keyboard.shift_right', this._onKeyboardShiftRight);\n  if (this._enableWaveformCache) {\n    this._waveformData.clear();\n    delete this._waveformData;\n    delete this._waveformScales;\n  } else {\n    delete this._data;\n  }\n  this._mouseDragHandler.destroy();\n  WaveformView.prototype.destroy.call(this);\n};\n\n/**\n * @file\n *\n * Defines the {@link SpectrogramZoomView} class.\n *\n * @module waveform-zoomview\n */\n\n\n/**\n * Creates a zoomable waveform view.\n *\n * @class\n * @alias SpectrogramZoomView\n *\n * @param {WaveformData} waveformData\n * @param {HTMLElement} container\n * @param {Peaks} peaks\n */\n\nfunction SpectrogramZoomView(waveformData, spectrogramData, container, peaks) {\n  var self = this;\n  SpectrogramView.call(self, waveformData, spectrogramData, container, peaks, peaks.options.spectrogramZoomview);\n\n  // Bind event handlers\n  self._onTimeUpdate = self._onTimeUpdate.bind(self);\n  self._onPlaying = self._onPlaying.bind(self);\n  self._onPause = self._onPause.bind(self);\n  self._onKeyboardLeft = self._onKeyboardLeft.bind(self);\n  self._onKeyboardRight = self._onKeyboardRight.bind(self);\n  self._onKeyboardShiftLeft = self._onKeyboardShiftLeft.bind(self);\n  self._onKeyboardShiftRight = self._onKeyboardShiftRight.bind(self);\n\n  // Register event handlers\n  self._peaks.on('player.timeupdate', self._onTimeUpdate);\n  self._peaks.on('player.playing', self._onPlaying);\n  self._peaks.on('player.pause', self._onPause);\n  self._peaks.on('keyboard.left', self._onKeyboardLeft);\n  self._peaks.on('keyboard.right', self._onKeyboardRight);\n  self._peaks.on('keyboard.shift_left', self._onKeyboardShiftLeft);\n  self._peaks.on('keyboard.shift_right', self._onKeyboardShiftRight);\n  self._autoScroll = self._viewOptions.autoScroll;\n  self._autoScrollOffset = self._viewOptions.autoScrollOffset;\n  self._enableSegmentDragging = false;\n  self._segmentDragMode = 'overlap';\n  self._minSegmentDragWidth = 0;\n  self._insertSegmentShape = null;\n  self._playheadClickTolerance = self._viewOptions.playheadClickTolerance;\n  self._zoomLevelAuto = false;\n  self._zoomLevelSeconds = null;\n  var time = self._peaks.player.getCurrentTime();\n  self._syncPlayhead(time);\n  self._mouseDragHandler = new ScrollMouseDragHandler(peaks, self);\n  self._onWheel = self._onWheel.bind(self);\n  self._onWheelCaptureVerticalScroll = self._onWheelCaptureVerticalScroll.bind(self);\n  self.setWheelMode(self._viewOptions.wheelMode);\n  self._peaks.emit('zoomview.update', {\n    startTime: 0,\n    endTime: self.getEndTime()\n  });\n}\nSpectrogramZoomView.prototype = Object.create(SpectrogramView.prototype);\nSpectrogramZoomView.prototype.initWaveformData = function () {\n  this._enableWaveformCache = this._options.waveformCache;\n  this._initWaveformCache();\n  var initialZoomLevel = this._peaks.zoom.getZoomLevel();\n  this._resampleData({\n    scale: initialZoomLevel\n  });\n};\nSpectrogramZoomView.prototype._initWaveformCache = function () {\n  if (this._enableWaveformCache) {\n    this._waveformData = new Map();\n    this._waveformData.set(this._originalWaveformData.scale, this._originalWaveformData);\n    this._waveformScales = [this._originalWaveformData.scale];\n  }\n};\nSpectrogramZoomView.prototype.initHighlightLayer = function () {};\nSpectrogramZoomView.prototype.setWheelMode = function (mode, options) {\n  if (!options) {\n    options = {};\n  }\n  if (mode !== this._wheelMode || options.captureVerticalScroll !== this._captureVerticalScroll) {\n    this._stage.off('wheel');\n    this._wheelMode = mode;\n    this._captureVerticalScroll = options.captureVerticalScroll;\n    switch (mode) {\n      case 'scroll':\n        if (options.captureVerticalScroll) {\n          this._stage.on('wheel', this._onWheelCaptureVerticalScroll);\n        } else {\n          this._stage.on('wheel', this._onWheel);\n        }\n        break;\n    }\n  }\n};\nSpectrogramZoomView.prototype._onWheel = function (event) {\n  var wheelEvent = event.evt;\n  var delta;\n  if (wheelEvent.shiftKey) {\n    if (wheelEvent.deltaY !== 0) {\n      delta = wheelEvent.deltaY;\n    } else if (wheelEvent.deltaX !== 0) {\n      delta = wheelEvent.deltaX;\n    } else {\n      return;\n    }\n  } else {\n    // Ignore the event if it looks like the user is scrolling vertically\n    // down the page\n    if (Math.abs(wheelEvent.deltaX) < Math.abs(wheelEvent.deltaY)) {\n      return;\n    }\n    delta = wheelEvent.deltaX;\n  }\n  if (wheelEvent.deltaMode === WheelEvent.DOM_DELTA_PAGE) {\n    delta *= this._width;\n  }\n  wheelEvent.preventDefault();\n  var frameOffset = clamp(this._frameOffset + Math.floor(delta), 0, this._pixelLength - this._width);\n  this.updateWaveform(frameOffset, false);\n};\nSpectrogramZoomView.prototype._onWheelCaptureVerticalScroll = function (event) {\n  var wheelEvent = event.evt;\n  var delta = Math.abs(wheelEvent.deltaX) < Math.abs(wheelEvent.deltaY) ? wheelEvent.deltaY : wheelEvent.deltaX;\n  wheelEvent.preventDefault();\n  var frameOffset = clamp(this._frameOffset + Math.floor(delta), 0, this._pixelLength - this._width);\n  this.updateWaveform(frameOffset, false);\n};\nSpectrogramZoomView.prototype.setWaveformDragMode = function (mode) {\n  if (this._segmentsLayer) {\n    this._mouseDragHandler.destroy();\n    this.dragSeek(false);\n    if (mode === 'insert-segment') {\n      this._mouseDragHandler = new InsertSegmentMouseDragHandler(this._peaks, this);\n    } else {\n      this._mouseDragHandler = new ScrollMouseDragHandler(this._peaks, this);\n    }\n  }\n};\nSpectrogramZoomView.prototype.enableSegmentDragging = function (enable) {\n  this._enableSegmentDragging = enable;\n\n  // Update all existing segments\n  if (this._segmentsLayer) {\n    this._segmentsLayer.enableSegmentDragging(enable);\n  }\n};\nSpectrogramZoomView.prototype.isSegmentDraggingEnabled = function () {\n  return this._enableSegmentDragging;\n};\nSpectrogramZoomView.prototype.setSegmentDragMode = function (mode) {\n  this._segmentDragMode = mode;\n};\nSpectrogramZoomView.prototype.getSegmentDragMode = function () {\n  return this._segmentDragMode;\n};\nSpectrogramZoomView.prototype.getName = function () {\n  return 'spectrogramZoomview';\n};\nSpectrogramZoomView.prototype._onTimeUpdate = function (time) {\n  if (this._mouseDragHandler.isDragging()) {\n    return;\n  }\n  this._syncPlayhead(time);\n};\nSpectrogramZoomView.prototype._onPlaying = function (time) {\n  this._playheadLayer.updatePlayheadTime(time);\n};\nSpectrogramZoomView.prototype._onPause = function (time) {\n  this._playheadLayer.stop(time);\n};\nSpectrogramZoomView.prototype._onKeyboardLeft = function () {\n  this._keyboardScroll(-1, false);\n};\nSpectrogramZoomView.prototype._onKeyboardRight = function () {\n  this._keyboardScroll(1, false);\n};\nSpectrogramZoomView.prototype._onKeyboardShiftLeft = function () {\n  this._keyboardScroll(-1, true);\n};\nSpectrogramZoomView.prototype._onKeyboardShiftRight = function () {\n  this._keyboardScroll(1, true);\n};\nSpectrogramZoomView.prototype._keyboardScroll = function (direction, large) {\n  var increment;\n  if (large) {\n    increment = direction * this._width;\n  } else {\n    increment = direction * this.timeToPixels(this._options.nudgeIncrement);\n  }\n  this.scrollWaveform({\n    pixels: increment\n  });\n};\nSpectrogramZoomView.prototype.setWaveformData = function (waveformData) {\n  this._originalWaveformData = waveformData;\n  // Clear cached waveforms\n  this._initWaveformCache();\n\n  // Don't update the UI here, call setZoom().\n};\n\n/**\n * Returns the position of the playhead marker, in pixels relative to the\n * left hand side of the waveform view.\n *\n * @return {Number}\n */\n\nSpectrogramZoomView.prototype.getPlayheadOffset = function () {\n  return this._playheadLayer.getPlayheadPixel() - this._frameOffset;\n};\nSpectrogramZoomView.prototype.getPlayheadClickTolerance = function () {\n  return this._playheadClickTolerance;\n};\nSpectrogramZoomView.prototype._syncPlayhead = function (time) {\n  this._playheadLayer.updatePlayheadTime(time);\n  if (this._autoScroll && !this._zoomLevelAuto) {\n    // Check for the playhead reaching the right-hand side of the window.\n\n    var pixelIndex = this.timeToPixels(time);\n\n    // TODO: move this code to animation function?\n    // TODO: don't scroll if user has positioned view manually (e.g., using\n    // the keyboard)\n    var endThreshold = this._frameOffset + this._width - this._autoScrollOffset;\n    var frameOffset = this._frameOffset;\n    if (pixelIndex >= endThreshold || pixelIndex < frameOffset) {\n      // Put the playhead at 100 pixels from the left edge\n      frameOffset = pixelIndex - this._autoScrollOffset;\n      if (frameOffset < 0) {\n        frameOffset = 0;\n      }\n      this.updateWaveform(frameOffset, false);\n    }\n  }\n};\nSpectrogramZoomView.prototype._getScale = function (duration) {\n  return Math.floor(duration * this._data.sample_rate / this._width);\n};\nfunction isAutoScale(options) {\n  return objectHasProperty(options, 'scale') && options.scale === 'auto' || objectHasProperty(options, 'seconds') && options.seconds === 'auto';\n}\n\n/**\n * Options for [SpectrogramZoomView.setZoom]{@link WaveformZoomView#setZoom}.\n *\n * @typedef {Object} SetZoomOptions\n * @global\n * @property {Number|String} scale Zoom level, in samples per pixel, or 'auto'\n *   to fit the entire waveform to the view width\n * @property {Number|String} seconds Number of seconds to fit to the view width,\n *   or 'auto' to fit the entire waveform to the view width\n */\n\n/**\n * Changes the zoom level.\n *\n * @param {SetZoomOptions} options\n * @returns {Boolean}\n */\n\nSpectrogramZoomView.prototype.setZoom = function (options) {\n  var scale;\n  if (isAutoScale(options)) {\n    // Use waveform duration, to match WaveformOverview\n    var seconds = this._originalWaveformData.duration;\n    this._zoomLevelAuto = true;\n    this._zoomLevelSeconds = null;\n    scale = this._getScale(seconds);\n  } else {\n    if (objectHasProperty(options, 'scale')) {\n      this._zoomLevelSeconds = null;\n      scale = Math.floor(options.scale);\n    } else if (objectHasProperty(options, 'seconds')) {\n      if (!isValidTime(options.seconds)) {\n        return false;\n      }\n      this._zoomLevelSeconds = options.seconds;\n      scale = this._getScale(options.seconds);\n    }\n    this._zoomLevelAuto = false;\n  }\n  if (scale < this._originalWaveformData.scale) {\n    // eslint-disable-next-line @stylistic/js/max-len\n    this._peaks._logger('peaks.zoomview.setZoom(): zoom level must be at least ' + this._originalWaveformData.scale);\n    scale = this._originalWaveformData.scale;\n  }\n  var currentTime = this._peaks.player.getCurrentTime();\n  var apexTime;\n  var playheadOffsetPixels = this.getPlayheadOffset();\n  if (playheadOffsetPixels >= 0 && playheadOffsetPixels < this._width) {\n    // Playhead is visible. Change the zoom level while keeping the\n    // playhead at the same position in the window.\n    apexTime = currentTime;\n  } else {\n    // Playhead is not visible. Change the zoom level while keeping the\n    // centre of the window at the same position in the waveform.\n    playheadOffsetPixels = Math.floor(this._width / 2);\n    apexTime = this.pixelOffsetToTime(playheadOffsetPixels);\n  }\n  var prevScale = this._scale;\n  this._resampleData({\n    scale: scale\n  });\n  var apexPixel = this.timeToPixels(apexTime);\n  var frameOffset = apexPixel - playheadOffsetPixels;\n  this.updateWaveform(frameOffset, true);\n  this._playheadLayer.zoomLevelChanged();\n\n  // Update the playhead position after zooming.\n  this._playheadLayer.updatePlayheadTime(currentTime);\n  this._peaks.emit('zoom.update', {\n    currentZoom: scale,\n    previousZoom: prevScale\n  });\n  return true;\n};\nSpectrogramZoomView.prototype._resampleData = function (options) {\n  var scale = options.scale;\n  if (this._enableWaveformCache) {\n    if (!this._waveformData.has(scale)) {\n      var sourceWaveform = this._originalWaveformData;\n\n      // Resample from the next lowest available zoom level\n\n      for (var i = 0; i < this._waveformScales.length; i++) {\n        if (this._waveformScales[i] < scale) {\n          sourceWaveform = this._waveformData.get(this._waveformScales[i]);\n        } else {\n          break;\n        }\n      }\n      this._waveformData.set(scale, sourceWaveform.resample(options));\n      this._waveformScales.push(scale);\n      this._waveformScales.sort(function (a, b) {\n        return a - b; // Ascending order\n      });\n    }\n    this._data = this._waveformData.get(scale);\n  } else {\n    this._data = this._originalWaveformData.resample(options);\n  }\n  this._scale = this._data.scale;\n  this._pixelLength = this._data.length;\n};\nSpectrogramZoomView.prototype.isAutoZoom = function () {\n  return this._zoomLevelAuto;\n};\nSpectrogramZoomView.prototype.setStartTime = function (time) {\n  if (time < 0) {\n    time = 0;\n  }\n  if (this._zoomLevelAuto) {\n    time = 0;\n  }\n  this.updateWaveform(this.timeToPixels(time), false);\n};\n\n/**\n * @returns {Number} The length of the waveform, in pixels.\n */\n\nSpectrogramZoomView.prototype.getPixelLength = function () {\n  return this._pixelLength;\n};\n\n/**\n * Scrolls the region of waveform shown in the view.\n *\n * @param {Number} scrollAmount How far to scroll, in pixels\n */\n\nSpectrogramZoomView.prototype.scrollWaveform = function (options) {\n  var scrollAmount;\n  if (objectHasProperty(options, 'pixels')) {\n    scrollAmount = Math.floor(options.pixels);\n  } else if (objectHasProperty(options, 'seconds')) {\n    scrollAmount = this.timeToPixels(options.seconds);\n  } else {\n    throw new TypeError('view.scrollWaveform(): Missing umber of pixels or seconds');\n  }\n  this.updateWaveform(this._frameOffset + scrollAmount, false);\n};\n\n/**\n * Updates the region of waveform shown in the view.\n *\n * @param {Number} frameOffset The new frame offset, in pixels.\n * @param {Boolean} forceUpdate Forces the waveform view to be redrawn, if the\n *   frameOffset is unchanged.\n */\n\nSpectrogramZoomView.prototype.updateWaveform = function (frameOffset, forceUpdate) {\n  var upperLimit;\n  if (this._pixelLength < this._width) {\n    // Total waveform is shorter than viewport, so reset the offset to 0.\n    frameOffset = 0;\n    upperLimit = this._width;\n  } else {\n    // Calculate the very last possible position.\n    upperLimit = this._pixelLength - this._width;\n  }\n  frameOffset = clamp(frameOffset, 0, upperLimit);\n  if (!forceUpdate && frameOffset === this._frameOffset) {\n    return;\n  }\n  this._frameOffset = frameOffset;\n  this._spectrogramImage.update(frameOffset);\n  this._spectrogramLayer.draw();\n\n  // Display playhead if it is within the zoom frame width.\n  var playheadPixel = this._playheadLayer.getPlayheadPixel();\n  this._playheadLayer.updatePlayheadTime(this.pixelsToTime(playheadPixel));\n  this.drawWaveformLayer();\n  this._axisLayer.draw();\n  var frameStartTime = this.getStartTime();\n  var frameEndTime = this.getEndTime();\n  if (this._pointsLayer) {\n    this._pointsLayer.updatePoints(frameStartTime, frameEndTime);\n  }\n  if (this._segmentsLayer) {\n    this._segmentsLayer.updateSegments(frameStartTime, frameEndTime);\n  }\n  this._peaks.emit('zoomview.update', {\n    startTime: frameStartTime,\n    endTime: frameEndTime\n  });\n};\nSpectrogramZoomView.prototype.enableAutoScroll = function (enable, options) {\n  if (!options) {\n    options = {};\n  }\n  this._autoScroll = enable;\n  if (objectHasProperty(options, 'offset')) {\n    this._autoScrollOffset = options.offset;\n  }\n};\nSpectrogramZoomView.prototype.getMinSegmentDragWidth = function () {\n  return this._insertSegmentShape ? 0 : this._minSegmentDragWidth;\n};\nSpectrogramZoomView.prototype.setMinSegmentDragWidth = function (width) {\n  this._minSegmentDragWidth = width;\n};\nSpectrogramZoomView.prototype.containerWidthChange = function () {\n  var resample = false;\n  var resampleOptions;\n  if (this._zoomLevelAuto) {\n    resample = true;\n    resampleOptions = {\n      width: this._width\n    };\n  } else if (this._zoomLevelSeconds !== null) {\n    resample = true;\n    resampleOptions = {\n      scale: this._getScale(this._zoomLevelSeconds)\n    };\n  }\n  if (resample) {\n    try {\n      this._resampleData(resampleOptions);\n    } catch (error) {// eslint-disable-line no-unused-vars\n      // Ignore, and leave this._data as it was\n    }\n  }\n  return true;\n};\nSpectrogramZoomView.prototype.containerHeightChange = function () {\n  this._spectrogramImage.update();\n};\nSpectrogramZoomView.prototype.getStage = function () {\n  return this._stage;\n};\nSpectrogramZoomView.prototype.getSegmentsLayer = function () {\n  return this._segmentsLayer;\n};\nSpectrogramZoomView.prototype.destroy = function () {\n  // Unregister event handlers\n  this._peaks.off('player.playing', this._onPlaying);\n  this._peaks.off('player.pause', this._onPause);\n  this._peaks.off('player.timeupdate', this._onTimeUpdate);\n  this._peaks.off('keyboard.left', this._onKeyboardLeft);\n  this._peaks.off('keyboard.right', this._onKeyboardRight);\n  this._peaks.off('keyboard.shift_left', this._onKeyboardShiftLeft);\n  this._peaks.off('keyboard.shift_right', this._onKeyboardShiftRight);\n  if (this._enableWaveformCache) {\n    this._waveformData.clear();\n    delete this._waveformData;\n    delete this._waveformScales;\n  } else {\n    delete this._data;\n  }\n  this._mouseDragHandler.destroy();\n  SpectrogramView.prototype.destroy.call(this);\n};\n\n/**\n * @file\n *\n * Defines the {@link Scrollbar} class.\n *\n * @module scrollbar\n */\n\n\n/**\n * Creates a scrollbar.\n *\n * @class\n * @alias Scrollbar\n *\n * @param {HTMLElement} container\n * @param {Peaks} peaks\n */\n\nfunction Scrollbar(container, peaks) {\n  this._container = container;\n  this._peaks = peaks;\n  this._options = peaks.options.scrollbar;\n  this._zoomview = peaks.views.getView('zoomview');\n  this._dragBoundFunc = this._dragBoundFunc.bind(this);\n  this._onScrollboxDragStart = this._onScrollboxDragStart.bind(this);\n  this._onScrollboxDragMove = this._onScrollboxDragMove.bind(this);\n  this._onScrollboxDragEnd = this._onScrollboxDragEnd.bind(this);\n  this._onZoomviewUpdate = this._onZoomviewUpdate.bind(this);\n  this._onScrollbarClick = this._onScrollbarClick.bind(this);\n  this._peaks.on('zoomview.update', this._onZoomviewUpdate);\n  this._width = container.clientWidth;\n  this._height = container.clientHeight;\n  this._stage = new Konva.Stage({\n    container: container,\n    width: this._width,\n    height: this._height\n  });\n  this._layer = new Konva.Layer();\n  this._stage.on('click', this._onScrollbarClick);\n  this._stage.add(this._layer);\n  this._color = this._options.color;\n  this._scrollboxX = 0;\n  this._minScrollboxWidth = this._options.minWidth;\n  this._offsetY = 0;\n  this._scrollbox = new Konva.Group({\n    draggable: true,\n    dragBoundFunc: this._dragBoundFunc\n  });\n  this._scrollboxRect = new Rect({\n    x: this._scrollboxX,\n    y: this._offsetY,\n    width: 0,\n    height: this._height,\n    fill: this._color\n  });\n  this._scrollbox.add(this._scrollboxRect);\n  this._setScrollboxWidth();\n  this._scrollbox.on('dragstart', this._onScrollboxDragStart);\n  this._scrollbox.on('dragmove', this._onScrollboxDragMove);\n  this._scrollbox.on('dragend', this._onScrollboxDragEnd);\n  this._layer.add(this._scrollbox);\n  this._updateScrollbarWidthAndPosition();\n}\nScrollbar.prototype.setZoomview = function (zoomview) {\n  this._zoomview = zoomview;\n  this._updateScrollbarWidthAndPosition();\n};\n\n/**\n * Sets the width of the scrollbox, based on the visible waveform region\n * in the zoomview and minimum scrollbox width option.\n */\n\nScrollbar.prototype._setScrollboxWidth = function () {\n  if (this._zoomview) {\n    this._scrollboxWidth = Math.floor(this._width * this._zoomview.pixelsToTime(this._zoomview.getWidth()) / this._peaks.player.getDuration());\n    if (this._scrollboxWidth < this._minScrollboxWidth) {\n      this._scrollboxWidth = this._minScrollboxWidth;\n    }\n  } else {\n    this._scrollboxWidth = this._width;\n  }\n  this._scrollboxRect.width(this._scrollboxWidth);\n};\n\n/**\n * @returns {Number} The maximum scrollbox position, in pixels.\n */\n\nScrollbar.prototype._getScrollbarRange = function () {\n  return this._width - this._scrollboxWidth;\n};\nScrollbar.prototype._dragBoundFunc = function (pos) {\n  // Allow the scrollbar to be moved horizontally but not vertically.\n  return {\n    x: pos.x,\n    y: 0\n  };\n};\nScrollbar.prototype._onScrollboxDragStart = function () {\n  this._dragging = true;\n};\nScrollbar.prototype._onScrollboxDragEnd = function () {\n  this._dragging = false;\n};\nScrollbar.prototype._onScrollboxDragMove = function () {\n  var range = this._getScrollbarRange();\n  var x = clamp(this._scrollbox.x(), 0, range);\n  this._scrollbox.x(x);\n  if (x !== this._scrollboxX) {\n    this._scrollboxX = x;\n    if (this._zoomview) {\n      this._updateWaveform(x);\n    }\n  }\n};\nScrollbar.prototype._onZoomviewUpdate = function /* event */\n() {\n  if (!this._dragging) {\n    this._updateScrollbarWidthAndPosition();\n  }\n};\nScrollbar.prototype._updateScrollbarWidthAndPosition = function () {\n  this._setScrollboxWidth();\n  if (this._zoomview) {\n    var startTime = this._zoomview.getStartTime();\n    var zoomviewRange = this._zoomview.getPixelLength() - this._zoomview.getWidth();\n    var scrollBoxPos = Math.floor(this._zoomview.timeToPixels(startTime) * this._getScrollbarRange() / zoomviewRange);\n    this._scrollbox.x(scrollBoxPos);\n    this._layer.draw();\n  }\n};\nScrollbar.prototype._onScrollbarClick = function (event) {\n  // Handle clicks on the scrollbar outside the scrollbox.\n  if (event.target === this._stage) {\n    if (this._zoomview) {\n      // Centre the scrollbox where the user clicked.\n      var x = Math.floor(event.evt.offsetX - this._scrollboxWidth / 2);\n      if (x < 0) {\n        x = 0;\n      }\n      this._updateWaveform(x);\n    }\n  }\n};\n\n/**\n * Sets the zoomview waveform position based on scrollbar position.\n */\n\nScrollbar.prototype._updateWaveform = function (x) {\n  var offset = Math.floor((this._zoomview.getPixelLength() - this._zoomview.getWidth()) * x / this._getScrollbarRange());\n  this._zoomview.updateWaveform(offset);\n};\nScrollbar.prototype.fitToContainer = function () {\n  if (this._container.clientWidth === 0 && this._container.clientHeight === 0) {\n    return;\n  }\n  if (this._container.clientWidth !== this._width) {\n    this._width = this._container.clientWidth;\n    this._stage.width(this._width);\n    this._updateScrollbarWidthAndPosition();\n  }\n  this._height = this._container.clientHeight;\n  this._stage.height(this._height);\n};\nScrollbar.prototype.destroy = function () {\n  this._peaks.off('zoomview.update', this._onZoomviewUpdate);\n  this._layer.destroy();\n  this._stage.destroy();\n  this._stage = null;\n};\n\n/**\n * @file\n *\n * Defines the {@link ViewController} class.\n *\n * @module view-controller\n */\n\n\n/**\n * Creates an object that allows users to create and manage waveform views.\n *\n * @class\n * @alias ViewController\n *\n * @param {Peaks} peaks\n */\n\nfunction ViewController(peaks) {\n  this._peaks = peaks;\n  this._overview = null;\n  this._spectrogramOverview = null;\n  this._zoomview = null;\n  this._spectrogramZoomview = null;\n  this._scrollbar = null;\n}\nViewController.prototype.createOverview = function (container) {\n  if (this._overview) {\n    return this._overview;\n  }\n  var waveformData = this._peaks.getWaveformData();\n  this._overview = new WaveformOverview(waveformData, container, this._peaks);\n  if (this._zoomview) {\n    this._overview.showHighlight(this._zoomview.getStartTime(), this._zoomview.getEndTime());\n  }\n  return this._overview;\n};\nViewController.prototype.createSpectrogramOverview = function (container) {\n  if (this._spectrogramOverview) {\n    return this._spectrogramOverview;\n  }\n  var waveformData = this._peaks.getWaveformData();\n  var spectrogramData = this._peaks.getSpectrogramData();\n  this._spectrogramOverview = new SpectrogramOverview(waveformData, spectrogramData, container, this._peaks);\n  if (this._zoomview) {\n    this._spectrogramOverview.showHighlight(this._zoomview.getStartTime(), this._zoomview.getEndTime());\n  }\n  return this._spectrogramOverview;\n};\nViewController.prototype.createZoomview = function (container) {\n  if (this._zoomview) {\n    return this._zoomview;\n  }\n  var waveformData = this._peaks.getWaveformData();\n  this._zoomview = new WaveformZoomView(waveformData, container, this._peaks);\n  if (this._scrollbar) {\n    this._scrollbar.setZoomview(this._zoomview);\n  }\n  return this._zoomview;\n};\nViewController.prototype.createSpectrogramZoomview = function (container) {\n  if (this._spectrogramZoomview) {\n    return this._spectrogramZoomview;\n  }\n  var waveformData = this._peaks.getWaveformData();\n  var spectrogramData = this._peaks.getSpectrogramData();\n  this._spectrogramZoomview = new SpectrogramZoomView(waveformData, spectrogramData, container, this._peaks);\n  if (this._scrollbar) {\n    this._scrollbar.setZoomview(this._spectrogramZoomview);\n  }\n  return this._spectrogramZoomview;\n};\nViewController.prototype.createScrollbar = function (container) {\n  this._scrollbar = new Scrollbar(container, this._peaks);\n  return this._scrollbar;\n};\nViewController.prototype.destroyOverview = function () {\n  if (!this._overview) {\n    return;\n  }\n  if (!this._zoomview) {\n    return;\n  }\n  this._overview.destroy();\n  this._overview = null;\n};\nViewController.prototype.destroySpectrogramOverview = function () {\n  if (!this._spectrogramOverview) {\n    return;\n  }\n  this._spectrogramOverview.destroy();\n  this._spectrogramOverview = null;\n};\nViewController.prototype.destroyZoomview = function () {\n  if (!this._zoomview) {\n    return;\n  }\n  if (!this._overview) {\n    return;\n  }\n  this._zoomview.destroy();\n  this._zoomview = null;\n  this._overview.removeHighlightRect();\n};\nViewController.prototype.destroySpectrogramZoomview = function () {\n  if (!this._spectrogramZoomview) {\n    return;\n  }\n  if (!this._spectrogramOverview) {\n    return;\n  }\n  this._spectrogramZoomview.destroy();\n  this._spectrogramZoomview = null;\n  this._spectrogramOverview.removeHighlightRect();\n};\nViewController.prototype.destroy = function () {\n  if (this._overview) {\n    this._overview.destroy();\n    this._overview = null;\n  }\n  if (this._spectrogramOverview) {\n    this._spectrogramOverview.destroy();\n    this._spectrogramOverview = null;\n  }\n  if (this._zoomview) {\n    this._zoomview.destroy();\n    this._zoomview = null;\n  }\n  if (this._spectrogramZoomview) {\n    this._spectrogramZoomview.destroy();\n    this._spectrogramZoomview = null;\n  }\n  if (this._scrollbar) {\n    this._scrollbar.destroy();\n    this._scrollbar = null;\n  }\n};\nViewController.prototype.getView = function (name) {\n  if (isNullOrUndefined(name)) {\n    if (this._overview && this._zoomview) {\n      return null;\n    } else if (this._overview) {\n      return this._overview;\n    } else if (this._spectrogramOverview) {\n      return this._spectrogramOverview;\n    } else if (this._zoomview) {\n      return this._zoomview;\n    } else if (this._spectrogramZoomview) {\n      return this._spectrogramZoomview;\n    } else {\n      return null;\n    }\n  } else {\n    switch (name) {\n      case 'overview':\n        return this._overview;\n      case 'spectrogramOverview':\n        return this._spectrogramOverview;\n      case 'zoomview':\n        return this._zoomview;\n      case 'spectrogramZoomview':\n        return this._spectrogramZoomview;\n      default:\n        return null;\n    }\n  }\n};\nViewController.prototype.getScrollbar = function () {\n  return this._scrollbar;\n};\n\n/**\n * @file\n *\n * Defines the {@link ZoomController} class.\n *\n * @module zoom-controller\n */\n\n/**\n * Creates an object to control zoom levels in a {@link WaveformZoomView}.\n *\n * @class\n * @alias ZoomController\n *\n * @param {Peaks} peaks\n * @param {Array<Integer>} zoomLevels\n */\n\nfunction ZoomController(peaks, zoomLevels) {\n  this._peaks = peaks;\n  this._zoomLevels = zoomLevels;\n  this._zoomLevelIndex = 0;\n}\nZoomController.prototype.setZoomLevels = function (zoomLevels) {\n  this._zoomLevels = zoomLevels;\n  this.setZoom(0, true);\n};\n\n/**\n * Zoom in one level.\n */\n\nZoomController.prototype.zoomIn = function () {\n  this.setZoom(this._zoomLevelIndex - 1, false);\n};\n\n/**\n * Zoom out one level.\n */\n\nZoomController.prototype.zoomOut = function () {\n  this.setZoom(this._zoomLevelIndex + 1, false);\n};\n\n/**\n * Given a particular zoom level, triggers a resampling of the data in the\n * zoomed view.\n *\n * @param {number} zoomLevelIndex An index into the options.zoomLevels array.\n */\n\nZoomController.prototype.setZoom = function (zoomLevelIndex, forceUpdate) {\n  if (zoomLevelIndex >= this._zoomLevels.length) {\n    zoomLevelIndex = this._zoomLevels.length - 1;\n  }\n  if (zoomLevelIndex < 0) {\n    zoomLevelIndex = 0;\n  }\n  if (!forceUpdate && zoomLevelIndex === this._zoomLevelIndex) {\n    // Nothing to do.\n    return;\n  }\n  this._zoomLevelIndex = zoomLevelIndex;\n  var zoomview = this._peaks.views.getView('zoomview');\n  if (zoomview !== null) {\n    zoomview.setZoom({\n      scale: this._zoomLevels[zoomLevelIndex]\n    });\n  }\n  var spectrogramZoomview = this._peaks.views.getView('spectrogramZoomview');\n  if (spectrogramZoomview !== null) {\n    spectrogramZoomview.setZoom({\n      scale: this._zoomLevels[zoomLevelIndex]\n    });\n  }\n};\n\n/**\n * Returns the current zoom level index.\n *\n * @returns {Number}\n */\n\nZoomController.prototype.getZoom = function () {\n  return this._zoomLevelIndex;\n};\n\n/**\n * Returns the current zoom level, in samples per pixel.\n *\n * @returns {Number}\n */\n\nZoomController.prototype.getZoomLevel = function () {\n  return this._zoomLevels[this._zoomLevelIndex];\n};\n\n/**\n * @file\n *\n * Defines the {@link WaveformBuilder} class.\n *\n * @module waveform-builder\n */\n\nvar isXhr2 = 'withCredentials' in new XMLHttpRequest();\n\n/**\n * Creates and returns a WaveformData object, either by requesting the\n * waveform data from the server, or by creating the waveform data using the\n * Web Audio API.\n *\n * @class\n * @alias WaveformBuilder\n *\n * @param {Peaks} peaks\n */\n\nfunction WaveformBuilder(peaks) {\n  this._peaks = peaks;\n}\n\n/**\n * Options for requesting remote waveform data.\n *\n * @typedef {Object} RemoteWaveformDataOptions\n * @global\n * @property {String=} arraybuffer\n * @property {String=} json\n */\n\n/**\n * Options for supplying local waveform data.\n *\n * @typedef {Object} LocalWaveformDataOptions\n * @global\n * @property {ArrayBuffer=} arraybuffer\n * @property {Object=} json\n */\n\n/**\n * Options for the Web Audio waveform builder.\n *\n * @typedef {Object} WaveformBuilderWebAudioOptions\n * @global\n * @property {AudioContext} audioContext\n * @property {AudioBuffer=} audioBuffer\n * @property {Number=} scale\n * @property {Boolean=} multiChannel\n */\n\n/**\n * Options for [WaveformBuilder.init]{@link WaveformBuilder#init}.\n *\n * @typedef {Object} WaveformBuilderInitOptions\n * @global\n * @property {RemoteWaveformDataOptions=} dataUri\n * @property {LocalWaveformDataOptions=} waveformData\n * @property {WaveformBuilderWebAudioOptions=} webAudio\n * @property {Boolean=} withCredentials\n * @property {Array<Number>=} zoomLevels\n */\n\n/**\n * Callback for receiving the waveform data.\n *\n * @callback WaveformBuilderInitCallback\n * @global\n * @param {Error} error\n * @param {WaveformData} waveformData\n */\n\n/**\n * Loads or creates the waveform data.\n *\n * @private\n * @param {WaveformBuilderInitOptions} options\n * @param {WaveformBuilderInitCallback} callback\n */\n\nWaveformBuilder.prototype.init = function (options, callback) {\n  if (options.dataUri && (options.webAudio || options.audioContext) || options.waveformData && (options.webAudio || options.audioContext) || options.dataUri && options.waveformData) {\n    // eslint-disable-next-line @stylistic/js/max-len\n    callback(new TypeError('Peaks.init(): You may only pass one source (webAudio, dataUri, or waveformData) to render waveform data.'));\n    return;\n  }\n  if (options.audioContext) {\n    // eslint-disable-next-line @stylistic/js/max-len\n    this._peaks._logger('Peaks.init(): The audioContext option is deprecated, please pass a webAudio object instead');\n    options.webAudio = {\n      audioContext: options.audioContext\n    };\n  }\n  if (options.dataUri) {\n    return this._getRemoteWaveformData(options, callback);\n  } else if (options.waveformData) {\n    return this._buildWaveformFromLocalData(options, callback);\n  } else if (options.webAudio) {\n    if (options.webAudio.audioBuffer) {\n      return this._buildWaveformDataFromAudioBuffer(options, callback);\n    } else {\n      return this._buildWaveformDataUsingWebAudio(options, callback);\n    }\n  } else {\n    // eslint-disable-next-line @stylistic/js/max-len\n    callback(new Error('Peaks.init(): You must pass an audioContext, or dataUri, or waveformData to render waveform data'));\n  }\n};\nfunction hasValidContentRangeHeader(xhr) {\n  var contentRange = xhr.getResponseHeader('content-range');\n  if (!contentRange) {\n    return false;\n  }\n  var matches = contentRange.match(/^bytes (\\d+)-(\\d+)\\/(\\d+)$/);\n  if (matches && matches.length === 4) {\n    var firstPos = parseInt(matches[1], 10);\n    var lastPos = parseInt(matches[2], 10);\n    var length = parseInt(matches[3], 10);\n    if (firstPos === 0 && lastPos + 1 === length) {\n      return true;\n    }\n    return false;\n  }\n  return false;\n}\n\n/* eslint-disable @stylistic/js/max-len */\n\n/**\n * Fetches waveform data, based on the given options.\n *\n * @private\n * @param {Object} options\n * @param {String|Object} options.dataUri\n * @param {String} options.dataUri.arraybuffer Waveform data URL\n *   (binary format)\n * @param {String} options.dataUri.json Waveform data URL (JSON format)\n * @param {String} options.defaultUriFormat Either 'arraybuffer' (for binary\n *   data) or 'json'\n * @param {WaveformBuilderInitCallback} callback\n *\n * @see Refer to the <a href=\"https://github.com/bbc/audiowaveform/blob/master/doc/DataFormat.md\">data format documentation</a>\n *   for details of the binary and JSON waveform data formats.\n */\n\n/* eslint-enable @stylistic/js/max-len */\n\nWaveformBuilder.prototype._getRemoteWaveformData = function (options, callback) {\n  var self = this;\n  var dataUri = null;\n  var requestType = null;\n  var url;\n  if (isObject(options.dataUri)) {\n    dataUri = options.dataUri;\n  } else {\n    callback(new TypeError('Peaks.init(): The dataUri option must be an object'));\n    return;\n  }\n  ['ArrayBuffer', 'JSON'].some(function (connector) {\n    if (window[connector]) {\n      requestType = connector.toLowerCase();\n      url = dataUri[requestType];\n      return Boolean(url);\n    }\n  });\n  if (!url) {\n    // eslint-disable-next-line @stylistic/js/max-len\n    callback(new Error('Peaks.init(): Unable to determine a compatible dataUri format for this browser'));\n    return;\n  }\n  self._xhr = self._createXHR(url, requestType, options.withCredentials, function (event) {\n    if (this.readyState !== 4) {\n      return;\n    }\n\n    // See https://github.com/bbc/peaks.js/issues/491\n\n    if (this.status !== 200 && !(this.status === 206 && hasValidContentRangeHeader(this))) {\n      callback(new Error('Unable to fetch remote data. HTTP status ' + this.status));\n      return;\n    }\n    self._xhr = null;\n    var waveformData = WaveformData.create(event.target.response);\n    if (waveformData.channels !== 1 && waveformData.channels !== 2) {\n      callback(new Error('Peaks.init(): Only mono or stereo waveforms are currently supported'));\n      return;\n    } else if (waveformData.bits !== 8) {\n      callback(new Error('Peaks.init(): 16-bit waveform data is not supported'));\n      return;\n    }\n    callback(null, waveformData);\n  }, function () {\n    callback(new Error('XHR failed'));\n  }, function () {\n    callback(new Error('XHR aborted'));\n  });\n  self._xhr.send();\n};\n\n/* eslint-disable @stylistic/js/max-len */\n\n/**\n * Creates a waveform from given data, based on the given options.\n *\n * @private\n * @param {Object} options\n * @param {Object} options.waveformData\n * @param {ArrayBuffer} options.waveformData.arraybuffer Waveform data (binary format)\n * @param {Object} options.waveformData.json Waveform data (JSON format)\n * @param {WaveformBuilderInitCallback} callback\n *\n * @see Refer to the <a href=\"https://github.com/bbc/audiowaveform/blob/master/doc/DataFormat.md\">data format documentation</a>\n *   for details of the binary and JSON waveform data formats.\n */\n\n/* eslint-enable @stylistic/js/max-len */\n\nWaveformBuilder.prototype._buildWaveformFromLocalData = function (options, callback) {\n  var waveformData = null;\n  var data = null;\n  if (isObject(options.waveformData)) {\n    waveformData = options.waveformData;\n  } else {\n    callback(new Error('Peaks.init(): The waveformData option must be an object'));\n    return;\n  }\n  if (isObject(waveformData.json)) {\n    data = waveformData.json;\n  } else if (isArrayBuffer(waveformData.arraybuffer)) {\n    data = waveformData.arraybuffer;\n  }\n  if (!data) {\n    callback(new Error('Peaks.init(): Unable to determine a compatible waveformData format'));\n    return;\n  }\n  try {\n    var createdWaveformData = WaveformData.create(data);\n    if (createdWaveformData.channels !== 1 && createdWaveformData.channels !== 2) {\n      callback(new Error('Peaks.init(): Only mono or stereo waveforms are currently supported'));\n      return;\n    } else if (createdWaveformData.bits !== 8) {\n      callback(new Error('Peaks.init(): 16-bit waveform data is not supported'));\n      return;\n    }\n    callback(null, createdWaveformData);\n  } catch (err) {\n    callback(err);\n  }\n};\n\n/**\n * Creates waveform data using the Web Audio API.\n *\n * @private\n * @param {Object} options\n * @param {AudioContext} options.audioContext\n * @param {HTMLMediaElement} options.mediaElement\n * @param {WaveformBuilderInitCallback} callback\n */\n\nWaveformBuilder.prototype._buildWaveformDataUsingWebAudio = function (options, callback) {\n  var self = this;\n  var audioContext = window.AudioContext || window.webkitAudioContext;\n  if (!(options.webAudio.audioContext instanceof audioContext)) {\n    // eslint-disable-next-line @stylistic/js/max-len\n    callback(new TypeError('Peaks.init(): The webAudio.audioContext option must be a valid AudioContext'));\n    return;\n  }\n  var webAudioOptions = options.webAudio;\n  if (webAudioOptions.scale !== options.zoomLevels[0]) {\n    webAudioOptions.scale = options.zoomLevels[0];\n  }\n\n  // If the media element has already selected which source to play, its\n  // currentSrc attribute will contain the source media URL. Otherwise,\n  // we wait for a canplay event to tell us when the media is ready.\n\n  var mediaSourceUrl = self._peaks.options.mediaElement.currentSrc;\n  if (mediaSourceUrl) {\n    self._requestAudioAndBuildWaveformData(mediaSourceUrl, webAudioOptions, options.withCredentials, callback);\n  } else {\n    self._peaks.once('player.canplay', function () {\n      self._requestAudioAndBuildWaveformData(self._peaks.options.mediaElement.currentSrc, webAudioOptions, options.withCredentials, callback);\n    });\n  }\n};\nWaveformBuilder.prototype._buildWaveformDataFromAudioBuffer = function (options, callback) {\n  var webAudioOptions = options.webAudio;\n  if (webAudioOptions.scale !== options.zoomLevels[0]) {\n    webAudioOptions.scale = options.zoomLevels[0];\n  }\n  var webAudioBuilderOptions = {\n    audio_buffer: webAudioOptions.audioBuffer,\n    split_channels: webAudioOptions.multiChannel,\n    scale: webAudioOptions.scale,\n    disable_worker: true\n  };\n  WaveformData.createFromAudio(webAudioBuilderOptions, callback);\n};\n\n/**\n * Fetches the audio content, based on the given options, and creates waveform\n * data using the Web Audio API.\n *\n * @private\n * @param {url} The media source URL\n * @param {WaveformBuilderWebAudioOptions} webAudio\n * @param {Boolean} withCredentials\n * @param {WaveformBuilderInitCallback} callback\n */\n\nWaveformBuilder.prototype._requestAudioAndBuildWaveformData = function (url, webAudio, withCredentials, callback) {\n  var self = this;\n  if (!url) {\n    self._peaks._logger('Peaks.init(): The mediaElement src is invalid');\n    return;\n  }\n  self._xhr = self._createXHR(url, 'arraybuffer', withCredentials, function (event) {\n    if (this.readyState !== 4) {\n      return;\n    }\n\n    // See https://github.com/bbc/peaks.js/issues/491\n\n    if (this.status !== 200 && !(this.status === 206 && hasValidContentRangeHeader(this))) {\n      callback(new Error('Unable to fetch remote data. HTTP status ' + this.status));\n      return;\n    }\n    self._xhr = null;\n    var webAudioBuilderOptions = {\n      audio_context: webAudio.audioContext,\n      array_buffer: event.target.response,\n      split_channels: webAudio.multiChannel,\n      scale: webAudio.scale\n    };\n    WaveformData.createFromAudio(webAudioBuilderOptions, callback);\n  }, function () {\n    callback(new Error('XHR failed'));\n  }, function () {\n    callback(new Error('XHR aborted'));\n  });\n  self._xhr.send();\n};\nWaveformBuilder.prototype.abort = function () {\n  if (this._xhr) {\n    this._xhr.abort();\n  }\n};\n\n/**\n * @private\n * @param {String} url\n * @param {String} requestType\n * @param {Boolean} withCredentials\n * @param {Function} onLoad\n * @param {Function} onError\n *\n * @returns {XMLHttpRequest}\n */\n\nWaveformBuilder.prototype._createXHR = function (url, requestType, withCredentials, onLoad, onError, onAbort) {\n  var xhr = new XMLHttpRequest();\n\n  // open an XHR request to the data source file\n  xhr.open('GET', url, true);\n  if (isXhr2) {\n    try {\n      xhr.responseType = requestType;\n    } catch (error) {// eslint-disable-line no-unused-vars\n      // Some browsers like Safari 6 do handle XHR2 but not the json\n      // response type, doing only a try/catch fails in IE9\n    }\n  }\n  xhr.onload = onLoad;\n  xhr.onerror = onError;\n  if (isXhr2 && withCredentials) {\n    xhr.withCredentials = true;\n  }\n  xhr.addEventListener('abort', onAbort);\n  return xhr;\n};\n\n/**\n * @file\n *\n * Defines the {@link Peaks} class.\n *\n * @module main\n */\n\n\n/**\n * Initialises a new Peaks instance with default option settings.\n *\n * @class\n * @alias Peaks\n *\n * @param {Object} opts Configuration options\n */\n\nfunction Peaks() {\n  EventEmitter.call(this);\n\n  // Set default options\n  this.options = {\n    zoomLevels: [512, 1024, 2048, 4096],\n    waveformCache: true,\n    mediaElement: null,\n    mediaUrl: null,\n    dataUri: null,\n    withCredentials: false,\n    waveformData: null,\n    spectrogramData: {\n      image: '',\n      crop: {}\n    },\n    webAudio: null,\n    nudgeIncrement: 1.0,\n    pointMarkerColor: '#39cccc',\n    createSegmentMarker: createSegmentMarker,\n    createSegmentLabel: createSegmentLabel,\n    createPointMarker: createPointMarker,\n    // eslint-disable-next-line no-console\n    logger: console.error.bind(console)\n  };\n  return this;\n}\nPeaks.prototype = Object.create(EventEmitter.prototype);\nvar defaultViewOptions = {\n  playheadColor: '#111111',\n  playheadTextColor: '#aaaaaa',\n  playheadBackgroundColor: 'transparent',\n  playheadPadding: 2,\n  playheadWidth: 1,\n  axisGridlineColor: '#cccccc',\n  showAxisLabels: true,\n  axisTopMarkerHeight: 10,\n  axisBottomMarkerHeight: 10,\n  axisLabelColor: '#aaaaaa',\n  fontFamily: 'sans-serif',\n  fontSize: 11,\n  fontStyle: 'normal',\n  timeLabelPrecision: 2,\n  enablePoints: true,\n  enableSegments: true\n};\nvar defaultZoomviewOptions = {\n  // showPlayheadTime:    true,\n  playheadClickTolerance: 3,\n  waveformColor: 'rgba(0, 225, 128, 1)',\n  wheelMode: 'none',\n  autoScroll: true,\n  autoScrollOffset: 100,\n  enableEditing: true\n};\nvar defaultSpectrogramZoomviewOptions = {\n  playheadClickTolerance: 3,\n  waveformColor: 'rgba(0, 225, 128, 1)',\n  wheelMode: 'none',\n  autoScroll: true,\n  autoScrollOffset: 100,\n  enableEditing: true,\n  spectrogramOpacity: 1,\n  showSpectrogram: true,\n  showWaveform: false\n};\nvar defaultOverviewOptions = {\n  // showPlayheadTime:    false,\n  waveformColor: 'rgba(0, 0, 0, 0.2)',\n  highlightColor: '#aaaaaa',\n  highlightStrokeColor: 'transparent',\n  highlightOpacity: 0.3,\n  highlightOffset: 11,\n  highlightCornerRadius: 2,\n  enableEditing: false\n};\nvar defaultSpectrogramOverviewOptions = {\n  waveformColor: 'rgba(0, 0, 0, 0.2)',\n  highlightColor: '#aaaaaa',\n  highlightStrokeColor: 'transparent',\n  highlightOpacity: 0.3,\n  highlightOffset: 11,\n  highlightCornerRadius: 2,\n  enableEditing: false,\n  spectrogramOpacity: 1,\n  showSpectrogram: true,\n  showWaveform: false\n};\nvar defaultSegmentOptions = {\n  overlay: false,\n  markers: true,\n  startMarkerColor: '#aaaaaa',\n  endMarkerColor: '#aaaaaa',\n  waveformColor: '#0074d9',\n  overlayColor: '#ff0000',\n  overlayOpacity: 0.3,\n  overlayBorderColor: '#ff0000',\n  overlayBorderWidth: 2,\n  overlayCornerRadius: 5,\n  overlayOffset: 25,\n  overlayLabelAlign: 'left',\n  overlayLabelVerticalAlign: 'top',\n  overlayLabelPadding: 8,\n  overlayLabelColor: '#000000',\n  overlayFontFamily: 'sans-serif',\n  overlayFontSize: 12,\n  overlayFontStyle: 'normal'\n};\nvar defaultScrollbarOptions = {\n  color: '#888888',\n  minWidth: 50\n};\nfunction getOverviewOptions(opts) {\n  var overviewOptions = {};\n  if (opts.overview && opts.overview.showPlayheadTime) {\n    overviewOptions.showPlayheadTime = opts.overview.showPlayheadTime;\n  }\n  var optNames = ['container', 'waveformColor', 'playedWaveformColor', 'playheadColor', 'playheadTextColor', 'playheadBackgroundColor', 'playheadPadding', 'playheadWidth', 'formatPlayheadTime', 'timeLabelPrecision', 'axisGridlineColor', 'showAxisLabels', 'axisTopMarkerHeight', 'axisBottomMarkerHeight', 'axisLabelColor', 'formatAxisTime', 'fontFamily', 'fontSize', 'fontStyle', 'highlightColor', 'highlightStrokeColor', 'highlightOpacity', 'highlightCornerRadius', 'highlightOffset', 'enablePoints', 'enableSegments', 'enableEditing'];\n  optNames.forEach(function (optName) {\n    if (opts.overview && objectHasProperty(opts.overview, optName)) {\n      overviewOptions[optName] = opts.overview[optName];\n    } else if (objectHasProperty(opts, optName)) {\n      overviewOptions[optName] = opts[optName];\n    } else if (!objectHasProperty(overviewOptions, optName)) {\n      if (objectHasProperty(defaultOverviewOptions, optName)) {\n        overviewOptions[optName] = defaultOverviewOptions[optName];\n      } else if (objectHasProperty(defaultViewOptions, optName)) {\n        overviewOptions[optName] = defaultViewOptions[optName];\n      }\n    }\n  });\n  return overviewOptions;\n}\nfunction getSpectrogramOverviewOptions(opts) {\n  var spectrogramOverviewOptions = {};\n  if (opts.spectrogramOverview && opts.spectrogramOverview.showPlayheadTime) {\n    spectrogramOverviewOptions.showPlayheadTime = opts.spectrogramOverview.showPlayheadTime;\n  }\n  var optNames = ['container', 'waveformColor', 'playedWaveformColor', 'playheadColor', 'playheadTextColor', 'playheadBackgroundColor', 'playheadPadding', 'playheadWidth', 'formatPlayheadTime', 'timeLabelPrecision', 'axisGridlineColor', 'showAxisLabels', 'axisTopMarkerHeight', 'axisBottomMarkerHeight', 'axisLabelColor', 'formatAxisTime', 'fontFamily', 'fontSize', 'fontStyle', 'highlightColor', 'highlightStrokeColor', 'highlightOpacity', 'highlightCornerRadius', 'highlightOffset', 'enablePoints', 'enableSegments', 'enableEditing', 'spectrogramOpacity', 'showSpectrogram', 'showWaveform'];\n  optNames.forEach(function (optName) {\n    if (opts.spectrogramOverview && objectHasProperty(opts.spectrogramOverview, optName)) {\n      spectrogramOverviewOptions[optName] = opts.spectrogramOverview[optName];\n    } else if (objectHasProperty(opts, optName)) {\n      spectrogramOverviewOptions[optName] = opts[optName];\n    } else if (!objectHasProperty(spectrogramOverviewOptions, optName)) {\n      if (objectHasProperty(defaultSpectrogramOverviewOptions, optName)) {\n        spectrogramOverviewOptions[optName] = defaultSpectrogramOverviewOptions[optName];\n      } else if (objectHasProperty(defaultViewOptions, optName)) {\n        spectrogramOverviewOptions[optName] = defaultViewOptions[optName];\n      }\n    }\n  });\n  return spectrogramOverviewOptions;\n}\nfunction getZoomviewOptions(opts) {\n  var zoomviewOptions = {};\n  if (opts.showPlayheadTime) {\n    zoomviewOptions.showPlayheadTime = opts.showPlayheadTime;\n  } else if (opts.zoomview && opts.zoomview.showPlayheadTime) {\n    zoomviewOptions.showPlayheadTime = opts.zoomview.showPlayheadTime;\n  }\n  var optNames = ['container', 'waveformColor', 'playedWaveformColor', 'playheadColor', 'playheadTextColor', 'playheadBackgroundColor', 'playheadPadding', 'playheadWidth', 'formatPlayheadTime', 'playheadClickTolerance', 'timeLabelPrecision', 'axisGridlineColor', 'showAxisLabels', 'axisTopMarkerHeight', 'axisBottomMarkerHeight', 'axisLabelColor', 'formatAxisTime', 'fontFamily', 'fontSize', 'fontStyle', 'wheelMode', 'autoScroll', 'autoScrollOffset', 'enablePoints', 'enableSegments', 'enableEditing'];\n  optNames.forEach(function (optName) {\n    if (opts.zoomview && objectHasProperty(opts.zoomview, optName)) {\n      zoomviewOptions[optName] = opts.zoomview[optName];\n    } else if (objectHasProperty(opts, optName)) {\n      zoomviewOptions[optName] = opts[optName];\n    } else if (!objectHasProperty(zoomviewOptions, optName)) {\n      if (objectHasProperty(defaultZoomviewOptions, optName)) {\n        zoomviewOptions[optName] = defaultZoomviewOptions[optName];\n      } else if (objectHasProperty(defaultViewOptions, optName)) {\n        zoomviewOptions[optName] = defaultViewOptions[optName];\n      }\n    }\n  });\n  return zoomviewOptions;\n}\nfunction getSpectrogramZoomviewOptions(opts) {\n  var spectrogramZoomviewOptions = {};\n  if (opts.showPlayheadTime) {\n    spectrogramZoomviewOptions.showPlayheadTime = opts.showPlayheadTime;\n  } else if (opts.spectrogramZoomview && opts.spectrogramZoomview.showPlayheadTime) {\n    spectrogramZoomviewOptions.showPlayheadTime = opts.spectrogramZoomview.showPlayheadTime;\n  }\n  var optNames = ['container', 'waveformColor', 'playedWaveformColor', 'playheadColor', 'playheadTextColor', 'playheadBackgroundColor', 'playheadPadding', 'playheadWidth', 'formatPlayheadTime', 'playheadClickTolerance', 'timeLabelPrecision', 'axisGridlineColor', 'showAxisLabels', 'axisTopMarkerHeight', 'axisBottomMarkerHeight', 'axisLabelColor', 'formatAxisTime', 'fontFamily', 'fontSize', 'fontStyle', 'wheelMode', 'autoScroll', 'autoScrollOffset', 'enablePoints', 'enableSegments', 'enableEditing', 'showSpectrogram', 'showWaveform', 'spectrogramOpacity'];\n  optNames.forEach(function (optName) {\n    if (opts.spectrogramZoomview && objectHasProperty(opts.spectrogramZoomview, optName)) {\n      spectrogramZoomviewOptions[optName] = opts.spectrogramZoomview[optName];\n    } else if (objectHasProperty(opts, optName)) {\n      spectrogramZoomviewOptions[optName] = opts[optName];\n    } else if (!objectHasProperty(spectrogramZoomviewOptions, optName)) {\n      if (objectHasProperty(defaultSpectrogramZoomviewOptions, optName)) {\n        spectrogramZoomviewOptions[optName] = defaultSpectrogramZoomviewOptions[optName];\n      } else if (objectHasProperty(defaultViewOptions, optName)) {\n        spectrogramZoomviewOptions[optName] = defaultViewOptions[optName];\n      }\n    }\n  });\n  return spectrogramZoomviewOptions;\n}\nfunction getScrollbarOptions(opts) {\n  if (!objectHasProperty(opts, 'scrollbar')) {\n    return null;\n  }\n  var scrollbarOptions = {};\n  var optNames = ['container', 'color', 'minWidth'];\n  optNames.forEach(function (optName) {\n    if (objectHasProperty(opts.scrollbar, optName)) {\n      scrollbarOptions[optName] = opts.scrollbar[optName];\n    } else {\n      scrollbarOptions[optName] = defaultScrollbarOptions[optName];\n    }\n  });\n  return scrollbarOptions;\n}\nfunction extendOptions(to, from) {\n  for (var key in from) {\n    if (objectHasProperty(from, key) && objectHasProperty(to, key)) {\n      to[key] = from[key];\n    }\n  }\n  return to;\n}\nfunction addSegmentOptions(options, opts) {\n  options.segmentOptions = {};\n  extend(options.segmentOptions, defaultSegmentOptions);\n  if (opts.segmentOptions) {\n    extendOptions(options.segmentOptions, opts.segmentOptions);\n  }\n  options.zoomview.segmentOptions = {};\n  extend(options.zoomview.segmentOptions, options.segmentOptions);\n  if (opts.zoomview && opts.zoomview.segmentOptions) {\n    extendOptions(options.zoomview.segmentOptions, opts.zoomview.segmentOptions);\n  }\n  options.overview.segmentOptions = {};\n  extend(options.overview.segmentOptions, options.segmentOptions);\n  if (opts.overview && opts.overview.segmentOptions) {\n    extendOptions(options.overview.segmentOptions, opts.overview.segmentOptions);\n  }\n  options.spectrogramOverview.segmentOptions = {};\n  extend(options.spectrogramOverview.segmentOptions, options.segmentOptions);\n  if (opts.spectrogramOverview && opts.spectrogramOverview.segmentOptions) {\n    extendOptions(options.spectrogramOverview.segmentOptions, opts.spectrogramOverview.segmentOptions);\n  }\n  options.spectrogramZoomview.segmentOptions = {};\n  extend(options.spectrogramZoomview.segmentOptions, options.segmentOptions);\n  if (opts.spectrogramZoomview && opts.spectrogramZoomview.segmentOptions) {\n    extendOptions(options.spectrogramZoomview.segmentOptions, opts.spectrogramZoomview.segmentOptions);\n  }\n}\nfunction checkContainerElements(options) {\n  var zoomviewContainer = options.zoomview.container;\n  var spectrogramZoomviewContainer = options.spectrogramZoomview.container;\n  var overviewContainer = options.overview.container;\n  var spectrogramOverviewContainer = options.spectrogramOverview.container;\n  if (!isHTMLElement(zoomviewContainer) && !isHTMLElement(overviewContainer) && !isHTMLElement(spectrogramZoomviewContainer) && !isHTMLElement(spectrogramOverviewContainer)) {\n    // eslint-disable-next-line @stylistic/js/max-len\n    return new TypeError('Peaks.init(): The zoomview and/or overview container options must be valid HTML elements');\n  }\n  if (zoomviewContainer && (zoomviewContainer.clientWidth <= 0 || zoomviewContainer.clientHeight <= 0)) {\n    // eslint-disable-next-line @stylistic/js/max-len\n    return new Error('Peaks.init(): The zoomview container must be visible and have non-zero width and height');\n  }\n  if (overviewContainer && (overviewContainer.clientWidth <= 0 || overviewContainer.clientHeight <= 0)) {\n    // eslint-disable-next-line @stylistic/js/max-len\n    return new Error('Peaks.init(): The overview container must be visible and have non-zero width and height');\n  }\n  if (spectrogramZoomviewContainer && (spectrogramZoomviewContainer.clientWidth <= 0 || spectrogramZoomviewContainer.clientHeight <= 0)) {\n    // eslint-disable-next-line @stylistic/js/max-len\n    return new Error('Peaks.init(): The spectrogram zoomview container must be visible and have non-zero width and height');\n  }\n  if (spectrogramOverviewContainer && (spectrogramOverviewContainer.clientWidth <= 0 || spectrogramOverviewContainer.clientHeight <= 0)) {\n    // eslint-disable-next-line @stylistic/js/max-len\n    return new Error('Peaks.init(): The spectrogram overview container must be visible and have non-zero width and height');\n  }\n}\n\n/**\n * Creates and initialises a new Peaks instance with the given options.\n *\n * @param {Object} opts Configuration options\n * @param {Function} callback\n *\n * @return {Peaks}\n */\n\nPeaks.init = function (opts, callback) {\n  if (!callback) {\n    throw new Error('Peaks.init(): Missing callback function');\n  }\n  var instance = new Peaks();\n  var err = instance._setOptions(opts);\n  if (!err) {\n    err = checkContainerElements(instance.options);\n  }\n  if (err) {\n    callback(err);\n    return;\n  }\n  var scrollbarContainer = null;\n  if (instance.options.scrollbar) {\n    scrollbarContainer = instance.options.scrollbar.container;\n    if (!isHTMLElement(scrollbarContainer)) {\n      // eslint-disable-next-line @stylistic/js/max-len\n      callback(new TypeError('Peaks.init(): The scrollbar container option must be a valid HTML element'));\n      return;\n    }\n    if (scrollbarContainer.clientWidth <= 0) {\n      // eslint-disable-next-line @stylistic/js/max-len\n      callback(new TypeError('Peaks.init(): The scrollbar container must be visible and have non-zero width'));\n      return;\n    }\n  }\n  if (opts.keyboard) {\n    instance._keyboardHandler = new KeyboardHandler(instance);\n  }\n  var player = opts.player ? opts.player : new MediaElementPlayer(instance.options.mediaElement);\n  instance.player = new Player(instance, player);\n  instance.segments = new WaveformSegments(instance);\n  instance.points = new WaveformPoints(instance);\n  instance.zoom = new ZoomController(instance, instance.options.zoomLevels);\n  instance.views = new ViewController(instance);\n\n  // Setup the UI components\n  instance._waveformBuilder = new WaveformBuilder(instance);\n  instance.player.init(instance).then(function () {\n    instance._waveformBuilder.init(instance.options, function (err, waveformData) {\n      if (err) {\n        callback(err);\n        return;\n      }\n      err = checkContainerElements(instance.options);\n      if (err) {\n        callback(err);\n        return;\n      }\n      instance._waveformBuilder = null;\n      instance._waveformData = waveformData;\n      instance._spectrogramData = instance.options.spectrogramData;\n      var zoomviewContainer = instance.options.zoomview.container;\n      var spectrogramZoomviewContainer = instance.options.spectrogramZoomview.container;\n      var overviewContainer = instance.options.overview.container;\n      var spectrogramOverviewContainer = instance.options.spectrogramOverview.container;\n      if (zoomviewContainer) {\n        instance.views.createZoomview(zoomviewContainer);\n      }\n      if (spectrogramZoomviewContainer) {\n        instance.views.createSpectrogramZoomview(spectrogramZoomviewContainer);\n      }\n      if (overviewContainer) {\n        instance.views.createOverview(overviewContainer);\n      }\n      if (spectrogramOverviewContainer) {\n        instance.views.createSpectrogramOverview(spectrogramOverviewContainer);\n      }\n      if (scrollbarContainer) {\n        instance.views.createScrollbar(scrollbarContainer);\n      }\n      if (opts.segments) {\n        instance.segments.add(opts.segments);\n      }\n      if (opts.points) {\n        instance.points.add(opts.points);\n      }\n      if (opts.emitCueEvents) {\n        instance._cueEmitter = new CueEmitter(instance);\n      }\n      callback(null, instance);\n    });\n  }).catch(function (err) {\n    callback(err);\n  });\n};\nPeaks.prototype._setOptions = function (opts) {\n  if (!isObject(opts)) {\n    return new TypeError('Peaks.init(): The options parameter should be an object');\n  }\n  if (!opts.player) {\n    if (!opts.mediaElement) {\n      return new Error('Peaks.init(): Missing mediaElement option');\n    }\n    if (!(opts.mediaElement instanceof HTMLMediaElement)) {\n      return new TypeError('Peaks.init(): The mediaElement option should be an HTMLMediaElement');\n    }\n  }\n  if (opts.logger && !isFunction(opts.logger)) {\n    return new TypeError('Peaks.init(): The logger option should be a function');\n  }\n  if (opts.segments && !Array.isArray(opts.segments)) {\n    return new TypeError('Peaks.init(): options.segments must be an array of segment objects');\n  }\n  if (opts.points && !Array.isArray(opts.points)) {\n    return new TypeError('Peaks.init(): options.points must be an array of point objects');\n  }\n  extendOptions(this.options, opts);\n  this.options.overview = getOverviewOptions(opts);\n  this.options.spectrogramOverview = getSpectrogramOverviewOptions(opts);\n  this.options.zoomview = getZoomviewOptions(opts);\n  this.options.spectrogramZoomview = getSpectrogramZoomviewOptions(opts);\n  this.options.scrollbar = getScrollbarOptions(opts);\n  addSegmentOptions(this.options, opts);\n  if (!Array.isArray(this.options.zoomLevels)) {\n    return new TypeError('Peaks.init(): The zoomLevels option should be an array');\n  } else if (this.options.zoomLevels.length === 0) {\n    return new Error('Peaks.init(): The zoomLevels array must not be empty');\n  } else {\n    if (!isInAscendingOrder(this.options.zoomLevels)) {\n      return new Error('Peaks.init(): The zoomLevels array must be sorted in ascending order');\n    }\n  }\n  this._logger = this.options.logger;\n};\n\n/**\n * Remote waveform data options for [Peaks.setSource]{@link Peaks#setSource}.\n *\n * @typedef {Object} RemoteWaveformDataOptions\n * @global\n * @property {String=} arraybuffer\n * @property {String=} json\n */\n\n/**\n * Local waveform data options for [Peaks.setSource]{@link Peaks#setSource}.\n *\n * @typedef {Object} LocalWaveformDataOptions\n * @global\n * @property {ArrayBuffer=} arraybuffer\n * @property {Object=} json\n */\n\n/**\n * Web Audio options for [Peaks.setSource]{@link Peaks#setSource}.\n *\n * @typedef {Object} WebAudioOptions\n * @global\n * @property {AudioContext=} audioContext\n * @property {AudioBuffer=} audioBuffer\n * @property {Number=} scale\n * @property {Boolean=} multiChannel\n */\n\n/**\n * Options for [Peaks.setSource]{@link Peaks#setSource}.\n *\n * @typedef {Object} PeaksSetSourceOptions\n * @global\n * @property {String=} mediaUrl\n * @property {RemoteWaveformDataOptions=} dataUri\n * @property {LocalWaveformDataOptions=} waveformData\n * @property {WebAudioOptions=} webAudio\n * @property {Boolean=} withCredentials\n * @property {Array<Number>=} zoomLevels\n */\n\n/**\n * Changes the audio or video media source associated with the {@link Peaks}\n * instance.\n *\n * @see SetSourceHandler\n *\n * @param {PeaksSetSourceOptions} options\n * @param {Function} callback\n */\n\nPeaks.prototype.setSource = function (options, callback) {\n  var self = this;\n  self.player._setSource(options).then(function () {\n    if (!options.zoomLevels) {\n      options.zoomLevels = self.options.zoomLevels;\n    }\n    self._waveformBuilder = new WaveformBuilder(self);\n    self._waveformBuilder.init(options, function (err, waveformData) {\n      if (err) {\n        callback(err);\n        return;\n      }\n      self._waveformBuilder = null;\n      self._waveformData = waveformData;\n      ['overview', 'zoomview'].forEach(function (viewName) {\n        var view = self.views.getView(viewName);\n        if (view) {\n          view.setWaveformData(waveformData);\n        }\n      });\n      ['spectrogramOverview', 'spectrogramZoomview'].forEach(function (viewName) {\n        var view = self.views.getView(viewName);\n        if (view) {\n          view.setWaveformData(waveformData);\n          view.setSpectrogramData(options.spectrogramData);\n        }\n      });\n      self.zoom.setZoomLevels(options.zoomLevels);\n      callback();\n    });\n  }).catch(function (err) {\n    callback(err);\n  });\n};\nPeaks.prototype.getWaveformData = function () {\n  return this._waveformData;\n};\nPeaks.prototype.getSpectrogramData = function () {\n  return this._spectrogramData;\n};\n\n/**\n * Cleans up a Peaks instance after use.\n */\n\nPeaks.prototype.destroy = function () {\n  if (this._waveformBuilder) {\n    this._waveformBuilder.abort();\n  }\n  if (this._keyboardHandler) {\n    this._keyboardHandler.destroy();\n  }\n  if (this.views) {\n    this.views.destroy();\n  }\n  if (this.player) {\n    this.player.destroy();\n  }\n  if (this._cueEmitter) {\n    this._cueEmitter.destroy();\n  }\n};\n\nexport { Peaks as default };\n","const colors = {\n  primaryColorDefault: 'rgb(0,0,89)',\n  primaryColorDark: 'rgb(187,255,187)',\n};\n\nexport default colors;\n","import colors from '@/components/colors';\n\nconst options = {\n  spectrogramZoomview: {\n    showWaveform: true,\n    waveformColor: colors.primaryColorDark,\n    playheadColor: '#fff',\n    playheadTextColor: '#fff',\n    axisGridlineColor: '#fff',\n    axisLabelColor: '#fff',\n  },\n  spectrogramOverview: {\n    showWaveform: true,\n    waveformColor: colors.primaryColorDark,\n    playheadColor: '#fff',\n    playheadTextColor: '#fff',\n    axisGridlineColor: '#fff',\n    axisLabelColor: '#fff',\n  },\n  segmentOptions: {\n    overlay: true,\n    overlayColor: 'rgb(255, 218, 187)',\n    overlayOpacity: 0.3,\n    overlayBorderColor: '#ffffff',\n    overlayBorderWidth: 2,\n    overlayCornerRadius: 0,\n    // Segment overlay offset from the top and bottom of the waveform view, in pixels\n    overlayOffset: 10,\n  },\n\n  zoomLevels: [512, 1024, 2048, 4096, 8192, 16384, 32768],\n\n  waveformColor: colors.primaryColorDark,\n  playheadColor: colors.primaryColorDark,\n};\n\nexport default options;\n","<template>\n  <Loading v-if=\"isLoading\" />\n  <div id=\"peaks-container\" :class=\"{ loading: isLoading }\">\n    <div id=\"zoom\" ref=\"zoomviewContainerRef\"></div>\n    <div id=\"overview\" ref=\"overviewContainerRef\"></div>\n    <audio ref=\"audioRef\" @ended=\"onEnded()\"></audio>\n  </div>\n</template>\n\n<script setup>\nimport { computed, ref, onMounted, watch } from 'vue';\nimport { useStore } from 'vuex';\nimport { Duration } from 'luxon';\n// eslint-disable-next-line import/extensions\nimport Peaks from '@/3rd_party/peaks.esm.js';\n\nimport Loading from '@/views/Loading.vue';\nimport peaksOptions from '@/components/peaks-options';\n\nimport debug from '@/debug';\n\nconst props = defineProps({\n  audio: {\n    type: Object,\n    default: null,\n  },\n});\n\ndefineEmits(['onSegmentEnter', 'onSegmentExit', 'onSegmentDragend']);\n\nconst store = useStore();\n\nconst SPECTROGRAM_WIDTH = 4999;\nconst SPECTROGRAM_HEIGHT = 513;\n\n// refs\nconst loading = ref(false);\nconst zoomviewContainerRef = ref(null);\nconst overviewContainerRef = ref(null);\nconst audioRef = ref(null);\n\nconst OFFSET = 10 * 60; // 10 minutes offset for axis label\n\nlet peaks = null;\n\n// computed\nconst annotations = computed(() => store.getters['annotation/annotations']);\nconst isPlaying = computed(() => store.getters['player/isPlaying']);\nconst zoomLevel = computed(() => store.getters['player/zoomLevel']);\nconst doSeek = computed(() => store.getters['player/doSeek']);\nconst waveformEnabled = computed(() => store.getters['player/waveformEnabled']);\nconst spectrogramEnabled = computed(\n  () => store.getters['player/spectrogramEnabled']\n);\nconst editorUuid = computed(() => {\n  const editor = store.getters['annotation/editor'];\n  if (editor !== null) {\n    return editor.uuid;\n  }\n  return null;\n});\nconst isLoading = computed(() => {\n  return loading.value === true;\n});\n\n// functions\nfunction onEnded() {\n  store.dispatch('player/pause');\n}\n\nfunction initializeSegments() {\n  peaks.segments.removeAll();\n  // add segments\n  annotations.value.forEach((annotation) => {\n    peaks.segments.add({\n      startTime: annotation.start,\n      endTime: annotation.end,\n      editable: annotation.uuid === editorUuid.value,\n      uuid: annotation.uuid,\n    });\n  });\n}\n\nfunction onSetSource(error) {\n  if (error) {\n    console.warn(`Failed to set source for Peaks instance: ${error.message}`);\n    return;\n  }\n  if (debug) {\n    console.log('Successfully set source.');\n  }\n\n  // set zoom here (bug)\n  const zoomView = peaks.views.getView('spectrogramZoomview');\n  const level = store.getters['player/zoomLevel'];\n  zoomView.setZoom({ seconds: level });\n\n  // initialize  segments\n  initializeSegments();\n\n  // set offset\n  const offset = store.getters['player/offsetSeconds'];\n  if (offset !== 0) {\n    if (debug) {\n      console.log(`seek to ${offset}`);\n    }\n    peaks.player.seek(offset);\n  }\n  // start play?\n  if (isPlaying.value) {\n    peaks.player.play();\n  } else {\n    peaks.player.pause();\n  }\n\n  // set loading to false\n  loading.value = false;\n}\n\nfunction toggleWaveform(enabled) {\n  if (enabled) {\n    peaks.views.getView('spectrogramZoomview').setWaveformOpacity(1.0);\n    peaks.views.getView('spectrogramOverview').setWaveformOpacity(1.0);\n  } else {\n    peaks.views.getView('spectrogramZoomview').setWaveformOpacity(0.0);\n    peaks.views.getView('spectrogramOverview').setWaveformOpacity(0.0);\n  }\n}\n\nfunction toggleSpectrogram(enabled) {\n  if (enabled) {\n    peaks.views.getView('spectrogramZoomview').setOpacity(1.0);\n    peaks.views.getView('spectrogramOverview').setOpacity(1.0);\n  } else {\n    peaks.views.getView('spectrogramZoomview').setOpacity(0.0);\n    peaks.views.getView('spectrogramOverview').setOpacity(0.0);\n  }\n}\n\nonMounted(() => {\n  const options = { ...peaksOptions };\n  // assign template refs to peaks.js containers / media elment\n  options.spectrogramZoomview.container = zoomviewContainerRef.value;\n  options.spectrogramOverview.container = overviewContainerRef.value;\n  options.mediaElement = audioRef.value;\n  // dataUri is required to render a waveform on init\n  options.dataUri = {\n    json: props.audio.peaks,\n  };\n  options.formatAxisTime = (time) => {\n    return Duration.fromObject({ seconds: time + OFFSET }).toFormat('mm:ss');\n  };\n\n  options.spectrogramData = {\n    image: props.audio.default_spectrogram,\n    crop: {\n      x: 58,\n      y: 30,\n      width: SPECTROGRAM_WIDTH,\n      height: SPECTROGRAM_HEIGHT,\n    },\n  };\n\n  options.mediaUrl = props.audio.file;\n\n  Peaks.init(options, (error, instance) => {\n    if (error) {\n      if (debug) {\n        console.warn(`Failed to initialize Peaks instance: ${error.message}`);\n      }\n    } else {\n      if (debug) {\n        console.log('Initialized Peaks instance');\n      }\n      peaks = instance;\n\n      peaks.on('player.timeupdate', (time) => {\n        store.commit('player/setOffsetSeconds', time);\n      });\n\n      peaks.on('segments.enter', (ev) => {\n        store.commit('annotation/addSegment', ev.segment);\n      });\n      peaks.on('segments.exit', (ev) => {\n        store.commit('annotation/removeSegment', ev.segment);\n      });\n\n      peaks.on('segments.dragend', (ev) => {\n        store.commit('annotation/onSegmentDragEnd', ev);\n      });\n\n      // const zoomView = instance.views.getView('spectrogramZoomview');\n      // zoomView.setAmplitudeScale(1.0);\n\n      if (!waveformEnabled.value) {\n        toggleWaveform(false);\n      }\n\n      if (!spectrogramEnabled.value) {\n        toggleSpectrogram(false);\n      }\n\n      peaks.setSource(options, onSetSource);\n    }\n  });\n});\n\n// watchers\nwatch(isPlaying, (playing) => {\n  if (playing === true) {\n    peaks.player.play();\n  } else {\n    peaks.player.pause();\n  }\n});\n\nwatch(doSeek, (seek) => {\n  if (seek !== null) {\n    loading.value = true;\n    peaks.player.seek(seek);\n    loading.value = false;\n    store.commit('player/doSeek', null);\n  }\n});\n\nwatch(zoomLevel, (level) => {\n  const zoomView = peaks.views.getView('spectrogramZoomview');\n  zoomView.setZoom({ seconds: level });\n});\n\nwatch(waveformEnabled, (enabled) => {\n  toggleWaveform(enabled);\n});\n\nwatch(spectrogramEnabled, (enabled) => {\n  toggleSpectrogram(enabled);\n});\n\nwatch(\n  editorUuid,\n  (uuid) => {\n    if (debug) {\n      console.log('editor changed to:', uuid);\n    }\n    if (peaks === null) {\n      return;\n    }\n\n    // re-initialize segments to set 'editable' segment\n    initializeSegments();\n\n    // hack to add new segment based on uuid\n    if (uuid === 'NEW_ITEM') {\n      peaks.segments.add({\n        startTime: store.getters['player/offsetSeconds'],\n        endTime: store.getters['player/offsetSeconds'] + 1,\n        editable: true,\n      });\n    }\n  },\n  { deep: true }\n);\n</script>\n\n<style lang=\"scss\" scoped>\n#wrapper {\n  position: relative;\n}\n.loading {\n  filter: blur(5px);\n}\n#zoom {\n  height: 400px;\n  margin-bottom: 20px;\n}\n#overview {\n  height: 50px;\n}\n</style>\n","<template>\n  <div class=\"wrapper\">\n    <div v-if=\"annotation\">\n      <n-space justify=\"center\" style=\"padding: 10px 0\">\n        <n-ellipsis expand-trigger=\"click\" line-clamp=\"2\" :tooltip=\"false\">\n          {{ annotation.author }}: {{ annotation.content }}\n        </n-ellipsis>\n        <n-tag\n          v-for=\"keyword in annotation.keywords\"\n          :key=\"keyword\"\n          :bordered=\"false\"\n          type=\"info\"\n          size=\"small\"\n        >\n          <router-link\n            :to=\"{\n              name: 'annotation',\n              query: { keyword: keyword.slug },\n            }\"\n          >\n            #{{ keyword.name }}\n          </router-link>\n        </n-tag>\n\n        <n-tag\n          v-for=\"category in annotation.categories\"\n          :key=\"category\"\n          :bordered=\"false\"\n          type=\"success\"\n          size=\"small\"\n        >\n          <router-link\n            :to=\"{\n              name: 'annotation',\n              query: { category: category.value },\n            }\"\n          >\n            {{ category.name }}\n          </router-link>\n        </n-tag>\n      </n-space>\n    </div>\n  </div>\n</template>\n\n<script setup>\nimport { computed } from 'vue';\nimport { useStore } from 'vuex';\nimport { NEllipsis, NTag, NSpace } from 'naive-ui';\n\nconst store = useStore();\n\nconst annotation = computed(() => {\n  return store.getters['annotation/currentAnnotation'];\n});\n</script>\n\n<style lang=\"scss\" scoped>\n.wrapper {\n  min-height: 50px;\n  margin: 10px;\n}\n</style>\n","import { client, handleError } from './client';\n\nconst Category = {\n  async get(url, params) {\n    try {\n      const request = await client.get(`${url}`, {\n        params,\n      });\n      return request.data;\n    } catch (error) {\n      return handleError(error);\n    }\n  },\n  async filter(params) {\n    try {\n      const request = await client.get('classification/category/', {\n        params,\n      });\n      return request.data.results; // ignore pagination for now (only return first page)\n    } catch (error) {\n      return handleError(error);\n    }\n  },\n  async all() {\n    return this.filter({});\n  },\n};\n\nconst Keyword = {\n  async get(url, params) {\n    try {\n      const request = await client.get(`${url}`, {\n        params,\n      });\n      return request.data;\n    } catch (error) {\n      return handleError(error);\n    }\n  },\n  async filter(params) {\n    try {\n      const request = await client.get('classification/keyword/', {\n        params,\n      });\n      return request.data.results; // ignore pagination for now (only return first page)\n    } catch (error) {\n      return handleError(error);\n    }\n  },\n  async all() {\n    return this.filter({});\n  },\n};\n\nconst Author = {\n  async get(url, params) {\n    try {\n      const request = await client.get(`${url}`, {\n        params,\n      });\n      return request.data;\n    } catch (error) {\n      return handleError(error);\n    }\n  },\n  async filter(params) {\n    try {\n      const request = await client.get('classification/author/', {\n        params,\n      });\n      return request.data.results; // ignore pagination for now (only return first page)\n    } catch (error) {\n      return handleError(error);\n    }\n  },\n  async all() {\n    return this.filter({});\n  },\n};\n\nconst Signal = {\n  async filter(params) {\n    try {\n      const request = await client.get('classification/signal/', {\n        params,\n      });\n      return request.data;\n    } catch (error) {\n      return handleError(error);\n    }\n  },\n  async all() {\n    return this.filter({});\n  },\n};\n\nexport { Category, Keyword, Author, Signal };\n","<template>\n  <div class=\"wrapper\">\n    <n-card>\n      <n-tabs\n        class=\"card-tabs\"\n        default-value=\"content\"\n        size=\"small\"\n        animated\n        style=\"margin: 0 -4px\"\n        pane-style=\"padding-left: 4px; padding-right: 4px; padding-top: 14px; box-sizing: border-box;\"\n      >\n        <n-tab-pane name=\"content\" tab=\"Content\">\n          <n-form>\n            <n-form-item label=\"Annotation\" label-placement=\"top\">\n              <n-input v-model:value=\"content\" type=\"textarea\" />\n            </n-form-item>\n          </n-form>\n          <n-form inline label-placement=\"top\">\n            <n-form-item label=\"Start\">\n              <n-input-number v-model:value=\"editor.start\" :readonly=\"true\" />\n            </n-form-item>\n            <n-form-item label=\"End\">\n              <n-input-number v-model:value=\"editor.end\" :readonly=\"true\" />\n            </n-form-item>\n            <n-form-item label=\"Duration\">\n              <n-input-number\n                :value=\"editor.end - editor.start\"\n                :readonly=\"true\"\n              />\n            </n-form-item>\n          </n-form>\n        </n-tab-pane>\n        <n-tab-pane name=\"classification\" tab=\"Classification\">\n          <n-form label-placement=\"left\">\n            <n-form-item label=\"Category\">\n              <n-select\n                v-model:value=\"selectedCategories\"\n                :options=\"categoriesOptions\"\n                :consistent-menu-width=\"false\"\n                multiple\n                placement=\"bottom-start\"\n              />\n            </n-form-item>\n          </n-form>\n\n          <n-form label-placement=\"left\">\n            <n-form-item label=\"Keyword\">\n              <n-select\n                v-model:value=\"selectedKeywords\"\n                :options=\"keywordsOptions\"\n                :consistent-menu-width=\"false\"\n                multiple\n                filterable\n                tag\n                :loading=\"keywordsLoading\"\n                placement=\"bottom-start\"\n              />\n            </n-form-item>\n          </n-form>\n        </n-tab-pane>\n        <template #suffix>\n          <n-button-group>\n            <n-button type=\"primary\" @click=\"onSave\">Save</n-button>\n            <n-popconfirm :show-icon=\"false\" @positive-click=\"onDelete\">\n              <template #trigger>\n                <n-button type=\"error\">\n                  <template #icon>\n                    <n-icon>\n                      <delete-16-regular />\n                    </n-icon>\n                  </template>\n                </n-button>\n              </template>\n              Delete?\n            </n-popconfirm>\n            <n-button type=\"secondary\" @click=\"onCancel\">Cancel</n-button>\n          </n-button-group>\n        </template>\n      </n-tabs>\n    </n-card>\n  </div>\n</template>\n<script setup>\nimport { ref, computed, onMounted, watch } from 'vue';\nimport { useStore } from 'vuex';\n\nimport {\n  NCard,\n  NTabs,\n  NTabPane,\n  NPopconfirm,\n  NForm,\n  NFormItem,\n  NInput,\n  NInputNumber,\n  NSelect,\n  NButton,\n  NButtonGroup,\n  NIcon,\n} from 'naive-ui';\n\nimport { Delete16Regular } from '@vicons/fluent';\n\nimport { Category, Keyword } from '@/api/classification';\n\nconst emit = defineEmits(['onSave', 'onCancel', 'onDelete']);\n\nconst content = ref(null);\nconst categories = ref([]);\nconst selectedCategories = ref([]);\nconst keywords = ref([]);\nconst selectedKeywords = ref([]);\nconst keywordsLoading = ref(false);\n\nconst store = useStore();\n\nconst editor = store.getters['annotation/editor'];\n\nasync function setData() {\n  content.value = editor.content;\n  if (editor.categories) {\n    // v-model corresponds to the options 'value' property\n    selectedCategories.value = editor.categories.map((c) => c.value);\n  }\n  if (editor.keywords) {\n    // v-model corresponds to the options 'value' property\n    selectedKeywords.value = editor.keywords.map((k) => k.name);\n  }\n}\n\nwatch(() => editor, setData, { deep: true });\n\nonMounted(async () => {\n  setData();\n  categories.value = await Category.all();\n  keywords.value = await Keyword.all();\n});\n\nconst categoriesOptions = computed(() => {\n  if (categories.value === null) {\n    return [];\n  }\n  return categories.value.map((c) => ({\n    label: c.name,\n    value: c.value,\n  }));\n});\n\nconst keywordsOptions = computed(() => {\n  if (keywords.value === null) {\n    return [];\n  }\n  return keywords.value.map((k) => ({\n    label: k.name,\n    value: k.name, // value is not the slug as it can be a 'new' keyword that has no slug yet\n  }));\n});\n\nasync function onSave() {\n  await store.dispatch('annotation/saveAnnotation', {\n    content: content.value,\n    categories: selectedCategories.value,\n    keywords: selectedKeywords.value,\n  });\n  emit('onSave');\n}\n\nasync function onDelete() {\n  await store.dispatch('annotation/deleteAnnotation', {});\n  emit('onDelete');\n}\nasync function onCancel() {\n  emit('onCancel');\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.wrapper {\n  min-height: 25px;\n  margin: 10px;\n  text-align: left;\n}\n</style>\n","<template>\n  <div v-if=\"annotations\" ref=\"tableContainer\">\n    <n-space>\n      <n-button\n        v-if=\"withCreate\"\n        round\n        tertiary\n        type=\"primary\"\n        size=\"medium\"\n        style=\"margin-bottom: 10px\"\n        @click=\"() => onNewClicked()\"\n      >\n        <template #icon>\n          <n-icon>\n            <add-20-regular />\n          </n-icon>\n        </template>\n        New\n      </n-button>\n    </n-space>\n    <table class=\"n-base-table\">\n      <thead>\n        <tr>\n          <th v-if=\"withSpectrogram\">Spectrogram</th>\n          <th style=\"cursor: pointer\" @click=\"toggleSort('created')\">\n            Date <span>{{ sortIndicator('created') }}</span>\n          </th>\n          <th>Author / Annotation</th>\n          <th\n            v-if=\"showSignal\"\n            style=\"cursor: pointer\"\n            @click=\"toggleSort('signal')\"\n          >\n            Signal <span>{{ sortIndicator('signal') }}</span>\n          </th>\n          <th\n            v-if=\"showDate\"\n            style=\"cursor: pointer\"\n            @click=\"toggleSort('recordingDate')\"\n          >\n            Recording Date <span>{{ sortIndicator('recordingDate') }}</span>\n          </th>\n          <th v-if=\"showKeywords\">Keywords</th>\n          <th>Action</th>\n        </tr>\n      </thead>\n      <tbody>\n        <tr v-for=\"annotation in paginatedAnnotations\" :key=\"annotation.id\">\n          <td v-if=\"withSpectrogram\">\n            <NImage :src=\"annotation.recording.spectrogram\" width=\"250\" />\n          </td>\n          <td>{{ fmtDate(annotation.created) }}</td>\n          <td>\n            <div>\n              <i>{{ annotation.author }}</i>\n            </div>\n            <div>{{ annotation.content }}</div>\n          </td>\n          <td v-if=\"showSignal\">\n            <a\n              style=\"cursor: pointer\"\n              @click=\"() => onSignalClicked(annotation.recording.signal)\"\n            >\n              {{ annotation.recording.signal }}\n            </a>\n          </td>\n          <td v-if=\"showDate\">{{ fmtDate(annotation.recording.date) }}</td>\n          <td v-if=\"showKeywords\">\n            <NSpace>\n              <NTag\n                v-for=\"keyword in annotation.keywords\"\n                :key=\"keyword.slug\"\n                type=\"info\"\n                size=\"small\"\n                style=\"cursor: pointer\"\n                @click=\"() => onKeywordClicked(keyword.slug)\"\n              >\n                #{{ keyword.name }}\n              </NTag>\n            </NSpace>\n          </td>\n          <td>\n            <NSpace>\n              <NButton\n                size=\"small\"\n                tertiary\n                @click=\"() => onViewClicked(annotation)\"\n              >\n                Listen\n              </NButton>\n              <NButton\n                v-if=\"annotation.editable && withEdit\"\n                size=\"small\"\n                tertiary\n                @click=\"() => onEditClicked(annotation)\"\n              >\n                Edit\n              </NButton>\n              <NPopover trigger=\"click\">\n                <template #trigger>\n                  <NButton size=\"small\" tertiary>Share</NButton>\n                </template>\n                <template #default>\n                  <NInputGroup>\n                    <NInput\n                      :value=\"shareUrl(annotation)\"\n                      focusable\n                      :autosize=\"true\"\n                    />\n                    <NButton\n                      ghost\n                      @click=\"() => copyToClipboard(shareUrl(annotation))\"\n                    >\n                      Copy\n                    </NButton>\n                  </NInputGroup>\n                </template>\n              </NPopover>\n            </NSpace>\n          </td>\n        </tr>\n      </tbody>\n    </table>\n\n    <!-- Pagination -->\n    <NSpace\n      v-if=\"totalPages > 1\"\n      justify=\"center\"\n      class=\"pagination\"\n      style=\"margin-top: 1em\"\n    >\n      <NButton\n        size=\"small\"\n        tertiary\n        :disabled=\"currentPage === 1\"\n        @click=\"() => onPageChanged(currentPage - 1)\"\n      >\n        Previous\n      </NButton>\n\n      <span style=\"margin: 0 0.5em\"\n        >Page {{ currentPage }} of {{ totalPages }}</span\n      >\n\n      <NButton\n        size=\"small\"\n        tertiary\n        :disabled=\"currentPage === totalPages\"\n        @click=\"() => onPageChanged(currentPage + 1)\"\n      >\n        Next\n      </NButton>\n    </NSpace>\n  </div>\n</template>\n\n<script setup>\nimport { ref, computed, watch } from 'vue';\nimport { useRouter, useRoute } from 'vue-router';\nimport {\n  NSpace,\n  NButton,\n  NInputGroup,\n  NTag,\n  NInput,\n  NPopover,\n  NIcon,\n  NImage,\n} from 'naive-ui';\n\nimport { Add20Regular } from '@vicons/fluent';\n\nimport { DateTime } from 'luxon';\n\nconst props = defineProps({\n  annotations: { type: Array, default: null },\n  withSpectrogram: { type: Boolean, default: false },\n  withCreate: { type: Boolean, default: false },\n  withEdit: { type: Boolean, default: true },\n});\n\nconst emit = defineEmits([\n  'onViewClicked',\n  'onNewClicked',\n  'onEditClicked',\n  'onKeywordClicked',\n  'onSignalClicked',\n  'onPageChanged',\n]);\nconst router = useRouter();\nconst route = useRoute();\n\nconst showSignal = ref(window.innerWidth >= 1280);\nconst showDate = ref(window.innerWidth >= 1280);\nconst showKeywords = ref(window.innerWidth >= 1280);\n\nconst fmtDate = (d) => DateTime.fromISO(d).toUTC().toFormat('LLL dd yyyy');\n\nconst onViewClicked = (annotation) => emit('onViewClicked', annotation);\nconst onNewClicked = () => emit('onNewClicked');\nconst onEditClicked = (annotation) => emit('onEditClicked', annotation);\nconst onKeywordClicked = (keyword) => emit('onKeywordClicked', keyword);\nconst onSignalClicked = (signal) => emit('onSignalClicked', signal);\nconst onPageChanged = (page) => emit('onPageChanged', page);\n\nconst shareUrl = (annotation) => {\n  const location = router.resolve({\n    name: 'play',\n    query: {\n      uuid: annotation.recording.uuid,\n      signal: annotation.recording.signal,\n      t: annotation.start,\n    },\n  });\n  return new URL(location.href, window.location.origin).href;\n};\n\nconst copyToClipboard = (text) => {\n  if (window.isSecureContext) navigator.clipboard.writeText(text);\n  else console.warn('Clipboard requires HTTPS or localhost');\n};\n\n// --- Sorting ---\nconst sortKey = ref(route.query.sort || '');\nconst sortOrder = ref(route.query.order || 'asc');\n\nconst toggleSort = (key) => {\n  if (sortKey.value === key) {\n    sortOrder.value = sortOrder.value === 'asc' ? 'desc' : 'asc';\n  } else {\n    sortKey.value = key;\n    sortOrder.value = 'asc';\n  }\n  router.replace({\n    query: { ...route.query, sort: sortKey.value, order: sortOrder.value },\n  });\n};\n\nconst sortIndicator = (key) => {\n  if (sortKey.value !== key) return '';\n  return sortOrder.value === 'asc' ? '▲' : '▼';\n};\n\nconst sortedAnnotations = computed(() => {\n  if (!props.annotations) return [];\n\n  return props.annotations.slice().sort((a, b) => {\n    if (!sortKey.value) return 0;\n\n    let aValue;\n    let bValue;\n    switch (sortKey.value) {\n      case 'created':\n        aValue = DateTime.fromISO(a.created).toMillis();\n        bValue = DateTime.fromISO(b.created).toMillis();\n        break;\n      case 'recordingDate':\n        aValue = DateTime.fromISO(a.recording.date).toMillis();\n        bValue = DateTime.fromISO(b.recording.date).toMillis();\n        break;\n      case 'signal':\n        aValue = a.recording.signal.toLowerCase();\n        bValue = b.recording.signal.toLowerCase();\n        break;\n      default:\n        return 0;\n    }\n\n    if (aValue > bValue) return sortOrder.value === 'asc' ? 1 : -1;\n    if (aValue < bValue) return sortOrder.value === 'asc' ? -1 : 1;\n    return 0;\n  });\n});\n\nwatch(\n  () => [route.query.sort, route.query.order],\n  ([newSort, newOrder]) => {\n    if (newSort && newSort !== sortKey.value) sortKey.value = newSort;\n    if (newOrder && newOrder !== sortOrder.value) sortOrder.value = newOrder;\n  }\n);\n\n// --- Pagination ---\n// NOTE: this is pseudo pagination that only works in the client, ALL entries are fetch on the server\n// this should be adapted when the list grows really large...\nconst pageSize = 20;\nconst currentPage = ref(parseInt(route.query.page, 10) || 1);\nconst tableContainer = ref(null);\n\nconst totalPages = computed(() =>\n  Math.ceil((props.annotations?.length || 0) / pageSize)\n);\n\nconst paginatedAnnotations = computed(() => {\n  const start = (currentPage.value - 1) * pageSize;\n  return sortedAnnotations.value.slice(start, start + pageSize);\n});\n\nwatch(\n  () => route.query.page,\n  (newPage) => {\n    const n = parseInt(newPage, 10) || 1;\n    if (n !== currentPage.value) currentPage.value = n;\n  }\n);\n</script>\n\n<style scoped>\ntable.n-base-table {\n  width: 100%;\n  border-collapse: collapse;\n}\n\ntable.n-base-table th,\ntable.n-base-table td {\n  padding: 0.5em;\n  border-bottom: 1px solid #eee;\n  text-align: left;\n}\n\nth {\n  user-select: none;\n}\n.pagination {\n  display: flex;\n  align-items: center;\n}\n</style>\n","<template>\n  <n-drawer\n    :show=\"active\"\n    :default-height=\"180\"\n    resizable\n    closable\n    placement=\"bottom\"\n    :show-mask=\"false\"\n    :block-scroll=\"false\"\n  >\n    <n-drawer-content style=\"padding: 0\">\n      <n-space class=\"header\" justify=\"space-between\">\n        <div>\n          Stereometry&nbsp;&nbsp;\n          <n-button @click=\"download()\">Download</n-button>\n        </div>\n        <n-button\n          type=\"error\"\n          ghost\n          @click=\"store.dispatch('stereometry/removeAllThumbnails')\"\n        >\n          Clear\n        </n-button>\n      </n-space>\n      <n-space class=\"content\" justify=\"start\">\n        <div v-for=\"item in items\" :key=\"item\" class=\"thumbnail\">\n          <n-tooltip trigger=\"hover\">\n            <template #trigger>\n              <img :src=\"item\" @click=\"removeItem(item)\" />\n            </template>\n            Click to remove\n          </n-tooltip>\n        </div>\n      </n-space>\n    </n-drawer-content>\n  </n-drawer>\n</template>\n\n<script setup>\nimport { ref, watch, computed } from 'vue';\nimport { useStore } from 'vuex';\nimport axios from 'axios';\nimport {\n  NDrawer,\n  NButton,\n  NDrawerContent,\n  NImage,\n  NSpace,\n  NTooltip,\n} from 'naive-ui';\nconst store = useStore();\nconst items = computed(() => store.getters['stereometry/thumbnails']);\n\nconst active = ref(items.value.length > 0);\n\nwatch(\n  items,\n  (newItems, oldItems) => {\n    if (newItems.length > 0) {\n      active.value = true;\n    } else {\n      active.value = false;\n    }\n  },\n  { deep: true }\n);\n\nconst loading = ref(false);\n\nfunction removeItem(item) {\n  store.dispatch('stereometry/removeThumbnail', item);\n}\n\nasync function download() {\n  for (let i = 0; i < items.value.length; i++) {\n    await downloadFile(items.value[i]);\n  }\n  store.dispatch('stereometry/removeAllThumbnails');\n  active.value = false;\n}\n\nasync function downloadFile(thumbnail) {\n  loading.value = true;\n  const fileUrl = thumbnail;\n  await axios({\n    method: 'get',\n    url: fileUrl,\n    responseType: 'arraybuffer',\n  })\n    .then((response) => {\n      const url = window.URL.createObjectURL(new Blob([response.data]));\n      const link = document.createElement('a');\n      link.href = url;\n      const fileName = fileUrl.split('/').pop();\n      link.setAttribute('download', fileName); //or any other extension\n      document.body.appendChild(link);\n      link.click();\n      loading.value = false;\n    })\n    .catch(() => {\n      loading.value = false;\n      console.log('error occured');\n    });\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.thumbnail {\n  display: inline-block;\n  cursor: pointer;\n  img {\n    width: 80px;\n    padding: 2px;\n  }\n}\n\n.header {\n  padding: 20px;\n  border-bottom: 1px solid #ccc;\n}\n\n.content {\n  padding: 10px;\n}\n</style>\n","<template>\n  <n-modal class=\"modal\" v-model:show=\"showModal\" :auto-focus=\"false\">\n    <n-space vertical>\n      <img v-if=\"image\" :src=\"image.file\" loading=\"lazy\" />\n      <n-space class=\"footer\" justify=\"space-between\">\n        <n-space justify=\"left\" align=\"center\">\n          <n-button\n            style=\"color: white\"\n            circle\n            secondary\n            size=\"small\"\n            @click=\"previous()\"\n          >\n            <template #icon>\n              <n-icon>\n                <arrow-previous-20-regular />\n              </n-icon>\n            </template>\n          </n-button>\n          {{ dateDisplay(image.date) }}\n          {{ image.orientation }}\n        </n-space>\n        <n-space justify=\"right\">\n          <n-input-number\n            v-model:value=\"index\"\n            :validator=\"validateIndex\"\n            @update:value=\"indexChanged\"\n            size=\"small\"\n            style=\"width: 130px\"\n          >\n            <template #suffix>/ &nbsp;{{ images.length }}</template>\n          </n-input-number>\n\n          <n-button circle secondary size=\"small\" style=\"color: white\">\n            <template #icon>\n              <n-icon @click.prevent=\"download(image)\">\n                <arrow-download-20-regular />\n              </n-icon>\n            </template>\n          </n-button>\n          <n-button\n            style=\"color: white\"\n            circle\n            secondary\n            size=\"small\"\n            @click=\"next()\"\n          >\n            <template #icon>\n              <n-icon>\n                <arrow-next-20-regular />\n              </n-icon>\n            </template>\n          </n-button>\n        </n-space>\n        <!-- </div> -->\n      </n-space>\n    </n-space>\n  </n-modal>\n</template>\n\n<style lang=\"scss\" scoped>\n.modal {\n  width: 800px;\n  background: black;\n}\n\nimg {\n  width: 800px; // TODO maybe remove? quality of thuumbs is suffering from this scale-up ..\n}\n\n.footer {\n  text-transform: capitalize;\n  color: white;\n  padding: 0 2px 10px 2px;\n}\n</style>\n\n<script setup>\nimport { DateTime } from 'luxon';\nimport { ref, watch, computed, onMounted, onUpdated } from 'vue';\nimport { useStore } from 'vuex';\nimport { NCard, NModal, NButton, NSpace, NIcon, NInputNumber } from 'naive-ui';\n\nimport {\n  ArrowDownload20Regular,\n  ArrowNext20Regular,\n  ArrowPrevious20Regular,\n} from '@vicons/fluent';\n\nconst store = useStore();\n\nconst props = defineProps({\n  show: {\n    type: Boolean,\n    default: false,\n  },\n  images: {\n    type: Array,\n    default: null,\n  },\n});\n\nconst emit = defineEmits(['close-modal']);\n\nconst image = ref(null); // the current image\nconst index = ref(1);\n\nfunction validateIndex(value) {\n  return value >= 1 && value <= props.images.length;\n}\n\nonMounted(async () => {\n  image.value = props.images[index.value - 1];\n});\n\nonUpdated(() => {\n  index.value = 1;\n});\n\nconst showModal = computed({\n  get: () => props.show,\n  set: (val) => emit('close-modal', val),\n});\n\nfunction next() {\n  index.value++;\n  if (index.value > props.images.length) {\n    index.value = 1; // reset\n  }\n  image.value = props.images[index.value - 1];\n}\n\nfunction previous() {\n  index.value--;\n  if (index.value < 1) {\n    index.value = props.images.length; // set to end\n  }\n  image.value = props.images[index.value - 1];\n}\n\nfunction indexChanged(value) {\n  if (value === null) {\n    index.value = null;\n  } else {\n    index.value = value;\n  }\n  if (index.value !== null) {\n    image.value = props.images[index.value - 1];\n  }\n}\n\nfunction download(image) {\n  store.dispatch('stereometry/addThumbnail', image.file);\n}\n\nfunction dateDisplay(date) {\n  const dt = DateTime.fromISO(date).toUTC();\n  return dt.toFormat('LLL dd yyyy T');\n}\n</script>\n","<template>\n  <Loading v-if=\"isLoading\" />\n  <div v-else>\n    <n-space v-if=\"recording\" justify=\"center\">\n      <n-input-group>\n        <n-tag :bordered=\"false\" round>\n          &nbsp;\n          <router-link\n            v-slot=\"{ navigate }\"\n            :to=\"{\n              name: 'year',\n              query: {\n                location: location,\n                signal: signal,\n              },\n            }\"\n            custom\n          >\n            <n-button\n              size=\"small\"\n              icon-placement=\"right\"\n              text\n              @click=\"navigate\"\n            >\n              {{ recording.location }}\n              <template #icon>\n                <n-icon :component=\"ArrowLeft12Regular\" />\n              </template>\n            </n-button>\n          </router-link>\n        </n-tag>\n        <n-tag :bordered=\"false\">\n          <router-link\n            v-if=\"recording\"\n            v-slot=\"{ navigate }\"\n            :to=\"{\n              name: 'month',\n              query: {\n                year: recordingDate.year,\n                month: recordingDate.month,\n                location: location,\n                signal: signal,\n              },\n            }\"\n            custom\n          >\n            <n-button\n              size=\"small\"\n              icon-placement=\"right\"\n              text\n              @click=\"navigate\"\n            >\n              {{ recordingDate.monthName }} {{ recordingDate.year }}\n              <template #icon>\n                <n-icon :component=\"ArrowLeft12Regular\" />\n              </template>\n            </n-button>\n          </router-link>\n        </n-tag>\n        <n-select\n          :value=\"signal\"\n          :options=\"signalOptions\"\n          filterable\n          size=\"small\"\n          :consistent-menu-width=\"false\"\n          style=\"text-transform: capitalize\"\n          @update:value=\"changeSignal\"\n        />\n        <n-tag :bordered=\"false\" style=\"font-weight: bold\" round>\n          {{ recordingDate.dateAndTime }}\n          &nbsp;\n        </n-tag>\n      </n-input-group>\n    </n-space>\n    <nav class=\"inline\"></nav>\n    <n-grid v-if=\"recording\" :x-gap=\"1\" :cols=\"12\">\n      <n-gi :offset=\"2\" span=\"8\">\n        <AnnotationDetailView />\n        <AnnotationEditor\n          v-if=\"showEditor\"\n          @on-save=\"onSaveAnnotation\"\n          @on-cancel=\"onCancelAnnotation\"\n          @on-delete=\"onDeleteAnnotation\"\n        />\n      </n-gi>\n    </n-grid>\n    <!-- :key is needed so peaks.js is actually re-rendering, when audio is changed. this is hack is called \"key-changing technique\" -->\n    <Peaks v-if=\"audio\" :key=\"audio.uuid\" :audio=\"audio\" />\n    <!-- transport control -->\n    <n-grid v-if=\"recording\" class=\"controls\" :cols=\"3\">\n      <n-gi style=\"justify-self: start\">\n        <n-space justify=\"left\" align=\"center\" size=\"large\">\n          <div\n            style=\"\n              font-variant-numeric: tabular-nums;\n              white-space: nowrap;\n              text-transform: uppercase;\n            \"\n          >\n            {{ recordingDate.date }}\n            {{ timeDisplay }}\n          </div>\n\n          <n-button\n            round\n            tertiary\n            type=\"primary\"\n            size=\"medium\"\n            @click.exact.prevent=\"toggleAnnotations()\"\n          >\n            <template #icon>\n              <n-icon>\n                <comment-20-regular />\n              </n-icon>\n            </template>\n            Annotations\n          </n-button>\n\n          <n-button\n            v-if=\"recording && recording.stereometry\"\n            round\n            tertiary\n            type=\"primary\"\n            size=\"medium\"\n            @click.exact.prevent=\"showStereometry = true\"\n          >\n            <template #icon>\n              <n-icon>\n                <image-20-regular />\n              </n-icon>\n            </template>\n            Stereometry\n          </n-button>\n          <n-button\n            round\n            tertiary\n            type=\"primary\"\n            size=\"medium\"\n            @click.prevent=\"downloadAudio()\"\n          >\n            <template #icon>\n              <n-icon>\n                <arrow-download-20-regular />\n              </n-icon>\n            </template>\n            Audio\n          </n-button>\n\n          <n-button\n            round\n            tertiary\n            type=\"primary\"\n            size=\"medium\"\n            @click.prevent=\"download(audio.default_spectrogram)\"\n          >\n            <template #icon>\n              <n-icon>\n                <arrow-download-20-regular />\n              </n-icon>\n            </template>\n            Spectrogram\n          </n-button>\n        </n-space>\n      </n-gi>\n      <n-gi>\n        <n-space justify=\"center\" align=\"center\" size=\"large\">\n          <router-link\n            :to=\"{\n              name: 'play',\n              query: { uuid: recording.previous_uuid, signal: signal },\n            }\"\n          >\n            <n-button\n              circle\n              tertiary\n              type=\"primary\"\n              size=\"medium\"\n              @click=\"onNextPreviousClick\"\n            >\n              <template #icon>\n                <n-icon\n                  :disabled=\"!recording.previous_uuid\"\n                  :class=\"{ disabled: !recording.previous_uuid }\"\n                >\n                  <arrow-previous-20-regular />\n                </n-icon>\n              </template>\n            </n-button>\n          </router-link>\n          <n-button\n            circle\n            tertiary\n            type=\"primary\"\n            size=\"large\"\n            @click=\"togglePlayPause\"\n          >\n            <template #icon>\n              <n-icon :component=\"playerControlsIcon\" />\n            </template>\n          </n-button>\n          <router-link\n            :to=\"{\n              name: 'play',\n              query: { uuid: recording.next_uuid, signal: signal },\n            }\"\n            style=\"color: white\"\n          >\n            <n-button\n              circle\n              tertiary\n              type=\"primary\"\n              size=\"medium\"\n              @click=\"onNextPreviousClick\"\n            >\n              <template #icon>\n                <n-icon\n                  :disabled=\"!recording.next_uuid\"\n                  :class=\"{ disabled: !recording.next_uuid }\"\n                >\n                  <arrow-next-20-regular />\n                </n-icon>\n              </template>\n            </n-button>\n          </router-link>\n        </n-space>\n      </n-gi>\n      <n-gi style=\"justify-self: end\">\n        <n-space>\n          <n-button-group>\n            <n-button\n              round\n              tertiary\n              type=\"primary\"\n              size=\"medium\"\n              :color=\"waveformEnabled\"\n              @click=\"store.dispatch('player/toggleWaveform')\"\n            >\n              waveform\n            </n-button>\n            <n-button\n              round\n              tertiary\n              type=\"primary\"\n              size=\"medium\"\n              :color=\"spectrogramEnabled\"\n              @click=\"store.dispatch('player/toggleSpectrogram')\"\n            >\n              spectrogram\n            </n-button>\n          </n-button-group>\n          <n-button-group vertical>\n            <n-button circle tertiary type=\"primary\" size=\"medium\">\n              <template #icon>\n                <n-icon\n                  @click.exact.prevent=\"zoom(30)\"\n                  @click.shift.prevent=\"zoom(300)\"\n                >\n                  <zoom-in-20-regular />\n                </n-icon>\n              </template>\n            </n-button>\n            <n-button circle tertiary type=\"primary\" size=\"medium\">\n              <template #icon>\n                <n-icon\n                  @click.exact.prevent=\"zoom(-30)\"\n                  @click.shift.prevent=\"zoom(-300)\"\n                >\n                  <zoom-out-20-regular />\n                </n-icon>\n              </template>\n            </n-button>\n          </n-button-group>\n        </n-space>\n      </n-gi>\n    </n-grid>\n    <AnnotationListView\n      v-if=\"showAnnotations\"\n      :annotations=\"annotations\"\n      :with-create=\"isLoggedIn\"\n      @on-view-clicked=\"onAnnotationViewClicked\"\n      @on-edit-clicked=\"onAnnotationEditClicked\"\n      @on-new-clicked=\"onAnnotationNewClicked\"\n      @on-keyword-clicked=\"onAnnotationKeywordClicked\"\n    />\n    <StereometryModal\n      v-if=\"recording && recording.stereometry\"\n      :show=\"showStereometry\"\n      :images=\"recording.stereometry\"\n      @close-modal=\"showStereometry = false\"\n    />\n\n    <StereometryCart />\n  </div>\n</template>\n\n<script setup>\nimport axios from 'axios';\nimport { ref, reactive, computed, onMounted, watch } from 'vue';\nimport { useRouter } from 'vue-router';\nimport { useStore } from 'vuex';\n\nimport {\n  NIcon,\n  NSpace,\n  NInputGroup,\n  NButton,\n  NButtonGroup,\n  NSelect,\n  NTag,\n  NGrid,\n  NGi,\n} from 'naive-ui';\nimport {\n  ArrowNext20Regular,\n  ArrowPrevious20Regular,\n  Play20Regular,\n  Pause20Regular,\n  ArrowDownload20Regular,\n  ZoomIn20Regular,\n  ZoomOut20Regular,\n  ArrowLeft12Regular,\n  Comment20Regular,\n  Image20Regular,\n} from '@vicons/fluent';\n\nimport { DateTime, Duration } from 'luxon';\n\nimport Peaks from '@/components/Peaks.vue';\nimport Loading from '@/views/Loading.vue';\nimport AnnotationDetailView from '@/components/Annotation.vue';\nimport AnnotationEditor from '@/components/AnnotationEditor.vue';\nimport AnnotationListView from '@/views/AnnotationListView.vue';\n\nimport StereometryCart from '@/components/stereometry/StereometryCart.vue';\nimport StereometryModal from '@/components/stereometry/StereometryModal.vue';\n\nimport { Recording } from '@/api/archive';\n\nimport colors from '@/components/colors';\n\nconst props = defineProps({\n  uuid: {\n    type: String,\n    default: null,\n  },\n  signal: {\n    type: String,\n    default: null,\n  },\n  t: {\n    type: Number,\n    default: 0,\n  },\n});\n\nconst router = useRouter();\nconst store = useStore();\nconst recording = ref(null);\nconst audio = ref(null);\nconst annotations = computed(() => store.getters['annotation/annotations']);\n\nconst loading = ref(false);\n\nconst showAnnotations = ref(false);\nconst showEditor = computed(() => {\n  return store.getters['annotation/editor'] !== null;\n});\n\nconst showStereometry = ref(false);\n\nconst query = reactive({\n  uuid: props.uuid,\n  signal: props.signal,\n  t: props.t,\n});\n\nstore.commit('player/setOffsetSeconds', props.t);\n\nconst offsetSeconds = computed(() => {\n  return store.getters['player/offsetSeconds'];\n});\nwatch(offsetSeconds, (seconds, old) => {\n  if (seconds !== old) {\n    router.replace({\n      query: {\n        uuid: props.uuid,\n        signal: props.signal,\n        t: seconds,\n      },\n    });\n  }\n});\n\n// functions\nasync function fetchAnnotations() {\n  if (audio.value !== null) {\n    await store.dispatch('annotation/fetchAnnotations', audio.value.uuid);\n  }\n}\n\nasync function initialize() {\n  try {\n    // reset annotation store\n    store.commit('annotation/resetEditor');\n    store.commit('annotation/resetSegments');\n\n    // fetch recording\n    recording.value = await Recording.detail(props.uuid);\n\n    // assign audio based on signal\n    const audioValue = recording.value.audio;\n    const targetSignal = props.signal;\n\n    const foundObject = audioValue.find(\n      (obj) => obj.signal.value === targetSignal\n    );\n\n    if (foundObject) {\n      audio.value = foundObject;\n    }\n\n    const [matchingAudio] = recording.value.audio.filter(\n      (a) => a.signal.value === props.signal\n    );\n    audio.value = matchingAudio;\n\n    await fetchAnnotations();\n\n    // show annotations by default only if there is something to show..\n    showAnnotations.value = annotations.value.length !== 0;\n  } catch (error) {\n    console.log(error);\n    if (error.response.status === 404) {\n      await router.replace({ name: 'NotFound' });\n    }\n  }\n}\n\nonMounted(async () => {\n  await initialize();\n});\n\nwatch(() => props.uuid, initialize);\nwatch(() => props.signal, initialize);\n\nfunction updateRoute() {\n  router.push({ query });\n}\n\nfunction changeSignal(value) {\n  query.signal = value;\n  updateRoute();\n}\n\nfunction toggleAnnotations() {\n  showAnnotations.value = !showAnnotations.value;\n}\n\nfunction onAnnotationViewClicked(annotation) {\n  store.commit('player/doSeek', annotation.start);\n}\n\nfunction onAnnotationEditClicked(annotation) {\n  store.commit('player/doSeek', annotation.start);\n  store.commit('annotation/setEditor', {\n    uuid: annotation.uuid,\n    audio: audio.value.url,\n    content: annotation.content,\n    categories: annotation.categories,\n    keywords: annotation.keywords,\n    start: annotation.start,\n    end: annotation.end,\n  });\n}\n\nfunction onAnnotationNewClicked() {\n  store.commit('annotation/setEditor', {\n    uuid: 'NEW_ITEM',\n    audio: audio.value.url,\n    start: store.getters['player/offsetSeconds'],\n    end: store.getters['player/offsetSeconds'] + 1,\n  });\n}\n\nfunction onAnnotationKeywordClicked(keyword) {\n  router.push({\n    name: 'annotation',\n    query: {\n      keyword,\n    },\n  });\n}\n\nasync function onSaveAnnotation() {\n  await fetchAnnotations();\n  store.commit('annotation/resetEditor');\n}\n\nasync function onDeleteAnnotation() {\n  await fetchAnnotations();\n  store.commit('annotation/resetEditor');\n}\n\nfunction onCancelAnnotation() {\n  store.commit('annotation/resetEditor');\n}\n\nfunction downloadAudio() {\n  loading.value = true;\n  const fileUrl = audio.value.file;\n  axios({\n    method: 'get',\n    url: fileUrl,\n    responseType: 'arraybuffer',\n  })\n    .then((response) => {\n      const url = window.URL.createObjectURL(new Blob([response.data]));\n      const link = document.createElement('a');\n      link.href = url;\n      const fileName = fileUrl.split('/').pop();\n      link.setAttribute('download', fileName); // or any other extension\n      document.body.appendChild(link);\n      link.click();\n      loading.value = false;\n    })\n    .catch(() => {\n      loading.value = false;\n      console.log('error occured');\n    });\n}\n\nfunction togglePlayPause() {\n  store.dispatch('player/playPause');\n}\n\nfunction zoom(value) {\n  store.commit('player/zoom', value);\n}\n\nfunction onNextPreviousClick() {\n  store.commit('player/setOffsetSeconds', 0);\n}\n\n// computed\nconst recordingDate = computed(() => {\n  if (recording.value === null) {\n    return null;\n  }\n  const dt = DateTime.fromISO(recording.value.date).toUTC();\n  return {\n    dt,\n    year: dt.year,\n    month: dt.month,\n    monthName: dt.toFormat('MMMM'),\n    day: dt.day,\n    date: dt.toFormat('LLL dd yyyy'),\n    dateAndTime: dt.toFormat('LLL dd yyyy T'),\n  };\n});\n\nconst timeDisplay = computed(() => {\n  if (recordingDate.value === null) {\n    return null;\n  }\n  const seconds = store.getters['player/offsetSeconds'] || 0;\n  const offset = Duration.fromObject({ seconds });\n  return recordingDate.value.dt\n    .plus(offset)\n    .toLocaleString(DateTime.TIME_24_WITH_SECONDS);\n});\n\nconst isLoading = computed(() => {\n  return loading.value === true;\n});\n\nconst waveformEnabled = computed(() => {\n  const darkMode = window.localStorage.getItem('darkMode') !== null;\n  const enabled = store.getters['player/waveformEnabled'];\n  if (!enabled) {\n    return '#444';\n  }\n  return darkMode ? colors.primaryColor : colors.primaryColorDark;\n});\n\nconst spectrogramEnabled = computed(() => {\n  const darkMode = window.localStorage.getItem('darkMode') !== null;\n  const enabled = store.getters['player/spectrogramEnabled'];\n  if (!enabled) {\n    return '#444';\n  }\n  return darkMode ? colors.primaryColor : colors.primaryColorDark;\n});\n\nconst playerControlsIcon = computed(() => {\n  return store.getters['player/isPlaying'] ? Pause20Regular : Play20Regular;\n});\n\nconst location = computed(() => {\n  if (recording.value !== null) {\n    if (recording.value.location === 'Heligoland') {\n      return 'HEL';\n    }\n    if (recording.value.location === 'Spitzbergen') {\n      return 'SPI';\n    }\n    if (recording.value.location === 'Bremerhaven') {\n      return 'BRE';\n    }\n  }\n  return null;\n});\n\nconst signalOptions = computed(() => {\n  const options = recording.value.audio.map((a) => {\n    return {\n      label: a.signal.name,\n      value: a.signal.value,\n    };\n  });\n  return options;\n});\n\nconst isLoggedIn = computed(() => {\n  return store.getters['auth/authenticated'];\n});\n\nfunction download(file) {\n  store.dispatch('stereometry/addThumbnail', file);\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@import '@/style/_variables.scss';\n.controls {\n  margin: 50px 10px 50px 10px;\n}\n</style>\n\n<!--// window.addEventListener('keydown', (e) => {-->\n<!--//-->\n<!--//   if (!this.isEditing) {-->\n<!--//     let map = {};-->\n<!--//     if (e.shiftKey) {-->\n<!--//       map = {-->\n<!--//         'ArrowLeft': {method: 'audioState', args: ['seekBackward', {backward: 2}]}, // left-->\n<!--//         'ArrowRight': {method: 'audioState', args: ['seekForward', {forward: 2}]}, // right-->\n<!--//       }-->\n<!--//     } else {-->\n<!--//       map = {-->\n<!--//         ' ': {method: 'audioState', args: ['playPause']}, // space-->\n<!--//         'ArrowLeft': {method: 'audioState', args: ['seekBackward', {backward: 0.1}]}, // left-->\n<!--//         'ArrowRight': {method: 'audioState', args: ['seekForward', {forward: 0.1}]}, // right-->\n<!--//         'Home': {method: 'audioState', args: ['seek', {time: 0.0}]}, // home-->\n<!--//         'End': {-->\n<!--//           method: 'audioState',-->\n<!--//           args: ['seek', {time: this.peaks.player.getDuration() - 0.001}]-->\n<!--//         }, // end-->\n<!--//       };-->\n<!--//     }-->\n<!--//     const m = map[e.key];-->\n<!--//     if (m !== undefined) {-->\n<!--//       e.preventDefault();-->\n<!--//       this[m.method](...m.args);-->\n<!--//     }-->\n<!--//   }-->\n<!--// });-->\n","import { client, handleError } from './client';\n\nconst question = {\n  list: async (params) => {\n    try {\n      const request = await client.get('faq/question/', {\n        params,\n      });\n      return request.data.results;\n    } catch (error) {\n      return handleError(error);\n    }\n  },\n};\n\nexport default question;\n","<template>\n  <Loading v-if=\"isLoading\" />\n  <div v-else>\n    <div class=\"faq\">\n      <h1>FAQ</h1>\n      <n-grid :x-gap=\"1\" :cols=\"12\">\n        <n-gi\n          v-for=\"obj in objects\"\n          :key=\"obj.position\"\n          :offset=\"4\"\n          span=\"4\"\n          class=\"faq__item\"\n        >\n          <!-- eslint-disable-next-line vue/no-v-html -->\n          <h2 class=\"faq__item--question\" v-html=\"obj.question\"></h2>\n          <!-- eslint-disable-next-line vue/no-v-html -->\n          <p class=\"faq__item--answer\" v-html=\"obj.answer\"></p>\n        </n-gi>\n      </n-grid>\n    </div>\n  </div>\n</template>\n\n<script setup>\nimport { onMounted, ref, computed } from 'vue';\n\nimport { NGrid, NGi } from 'naive-ui';\n\nimport question from '@/api/faq';\nimport Loading from '@/views/Loading.vue';\n\nconst loading = ref(false);\nconst objects = ref([]);\n\nasync function fetchData() {\n  loading.value = true;\n  objects.value = await question.list();\n  loading.value = false;\n}\n\nonMounted(async () => {\n  await fetchData();\n});\n\nconst isLoading = computed(() => loading.value === true);\n</script>\n\n<style lang=\"scss\" scoped>\n.faq {\n  &__item {\n    &--question,\n    &--answer {\n      margin: 10px;\n      padding: 10px;\n    }\n    &--answer {\n      line-height: 2;\n    }\n  }\n}\n</style>\n","<template>\n  <a :href=\"href\" :style=\"style\">\n    <slot></slot>\n  </a>\n</template>\n\n<script setup>\nimport { reactive } from 'vue';\nimport { useThemeVars } from 'naive-ui';\n\nconst props = defineProps({\n  href: {\n    type: String,\n  },\n  color: {\n    type: String,\n  },\n});\n\nconst theme = useThemeVars();\n\nconst style = reactive({\n  color: props.color || theme.value.textColorBase,\n  textDecoration: 'underline',\n});\n</script>\n","import { client, handleError } from './client';\n\nconst Member = {\n  async detail(params) {\n    try {\n      const request = await client.get(`member/member/`, {\n        params,\n      });\n      return request.data.results[0];\n    } catch (error) {\n      return handleError(error);\n    }\n  },\n};\n\nexport default Member;\n","<template>\n  <div v-if=\"data\">\n    <h4>You are logged in as {{ data.first_name }} {{ data.last_name }}</h4>\n    <h2>Annotations</h2>\n    <AnnotationListView\n      :annotations=\"data.annotations\"\n      :with-spectrogram=\"true\"\n      :with-edit=\"false\"\n      @on-view-clicked=\"onAnnotationViewClicked\"\n    />\n  </div>\n</template>\n\n<script setup>\nimport { ref, onMounted } from 'vue';\nimport { useRouter } from 'vue-router';\n\nimport Member from '@/api/member';\nimport AnnotationListView from '@/views/AnnotationListView.vue';\n\nconst loading = ref(false);\nconst data = ref(null);\n\nconst router = useRouter();\n\nasync function fetchData() {\n  loading.value = true;\n  data.value = await Member.detail();\n  loading.value = false;\n}\n\nonMounted(async () => {\n  await fetchData();\n});\n\nfunction onAnnotationViewClicked(annotation) {\n  router.push({\n    name: 'play',\n    query: {\n      uuid: annotation.recording.uuid,\n      signal: annotation.recording.signal,\n      t: annotation.start,\n    },\n  });\n}\n</script>\n","<template>\n  <n-modal v-model:show=\"showModal\" :mask-closable=\"false\">\n    <n-card\n      style=\"width: 600px\"\n      title=\"Hello there!\"\n      :bordered=\"false\"\n      size=\"huge\"\n      role=\"dialog\"\n      aria-modal=\"true\"\n    >\n      <n-space vertical>\n        <n-alert v-if=\"error.message\" title=\"Login failed\" type=\"error\">\n          {{ error.message }}\n        </n-alert>\n\n        <n-form>\n          <n-form-item label=\"E-Mail\" :feedback=\"error.emailMessage\">\n            <n-input\n              v-model:value=\"email\"\n              type=\"text\"\n              :status=\"error.emailStatus\"\n              placeholder=\"Email address\"\n            />\n          </n-form-item>\n          <n-form-item label=\"Password\" :feedback=\"error.passwordMessage\">\n            <n-input\n              v-model:value=\"password\"\n              type=\"password\"\n              show-password-on=\"mousedown\"\n              :status=\"error.passwordStatus\"\n              placeholder=\"Password\"\n            >\n              <template #password-visible-icon>\n                <n-icon :size=\"16\" :component=\"Eye16Regular\" />\n              </template>\n              <template #password-invisible-icon>\n                <n-icon :size=\"16\" :component=\"EyeOff16Regular\" />\n              </template>\n            </n-input>\n          </n-form-item>\n          <n-space justify=\"center\">\n            <n-button size=\"large\" @click=\"handleLogin\"\n              >&nbsp;&nbsp;&nbsp;Login&nbsp;&nbsp;&nbsp;</n-button\n            >\n          </n-space>\n        </n-form>\n      </n-space>\n\n      <template #footer>Forgot password? Please write us an E-Mail.</template>\n    </n-card>\n  </n-modal>\n</template>\n\n<script setup>\nimport { ref } from 'vue';\nimport { useStore } from 'vuex';\nimport { useRouter, useRoute } from 'vue-router';\nimport {\n  NAlert,\n  NForm,\n  NFormItem,\n  NModal,\n  NCard,\n  NSpace,\n  NButton,\n  NInput,\n  NIcon,\n} from 'naive-ui';\nimport { Eye16Regular, EyeOff16Regular } from '@vicons/fluent';\n\nimport debug from '@/debug';\n\nconst store = useStore();\nconst router = useRouter();\nconst route = useRoute();\n\nconst email = ref(null);\nconst password = ref(null);\n\nconst showModal = ref(true);\n\nconst error = ref({\n  emailStatus: null,\n  emailMessage: null,\n  passwordStatus: null,\n  passwordMessage: null,\n  message: null,\n});\n\nasync function handleLogin() {\n  store\n    .dispatch('auth/login', {\n      email: email.value,\n      password: password.value,\n    })\n    .then(() => {\n      showModal.value = false;\n      if (route.query.redirect !== undefined) {\n        if (debug) {\n          console.log('redirect to', route.query.redirect);\n        }\n        const path = route.query.redirect;\n        delete route.query.redirect;\n        router.push({\n          path,\n          query: route.query,\n        });\n      } else {\n        router.push({ name: 'profile' });\n      }\n    })\n    .catch((e) => {\n      console.log('error', e);\n      const { data } = e.response;\n      console.log('data', data);\n      console.log('error', error.value);\n      if (data.email !== undefined) {\n        error.value.emailStatus = 'error';\n        [error.value.emailMessage] = data.email;\n      }\n      if (data.password !== undefined) {\n        error.value.passwordStatus = 'error';\n        [error.value.passwordMessage] = data.password;\n      }\n\n      if (data.detail !== undefined) {\n        error.value.message = data.detail;\n      }\n    });\n}\n</script>\n","<template>\n  <div v-if=\"data\">\n    <h2>Annotations</h2>\n    <n-space vertical justify=\"center\" align=\"center\" style=\"margin-top: 50px\">\n      <n-input-group>\n        <n-tag :bordered=\"false\" size=\"large\" round\n          >&nbsp;Filter category</n-tag\n        >\n        <n-form label-placement=\"left\" style=\"width: 400px\">\n          <n-select\n            :value=\"selectedCategories\"\n            :options=\"categoriesOptions\"\n            size=\"medium\"\n            :consistent-menu-width=\"false\"\n            multiple\n            placement=\"bottom-start\"\n            @update:value=\"onChangeCategory\"\n          />\n        </n-form>\n      </n-input-group>\n      <n-input-group>\n        <n-tag :bordered=\"false\" size=\"large\" round\n          >&nbsp;Filter keywords</n-tag\n        >\n        <n-form label-placement=\"left\" style=\"width: 400px\">\n          <n-select\n            :value=\"selectedKeywords\"\n            :options=\"keywordsOptions\"\n            :consistent-menu-width=\"false\"\n            size=\"medium\"\n            multiple\n            filterable\n            placement=\"bottom-start\"\n            @update:value=\"onKeywordClicked\"\n          />\n        </n-form>\n      </n-input-group>\n      <n-input-group>\n        <n-tag :bordered=\"false\" size=\"large\" round>&nbsp;Filter signals</n-tag>\n        <n-form label-placement=\"left\" style=\"width: 400px\">\n          <n-select\n            :value=\"selectedSignals\"\n            :options=\"signalOptions\"\n            :consistent-menu-width=\"false\"\n            size=\"medium\"\n            multiple\n            filterable\n            placement=\"bottom-start\"\n            @update:value=\"onSignalClicked\"\n          />\n        </n-form>\n      </n-input-group>\n      <n-input-group>\n        <n-tag :bordered=\"false\" size=\"large\" round>&nbsp;Filter authors</n-tag>\n        <n-form label-placement=\"left\" style=\"width: 400px\">\n          <n-select\n            :value=\"selectedAuthors\"\n            :options=\"authorOptions\"\n            :consistent-menu-width=\"false\"\n            size=\"medium\"\n            multiple\n            filterable\n            placement=\"bottom-start\"\n            @update:value=\"onChangeAuthor\"\n          />\n        </n-form>\n      </n-input-group>\n      <n-input-group>\n        <n-button @click=\"reset()\">reset</n-button>\n      </n-input-group>\n    </n-space>\n    <AnnotationListView\n      :annotations=\"data\"\n      :with-edit=\"false\"\n      :with-spectrogram=\"true\"\n      style=\"margin-top: 50px\"\n      @on-view-clicked=\"onAnnotationViewClicked\"\n      @on-keyword-clicked=\"onKeywordClicked\"\n      @on-signal-clicked=\"onSignalClicked\"\n      @on-page-changed=\"onPageChanged\"\n    />\n  </div>\n</template>\n\n<script setup>\nimport debug from '@/debug';\nimport { ref, reactive, computed, onMounted, watch } from 'vue';\nimport { useRouter, useRoute } from 'vue-router';\n\nimport { NForm, NSpace, NSelect, NInputGroup, NTag, NButton } from 'naive-ui';\n\nimport AnnotationListView from '@/views/AnnotationListView.vue';\nimport { Annotation } from '@/api/archive';\nimport { Category, Keyword, Author, Signal } from '@/api/classification';\n\nconst props = defineProps({\n  query: {\n    type: Object,\n    default: () => ({}),\n  },\n});\n\nconst router = useRouter();\nconst route = useRoute();\n\n// NOTE: the query should ONLY be changed in a single occasion, that is when\n// route.query changes. The URL is only source of truth. the idea is to change\n// the URL (ie push to the router) and watch route.query to change the 'query'\n// value accordingly.\n\nconst query = reactive({\n  category: route.query.category || '',\n  keyword: route.query.keyword || '',\n  signal: route.query.signal || '',\n  author: route.query.author || '',\n  page: parseInt(route.query.page, 10) || 1,\n  sort: route.query.sort || '',\n  order: route.query.order || '',\n  ...props.query, // optional defaults\n});\n\nconst loading = ref(false);\nconst data = ref(null);\nconst categories = ref([]);\nconst keywords = ref([]);\nconst authors = ref([]);\nconst signals = ref([]);\n\n/*\n  computed\n*/\nconst selectedCategories = computed(() => {\n  return query.category === '' ? '' : query.category.split(',');\n});\n\nconst categoriesOptions = computed(() => {\n  if (categories.value === null) {\n    return [];\n  }\n  return categories.value.map((c) => ({\n    label: c.name,\n    value: c.value,\n  }));\n});\n\nconst selectedKeywords = computed(() => {\n  return query.keyword === '' ? '' : query.keyword.split(',');\n});\n\nconst keywordsOptions = computed(() => {\n  if (keywords.value === null) {\n    return [];\n  }\n  return keywords.value.map((k) => ({\n    label: k.name,\n    value: k.slug,\n  }));\n});\n\nconst selectedAuthors = computed(() => {\n  return query.author === '' ? '' : query.author.split(',');\n});\n\nconst authorOptions = computed(() => {\n  if (authors.value === null) {\n    return [];\n  }\n  return authors.value.map((a) => ({\n    label: `${a.first_name} ${a.last_name}`,\n    value: a.abbreviation,\n  }));\n});\n\nconst selectedSignals = computed(() => {\n  return query.signal === '' ? '' : query.signal.split(',');\n});\n\nconst signalOptions = computed(() => {\n  if (signals.value === null) {\n    return [];\n  }\n  return signals.value.map((s) => ({\n    label: s.value,\n    value: s.key,\n  }));\n});\n\n/*\n  functions\n*/\nasync function fetchData() {\n  loading.value = true;\n  data.value = await Annotation.filter(query);\n  categories.value = await Category.all();\n  keywords.value = await Keyword.all();\n  authors.value = await Author.all();\n  signals.value = await Signal.all();\n  loading.value = false;\n}\n\nonMounted(async () => {\n  await fetchData();\n});\n\nfunction reset() {\n  const category = '';\n  const keyword = '';\n  const signal = '';\n  const author = '';\n  // default to newest entry first\n  const order = 'desc';\n  const sort = 'created';\n  // pagination\n  const page = 1;\n\n  router.push({\n    query: {\n      ...route.query,\n      category,\n      keyword,\n      signal,\n      author,\n      order,\n      sort,\n      page,\n    },\n  });\n}\n\nconst onChangeCategory = async (category) => {\n  const page = 1;\n  router.push({ query: { ...route.query, page, category } });\n};\n\nconst onChangeAuthor = async (author) => {\n  const page = 1;\n  router.push({ query: { ...route.query, page, author } });\n};\n\nfunction onKeywordClicked(keyword) {\n  const page = 1;\n  router.push({ query: { ...route.query, page, keyword } });\n}\n\nfunction onSignalClicked(signal) {\n  const page = 1;\n  router.push({ query: { ...route.query, page, signal } });\n}\n\nfunction onPageChanged(page) {\n  router.push({ query: { ...route.query, page } });\n}\n\nfunction onAnnotationViewClicked(annotation) {\n  router.push({\n    name: 'play',\n    query: {\n      uuid: annotation.recording.uuid,\n      signal: annotation.recording.signal,\n      t: annotation.start,\n    },\n  });\n}\n\nconst keys = [\n  'category',\n  'keyword',\n  'signal',\n  'author',\n  'page',\n  'sort',\n  'order',\n];\n\n// watch route.query -> update query\nwatch(\n  () => route.query,\n  async (newQuery) => {\n    if (debug) {\n      console.log('watch route.query');\n    }\n    let changed = false;\n\n    keys.forEach((key) => {\n      let newVal;\n      if (key === 'page') {\n        newVal = parseInt(newQuery[key], 10) || 1;\n      } else {\n        newVal = newQuery[key] != null ? String(newQuery[key]) : '';\n      }\n\n      // compare with current value\n      if (query[key] !== newVal) {\n        // here the query is changed!\n        query[key] = newVal;\n        changed = true;\n      }\n    });\n\n    if (changed) {\n      await fetchData();\n      window.scrollTo({ top: 0, behavior: 'smooth' });\n    }\n  },\n  { immediate: true }\n);\n</script>\n","import { client, handleError } from './client';\n\n/*\nWe excpect something like this\n{\n  \"count\": 2,\n  \"next\": \"http://localhost:3000/api/v1/thumbs/tableau/?limit=1&offset=1\",\n  \"previous\": null,\n  \"results\": [\n    {\n       \"url\": \"http://localhost:3000/api/v1/thumbs/tableau/db4bdee3-a4aa-455c-bc07-1e9335a8da42/\",\n       \"uuid\": \"db4bdee3-a4aa-455c-bc07-1e9335a8da42\",\n       \"files\": [\n           \"/media/thumbnail_tableau/tableau-0000-20120915-000000-20120930-160040-large.png\",\n           \"/media/thumbnail_tableau/tableau-0000-20120915-000000-20120930-160040-medium.png\",\n           \"/media/thumbnail_tableau/tableau-0000-20120915-000000-20120930-160040-small.png\"\n       ],\n       \"start_date\": {\n           \"year\": \"2012\",\n           \"month\": \"09\",\n           \"day\": \"15\"\n       },\n       \"end_date\": {\n           \"year\": \"2012\",\n           \"month\": \"09\",\n           \"day\": \"30\"\n       }\n      \"data\": {\n          \"file\": \"thumbnail_tableau/tableau-0000-20120915-000000-20120930-160040-large.png\",\n          \"rows\": 48,\n          \"paths\": [\n              \"2012/0000001-20120915-00-00-00.00-L.jpg\",\n              \"2012/0000002-20120915-00-00-01.00-R.jpg\",\n              \"2012/0000003-20120915-00-30-00.00-L.jpg\",\n              \"2012/0000004-20120915-00-30-01.00-R.jpg\",\n              ...,\n            ],\n        },\n        \"width\": 13024,\n        \"height\": 13104,\n        \"columns\": 32\n    }\n  ]\n}\n*/\nconst Tableau = {\n  async list(params) {\n    try {\n      const response = await client.get('thumbs/tableau/include_details/', {\n        params,\n      });\n      return response.data;\n    } catch (error) {\n      return handleError(error);\n    }\n  },\n};\n\n/*\nWe excpect something like this\n{\n    \"file\": \"http://localhost:8888/thumbs_test/2014/0062883-20140626-14-26-04.97-R.jpg\",\n    \"date\": \"2014-06-26T14:26:04Z\",\n    \"orientation\": \"right\",\n    \"extra\": [\n        {\n            \"file\": \"http://localhost:8888/thumbs_test/2014/0062803-20140626-00-01-15.73-R.jpg\",\n            \"date\": \"2014-06-26T00:01:15Z\",\n            \"orientation\": \"right\"\n        },\n        {\n            \"file\": \"http://localhost:8888/thumbs_test/2014/0062804-20140626-00-01-15.97-L.jpg\",\n            \"date\": \"2014-06-26T00:01:15Z\",\n            \"orientation\": \"left\"\n        },\n        ...\n*/\n\nconst Thumbnail = {\n  async fromFilename(params) {\n    try {\n      const response = await client.get('thumbs/thumbs/by_filename/', {\n        params, // params = { filename: ... }\n      });\n      return response.data;\n    } catch (error) {\n      return handleError(error);\n    }\n  },\n};\n\nexport { Tableau, Thumbnail };\n","<template>\n  <br />\n  <n-space justify=\"space-between\">\n    <n-space justify=\"left\" align=\"center\">\n      Tableau № {{ query.page * 2 - 1 }} / {{ query.page * 2 }}\n      <n-button\n        circle\n        secondary\n        type=\"primary\"\n        size=\"small\"\n        style=\"color: white\"\n      >\n        <template #icon>\n          <n-icon @click.prevent=\"downloadTableau()\">\n            <arrow-download-20-regular />\n          </n-icon>\n        </template>\n      </n-button>\n    </n-space>\n    <n-space>\n      <n-pagination\n        v-if=\"tableau\"\n        v-model:page=\"query.page\"\n        v-model:page-count=\"pageCount\"\n        simple\n        @update:page=\"onUpdatePage\"\n      />\n      <n-select\n        :value=\"year\"\n        :options=\"yearOptions\"\n        :consistent-menu-width=\"false\"\n        size=\"small\"\n        @update:value=\"yearSelected\"\n      />\n    </n-space>\n  </n-space>\n\n  <div v-if=\"tableau.results\" class=\"container\">\n    <template v-for=\"(t, i) in tableau.results\" :key=\"t.uuid\">\n      <div :style=\"{ justifySelf: 'start', gridColumn: i + 1 }\">\n        {{ t.start_date.year }}-{{ t.start_date.month }}-{{ t.start_date.day }}\n      </div>\n    </template>\n    <template v-for=\"(t, i) in tableau.results\" :key=\"t.uuid\">\n      <div ref=\"tableauRefs\" :style=\"tableauStyle(t, i)\">\n        <a\n          v-for=\"(_item, j) in t.data.paths\"\n          :key=\"j\"\n          :style=\"itemStyle(i * 1536 + j)\"\n          @click=\"showThumbnail(i * 1536 + j)\"\n        ></a>\n      </div>\n    </template>\n    <template v-for=\"(t, i) in tableau.results\" :key=\"t.uuid\">\n      <div :style=\"{ justifySelf: 'end', gridColumn: i + 1 }\">\n        {{ t.end_date.year }}-{{ t.end_date.month }}-{{ t.end_date.day }}\n      </div>\n    </template>\n  </div>\n\n  <StereometryCart />\n\n  <n-modal v-model:show=\"showModal\" class=\"modal\" :auto-focus=\"false\">\n    <n-space vertical>\n      <img v-if=\"thumbnail\" class=\"thumbnail\" :src=\"thumbnail.file\" />\n      <n-space class=\"footer\" justify=\"space-between\">\n        <n-space justify=\"left\" align=\"center\">\n          <n-button\n            v-if=\"previous\"\n            style=\"color: white\"\n            circle\n            secondary\n            size=\"small\"\n            @click=\"\n              cursor--;\n              showThumbnail();\n            \"\n          >\n            <template #icon>\n              <n-icon>\n                <arrow-previous-20-regular />\n              </n-icon>\n            </template>\n          </n-button>\n          {{ captionDisplay }}\n          <n-button\n            v-if=\"thumbnail && thumbnail.extra && thumbnail.extra.length !== 0\"\n            round\n            secondary\n            size=\"small\"\n            style=\"color: white\"\n            @click.exact.prevent=\"showExtra = true\"\n          >\n            <template #icon>\n              <n-icon>\n                <Image20Regular />\n              </n-icon>\n            </template>\n            Extra\n          </n-button>\n        </n-space>\n\n        <n-space justify=\"right\">\n          <n-button circle secondary size=\"small\" style=\"color: white\">\n            <template #icon>\n              <n-icon @click.prevent=\"downloadThumbnail()\">\n                <arrow-download-20-regular />\n              </n-icon>\n            </template>\n          </n-button>\n          <n-button\n            v-if=\"next\"\n            style=\"color: white\"\n            circle\n            secondary\n            size=\"small\"\n            @click=\"\n              cursor++;\n              showThumbnail();\n            \"\n          >\n            <template #icon>\n              <n-icon>\n                <arrow-next-20-regular />\n              </n-icon>\n            </template>\n          </n-button>\n        </n-space>\n      </n-space>\n    </n-space>\n  </n-modal>\n\n  <!-- the extra thumbnails modal to show if there are more than 4 images within the same hour -->\n  <StereometryModal\n    v-if=\"thumbnail && thumbnail.extra\"\n    :show=\"showExtra\"\n    :images=\"thumbnail.extra\"\n    @close-modal=\"showExtra = false\"\n  />\n</template>\n\n<script setup>\nimport { ref, reactive, computed, watch, onMounted, onUnmounted } from 'vue';\nimport { useRouter } from 'vue-router';\n\nimport { useStore } from 'vuex';\n\nimport { NSelect, NPagination, NModal, NSpace, NButton, NIcon } from 'naive-ui';\n\nimport {\n  ArrowNext20Regular,\n  ArrowPrevious20Regular,\n  ArrowDownload20Regular,\n  Image20Regular,\n} from '@vicons/fluent';\n\nimport { DateTime } from 'luxon';\n\nimport StereometryModal from '@/components/stereometry/StereometryModal.vue';\nimport StereometryCart from '@/components/stereometry/StereometryCart.vue';\n\nimport { Tableau, Thumbnail } from '@/api/thumbs';\n\nconst store = useStore();\n\nconst tableauRefs = ref([]);\n\nconst width = ref(null);\n\n// thumbnail modal\nconst showModal = ref(false);\n\n// extra thumbnail modal\nconst showExtra = ref(false);\n\nconst year = ref(null);\n\nconst props = defineProps({\n  page: {\n    type: Number,\n    default: 0,\n  },\n});\n\nconst query = reactive({\n  page: props.page,\n});\n\nconst router = useRouter();\n\nconst tableau = ref({});\nconst thumbnail = ref({});\nconst cursor = ref(null);\nconst next = ref({});\nconst previous = ref({});\n\nasync function fetch() {\n  const limit = 2;\n  tableau.value = await Tableau.list({\n    limit,\n    offset: (query.page - 1) * limit,\n  });\n\n  year.value = tableau.value.results[0].start_date.year;\n}\n\nconst pageCount = computed(() => {\n  if (tableau.value !== null) {\n    return Math.round(tableau.value.count / 2);\n  }\n  return null;\n});\nwatch(\n  () => props.page,\n  async () => {\n    await fetch();\n  }\n);\n\nconst captionDisplay = computed(() => {\n  let date = null;\n  if (thumbnail.value && thumbnail.value.date) {\n    date = DateTime.fromISO(thumbnail.value.date).toUTC();\n  } else {\n    const startDate = DateTime.utc(\n      parseInt(tableau.value.results[0].start_date.year, 10),\n      parseInt(tableau.value.results[0].start_date.month, 10),\n      parseInt(tableau.value.results[0].start_date.day, 10)\n    );\n    const offsetMinutes = 30 * Math.floor(cursor.value / 2);\n    date = startDate.plus({ minutes: offsetMinutes });\n  }\n  const dateStr = date.toFormat('LLL dd yyyy T');\n  let orientation;\n  if (thumbnail.value && thumbnail.value.orientation) {\n    orientation = thumbnail.value.orientation;\n  } else {\n    orientation = cursor.value % 2 === 0 ? 'left' : 'right'; // fallback for placeholders, we \"calclulate it\"\n  }\n  return `${dateStr} ${orientation}`;\n});\n\nasync function fetchThumbnail(item) {\n  thumbnail.value = await Thumbnail.fromFilename({ filename: item });\n}\n\nasync function showThumbnail(index = null) {\n  const paths = [];\n  tableau.value.results.forEach((t) => {\n    t.data.paths.forEach((path) => {\n      paths.push(path);\n    });\n  });\n\n  if (index !== null) {\n    cursor.value = index; // set cursor to index\n  }\n  const item = paths.at(cursor.value);\n  if (item) {\n    await fetchThumbnail(item);\n  } else {\n    thumbnail.value.date = null;\n    thumbnail.value.orientation = null;\n    // set image src to an empty svg that matches the thumbnail size\n    thumbnail.value.file =\n      \"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='407' height='273'><rect width='100%' height='100%' fill='black'/></svg>\";\n  }\n\n  showModal.value = true;\n}\n\nfunction downloadThumbnail() {\n  store.dispatch('stereometry/addThumbnail', thumbnail.value.file);\n  // showModal.value = false;\n}\n\nfunction downloadTableau() {\n  tableau.value.results.forEach((r) => {\n    store.dispatch('stereometry/addThumbnail', r.files[0]);\n  });\n  // showModal.value = false;\n}\n\nfunction onResize() {\n  width.value = tableauRefs.value[0].clientWidth;\n}\n\nfunction updateRoute() {\n  router.push({ query });\n}\n\nfunction onUpdatePage(value) {\n  query.page = parseInt(value, 10);\n  cursor.value = null; // reset cursor\n  updateRoute();\n}\n\nfunction itemStyle(index) {\n  if (cursor.value === index) {\n    return {\n      border: '1px solid white',\n    };\n  }\n  return {};\n}\nfunction tableauStyle(tabl, i) {\n  const [large, medium, small] = tabl.files || [];\n  // eslint-disable-next-line no-nested-ternary\n  const file = width.value > 1300 ? large : width.value > 800 ? medium : small;\n\n  return {\n    display: 'grid',\n    'grid-column': `${i + 1}`,\n    'grid-template-columns': 'repeat(32, 1fr)',\n    'grid-template-rows': 'repeat(48, 1fr)',\n    'aspect-ratio': 'calc(32 * 407 / (48 * 273))',\n    'background-image': `url(\"${file}\")`,\n    'background-size': 'cover',\n    'background-position': 'center',\n    'background-repeat': 'no-repeat',\n  };\n}\n\nconst yearOptions = computed(() => {\n  const options = [];\n\n  const startDate = new Date('2012-09-15'); // this is hard-coded\n  const pageSize = 32; // days\n  const startYear = startDate.getFullYear();\n  const currentYear = new Date().getFullYear();\n\n  for (let y = startYear; y <= currentYear; y += 1) {\n    const targetDate = new Date(`${y}-01-01`);\n    const diffInDays = Math.floor(\n      (targetDate - startDate) / (1000 * 60 * 60 * 24)\n    );\n    const pageNumber = Math.max(0, Math.floor(diffInDays / pageSize));\n\n    const option = {\n      value: pageNumber,\n      label: `~ ${y}`,\n    };\n    options.push(option);\n  }\n\n  return options;\n});\n\nfunction yearSelected(page) {\n  onUpdatePage(page + 1);\n}\n\nonMounted(async () => {\n  await fetch();\n\n  width.value = tableauRefs.value[0].clientWidth;\n  window.addEventListener('resize', onResize);\n});\n\nonUnmounted(() => {\n  window.removeEventListener('resize', onResize);\n});\n</script>\n\n<style lang=\"scss\" scoped>\n.container {\n  display: grid;\n  grid-template-columns: 1fr 1fr;\n  column-gap: 10px;\n}\n\n.modal {\n  padding: 10px;\n  background: black;\n}\n\n.thumbnail {\n  width: 800px; // size-up the thumbnail a bit\n}\n\n.footer {\n  text-transform: capitalize;\n  color: white;\n}\n</style>\n","import { createRouter, createWebHistory } from 'vue-router';\n\nimport store from '@/store/index';\n\nimport Error404NotFound from '@/views/Error404NotFound.vue';\nimport YearView from '@/views/YearView.vue';\nimport MonthView from '@/views/MonthView.vue';\nimport DayView from '@/views/DayView.vue';\nimport Player from '@/components/Player.vue';\nimport HourView from '@/views/HourView.vue';\nimport FaqView from '@/views/FaqView.vue';\nimport AboutView from '@/views/AboutView.vue';\nimport ProfileView from '@/views/ProfileView.vue';\nimport LoginView from '@/views/LoginView.vue';\nimport AnnotationView from '@/views/AnnotationView.vue';\nimport StereometryView from '@/views/StereometryView.vue';\n\nconst router = createRouter({\n  history: createWebHistory(),\n  routes: [\n    {\n      path: '/',\n      name: 'home',\n      component: YearView,\n      props: (route) => ({\n        location: route.query.location || 'SPI',\n        signal: route.query.signal || 'hydro',\n      }),\n    },\n    {\n      path: '/login',\n      name: 'login',\n      component: LoginView,\n    },\n    {\n      path: '/profile',\n      name: 'profile',\n      component: ProfileView,\n      meta: { requiresAuth: true },\n    },\n    {\n      path: '/y',\n      name: 'year',\n      component: YearView,\n      props: (route) => ({\n        location: route.query.location || 'SPI',\n        signal: route.query.signal || 'hydro',\n        year: route.query.year || null,\n      }),\n    },\n    {\n      path: '/annotation',\n      name: 'annotation',\n      component: AnnotationView,\n      props: (route) => ({\n        query: route.query,\n      }),\n    },\n    {\n      path: '/m',\n      name: 'month',\n      component: MonthView,\n      props: (route) => ({\n        year: Number(route.query.year),\n        month: Number(route.query.month),\n        location: route.query.location || 'SPI',\n        signal: route.query.signal || 'hydro',\n      }),\n    },\n    {\n      path: '/d',\n      name: 'day',\n      component: DayView,\n      props: (route) => ({\n        year: Number(route.query.year),\n        month: Number(route.query.month),\n        day: Number(route.query.day),\n        location: route.query.location || 'SPI',\n        signal: route.query.signal || 'hydro',\n      }),\n    },\n    {\n      path: '/p',\n      name: 'play',\n      component: Player,\n      props: (route) => ({\n        uuid: route.query.uuid,\n        signal: route.query.signal,\n        t: Number(route.query.t) || 0,\n      }),\n    },\n    {\n      path: '/i/:year/:month/:hour',\n      name: 'hour',\n      component: HourView,\n      props: true,\n    },\n    {\n      path: '/stereometry',\n      name: 'stereometry',\n      component: StereometryView,\n      props: (route) => ({\n        page: Number(route.query.page) || 1,\n      }),\n    },\n    {\n      path: '/faq',\n      name: 'faq',\n      component: FaqView,\n      props: false,\n    },\n    {\n      path: '/about',\n      name: 'about',\n      component: AboutView,\n      props: false,\n    },\n    {\n      path: '/:pathMatch(.*)?',\n      name: 'NotFound',\n      component: Error404NotFound,\n    },\n  ],\n\n  scrollBehavior(to) {\n    if (to.hash) {\n      return {\n        el: to.hash,\n        behavior: 'smooth',\n      };\n    }\n    return {};\n  },\n});\n\nrouter.beforeEach((to) => {\n  const loggedIn = store.getters['auth/authenticated'];\n  if (to.meta.requiresAuth && !loggedIn) {\n    console.log('login, then redirec to', to.fullPath);\n    return {\n      name: 'login',\n      query: { redirect: to.path, ...to.query },\n    };\n  }\n  return null;\n});\n\nexport default router;\n","export default \"__VITE_ASSET__c3036a2b__\"","export default \"__VITE_ASSET__09860cd8__\"","<template>\n  <n-config-provider\n    :theme=\"theme\"\n    :theme-overrides=\"dark ? themeOverridesDark : themeOverridesDefault\"\n  >\n    <n-global-style />\n    <n-loading-bar-provider>\n      <div id=\"wrapper\">\n        <header>\n          <n-space class=\"navigation\" justify=\"space-between\" align=\"center\">\n            <n-menu\n              style=\"font-weight: bolder; text-transform: uppercase\"\n              mode=\"horizontal\"\n              :value=\"activeRoute\"\n              :options=\"menuOptionsLeft\"\n            />\n            <n-space align=\"center\">\n              <n-menu\n                style=\"font-weight: bolder; text-transform: uppercase\"\n                mode=\"horizontal\"\n                :value=\"activeRoute\"\n                :options=\"menuOptions\"\n              />\n              <n-menu\n                style=\"font-weight: bolder; text-transform: uppercase\"\n                mode=\"horizontal\"\n                :value=\"activeRoute\"\n                :options=\"isLoggedIn ? userOptionsLoggedIn : userOptions\"\n              />\n              <n-switch v-model:value=\"dark\" :on-update:value=\"onChangeTheme\">\n                <template #unchecked-icon>\n                  <n-icon :component=\"WeatherMoon16Filled\" />\n                </template>\n                <template #checked-icon>\n                  <n-icon :component=\"WeatherSunny16Regular\" />\n                </template>\n              </n-switch>\n            </n-space>\n          </n-space>\n        </header>\n        <!-- <n-back-top :right=\"100\" /> -->\n        <main>\n          <section>\n            <router-view v-slot=\"{ Component, _route }\">\n              <component\n                :is=\"Component\"\n                :key=\"route.meta.usePathKey ? _route.path : undefined\"\n              />\n            </router-view>\n          </section>\n        </main>\n      </div>\n      <footer>\n        <div :style=\"logoStyle\">\n          <img :src=\"logo\" />\n        </div>\n        <div>\n          <div>Computer Signals Audio Archive</div>\n          <div>Zurich University of the Arts</div>\n          <div>\n            <a rel=\"license\" href=\"http://creativecommons.org/licenses/by/4.0/\"\n              ><img\n                alt=\"Creative Commons License\"\n                style=\"border-width: 0\"\n                src=\"https://i.creativecommons.org/l/by/4.0/80x15.png\" /></a\n            ><br />This work is licensed under a\n            <Link\n              rel=\"license\"\n              href=\"http://creativecommons.org/licenses/by/4.0/\"\n            >\n              Creative Commons Attribution 4.0 International License </Link\n            >.\n          </div>\n        </div>\n        <div style=\"text-align: left\">\n          <div style=\"padding-bottom: 15px\">funded by</div>\n          <div :style=\"logoStyle\">\n            <img style=\"width: 80%\" :src=\"snfLogo\" />\n          </div>\n        </div>\n      </footer>\n    </n-loading-bar-provider>\n  </n-config-provider>\n</template>\n\n<script setup>\nimport { h, ref, computed, watch } from 'vue';\nimport { useStore } from 'vuex';\nimport { useRoute, useRouter, RouterLink } from 'vue-router';\nimport {\n  NConfigProvider,\n  NGlobalStyle,\n  NSpace,\n  NMenu,\n  NSwitch,\n  NIcon,\n  darkTheme,\n  NLoadingBarProvider,\n} from 'naive-ui';\n\nimport { WeatherMoon16Filled, WeatherSunny16Regular } from '@vicons/fluent';\n\nimport colors from '@/components/colors';\n\nimport Link from '@/components/Link.vue';\n\nimport logo from '@/assets/ZHdK_Logo.svg';\nimport snfLogo from '@/assets/SNF_logo_standard_web_sw_pos_e.svg';\n\n// navigation logic\nconst store = useStore();\nconst route = useRoute();\nconst router = useRouter();\nconst activeRoute = ref(null);\nwatch(\n  () => route.path,\n  async (path) => {\n    const part = path.split('/')[1];\n    activeRoute.value = part;\n  }\n);\n\n// store logic\nstore.commit('initialiseStore'); // must be done BEFORE subscribe, see @store/index.js for implementation\nstore.subscribe((_mutation, state) => {\n  // caching selective values from store to local storage\n  // we could also save the state as a whole\n  const cache = {\n    auth: state.auth,\n    stereometry: state.stereometry,\n    player: state.player,\n  };\n  localStorage.setItem('store', JSON.stringify(cache));\n});\n\n// theme logic\nconst dark = ref(false);\n// const themeRef = useThemeVars();\nif (window.localStorage.getItem('darkMode') !== null) {\n  dark.value = JSON.parse(window.localStorage.getItem('darkMode'));\n}\nfunction onChangeTheme(value) {\n  dark.value = value;\n  window.localStorage.setItem('darkMode', dark.value);\n  // eslint-disable-next-line no-restricted-globals\n  location.reload(); // not so nice, but works better right now.\n}\n\n// computed\nconst theme = computed(() => {\n  return dark.value ? darkTheme : undefined;\n});\nconst logoStyle = computed(() => {\n  if (dark.value) {\n    return { filter: 'invert(100%)' };\n  }\n  return {};\n});\n\n// variables\nconst themeOverridesDefault = {\n  common: {\n    bodyColor: 'rgb(250, 250, 250)',\n    bodyColorAlt: 'rgb(200, 200, 200)',\n    primaryColor: colors.primaryColorDefault,\n    primaryColorHover: colors.primaryColorDefault,\n  },\n  Switch: {\n    railColorActive: '#000',\n  },\n};\nconst themeOverridesDark = {\n  common: {\n    bodyColor: 'rgb(0, 0, 0)',\n    bodyColorAlt: 'rgb(20, 20, 20)',\n    primaryColor: colors.primaryColorDark,\n    primaryColorHover: colors.primaryColorDark,\n  },\n  Switch: {\n    railColorActive: '#000',\n  },\n};\n\nconst isLoggedIn = computed(() => store.getters['auth/authenticated']);\n\nfunction logout() {\n  store.dispatch('auth/logout');\n  router.push({ path: '/' });\n}\n\nconst userOptionsLoggedIn = [\n  {\n    label: () =>\n      h(\n        RouterLink,\n        {\n          to: {\n            name: 'profile',\n          },\n        },\n        { default: () => 'Profile' }\n      ),\n    key: 'profile',\n  },\n  {\n    label: () =>\n      h('div', {\n        innerHTML: 'logout',\n        onClick: logout,\n      }),\n    key: 'logout',\n  },\n];\n\nconst userOptions = [\n  {\n    label: () =>\n      h(\n        RouterLink,\n        {\n          to: {\n            name: 'login',\n            query: { redirect: route.path, ...route.query },\n          },\n        },\n        { default: () => 'Login' }\n      ),\n    key: 'login',\n  },\n];\n\nconst menuOptionsLeft = [\n  {\n    label: () =>\n      h(\n        RouterLink,\n        {\n          to: {\n            name: 'home',\n          },\n        },\n        { default: () => 'Computer Signals Audio Archive' }\n      ),\n    key: 'home',\n  },\n  {\n    label: () =>\n      h(\n        RouterLink,\n        {\n          to: {\n            name: 'about',\n          },\n        },\n        { default: () => 'ABOUT' }\n      ),\n    key: 'about',\n  },\n];\n\nconst menuOptions = [\n  {\n    label: () =>\n      h(\n        RouterLink,\n        {\n          to: {\n            name: 'year',\n          },\n        },\n        { default: () => 'Audio' }\n      ),\n    key: 'year',\n  },\n  {\n    label: () =>\n      h(\n        RouterLink,\n        {\n          to: {\n            name: 'annotation',\n          },\n        },\n        { default: () => 'Annotations' }\n      ),\n    key: 'annotation',\n  },\n  {\n    label: () =>\n      h(\n        RouterLink,\n        {\n          to: {\n            name: 'stereometry',\n          },\n        },\n        { default: () => 'Stereometry' }\n      ),\n    key: 'stereometry',\n  },\n  {\n    label: () =>\n      h(\n        RouterLink,\n        {\n          to: {\n            name: 'faq',\n          },\n        },\n        { default: () => 'FAQ' }\n      ),\n    key: 'faq',\n  },\n];\n</script>\n\n<style lang=\"scss\" scoped>\nfooter {\n  text-align: center;\n}\n\n.navigation {\n  margin: 25px 25px 0px 25px;\n}\n</style>\n","import '@/style/main.scss';\nimport { createApp } from 'vue';\nimport router from '@/router';\nimport store from '@/store';\nimport App from '@/App.vue';\n\nexport default {\n  app: createApp(App).use(router).use(store).mount('#app'),\n};\n"],"names":["makeMap","str","expectsLowerCase","map","list","i","val","specialBooleanAttrs","isSpecialBooleanAttr","includeBooleanAttr","value","normalizeStyle","isArray","res","item","normalized","isString","parseStringStyle","key","isObject","listDelimiterRE","propertyDelimiterRE","cssText","ret","tmp","normalizeClass","name","looseCompareArrays","a","b","equal","looseEqual","aValidType","isDate","bValidType","isSymbol","aKeysCount","bKeysCount","aHasKey","bHasKey","looseIndexOf","arr","toDisplayString","objectToString","isFunction","replacer","_key","isMap","entries","isSet","isPlainObject","EMPTY_OBJ","EMPTY_ARR","NOOP","NO","onRE","isOn","isModelListener","extend","remove","el","hasOwnProperty","hasOwn","toTypeString","isPromise","toRawType","isIntegerKey","isReservedProp","cacheStringFunction","fn","cache","camelizeRE","camelize","_","c","hyphenateRE","hyphenate","capitalize","toHandlerKey","hasChanged","oldValue","invokeArrayFns","fns","arg","def","obj","toNumber","n","_globalThis","getGlobalThis","activeEffectScope","EffectScope","detached","currentEffectScope","fromParent","l","last","recordEffectScope","effect","scope","createDep","effects","dep","wasTracked","trackOpBit","newTracked","initDepMarkers","deps","finalizeDepMarkers","ptr","targetMap","effectTrackDepth","maxMarkerBits","activeEffect","ITERATE_KEY","MAP_KEY_ITERATE_KEY","ReactiveEffect","scheduler","parent","lastShouldTrack","shouldTrack","cleanupEffect","trackStack","pauseTracking","resetTracking","track","target","type","depsMap","trackEffects","debuggerEventExtraInfo","trigger","newValue","oldTarget","triggerEffects","triggerEffect","isNonTrackableKeys","builtInSymbols","get","createGetter","shallowGet","readonlyGet","arrayInstrumentations","createArrayInstrumentations","instrumentations","args","toRaw","isReadonly","shallow","receiver","shallowReadonlyMap","readonlyMap","shallowReactiveMap","reactiveMap","targetIsArray","isRef","readonly","reactive","set","createSetter","shallowSet","isShallow","hadKey","result","deleteProperty","has","ownKeys","mutableHandlers","readonlyHandlers","shallowReactiveHandlers","toShallow","getProto","v","get$1","rawTarget","rawKey","wrap","toReadonly","toReactive","has$1","size","add","set$1","deleteEntry","clear","hadItems","createForEach","callback","thisArg","observed","createIterableMethod","method","targetIsMap","isPair","isKeyOnly","innerIterator","done","createReadonlyMethod","createInstrumentations","mutableInstrumentations","shallowInstrumentations","readonlyInstrumentations","shallowReadonlyInstrumentations","createInstrumentationGetter","mutableCollectionHandlers","shallowCollectionHandlers","readonlyCollectionHandlers","targetTypeMap","rawType","getTargetType","createReactiveObject","shallowReactive","baseHandlers","collectionHandlers","proxyMap","existingProxy","targetType","proxy","isReactive","isProxy","raw","markRaw","trackRefValue","ref","triggerRefValue","newVal","r","createRef","shallowRef","rawValue","RefImpl","__v_isShallow","useDirectValue","unref","shallowUnwrapHandlers","proxyRefs","objectWithRefs","ObjectRefImpl","_object","_defaultValue","toRef","object","defaultValue","_a","ComputedRefImpl","getter","_setter","isSSR","self","computed","getterOrOptions","debugOptions","setter","onlyGetter","callWithErrorHandling","instance","err","handleError","callWithAsyncErrorHandling","values","throwInDev","contextVNode","cur","exposedInstance","errorInfo","errorCapturedHooks","appErrorHandler","logError","isFlushing","isFlushPending","queue","flushIndex","pendingPostFlushCbs","activePostFlushCbs","postFlushIndex","resolvedPromise","currentFlushPromise","nextTick","p","findInsertionIndex","id","start","end","middle","getId","queueJob","job","queueFlush","flushJobs","invalidateJob","queuePostFlushCb","cb","flushPreFlushCbs","seen","flushPostFlushCbs","deduped","comparator","diff","check","emit$1","event","rawArgs","props","modelArg","modifiersKey","number","trim","handlerName","handler","onceHandler","normalizeEmitsOptions","comp","appContext","asMixin","cached","hasExtends","extendEmits","normalizedFromExtend","isEmitListener","options","currentRenderingInstance","currentScopeId","setCurrentRenderingInstance","prev","pushScopeId","popScopeId","withCtx","ctx","isNonScopedSlot","renderFnWithContext","setBlockTracking","prevInstance","renderComponentRoot","Component","vnode","withProxy","propsOptions","slots","attrs","emit","render","renderCache","data","setupState","inheritAttrs","fallthroughAttrs","proxyToUse","normalizeVNode","getFunctionalFallthrough","blockStack","createVNode","Comment","root","keys","shapeFlag","filterModelListeners","cloneVNode","shouldUpdateComponent","prevVNode","nextVNode","optimized","prevProps","prevChildren","component","nextProps","nextChildren","patchFlag","emits","hasPropsChanged","dynamicProps","emitsOptions","nextKeys","updateHOCHostEl","isSuspense","queueEffectWithSuspense","suspense","provide","currentInstance","provides","parentProvides","inject","treatDefaultAsFactory","watchEffect","doWatch","INITIAL_WATCHER_VALUE","watch","source","immediate","deep","flush","onTrack","onTrigger","forceTrigger","isMultiSource","isShallow$1","s","traverse","cleanup","onCleanup","baseGetter","isInSSRComponentSetup","queuePostRenderEffect","instanceWatch","publicThis","createPathGetter","setCurrentInstance","unsetCurrentInstance","path","segments","useTransitionState","state","onMounted","onBeforeUnmount","TransitionHookValidator","BaseTransitionImpl","getCurrentInstance","prevTransitionKey","children","getTransitionRawChildren","child","rawProps","mode","emptyPlaceholder","innerChild","getKeepAliveChild","enterHooks","resolveTransitionHooks","setTransitionHooks","oldChild","oldInnerChild","transitionKeyChanged","getTransitionKey","isSameVNodeType","leavingHooks","earlyRemove","delayedLeave","leavingVNodesCache","getLeavingNodesForType","BaseTransition","leavingVNodes","appear","persisted","onBeforeEnter","onEnter","onAfterEnter","onEnterCancelled","onBeforeLeave","onLeave","onAfterLeave","onLeaveCancelled","onBeforeAppear","onAppear","onAfterAppear","onAppearCancelled","callHook","hook","callAsyncHook","hooks","leavingVNode","afterHook","cancelHook","called","cancelled","isKeepAlive","keepComment","parentKey","keyedFragmentCount","Fragment","defineComponent","isAsyncWrapper","onActivated","registerKeepAliveHook","onDeactivated","wrappedHook","current","injectHook","injectToKeepAliveRoot","keepAliveRoot","injected","onUnmounted","prepend","createHook","lifecycle","onBeforeMount","onBeforeUpdate","onUpdated","onServerPrefetch","onRenderTriggered","onRenderTracked","onErrorCaptured","withDirectives","directives","internalInstance","getExposeProxy","bindings","dir","modifiers","invokeDirectiveHook","oldBindings","binding","COMPONENTS","resolveComponent","maybeSelfReference","resolveAsset","NULL_DYNAMIC_COMPONENT","resolveDynamicComponent","warnMissing","selfName","getComponentName","resolve","registry","renderList","renderItem","index","renderSlot","fallback","noSlotted","slot","openBlock","validSlotContent","ensureValidVNode","rendered","createBlock","vnodes","isVNode","getPublicInstance","isStatefulComponent","publicPropertiesMap","resolveMergedOptions","PublicInstanceProxyHandlers","accessCache","normalizedProps","shouldCacheAccess","publicGetter","cssModule","globalProperties","descriptor","applyOptions","dataOptions","computedOptions","methods","watchOptions","provideOptions","injectOptions","created","beforeMount","mounted","beforeUpdate","updated","activated","deactivated","beforeDestroy","beforeUnmount","destroyed","unmounted","renderTracked","renderTriggered","errorCaptured","serverPrefetch","expose","components","filters","resolveInjections","methodHandler","opt","createWatcher","registerLifecycleHook","register","_hook","exposed","checkDuplicateProperties","unwrapRef","normalizeInject","h","base","mixins","extendsOptions","globalMixins","optionMergeStrategies","resolved","m","mergeOptions","to","from","strats","strat","internalOptionMergeStrats","mergeDataFn","mergeObjectOptions","mergeAsArray","mergeWatchOptions","mergeInject","merged","initProps","isStateful","InternalObjectKey","setFullProps","updateProps","rawPrevProps","rawCurrentProps","hasAttrsChanged","propsToUpdate","camelizedKey","resolvePropValue","kebabKey","needCastKeys","rawCastValues","camelKey","castValues","isAbsent","hasDefault","propsDefaults","normalizePropsOptions","extendProps","normalizedKey","validatePropName","prop","booleanIndex","getTypeIndex","stringIndex","getType","ctor","match","isSameType","expectedTypes","t","isInternalKey","normalizeSlotValue","normalizeSlot","rawSlot","normalizeObjectSlots","rawSlots","normalizeVNodeSlots","initSlots","updateSlots","needDeletionCheck","deletionComparisonTarget","createAppContext","uid","createAppAPI","hydrate","rootComponent","rootProps","context","installedPlugins","isMounted","app","version","plugin","mixin","directive","rootContainer","isHydrate","isSVG","setRef","rawRef","oldRawRef","parentSuspense","isUnmount","refValue","owner","oldRef","refs","_isString","_isRef","doSet","existing","createRenderer","baseCreateRenderer","createHydrationFns","hostInsert","hostRemove","hostPatchProp","hostCreateElement","hostCreateText","hostCreateComment","hostSetText","hostSetElementText","hostParentNode","hostNextSibling","hostSetScopeId","hostCloneNode","hostInsertStaticContent","patch","n1","n2","container","anchor","parentComponent","slotScopeIds","getNextHostNode","unmount","Text","processText","processCommentNode","Static","mountStaticNode","processFragment","processElement","processComponent","internals","moveStaticNode","nextSibling","next","removeStaticNode","mountElement","patchElement","vnodeHook","transition","dirs","mountChildren","unmountChildren","invokeVNodeHook","setScopeId","needCallTransitionHooks","scopeId","subTree","parentVNode","cloneIfMounted","dynamicChildren","oldProps","newProps","toggleRecurse","areChildrenSVG","patchBlockChildren","patchChildren","patchProps","oldChildren","newChildren","fallbackContainer","oldVNode","newVNode","fragmentStartAnchor","fragmentEndAnchor","fragmentSlotScopeIds","traverseStaticChildren","mountComponent","updateComponent","initialVNode","createComponentInstance","setupComponent","setupRenderEffect","placeholder","updateComponentPreRender","componentUpdateFn","bu","u","originNext","nextTree","prevTree","bm","isAsyncWrapperVNode","hydrateNode","hydrateSubTree","scopedInitialVNode","update","c1","prevShapeFlag","c2","patchKeyedChildren","patchUnkeyedChildren","oldLength","newLength","commonLength","nextChild","parentAnchor","l2","e1","e2","nextPos","s1","s2","keyToNewIndexMap","j","patched","toBePatched","moved","maxNewIndexSoFar","newIndexToOldIndexMap","prevChild","newIndex","increasingNewIndexSequence","getSequence","nextIndex","move","moveType","leave","delayLeave","afterLeave","performLeave","doRemove","shouldInvokeDirs","shouldInvokeVnodeHook","unmountComponent","removeFragment","performRemove","bum","um","allowed","ch1","ch2","len","arrI","isTeleport","isTeleportDisabled","isTargetSVG","resolveTarget","select","targetSelector","TeleportImpl","insert","querySelector","createText","createComment","disabled","mainAnchor","targetAnchor","mount","wasDisabled","currentContainer","currentAnchor","moveTeleport","nextTarget","hydrateTeleport","isReorder","node","parentNode","hydrateChildren","targetNode","Teleport","currentBlock","disableTracking","closeBlock","isBlockTreeEnabled","setupBlock","createElementBlock","createBaseVNode","normalizeKey","normalizeRef","ref_key","ref_for","isBlockNode","needFullChildrenNormalization","normalizeChildren","_createVNode","cloned","isClassComponent","guardReactiveProps","klass","style","extraProps","mergeRef","mergedProps","mergeProps","createTextVNode","text","flag","createStaticVNode","content","numberOfNodes","createCommentVNode","asBlock","slotFlag","toMerge","incoming","emptyAppContext","uid$1","setupResult","setupStatefulComponent","setup","setupContext","createSetupContext","resolvedResult","handleSetupResult","e","finishComponentSetup","compile","skipOptions","template","isCustomElement","compilerOptions","delimiters","componentCompilerOptions","finalCompilerOptions","createAttrsProxy","includeInferred","computed$1","propsOrChildren","svgNS","doc","templateContainer","nodeOps","tag","is","selector","before","wrapper","patchClass","transitionClasses","patchStyle","isCssString","setStyle","currentDisplay","importantRE","prefixed","autoPrefix","prefixes","prefixCache","rawName","xlinkNS","patchAttr","isBoolean","patchDOMProp","needRemove","_getNow","skipTimestampCheck","ffMatch","cachedNow","reset","getNow","addEventListener","removeEventListener","patchEvent","prevValue","nextValue","invokers","existingInvoker","parseName","invoker","createInvoker","optionsModifierRE","initialValue","timeStamp","patchStopImmediatePropagation","originalStop","nativeOnRE","patchProp","shouldSetAsProp","TRANSITION","ANIMATION","Transition","resolveTransitionProps","DOMTransitionPropsValidators","TransitionPropsValidators","hasExplicitCallback","baseProps","duration","enterFromClass","enterActiveClass","enterToClass","appearFromClass","appearActiveClass","appearToClass","leaveFromClass","leaveActiveClass","leaveToClass","durations","normalizeDuration","enterDuration","leaveDuration","finishEnter","isAppear","removeTransitionClass","finishLeave","makeEnterHook","nextFrame","addTransitionClass","whenTransitionEnds","forceReflow","NumberOf","cls","_vtc","endId","expectedType","explicitTimeout","resolveIfNotStale","timeout","propCount","getTransitionInfo","endEvent","ended","onEnd","styles","getStyleProperties","transitionDelays","transitionDurations","transitionTimeout","getTimeout","animationDelays","animationDurations","animationTimeout","hasTransform","delays","d","toMs","positionMap","newPositionMap","TransitionGroupImpl","moveClass","hasCSSTransform","callPendingCbs","recordPosition","movedChildren","applyTranslation","cssTransitionProps","TransitionGroup","oldPos","newPos","dx","dy","clone","getModelAssigner","vModelSelect","isSetModel","selectedVal","o","getValue","setSelected","_binding","isMultiple","option","optionValue","systemModifiers","modifierGuards","withModifiers","guard","vShow","setDisplay","rendererOptions","renderer","ensureRenderer","createApp","containerOrSelector","normalizeContainer","getDevtoolsGlobalHook","getTarget","isProxyAvailable","HOOK_SETUP","HOOK_PLUGIN_SETTINGS_SET","supported","perf","isPerformanceSupported","now","ApiProxy","defaultSettings","localSettingsSaveId","currentSettings","pluginId","_target","__async","setupDevtoolsPlugin","pluginDescriptor","setupFn","enableProxy","isBrowser","isESModule","assign","applyToParams","params","newParams","noop","TRAILING_SLASH_RE","removeTrailingSlash","parseURL","parseQuery","location","currentLocation","query","searchString","hash","hashPos","searchPos","resolveRelativePath","stringifyURL","stringifyQuery","stripBase","pathname","isSameRouteLocation","aLastIndex","bLastIndex","isSameRouteRecord","isSameRouteLocationParams","isSameRouteLocationParamsValue","isEquivalentArray","fromSegments","toSegments","position","toPosition","segment","NavigationType","NavigationDirection","normalizeBase","baseEl","BEFORE_HASH_RE","createHref","getElementPosition","offset","docRect","elRect","computeScrollPosition","scrollToPosition","scrollToOptions","positionEl","isIdSelector","getScrollKey","delta","scrollPositions","saveScrollPosition","scrollPosition","getSavedScrollPosition","scroll","createBaseLocation","createCurrentLocation","search","slicePos","pathFromHash","useHistoryListeners","historyState","replace","listeners","teardowns","pauseState","popStateHandler","fromState","listener","pauseListeners","listen","teardown","beforeUnloadListener","history","destroy","buildState","back","forward","replaced","computeScroll","useHistoryStateNavigation","changeLocation","hashIndex","url","push","currentState","createWebHistory","historyNavigation","historyListeners","go","triggerListeners","routerHistory","isRouteLocation","route","isRouteName","START_LOCATION_NORMALIZED","NavigationFailureSymbol","NavigationFailureType","createRouterError","isNavigationFailure","error","BASE_PARAM_PATTERN","BASE_PATH_PARSER_OPTIONS","REGEX_CHARS_RE","tokensToParser","extraOptions","score","pattern","segmentScores","tokenIndex","token","subSegmentScore","repeatable","optional","regexp","re","subPattern","parse","stringify","avoidDuplicatedSlash","param","compareScoreArray","comparePathParserScore","aScore","bScore","isLastScoreNegative","ROOT_TOKEN","VALID_PARAM_RE","tokenizePath","crash","message","buffer","previousState","tokens","finalizeSegment","char","customRe","consumeBuffer","addCharToBuffer","createRouteRecordMatcher","record","parser","matcher","createRouterMatcher","routes","globalOptions","matchers","matcherMap","getRecordMatcher","addRoute","originalRecord","isRootAdd","mainNormalizedRecord","normalizeRouteRecord","normalizedRecords","aliases","alias","originalMatcher","normalizedRecord","parentPath","connectingSlash","isAliasRecord","removeRoute","insertMatcher","matcherRef","getRoutes","isRecordChildOf","paramsFromLocation","k","matched","parentMatcher","mergeMetaFields","normalizeRecordProps","propsObject","meta","defaults","partialOptions","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","encodeHash","encodeQueryValue","encodeQueryKey","encodePath","encodeParam","decode","searchParams","searchParam","eqPos","currentValue","normalizeQuery","normalizedQuery","matchedRouteKey","viewDepthKey","routerKey","routeLocationKey","routerViewLocationKey","useCallbacks","handlers","guardToPromiseFn","enterCallbackArray","reject","valid","guardReturn","guardCall","extractComponentsGuards","guardType","guards","rawComponent","isRouteComponent","componentPromise","resolvedComponent","useLink","router","currentRoute","activeRecordIndex","length","routeMatched","currentMatched","parentRecordPath","getOriginalPath","isActive","includesParams","isExactActive","navigate","guardEvent","RouterLinkImpl","link","elClass","getLinkClass","RouterLink","outer","inner","innerValue","outerValue","propClass","globalClass","defaultClass","RouterViewImpl","injectedRoute","routeToDisplay","injectedDepth","depth","initialDepth","matchedRoute","matchedRouteRef","viewRef","oldInstance","oldName","currentName","ViewComponent","routePropsOption","routeProps","slotContent","RouterView","createRouter","parseQuery$1","stringifyQuery$1","beforeGuards","beforeResolveGuards","afterGuards","pendingLocation","normalizeParams","paramValue","encodeParams","decodeParams","parentOrRoute","recordMatcher","routeMatcher","hasRoute","rawLocation","locationNormalized","href","matcherLocation","targetParams","fullPath","locationAsObject","checkCanceledNavigation","pushWithRedirect","handleRedirectRecord","lastMatched","redirect","newTargetLocation","redirectedFrom","targetLocation","force","shouldRedirect","toLocation","failure","handleScroll","markAsReady","triggerError","finalizeNavigation","triggerAfterEach","checkCanceledNavigationAndReject","leavingRecords","updatingRecords","enteringRecords","extractChangingRecords","canceledNavigationCheck","runGuardQueue","beforeEnter","isPush","isFirstNavigation","removeHistoryListener","setupListeners","_from","info","readyHandlers","errorHandlers","ready","isReady","scrollBehavior","started","installedApps","reactiveRoute","unmountApp","promise","recordFrom","recordTo","useRouter","useRoute","storeKey","useStore","forEachValue","partial","genericSubscribe","subs","resetStore","store","hot","installModule","resetStoreState","oldState","wrappedGetters","computedObj","enableStrictMode","rootState","module","isRoot","namespace","parentState","getNestedState","moduleName","local","makeLocalContext","mutation","namespacedType","registerMutation","action","registerAction","registerGetter","noNamespace","_type","_payload","_options","unifyObjectStyle","payload","makeLocalGetters","gettersProxy","splitPos","localType","entry","rawGetter","LABEL_VUEX_BINDINGS","MUTATIONS_LAYER_ID","ACTIONS_LAYER_ID","INSPECTOR_ID","actionId","addDevtools","api","COLOR_LIME_500","nodes","flattenStoreForInspectorTree","formatStoreForInspectorTree","modulePath","formatStoreForInspectorState","getStoreModule","COLOR_DARK","COLOR_WHITE","TAG_NAMESPACED","extractNameFromPath","filter","getters","gettersKeys","storeState","tree","transformPathsToObjectTree","canThrow","leafKey","moduleMap","names","Module","rawModule","runtime","rawState","prototypeAccessors$1","ModuleCollection","rawRootModule","this$1$1","newModule","rawChildModule","targetModule","createStore","Store","plugins","strict","devtools","dispatch","commit","prototypeAccessors","injectKey","useDevtools","sub","newOptions","committing","debug","bind","require$$0","toString","isUndefined","isBuffer","isArrayBuffer","isFormData","isArrayBufferView","isNumber","isFile","isBlob","isStream","isURLSearchParams","isStandardBrowserEnv","forEach","merge","assignValue","deepMerge","utils","encode","buildURL","paramsSerializer","serializedParams","parts","hashmarkIndex","InterceptorManager","fulfilled","rejected","InterceptorManager_1","transformData","headers","isCancel","normalizeHeaderName","normalizedName","enhanceError","config","code","request","response","createError","settle","validateStatus","isAbsoluteURL","combineURLs","baseURL","relativeURL","require$$1","buildFullPath","requestedURL","ignoreDuplicateOf","parseHeaders","parsed","line","isURLSameOrigin","msie","urlParsingNode","originURL","resolveURL","requestURL","cookies","expires","domain","secure","cookie","require$$2","require$$3","require$$4","require$$5","require$$6","xhr","requestData","requestHeaders","username","password","responseHeaders","responseData","timeoutErrorMessage","require$$7","xsrfValue","cancel","DEFAULT_CONTENT_TYPE","setContentTypeIfUnset","getDefaultAdapter","adapter","status","defaults_1","throwIfCancellationRequested","dispatchRequest","reason","mergeConfig","config1","config2","valueFromConfig2Keys","mergeDeepPropertiesKeys","defaultToConfig2Keys","axiosKeys","otherKeys","Axios","instanceConfig","chain","interceptor","Axios_1","Cancel","Cancel_1","CancelToken","executor","resolvePromise","CancelToken_1","spread","createInstance","defaultConfig","axios","promises","require$$8","axiosModule","axios_1","client","Auth","actions","accessToken","mutations","auth","PAUSED","PLAYING","ZOOM_LEVEL_MIN_SECONDS","ZOOM_LEVEL_MAX_SECONDS","ZOOM_LEVEL_INITIAL_SECONDS","audioState","direction","seconds","player","Annotation","uuid","_0","Recording","filtered","_1","audioUuid","annotations","categories","keywords","ev","audio","annotation","thumbnail","stereometry","monthview","_export_sfc","sfc","_sfc_main","_createElementVNode","_openBlock","_createElementBlock","_hoisted_1","$props","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_35","_hoisted_42","_bPrefix","_ePrefix","_mPrefix","_plugin","memorizedB","memorizedE","elementToSelector","modifier","els","notM","ampCount","cnt","separatorRegex","extraSpaceRegex","resolveSelectorWithAmp","amp","nextAmp","partialSelector","round","partialAmp","partialNextAmp","nextPartialNextAmp","selectorItr","part","resolveSelector","parseSelectorPath","selectorPaths","removeElement","parentElement","queryElement","createElement","isMediaOrSupports","kebabRegex","kebabCase","unwrapProperty","indent","unwrapProperties","createStyle","unwrappedProps","propertyNames","statements","propertyName","property","loopCNodeListWithCallback","grandChildren","traverseCNode","$","blockSelector","childNode","murmur2","addElementToList","head","anchorMetaName","ssrAdapter","queriedTarget","anchorMetaEl","wrappedRender","wrappedMount","ssr","wrappedUnmount","createCNode","CssRender","cssr","exists","ids","prefix","elementPrefix","modifierPrefix","BemPlugin","find","cB","cE","cM","cNotM","insideModal","bPrefix","insidePopover","asModal","cCB","createKey","suffix","startChar","onceCbs","paramsMap","flushOnceCallbacks","beforeNextFrameOnce","happensIn","dataSetPropName","getPreciseEventTarget","parseResponsiveProp","reponsiveProp","pairLiteral","parseResponsivePropValue","activeKeyOrSize","classObj","activeValue","activeKey","keyAsNum","depx","pxfy","getMargin","margin","getGap","orient","rowGap","colGap","colors$1","hsv2rgb","f","hsl2rgb","percent","float","hex","dhex","hslRegex","hsvRegex","hslaRegex","hsvaRegex","rgbRegex","rgbaRegex","sHexRegex","hexRegex","sHexaRegex","hexaRegex","parseHex","hsla","color","roundDeg","roundPercent","roundAlpha","hsva","rgba","roundChannel","colors","normalizeAlpha","alphaValue","stringifyRgba","g","compositeChannel","v1","a1","v2","a2","composite","background","overlay","alpha","changeColor","scaleColor","lightness","toRgbaString","createId","getEventTarget","traps","createTrapHandler","originalHandler","moveHandler","mouseDownOutside","downHandler","upHanlder","ensureTrapHandlers","elHandlers","trapHandler","trapOn","trapHandlers","on","trapOff","off","createDelegate","propagationStopped","immediatePropagationStopped","trackPropagation","trackImmediate","spy","propName","unspy","currentTargets","currentTargetDescriptor","getCurrentTarget","defineCurrentTarget","phaseToTypeToElToHandlers","typeToWindowEventHandlers","createUnifiedHandler","delegeteHandler","eventPhase","bubbles","phase","cursor","captureElToHandlers","bubbleElToHandlers","bubbleHandlers","createUnifiedWindowEventHandler","delegateHandler","unifiedHandler","unfiendWindowEventHandler","ensureElToHandlers","phaseHandlers","ensureWindowEventHandlers","ensureHandlers","elToHandlers","handlerExist","windowEventHandlerExist","mergedHandler","windowEventHandlers","capture","useFalseUntilTruthy","originalRef","currentRef","stop","useMemo","computedValueRef","valueRef","hasInstance","fontsReady","isFontReady","init","_b","onFontsReady","mousePositionRef","clickHandler","left","top","width","height","usedCount","managable","useClickPosition","clickedTimeRef","handleClick","useClicked","clickedRef","timerId","clearTimer","clickedHandler","useMergedState","controlledStateRef","uncontrolledStateRef","useCompitable","isIos","useIsIos","defaultBreakpointOptions","createMediaQuery","screenWidth","mqlMap","useBreakpoints","screens","breakpointStatusRef","breakpoints","updateBreakpoints","breakpointName","breakpointValue","mql","cbs","breakpoint","useKeyboard","enabledRef","keydown","keyup","keydownHandler","prevent","keyupHandler","internalSelectionMenuInjectionKey","internalSelectionMenuBodyInjectionKey","drawerBodyInjectionKey","drawerInjectionKey","modalBodyInjectionKey","modalProviderInjectionKey","modalInjectionKey","popoverBodyInjectionKey","teleportDisabled","useAdjustedTo","modal","drawer","popover","selectMenu","fullscreenElementRef","handleFullscreenChange","useInjectionInstanceCollection","injectionName","collectionKey","registerKeyRef","injection","vm","registerInstance","oldKey","collection","removeInstance","addInstance","useDeferredTrue","delay","shouldDelayRef","delayedRef","isComposingRef","compositionStartHandler","compositionEndHandler","mountedCount","useIsComposing","lockCount","originalMarginRight","originalOverflow","originalOverflowX","originalOverflowY","lockHtmlScrollRightCompensationRef","useLockHtmlScroll","lockRef","watchStopHandle","unlock","scrollbarWidth","useReactivated","isDeactivatedRef","activateStateInitialized","getSlot","slotName","flatten","vNodes","filterCommentNode","vNode","getFirstVNode","viewMeasurer","ensureViewBoundingRect","getPointRect","x","y","viewRect","getRect","getParentNode","getScrollParent","overflow","overflowX","overflowY","Binder","VBinder","targetRef","setTargetRef","scrollableNodes","ensureScrollListener","onScroll","removeScrollListeners","followerScrollListeners","addScrollListener","removeScrollListener","onScrollRaf","followerResizeListeners","addResizeListener","onResize","removeResizeListener","VTarget","syncTarget","setTargetDirective","ctxKey","mousemoveoutside","mousemoveoutside$1","clickoutside","clickoutside$1","warn","ZIndexManager","zIndex","elementZIndex","nextZIndex","elementCount","elementZIndexPair","pair1","pair2","pair","zIndexManager","zindexable","enabled","cachedEnabled","zindexable$1","ssrContextKey","createStyleString","ssrContext","useSsrAdapter","cssrAnchorMetaName","lowBit","FinweckTree","min","ft","threshold","sumM","resolveTo","LazyTeleport","oppositionPositions","oppositeAligns","propToCompare","transformOrigins","overlapTransformOrigin","oppositeAlignCssPositionProps","keepOffsetDirection","cssPositionToOppositeAlign","getPlacementAndOffsetOfFollower","placement","targetRect","followerRect","shift","flip","overlap","align","properAlign","properOffset","deriveOffset","oppositeAlignCssSizeProp","alignCssPositionProp","offsetVertically","oppositeAlignCssPositionProp","currentAlignCssPositionProp","followerOverTargetSize","possibleAlternativeAlignCssPositionProp1","possibleAlternativeAlignCssPositionProp2","alternativeAlignCssSizeProp","properPosition","getProperTransformOrigin","getOffset","offsetRect","offsetTopToStandardPlacement","offsetLeftToStandardPlacement","VFollower","mergedEnabledRef","followerRef","offsetContainerRef","ensureListeners","syncTrigger","syncPosition","removeListeners","follower","minWidth","internalShift","offsetContainerRect","properPlacement","properTransformOrigin","transform","syncOnNextTick","isMountedRef","useIsMounted","mergedToRef","resizeObservers","hasActiveObservations","ro","hasSkippedObservations","msg","deliverResizeLoopError","ResizeObserverBoxOptions","freeze","ResizeObserverSize","inlineSize","blockSize","DOMRectReadOnly","right","bottom","rectangle","isHidden","offsetWidth","offsetHeight","isElement","isReplacedElement","global","scrollRegexp","verticalRegexp","IE","parseDimension","pixel","switchSizes","zeroBoxes","calculateBoxSizes","forceRecalculation","cs","svg","removePadding","canScrollVertically","canScrollHorizontally","paddingTop","paddingRight","paddingBottom","paddingLeft","borderTop","borderRight","borderBottom","borderLeft","horizontalPadding","verticalPadding","horizontalBorderArea","verticalBorderArea","horizontalScrollbarThickness","verticalScrollbarThickness","widthReduction","heightReduction","contentWidth","contentHeight","borderBoxWidth","borderBoxHeight","boxes","calculateBoxSize","observedBox","borderBoxSize","contentBoxSize","devicePixelContentBoxSize","ResizeObserverEntry","calculateDepthForNode","broadcastActiveObservations","shallowestDepth","callbacks","ot","targetDepth","_i","callbacks_1","gatherActiveObservationsAtDepth","process","notify","queueMicroTask","toggle_1","el_1","queueResizeObserver","watching","isWatching","CATCH_PERIOD","observerConfig","events","time","scheduled","Scheduler","_this","until","elementsHaveResized","updateCount","skipNotifyOnElement","ResizeObservation","ResizeObserverDetail","resizeObserver","observerMap","getObservationIndex","observationTargets","ResizeObserverController","detail","firstObservation","lastObservation","ResizeObserver","ResizeObserverDelegate","PolyfillResizeObserver","resizeObserverManager","VResizeObserver","registered","handleResize","delegate","maybeTouch","ensureMaybeTouch","wheelScale","ensureWheelScale","xScrollInjextionKey","setupXScroll","columnsRef","renderColRef","renderItemWithColsRef","listWidthRef","scrollLeftRef","xFinweckTreeRef","columns","column","startIndexRef","xFinweckTree","getLeft","endIndexRef","VirtualListRow","startIndex","endIndex","renderCol","renderItemWithCols","items","VVirtualList","defaultScrollIndex","defaultScrollKey","scrollTo","isDeactivated","scrollTopRef","totalWidthRef","keyIndexMapRef","keyField","listElRef","listHeightRef","keyToHeightOffset","finweckTreeRef","itemSize","heightOffset","finweckTreeUpdateTrigger","viewportItemsRef","listHeight","viewportItems","behavior","debounce","scrollToIndex","toIndex","anchorIndex","anchorTimerId","targetTop","scrollTop","handleItemResize","_c","isHideByVShow","previousHeight","listEl","previousHeightSum","syncViewport","mayUseWheel","wheelCatched","handleListScroll","handleListWheel","handleListResize","itemResizable","keyToIndex","visibleItemsTag","renderedCols","renderedItemWithCols","itemVNode","VXScroll","selfRef","handleWheel","hiddenAttr","VOverflow","counterRef","deriveCounter","getCounter","getTail","counter","containerWidth","childWidths","tail","childWidthSum","childWidth","updateCounter","restCount","counterWidth","onUpdateCount","onUpdateOverflow","$slots","isHTMLElement","focusFirstDescendant","attemptFocus","focusLastDescendant","element","isFocusable","stack","FocusTrap","focusableStartRef","focusableEndRef","ignoreInternalFocusChange","lastFocusedElement","isCurrentActive","handleDocumentKeydown","activate","deactivate","handleDocumentFocus","mainEl","getMainEl","resetFocusTo","focusableStartEl","initialFocusTo","idInStack","finalFocusTo","focusableEndEl","focused","handleStartFocus","handleEndFocus","defaultSlot","active","focusableStyle","useOnResize","elRef","oldEl","color2Class","pureNumberRegex","numberRegex","formatLength","attachPx","rtlInset","inset","getPadding","download","_isJsdom","isJsdom","eventSet","markEventEffectPerformed","eventEffectNotPerformed","getTitleAttribute","smallerSize","throwError","call","funcs","func","createRefSetter","inst","getFirstSlotVNode","getFirstSlotVNodeWithTypedProps","isNodeVShowFalse","showDir","keep","rest","keepedObject","keysOf","mergeEventHandlers","filteredHandlers","omit","omitedObject","originalKey","resolveSlot","resolveSlotWithTypedProps","resolveWrappedSlot","isSlotEmpty","Wrapper","configProviderInjectionKey","defaultClsPrefix","useConfig","NConfigProvider","bordered","useMergedClsPrefix","useThemeClass","componentName","hashRef","cssVarsRef","mergedThemeHashRef","styleMountTarget","themeClassRef","renderCallback","hashClassPrefix","mountStyle","finalThemeHash","hashValue","themeHash","themeOverrides","builtinThemeOverrides","cssVars","formItemInjectionKey","useFormItem","defaultSize","mergedSize","mergedDisabled","NFormItem","mergedSizeRef","mergedDisabledRef","mergedStatusRef","enUS","label","num","enUS$2","buildFormatLongFn","buildLocalizeFn","valuesArray","defaultWidth","buildMatchFn","string","matchPattern","matchResult","matchedString","parsePatterns","findIndex","findKey","predicate","array","buildMatchPatternFn","parseResult","formatDistanceLocale","formatDistance","count","tokenValue","formatRelativeLocale","formatRelative","_date","_baseDate","eraValues","quarterValues","monthValues","dayValues","dayPeriodValues","formattingDayPeriodValues","ordinalNumber","dirtyNumber","rem100","localize","quarter","matchOrdinalNumberPattern","parseOrdinalNumberPattern","matchEraPatterns","parseEraPatterns","matchQuarterPatterns","parseQuarterPatterns","matchMonthPatterns","parseMonthPatterns","matchDayPatterns","parseDayPatterns","matchDayPeriodPatterns","parseDayPeriodPatterns","dateFormats","timeFormats","dateTimeFormats","formatLong","dateEnUs","dateEnUS","freeGlobal","freeGlobal$1","freeSelf","root$1","Symbol","Symbol$2","objectProto","nativeObjectToString","symToStringTag","getRawTag","isOwn","unmasked","nullTag","undefinedTag","baseGetTag","isObjectLike","symbolTag","arrayMap","iteratee","isArray$2","INFINITY","symbolProto","symbolToString","baseToString","reWhitespace","trimmedEndIndex","reTrimStart","baseTrim","NAN","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","other","isBinary","identity","asyncTag","funcTag","genTag","proxyTag","coreJsData","coreJsData$1","maskSrcKey","isMasked","funcProto","funcToString","toSource","reRegExpChar","reIsHostCtor","reIsNative","baseIsNative","getNative","WeakMap","WeakMap$2","objectCreate","baseCreate","proto","baseCreate$1","apply","copyArray","HOT_COUNT","HOT_SPAN","nativeNow","shortOut","lastCalled","stamp","remaining","constant","defineProperty","defineProperty$1","baseSetToString","baseSetToString$1","setToString","setToString$1","MAX_SAFE_INTEGER","reIsUint","isIndex","baseAssignValue","eq","objValue","copyObject","customizer","isNew","nativeMax","overRest","otherArgs","baseRest","isLength","isArrayLike","isIterateeCall","createAssigner","assigner","sources","isPrototype","Ctor","baseTimes","argsTag","baseIsArguments","propertyIsEnumerable","isArguments","isArguments$1","stubFalse","freeExports","exports","freeModule","moduleExports","Buffer","nativeIsBuffer","isBuffer$1","arrayTag","boolTag","dateTag","errorTag","mapTag","numberTag","objectTag","regexpTag","setTag","stringTag","weakMapTag","arrayBufferTag","dataViewTag","float32Tag","float64Tag","int8Tag","int16Tag","int32Tag","uint8Tag","uint8ClampedTag","uint16Tag","uint32Tag","typedArrayTags","baseIsTypedArray","baseUnary","freeProcess","nodeUtil","types","nodeUtil$1","nodeIsTypedArray","isTypedArray","isTypedArray$1","arrayLikeKeys","inherited","isArr","isArg","isBuff","isType","skipIndexes","overArg","nativeKeys","nativeKeys$1","baseKeys","nativeKeysIn","baseKeysIn","isProto","keysIn","reIsDeepProp","reIsPlainProp","isKey","nativeCreate","nativeCreate$1","hashClear","hashDelete","HASH_UNDEFINED","hashGet","hashHas","hashSet","Hash","listCacheClear","assocIndexOf","arrayProto","splice","listCacheDelete","lastIndex","listCacheGet","listCacheHas","listCacheSet","ListCache","Map","Map$2","mapCacheClear","isKeyable","getMapData","mapCacheDelete","mapCacheGet","mapCacheHas","mapCacheSet","MapCache","FUNC_ERROR_TEXT","memoize","resolver","memoized","MAX_MEMOIZE_SIZE","memoizeCapped","rePropName","reEscapeChar","stringToPath","quote","subString","stringToPath$1","castPath","toKey","baseGet","arrayPush","getPrototype","getPrototype$1","objectCtorString","baseSlice","castSlice","rsAstralRange","rsComboMarksRange","reComboHalfMarksRange","rsComboSymbolsRange","rsComboRange","rsVarRange","rsZWJ","reHasUnicode","hasUnicode","asciiToArray","rsAstral","rsCombo","rsFitz","rsModifier","rsNonAstral","rsRegional","rsSurrPair","reOptMod","rsOptVar","rsOptJoin","rsSeq","rsSymbol","reUnicode","unicodeToArray","stringToArray","createCaseFirst","methodName","strSymbols","chr","trailing","upperFirst","upperFirst$1","arrayReduce","accumulator","initAccum","basePropertyOf","deburredLetters","deburrLetter","deburrLetter$1","reLatin","reComboMark","deburr","reAsciiWord","asciiWords","reHasUnicodeWord","hasUnicodeWord","rsDingbatRange","rsLowerRange","rsMathOpRange","rsNonCharRange","rsPunctuationRange","rsSpaceRange","rsUpperRange","rsBreakRange","rsApos","rsBreak","rsDigits","rsDingbat","rsLower","rsMisc","rsUpper","rsMiscLower","rsMiscUpper","rsOptContrLower","rsOptContrUpper","rsOrdLower","rsOrdUpper","rsEmoji","reUnicodeWord","unicodeWords","words","reApos","createCompounder","stackClear","stackDelete","stackGet","stackHas","LARGE_ARRAY_SIZE","stackSet","pairs","Stack","allocUnsafe","cloneBuffer","isDeep","arrayFilter","resIndex","stubArray","nativeGetSymbols","getSymbols","symbol","getSymbols$1","baseGetAllKeys","keysFunc","symbolsFunc","getAllKeys","DataView","DataView$2","Promise","Promise$2","Set","Set$2","promiseTag","dataViewCtorString","mapCtorString","promiseCtorString","setCtorString","weakMapCtorString","getTag","ctorString","getTag$1","Uint8Array","Uint8Array$2","cloneArrayBuffer","arrayBuffer","cloneTypedArray","typedArray","initCloneObject","setCacheAdd","setCacheHas","SetCache","arraySome","cacheHas","COMPARE_PARTIAL_FLAG","COMPARE_UNORDERED_FLAG","equalArrays","bitmask","equalFunc","isPartial","arrLength","othLength","arrStacked","othStacked","arrValue","othValue","compared","othIndex","mapToArray","setToArray","symbolValueOf","equalByTag","convert","stacked","equalObjects","objProps","objLength","othProps","objStacked","skipCtor","objCtor","othCtor","baseIsEqualDeep","objIsArr","othIsArr","objTag","othTag","objIsObj","othIsObj","isSameTag","objIsWrapped","othIsWrapped","objUnwrapped","othUnwrapped","baseIsEqual","baseIsMatch","matchData","noCustomizer","srcValue","isStrictComparable","getMatchData","matchesStrictComparable","baseMatches","baseHasIn","hasPath","hasFunc","hasIn","baseMatchesProperty","baseProperty","basePropertyDeep","baseIteratee","createBaseFor","fromRight","iterable","baseFor","baseFor$1","baseForOwn","createBaseEach","eachFunc","baseEach","baseEach$1","now$3","nativeMin","wait","lastArgs","lastThis","maxWait","lastCallTime","lastInvokeTime","leading","maxing","invokeFunc","leadingEdge","timerExpired","remainingWait","timeSinceLastCall","timeSinceLastInvoke","timeWaiting","shouldInvoke","trailingEdge","debounced","isInvoking","assignMergeValue","isArrayLikeObject","safeGet","toPlainObject","baseMergeDeep","srcIndex","mergeFunc","isCommon","isTyped","baseMerge","baseMap","word","kebabCase$1","merge$2","throttle","useLocale","ns","mergedLocaleRef","mergedDateLocaleRef","localeRef","useRtl","mountId","rtlStateRef","clsPrefixRef","componentRtlStateRef","rtlState","componentRtlState","clsPrefix","commonVariables$n","fontSize","fontFamily","lineHeight","commonVariables","globalStyle","useStyle","useTheme","resolveId","defaultTheme","selfCommon","peers","selfOverrides","builtinOverrides","selfCommonOverrides","peersOverrides","globalCommon","globalSelfCommon","globalSelf","globalPeers","globalCommonOverrides","globalSelfOverrides","globalSelfCommonOverrides","globalPeersOverrides","mergedCommon","mergedSelf","style$z","NBaseIcon","NIconSwitchTransition","AddIcon","replaceable","icon","IconComponent","mergedIconsRef","iconOverride","BackwardIcon","FinishedIcon","ChevronDownIcon","ChevronDownFilledIcon","ChevronRightIcon","ClearIcon","ErrorIcon$1","DownloadIcon","EmptyIcon","ErrorIcon","EyeIcon","EyeOffIcon","FastBackwardIcon","FastForwardIcon","ForwardIcon","InfoIcon","MoreIcon","RemoveIcon","ResizeSmallIcon","RotateClockwiseIcon","RotateCounterclockwiseIcon","SuccessIcon","WarningIcon","ZoomInIcon","ZoomOutIcon","cubicBezierEaseInOut","iconSwitchTransition","originalTransform","style$y","NBaseClear","style$x","NBaseClose","absolute","isButtonTag","CloseIcon","NFadeInExpandTransition","handleBeforeLeave","handleLeave","handleAfterLeave","handleEnter","memorizedWidth","memorizedHeight","handleAfterEnter","group","resolvedProps","FocusDetector","style$w","exposedLoadingProps","NBaseLoading","radius","strokeWidth","stroke","scale","scaledRadius","fadeInTransition","enterCubicBezier","leaveCubicBezier","baseBackgroundRgb","baseInvertBackgroundRgb","overlayPrefix","neutral","overlayRgba","derived","commonDark","commonLight","commonVars","vars","scrollbarColor","scrollbarColorHover","scrollbarHeight","scrollbarBorderRadius","scrollbarLight","scrollbarLight$1","scrollbarDark","scrollbarDark$1","style$v","scrollbarProps","Scrollbar","mergedClsPrefixRef","inlineThemeDisabled","mergedRtlRef","rtlEnabledRef","wrapperRef","containerRef","contentRef","yRailRef","xRailRef","contentHeightRef","contentWidthRef","containerHeightRef","containerWidthRef","yRailSizeRef","xRailSizeRef","containerScrollTopRef","containerScrollLeftRef","isShowXBarRef","isShowYBarRef","yBarPressed","xBarPressed","xBarVanishTimerId","yBarVanishTimerId","memoYTop","memoXLeft","memoMouseX","memoMouseY","themeRef","yBarSizeRef","containerHeight","yRailSize","yBarSizePxRef","xBarSizeRef","xRailSize","xBarSizePxRef","yBarTopRef","containerScrollTop","heightDiff","yBarTopPxRef","xBarLeftRef","containerScrollLeft","widthDiff","xBarLeftPxRef","needYBarRef","needXBarRef","mergedShowXBarRef","mergedShowYBarRef","mergedContainerRef","mergedContentRef","elSize","activateState","handleContentResize","sync","handleContainerResize","scrollBy","handleMouseEnterWrapper","showXBar","showYBar","handleMouseLeaveWrapper","hideBar","hideYBar","hideXBar","syncScrollState","syncPositionState","xRailEl","yRailEl","syncUnifiedContainer","isMouseUpAway","handleXScrollMouseDown","handleXScrollMouseMove","handleXScrollMouseUp","xBarSize","dScrollLeft","toScrollLeftUpperBound","toScrollLeft","internalOnUpdateScrollLeft","handleYScrollMouseDown","handleYScrollMouseMove","handleYScrollMouseUp","yBarSize","dScrollTop","toScrollTopUpperBound","toScrollTop","needXBar","needYBar","mergedClsPrefix","colorHover","borderRadius","railInsetHorizontalTop","railInsetHorizontalBottom","railInsetVerticalRight","railInsetVerticalLeft","railColor","railTopHorizontalTop","railRightHorizontalTop","railBottomHorizontalTop","railLeftHorizontalTop","railTopHorizontalBottom","railRightHorizontalBottom","railBottomHorizontalBottom","railLeftHorizontalBottom","railTopVerticalRight","railRightVerticalRight","railBottomVerticalRight","railLeftVerticalRight","railTopVerticalLeft","railRightVerticalLeft","railBottomVerticalLeft","railLeftVerticalLeft","themeClassHandle","triggerDisplayManually","rtlEnabled","internalHoistYRail","yPlacement","xPlacement","xScrollable","triggerIsNone","createYRail","className","createChildren","scrollbarNode","NScrollbar","XScrollbar","toArray","TRAVERSE_COMMAND","traverseWithCb","treeNode","command","getNonLeafKeys","treeNodes","preserveGroup","isLeaf","rawNode","getChildren","defaultGetChildren","defaultGetKey","isIgnored","isShallowLoaded","isDisabled","isExpilicitlyNotLoaded","unwrapCheckedKeys","unwrapIndeterminateKeys","originalKeys","keysToAdd","minus","keysToRemove","isGroup","createIndexGetter","SubtreeNotLoadedError","getExtendedCheckedKeySetAfterCheck","checkKeys","currentCheckedKeys","treeMate","allowNotLoaded","getExtendedCheckedKeySet","getAvailableAscendantNodeSet","uncheckedKeys","visitedKeys","uncheckedKey","uncheckedTreeNode","nodeCursor","getExtendedCheckedKeySetAfterUncheck","extendedCheckedKeySet","extendedKeySetToUncheck","ascendantKeySet","getCheckedKeys","checkedKeys","keysToCheck","keysToUncheck","indeterminateKeys","cascade","leafOnly","checkStrategy","levelTreeNodeMap","checkStrategyIsParent","checkStrategyIsChild","syntheticCheckedKeySet","syntheticIndeterminateKeySet","maxLevel","level","levelIsZero","levelTreeNodes","levelTreeNode","levelTreeNodeKey","shallowLoaded","fullyChecked","partialChecked","allDisabled","childKey","isUnchecking","treeNodeMap","visitedKeySet","extendedKeySet","checkedKey","checkedTreeNode","getPath","includeGroup","includeSelf","mergedPath","getFirstAvailableNode","rawGetNext","loop","sibs","fromNode","includeDisabled","iterate","rawGetPrev","getChildOptions","meet","endNode","getChild","nextNode","rawGetParent","reverse","childInGroup","moveMethods","expandedKeys","expandedKeySet","flattenedNodes","contains","createTreeNodes","rawNodes","nodeProto","rawChildren","createTreeMate","getDisabled","getIgnored","getIsGroup","getKey","_getChildren","getNode","tmNode","_getNode","getPrev","getNext","getParent","treemate","commonVars$c","textColorDisabled","iconColor","textColor2","fontSizeTiny","fontSizeSmall","fontSizeMedium","fontSizeLarge","fontSizeHuge","emptyLight","emptyLight$1","emptyDark","emptyDark$1","style$u","emptyProps","NEmpty","mergedComponentPropsRef","mergedDescriptionRef","mergedRenderIconRef","iconSize","textColor","extraTextColor","onRender","commonVariables$m","popoverColor","textColor3","dividerColor","primaryColorPressed","primaryColor","opacityDisabled","hoverColor","heightTiny","heightSmall","heightMedium","heightLarge","heightHuge","internalSelectMenuLight","internalSelectMenuLight$1","internalSelectMenuDark","internalSelectMenuDark$1","NSelectGroupHeader","renderLabelRef","renderOptionRef","labelFieldRef","nodePropsRef","renderLabel","renderOption","nodeProps","renderCheckMark","show","CheckmarkIcon","NSelectOption","pendingTmNodeRef","multipleRef","valueSetRef","valueFieldRef","showCheckmarkRef","handleOptionClick","handleOptionMouseEnter","isPendingRef","pendingTmNode","handleMouseEnter","handleMouseMove","isPending","multiple","valueSet","isSelected","isGrouped","showCheckmark","checkmark","cubicBezierEaseIn","cubicBezierEaseOut","fadeInScaleUpTransition","transformOrigin","enterScale","originalTransition","style$t","NInternalSelectMenu","virtualListRef","scrollbarRef","flattenedNodesRef","fIndexGetterRef","pendingNodeRef","initPendingNode","defaultPendingNode","setPendingTmNode","clearPendingNodeIfInvalid","pendingNode","initPendingNodeWatchStopHandle","scrollToPendingNode","itemSizeRef","paddingRef","emptyRef","tmNodes","doToggle","onToggle","doScroll","handleVirtualListScroll","handleVirtualListResize","getPendingTmNode","handleKeyUp","handleKeyDown","handleMouseDown","fIndex","handleFocusin","handleFocusout","groupHeaderTextColor","actionDividerColor","optionTextColorPressed","optionTextColor","optionTextColorDisabled","optionTextColorActive","optionOpacityDisabled","optionCheckColor","actionTextColor","optionColorPending","optionColorActive","loadingColor","loadingSize","optionColorActivePending","optionHeight","optionPadding","exposedProps","virtualScroll","mergedTheme","themeClass","NInternalLoading","VirtualList","NFocusDetector","commonVariables$l","boxShadow2","popoverLight","popoverLight$1","popoverDark","popoverDark$1","oppositePlacement","arrowSize","style$s","placementStyle","getArrowOffset","placements","isVertical","sizeType","isReverse","centerOffset","arrowStyleLiteral","sizeStyle","popoverBodyProps","renderArrow","arrowClass","arrowStyle","arrowWrapperClass","arrowWrapperStyle","NPopoverBody","namespaceRef","NPopover","bodyRef","followerEnabledRef","displayedRef","directivesRef","onClickoutside","positionManually","handleClickOutside","handleMouseMoveOutside","space","spaceArrow","padding","boxShadow","arrowHeight","arrowOffset","arrowOffsetVertical","styleRef","maxWidth","handleMouseLeave","getTriggerElement","renderContentNode","contentNode","renderBody","extraClass","internalTrapFocus","hasHeaderOrFooter","renderContentInnerNode","body","maybeScrollableBody","NxScrollbar","arrow","VFocusTrap","bodyPropKeys","triggerEventMap","appendEvents","eventName","popoverBaseProps","popoverProps","binderInstRef","controlledShowRef","uncontrolledShowRef","mergedShowWithoutDisabledRef","mergedShowConsideringDisabledPropRef","getMergedDisabled","getMergedShow","compatibleShowArrowRef","mergedShowArrowRef","bodyInstance","showTimerIdRef","hideTimerIdRef","positionManuallyRef","doUpdateShow","_onUpdateShow","onUpdateShow","onShow","onHide","clearShowTimer","showTimerId","clearHideTimer","hideTimerId","handleFocus","handleBlur","delayCallback","delayedCallback","nextShow","handleKeydown","setShow","setBodyInstance","triggerVNode","popoverInside","internalInheritedEventHandlers","ascendantAndCurrentHandlers","mergedHandlers","_handlers","mergedShow","commonVariables$k","tagDark","primaryColorHover","infoColor","successColor","warningColor","errorColor","baseColor","borderColor","tagColor","closeIconColor","closeIconColorHover","closeIconColorPressed","closeColorHover","closeColorPressed","fontSizeMini","heightMini","buttonColor2Hover","buttonColor2Pressed","fontWeightStrong","tagDark$1","tagLight","tagLight$1","commonProps","style$r","tagProps","tagInjectionKey","NTag","mergedBorderedRef","checked","onCheckedChange","onUpdateChecked","_onUpdateChecked","handleCloseClick","onClose","tagPublicMethods","textContent","closeMargin","textColorCheckable","textColorHoverCheckable","textColorPressedCheckable","textColorChecked","colorCheckable","colorHoverCheckable","colorPressedCheckable","colorChecked","colorCheckedHover","colorCheckedPressed","closeBorderRadius","colorBordered","closeSize","closeIconSize","typedColor","typeTextColor","border","closeMarginDiscrete","closable","avatarNode","iconNode","NBaseSuffix","commonVariables$j","internalSelectionDark","inputColor","inputColorDisabled","warningColorHover","errorColorHover","iconColorDisabled","clearColor","clearColorHover","clearColorPressed","placeholderColor","placeholderColorDisabled","fontWeight","internalSelectionDark$1","internalSelectionLight","internalSelectionLight$1","style$q","NInternalSelection","patternInputMirrorRef","patternInputRef","multipleElRef","singleElRef","patternInputWrapperRef","counterWrapperRef","overflowRef","inputTagElRef","showTagsPopoverRef","patternInputFocusedRef","hoverRef","mergedClearableRef","filterablePlaceholderRef","labelRef","selectedRef","syncMirrorWidth","patternInputMirrorEl","patternInputEl","hideInputTag","inputTagEl","showInputTag","doFocus","onFocus","doBlur","onBlur","doDeleteOption","onDeleteOption","doClear","onClear","doPatternInput","onPatternInput","handleClear","handleDeleteOption","handlePatternKeyDown","selectedOptions","cachedInputEvent","handlePatternInputInput","inputText","handleCompositionStart","handleCompositionEnd","handlePatternInputFocus","handlePatternInputBlur","blur","multipleEl","singleEl","focus","focusInput","blurInput","enterTimerId","clearEnterTimer","handleMouseEnterCounter","handleMouseLeaveCounter","onPopoverUpdateShow","patternInputWrapperEl","paddingSingle","paddingMultiple","caretColor","colorDisabled","colorActive","boxShadowFocus","boxShadowActive","boxShadowHover","borderFocus","borderHover","borderActive","arrowColor","arrowColorDisabled","colorActiveWarning","boxShadowFocusWarning","boxShadowActiveWarning","boxShadowHoverWarning","borderWarning","borderFocusWarning","borderHoverWarning","borderActiveWarning","colorActiveError","boxShadowFocusError","boxShadowActiveError","boxShadowHoverError","borderError","borderFocusError","borderHoverError","borderActiveError","clearSize","paddingSingleDiscrete","paddingMultipleDiscrete","filterable","maxTagCount","ellipsisTagPopoverProps","renderTag","maxTagCountResponsive","maxTagCountNumeric","useMaxTagCount","Suffix","labelField","createTag","createOriginalTagNodes","input","renderCounter","tags","renderPopover","popoverTrigger","hasInput","showPlaceholder","showSelectedLabel","fadeInWidthExpandTransition","style$p","NBaseWave","activeRef","animationTimerId","commonVars$b","alertDark","textColor1","infoColorSuppl","successColorSuppl","warningColorSuppl","errorColorSuppl","alertDark$1","actionColor","alertLight","alertLight$1","fadeInHeightExpandTransition","leavingDelay","foldPadding","enterToProps","leaveToProps","enterClass","leaveClass","style$o","alertProps","NAlert","titleFontWeight","iconMargin","iconMarginRtl","closeMarginRtl","visibleRef","doAfterLeave","onAfterHide","mergedChildren","commonVars$a","anchorDark","anchorDark$1","isChrome","isSafari","commonVariables$i","inputDark","iconColorHover","iconColorPressed","inputDark$1","inputLight","inputLight$1","inputInjectionKey","style$n","safariStyle","isEmptyInputValue","useCursor","inputElRef","selectionRef","recordCursor","selectionStart","selectionEnd","restoreCursor","selection","inputEl","beforeText","afterText","startPos","beforeLastChar","WordCount","mergedValueRef","maxlengthRef","countGraphemesRef","wordCountRef","mergedValue","maxlength","inputProps","NInput","wrapperElRef","textareaElRef","textareaMirrorElRef","inputMirrorElRef","inputEl2Ref","currentFocusedInputRef","focusedInputCursorControl","textareaScrollbarInstRef","uncontrolledValueRef","controlledValueRef","formItem","focusedRef","activatedRef","syncSource","mergedPlaceholderRef","showPlaceholder1Ref","isComposing","mergedPlaceholder","showPlaceholder2Ref","mergedFocusRef","showClearButton","mergedFocus","mergedShowPasswordOnRef","showPasswordOn","passwordVisibleRef","textDecorationStyleRef","textDecoration","textAreaScrollContainerWidthRef","updateTextAreaStyle","autosize","stylePaddingTop","stylePaddingBottom","styleLineHeight","textareaMirrorEl","minRows","styleMinHeight","styleMaxHeight","syncMirror","doUpdateValue","onUpdateValue","_onUpdateValue","onInput","nTriggerFormInput","doChange","onChange","nTriggerFormChange","nTriggerFormBlur","nTriggerFormFocus","doUpdateValueBlur","onInputBlur","doUpdateValueFocus","onInputFocus","doDeactivate","onDeactivate","doActivate","onActivate","doClick","onClick","doWrapperFocus","onWrapperFocus","doWrapperBlur","onWrapperBlur","handleInput","targetValue","textareaScrollbarInst","isIncomingValueValid","allowInput","countGraphemes","minlength","graphemesCount","handleInputBlur","dealWithEvent","handleInputFocus","handleWrapperBlur","handleWrapperFocus","handleChange","clearValue","onMousedown","tagName","wrapperEl","resizeHandleSize","handlePasswordToggleClick","handlePasswordToggleMousedown","preventDefaultOnce","hidePassword","handleWrapperKeyup","handleWrapperKeydown","handleWrapperKeydownEsc","handleWrapperKeydownEnter","textareaEl","inputMirrorEl","handleTextAreaMirrorResize","placeholderStyleRef","handleTextAreaScroll","stopWatchMergedValue1","stopWatchMergedValue2","caretColorError","caretColorWarning","textDecorationColor","borderDisabled","lineHeightTextarea","colorFocus","colorFocusWarning","colorFocusError","suffixTextColor","countTextColor","countTextColorDisabled","loadingColorError","loadingColorWarning","mergedStatus","textAreaScrollContainerWidth","scrollContainerWidthStyle","renderCount","style$m","inputGroupProps","NInputGroup","patternMatched","createTmOptions","valueField","childrenField","filterOptions","originalOpts","filteredOptions","createValOptMap","valOptMap","selectGroupOption","autoCompleteDark","autoCompleteDark$1","isImageSupportNativeLazy","resolveOptionsAndHash","observers","unobserveHandleMap","shouldStartLoadingRefMap","observeIntersection","shouldStartLoadingRef","resolvedOptionsAndHash","rootObservers","_rootObservers","observer","observerAndObservedElements","_unobserve","_shouldStartLoadingRef","unobservered","unobserve","avatarColor","cardColor","modalColor","avatarDark","avatarDark$1","avatarGroupDark","avatarGroupDark$1","commonVariables$h","backTopDark","backTopDark$1","badgeDark","badgeDark$1","commonVariables$g","breadcrumbDark","breadcrumbDark$1","createHoverColor","rgb","createPressedColor","buttonGroupInjectionKey","commonVariables$f","infoColorHover","infoColorPressed","successColorHover","successColorPressed","warningColorPressed","errorColorPressed","buttonColor2","buttonLight","buttonLight$1","buttonDark","commonSelf","buttonDark$1","style$l","buttonProps","Button","selfElRef","waveElRef","enterPressedRef","showBorderRef","NButtonGroup","buttonGroupSize","formItemSize","mergedFocusableRef","handleMousedown","handleKeyup","theme","rippleDuration","dashed","ghost","circle","secondary","tertiary","quaternary","strong","fontProps","colorProps","typeIsTertiary","typeIsDefault","mergedType","propTextColor","mergedTextColor","isColoredType","typeColor","mergedColor","borderProps","paddingRound","waveOpacity","sizeProps","NButton","XButton","zero","createLeftBorderStyle","createTopBorderStyle","style$k","buttonGroupProps","commonVariables$e","calendarDark","calendarDark$1","commonVariables$d","boxShadow1","cardLight","cardLight$1","cardDark","cardDark$1","style$j","cardBaseProps","cardBasePropKeys","cardProps","NCard","colorModal","colorTarget","titleTextColor","colorPopover","colorEmbedded","colorEmbeddedModal","colorEmbeddedPopover","titleFontSize","segmented","hoverable","embedded","title","carouselDark","carouselDark$1","commonVariables$c","borderRadiusSmall","checkboxDark","checkboxDark$1","cascaderDark","cascaderDark$1","codeDark","codeDark$1","collapseDark","collapseDark$1","collapseTransitionDark","collapseTransitionDark$1","colorPickerDark","colorPickerDark$1","configProviderProps","mergedThemeRef","inheritedTheme","mergedThemeOverridesRef","inheritedThemeOverrides","mergedNamespaceRef","icons","componentOptions","rtl","rtlEnabledState","rtlInfo","peerRtlInfo","mergedBreakpointsRef","preflightStyleDisabled","mergedThemeOverrides","hasThemeOverrides","themeName","locale","dateLocale","hljs","katex","_d","popselect","popselectDark","popselectLight","popselectLight$1","popselectInjectionKey","style$i","panelProps","panelPropKeys","NPopselectPanel","NPopselect","treeMateRef","handleToggle","toggle","handleMenuMousedown","shouldAddValue","menuBoxShadow","popselectProps","popoverInstRef","onMouseenter","onMouseleave","$attrs","selectLight","selectLight$1","selectDark","selectDark$1","style$h","selectProps","NSelect","patternRef","compitableOptionsRef","createdOptionsRef","beingCreatedOptionsRef","localOptionsRef","resolvedFilterRef","filteredOptionsRef","localOptions","valOptMapRef","mergedShowRef","triggerRef","menuRef","localizedPlaceholderRef","emptyArray","memoValOptMapRef","wrappedFallbackOptionRef","fallbackOption","getMergedOptions","remote","memoValOptMap","wrappedFallbackOption","selectedOptionsRef","selectedOptionRef","showOnFocus","openMenu","doSearch","onSearch","updateMemorizedOptions","focusSelectionInput","closeMenu","handleMenuAfterLeave","activeWithoutMenuOpenRef","onTriggerInputFocus","onTriggerInputBlur","handleTriggerClick","handleTriggerBlur","handleTriggerFocus","handleMenuFocus","handleMenuBlur","handleMenuTabOut","handleMenuClickOutside","createClearedMultipleSelectValue","handleToggleByTmNode","handleToggleByOption","clearFilterAfterSelect","beingCreatedOptions","beingCreatedOption","createdOptions","changedValue","createdOptionIndex","getCreatedOptionIndex","focusSelection","createdOption","handlePatternInput","onCreate","optionBeingCreated","handleMenuScroll","_e","handleTriggerOrMenuResize","exposedMethods","commonVariables$b","paginationLight","paginationLight$1","paginationDark","opacity3","borderColorActive","paginationDark$1","hoverStyleProps","hoverStyleChildren","style$g","getDefaultPageSize","paginationProps","defaultPageSize","pageSizeOption","createPageItemsInfo","currentPage","pageCount","pageSlot","showQuickJumpDropdown","hasFastBackward","hasFastForward","fastBackwardTo","fastForwardTo","firstPage","lastPage","middleStart","middleEnd","middleDelta","leftSplit","rightSplit","createRange","range","NPagination","uncontrolledPageRef","uncontrolledPageSizeRef","mergedPageRef","mergedPageSizeRef","mergedPageCountRef","itemCount","jumperValueRef","fastForwardActiveRef","fastBackwardActiveRef","showFastForwardMenuRef","showFastBackwardMenuRef","handleFastForwardMouseenter","disableTransitionOneTick","handleFastForwardMouseleave","handleFastBackwardMouseenter","handleFastBackwardMouseleave","handleMenuSelect","doUpdatePage","pageItemsInfo","pageSizeOptionsRef","inputSizeRef","selectSizeRef","mergedItemCountRef","selfEl","page","_onUpdatePage","onUpdatePage","simple","doUpdatePageSize","pageSize","_onUpdatePageSize","onUpdatePageSize","onPageSizeChange","backward","fastForward","fastBackward","handleSizePickerChange","doQuickJump","handleQuickJumperChange","handlePageItemClick","pageItem","handleJumperInput","buttonBorder","buttonBorderHover","buttonBorderPressed","buttonIconColor","buttonIconColorHover","buttonIconColorPressed","itemTextColor","itemTextColorHover","itemTextColorPressed","itemTextColorActive","itemTextColorDisabled","itemColor","itemColorHover","itemColorPressed","itemColorActive","itemColorActiveHover","itemColorDisabled","itemBorder","itemBorderHover","itemBorderPressed","itemBorderActive","itemBorderDisabled","itemBorderRadius","jumperTextColor","jumperTextColorDisabled","buttonColor","buttonColorHover","buttonColorPressed","itemPadding","itemMargin","inputWidth","selectWidth","inputMargin","selectMargin","jumperFontSize","prefixMargin","suffixMargin","buttonIconSize","itemFontSize","itemMarginRtl","inputMarginRtl","mergedPage","mergedPageCount","pageItems","showSizePicker","showQuickJumper","inputSize","selectSize","mergedPageSize","pageSizeOptions","jumperValue","goto","handleBackwardClick","handleForwardClick","renderPrefix","renderSuffix","renderPrev","renderNext","pageNode","fastForwardNode","fastBackwardNode","itemNode","commonVariables$a","invertedColor","dropdownLight","dropdownLight$1","dropdownDark","primaryColorSuppl","dropdownDark$1","commonVars$9","tooltipDark","tooltipDark$1","tooltipLight","tooltipLight$1","ellipsisDark","ellipsisDark$1","ellipsisLight","ellipsisLight$1","commonVariables$9","radioDark","radioDark$1","radioLight","radioLight$1","commonVariables$8","tableHeaderColor","tableColorHover","tableColorStriped","dataTableDark","dataTableDark$1","radioBaseProps","radioGroupInjectionKey","NRadioGroup","inputRef","uncontrolledCheckedRef","controlledCheckedRef","mergedCheckedRef","renderSafeCheckedRef","mergedNameRef","focusRef","doUpdateChecked","handleRadioInputChange","handleRadioInputBlur","handleRadioInputFocus","NRadioButton","style$f","mapSlot","isButtonGroup","wrappedInstance","instanceProps","lastInstanceProps","lastInstanceChecked","lastInstanceDisabled","currentInstanceChecked","currentInstanceDisabled","lastInstancePriority","currentInstancePriority","lastInstanceClass","currentInstanceClass","splitorClass","radioGroupProps","buttonBorderColor","buttonBorderColorActive","buttonBorderRadius","buttonBoxShadow","buttonBoxShadowFocus","buttonBoxShadowHover","buttonColorActive","buttonTextColor","buttonTextColorActive","buttonTextColorHover","tooltipProps","NTooltip","popoverRef","internalExtraClass","style$e","createLineClampClass","createCursorClass","ellipsisProps","NEllipsis","triggerInnerRef","tooltipRef","expandedRef","ellipsisStyleRef","lineClamp","expanded","getTooltipDisabled","tooltipDisabled","syncEllipsisStyle","triggerInner","syncCursorStyle","handleClickRef","renderTrigger","latestStyle","lineClampClass","syncTriggerClass","cursorClass","styleClass","tooltip","dropdownMenuInjectionKey","dropdownInjectionKey","dropdownOptionInjectionKey","NDropdownDivider","NDropdownGroupHeader","showIconRef","hasSubmenuRef","hasSubmenu","showIcon","textColorBase","opacity1","opacity2","opacity4","opacity5","iconLight","iconLight$1","iconDark","iconDark$2","style$d","iconProps","NIcon","opacity","$parent","isSubmenuNode","isGroupNode","isDividerNode","isRenderNode","NDropdownOption","NDropdown","hoverKeyRef","keyboardKeyRef","lastToggledSubmenuKeyRef","pendingKeyPathRef","activeKeyPathRef","animatedRef","renderIconRef","childrenFieldRef","menuPropsRef","NDropdownMenu","rawNodeRef","showSubmenuRef","hoverKey","keyboardKey","lastToggledSubmenuKey","pendingKeyPath","deferredShowSubmenuRef","parentEnteringSubmenuRef","enteringSubmenuRef","handleSubmenuBeforeEnter","handleSubmenuAfterEnter","relatedTarget","activeKeyPath","animated","mergedShowSubmenu","siblingHasIcon","siblingHasSubmenu","renderIcon","scrollable","submenuVNode","submenuNodeProps","builtinProps","optionNodeProps","NDropdownGroup","NDropdownRenderOption","rawChild","menuOptionsNode","style$c","dropdownBaseProps","popoverPropKeys","dropdownProps","treemateRef","tmNodesRef","pendingKeyRef","keyboardEnabledRef","handleKeydownUp","handleKeydownRight","handleKeydownDown","handleKeydownLeft","handleKeydownEnter","handleKeydownEsc","doSelect","clearPendingState","onSelect","getPendingNode","pendingKey","nextKeyboardKey","firstNode","currentNode","inverted","optionIconSuffixWidth","optionSuffixWidth","optionIconPrefixWidth","optionPrefixWidth","optionIconSize","renderPopoverBody","menuProps","menuNodeProps","commonVars$8","timePickerDark","timePickerDark$1","commonVars$7","datePickerDark","datePickerDark$1","commonVariables$7","descriptionsDark","descriptionsDark$1","dialogProviderInjectionKey","commonVars$6","dialogLight","dialogLight$1","dialogDark","dialogDark$1","dialogProps","dialogPropKeys","style$b","iconRenderMap","NDialog","mergedIconPlacementRef","iconPlacement","handlePositiveClick","onPositiveClick","handleNegativeClick","onNegativeClick","actionSpace","contentMargin","iconMarginDiscrete","mergedIconPlacement","negativeText","positiveText","positiveButtonProps","negativeButtonProps","loading","actionNode","classNames","boxShadow3","modalLight","modalLight$1","modalDark","modalDark$1","DRAGGABLE_CLASS","useDragModal","draggablePropsRef","draggableRef","draggableClassRef","boundsToWindowRef","draggableProps","startDrag","header","maxMoveX","minMoveX","maxMoveY","minMoveY","prevMoveY","prevMoveX","mousedownEvent","downX","downY","moveX","moveY","handleMouseUp","stopDrag","presetProps","presetPropsKeys","NModalBodyWrapper","transformOriginXRef","transformOriginYRef","NModal","mousePosition","syncTransformOrigin","dialogTitleClassRef","cardHeaderClassRef","styleTransformOrigin","transformOriginX","transformOriginY","offsetLeft","offsetTop","childNodeRef","preset","style$a","modalProps","clickedPositionRef","NDialogProvider","NModalProvider","onBeforeHide","handleClickoutside","onMaskClick","handleEsc","mergedProvider","VLazyTeleport","unstableShowMask","loadingBarProviderInjectionKey","loadingBarApiInjectionKey","loadingBarDark","loadingBarDark$1","loadingBarLight","loadingBarLight$1","style$9","__awaiter","this","_arguments","P","generator","adopt","step","createClassName","NLoadingBar","providerProps","loadingBarRef","enteringRef","startedRef","loadingRef","transitionDisabledRef","finishing","erroringRef","mergedLoadingBarStyle","loadingBarStyle","fromProgress","toProgress","finish","colorError","colorLoading","loadingBarProviderProps","NLoadingBarProvider","commonVariables$6","messageDark","messageDark$1","commonVars$5","notificationDark","notificationDark$1","dividerDark","dividerDark$1","drawerLight","drawerLight$1","drawerDark","drawerDark$1","NDrawerBodyWrapper","NDrawer","startPosition","memoizedBodyStyleCursor","hoverTimerId","isHoverOnResizeTriggerRef","isDraggingRef","handleBodyMouseleave","handleBodyMouseup","handleMousedownResizeTrigger","handleBodyMousemove","handleMouseenterResizeTrigger","handleMouseleaveResizeTrigger","doUpdateHeight","doUpdateWidth","regulateWidth","regulateHeight","maxHeight","minHeight","increment","bodyDirectivesRef","slideInFromBottomTransition","slideInFromLeftTransition","slideInFromRightTransition","slideInFromTopTransition","style$8","drawerProps","uncontrolledWidthRef","uncontrolledHeightRef","mergedWidthRef","mergedHeightRef","styleWidthRef","styleHeightRef","onUpdateWidth","_onUpdateWidth","onUpdateHeight","_onUpdateHeight","mergedBodyStyleRef","handleMaskClick","maskClosable","handleOutsideClick","headerPadding","footerPadding","bodyPadding","headerBorderBottom","footerBorderTop","resizableTriggerColorHover","drawerContentProps","NDrawerContent","nativeScrollbar","bodyClass","bodyStyle","bodyContentClass","bodyContentStyle","headerClass","headerStyle","footerClass","footerStyle","commonVariables$5","dynamicInputDark","dynamicInputDark$1","commonVars$4","spaceDark","spaceDark$1","spaceLight","spaceLight$1","supportFlexGap","ensureSupportFlexGap","flex","isSupported","spaceProps","NSpace","gap","row","col","vertical","inline","justify","itemClass","itemStyle","useGap","wrapItem","internalUseGap","horizontalMargin","semiHorizontalMargin","verticalMargin","semiVerticalMargin","isJustifySpace","dynamicTagsDark","dynamicTagsDark$1","elementDark","elementDark$1","commonVars$3","flexDark","flexDark$1","buttonGroupDark","buttonGroupDark$1","commonVariables$4","formLight","formLight$1","formItemDark","formDark","gradientTextDark","gradientTextDark$1","inputNumberDark","inputNumberDark$1","inputNumberLight","inputNumberLight$1","inputOtpDark","inputOtpDark$1","layoutDark","bodyColor","layoutDark$1","rowDark","rowDark$1","listDark","listDark$2","logDark","logDark$1","mentionDark","createPartialInvertedVars","activeItemColor","activeTextColor","groupTextColor","menuLight","menuLight$1","menuDark","menuDark$1","common","pageHeaderDark","commonVars$2","popconfirmLight","popconfirmLight$1","popconfirmDark","popconfirmDark$1","progressRailColor","progressDark","progressDark$1","rateDark","rateDark$1","commonVariables$3","resultDark","resultDark$1","sizeVariables$3","sliderDark","sizeVariables","sliderDark$1","spinDark","spinDark$1","statisticDark","statisticDark$1","commonVariables$2","stepsDark","stepsDark$1","commonVars$1","switchDark","railOverlayColor","switchDark$1","switchLight","switchLight$1","sizeVariables$2","tableDark","tableDark$1","sizeVariables$1","tabColor","tabsLight","tabsLight$1","tabsDark","tabsDark$1","thingDark","thingDark$1","timelineDark","timelineDark$1","commonVariables$1","transferDark","transferDark$2","pressedColor","treeDark","treeDark$1","treeSelectDark","treeSelectDark$1","codeColor","typographyDark","typographyDark$1","uploadDark","uploadDark$1","watermarkDark","watermarkDark$1","floatButtonDark","floatButtonDark$1","formInjectionKey","formItemInstsInjectionKey","style$7","formProps","NForm","formItems","maxChildLabelWidthRef","deriveMaxChildLabelWidth","currentWidth","currentMaxChildLabelWidth","validate","validateCallback_1","validateCallback","shouldRuleBeApplied","formItemValidationPromises","formItemInstances","formItemInstance","results","formInvalid","errors","warnings","restoreValidation","_extends","_inheritsLoose","subClass","superClass","_setPrototypeOf","_getPrototypeOf","_isNativeReflectConstruct","_construct","Parent","Class","Constructor","_isNativeFunction","_wrapNativeSuper","_cache","formatRegExp","warning","convertFieldsError","fields","field","format","_len","isNativeStringType","isEmptyValue","asyncParallelArray","total","asyncSerialArray","original","flattenObjArr","objArr","AsyncValidationError","_Error","asyncMap","_pending","flattenArr","firstFields","objArrKeys","objArrLength","pending","isErrorObj","complementError","rule","oe","fieldValue","required$1","whitespace","urlReg","getUrlRegex","v4","v6seg","v6","v46Exact","v4exact","v6exact","ip","protocol","ipv4","ipv6","host","tld","port","regex","pattern$2","type$1","custom","ruleType","max","spRegexp","ENUM$1","enumerable$1","pattern$1","_pattern","rules","_boolean","integer","floatFn","ENUM","enumerable","date","dateObject","required","any","validators","newMessages","messages","Schema","_proto","_messages","source_","oc","_this2","complete","_errors","messages$1","series","z","errorFields","doIt","addFullField","schema","errorList","filledErrors","fieldsSchema","paredFieldsSchema","fieldSchema","fieldSchemaList","errs","finalErrors","messageIndex","validator","fadeDownTransition","fromOffset","style$6","formItemMisc","mergedLabelPlacementRef","labelPlacement","isAutoLabelWidthRef","mergedLabelWidthRef","labelWidth","autoComputedWidth","mergedLabelAlignRef","labelAlign","mergedLabelStyleRef","mergedShowRequireMarkRef","showRequireMark","mergedRequireMarkPlacementRef","requireMarkPlacement","validationErroredRef","validationWarnedRef","mergedValidationStatusRef","validationStatus","mergedShowFeedbackRef","showFeedback","mergedShowLabelRef","showLabel","formItemRule","compatibleRulePathRef","rulePath","mergedRulesRef","formRules","formRule","hasRequiredRuleRef","mergedRequiredRef","formItemProps","wrapValidator","async","validateResult","formItemSizeRefs","formItemMiscRefs","labelPlacementRef","labelTextAlignRef","renderExplainsRef","feedbackIdRef","internalValidate","args_1","messageRenderers","originalMessageRendersMessage","activeRules","shallowClonedRule","rendererKey","activeErrorRules","activeWarningRules","validationResult","warningValidator","validateMessages","renderMessages","transformedMessage","handleContentBlur","handleContentChange","handleContentFocus","handleContentInput","asyncValidatorOptions","exposedRef","labelElementRef","labelElement","memoizedWhitespace","labelTextColor","asteriskColor","feedbackTextColor","feedbackTextColorWarning","feedbackTextColorError","feedbackPadding","labelFontWeight","labelHeight","blankHeight","feedbackFontSize","feedbackHeight","labelPadding","labelTextAlign","labelFontSize","mergedLabelTextAlign","reverseColSpaceRef","mergedShowLabel","mergedShowRequireMark","mergedRequireMarkPlacement","renderedShowRequireMark","labelText","textNode","markNode","labelProps","mergedValidationStatus","feedback","feedbackNodes","defaultSpan","gridInjectionKey","gridItemProps","NGi","isSsrRef","xGapRef","itemStyleRef","layoutShiftDisabledRef","privateSpan","privateShow","privateColStart","privateOffset","xGap","mergedXGap","span","NGlobalStyle","styleApplied","firstApply","defaultBreakpoints","defaultCols","SSR_ATTR_NAME","gridProps","NGrid","numRegex","widthRef","breakpointsRef","isResponsiveRef","responsiveQueryRef","responsiveColsRef","responsiveXGapRef","responsiveYGapRef","handleResizeRaf","handleResizeRef","contentElRef","contentEl","renderContent","_f","_g","childrenAndRawSpan","collapsed","collapsedRows","responsiveCols","responsiveQuery","clonedNode","clonedChild","rawChildSpan","suffixSpan","maybeSuffixNode","suffixPropValue","spanCounter","childOffset","childSpan","remainder","iconWrapperDark","imageDark","imageLight","renderPrevIcon","renderNextIcon","renderCloseIcon","imagePreviewSharedProps","imageContextKey","BLEEDING","NImagePreview","thumbnailEl","previewRef","previewWrapperRef","previewSrcRef","showRef","previewWrapper","tbox","tx","ty","toggleShow","startX","startY","offsetX","offsetY","startOffsetX","startOffsetY","mouseDownClientX","mouseDownClientY","dragging","clientX","clientY","derivePreviewStyle","getMoveStrategy","opts","mouseUpClientX","mouseUpClientY","deltaHorizontal","deltaVertical","moveVerticalDirection","moveHorizontalDirection","getDerivedOffset","moveStrategy","preview","pbox","nextOffsetX","nextOffsetY","imageContext","handlePreviewMousedown","scaleRadix","scaleExp","rotate","handlePreviewDblclick","originalImageSizeScale","getOrignalImageSizeScale","resetScale","handleSwitchPrev","handleSwitchNext","rotateCounterclockwise","rotateClockwise","getMaxScale","innerWidth","innerHeight","heightMaxScale","widthMaxScale","heightScale","widthScale","zoomIn","maxScale","zoomOut","originalScale","handleDownloadClick","src","controlledStyle","controlledStyleString","transformStyle","resizeToOrignalImageSize","withTooltip","tooltipKey","toolbarIconColor","toolbarBorderRadius","toolbarBoxShadow","toolbarColor","renderToolbar","prevNode","rotateCounterclockwiseNode","rotateClockwiseNode","originalSizeNode","zoomOutNode","downloadNode","closeNode","zoomInNode","previewedImgProps","imageGroupInjectionKey","imageGroupProps","currentSrc","groupId","previewInstRef","setPreviewSrc","imgs","img","imageProps","NImage","imageRef","showErrorRef","imageGroupHandle","mergedPreviewSrc","previewInst","stopWatchHandle","loadedRef","onError","imgPropsOnError","onLoad","imgPropsOnLoad","imgProps","loaded","lazy","errorNode","placeholderNode","loadSrc","imgNode","style$4","isWipValue","precision","parseNumber","parsedNumber","HOLDING_CHANGE_THRESHOLD","HOLDING_CHANGE_INTERVAL","inputNumberProps","NInputNumber","inputInstRef","minusButtonInstRef","addButtonInstRef","displayedValueRef","getPrecision","fraction","getMaxPrecision","precisions","mergedStepRef","mergedMinRef","mergedMaxRef","deriveDisplayedValueFromValue","formatProp","deriveValueFromDisplayedValue","doUpdateIfValid","fixPrecision","isInputing","displayedValue","parsedValue","currentPrecision","mergedMax","mergedMin","displayedValueInvalidRef","minusableRef","mergedStep","addableRef","doAdd","addable","clearAddHoldTimeout","createValidValue","doMinus","minusable","clearMinusHoldTimeout","minusHoldStateIntervalId","addHoldStateIntervalId","firstMinusMousedownId","firstAddMousedownId","handleMinusMousedown","handleAddMousedown","handleAddClick","handleMinusClick","handleUpdateDisplayedValue","renderMinusButton","NxButton","renderAddButton","layoutSiderInjectionKey","legacyTransferDark","marqueeDark","marqueeDark$1","menuInjectionKey","submenuInjectionKey","menuItemGroupInjectionKey","horizontalHoverStyleChildren","style$3","hoverStyle","NMenuOptionContent","maxIconSize","activeIconSize","iconMarginRight","renderExtra","expandIcon","ICON_MARGIN_RIGHT","useMenuChild","NMenu","mergedCollapsedRef","NSubmenu","NMenuOptionGroup","horizontalRef","dropdownPlacementRef","maxIconSizeRef","activeIconSizeRef","paddingLeftRef","collapsedWidth","rootIndent","mergedRootIndent","iconMarginRightRef","useMenuChildProps","NMenuDivider","isHorizontalRef","menuItemProps","menuItemPropKeys","NMenuOption","MenuChild","submenuDisabledRef","menuItemGroupProps","menuItemGroupPropKeys","itemRenderer","isIgnoredNode","submenuPropKeys","submenuProps","dropdownShowRef","handlePopoverShowChange","createSubmenuItem","isHorizontal","childActive","dropdownShow","isEllipsisPlaceholder","extra","createSubmenuChildren","layoutSider","collapseModeRef","collapsedRef","disabledField","treeKeysLevelOneRef","watchProps","uncontrolledExpandedKeysRef","initUncontrolledExpandedKeys","controlledExpandedKeysRef","mergedExpandedKeysRef","activePathRef","toggleExpand","doUpdateExpandedKeys","_onUpdateExpandedKeys","onUpdateExpandedKeys","onExpandedNamesChange","onOpenNamesChange","currentExpandedKeys","expanededKey","closeKeyIndex","showOption","selectedKeyPath","nextExpandedKeys","firstLevelKey","borderColorHorizontal","itemHeight","ellipsisNodeId","isFirstResize","ellipsisFromIndexRef","ellipsisOptionRef","ellipsisFromIndex","ellipsisTreeMateRef","emptyTmNodeRef","activePath","renderMenuItemNodes","finalResponsive","renderMainNode","popconfirmInjectionKey","PopconfirmPanel","popconfirmProps","actionContentNode","style$2","NPopconfirm","qrcodeDark","qrcodeDark$1","skeletonDark","splitDark","splitDark$1","style$1","switchProps","supportCssMax","NSwitch","checkedRef","pressedRef","mergedRailStyleRef","railStyle","railColorActive","buttonHeight","buttonWidth","buttonWidthPressed","railHeight","railWidth","railBorderRadius","mergedRailStyle","checkedSlot","uncheckedSlot","iconSlot","checkedIconSlot","uncheckedIconSlot","hasIcon","checkedSlotChildren","uncheckedSlotChildren","checkedIcon","uncheckedIcon","tabsInjectionKey","tabPaneProps","NTabPane","NTab","tabProps","Tab","typeRef","closableRef","tabStyleRef","addTabStyleRef","tabClassRef","addTabClassRef","tabChangeIdRef","onBeforeLeaveRef","handleAdd","activateTab","handleClose","nameProp","allowLeave","internalAddable","tab","mergedClosable","mergedTab","tabsProps","NTabs","tabsElRef","barElRef","scrollWrapperElRef","addTabInstRef","xScrollInstRef","yScrollElRef","startReachedRef","endReachedRef","compitableSizeRef","compitableValueRef","tabWrapperStyleRef","updateCurrentBarStyle","updateCurrentScrollPosition","getCurrentEl","updateBarStyle","tabEl","barEl","barIsHide","disabledClassName","barWidth","clearBarStyle","offsetDiffLeft","offsetDiffTop","hideBarStyle","styleProps","scrollWrapperEl","scrollWrapperElScrollLeft","scrollWrapperElOffsetWidth","tabElOffsetLeft","tabElOffsetWidth","tabsPaneWrapperRef","fromHeight","hangingTransition","onAnimationBeforeLeave","tabsPaneWrapperEl","fromHeightPx","applyFromStyle","onAnimationEnter","targetHeight","applyTargetStyle","onAnimationAfterEnter","paneWrapperStyle","renderNameListRef","animationDirectionRef","panelName","onActiveNameChange","updateBarPositionInstantly","disableTransitionClassName","segmentCapsuleElRef","updateSegmentPosition","transitionDisabled","tabsEl","activeTabEl","_handleNavResize","deriveScrollShadow","handleNavResize","addTabFixedRef","_handleTabsResize","addTabInst","handleTabsResize","onAdd","currentEl","xScrollInst","scrollLeft","scrollWidth","scrollHeight","shadowStartClass","shadowEndClass","handleSegmentResize","typeSuffix","barColor","tabBorderColor","paneTextColor","tabFontWeight","tabBorderRadius","tabFontWeightActive","colorSegment","tabColorSegment","panePadding","tabPadding","tabPaddingVertical","tabGap","tabGapVertical","tabTextColor","tabTextColorActive","tabTextColorHover","tabTextColorDisabled","tabFontSize","addTabFixed","paneWrapperClass","prefixSlot","suffixSlot","tabPaneChildren","tabChildren","showPane","isCard","isSegment","mergedJustifyContent","scrollContent","tabs","tabPaneVNode","justifyTabDynamicProps","tabVNode","createLeftPaddedTabVNode","createAddTag","resolvedPlacement","filterMapTabPanes","tabPaneVNodes","renderedNames","animationDirection","displayDirective","_displayDirective","matchDisplayDirective","useVShow","internalLeftPadded","modifiedVNode","useThemeVars","configProviderInjection","currentThemeVars","equationDark","equationDark$1","floatButtonGroupDark","floatButtonGroupDark$1","darkTheme","LuxonError","InvalidDateTimeError","InvalidIntervalError","InvalidDurationError","ConflictingSpecificationError","InvalidUnitError","unit","InvalidArgumentError","ZoneIsAbstractError","DATE_SHORT","DATE_MED","DATE_MED_WITH_WEEKDAY","DATE_FULL","DATE_HUGE","TIME_SIMPLE","TIME_WITH_SECONDS","TIME_WITH_SHORT_OFFSET","TIME_WITH_LONG_OFFSET","TIME_24_SIMPLE","TIME_24_WITH_SECONDS","TIME_24_WITH_SHORT_OFFSET","TIME_24_WITH_LONG_OFFSET","DATETIME_SHORT","DATETIME_SHORT_WITH_SECONDS","DATETIME_MED","DATETIME_MED_WITH_SECONDS","DATETIME_MED_WITH_WEEKDAY","DATETIME_FULL","DATETIME_FULL_WITH_SECONDS","DATETIME_HUGE","DATETIME_HUGE_WITH_SECONDS","isInteger","hasRelative","maybeArray","thing","bestBy","by","compare","best","pick","integerBetween","floorMod","padStart","isNeg","padded","parseInteger","parseFloating","parseMillis","roundTo","digits","towardZero","factor","__pow","isLeapYear","year","daysInYear","daysInMonth","month","modMonth","modYear","objToLocalTS","weeksInWeekYear","weekYear","p1","p2","untruncateYear","parseZoneInfo","ts","offsetFormat","timeZone","intlOpts","modified","__spreadValues","signedOffset","offHourStr","offMinuteStr","offHour","offMin","offMinSigned","asNumber","numericValue","normalizeObject","normalizer","formatOffset","hours","minutes","sign","timeObject","ianaRegex","monthsLong","monthsShort","monthsNarrow","months","weekdaysLong","weekdaysShort","weekdaysNarrow","weekdays","meridiems","erasLong","erasShort","erasNarrow","eras","meridiemForDateTime","dt","weekdayForDateTime","monthForDateTime","eraForDateTime","formatRelativeTime","numeric","narrow","units","lastable","isDay","isInPast","fmtValue","singular","lilUnits","fmtUnit","stringifyTokens","splits","tokenToString","macroTokenToFormatOpts","Formats.DATE_SHORT","Formats.DATE_MED","Formats.DATE_FULL","Formats.DATE_HUGE","Formats.TIME_SIMPLE","Formats.TIME_WITH_SECONDS","Formats.TIME_WITH_SHORT_OFFSET","Formats.TIME_WITH_LONG_OFFSET","Formats.TIME_24_SIMPLE","Formats.TIME_24_WITH_SECONDS","Formats.TIME_24_WITH_SHORT_OFFSET","Formats.TIME_24_WITH_LONG_OFFSET","Formats.DATETIME_SHORT","Formats.DATETIME_MED","Formats.DATETIME_FULL","Formats.DATETIME_HUGE","Formats.DATETIME_SHORT_WITH_SECONDS","Formats.DATETIME_MED_WITH_SECONDS","Formats.DATETIME_FULL_WITH_SECONDS","Formats.DATETIME_HUGE_WITH_SECONDS","Formatter","fmt","currentFull","bracketed","formatOpts","knownEnglish","useDateTimeFormatter","extract","meridiem","English.meridiemForDateTime","standalone","English.monthForDateTime","weekday","English.weekdayForDateTime","maybeMacro","era","English.eraForDateTime","dur","tokenToField","lildur","mapped","realTokens","found","literal","Invalid","explanation","Zone","otherZone","singleton","SystemZone","dtfCache","makeDTF","zone","typeToPos","hackyOffset","dtf","formatted","fMonth","fDay","fYear","fadOrBc","fHour","fMinute","fSecond","partsOffset","filled","pos","ianaZoneCache","IANAZone","day","adOrBc","hour","minute","second","asUTC","asTS","over","FixedOffsetZone","InvalidZone","zoneName","normalizeZone","defaultZone","lowered","defaultLocale","defaultNumberingSystem","defaultOutputCalendar","throwOnInvalid","Settings","numberingSystem","outputCalendar","Locale","intlLFCache","getCachedLF","locString","intlDTCache","getCachedDTF","intlNumCache","getCachedINF","inf","intlRelCache","getCachedRTF","cacheKeyOpts","__objRest","sysLocaleCache","systemLocale","parseLocaleString","localeStr","uIndex","smaller","calendar","intlConfigString","mapMonths","ms","DateTime","mapWeekdays","listStuff","loc","defaultOK","englishFn","intlFn","supportsFastNumbers","PolyNumberFormatter","intl","forceSimple","padTo","floor","otherOpts","fixed","PolyDateFormatter","gmtOffset","offsetZ","PolyRelFormatter","isEnglish","English.formatRelativeTime","defaultToEN","specifiedLocale","localeR","numberingSystemR","outputCalendarR","numbering","parsedLocale","parsedNumberingSystem","parsedOutputCalendar","isActuallyEn","hasNoWeirdness","alts","__spreadProps","English.months","formatStr","English.weekdays","English.meridiems","English.eras","df","matching","combineRegexes","regexes","full","combineExtractors","extractors","mergedVals","mergedZone","ex","patterns","extractor","simpleParse","offsetRegex","isoExtendedZone","isoTimeBaseRegex","isoTimeRegex","isoTimeExtensionRegex","isoYmdRegex","isoWeekRegex","isoOrdinalRegex","extractISOWeekData","extractISOOrdinalData","sqlYmdRegex","sqlTimeRegex","sqlTimeExtensionRegex","int","extractISOYmd","extractISOTime","extractISOOffset","fullOffset","extractIANAZone","isoTimeOnly","isoDuration","extractISODuration","yearStr","monthStr","weekStr","dayStr","hourStr","minuteStr","secondStr","millisecondsStr","hasNegativePrefix","negativeSeconds","maybeNegate","obsOffsets","fromStrings","weekdayStr","English.monthsShort","English.weekdaysLong","English.weekdaysShort","rfc2822","extractRFC2822","obsOffset","milOffset","preprocessRFC2822","rfc1123","rfc850","ascii","extractRFC1123Or850","extractASCII","isoYmdWithTimeExtensionRegex","isoWeekWithTimeExtensionRegex","isoOrdinalWithTimeExtensionRegex","isoTimeCombinedRegex","extractISOYmdTimeAndOffset","extractISOWeekTimeAndOffset","extractISOOrdinalDateAndTime","extractISOTimeAndOffset","parseISODate","parseRFC2822Date","parseHTTPDate","parseISODuration","extractISOTimeOnly","parseISOTimeOnly","sqlYmdWithTimeExtensionRegex","sqlTimeCombinedRegex","extractISOTimeOffsetAndIANAZone","parseSQL","INVALID","lowOrderMatrix","casualMatrix","daysInYearAccurate","daysInMonthAccurate","accurateMatrix","orderedUnits","reverseUnits","conf","Duration","antiTrunc","matrix","fromMap","fromUnit","toMap","toUnit","conv","sameSign","added","normalizeValues","vals","previous","accurate","durationLike","invalid","fmtOpts","millis","mixed","conversionAccuracy","built","accumulated","lastUnit","own","ak","down","negated","validateStartEnd","Interval","builtStart","friendlyDateTime","builtEnd","validateError","startIsValid","endIsValid","dateTime","dateTimes","sorted","idx","numberOfParts","intervals","final","sofar","currentCount","ends","flattened","dateFormat","separator","mapFn","Info","locObj","dayDiff","earlier","later","utcDayStart","highOrderDiffs","differs","days","lowestOrder","highWater","differ","remainingMillis","lowerOrderUnits","numberingSystems","numberingSystemsUTF16","hanidecChars","parseDigits","digitRegex","append","MISSING_FTP","intUnit","post","NBSP","spaceOrNBSP","spaceOrNBSPRegExp","fixListRegex","stripInsensitivities","oneOf","strings","groups","escapeToken","unitForToken","one","two","three","four","six","oneOrTwo","oneToThree","oneToSix","oneToNine","twoToFour","fourToSix","partTypeStyleToTokenVal","tokenForPart","buildRegex","matches","all","matchIndex","dateTimeFromMatches","toField","specificOffset","dummyDateTimeCache","getDummyDateTime","maybeExpandMacroToken","expandMacroTokens","explainFromTokens","disqualifyingUnit","regexString","rawMatches","parseFromTokens","invalidReason","nonLeapLadder","leapLadder","unitOutOfRange","dayOfWeek","js","computeOrdinal","uncomputeOrdinal","ordinal","table","month0","gregorianToWeek","gregObj","weekNumber","weekToGregorian","weekData","weekdayOfJan4","yearInDays","gregorianToOrdinal","gregData","ordinalToGregorian","ordinalData","hasInvalidWeekData","validYear","validWeek","validWeekday","hasInvalidOrdinalData","validOrdinal","hasInvalidGregorianData","validMonth","validDay","hasInvalidTimeData","millisecond","validHour","validMinute","validSecond","validMillisecond","MAX_DATE","unsupportedZone","possiblyCachedWeekData","fixOffset","localTS","tz","utcGuess","o2","o3","tsToObj","objToTS","adjustTime","oPre","millisToAdd","parseDataToDateTime","parsedZone","setZone","interpretationZone","toTechFormat","allowZ","toISODate","extended","longFormat","toISOTime","suppressSeconds","suppressMilliseconds","includeOffset","extendedZone","defaultUnitValues","defaultWeekUnitValues","defaultOrdinalUnitValues","orderedWeekUnits","orderedOrdinalUnits","normalizeUnit","quickDT","tsNow","offsetProvis","diffRelative","lastOpts","argList","zoneToUse","milliseconds","containsOrdinal","containsGregorYear","containsGregorMD","containsGregor","definiteWeekDef","useWeekData","defaultValues","objNow","foundFirst","higherOrderInvalid","gregorian","tsFinal","offsetFinal","localeToUse","keepLocalTime","keepCalendarTime","newTS","offsetGuess","asObj","settingWeekStuff","normalizedUnit","q","ext","includePrefix","includeZone","includeOffsetSpace","otherDateTime","durOpts","otherIsLater","diffed","inputMs","adjustedToZone","Formats.DATE_MED_WITH_WEEKDAY","Formats.DATETIME_MED_WITH_WEEKDAY","dateTimeish","dates","signals","years","locationOptions","signalOptions","yearOptions","updateRoute","changeYear","changeSignal","fetch","getMonthsForYear","getMonth","getMonthName","noDataStyle","Add20Regular","_ctx","ArrowDownload20Regular","ArrowLeft12Regular","ArrowNext20Regular","ArrowPrevious20Regular","Comment20Regular","Delete16Regular","Eye16Regular","EyeOff16Regular","Image20Regular","Pause20Regular","Play20Regular","WeatherMoon16Filled","WeatherSunny16Regular","ZoomIn20Regular","ZoomOut20Regular","_withDirectives","_Fragment","_renderList","recording","mouseOverGrid","datesMap","spectrogram","recordings","dateM","D","H","recDate","fetchDates","hasAnnotation","isLoading","availableYears","availableMonthsForYear","changeMonth","displayLocation","monthDisplay","monthOptions","dayDisplay","hourDisplay","cellHeight","cellStyle","spectrogramStyle","w","onMouseOver","ui","dateToISODate","scrollToId","isoDate","hashForDate","timeDisplay","PI_OVER_180","detectBrowser","angle","Konva","_registerNode","NodeClass","Global_1","Transform","tr","point","sx","sy","rad","m11","m12","m21","m22","m0","m1","m2","m3","m4","m5","OBJECT_ARRAY","OBJECT_NUMBER","OBJECT_STRING","OBJECT_BOOLEAN","PI_OVER_DEG180","DEG180_OVER_PI","HASH","EMPTY_STRING","ZERO","KONVA_WARNING","KONVA_ERROR","RGB_PAREN","COLORS","RGB_REGEX","animQueue","req","firstChar","canvas","imageObj","bigint","randColor","hsl","t2","t3","t1","r1","r2","retObj","deg","radians","x1","y1","x2","y2","x3","y3","dist","pd2","pt","isClosed","pc","proj","px","py","pdist","startArray","endArray","temp","newStart","pr","desc","evt","canvases","cornerRadius","topLeft","topRight","bottomLeft","bottomRight","Validators","RGBComponent","alphaComponent","getNumberValidator","getNumberOrArrayOfNumbersValidator","getNumberOrAutoValidator","getStringValidator","getStringOrGradientValidator","getFunctionValidator","getNumberArrayValidator","getBooleanValidator","getComponentValidator","Util_1","_formatValue","attr","noOfElements","isValidArray","isAuto","isGradient","TypedArray","isBool","Validators_1","GET","SET","constructor","after","basicValidator","oldVal","capitalizedAttr","oldMethodName","newMethodName","oldGetter","oldSetter","deprecated","Context_1","simplifyArray","retArr","util","COMMA","OPEN_PAREN","CLOSE_PAREN","OPEN_PAREN_BRACKET","CLOSE_BRACKET_PAREN","SEMICOLON","DOUBLE_PAREN","EQUALS","CONTEXT_METHODS","CONTEXT_PROPERTIES","traceArrMax","Context","shape","relaxed","rounded","traceArr","trace","pixelRatio","bounds","lineCap","absOpacity","lineJoin","startAngle","endAngle","counterClockwise","cp1x","cp1y","cp2x","cp2y","x0","y0","image","repetition","r0","sWidth","sHeight","dWidth","dHeight","_context","radiusX","radiusY","rotation","counterclockwise","fillRule","sw","sh","radii","imageData","cpx","cpy","path2d","that","origSetter","origMethod","op","SceneContext","willReadFrequently","fill","grd","hasColor","fillPriority","hasPattern","hasLinearGradient","hasRadialGradient","colorStops","dash","strokeScaleEnabled","ratio","scaleX","scaleY","HitContext","hitStrokeWidth","Canvas_1","_pixelRatio","getDevicePixelRatio","devicePixelRatio","backingStoreRatio","Canvas","previousRatio","mimeType","quality","SceneCanvas","HitCanvas","elem","nodesToFireEvents","stage","dragDistance","drawNodes","drawNode","Node_1","Factory_1","DragAndDrop_1","ABSOLUTE_OPACITY","ALL_LISTENERS","ABSOLUTE_TRANSFORM","ABSOLUTE_SCALE","CANVAS","CHANGE","CHILDREN","KONVA","LISTENING","MOUSEENTER","MOUSELEAVE","SHAPE","SPACE","STAGE","TRANSFORM","UPPER_STAGE","VISIBLE","TRANSFORM_CHANGE_STR","idCounter","Node","privateGetter","depsString","scene","hit","rect","drawBorder","hitCanvasPixelRatio","extraPaddingX","extraPaddingY","cachedSceneCanvas","cachedFilterCanvas","cachedHitCanvas","sceneContext","hitContext","points","minX","minY","maxX","maxY","trans","transformed","canvasCache","cacheCanvas","hitCanvas","cachedCanvas","sceneCanvas","filterCanvas","filterContext","evtStr","baseEvent","stopNode","targets","ancestors","relativeTo","skipDragCheck","layer","layerUnderDrag","dragSkip","addChildren","haveCachedParent","absoluteMatrix","absoluteTransform","origTrans","it","change","changeX","changeY","family","theta","newContainer","nonPlainObject","ancestor","selectorArr","sel","eventType","bubble","at","transformsEnabled","skewX","skewY","allListeners","box","bufferCanvas","blob","evtListeners","evtName","newName","fullName","compareShape","stopBubble","hierarchyEvents","topListeners","selfListeners","pointerId","ap","bubbleEvent","newNodePos","dbf","bounded","draggable","hasDraggingChild","dragElement","isDragging","screenRect","no","addGetterSetter","Container_1","Container","filterFunc","findOne","shouldStop","can","caching","drawMethod","clipWidth","clipHeight","clipFunc","hasClip","selfCache","clipArgs","clipX","clipY","hasComposition","skipTransform","selfRect","shapes","hasVisible","PointerEvents","getCapturedShape","createEvent","hasPointerCapture","setPointerCapture","releaseCapture","Captures","SUPPORT_POINTER_EVENTS","Global_2","STRING","PX","MOUSEOUT","MOUSEOVER","MOUSEMOVE","MOUSEDOWN","MOUSEUP","POINTERMOVE","POINTERDOWN","POINTERUP","POINTERCANCEL","LOSTPOINTERCAPTURE","POINTEROUT","POINTERLEAVE","POINTEROVER","POINTERENTER","CONTEXTMENU","TOUCHSTART","TOUCHEND","TOUCHMOVE","TOUCHCANCEL","WHEEL","MAX_LAYERS_NUMBER","EVENTS","EVENTS_MAP","getEventType","getEventsMap","checkNoClip","NO_POINTERS_MESSAGE","Stage","isLayer","isFastLayer","layers","layerCanvas","evenType","targetShape","eventsEnabled","triggeredOnShape","isTouch","processedShapesIds","differentTarget","clickStartShape","clickEndShape","fireDblClick","contentPosition","touch","HAS_SHADOW","SHADOW_RGBA","patternImage","linearGradient","radialGradient","dummyContext","getDummyContext","_fillFunc","_strokeFunc","_fillFuncHit","_strokeFuncHit","_clearHasShadowCache","_clearGetShadowRGBACache","_clearFillPatternCache","_clearLinearGradientCache","_clearRadialGradientCache","Shape","bufferHitCanvas","forceFill","hasFill","hasStroke","isTransparent","hasShadow","strokeForShadow","hasCachedParent","fillRect","fillAndStrokeWidth","fillAndStrokeHeight","applyShadow","shadowOffsetX","shadowOffsetY","preWidth","preHeight","blurRadius","drawFunc","bufferContext","skipBuffer","cachingSelf","bc","alphaThreshold","hitWidth","hitHeight","hitImageData","hitData","rgbColorKey","Layer_1","Shape_1","BEFORE_DRAW","DRAW","INTERSECTION_OFFSETS","INTERSECTION_OFFSETS_LEN","Layer","_canvas","spiralSearchDistance","continueSearch","intersectionOffset","p3","colorKey","FastLayer_1","FastLayer","Group_1","Group","Animation_1","Animation_2","Animation","lays","animations","anim","layerHash","layersLen","needRedraw","Anim","blacklist","REVERSING","colorAttrs","TweenEngine","propFunc","begin","yoyo","Tween","nodeId","easing","trueEnd","trueStart","endRGBA","tweenId","startRGBA","thisId","onFinish","Stage_1","require$$9","require$$10","Tween_1","require$$11","require$$12","require$$13","_CoreInternals_1","_CoreInternals_2","Line_1","Line_2","getControlPoints","d01","d12","fa","fb","p1x","p1y","p2x","p2y","expandPoints","tension","allPoints","cp","Line","closed","bezier","tp","firstControlPoints","lastControlPoints","Rect_1","Rect_2","Rect","Text_1","Text_2","acc","nextChar","AUTO","CENTER","INHERIT","JUSTIFY","CHANGE_KONVA","CONTEXT_2D","DASH","LEFT","TEXT","TEXT_UPPER","TOP","BOTTOM","MIDDLE","NORMAL","PX_SPACE","RIGHT","RTL","WORD","CHAR","NONE","ELLIPSIS","ATTR_CHANGE_LIST","attrChangeListLen","normalizeFontFamily","hasSpace","hasQuotes","checkDefaultFill","textArr","textArrLen","lineHeightPx","verticalAlign","alignY","totalWidth","letterSpacing","shouldUnderline","shouldLineThrough","translateY","baseline","metrics","lineTranslateX","lineTranslateY","lastLine","spacesNumber","lineWidth","yOffset","gradient","li","letter","_h","_j","_k","_l","scaleFactor","lines","textWidth","fixedWidth","fixedHeight","maxHeightPx","currentHeightPx","shouldWrap","wrapAtWord","shouldAddEllipsis","additionalWidth","low","high","matchWidth","mid","lineArray","substr","substrWidth","matchArray","nextIsSpaceOrDash","wrapIndex","lastSpaceIndex","lastDashIndex","hasLine","Image_1","Image","hasCornerRadius","cropWidth","cropHeight","WaveformDataChannel","waveformData","channelIndex","sample","INT8_MAX","INT8_MIN","calculateWaveformDataLength","audio_sample_count","data_length","samples_remaining","generateWaveformData","amplitude_scale","split_channels","sample_rate","channels","channel","output_channels","header_size","total_size","data_view","scale_counter","min_value","max_value","_typeof","isJsonWaveformData","isBinaryWaveformData","isCompatible","view","convertJsonToBinary","bytes_per_sample","expected_length","array_buffer","data_object","decodeBase64","base64","enableUnicode","binaryString","binaryView","createURL","sourcemapArg","enableUnicodeArg","sourcemap","createBase64WorkerFactory","WorkerFactory","WaveformData","defaultOptions","getOptions","getChannelData","audio_buffer","createFromAudioBuffer","worker","createFromArrayBuffer","audioContext","audioData","errorCallback","output_samples_per_pixel","input_buffer_size","input_buffer_length_samples","output_buffer_length_samples","output_header_size","output_data","output_dataview","waveform_data","input_index","output_index","where","prev_where","last_input_index","sample_at_pixel","otherWaveforms","otherWaveform","combinedBuffer","headerSize","totalSize","totalDataLength","bufferCollection","dataSize","totalBuffer","sourceHeader","totalBufferView","dataOfTotalBuffer","correction","bits","waveform","getDefaultExportFromCjs","eventemitter3","hasRequiredEventemitter3","requireEventemitter3","Events","EE","once","addListener","emitter","clearEvent","EventEmitter","ee","a3","a4","a5","eventemitter3Exports","Cue","zeroPad","formatTime","fractionSeconds","roundUpToNearest","multiplier","roundedUp","clamp","objectHasProperty","isInAscendingOrder","isFinite","isValidTime","isNullOrUndefined","isLinearGradientColor","getMarkerObject","isHeadless","windowIsVisible","requestAnimationFrame","cancelAnimationFrame","eventTypes","EVENT_TYPE_POINT","EVENT_TYPE_SEGMENT_ENTER","EVENT_TYPE_SEGMENT_EXIT","eventNames","eventAttributes","getPointOrSegment","peaks","cue","CueEmitter","previousTime","isForward","marker","getSegmentIdComparator","activeSegments","pointOptions","invalidOptions$1","setDefaultPointOptions","peaksOptions","validatePointOptions","updating","Point","pid","startTime","endTime","WaveformPoints","arrayArgs","newPointId","indexes","removed","itemRemoved","pointId","segmentOptions","invalidOptions","setDefaultSegmentOptions","globalSegmentOptions","validateSegmentOptions","Segment","WaveformSegments","sortedSegments","newSegmentId","segmentId","TAB","LEFT_ARROW","RIGHT_ARROW","KeyboardHandler","eventEmitter","mediaElementHasSource","mediaElement","MediaElementPlayer","eventHandler","SetSourceHandler","setSourceHandler","getAllPropertiesFrom","allProperties","validateAdapter","publicAdapterMethods","Player","DefaultPointMarker","handleWidth","handleHeight","handleX","DefaultSegmentMarker","xPosition","createSegmentMarker","createSegmentLabel","createPointMarker","HighlightLayer","startOffset","endOffset","PointMarker","PointsLayer","enableEditing","listening","enable","frameStartTime","frameEndTime","pointMarker","isVisible","pointMarkerOffset","pointMarkerX","editable","viewOptions","markerX","pointPid","visible","PlayheadLayer","pixelsPerSecond","pixelIndex","frameOffset","playheadX","playheadTextWidth","lastPlayheadPosition","playheadPosition","OverlaySegmentMarker","viewHeight","overlayOffset","overlayRectHeight","SegmentMarker","WaveformShape","shapeOptions","endY","startPixels","endPixels","limit","waveformTop","waveformHeight","amplitude","amplitudeScale","lineX","lineY","SegmentShape","segmentStartOffset","segmentEndOffset","overlayBorderColor","overlayBorderWidth","overlayColor","overlayOpacity","overlayCornerRadius","createOverlayMarker","startMarker","endMarker","timeOffset","segmentDuration","dragMode","minSegmentWidth","minSegmentDuration","previousSegmentUpdated","nextSegmentUpdated","previousSegmentEndX","previousSegmentEndTime","minPreviousSegmentEndTime","nextSegmentStartX","nextSegmentStartTime","maxNextSegmentStartTime","segmentMarker","getDuration","startMarkerX","endMarkerX","upperLimit","previousSegmentVisible","fixedPreviousSegment","compressPreviousSegment","previousSegmentDuration","lowerLimit","nextSegmentVisible","fixedNextSegment","compressNextSegment","nextSegmentDuration","SegmentsLayer","segmentPid","segmentShape","WaveformAxis","fontStyle","baseSecs","steps","minSpacing","secs","pixels","currentFrameStartTime","axisLabelIntervalSecs","firstAxisLabelSecs","axisLabelOffsetSecs","axisLabelOffsetPixels","labelX","labelY","WaveformView","emitViewEvent","clickEvent","viewName","updateWaveform","heightChanged","MouseDragHandler","mouseDownPosX","mousePosX","containerPos","SeekMouseDragHandler","WaveformOverview","zoomview","playheadTime","SpectrogramImage","totalDuration","SpectrogramView","spectrogramData","SpectrogramOverview","InsertSegmentMouseDragHandler","ScrollMouseDragHandler","playheadOffset","newFrameOffset","WaveformZoomView","initialZoomLevel","wheelEvent","large","endThreshold","isAutoScale$1","currentTime","apexTime","playheadOffsetPixels","prevScale","apexPixel","sourceWaveform","scrollAmount","forceUpdate","playheadPixel","resample","resampleOptions","SpectrogramZoomView","isAutoScale","zoomviewRange","scrollBoxPos","ViewController","ZoomController","zoomLevels","zoomLevelIndex","spectrogramZoomview","isXhr2","WaveformBuilder","hasValidContentRangeHeader","contentRange","firstPos","lastPos","dataUri","requestType","connector","createdWaveformData","webAudioOptions","mediaSourceUrl","webAudioBuilderOptions","webAudio","withCredentials","onAbort","Peaks","defaultViewOptions","defaultZoomviewOptions","defaultSpectrogramZoomviewOptions","defaultOverviewOptions","defaultSpectrogramOverviewOptions","defaultSegmentOptions","defaultScrollbarOptions","getOverviewOptions","overviewOptions","optNames","optName","getSpectrogramOverviewOptions","spectrogramOverviewOptions","getZoomviewOptions","zoomviewOptions","getSpectrogramZoomviewOptions","spectrogramZoomviewOptions","getScrollbarOptions","scrollbarOptions","extendOptions","addSegmentOptions","checkContainerElements","zoomviewContainer","spectrogramZoomviewContainer","overviewContainer","spectrogramOverviewContainer","scrollbarContainer","SPECTROGRAM_WIDTH","SPECTROGRAM_HEIGHT","zoomviewContainerRef","overviewContainerRef","audioRef","OFFSET","isPlaying","zoomLevel","doSeek","waveformEnabled","spectrogramEnabled","editorUuid","editor","onEnded","initializeSegments","onSetSource","zoomView","toggleWaveform","toggleSpectrogram","playing","seek","Category","Keyword","Author","Signal","selectedCategories","selectedKeywords","keywordsLoading","setData","categoriesOptions","keywordsOptions","onSave","onDelete","onCancel","showSignal","showDate","showKeywords","fmtDate","onViewClicked","onNewClicked","onEditClicked","onKeywordClicked","keyword","onSignalClicked","signal","onPageChanged","shareUrl","copyToClipboard","sortKey","sortOrder","toggleSort","sortIndicator","sortedAnnotations","aValue","bValue","newSort","newOrder","tableContainer","totalPages","paginatedAnnotations","newPage","newItems","oldItems","removeItem","downloadFile","fileUrl","fileName","validateIndex","showModal","indexChanged","dateDisplay","showAnnotations","showEditor","showStereometry","offsetSeconds","old","fetchAnnotations","initialize","audioValue","targetSignal","foundObject","matchingAudio","toggleAnnotations","onAnnotationViewClicked","onAnnotationEditClicked","onAnnotationNewClicked","onAnnotationKeywordClicked","onSaveAnnotation","onDeleteAnnotation","onCancelAnnotation","downloadAudio","togglePlayPause","zoom","onNextPreviousClick","recordingDate","darkMode","playerControlsIcon","isLoggedIn","file","question","objects","fetchData","Member","email","handleLogin","authors","selectedAuthors","authorOptions","selectedSignals","category","author","order","sort","onChangeCategory","onChangeAuthor","newQuery","changed","Tableau","Thumbnail","tableauRefs","showExtra","tableau","captionDisplay","startDate","offsetMinutes","dateStr","orientation","fetchThumbnail","showThumbnail","paths","downloadThumbnail","downloadTableau","tableauStyle","tabl","medium","small","startYear","currentYear","targetDate","diffInDays","yearSelected","YearView","LoginView","ProfileView","AnnotationView","MonthView","DayView","HourView","StereometryView","FaqView","AboutView","Error404NotFound","loggedIn","logo","snfLogo","activeRoute","_mutation","dark","onChangeTheme","logoStyle","themeOverridesDefault","themeOverridesDark","logout","userOptionsLoggedIn","userOptions","menuOptionsLeft","menuOptions","App"],"mappings":"m5BAOA,SAASA,GAAQC,EAAKC,EAAkB,CACpC,MAAMC,EAAM,OAAO,OAAO,IAAI,EACxBC,EAAOH,EAAI,MAAM,GAAG,EAC1B,QAASI,EAAI,EAAGA,EAAID,EAAK,OAAQC,IAC7BF,EAAIC,EAAKC,IAAM,GAEnB,OAAOH,EAAmBI,GAAO,CAAC,CAACH,EAAIG,EAAI,YAAa,GAAIA,GAAO,CAAC,CAACH,EAAIG,EAC7E,CA2FA,MAAMC,GAAsB,8EACtBC,GAAqCR,GAAQO,EAAmB,EAYtE,SAASE,GAAmBC,EAAO,CAC/B,MAAO,CAAC,CAACA,GAASA,IAAU,EAChC,CA+FA,SAASC,GAAeD,EAAO,CAC3B,GAAIE,GAAQF,CAAK,EAAG,CAChB,MAAMG,EAAM,CAAA,EACZ,QAASR,EAAI,EAAGA,EAAIK,EAAM,OAAQL,IAAK,CACnC,MAAMS,EAAOJ,EAAML,GACbU,EAAaC,GAASF,CAAI,EAC1BG,GAAiBH,CAAI,EACrBH,GAAeG,CAAI,EACzB,GAAIC,EACA,UAAWG,KAAOH,EACdF,EAAIK,GAAOH,EAAWG,EAGjC,CACD,OAAOL,CACV,KACI,IAAIG,GAASN,CAAK,EACnB,OAAOA,EAEN,GAAIS,GAAST,CAAK,EACnB,OAAOA,EAEf,CACA,MAAMU,GAAkB,gBAClBC,GAAsB,QAC5B,SAASJ,GAAiBK,EAAS,CAC/B,MAAMC,EAAM,CAAA,EACZ,OAAAD,EAAQ,MAAMF,EAAe,EAAE,QAAQN,GAAQ,CAC3C,GAAIA,EAAM,CACN,MAAMU,EAAMV,EAAK,MAAMO,EAAmB,EAC1CG,EAAI,OAAS,IAAMD,EAAIC,EAAI,GAA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,CACF,EACD,CAAE,QAAS,IAAM,aAAe,CACjC,EACH,IAAK,aACN,EACD,CACE,MAAO,IACLrtB,EACEqtB,GACA,CACE,GAAI,CACF,KAAM,KACP,CACF,EACD,CAAE,QAAS,IAAM,KAAO,CACzB,EACH,IAAK,KACN,CACH,mjDClTO3Q,GAAUsmM,EAAG,EAAE,IAAI52L,EAAM,EAAE,IAAIoH,EAAK,EAAE,MAAM,MAAM"}