@stonecrop/stonecrop 0.6.3 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"stonecrop.umd.cjs","sources":["../../common/temp/node_modules/.pnpm/pinia@3.0.4_typescript@5.9.3_vue@3.5.26_typescript@5.9.3_/node_modules/pinia/dist/pinia.mjs","../../common/temp/node_modules/.pnpm/@vueuse+shared@14.1.0_vue@3.5.26_typescript@5.9.3_/node_modules/@vueuse/shared/dist/index.js","../../common/temp/node_modules/.pnpm/@vueuse+core@14.1.0_vue@3.5.26_typescript@5.9.3_/node_modules/@vueuse/core/dist/index.js","../src/stores/operation-log.ts","../src/field-triggers.ts","../src/stores/hst.ts","../src/stonecrop.ts","../src/composable.ts","../src/composables/operation-log.ts","../src/doctype.ts","../src/registry.ts","../src/plugins/index.ts"],"sourcesContent":["/*!\n * pinia v3.0.4\n * (c) 2025 Eduardo San Martin Morote\n * @license MIT\n */\nimport { hasInjectionContext, inject, toRaw, watch, unref, markRaw, effectScope, ref, isRef, isReactive, getCurrentScope, onScopeDispose, getCurrentInstance, reactive, toRef, nextTick, computed, toRefs } from 'vue';\nimport { setupDevtoolsPlugin } from '@vue/devtools-api';\n\nconst IS_CLIENT = typeof window !== 'undefined';\n\n/**\n * setActivePinia must be called to handle SSR at the top of functions like\n * `fetch`, `setup`, `serverPrefetch` and others\n */\nlet activePinia;\n/**\n * Sets or unsets the active pinia. Used in SSR and internally when calling\n * actions and getters\n *\n * @param pinia - Pinia instance\n */\n// @ts-expect-error: cannot constrain the type of the return\nconst setActivePinia = (pinia) => (activePinia = pinia);\n/**\n * Get the currently active pinia if there is any.\n */\nconst getActivePinia = (process.env.NODE_ENV !== 'production')\n ? () => {\n const pinia = hasInjectionContext() && inject(piniaSymbol);\n if (!pinia && !IS_CLIENT) {\n console.error(`[🍍]: Pinia instance not found in context. This falls back to the global activePinia which exposes you to cross-request pollution on the server. Most of the time, it means you are calling \"useStore()\" in the wrong place.\\n` +\n `Read https://vuejs.org/guide/reusability/composables.html to learn more`);\n }\n return pinia || activePinia;\n }\n : () => (hasInjectionContext() && inject(piniaSymbol)) || activePinia;\nconst piniaSymbol = ((process.env.NODE_ENV !== 'production') ? Symbol('pinia') : /* istanbul ignore next */ Symbol());\n\nfunction isPlainObject(\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\no) {\n return (o &&\n typeof o === 'object' &&\n Object.prototype.toString.call(o) === '[object Object]' &&\n typeof o.toJSON !== 'function');\n}\n// type DeepReadonly<T> = { readonly [P in keyof T]: DeepReadonly<T[P]> }\n// TODO: can we change these to numbers?\n/**\n * Possible types for SubscriptionCallback\n */\nvar MutationType;\n(function (MutationType) {\n /**\n * Direct mutation of the state:\n *\n * - `store.name = 'new name'`\n * - `store.$state.name = 'new name'`\n * - `store.list.push('new item')`\n */\n MutationType[\"direct\"] = \"direct\";\n /**\n * Mutated the state with `$patch` and an object\n *\n * - `store.$patch({ name: 'newName' })`\n */\n MutationType[\"patchObject\"] = \"patch object\";\n /**\n * Mutated the state with `$patch` and a function\n *\n * - `store.$patch(state => state.name = 'newName')`\n */\n MutationType[\"patchFunction\"] = \"patch function\";\n // maybe reset? for $state = {} and $reset\n})(MutationType || (MutationType = {}));\n\n/*\n * FileSaver.js A saveAs() FileSaver implementation.\n *\n * Originally by Eli Grey, adapted as an ESM module by Eduardo San Martin\n * Morote.\n *\n * License : MIT\n */\n// The one and only way of getting global scope in all environments\n// https://stackoverflow.com/q/3277182/1008999\nconst _global = /*#__PURE__*/ (() => typeof window === 'object' && window.window === window\n ? window\n : typeof self === 'object' && self.self === self\n ? self\n : typeof global === 'object' && global.global === global\n ? global\n : typeof globalThis === 'object'\n ? globalThis\n : { HTMLElement: null })();\nfunction bom(blob, { autoBom = false } = {}) {\n // prepend BOM for UTF-8 XML and text/* types (including HTML)\n // note: your browser will automatically convert UTF-16 U+FEFF to EF BB BF\n if (autoBom &&\n /^\\s*(?:text\\/\\S*|application\\/xml|\\S*\\/\\S*\\+xml)\\s*;.*charset\\s*=\\s*utf-8/i.test(blob.type)) {\n return new Blob([String.fromCharCode(0xfeff), blob], { type: blob.type });\n }\n return blob;\n}\nfunction download(url, name, opts) {\n const xhr = new XMLHttpRequest();\n xhr.open('GET', url);\n xhr.responseType = 'blob';\n xhr.onload = function () {\n saveAs(xhr.response, name, opts);\n };\n xhr.onerror = function () {\n console.error('could not download file');\n };\n xhr.send();\n}\nfunction corsEnabled(url) {\n const xhr = new XMLHttpRequest();\n // use sync to avoid popup blocker\n xhr.open('HEAD', url, false);\n try {\n xhr.send();\n }\n catch (e) { }\n return xhr.status >= 200 && xhr.status <= 299;\n}\n// `a.click()` doesn't work for all browsers (#465)\nfunction click(node) {\n try {\n node.dispatchEvent(new MouseEvent('click'));\n }\n catch (e) {\n const evt = new MouseEvent('click', {\n bubbles: true,\n cancelable: true,\n view: window,\n detail: 0,\n screenX: 80,\n screenY: 20,\n clientX: 80,\n clientY: 20,\n ctrlKey: false,\n altKey: false,\n shiftKey: false,\n metaKey: false,\n button: 0,\n relatedTarget: null,\n });\n node.dispatchEvent(evt);\n }\n}\nconst _navigator = typeof navigator === 'object' ? navigator : { userAgent: '' };\n// Detect WebView inside a native macOS app by ruling out all browsers\n// We just need to check for 'Safari' because all other browsers (besides Firefox) include that too\n// https://www.whatismybrowser.com/guides/the-latest-user-agent/macos\nconst isMacOSWebView = /*#__PURE__*/ (() => /Macintosh/.test(_navigator.userAgent) &&\n /AppleWebKit/.test(_navigator.userAgent) &&\n !/Safari/.test(_navigator.userAgent))();\nconst saveAs = !IS_CLIENT\n ? () => { } // noop\n : // Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program\n typeof HTMLAnchorElement !== 'undefined' &&\n 'download' in HTMLAnchorElement.prototype &&\n !isMacOSWebView\n ? downloadSaveAs\n : // Use msSaveOrOpenBlob as a second approach\n 'msSaveOrOpenBlob' in _navigator\n ? msSaveAs\n : // Fallback to using FileReader and a popup\n fileSaverSaveAs;\nfunction downloadSaveAs(blob, name = 'download', opts) {\n const a = document.createElement('a');\n a.download = name;\n a.rel = 'noopener'; // tabnabbing\n // TODO: detect chrome extensions & packaged apps\n // a.target = '_blank'\n if (typeof blob === 'string') {\n // Support regular links\n a.href = blob;\n if (a.origin !== location.origin) {\n if (corsEnabled(a.href)) {\n download(blob, name, opts);\n }\n else {\n a.target = '_blank';\n click(a);\n }\n }\n else {\n click(a);\n }\n }\n else {\n // Support blobs\n a.href = URL.createObjectURL(blob);\n setTimeout(function () {\n URL.revokeObjectURL(a.href);\n }, 4e4); // 40s\n setTimeout(function () {\n click(a);\n }, 0);\n }\n}\nfunction msSaveAs(blob, name = 'download', opts) {\n if (typeof blob === 'string') {\n if (corsEnabled(blob)) {\n download(blob, name, opts);\n }\n else {\n const a = document.createElement('a');\n a.href = blob;\n a.target = '_blank';\n setTimeout(function () {\n click(a);\n });\n }\n }\n else {\n // @ts-ignore: works on windows\n navigator.msSaveOrOpenBlob(bom(blob, opts), name);\n }\n}\nfunction fileSaverSaveAs(blob, name, opts, popup) {\n // Open a popup immediately do go around popup blocker\n // Mostly only available on user interaction and the fileReader is async so...\n popup = popup || open('', '_blank');\n if (popup) {\n popup.document.title = popup.document.body.innerText = 'downloading...';\n }\n if (typeof blob === 'string')\n return download(blob, name, opts);\n const force = blob.type === 'application/octet-stream';\n const isSafari = /constructor/i.test(String(_global.HTMLElement)) || 'safari' in _global;\n const isChromeIOS = /CriOS\\/[\\d]+/.test(navigator.userAgent);\n if ((isChromeIOS || (force && isSafari) || isMacOSWebView) &&\n typeof FileReader !== 'undefined') {\n // Safari doesn't allow downloading of blob URLs\n const reader = new FileReader();\n reader.onloadend = function () {\n let url = reader.result;\n if (typeof url !== 'string') {\n popup = null;\n throw new Error('Wrong reader.result type');\n }\n url = isChromeIOS\n ? url\n : url.replace(/^data:[^;]*;/, 'data:attachment/file;');\n if (popup) {\n popup.location.href = url;\n }\n else {\n location.assign(url);\n }\n popup = null; // reverse-tabnabbing #460\n };\n reader.readAsDataURL(blob);\n }\n else {\n const url = URL.createObjectURL(blob);\n if (popup)\n popup.location.assign(url);\n else\n location.href = url;\n popup = null; // reverse-tabnabbing #460\n setTimeout(function () {\n URL.revokeObjectURL(url);\n }, 4e4); // 40s\n }\n}\n\n/**\n * Shows a toast or console.log\n *\n * @param message - message to log\n * @param type - different color of the tooltip\n */\nfunction toastMessage(message, type) {\n const piniaMessage = '🍍 ' + message;\n if (typeof __VUE_DEVTOOLS_TOAST__ === 'function') {\n // No longer available :(\n __VUE_DEVTOOLS_TOAST__(piniaMessage, type);\n }\n else if (type === 'error') {\n console.error(piniaMessage);\n }\n else if (type === 'warn') {\n console.warn(piniaMessage);\n }\n else {\n console.log(piniaMessage);\n }\n}\nfunction isPinia(o) {\n return '_a' in o && 'install' in o;\n}\n\n/**\n * This file contain devtools actions, they are not Pinia actions.\n */\n// ---\nfunction checkClipboardAccess() {\n if (!('clipboard' in navigator)) {\n toastMessage(`Your browser doesn't support the Clipboard API`, 'error');\n return true;\n }\n}\nfunction checkNotFocusedError(error) {\n if (error instanceof Error &&\n error.message.toLowerCase().includes('document is not focused')) {\n toastMessage('You need to activate the \"Emulate a focused page\" setting in the \"Rendering\" panel of devtools.', 'warn');\n return true;\n }\n return false;\n}\nasync function actionGlobalCopyState(pinia) {\n if (checkClipboardAccess())\n return;\n try {\n await navigator.clipboard.writeText(JSON.stringify(pinia.state.value));\n toastMessage('Global state copied to clipboard.');\n }\n catch (error) {\n if (checkNotFocusedError(error))\n return;\n toastMessage(`Failed to serialize the state. Check the console for more details.`, 'error');\n console.error(error);\n }\n}\nasync function actionGlobalPasteState(pinia) {\n if (checkClipboardAccess())\n return;\n try {\n loadStoresState(pinia, JSON.parse(await navigator.clipboard.readText()));\n toastMessage('Global state pasted from clipboard.');\n }\n catch (error) {\n if (checkNotFocusedError(error))\n return;\n toastMessage(`Failed to deserialize the state from clipboard. Check the console for more details.`, 'error');\n console.error(error);\n }\n}\nasync function actionGlobalSaveState(pinia) {\n try {\n saveAs(new Blob([JSON.stringify(pinia.state.value)], {\n type: 'text/plain;charset=utf-8',\n }), 'pinia-state.json');\n }\n catch (error) {\n toastMessage(`Failed to export the state as JSON. Check the console for more details.`, 'error');\n console.error(error);\n }\n}\nlet fileInput;\nfunction getFileOpener() {\n if (!fileInput) {\n fileInput = document.createElement('input');\n fileInput.type = 'file';\n fileInput.accept = '.json';\n }\n function openFile() {\n return new Promise((resolve, reject) => {\n fileInput.onchange = async () => {\n const files = fileInput.files;\n if (!files)\n return resolve(null);\n const file = files.item(0);\n if (!file)\n return resolve(null);\n return resolve({ text: await file.text(), file });\n };\n // @ts-ignore: TODO: changed from 4.3 to 4.4\n fileInput.oncancel = () => resolve(null);\n fileInput.onerror = reject;\n fileInput.click();\n });\n }\n return openFile;\n}\nasync function actionGlobalOpenStateFile(pinia) {\n try {\n const open = getFileOpener();\n const result = await open();\n if (!result)\n return;\n const { text, file } = result;\n loadStoresState(pinia, JSON.parse(text));\n toastMessage(`Global state imported from \"${file.name}\".`);\n }\n catch (error) {\n toastMessage(`Failed to import the state from JSON. Check the console for more details.`, 'error');\n console.error(error);\n }\n}\nfunction loadStoresState(pinia, state) {\n for (const key in state) {\n const storeState = pinia.state.value[key];\n // store is already instantiated, patch it\n if (storeState) {\n Object.assign(storeState, state[key]);\n }\n else {\n // store is not instantiated, set the initial state\n pinia.state.value[key] = state[key];\n }\n }\n}\n\nfunction formatDisplay(display) {\n return {\n _custom: {\n display,\n },\n };\n}\nconst PINIA_ROOT_LABEL = '🍍 Pinia (root)';\nconst PINIA_ROOT_ID = '_root';\nfunction formatStoreForInspectorTree(store) {\n return isPinia(store)\n ? {\n id: PINIA_ROOT_ID,\n label: PINIA_ROOT_LABEL,\n }\n : {\n id: store.$id,\n label: store.$id,\n };\n}\nfunction formatStoreForInspectorState(store) {\n if (isPinia(store)) {\n const storeNames = Array.from(store._s.keys());\n const storeMap = store._s;\n const state = {\n state: storeNames.map((storeId) => ({\n editable: true,\n key: storeId,\n value: store.state.value[storeId],\n })),\n getters: storeNames\n .filter((id) => storeMap.get(id)._getters)\n .map((id) => {\n const store = storeMap.get(id);\n return {\n editable: false,\n key: id,\n value: store._getters.reduce((getters, key) => {\n getters[key] = store[key];\n return getters;\n }, {}),\n };\n }),\n };\n return state;\n }\n const state = {\n state: Object.keys(store.$state).map((key) => ({\n editable: true,\n key,\n value: store.$state[key],\n })),\n };\n // avoid adding empty getters\n if (store._getters && store._getters.length) {\n state.getters = store._getters.map((getterName) => ({\n editable: false,\n key: getterName,\n value: store[getterName],\n }));\n }\n if (store._customProperties.size) {\n state.customProperties = Array.from(store._customProperties).map((key) => ({\n editable: true,\n key,\n value: store[key],\n }));\n }\n return state;\n}\nfunction formatEventData(events) {\n if (!events)\n return {};\n if (Array.isArray(events)) {\n // TODO: handle add and delete for arrays and objects\n return events.reduce((data, event) => {\n data.keys.push(event.key);\n data.operations.push(event.type);\n data.oldValue[event.key] = event.oldValue;\n data.newValue[event.key] = event.newValue;\n return data;\n }, {\n oldValue: {},\n keys: [],\n operations: [],\n newValue: {},\n });\n }\n else {\n return {\n operation: formatDisplay(events.type),\n key: formatDisplay(events.key),\n oldValue: events.oldValue,\n newValue: events.newValue,\n };\n }\n}\nfunction formatMutationType(type) {\n switch (type) {\n case MutationType.direct:\n return 'mutation';\n case MutationType.patchFunction:\n return '$patch';\n case MutationType.patchObject:\n return '$patch';\n default:\n return 'unknown';\n }\n}\n\n// timeline can be paused when directly changing the state\nlet isTimelineActive = true;\nconst componentStateTypes = [];\nconst MUTATIONS_LAYER_ID = 'pinia:mutations';\nconst INSPECTOR_ID = 'pinia';\nconst { assign: assign$1 } = Object;\n/**\n * Gets the displayed name of a store in devtools\n *\n * @param id - id of the store\n * @returns a formatted string\n */\nconst getStoreType = (id) => '🍍 ' + id;\n/**\n * Add the pinia plugin without any store. Allows displaying a Pinia plugin tab\n * as soon as it is added to the application.\n *\n * @param app - Vue application\n * @param pinia - pinia instance\n */\nfunction registerPiniaDevtools(app, pinia) {\n setupDevtoolsPlugin({\n id: 'dev.esm.pinia',\n label: 'Pinia 🍍',\n logo: 'https://pinia.vuejs.org/logo.svg',\n packageName: 'pinia',\n homepage: 'https://pinia.vuejs.org',\n componentStateTypes,\n app,\n }, (api) => {\n if (typeof api.now !== 'function') {\n toastMessage('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.');\n }\n api.addTimelineLayer({\n id: MUTATIONS_LAYER_ID,\n label: `Pinia 🍍`,\n color: 0xe5df88,\n });\n api.addInspector({\n id: INSPECTOR_ID,\n label: 'Pinia 🍍',\n icon: 'storage',\n treeFilterPlaceholder: 'Search stores',\n actions: [\n {\n icon: 'content_copy',\n action: () => {\n actionGlobalCopyState(pinia);\n },\n tooltip: 'Serialize and copy the state',\n },\n {\n icon: 'content_paste',\n action: async () => {\n await actionGlobalPasteState(pinia);\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n },\n tooltip: 'Replace the state with the content of your clipboard',\n },\n {\n icon: 'save',\n action: () => {\n actionGlobalSaveState(pinia);\n },\n tooltip: 'Save the state as a JSON file',\n },\n {\n icon: 'folder_open',\n action: async () => {\n await actionGlobalOpenStateFile(pinia);\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n },\n tooltip: 'Import the state from a JSON file',\n },\n ],\n nodeActions: [\n {\n icon: 'restore',\n tooltip: 'Reset the state (with \"$reset\")',\n action: (nodeId) => {\n const store = pinia._s.get(nodeId);\n if (!store) {\n toastMessage(`Cannot reset \"${nodeId}\" store because it wasn't found.`, 'warn');\n }\n else if (typeof store.$reset !== 'function') {\n toastMessage(`Cannot reset \"${nodeId}\" store because it doesn't have a \"$reset\" method implemented.`, 'warn');\n }\n else {\n store.$reset();\n toastMessage(`Store \"${nodeId}\" reset.`);\n }\n },\n },\n ],\n });\n api.on.inspectComponent((payload) => {\n const proxy = (payload.componentInstance &&\n payload.componentInstance.proxy);\n if (proxy && proxy._pStores) {\n const piniaStores = payload.componentInstance.proxy._pStores;\n Object.values(piniaStores).forEach((store) => {\n payload.instanceData.state.push({\n type: getStoreType(store.$id),\n key: 'state',\n editable: true,\n value: store._isOptionsAPI\n ? {\n _custom: {\n value: toRaw(store.$state),\n actions: [\n {\n icon: 'restore',\n tooltip: 'Reset the state of this store',\n action: () => store.$reset(),\n },\n ],\n },\n }\n : // NOTE: workaround to unwrap transferred refs\n Object.keys(store.$state).reduce((state, key) => {\n state[key] = store.$state[key];\n return state;\n }, {}),\n });\n if (store._getters && store._getters.length) {\n payload.instanceData.state.push({\n type: getStoreType(store.$id),\n key: 'getters',\n editable: false,\n value: store._getters.reduce((getters, key) => {\n try {\n getters[key] = store[key];\n }\n catch (error) {\n // @ts-expect-error: we just want to show it in devtools\n getters[key] = error;\n }\n return getters;\n }, {}),\n });\n }\n });\n }\n });\n api.on.getInspectorTree((payload) => {\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n let stores = [pinia];\n stores = stores.concat(Array.from(pinia._s.values()));\n payload.rootNodes = (payload.filter\n ? stores.filter((store) => '$id' in store\n ? store.$id\n .toLowerCase()\n .includes(payload.filter.toLowerCase())\n : PINIA_ROOT_LABEL.toLowerCase().includes(payload.filter.toLowerCase()))\n : stores).map(formatStoreForInspectorTree);\n }\n });\n // Expose pinia instance as $pinia to window\n globalThis.$pinia = pinia;\n api.on.getInspectorState((payload) => {\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n const inspectedStore = payload.nodeId === PINIA_ROOT_ID\n ? pinia\n : pinia._s.get(payload.nodeId);\n if (!inspectedStore) {\n // this could be the selected store restored for a different project\n // so it's better not to say anything here\n return;\n }\n if (inspectedStore) {\n // Expose selected store as $store to window\n if (payload.nodeId !== PINIA_ROOT_ID)\n globalThis.$store = toRaw(inspectedStore);\n payload.state = formatStoreForInspectorState(inspectedStore);\n }\n }\n });\n api.on.editInspectorState((payload) => {\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n const inspectedStore = payload.nodeId === PINIA_ROOT_ID\n ? pinia\n : pinia._s.get(payload.nodeId);\n if (!inspectedStore) {\n return toastMessage(`store \"${payload.nodeId}\" not found`, 'error');\n }\n const { path } = payload;\n if (!isPinia(inspectedStore)) {\n // access only the state\n if (path.length !== 1 ||\n !inspectedStore._customProperties.has(path[0]) ||\n path[0] in inspectedStore.$state) {\n path.unshift('$state');\n }\n }\n else {\n // Root access, we can omit the `.value` because the devtools API does it for us\n path.unshift('state');\n }\n isTimelineActive = false;\n payload.set(inspectedStore, path, payload.state.value);\n isTimelineActive = true;\n }\n });\n api.on.editComponentState((payload) => {\n if (payload.type.startsWith('🍍')) {\n const storeId = payload.type.replace(/^🍍\\s*/, '');\n const store = pinia._s.get(storeId);\n if (!store) {\n return toastMessage(`store \"${storeId}\" not found`, 'error');\n }\n const { path } = payload;\n if (path[0] !== 'state') {\n return toastMessage(`Invalid path for store \"${storeId}\":\\n${path}\\nOnly state can be modified.`);\n }\n // rewrite the first entry to be able to directly set the state as\n // well as any other path\n path[0] = '$state';\n isTimelineActive = false;\n payload.set(store, path, payload.state.value);\n isTimelineActive = true;\n }\n });\n });\n}\nfunction addStoreToDevtools(app, store) {\n if (!componentStateTypes.includes(getStoreType(store.$id))) {\n componentStateTypes.push(getStoreType(store.$id));\n }\n setupDevtoolsPlugin({\n id: 'dev.esm.pinia',\n label: 'Pinia 🍍',\n logo: 'https://pinia.vuejs.org/logo.svg',\n packageName: 'pinia',\n homepage: 'https://pinia.vuejs.org',\n componentStateTypes,\n app,\n settings: {\n logStoreChanges: {\n label: 'Notify about new/deleted stores',\n type: 'boolean',\n defaultValue: true,\n },\n // useEmojis: {\n // label: 'Use emojis in messages ⚡️',\n // type: 'boolean',\n // defaultValue: true,\n // },\n },\n }, (api) => {\n // gracefully handle errors\n const now = typeof api.now === 'function' ? api.now.bind(api) : Date.now;\n store.$onAction(({ after, onError, name, args }) => {\n const groupId = runningActionId++;\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now(),\n title: '🛫 ' + name,\n subtitle: 'start',\n data: {\n store: formatDisplay(store.$id),\n action: formatDisplay(name),\n args,\n },\n groupId,\n },\n });\n after((result) => {\n activeAction = undefined;\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now(),\n title: '🛬 ' + name,\n subtitle: 'end',\n data: {\n store: formatDisplay(store.$id),\n action: formatDisplay(name),\n args,\n result,\n },\n groupId,\n },\n });\n });\n onError((error) => {\n activeAction = undefined;\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now(),\n logType: 'error',\n title: '💥 ' + name,\n subtitle: 'end',\n data: {\n store: formatDisplay(store.$id),\n action: formatDisplay(name),\n args,\n error,\n },\n groupId,\n },\n });\n });\n }, true);\n store._customProperties.forEach((name) => {\n watch(() => unref(store[name]), (newValue, oldValue) => {\n api.notifyComponentUpdate();\n api.sendInspectorState(INSPECTOR_ID);\n if (isTimelineActive) {\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now(),\n title: 'Change',\n subtitle: name,\n data: {\n newValue,\n oldValue,\n },\n groupId: activeAction,\n },\n });\n }\n }, { deep: true });\n });\n store.$subscribe(({ events, type }, state) => {\n api.notifyComponentUpdate();\n api.sendInspectorState(INSPECTOR_ID);\n if (!isTimelineActive)\n return;\n // rootStore.state[store.id] = state\n const eventData = {\n time: now(),\n title: formatMutationType(type),\n data: assign$1({ store: formatDisplay(store.$id) }, formatEventData(events)),\n groupId: activeAction,\n };\n if (type === MutationType.patchFunction) {\n eventData.subtitle = '⤵️';\n }\n else if (type === MutationType.patchObject) {\n eventData.subtitle = '🧩';\n }\n else if (events && !Array.isArray(events)) {\n eventData.subtitle = events.type;\n }\n if (events) {\n eventData.data['rawEvent(s)'] = {\n _custom: {\n display: 'DebuggerEvent',\n type: 'object',\n tooltip: 'raw DebuggerEvent[]',\n value: events,\n },\n };\n }\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: eventData,\n });\n }, { detached: true, flush: 'sync' });\n const hotUpdate = store._hotUpdate;\n store._hotUpdate = markRaw((newStore) => {\n hotUpdate(newStore);\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now(),\n title: '🔥 ' + store.$id,\n subtitle: 'HMR update',\n data: {\n store: formatDisplay(store.$id),\n info: formatDisplay(`HMR update`),\n },\n },\n });\n // update the devtools too\n api.notifyComponentUpdate();\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n });\n const { $dispose } = store;\n store.$dispose = () => {\n $dispose();\n api.notifyComponentUpdate();\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n api.getSettings().logStoreChanges &&\n toastMessage(`Disposed \"${store.$id}\" store 🗑`);\n };\n // trigger an update so it can display new registered stores\n api.notifyComponentUpdate();\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n api.getSettings().logStoreChanges &&\n toastMessage(`\"${store.$id}\" store installed 🆕`);\n });\n}\nlet runningActionId = 0;\nlet activeAction;\n/**\n * Patches a store to enable action grouping in devtools by wrapping the store with a Proxy that is passed as the\n * context of all actions, allowing us to set `runningAction` on each access and effectively associating any state\n * mutation to the action.\n *\n * @param store - store to patch\n * @param actionNames - list of actionst to patch\n */\nfunction patchActionForGrouping(store, actionNames, wrapWithProxy) {\n // original actions of the store as they are given by pinia. We are going to override them\n const actions = actionNames.reduce((storeActions, actionName) => {\n // use toRaw to avoid tracking #541\n storeActions[actionName] = toRaw(store)[actionName];\n return storeActions;\n }, {});\n for (const actionName in actions) {\n store[actionName] = function () {\n // the running action id is incremented in a before action hook\n const _actionId = runningActionId;\n const trackedStore = wrapWithProxy\n ? new Proxy(store, {\n get(...args) {\n activeAction = _actionId;\n return Reflect.get(...args);\n },\n set(...args) {\n activeAction = _actionId;\n return Reflect.set(...args);\n },\n })\n : store;\n // For Setup Stores we need https://github.com/tc39/proposal-async-context\n activeAction = _actionId;\n const retValue = actions[actionName].apply(trackedStore, arguments);\n // this is safer as async actions in Setup Stores would associate mutations done outside of the action\n activeAction = undefined;\n return retValue;\n };\n }\n}\n/**\n * pinia.use(devtoolsPlugin)\n */\nfunction devtoolsPlugin({ app, store, options }) {\n // HMR module\n if (store.$id.startsWith('__hot:')) {\n return;\n }\n // detect option api vs setup api\n store._isOptionsAPI = !!options.state;\n // Do not overwrite actions mocked by @pinia/testing (#2298)\n if (!store._p._testing) {\n patchActionForGrouping(store, Object.keys(options.actions), store._isOptionsAPI);\n // Upgrade the HMR to also update the new actions\n const originalHotUpdate = store._hotUpdate;\n toRaw(store)._hotUpdate = function (newStore) {\n originalHotUpdate.apply(this, arguments);\n patchActionForGrouping(store, Object.keys(newStore._hmrPayload.actions), !!store._isOptionsAPI);\n };\n }\n addStoreToDevtools(app, \n // FIXME: is there a way to allow the assignment from Store<Id, S, G, A> to StoreGeneric?\n store);\n}\n\n/**\n * Creates a Pinia instance to be used by the application\n */\nfunction createPinia() {\n const scope = effectScope(true);\n // NOTE: here we could check the window object for a state and directly set it\n // if there is anything like it with Vue 3 SSR\n const state = scope.run(() => ref({}));\n let _p = [];\n // plugins added before calling app.use(pinia)\n let toBeInstalled = [];\n const pinia = markRaw({\n install(app) {\n // this allows calling useStore() outside of a component setup after\n // installing pinia's plugin\n setActivePinia(pinia);\n pinia._a = app;\n app.provide(piniaSymbol, pinia);\n app.config.globalProperties.$pinia = pinia;\n /* istanbul ignore else */\n if ((((process.env.NODE_ENV !== 'production') || (typeof __VUE_PROD_DEVTOOLS__ !== 'undefined' && __VUE_PROD_DEVTOOLS__)) && !(process.env.NODE_ENV === 'test')) && IS_CLIENT) {\n registerPiniaDevtools(app, pinia);\n }\n toBeInstalled.forEach((plugin) => _p.push(plugin));\n toBeInstalled = [];\n },\n use(plugin) {\n if (!this._a) {\n toBeInstalled.push(plugin);\n }\n else {\n _p.push(plugin);\n }\n return this;\n },\n _p,\n // it's actually undefined here\n // @ts-expect-error\n _a: null,\n _e: scope,\n _s: new Map(),\n state,\n });\n // pinia devtools rely on dev only features so they cannot be forced unless\n // the dev build of Vue is used. Avoid old browsers like IE11.\n if ((((process.env.NODE_ENV !== 'production') || (typeof __VUE_PROD_DEVTOOLS__ !== 'undefined' && __VUE_PROD_DEVTOOLS__)) && !(process.env.NODE_ENV === 'test')) && IS_CLIENT && typeof Proxy !== 'undefined') {\n pinia.use(devtoolsPlugin);\n }\n return pinia;\n}\n/**\n * Dispose a Pinia instance by stopping its effectScope and removing the state, plugins and stores. This is mostly\n * useful in tests, with both a testing pinia or a regular pinia and in applications that use multiple pinia instances.\n * Once disposed, the pinia instance cannot be used anymore.\n *\n * @param pinia - pinia instance\n */\nfunction disposePinia(pinia) {\n pinia._e.stop();\n pinia._s.clear();\n pinia._p.splice(0);\n pinia.state.value = {};\n // @ts-expect-error: non valid\n pinia._a = null;\n}\n\n/**\n * Checks if a function is a `StoreDefinition`.\n *\n * @param fn - object to test\n * @returns true if `fn` is a StoreDefinition\n */\nconst isUseStore = (fn) => {\n return typeof fn === 'function' && typeof fn.$id === 'string';\n};\n/**\n * Mutates in place `newState` with `oldState` to _hot update_ it. It will\n * remove any key not existing in `newState` and recursively merge plain\n * objects.\n *\n * @param newState - new state object to be patched\n * @param oldState - old state that should be used to patch newState\n * @returns - newState\n */\nfunction patchObject(newState, oldState) {\n // no need to go through symbols because they cannot be serialized anyway\n for (const key in oldState) {\n const subPatch = oldState[key];\n // skip the whole sub tree\n if (!(key in newState)) {\n continue;\n }\n const targetValue = newState[key];\n if (isPlainObject(targetValue) &&\n isPlainObject(subPatch) &&\n !isRef(subPatch) &&\n !isReactive(subPatch)) {\n newState[key] = patchObject(targetValue, subPatch);\n }\n else {\n // objects are either a bit more complex (e.g. refs) or primitives, so we\n // just set the whole thing\n newState[key] = subPatch;\n }\n }\n return newState;\n}\n/**\n * Creates an _accept_ function to pass to `import.meta.hot` in Vite applications.\n *\n * @example\n * ```js\n * const useUser = defineStore(...)\n * if (import.meta.hot) {\n * import.meta.hot.accept(acceptHMRUpdate(useUser, import.meta.hot))\n * }\n * ```\n *\n * @param initialUseStore - return of the defineStore to hot update\n * @param hot - `import.meta.hot`\n */\nfunction acceptHMRUpdate(initialUseStore, hot) {\n // strip as much as possible from iife.prod\n if (!(process.env.NODE_ENV !== 'production')) {\n return () => { };\n }\n return (newModule) => {\n const pinia = hot.data.pinia || initialUseStore._pinia;\n if (!pinia) {\n // this store is still not used\n return;\n }\n // preserve the pinia instance across loads\n hot.data.pinia = pinia;\n // console.log('got data', newStore)\n for (const exportName in newModule) {\n const useStore = newModule[exportName];\n // console.log('checking for', exportName)\n if (isUseStore(useStore) && pinia._s.has(useStore.$id)) {\n // console.log('Accepting update for', useStore.$id)\n const id = useStore.$id;\n if (id !== initialUseStore.$id) {\n console.warn(`The id of the store changed from \"${initialUseStore.$id}\" to \"${id}\". Reloading.`);\n // return import.meta.hot.invalidate()\n return hot.invalidate();\n }\n const existingStore = pinia._s.get(id);\n if (!existingStore) {\n console.log(`[Pinia]: skipping hmr because store doesn't exist yet`);\n return;\n }\n useStore(pinia, existingStore);\n }\n }\n };\n}\n\nconst noop = () => { };\nfunction addSubscription(subscriptions, callback, detached, onCleanup = noop) {\n subscriptions.add(callback);\n const removeSubscription = () => {\n const isDel = subscriptions.delete(callback);\n isDel && onCleanup();\n };\n if (!detached && getCurrentScope()) {\n onScopeDispose(removeSubscription);\n }\n return removeSubscription;\n}\nfunction triggerSubscriptions(subscriptions, ...args) {\n subscriptions.forEach((callback) => {\n callback(...args);\n });\n}\n\nconst fallbackRunWithContext = (fn) => fn();\n/**\n * Marks a function as an action for `$onAction`\n * @internal\n */\nconst ACTION_MARKER = Symbol();\n/**\n * Action name symbol. Allows to add a name to an action after defining it\n * @internal\n */\nconst ACTION_NAME = Symbol();\nfunction mergeReactiveObjects(target, patchToApply) {\n // Handle Map instances\n if (target instanceof Map && patchToApply instanceof Map) {\n patchToApply.forEach((value, key) => target.set(key, value));\n }\n else if (target instanceof Set && patchToApply instanceof Set) {\n // Handle Set instances\n patchToApply.forEach(target.add, target);\n }\n // no need to go through symbols because they cannot be serialized anyway\n for (const key in patchToApply) {\n if (!patchToApply.hasOwnProperty(key))\n continue;\n const subPatch = patchToApply[key];\n const targetValue = target[key];\n if (isPlainObject(targetValue) &&\n isPlainObject(subPatch) &&\n target.hasOwnProperty(key) &&\n !isRef(subPatch) &&\n !isReactive(subPatch)) {\n // NOTE: here I wanted to warn about inconsistent types but it's not possible because in setup stores one might\n // start the value of a property as a certain type e.g. a Map, and then for some reason, during SSR, change that\n // to `undefined`. When trying to hydrate, we want to override the Map with `undefined`.\n target[key] = mergeReactiveObjects(targetValue, subPatch);\n }\n else {\n // @ts-expect-error: subPatch is a valid value\n target[key] = subPatch;\n }\n }\n return target;\n}\nconst skipHydrateSymbol = (process.env.NODE_ENV !== 'production')\n ? Symbol('pinia:skipHydration')\n : /* istanbul ignore next */ Symbol();\n/**\n * Tells Pinia to skip the hydration process of a given object. This is useful in setup stores (only) when you return a\n * stateful object in the store but it isn't really state. e.g. returning a router instance in a setup store.\n *\n * @param obj - target object\n * @returns obj\n */\nfunction skipHydrate(obj) {\n return Object.defineProperty(obj, skipHydrateSymbol, {});\n}\n/**\n * Returns whether a value should be hydrated\n *\n * @param obj - target variable\n * @returns true if `obj` should be hydrated\n */\nfunction shouldHydrate(obj) {\n return (!isPlainObject(obj) ||\n !Object.prototype.hasOwnProperty.call(obj, skipHydrateSymbol));\n}\nconst { assign } = Object;\nfunction isComputed(o) {\n return !!(isRef(o) && o.effect);\n}\nfunction createOptionsStore(id, options, pinia, hot) {\n const { state, actions, getters } = options;\n const initialState = pinia.state.value[id];\n let store;\n function setup() {\n if (!initialState && (!(process.env.NODE_ENV !== 'production') || !hot)) {\n /* istanbul ignore if */\n pinia.state.value[id] = state ? state() : {};\n }\n // avoid creating a state in pinia.state.value\n const localState = (process.env.NODE_ENV !== 'production') && hot\n ? // use ref() to unwrap refs inside state TODO: check if this is still necessary\n toRefs(ref(state ? state() : {}).value)\n : toRefs(pinia.state.value[id]);\n return assign(localState, actions, Object.keys(getters || {}).reduce((computedGetters, name) => {\n if ((process.env.NODE_ENV !== 'production') && name in localState) {\n console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with \"${name}\" in store \"${id}\".`);\n }\n computedGetters[name] = markRaw(computed(() => {\n setActivePinia(pinia);\n // it was created just before\n const store = pinia._s.get(id);\n // allow cross using stores\n // @ts-expect-error\n // return getters![name].call(context, context)\n // TODO: avoid reading the getter while assigning with a global variable\n return getters[name].call(store, store);\n }));\n return computedGetters;\n }, {}));\n }\n store = createSetupStore(id, setup, options, pinia, hot, true);\n return store;\n}\nfunction createSetupStore($id, setup, options = {}, pinia, hot, isOptionsStore) {\n let scope;\n const optionsForPlugin = assign({ actions: {} }, options);\n /* istanbul ignore if */\n if ((process.env.NODE_ENV !== 'production') && !pinia._e.active) {\n throw new Error('Pinia destroyed');\n }\n // watcher options for $subscribe\n const $subscribeOptions = { deep: true };\n /* istanbul ignore else */\n if ((process.env.NODE_ENV !== 'production')) {\n $subscribeOptions.onTrigger = (event) => {\n /* istanbul ignore else */\n if (isListening) {\n debuggerEvents = event;\n // avoid triggering this while the store is being built and the state is being set in pinia\n }\n else if (isListening == false && !store._hotUpdating) {\n // let patch send all the events together later\n /* istanbul ignore else */\n if (Array.isArray(debuggerEvents)) {\n debuggerEvents.push(event);\n }\n else {\n console.error('🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug.');\n }\n }\n };\n }\n // internal state\n let isListening; // set to true at the end\n let isSyncListening; // set to true at the end\n let subscriptions = new Set();\n let actionSubscriptions = new Set();\n let debuggerEvents;\n const initialState = pinia.state.value[$id];\n // avoid setting the state for option stores if it is set\n // by the setup\n if (!isOptionsStore && !initialState && (!(process.env.NODE_ENV !== 'production') || !hot)) {\n /* istanbul ignore if */\n pinia.state.value[$id] = {};\n }\n const hotState = ref({});\n // avoid triggering too many listeners\n // https://github.com/vuejs/pinia/issues/1129\n let activeListener;\n function $patch(partialStateOrMutator) {\n let subscriptionMutation;\n isListening = isSyncListening = false;\n // reset the debugger events since patches are sync\n /* istanbul ignore else */\n if ((process.env.NODE_ENV !== 'production')) {\n debuggerEvents = [];\n }\n if (typeof partialStateOrMutator === 'function') {\n partialStateOrMutator(pinia.state.value[$id]);\n subscriptionMutation = {\n type: MutationType.patchFunction,\n storeId: $id,\n events: debuggerEvents,\n };\n }\n else {\n mergeReactiveObjects(pinia.state.value[$id], partialStateOrMutator);\n subscriptionMutation = {\n type: MutationType.patchObject,\n payload: partialStateOrMutator,\n storeId: $id,\n events: debuggerEvents,\n };\n }\n const myListenerId = (activeListener = Symbol());\n nextTick().then(() => {\n if (activeListener === myListenerId) {\n isListening = true;\n }\n });\n isSyncListening = true;\n // because we paused the watcher, we need to manually call the subscriptions\n triggerSubscriptions(subscriptions, subscriptionMutation, pinia.state.value[$id]);\n }\n const $reset = isOptionsStore\n ? function $reset() {\n const { state } = options;\n const newState = state ? state() : {};\n // we use a patch to group all changes into one single subscription\n this.$patch(($state) => {\n // @ts-expect-error: FIXME: shouldn't error?\n assign($state, newState);\n });\n }\n : /* istanbul ignore next */\n (process.env.NODE_ENV !== 'production')\n ? () => {\n throw new Error(`🍍: Store \"${$id}\" is built using the setup syntax and does not implement $reset().`);\n }\n : noop;\n function $dispose() {\n scope.stop();\n subscriptions.clear();\n actionSubscriptions.clear();\n pinia._s.delete($id);\n }\n /**\n * Helper that wraps function so it can be tracked with $onAction\n * @param fn - action to wrap\n * @param name - name of the action\n */\n const action = (fn, name = '') => {\n if (ACTION_MARKER in fn) {\n fn[ACTION_NAME] = name;\n return fn;\n }\n const wrappedAction = function () {\n setActivePinia(pinia);\n const args = Array.from(arguments);\n const afterCallbackSet = new Set();\n const onErrorCallbackSet = new Set();\n function after(callback) {\n afterCallbackSet.add(callback);\n }\n function onError(callback) {\n onErrorCallbackSet.add(callback);\n }\n // @ts-expect-error\n triggerSubscriptions(actionSubscriptions, {\n args,\n name: wrappedAction[ACTION_NAME],\n store,\n after,\n onError,\n });\n let ret;\n try {\n ret = fn.apply(this && this.$id === $id ? this : store, args);\n // handle sync errors\n }\n catch (error) {\n triggerSubscriptions(onErrorCallbackSet, error);\n throw error;\n }\n if (ret instanceof Promise) {\n return ret\n .then((value) => {\n triggerSubscriptions(afterCallbackSet, value);\n return value;\n })\n .catch((error) => {\n triggerSubscriptions(onErrorCallbackSet, error);\n return Promise.reject(error);\n });\n }\n // trigger after callbacks\n triggerSubscriptions(afterCallbackSet, ret);\n return ret;\n };\n wrappedAction[ACTION_MARKER] = true;\n wrappedAction[ACTION_NAME] = name; // will be set later\n // @ts-expect-error: we are intentionally limiting the returned type to just Fn\n // because all the added properties are internals that are exposed through `$onAction()` only\n return wrappedAction;\n };\n const _hmrPayload = /*#__PURE__*/ markRaw({\n actions: {},\n getters: {},\n state: [],\n hotState,\n });\n const partialStore = {\n _p: pinia,\n // _s: scope,\n $id,\n $onAction: addSubscription.bind(null, actionSubscriptions),\n $patch,\n $reset,\n $subscribe(callback, options = {}) {\n const removeSubscription = addSubscription(subscriptions, callback, options.detached, () => stopWatcher());\n const stopWatcher = scope.run(() => watch(() => pinia.state.value[$id], (state) => {\n if (options.flush === 'sync' ? isSyncListening : isListening) {\n callback({\n storeId: $id,\n type: MutationType.direct,\n events: debuggerEvents,\n }, state);\n }\n }, assign({}, $subscribeOptions, options)));\n return removeSubscription;\n },\n $dispose,\n };\n const store = reactive((process.env.NODE_ENV !== 'production') || ((((process.env.NODE_ENV !== 'production') || (typeof __VUE_PROD_DEVTOOLS__ !== 'undefined' && __VUE_PROD_DEVTOOLS__)) && !(process.env.NODE_ENV === 'test')) && IS_CLIENT)\n ? assign({\n _hmrPayload,\n _customProperties: markRaw(new Set()), // devtools custom properties\n }, partialStore\n // must be added later\n // setupStore\n )\n : partialStore);\n // store the partial store now so the setup of stores can instantiate each other before they are finished without\n // creating infinite loops.\n pinia._s.set($id, store);\n const runWithContext = (pinia._a && pinia._a.runWithContext) || fallbackRunWithContext;\n // TODO: idea create skipSerialize that marks properties as non serializable and they are skipped\n const setupStore = runWithContext(() => pinia._e.run(() => (scope = effectScope()).run(() => setup({ action }))));\n // overwrite existing actions to support $onAction\n for (const key in setupStore) {\n const prop = setupStore[key];\n if ((isRef(prop) && !isComputed(prop)) || isReactive(prop)) {\n // mark it as a piece of state to be serialized\n if ((process.env.NODE_ENV !== 'production') && hot) {\n hotState.value[key] = toRef(setupStore, key);\n // createOptionStore directly sets the state in pinia.state.value so we\n // can just skip that\n }\n else if (!isOptionsStore) {\n // in setup stores we must hydrate the state and sync pinia state tree with the refs the user just created\n if (initialState && shouldHydrate(prop)) {\n if (isRef(prop)) {\n prop.value = initialState[key];\n }\n else {\n // probably a reactive object, lets recursively assign\n // @ts-expect-error: prop is unknown\n mergeReactiveObjects(prop, initialState[key]);\n }\n }\n // transfer the ref to the pinia state to keep everything in sync\n pinia.state.value[$id][key] = prop;\n }\n /* istanbul ignore else */\n if ((process.env.NODE_ENV !== 'production')) {\n _hmrPayload.state.push(key);\n }\n // action\n }\n else if (typeof prop === 'function') {\n const actionValue = (process.env.NODE_ENV !== 'production') && hot ? prop : action(prop, key);\n // this a hot module replacement store because the hotUpdate method needs\n // to do it with the right context\n // @ts-expect-error\n setupStore[key] = actionValue;\n /* istanbul ignore else */\n if ((process.env.NODE_ENV !== 'production')) {\n _hmrPayload.actions[key] = prop;\n }\n // list actions so they can be used in plugins\n // @ts-expect-error\n optionsForPlugin.actions[key] = prop;\n }\n else if ((process.env.NODE_ENV !== 'production')) {\n // add getters for devtools\n if (isComputed(prop)) {\n _hmrPayload.getters[key] = isOptionsStore\n ? // @ts-expect-error\n options.getters[key]\n : prop;\n if (IS_CLIENT) {\n const getters = setupStore._getters ||\n // @ts-expect-error: same\n (setupStore._getters = markRaw([]));\n getters.push(key);\n }\n }\n }\n }\n // add the state, getters, and action properties\n /* istanbul ignore if */\n assign(store, setupStore);\n // allows retrieving reactive objects with `storeToRefs()`. Must be called after assigning to the reactive object.\n // Make `storeToRefs()` work with `reactive()` #799\n assign(toRaw(store), setupStore);\n // use this instead of a computed with setter to be able to create it anywhere\n // without linking the computed lifespan to wherever the store is first\n // created.\n Object.defineProperty(store, '$state', {\n get: () => ((process.env.NODE_ENV !== 'production') && hot ? hotState.value : pinia.state.value[$id]),\n set: (state) => {\n /* istanbul ignore if */\n if ((process.env.NODE_ENV !== 'production') && hot) {\n throw new Error('cannot set hotState');\n }\n $patch(($state) => {\n // @ts-expect-error: FIXME: shouldn't error?\n assign($state, state);\n });\n },\n });\n // add the hotUpdate before plugins to allow them to override it\n /* istanbul ignore else */\n if ((process.env.NODE_ENV !== 'production')) {\n store._hotUpdate = markRaw((newStore) => {\n store._hotUpdating = true;\n newStore._hmrPayload.state.forEach((stateKey) => {\n if (stateKey in store.$state) {\n const newStateTarget = newStore.$state[stateKey];\n const oldStateSource = store.$state[stateKey];\n if (typeof newStateTarget === 'object' &&\n isPlainObject(newStateTarget) &&\n isPlainObject(oldStateSource)) {\n patchObject(newStateTarget, oldStateSource);\n }\n else {\n // transfer the ref\n newStore.$state[stateKey] = oldStateSource;\n }\n }\n // patch direct access properties to allow store.stateProperty to work as\n // store.$state.stateProperty\n // @ts-expect-error: any type\n store[stateKey] = toRef(newStore.$state, stateKey);\n });\n // remove deleted state properties\n Object.keys(store.$state).forEach((stateKey) => {\n if (!(stateKey in newStore.$state)) {\n // @ts-expect-error: noop if doesn't exist\n delete store[stateKey];\n }\n });\n // avoid devtools logging this as a mutation\n isListening = false;\n isSyncListening = false;\n pinia.state.value[$id] = toRef(newStore._hmrPayload, 'hotState');\n isSyncListening = true;\n nextTick().then(() => {\n isListening = true;\n });\n for (const actionName in newStore._hmrPayload.actions) {\n const actionFn = newStore[actionName];\n // @ts-expect-error: actionName is a string\n store[actionName] =\n //\n action(actionFn, actionName);\n }\n // TODO: does this work in both setup and option store?\n for (const getterName in newStore._hmrPayload.getters) {\n const getter = newStore._hmrPayload.getters[getterName];\n const getterValue = isOptionsStore\n ? // special handling of options api\n computed(() => {\n setActivePinia(pinia);\n return getter.call(store, store);\n })\n : getter;\n // @ts-expect-error: getterName is a string\n store[getterName] =\n //\n getterValue;\n }\n // remove deleted getters\n Object.keys(store._hmrPayload.getters).forEach((key) => {\n if (!(key in newStore._hmrPayload.getters)) {\n // @ts-expect-error: noop if doesn't exist\n delete store[key];\n }\n });\n // remove old actions\n Object.keys(store._hmrPayload.actions).forEach((key) => {\n if (!(key in newStore._hmrPayload.actions)) {\n // @ts-expect-error: noop if doesn't exist\n delete store[key];\n }\n });\n // update the values used in devtools and to allow deleting new properties later on\n store._hmrPayload = newStore._hmrPayload;\n store._getters = newStore._getters;\n store._hotUpdating = false;\n });\n }\n if ((((process.env.NODE_ENV !== 'production') || (typeof __VUE_PROD_DEVTOOLS__ !== 'undefined' && __VUE_PROD_DEVTOOLS__)) && !(process.env.NODE_ENV === 'test')) && IS_CLIENT) {\n const nonEnumerable = {\n writable: true,\n configurable: true,\n // avoid warning on devtools trying to display this property\n enumerable: false,\n };\n ['_p', '_hmrPayload', '_getters', '_customProperties'].forEach((p) => {\n Object.defineProperty(store, p, assign({ value: store[p] }, nonEnumerable));\n });\n }\n // apply all plugins\n pinia._p.forEach((extender) => {\n /* istanbul ignore else */\n if ((((process.env.NODE_ENV !== 'production') || (typeof __VUE_PROD_DEVTOOLS__ !== 'undefined' && __VUE_PROD_DEVTOOLS__)) && !(process.env.NODE_ENV === 'test')) && IS_CLIENT) {\n const extensions = scope.run(() => extender({\n store: store,\n app: pinia._a,\n pinia,\n options: optionsForPlugin,\n }));\n Object.keys(extensions || {}).forEach((key) => store._customProperties.add(key));\n assign(store, extensions);\n }\n else {\n assign(store, scope.run(() => extender({\n store: store,\n app: pinia._a,\n pinia,\n options: optionsForPlugin,\n })));\n }\n });\n if ((process.env.NODE_ENV !== 'production') &&\n store.$state &&\n typeof store.$state === 'object' &&\n typeof store.$state.constructor === 'function' &&\n !store.$state.constructor.toString().includes('[native code]')) {\n console.warn(`[🍍]: The \"state\" must be a plain object. It cannot be\\n` +\n `\\tstate: () => new MyClass()\\n` +\n `Found in store \"${store.$id}\".`);\n }\n // only apply hydrate to option stores with an initial state in pinia\n if (initialState &&\n isOptionsStore &&\n options.hydrate) {\n options.hydrate(store.$state, initialState);\n }\n isListening = true;\n isSyncListening = true;\n return store;\n}\n// allows unused stores to be tree shaken\n/*! #__NO_SIDE_EFFECTS__ */\nfunction defineStore(\n// TODO: add proper types from above\nid, setup, setupOptions) {\n let options;\n const isSetupStore = typeof setup === 'function';\n // the option store setup will contain the actual options in this case\n options = isSetupStore ? setupOptions : setup;\n function useStore(pinia, hot) {\n const hasContext = hasInjectionContext();\n pinia =\n // in test mode, ignore the argument provided as we can always retrieve a\n // pinia instance with getActivePinia()\n ((process.env.NODE_ENV === 'test') && activePinia && activePinia._testing ? null : pinia) ||\n (hasContext ? inject(piniaSymbol, null) : null);\n if (pinia)\n setActivePinia(pinia);\n if ((process.env.NODE_ENV !== 'production') && !activePinia) {\n throw new Error(`[🍍]: \"getActivePinia()\" was called but there was no active Pinia. Are you trying to use a store before calling \"app.use(pinia)\"?\\n` +\n `See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.\\n` +\n `This will fail in production.`);\n }\n pinia = activePinia;\n if (!pinia._s.has(id)) {\n // creating the store registers it in `pinia._s`\n if (isSetupStore) {\n createSetupStore(id, setup, options, pinia);\n }\n else {\n createOptionsStore(id, options, pinia);\n }\n /* istanbul ignore else */\n if ((process.env.NODE_ENV !== 'production')) {\n // @ts-expect-error: not the right inferred type\n useStore._pinia = pinia;\n }\n }\n const store = pinia._s.get(id);\n if ((process.env.NODE_ENV !== 'production') && hot) {\n const hotId = '__hot:' + id;\n const newStore = isSetupStore\n ? createSetupStore(hotId, setup, options, pinia, true)\n : createOptionsStore(hotId, assign({}, options), pinia, true);\n hot._hotUpdate(newStore);\n // cleanup the state properties and the store from the cache\n delete pinia.state.value[hotId];\n pinia._s.delete(hotId);\n }\n if ((process.env.NODE_ENV !== 'production') && IS_CLIENT) {\n const currentInstance = getCurrentInstance();\n // save stores in instances to access them devtools\n if (currentInstance &&\n currentInstance.proxy &&\n // avoid adding stores that are just built for hot module replacement\n !hot) {\n const vm = currentInstance.proxy;\n const cache = '_pStores' in vm ? vm._pStores : (vm._pStores = {});\n cache[id] = store;\n }\n }\n // StoreGeneric cannot be casted towards Store\n return store;\n }\n useStore.$id = id;\n return useStore;\n}\n\nlet mapStoreSuffix = 'Store';\n/**\n * Changes the suffix added by `mapStores()`. Can be set to an empty string.\n * Defaults to `\"Store\"`. Make sure to extend the MapStoresCustomization\n * interface if you are using TypeScript.\n *\n * @param suffix - new suffix\n */\nfunction setMapStoreSuffix(suffix // could be 'Store' but that would be annoying for JS\n) {\n mapStoreSuffix = suffix;\n}\n/**\n * Allows using stores without the composition API (`setup()`) by generating an\n * object to be spread in the `computed` field of a component. It accepts a list\n * of store definitions.\n *\n * @example\n * ```js\n * export default {\n * computed: {\n * // other computed properties\n * ...mapStores(useUserStore, useCartStore)\n * },\n *\n * created() {\n * this.userStore // store with id \"user\"\n * this.cartStore // store with id \"cart\"\n * }\n * }\n * ```\n *\n * @param stores - list of stores to map to an object\n */\nfunction mapStores(...stores) {\n if ((process.env.NODE_ENV !== 'production') && Array.isArray(stores[0])) {\n console.warn(`[🍍]: Directly pass all stores to \"mapStores()\" without putting them in an array:\\n` +\n `Replace\\n` +\n `\\tmapStores([useAuthStore, useCartStore])\\n` +\n `with\\n` +\n `\\tmapStores(useAuthStore, useCartStore)\\n` +\n `This will fail in production if not fixed.`);\n stores = stores[0];\n }\n return stores.reduce((reduced, useStore) => {\n // @ts-expect-error: $id is added by defineStore\n reduced[useStore.$id + mapStoreSuffix] = function () {\n return useStore(this.$pinia);\n };\n return reduced;\n }, {});\n}\n/**\n * Allows using state and getters from one store without using the composition\n * API (`setup()`) by generating an object to be spread in the `computed` field\n * of a component.\n *\n * @param useStore - store to map from\n * @param keysOrMapper - array or object\n */\nfunction mapState(useStore, keysOrMapper) {\n return Array.isArray(keysOrMapper)\n ? keysOrMapper.reduce((reduced, key) => {\n reduced[key] = function () {\n // @ts-expect-error: FIXME: should work?\n return useStore(this.$pinia)[key];\n };\n return reduced;\n }, {})\n : Object.keys(keysOrMapper).reduce((reduced, key) => {\n // @ts-expect-error\n reduced[key] = function () {\n const store = useStore(this.$pinia);\n const storeKey = keysOrMapper[key];\n // for some reason TS is unable to infer the type of storeKey to be a\n // function\n return typeof storeKey === 'function'\n ? storeKey.call(this, store)\n : // @ts-expect-error: FIXME: should work?\n store[storeKey];\n };\n return reduced;\n }, {});\n}\n/**\n * Alias for `mapState()`. You should use `mapState()` instead.\n * @deprecated use `mapState()` instead.\n */\nconst mapGetters = mapState;\n/**\n * Allows directly using actions from your store without using the composition\n * API (`setup()`) by generating an object to be spread in the `methods` field\n * of a component.\n *\n * @param useStore - store to map from\n * @param keysOrMapper - array or object\n */\nfunction mapActions(useStore, keysOrMapper) {\n return Array.isArray(keysOrMapper)\n ? keysOrMapper.reduce((reduced, key) => {\n // @ts-expect-error\n reduced[key] = function (...args) {\n // @ts-expect-error: FIXME: should work?\n return useStore(this.$pinia)[key](...args);\n };\n return reduced;\n }, {})\n : Object.keys(keysOrMapper).reduce((reduced, key) => {\n // @ts-expect-error\n reduced[key] = function (...args) {\n // @ts-expect-error: FIXME: should work?\n return useStore(this.$pinia)[keysOrMapper[key]](...args);\n };\n return reduced;\n }, {});\n}\n/**\n * Allows using state and getters from one store without using the composition\n * API (`setup()`) by generating an object to be spread in the `computed` field\n * of a component.\n *\n * @param useStore - store to map from\n * @param keysOrMapper - array or object\n */\nfunction mapWritableState(useStore, keysOrMapper) {\n return Array.isArray(keysOrMapper)\n ? keysOrMapper.reduce((reduced, key) => {\n reduced[key] = {\n get() {\n return useStore(this.$pinia)[key];\n },\n set(value) {\n return (useStore(this.$pinia)[key] = value);\n },\n };\n return reduced;\n }, {})\n : Object.keys(keysOrMapper).reduce((reduced, key) => {\n reduced[key] = {\n get() {\n return useStore(this.$pinia)[keysOrMapper[key]];\n },\n set(value) {\n return (useStore(this.$pinia)[keysOrMapper[key]] = value);\n },\n };\n return reduced;\n }, {});\n}\n\n/**\n * Creates an object of references with all the state, getters, and plugin-added\n * state properties of the store. Similar to `toRefs()` but specifically\n * designed for Pinia stores so methods and non reactive properties are\n * completely ignored.\n *\n * @param store - store to extract the refs from\n */\nfunction storeToRefs(store) {\n const rawStore = toRaw(store);\n const refs = {};\n for (const key in rawStore) {\n const value = rawStore[key];\n // There is no native method to check for a computed\n // https://github.com/vuejs/core/pull/4165\n if (value.effect) {\n // @ts-expect-error: too hard to type correctly\n refs[key] =\n // ...\n computed({\n get: () => store[key],\n set(value) {\n store[key] = value;\n },\n });\n }\n else if (isRef(value) || isReactive(value)) {\n // @ts-expect-error: the key is state or getter\n refs[key] =\n // ---\n toRef(store, key);\n }\n }\n return refs;\n}\n\nexport { MutationType, acceptHMRUpdate, createPinia, defineStore, disposePinia, getActivePinia, mapActions, mapGetters, mapState, mapStores, mapWritableState, setActivePinia, setMapStoreSuffix, shouldHydrate, skipHydrate, storeToRefs };\n","import { computed, customRef, effectScope, getCurrentInstance, getCurrentScope, hasInjectionContext, inject, isReactive, isRef, nextTick, onBeforeMount, onBeforeUnmount, onMounted, onScopeDispose, onUnmounted, provide, reactive, readonly, ref, shallowReadonly, shallowRef, toRef as toRef$1, toRefs as toRefs$1, toValue, unref, watch, watchEffect } from \"vue\";\n\n//#region computedEager/index.ts\n/**\n*\n* @deprecated This function will be removed in future version.\n*\n* Note: If you are using Vue 3.4+, you can straight use computed instead.\n* Because in Vue 3.4+, if computed new value does not change,\n* computed, effect, watch, watchEffect, render dependencies will not be triggered.\n* refer: https://github.com/vuejs/core/pull/5912\n*\n* @param fn effect function\n* @param options WatchOptionsBase\n* @returns readonly shallowRef\n*/\nfunction computedEager(fn, options) {\n\tvar _options$flush;\n\tconst result = shallowRef();\n\twatchEffect(() => {\n\t\tresult.value = fn();\n\t}, {\n\t\t...options,\n\t\tflush: (_options$flush = options === null || options === void 0 ? void 0 : options.flush) !== null && _options$flush !== void 0 ? _options$flush : \"sync\"\n\t});\n\treturn readonly(result);\n}\n/** @deprecated use `computedEager` instead */\nconst eagerComputed = computedEager;\n\n//#endregion\n//#region computedWithControl/index.ts\n/**\n* Explicitly define the deps of computed.\n*\n* @param source\n* @param fn\n*/\nfunction computedWithControl(source, fn, options = {}) {\n\tlet v = void 0;\n\tlet track;\n\tlet trigger;\n\tlet dirty = true;\n\tconst update = () => {\n\t\tdirty = true;\n\t\ttrigger();\n\t};\n\twatch(source, update, {\n\t\tflush: \"sync\",\n\t\t...options\n\t});\n\tconst get$1 = typeof fn === \"function\" ? fn : fn.get;\n\tconst set$1 = typeof fn === \"function\" ? void 0 : fn.set;\n\tconst result = customRef((_track, _trigger) => {\n\t\ttrack = _track;\n\t\ttrigger = _trigger;\n\t\treturn {\n\t\t\tget() {\n\t\t\t\tif (dirty) {\n\t\t\t\t\tv = get$1(v);\n\t\t\t\t\tdirty = false;\n\t\t\t\t}\n\t\t\t\ttrack();\n\t\t\t\treturn v;\n\t\t\t},\n\t\t\tset(v$1) {\n\t\t\t\tset$1 === null || set$1 === void 0 || set$1(v$1);\n\t\t\t}\n\t\t};\n\t});\n\tresult.trigger = update;\n\treturn result;\n}\n/** @deprecated use `computedWithControl` instead */\nconst controlledComputed = computedWithControl;\n\n//#endregion\n//#region tryOnScopeDispose/index.ts\n/**\n* Call onScopeDispose() if it's inside an effect scope lifecycle, if not, do nothing\n*\n* @param fn\n*/\nfunction tryOnScopeDispose(fn, failSilently) {\n\tif (getCurrentScope()) {\n\t\tonScopeDispose(fn, failSilently);\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n//#endregion\n//#region createEventHook/index.ts\n/**\n* Utility for creating event hooks\n*\n* @see https://vueuse.org/createEventHook\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction createEventHook() {\n\tconst fns = /* @__PURE__ */ new Set();\n\tconst off = (fn) => {\n\t\tfns.delete(fn);\n\t};\n\tconst clear = () => {\n\t\tfns.clear();\n\t};\n\tconst on = (fn) => {\n\t\tfns.add(fn);\n\t\tconst offFn = () => off(fn);\n\t\ttryOnScopeDispose(offFn);\n\t\treturn { off: offFn };\n\t};\n\tconst trigger = (...args) => {\n\t\treturn Promise.all(Array.from(fns).map((fn) => fn(...args)));\n\t};\n\treturn {\n\t\ton,\n\t\toff,\n\t\ttrigger,\n\t\tclear\n\t};\n}\n\n//#endregion\n//#region createGlobalState/index.ts\n/**\n* Keep states in the global scope to be reusable across Vue instances.\n*\n* @see https://vueuse.org/createGlobalState\n* @param stateFactory A factory function to create the state\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction createGlobalState(stateFactory) {\n\tlet initialized = false;\n\tlet state;\n\tconst scope = effectScope(true);\n\treturn ((...args) => {\n\t\tif (!initialized) {\n\t\t\tstate = scope.run(() => stateFactory(...args));\n\t\t\tinitialized = true;\n\t\t}\n\t\treturn state;\n\t});\n}\n\n//#endregion\n//#region provideLocal/map.ts\nconst localProvidedStateMap = /* @__PURE__ */ new WeakMap();\n\n//#endregion\n//#region injectLocal/index.ts\n/**\n* On the basis of `inject`, it is allowed to directly call inject to obtain the value after call provide in the same component.\n*\n* @example\n* ```ts\n* injectLocal('MyInjectionKey', 1)\n* const injectedValue = injectLocal('MyInjectionKey') // injectedValue === 1\n* ```\n*\n* @__NO_SIDE_EFFECTS__\n*/\nconst injectLocal = (...args) => {\n\tvar _getCurrentInstance;\n\tconst key = args[0];\n\tconst instance = (_getCurrentInstance = getCurrentInstance()) === null || _getCurrentInstance === void 0 ? void 0 : _getCurrentInstance.proxy;\n\tconst owner = instance !== null && instance !== void 0 ? instance : getCurrentScope();\n\tif (owner == null && !hasInjectionContext()) throw new Error(\"injectLocal must be called in setup\");\n\tif (owner && localProvidedStateMap.has(owner) && key in localProvidedStateMap.get(owner)) return localProvidedStateMap.get(owner)[key];\n\treturn inject(...args);\n};\n\n//#endregion\n//#region provideLocal/index.ts\n/**\n* On the basis of `provide`, it is allowed to directly call inject to obtain the value after call provide in the same component.\n*\n* @example\n* ```ts\n* provideLocal('MyInjectionKey', 1)\n* const injectedValue = injectLocal('MyInjectionKey') // injectedValue === 1\n* ```\n*/\nfunction provideLocal(key, value) {\n\tvar _getCurrentInstance;\n\tconst instance = (_getCurrentInstance = getCurrentInstance()) === null || _getCurrentInstance === void 0 ? void 0 : _getCurrentInstance.proxy;\n\tconst owner = instance !== null && instance !== void 0 ? instance : getCurrentScope();\n\tif (owner == null) throw new Error(\"provideLocal must be called in setup\");\n\tif (!localProvidedStateMap.has(owner)) localProvidedStateMap.set(owner, Object.create(null));\n\tconst localProvidedState = localProvidedStateMap.get(owner);\n\tlocalProvidedState[key] = value;\n\treturn provide(key, value);\n}\n\n//#endregion\n//#region createInjectionState/index.ts\n/**\n* Create global state that can be injected into components.\n*\n* @see https://vueuse.org/createInjectionState\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction createInjectionState(composable, options) {\n\tconst key = (options === null || options === void 0 ? void 0 : options.injectionKey) || Symbol(composable.name || \"InjectionState\");\n\tconst defaultValue = options === null || options === void 0 ? void 0 : options.defaultValue;\n\tconst useProvidingState = (...args) => {\n\t\tconst state = composable(...args);\n\t\tprovideLocal(key, state);\n\t\treturn state;\n\t};\n\tconst useInjectedState = () => injectLocal(key, defaultValue);\n\treturn [useProvidingState, useInjectedState];\n}\n\n//#endregion\n//#region createRef/index.ts\n/**\n* Returns a `deepRef` or `shallowRef` depending on the `deep` param.\n*\n* @example createRef(1) // ShallowRef<number>\n* @example createRef(1, false) // ShallowRef<number>\n* @example createRef(1, true) // Ref<number>\n* @example createRef(\"string\") // ShallowRef<string>\n* @example createRef<\"A\"|\"B\">(\"A\", true) // Ref<\"A\"|\"B\">\n*\n* @param value\n* @param deep\n* @returns the `deepRef` or `shallowRef`\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction createRef(value, deep) {\n\tif (deep === true) return ref(value);\n\telse return shallowRef(value);\n}\n\n//#endregion\n//#region utils/is.ts\nconst isClient = typeof window !== \"undefined\" && typeof document !== \"undefined\";\nconst isWorker = typeof WorkerGlobalScope !== \"undefined\" && globalThis instanceof WorkerGlobalScope;\nconst isDef = (val) => typeof val !== \"undefined\";\nconst notNullish = (val) => val != null;\nconst assert = (condition, ...infos) => {\n\tif (!condition) console.warn(...infos);\n};\nconst toString = Object.prototype.toString;\nconst isObject = (val) => toString.call(val) === \"[object Object]\";\nconst now = () => Date.now();\nconst timestamp = () => +Date.now();\nconst clamp = (n, min, max) => Math.min(max, Math.max(min, n));\nconst noop = () => {};\nconst rand = (min, max) => {\n\tmin = Math.ceil(min);\n\tmax = Math.floor(max);\n\treturn Math.floor(Math.random() * (max - min + 1)) + min;\n};\nconst hasOwn = (val, key) => Object.prototype.hasOwnProperty.call(val, key);\nconst isIOS = /* @__PURE__ */ getIsIOS();\nfunction getIsIOS() {\n\tvar _window, _window2, _window3;\n\treturn isClient && !!((_window = window) === null || _window === void 0 || (_window = _window.navigator) === null || _window === void 0 ? void 0 : _window.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((_window2 = window) === null || _window2 === void 0 || (_window2 = _window2.navigator) === null || _window2 === void 0 ? void 0 : _window2.maxTouchPoints) > 2 && /iPad|Macintosh/.test((_window3 = window) === null || _window3 === void 0 ? void 0 : _window3.navigator.userAgent));\n}\n\n//#endregion\n//#region toRef/index.ts\nfunction toRef(...args) {\n\tif (args.length !== 1) return toRef$1(...args);\n\tconst r = args[0];\n\treturn typeof r === \"function\" ? readonly(customRef(() => ({\n\t\tget: r,\n\t\tset: noop\n\t}))) : ref(r);\n}\n\n//#endregion\n//#region utils/filters.ts\n/**\n* @internal\n*/\nfunction createFilterWrapper(filter, fn) {\n\tfunction wrapper(...args) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tPromise.resolve(filter(() => fn.apply(this, args), {\n\t\t\t\tfn,\n\t\t\t\tthisArg: this,\n\t\t\t\targs\n\t\t\t})).then(resolve).catch(reject);\n\t\t});\n\t}\n\treturn wrapper;\n}\nconst bypassFilter = (invoke$1) => {\n\treturn invoke$1();\n};\n/**\n* Create an EventFilter that debounce the events\n*/\nfunction debounceFilter(ms, options = {}) {\n\tlet timer;\n\tlet maxTimer;\n\tlet lastRejector = noop;\n\tconst _clearTimeout = (timer$1) => {\n\t\tclearTimeout(timer$1);\n\t\tlastRejector();\n\t\tlastRejector = noop;\n\t};\n\tlet lastInvoker;\n\tconst filter = (invoke$1) => {\n\t\tconst duration = toValue(ms);\n\t\tconst maxDuration = toValue(options.maxWait);\n\t\tif (timer) _clearTimeout(timer);\n\t\tif (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {\n\t\t\tif (maxTimer) {\n\t\t\t\t_clearTimeout(maxTimer);\n\t\t\t\tmaxTimer = void 0;\n\t\t\t}\n\t\t\treturn Promise.resolve(invoke$1());\n\t\t}\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tlastRejector = options.rejectOnCancel ? reject : resolve;\n\t\t\tlastInvoker = invoke$1;\n\t\t\tif (maxDuration && !maxTimer) maxTimer = setTimeout(() => {\n\t\t\t\tif (timer) _clearTimeout(timer);\n\t\t\t\tmaxTimer = void 0;\n\t\t\t\tresolve(lastInvoker());\n\t\t\t}, maxDuration);\n\t\t\ttimer = setTimeout(() => {\n\t\t\t\tif (maxTimer) _clearTimeout(maxTimer);\n\t\t\t\tmaxTimer = void 0;\n\t\t\t\tresolve(invoke$1());\n\t\t\t}, duration);\n\t\t});\n\t};\n\treturn filter;\n}\nfunction throttleFilter(...args) {\n\tlet lastExec = 0;\n\tlet timer;\n\tlet isLeading = true;\n\tlet lastRejector = noop;\n\tlet lastValue;\n\tlet ms;\n\tlet trailing;\n\tlet leading;\n\tlet rejectOnCancel;\n\tif (!isRef(args[0]) && typeof args[0] === \"object\") ({delay: ms, trailing = true, leading = true, rejectOnCancel = false} = args[0]);\n\telse [ms, trailing = true, leading = true, rejectOnCancel = false] = args;\n\tconst clear = () => {\n\t\tif (timer) {\n\t\t\tclearTimeout(timer);\n\t\t\ttimer = void 0;\n\t\t\tlastRejector();\n\t\t\tlastRejector = noop;\n\t\t}\n\t};\n\tconst filter = (_invoke) => {\n\t\tconst duration = toValue(ms);\n\t\tconst elapsed = Date.now() - lastExec;\n\t\tconst invoke$1 = () => {\n\t\t\treturn lastValue = _invoke();\n\t\t};\n\t\tclear();\n\t\tif (duration <= 0) {\n\t\t\tlastExec = Date.now();\n\t\t\treturn invoke$1();\n\t\t}\n\t\tif (elapsed > duration) {\n\t\t\tlastExec = Date.now();\n\t\t\tif (leading || !isLeading) invoke$1();\n\t\t} else if (trailing) lastValue = new Promise((resolve, reject) => {\n\t\t\tlastRejector = rejectOnCancel ? reject : resolve;\n\t\t\ttimer = setTimeout(() => {\n\t\t\t\tlastExec = Date.now();\n\t\t\t\tisLeading = true;\n\t\t\t\tresolve(invoke$1());\n\t\t\t\tclear();\n\t\t\t}, Math.max(0, duration - elapsed));\n\t\t});\n\t\tif (!leading && !timer) timer = setTimeout(() => isLeading = true, duration);\n\t\tisLeading = false;\n\t\treturn lastValue;\n\t};\n\treturn filter;\n}\n/**\n* EventFilter that gives extra controls to pause and resume the filter\n*\n* @param extendFilter Extra filter to apply when the PausableFilter is active, default to none\n* @param options Options to configure the filter\n*/\nfunction pausableFilter(extendFilter = bypassFilter, options = {}) {\n\tconst { initialState = \"active\" } = options;\n\tconst isActive = toRef(initialState === \"active\");\n\tfunction pause() {\n\t\tisActive.value = false;\n\t}\n\tfunction resume() {\n\t\tisActive.value = true;\n\t}\n\tconst eventFilter = (...args) => {\n\t\tif (isActive.value) extendFilter(...args);\n\t};\n\treturn {\n\t\tisActive: readonly(isActive),\n\t\tpause,\n\t\tresume,\n\t\teventFilter\n\t};\n}\n\n//#endregion\n//#region utils/general.ts\nfunction promiseTimeout(ms, throwOnTimeout = false, reason = \"Timeout\") {\n\treturn new Promise((resolve, reject) => {\n\t\tif (throwOnTimeout) setTimeout(() => reject(reason), ms);\n\t\telse setTimeout(resolve, ms);\n\t});\n}\nfunction identity(arg) {\n\treturn arg;\n}\n/**\n* Create singleton promise function\n*\n* @example\n* ```\n* const promise = createSingletonPromise(async () => { ... })\n*\n* await promise()\n* await promise() // all of them will be bind to a single promise instance\n* await promise() // and be resolved together\n* ```\n*/\nfunction createSingletonPromise(fn) {\n\tlet _promise;\n\tfunction wrapper() {\n\t\tif (!_promise) _promise = fn();\n\t\treturn _promise;\n\t}\n\twrapper.reset = async () => {\n\t\tconst _prev = _promise;\n\t\t_promise = void 0;\n\t\tif (_prev) await _prev;\n\t};\n\treturn wrapper;\n}\nfunction invoke(fn) {\n\treturn fn();\n}\nfunction containsProp(obj, ...props) {\n\treturn props.some((k) => k in obj);\n}\nfunction increaseWithUnit(target, delta) {\n\tvar _target$match;\n\tif (typeof target === \"number\") return target + delta;\n\tconst value = ((_target$match = target.match(/^-?\\d+\\.?\\d*/)) === null || _target$match === void 0 ? void 0 : _target$match[0]) || \"\";\n\tconst unit = target.slice(value.length);\n\tconst result = Number.parseFloat(value) + delta;\n\tif (Number.isNaN(result)) return target;\n\treturn result + unit;\n}\n/**\n* Get a px value for SSR use, do not rely on this method outside of SSR as REM unit is assumed at 16px, which might not be the case on the client\n*/\nfunction pxValue(px) {\n\treturn px.endsWith(\"rem\") ? Number.parseFloat(px) * 16 : Number.parseFloat(px);\n}\n/**\n* Create a new subset object by giving keys\n*/\nfunction objectPick(obj, keys, omitUndefined = false) {\n\treturn keys.reduce((n, k) => {\n\t\tif (k in obj) {\n\t\t\tif (!omitUndefined || obj[k] !== void 0) n[k] = obj[k];\n\t\t}\n\t\treturn n;\n\t}, {});\n}\n/**\n* Create a new subset object by omit giving keys\n*/\nfunction objectOmit(obj, keys, omitUndefined = false) {\n\treturn Object.fromEntries(Object.entries(obj).filter(([key, value]) => {\n\t\treturn (!omitUndefined || value !== void 0) && !keys.includes(key);\n\t}));\n}\nfunction objectEntries(obj) {\n\treturn Object.entries(obj);\n}\nfunction toArray(value) {\n\treturn Array.isArray(value) ? value : [value];\n}\n\n//#endregion\n//#region utils/port.ts\nfunction cacheStringFunction(fn) {\n\tconst cache = Object.create(null);\n\treturn ((str) => {\n\t\treturn cache[str] || (cache[str] = fn(str));\n\t});\n}\nconst hyphenateRE = /\\B([A-Z])/g;\nconst hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, \"-$1\").toLowerCase());\nconst camelizeRE = /-(\\w)/g;\nconst camelize = cacheStringFunction((str) => {\n\treturn str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : \"\");\n});\n\n//#endregion\n//#region utils/vue.ts\nfunction getLifeCycleTarget(target) {\n\treturn target || getCurrentInstance();\n}\n\n//#endregion\n//#region createSharedComposable/index.ts\n/**\n* Make a composable function usable with multiple Vue instances.\n*\n* @see https://vueuse.org/createSharedComposable\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction createSharedComposable(composable) {\n\tif (!isClient) return composable;\n\tlet subscribers = 0;\n\tlet state;\n\tlet scope;\n\tconst dispose = () => {\n\t\tsubscribers -= 1;\n\t\tif (scope && subscribers <= 0) {\n\t\t\tscope.stop();\n\t\t\tstate = void 0;\n\t\t\tscope = void 0;\n\t\t}\n\t};\n\treturn ((...args) => {\n\t\tsubscribers += 1;\n\t\tif (!scope) {\n\t\t\tscope = effectScope(true);\n\t\t\tstate = scope.run(() => composable(...args));\n\t\t}\n\t\ttryOnScopeDispose(dispose);\n\t\treturn state;\n\t});\n}\n\n//#endregion\n//#region extendRef/index.ts\nfunction extendRef(ref$1, extend, { enumerable = false, unwrap = true } = {}) {\n\tfor (const [key, value] of Object.entries(extend)) {\n\t\tif (key === \"value\") continue;\n\t\tif (isRef(value) && unwrap) Object.defineProperty(ref$1, key, {\n\t\t\tget() {\n\t\t\t\treturn value.value;\n\t\t\t},\n\t\t\tset(v) {\n\t\t\t\tvalue.value = v;\n\t\t\t},\n\t\t\tenumerable\n\t\t});\n\t\telse Object.defineProperty(ref$1, key, {\n\t\t\tvalue,\n\t\t\tenumerable\n\t\t});\n\t}\n\treturn ref$1;\n}\n\n//#endregion\n//#region get/index.ts\nfunction get(obj, key) {\n\tif (key == null) return unref(obj);\n\treturn unref(obj)[key];\n}\n\n//#endregion\n//#region isDefined/index.ts\nfunction isDefined(v) {\n\treturn unref(v) != null;\n}\n\n//#endregion\n//#region makeDestructurable/index.ts\n/* @__NO_SIDE_EFFECTS__ */\nfunction makeDestructurable(obj, arr) {\n\tif (typeof Symbol !== \"undefined\") {\n\t\tconst clone = { ...obj };\n\t\tObject.defineProperty(clone, Symbol.iterator, {\n\t\t\tenumerable: false,\n\t\t\tvalue() {\n\t\t\t\tlet index = 0;\n\t\t\t\treturn { next: () => ({\n\t\t\t\t\tvalue: arr[index++],\n\t\t\t\t\tdone: index > arr.length\n\t\t\t\t}) };\n\t\t\t}\n\t\t});\n\t\treturn clone;\n\t} else return Object.assign([...arr], obj);\n}\n\n//#endregion\n//#region reactify/index.ts\n/**\n* Converts plain function into a reactive function.\n* The converted function accepts refs as it's arguments\n* and returns a ComputedRef, with proper typing.\n*\n* @param fn - Source function\n* @param options - Options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction reactify(fn, options) {\n\tconst unrefFn = (options === null || options === void 0 ? void 0 : options.computedGetter) === false ? unref : toValue;\n\treturn function(...args) {\n\t\treturn computed(() => fn.apply(this, args.map((i) => unrefFn(i))));\n\t};\n}\n/** @deprecated use `reactify` instead */\nconst createReactiveFn = reactify;\n\n//#endregion\n//#region reactifyObject/index.ts\n/**\n* Apply `reactify` to an object\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction reactifyObject(obj, optionsOrKeys = {}) {\n\tlet keys = [];\n\tlet options;\n\tif (Array.isArray(optionsOrKeys)) keys = optionsOrKeys;\n\telse {\n\t\toptions = optionsOrKeys;\n\t\tconst { includeOwnProperties = true } = optionsOrKeys;\n\t\tkeys.push(...Object.keys(obj));\n\t\tif (includeOwnProperties) keys.push(...Object.getOwnPropertyNames(obj));\n\t}\n\treturn Object.fromEntries(keys.map((key) => {\n\t\tconst value = obj[key];\n\t\treturn [key, typeof value === \"function\" ? reactify(value.bind(obj), options) : value];\n\t}));\n}\n\n//#endregion\n//#region toReactive/index.ts\n/**\n* Converts ref to reactive.\n*\n* @see https://vueuse.org/toReactive\n* @param objectRef A ref of object\n*/\nfunction toReactive(objectRef) {\n\tif (!isRef(objectRef)) return reactive(objectRef);\n\treturn reactive(new Proxy({}, {\n\t\tget(_, p, receiver) {\n\t\t\treturn unref(Reflect.get(objectRef.value, p, receiver));\n\t\t},\n\t\tset(_, p, value) {\n\t\t\tif (isRef(objectRef.value[p]) && !isRef(value)) objectRef.value[p].value = value;\n\t\t\telse objectRef.value[p] = value;\n\t\t\treturn true;\n\t\t},\n\t\tdeleteProperty(_, p) {\n\t\t\treturn Reflect.deleteProperty(objectRef.value, p);\n\t\t},\n\t\thas(_, p) {\n\t\t\treturn Reflect.has(objectRef.value, p);\n\t\t},\n\t\townKeys() {\n\t\t\treturn Object.keys(objectRef.value);\n\t\t},\n\t\tgetOwnPropertyDescriptor() {\n\t\t\treturn {\n\t\t\t\tenumerable: true,\n\t\t\t\tconfigurable: true\n\t\t\t};\n\t\t}\n\t}));\n}\n\n//#endregion\n//#region reactiveComputed/index.ts\n/**\n* Computed reactive object.\n*/\nfunction reactiveComputed(fn) {\n\treturn toReactive(computed(fn));\n}\n\n//#endregion\n//#region reactiveOmit/index.ts\n/**\n* Reactively omit fields from a reactive object\n*\n* @see https://vueuse.org/reactiveOmit\n*/\nfunction reactiveOmit(obj, ...keys) {\n\tconst flatKeys = keys.flat();\n\tconst predicate = flatKeys[0];\n\treturn reactiveComputed(() => typeof predicate === \"function\" ? Object.fromEntries(Object.entries(toRefs$1(obj)).filter(([k, v]) => !predicate(toValue(v), k))) : Object.fromEntries(Object.entries(toRefs$1(obj)).filter((e) => !flatKeys.includes(e[0]))));\n}\n\n//#endregion\n//#region reactivePick/index.ts\n/**\n* Reactively pick fields from a reactive object\n*\n* @see https://vueuse.org/reactivePick\n*/\nfunction reactivePick(obj, ...keys) {\n\tconst flatKeys = keys.flat();\n\tconst predicate = flatKeys[0];\n\treturn reactiveComputed(() => typeof predicate === \"function\" ? Object.fromEntries(Object.entries(toRefs$1(obj)).filter(([k, v]) => predicate(toValue(v), k))) : Object.fromEntries(flatKeys.map((k) => [k, toRef(obj, k)])));\n}\n\n//#endregion\n//#region refAutoReset/index.ts\n/**\n* Create a ref which will be reset to the default value after some time.\n*\n* @see https://vueuse.org/refAutoReset\n* @param defaultValue The value which will be set.\n* @param afterMs A zero-or-greater delay in milliseconds.\n*/\nfunction refAutoReset(defaultValue, afterMs = 1e4) {\n\treturn customRef((track, trigger) => {\n\t\tlet value = toValue(defaultValue);\n\t\tlet timer;\n\t\tconst resetAfter = () => setTimeout(() => {\n\t\t\tvalue = toValue(defaultValue);\n\t\t\ttrigger();\n\t\t}, toValue(afterMs));\n\t\ttryOnScopeDispose(() => {\n\t\t\tclearTimeout(timer);\n\t\t});\n\t\treturn {\n\t\t\tget() {\n\t\t\t\ttrack();\n\t\t\t\treturn value;\n\t\t\t},\n\t\t\tset(newValue) {\n\t\t\t\tvalue = newValue;\n\t\t\t\ttrigger();\n\t\t\t\tclearTimeout(timer);\n\t\t\t\ttimer = resetAfter();\n\t\t\t}\n\t\t};\n\t});\n}\n/** @deprecated use `refAutoReset` instead */\nconst autoResetRef = refAutoReset;\n\n//#endregion\n//#region useDebounceFn/index.ts\n/**\n* Debounce execution of a function.\n*\n* @see https://vueuse.org/useDebounceFn\n* @param fn A function to be executed after delay milliseconds debounced.\n* @param ms A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.\n* @param options Options\n*\n* @return A new, debounce, function.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useDebounceFn(fn, ms = 200, options = {}) {\n\treturn createFilterWrapper(debounceFilter(ms, options), fn);\n}\n\n//#endregion\n//#region refDebounced/index.ts\n/**\n* Debounce updates of a ref.\n*\n* @return A new debounced ref.\n*/\nfunction refDebounced(value, ms = 200, options = {}) {\n\tconst debounced = ref(toValue(value));\n\tconst updater = useDebounceFn(() => {\n\t\tdebounced.value = value.value;\n\t}, ms, options);\n\twatch(value, () => updater());\n\treturn shallowReadonly(debounced);\n}\n/** @deprecated use `refDebounced` instead */\nconst debouncedRef = refDebounced;\n/** @deprecated use `refDebounced` instead */\nconst useDebounce = refDebounced;\n\n//#endregion\n//#region refDefault/index.ts\n/**\n* Apply default value to a ref.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction refDefault(source, defaultValue) {\n\treturn computed({\n\t\tget() {\n\t\t\tvar _source$value;\n\t\t\treturn (_source$value = source.value) !== null && _source$value !== void 0 ? _source$value : defaultValue;\n\t\t},\n\t\tset(value) {\n\t\t\tsource.value = value;\n\t\t}\n\t});\n}\n\n//#endregion\n//#region refManualReset/index.ts\n/**\n* Create a ref with manual reset functionality.\n*\n* @see https://vueuse.org/refManualReset\n* @param defaultValue The value which will be set.\n*/\nfunction refManualReset(defaultValue) {\n\tlet value = toValue(defaultValue);\n\tlet trigger;\n\tconst reset = () => {\n\t\tvalue = toValue(defaultValue);\n\t\ttrigger();\n\t};\n\tconst refValue = customRef((track, _trigger) => {\n\t\ttrigger = _trigger;\n\t\treturn {\n\t\t\tget() {\n\t\t\t\ttrack();\n\t\t\t\treturn value;\n\t\t\t},\n\t\t\tset(newValue) {\n\t\t\t\tvalue = newValue;\n\t\t\t\ttrigger();\n\t\t\t}\n\t\t};\n\t});\n\trefValue.reset = reset;\n\treturn refValue;\n}\n\n//#endregion\n//#region useThrottleFn/index.ts\n/**\n* Throttle execution of a function. Especially useful for rate limiting\n* execution of handlers on events like resize and scroll.\n*\n* @param fn A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,\n* to `callback` when the throttled-function is executed.\n* @param ms A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.\n* (default value: 200)\n*\n* @param [trailing] if true, call fn again after the time is up (default value: false)\n*\n* @param [leading] if true, call fn on the leading edge of the ms timeout (default value: true)\n*\n* @param [rejectOnCancel] if true, reject the last call if it's been cancel (default value: false)\n*\n* @return A new, throttled, function.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useThrottleFn(fn, ms = 200, trailing = false, leading = true, rejectOnCancel = false) {\n\treturn createFilterWrapper(throttleFilter(ms, trailing, leading, rejectOnCancel), fn);\n}\n\n//#endregion\n//#region refThrottled/index.ts\n/**\n* Throttle execution of a function. Especially useful for rate limiting\n* execution of handlers on events like resize and scroll.\n*\n* @param value Ref value to be watched with throttle effect\n* @param delay A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.\n* @param trailing if true, update the value again after the delay time is up\n* @param leading if true, update the value on the leading edge of the ms timeout\n*/\nfunction refThrottled(value, delay = 200, trailing = true, leading = true) {\n\tif (delay <= 0) return value;\n\tconst throttled = ref(toValue(value));\n\tconst updater = useThrottleFn(() => {\n\t\tthrottled.value = value.value;\n\t}, delay, trailing, leading);\n\twatch(value, () => updater());\n\treturn throttled;\n}\n/** @deprecated use `refThrottled` instead */\nconst throttledRef = refThrottled;\n/** @deprecated use `refThrottled` instead */\nconst useThrottle = refThrottled;\n\n//#endregion\n//#region refWithControl/index.ts\n/**\n* Fine-grained controls over ref and its reactivity.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction refWithControl(initial, options = {}) {\n\tlet source = initial;\n\tlet track;\n\tlet trigger;\n\tconst ref$1 = customRef((_track, _trigger) => {\n\t\ttrack = _track;\n\t\ttrigger = _trigger;\n\t\treturn {\n\t\t\tget() {\n\t\t\t\treturn get$1();\n\t\t\t},\n\t\t\tset(v) {\n\t\t\t\tset$1(v);\n\t\t\t}\n\t\t};\n\t});\n\tfunction get$1(tracking = true) {\n\t\tif (tracking) track();\n\t\treturn source;\n\t}\n\tfunction set$1(value, triggering = true) {\n\t\tvar _options$onBeforeChan, _options$onChanged;\n\t\tif (value === source) return;\n\t\tconst old = source;\n\t\tif (((_options$onBeforeChan = options.onBeforeChange) === null || _options$onBeforeChan === void 0 ? void 0 : _options$onBeforeChan.call(options, value, old)) === false) return;\n\t\tsource = value;\n\t\t(_options$onChanged = options.onChanged) === null || _options$onChanged === void 0 || _options$onChanged.call(options, value, old);\n\t\tif (triggering) trigger();\n\t}\n\t/**\n\t* Get the value without tracked in the reactivity system\n\t*/\n\tconst untrackedGet = () => get$1(false);\n\t/**\n\t* Set the value without triggering the reactivity system\n\t*/\n\tconst silentSet = (v) => set$1(v, false);\n\t/**\n\t* Get the value without tracked in the reactivity system.\n\t*\n\t* Alias for `untrackedGet()`\n\t*/\n\tconst peek = () => get$1(false);\n\t/**\n\t* Set the value without triggering the reactivity system\n\t*\n\t* Alias for `silentSet(v)`\n\t*/\n\tconst lay = (v) => set$1(v, false);\n\treturn extendRef(ref$1, {\n\t\tget: get$1,\n\t\tset: set$1,\n\t\tuntrackedGet,\n\t\tsilentSet,\n\t\tpeek,\n\t\tlay\n\t}, { enumerable: true });\n}\n/** @deprecated use `refWithControl` instead */\nconst controlledRef = refWithControl;\n\n//#endregion\n//#region set/index.ts\n/**\n* Shorthand for `ref.value = x`\n*/\nfunction set(...args) {\n\tif (args.length === 2) {\n\t\tconst [ref$1, value] = args;\n\t\tref$1.value = value;\n\t}\n\tif (args.length === 3) {\n\t\tconst [target, key, value] = args;\n\t\ttarget[key] = value;\n\t}\n}\n\n//#endregion\n//#region watchWithFilter/index.ts\nfunction watchWithFilter(source, cb, options = {}) {\n\tconst { eventFilter = bypassFilter,...watchOptions } = options;\n\treturn watch(source, createFilterWrapper(eventFilter, cb), watchOptions);\n}\n\n//#endregion\n//#region watchPausable/index.ts\nfunction watchPausable(source, cb, options = {}) {\n\tconst { eventFilter: filter, initialState = \"active\",...watchOptions } = options;\n\tconst { eventFilter, pause, resume, isActive } = pausableFilter(filter, { initialState });\n\treturn {\n\t\tstop: watchWithFilter(source, cb, {\n\t\t\t...watchOptions,\n\t\t\teventFilter\n\t\t}),\n\t\tpause,\n\t\tresume,\n\t\tisActive\n\t};\n}\n/** @deprecated use `watchPausable` instead */\nconst pausableWatch = watchPausable;\n\n//#endregion\n//#region syncRef/index.ts\n/**\n* Two-way refs synchronization.\n* From the set theory perspective to restrict the option's type\n* Check in the following order:\n* 1. L = R\n* 2. L ∩ R ≠ ∅\n* 3. L ⊆ R\n* 4. L ∩ R = ∅\n*/\nfunction syncRef(left, right, ...[options]) {\n\tconst { flush = \"sync\", deep = false, immediate = true, direction = \"both\", transform = {} } = options || {};\n\tconst watchers = [];\n\tconst transformLTR = \"ltr\" in transform && transform.ltr || ((v) => v);\n\tconst transformRTL = \"rtl\" in transform && transform.rtl || ((v) => v);\n\tif (direction === \"both\" || direction === \"ltr\") watchers.push(pausableWatch(left, (newValue) => {\n\t\twatchers.forEach((w) => w.pause());\n\t\tright.value = transformLTR(newValue);\n\t\twatchers.forEach((w) => w.resume());\n\t}, {\n\t\tflush,\n\t\tdeep,\n\t\timmediate\n\t}));\n\tif (direction === \"both\" || direction === \"rtl\") watchers.push(pausableWatch(right, (newValue) => {\n\t\twatchers.forEach((w) => w.pause());\n\t\tleft.value = transformRTL(newValue);\n\t\twatchers.forEach((w) => w.resume());\n\t}, {\n\t\tflush,\n\t\tdeep,\n\t\timmediate\n\t}));\n\tconst stop = () => {\n\t\twatchers.forEach((w) => w.stop());\n\t};\n\treturn stop;\n}\n\n//#endregion\n//#region syncRefs/index.ts\n/**\n* Keep target ref(s) in sync with the source ref\n*\n* @param source source ref\n* @param targets\n*/\nfunction syncRefs(source, targets, options = {}) {\n\tconst { flush = \"sync\", deep = false, immediate = true } = options;\n\tconst targetsArray = toArray(targets);\n\treturn watch(source, (newValue) => targetsArray.forEach((target) => target.value = newValue), {\n\t\tflush,\n\t\tdeep,\n\t\timmediate\n\t});\n}\n\n//#endregion\n//#region toRefs/index.ts\n/**\n* Extended `toRefs` that also accepts refs of an object.\n*\n* @see https://vueuse.org/toRefs\n* @param objectRef A ref or normal object or array.\n* @param options Options\n*/\nfunction toRefs(objectRef, options = {}) {\n\tif (!isRef(objectRef)) return toRefs$1(objectRef);\n\tconst result = Array.isArray(objectRef.value) ? Array.from({ length: objectRef.value.length }) : {};\n\tfor (const key in objectRef.value) result[key] = customRef(() => ({\n\t\tget() {\n\t\t\treturn objectRef.value[key];\n\t\t},\n\t\tset(v) {\n\t\t\tvar _toValue;\n\t\t\tif ((_toValue = toValue(options.replaceRef)) !== null && _toValue !== void 0 ? _toValue : true) if (Array.isArray(objectRef.value)) {\n\t\t\t\tconst copy = [...objectRef.value];\n\t\t\t\tcopy[key] = v;\n\t\t\t\tobjectRef.value = copy;\n\t\t\t} else {\n\t\t\t\tconst newObject = {\n\t\t\t\t\t...objectRef.value,\n\t\t\t\t\t[key]: v\n\t\t\t\t};\n\t\t\t\tObject.setPrototypeOf(newObject, Object.getPrototypeOf(objectRef.value));\n\t\t\t\tobjectRef.value = newObject;\n\t\t\t}\n\t\t\telse objectRef.value[key] = v;\n\t\t}\n\t}));\n\treturn result;\n}\n\n//#endregion\n//#region tryOnBeforeMount/index.ts\n/**\n* Call onBeforeMount() if it's inside a component lifecycle, if not, just call the function\n*\n* @param fn\n* @param sync if set to false, it will run in the nextTick() of Vue\n* @param target\n*/\nfunction tryOnBeforeMount(fn, sync = true, target) {\n\tif (getLifeCycleTarget(target)) onBeforeMount(fn, target);\n\telse if (sync) fn();\n\telse nextTick(fn);\n}\n\n//#endregion\n//#region tryOnBeforeUnmount/index.ts\n/**\n* Call onBeforeUnmount() if it's inside a component lifecycle, if not, do nothing\n*\n* @param fn\n* @param target\n*/\nfunction tryOnBeforeUnmount(fn, target) {\n\tif (getLifeCycleTarget(target)) onBeforeUnmount(fn, target);\n}\n\n//#endregion\n//#region tryOnMounted/index.ts\n/**\n* Call onMounted() if it's inside a component lifecycle, if not, just call the function\n*\n* @param fn\n* @param sync if set to false, it will run in the nextTick() of Vue\n* @param target\n*/\nfunction tryOnMounted(fn, sync = true, target) {\n\tif (getLifeCycleTarget(target)) onMounted(fn, target);\n\telse if (sync) fn();\n\telse nextTick(fn);\n}\n\n//#endregion\n//#region tryOnUnmounted/index.ts\n/**\n* Call onUnmounted() if it's inside a component lifecycle, if not, do nothing\n*\n* @param fn\n* @param target\n*/\nfunction tryOnUnmounted(fn, target) {\n\tif (getLifeCycleTarget(target)) onUnmounted(fn, target);\n}\n\n//#endregion\n//#region until/index.ts\nfunction createUntil(r, isNot = false) {\n\tfunction toMatch(condition, { flush = \"sync\", deep = false, timeout, throwOnTimeout } = {}) {\n\t\tlet stop = null;\n\t\tconst promises = [new Promise((resolve) => {\n\t\t\tstop = watch(r, (v) => {\n\t\t\t\tif (condition(v) !== isNot) {\n\t\t\t\t\tif (stop) stop();\n\t\t\t\t\telse nextTick(() => stop === null || stop === void 0 ? void 0 : stop());\n\t\t\t\t\tresolve(v);\n\t\t\t\t}\n\t\t\t}, {\n\t\t\t\tflush,\n\t\t\t\tdeep,\n\t\t\t\timmediate: true\n\t\t\t});\n\t\t})];\n\t\tif (timeout != null) promises.push(promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r)).finally(() => stop === null || stop === void 0 ? void 0 : stop()));\n\t\treturn Promise.race(promises);\n\t}\n\tfunction toBe(value, options) {\n\t\tif (!isRef(value)) return toMatch((v) => v === value, options);\n\t\tconst { flush = \"sync\", deep = false, timeout, throwOnTimeout } = options !== null && options !== void 0 ? options : {};\n\t\tlet stop = null;\n\t\tconst promises = [new Promise((resolve) => {\n\t\t\tstop = watch([r, value], ([v1, v2]) => {\n\t\t\t\tif (isNot !== (v1 === v2)) {\n\t\t\t\t\tif (stop) stop();\n\t\t\t\t\telse nextTick(() => stop === null || stop === void 0 ? void 0 : stop());\n\t\t\t\t\tresolve(v1);\n\t\t\t\t}\n\t\t\t}, {\n\t\t\t\tflush,\n\t\t\t\tdeep,\n\t\t\t\timmediate: true\n\t\t\t});\n\t\t})];\n\t\tif (timeout != null) promises.push(promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r)).finally(() => {\n\t\t\tstop === null || stop === void 0 || stop();\n\t\t\treturn toValue(r);\n\t\t}));\n\t\treturn Promise.race(promises);\n\t}\n\tfunction toBeTruthy(options) {\n\t\treturn toMatch((v) => Boolean(v), options);\n\t}\n\tfunction toBeNull(options) {\n\t\treturn toBe(null, options);\n\t}\n\tfunction toBeUndefined(options) {\n\t\treturn toBe(void 0, options);\n\t}\n\tfunction toBeNaN(options) {\n\t\treturn toMatch(Number.isNaN, options);\n\t}\n\tfunction toContains(value, options) {\n\t\treturn toMatch((v) => {\n\t\t\tconst array = Array.from(v);\n\t\t\treturn array.includes(value) || array.includes(toValue(value));\n\t\t}, options);\n\t}\n\tfunction changed(options) {\n\t\treturn changedTimes(1, options);\n\t}\n\tfunction changedTimes(n = 1, options) {\n\t\tlet count = -1;\n\t\treturn toMatch(() => {\n\t\t\tcount += 1;\n\t\t\treturn count >= n;\n\t\t}, options);\n\t}\n\tif (Array.isArray(toValue(r))) return {\n\t\ttoMatch,\n\t\ttoContains,\n\t\tchanged,\n\t\tchangedTimes,\n\t\tget not() {\n\t\t\treturn createUntil(r, !isNot);\n\t\t}\n\t};\n\telse return {\n\t\ttoMatch,\n\t\ttoBe,\n\t\ttoBeTruthy,\n\t\ttoBeNull,\n\t\ttoBeNaN,\n\t\ttoBeUndefined,\n\t\tchanged,\n\t\tchangedTimes,\n\t\tget not() {\n\t\t\treturn createUntil(r, !isNot);\n\t\t}\n\t};\n}\nfunction until(r) {\n\treturn createUntil(r);\n}\n\n//#endregion\n//#region useArrayDifference/index.ts\nfunction defaultComparator(value, othVal) {\n\treturn value === othVal;\n}\n/**\n* Reactive get array difference of two array\n* @see https://vueuse.org/useArrayDifference\n* @returns - the difference of two array\n* @param args\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useArrayDifference(...args) {\n\tvar _args$, _args$2;\n\tconst list = args[0];\n\tconst values = args[1];\n\tlet compareFn = (_args$ = args[2]) !== null && _args$ !== void 0 ? _args$ : defaultComparator;\n\tconst { symmetric = false } = (_args$2 = args[3]) !== null && _args$2 !== void 0 ? _args$2 : {};\n\tif (typeof compareFn === \"string\") {\n\t\tconst key = compareFn;\n\t\tcompareFn = (value, othVal) => value[key] === othVal[key];\n\t}\n\tconst diff1 = computed(() => toValue(list).filter((x) => toValue(values).findIndex((y) => compareFn(x, y)) === -1));\n\tif (symmetric) {\n\t\tconst diff2 = computed(() => toValue(values).filter((x) => toValue(list).findIndex((y) => compareFn(x, y)) === -1));\n\t\treturn computed(() => symmetric ? [...toValue(diff1), ...toValue(diff2)] : toValue(diff1));\n\t} else return diff1;\n}\n\n//#endregion\n//#region useArrayEvery/index.ts\n/**\n* Reactive `Array.every`\n*\n* @see https://vueuse.org/useArrayEvery\n* @param list - the array was called upon.\n* @param fn - a function to test each element.\n*\n* @returns **true** if the `fn` function returns a **truthy** value for every element from the array. Otherwise, **false**.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useArrayEvery(list, fn) {\n\treturn computed(() => toValue(list).every((element, index, array) => fn(toValue(element), index, array)));\n}\n\n//#endregion\n//#region useArrayFilter/index.ts\n/**\n* Reactive `Array.filter`\n*\n* @see https://vueuse.org/useArrayFilter\n* @param list - the array was called upon.\n* @param fn - a function that is called for every element of the given `list`. Each time `fn` executes, the returned value is added to the new array.\n*\n* @returns a shallow copy of a portion of the given array, filtered down to just the elements from the given array that pass the test implemented by the provided function. If no elements pass the test, an empty array will be returned.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useArrayFilter(list, fn) {\n\treturn computed(() => toValue(list).map((i) => toValue(i)).filter(fn));\n}\n\n//#endregion\n//#region useArrayFind/index.ts\n/**\n* Reactive `Array.find`\n*\n* @see https://vueuse.org/useArrayFind\n* @param list - the array was called upon.\n* @param fn - a function to test each element.\n*\n* @returns the first element in the array that satisfies the provided testing function. Otherwise, undefined is returned.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useArrayFind(list, fn) {\n\treturn computed(() => toValue(toValue(list).find((element, index, array) => fn(toValue(element), index, array))));\n}\n\n//#endregion\n//#region useArrayFindIndex/index.ts\n/**\n* Reactive `Array.findIndex`\n*\n* @see https://vueuse.org/useArrayFindIndex\n* @param list - the array was called upon.\n* @param fn - a function to test each element.\n*\n* @returns the index of the first element in the array that passes the test. Otherwise, \"-1\".\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useArrayFindIndex(list, fn) {\n\treturn computed(() => toValue(list).findIndex((element, index, array) => fn(toValue(element), index, array)));\n}\n\n//#endregion\n//#region useArrayFindLast/index.ts\nfunction findLast(arr, cb) {\n\tlet index = arr.length;\n\twhile (index-- > 0) if (cb(arr[index], index, arr)) return arr[index];\n}\n/**\n* Reactive `Array.findLast`\n*\n* @see https://vueuse.org/useArrayFindLast\n* @param list - the array was called upon.\n* @param fn - a function to test each element.\n*\n* @returns the last element in the array that satisfies the provided testing function. Otherwise, undefined is returned.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useArrayFindLast(list, fn) {\n\treturn computed(() => toValue(!Array.prototype.findLast ? findLast(toValue(list), (element, index, array) => fn(toValue(element), index, array)) : toValue(list).findLast((element, index, array) => fn(toValue(element), index, array))));\n}\n\n//#endregion\n//#region useArrayIncludes/index.ts\nfunction isArrayIncludesOptions(obj) {\n\treturn isObject(obj) && containsProp(obj, \"formIndex\", \"comparator\");\n}\n/**\n* Reactive `Array.includes`\n*\n* @see https://vueuse.org/useArrayIncludes\n*\n* @returns true if the `value` is found in the array. Otherwise, false.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useArrayIncludes(...args) {\n\tvar _comparator;\n\tconst list = args[0];\n\tconst value = args[1];\n\tlet comparator = args[2];\n\tlet formIndex = 0;\n\tif (isArrayIncludesOptions(comparator)) {\n\t\tvar _comparator$fromIndex;\n\t\tformIndex = (_comparator$fromIndex = comparator.fromIndex) !== null && _comparator$fromIndex !== void 0 ? _comparator$fromIndex : 0;\n\t\tcomparator = comparator.comparator;\n\t}\n\tif (typeof comparator === \"string\") {\n\t\tconst key = comparator;\n\t\tcomparator = (element, value$1) => element[key] === toValue(value$1);\n\t}\n\tcomparator = (_comparator = comparator) !== null && _comparator !== void 0 ? _comparator : ((element, value$1) => element === toValue(value$1));\n\treturn computed(() => toValue(list).slice(formIndex).some((element, index, array) => comparator(toValue(element), toValue(value), index, toValue(array))));\n}\n\n//#endregion\n//#region useArrayJoin/index.ts\n/**\n* Reactive `Array.join`\n*\n* @see https://vueuse.org/useArrayJoin\n* @param list - the array was called upon.\n* @param separator - a string to separate each pair of adjacent elements of the array. If omitted, the array elements are separated with a comma (\",\").\n*\n* @returns a string with all array elements joined. If arr.length is 0, the empty string is returned.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useArrayJoin(list, separator) {\n\treturn computed(() => toValue(list).map((i) => toValue(i)).join(toValue(separator)));\n}\n\n//#endregion\n//#region useArrayMap/index.ts\n/**\n* Reactive `Array.map`\n*\n* @see https://vueuse.org/useArrayMap\n* @param list - the array was called upon.\n* @param fn - a function that is called for every element of the given `list`. Each time `fn` executes, the returned value is added to the new array.\n*\n* @returns a new array with each element being the result of the callback function.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useArrayMap(list, fn) {\n\treturn computed(() => toValue(list).map((i) => toValue(i)).map(fn));\n}\n\n//#endregion\n//#region useArrayReduce/index.ts\n/**\n* Reactive `Array.reduce`\n*\n* @see https://vueuse.org/useArrayReduce\n* @param list - the array was called upon.\n* @param reducer - a \"reducer\" function.\n* @param args\n*\n* @returns the value that results from running the \"reducer\" callback function to completion over the entire array.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useArrayReduce(list, reducer, ...args) {\n\tconst reduceCallback = (sum, value, index) => reducer(toValue(sum), toValue(value), index);\n\treturn computed(() => {\n\t\tconst resolved = toValue(list);\n\t\treturn args.length ? resolved.reduce(reduceCallback, typeof args[0] === \"function\" ? toValue(args[0]()) : toValue(args[0])) : resolved.reduce(reduceCallback);\n\t});\n}\n\n//#endregion\n//#region useArraySome/index.ts\n/**\n* Reactive `Array.some`\n*\n* @see https://vueuse.org/useArraySome\n* @param list - the array was called upon.\n* @param fn - a function to test each element.\n*\n* @returns **true** if the `fn` function returns a **truthy** value for any element from the array. Otherwise, **false**.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useArraySome(list, fn) {\n\treturn computed(() => toValue(list).some((element, index, array) => fn(toValue(element), index, array)));\n}\n\n//#endregion\n//#region useArrayUnique/index.ts\nfunction uniq(array) {\n\treturn Array.from(new Set(array));\n}\nfunction uniqueElementsBy(array, fn) {\n\treturn array.reduce((acc, v) => {\n\t\tif (!acc.some((x) => fn(v, x, array))) acc.push(v);\n\t\treturn acc;\n\t}, []);\n}\n/**\n* reactive unique array\n* @see https://vueuse.org/useArrayUnique\n* @param list - the array was called upon.\n* @param compareFn\n* @returns A computed ref that returns a unique array of items.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useArrayUnique(list, compareFn) {\n\treturn computed(() => {\n\t\tconst resolvedList = toValue(list).map((element) => toValue(element));\n\t\treturn compareFn ? uniqueElementsBy(resolvedList, compareFn) : uniq(resolvedList);\n\t});\n}\n\n//#endregion\n//#region useCounter/index.ts\n/**\n* Basic counter with utility functions.\n*\n* @see https://vueuse.org/useCounter\n* @param [initialValue]\n* @param options\n*/\nfunction useCounter(initialValue = 0, options = {}) {\n\tlet _initialValue = unref(initialValue);\n\tconst count = shallowRef(initialValue);\n\tconst { max = Number.POSITIVE_INFINITY, min = Number.NEGATIVE_INFINITY } = options;\n\tconst inc = (delta = 1) => count.value = Math.max(Math.min(max, count.value + delta), min);\n\tconst dec = (delta = 1) => count.value = Math.min(Math.max(min, count.value - delta), max);\n\tconst get$1 = () => count.value;\n\tconst set$1 = (val) => count.value = Math.max(min, Math.min(max, val));\n\tconst reset = (val = _initialValue) => {\n\t\t_initialValue = val;\n\t\treturn set$1(val);\n\t};\n\treturn {\n\t\tcount: shallowReadonly(count),\n\t\tinc,\n\t\tdec,\n\t\tget: get$1,\n\t\tset: set$1,\n\t\treset\n\t};\n}\n\n//#endregion\n//#region useDateFormat/index.ts\nconst REGEX_PARSE = /^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[T\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/i;\nconst REGEX_FORMAT = /[YMDHhms]o|\\[([^\\]]+)\\]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|z{1,4}|SSS/g;\nfunction defaultMeridiem(hours, minutes, isLowercase, hasPeriod) {\n\tlet m = hours < 12 ? \"AM\" : \"PM\";\n\tif (hasPeriod) m = m.split(\"\").reduce((acc, curr) => acc += `${curr}.`, \"\");\n\treturn isLowercase ? m.toLowerCase() : m;\n}\nfunction formatOrdinal(num) {\n\tconst suffixes = [\n\t\t\"th\",\n\t\t\"st\",\n\t\t\"nd\",\n\t\t\"rd\"\n\t];\n\tconst v = num % 100;\n\treturn num + (suffixes[(v - 20) % 10] || suffixes[v] || suffixes[0]);\n}\nfunction formatDate(date, formatStr, options = {}) {\n\tvar _options$customMeridi;\n\tconst years = date.getFullYear();\n\tconst month = date.getMonth();\n\tconst days = date.getDate();\n\tconst hours = date.getHours();\n\tconst minutes = date.getMinutes();\n\tconst seconds = date.getSeconds();\n\tconst milliseconds = date.getMilliseconds();\n\tconst day = date.getDay();\n\tconst meridiem = (_options$customMeridi = options.customMeridiem) !== null && _options$customMeridi !== void 0 ? _options$customMeridi : defaultMeridiem;\n\tconst stripTimeZone = (dateString) => {\n\t\tvar _dateString$split$;\n\t\treturn (_dateString$split$ = dateString.split(\" \")[1]) !== null && _dateString$split$ !== void 0 ? _dateString$split$ : \"\";\n\t};\n\tconst matches = {\n\t\tYo: () => formatOrdinal(years),\n\t\tYY: () => String(years).slice(-2),\n\t\tYYYY: () => years,\n\t\tM: () => month + 1,\n\t\tMo: () => formatOrdinal(month + 1),\n\t\tMM: () => `${month + 1}`.padStart(2, \"0\"),\n\t\tMMM: () => date.toLocaleDateString(toValue(options.locales), { month: \"short\" }),\n\t\tMMMM: () => date.toLocaleDateString(toValue(options.locales), { month: \"long\" }),\n\t\tD: () => String(days),\n\t\tDo: () => formatOrdinal(days),\n\t\tDD: () => `${days}`.padStart(2, \"0\"),\n\t\tH: () => String(hours),\n\t\tHo: () => formatOrdinal(hours),\n\t\tHH: () => `${hours}`.padStart(2, \"0\"),\n\t\th: () => `${hours % 12 || 12}`.padStart(1, \"0\"),\n\t\tho: () => formatOrdinal(hours % 12 || 12),\n\t\thh: () => `${hours % 12 || 12}`.padStart(2, \"0\"),\n\t\tm: () => String(minutes),\n\t\tmo: () => formatOrdinal(minutes),\n\t\tmm: () => `${minutes}`.padStart(2, \"0\"),\n\t\ts: () => String(seconds),\n\t\tso: () => formatOrdinal(seconds),\n\t\tss: () => `${seconds}`.padStart(2, \"0\"),\n\t\tSSS: () => `${milliseconds}`.padStart(3, \"0\"),\n\t\td: () => day,\n\t\tdd: () => date.toLocaleDateString(toValue(options.locales), { weekday: \"narrow\" }),\n\t\tddd: () => date.toLocaleDateString(toValue(options.locales), { weekday: \"short\" }),\n\t\tdddd: () => date.toLocaleDateString(toValue(options.locales), { weekday: \"long\" }),\n\t\tA: () => meridiem(hours, minutes),\n\t\tAA: () => meridiem(hours, minutes, false, true),\n\t\ta: () => meridiem(hours, minutes, true),\n\t\taa: () => meridiem(hours, minutes, true, true),\n\t\tz: () => stripTimeZone(date.toLocaleDateString(toValue(options.locales), { timeZoneName: \"shortOffset\" })),\n\t\tzz: () => stripTimeZone(date.toLocaleDateString(toValue(options.locales), { timeZoneName: \"shortOffset\" })),\n\t\tzzz: () => stripTimeZone(date.toLocaleDateString(toValue(options.locales), { timeZoneName: \"shortOffset\" })),\n\t\tzzzz: () => stripTimeZone(date.toLocaleDateString(toValue(options.locales), { timeZoneName: \"longOffset\" }))\n\t};\n\treturn formatStr.replace(REGEX_FORMAT, (match, $1) => {\n\t\tvar _ref, _matches$match;\n\t\treturn (_ref = $1 !== null && $1 !== void 0 ? $1 : (_matches$match = matches[match]) === null || _matches$match === void 0 ? void 0 : _matches$match.call(matches)) !== null && _ref !== void 0 ? _ref : match;\n\t});\n}\nfunction normalizeDate(date) {\n\tif (date === null) return /* @__PURE__ */ new Date(NaN);\n\tif (date === void 0) return /* @__PURE__ */ new Date();\n\tif (date instanceof Date) return new Date(date);\n\tif (typeof date === \"string\" && !/Z$/i.test(date)) {\n\t\tconst d = date.match(REGEX_PARSE);\n\t\tif (d) {\n\t\t\tconst m = d[2] - 1 || 0;\n\t\t\tconst ms = (d[7] || \"0\").substring(0, 3);\n\t\t\treturn new Date(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms);\n\t\t}\n\t}\n\treturn new Date(date);\n}\n/**\n* Get the formatted date according to the string of tokens passed in.\n*\n* @see https://vueuse.org/useDateFormat\n* @param date - The date to format, can either be a `Date` object, a timestamp, or a string\n* @param formatStr - The combination of tokens to format the date\n* @param options - UseDateFormatOptions\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useDateFormat(date, formatStr = \"HH:mm:ss\", options = {}) {\n\treturn computed(() => formatDate(normalizeDate(toValue(date)), toValue(formatStr), options));\n}\n\n//#endregion\n//#region useIntervalFn/index.ts\n/**\n* Wrapper for `setInterval` with controls\n*\n* @see https://vueuse.org/useIntervalFn\n* @param cb\n* @param interval\n* @param options\n*/\nfunction useIntervalFn(cb, interval = 1e3, options = {}) {\n\tconst { immediate = true, immediateCallback = false } = options;\n\tlet timer = null;\n\tconst isActive = shallowRef(false);\n\tfunction clean() {\n\t\tif (timer) {\n\t\t\tclearInterval(timer);\n\t\t\ttimer = null;\n\t\t}\n\t}\n\tfunction pause() {\n\t\tisActive.value = false;\n\t\tclean();\n\t}\n\tfunction resume() {\n\t\tconst intervalValue = toValue(interval);\n\t\tif (intervalValue <= 0) return;\n\t\tisActive.value = true;\n\t\tif (immediateCallback) cb();\n\t\tclean();\n\t\tif (isActive.value) timer = setInterval(cb, intervalValue);\n\t}\n\tif (immediate && isClient) resume();\n\tif (isRef(interval) || typeof interval === \"function\") tryOnScopeDispose(watch(interval, () => {\n\t\tif (isActive.value && isClient) resume();\n\t}));\n\ttryOnScopeDispose(pause);\n\treturn {\n\t\tisActive: shallowReadonly(isActive),\n\t\tpause,\n\t\tresume\n\t};\n}\n\n//#endregion\n//#region useInterval/index.ts\nfunction useInterval(interval = 1e3, options = {}) {\n\tconst { controls: exposeControls = false, immediate = true, callback } = options;\n\tconst counter = shallowRef(0);\n\tconst update = () => counter.value += 1;\n\tconst reset = () => {\n\t\tcounter.value = 0;\n\t};\n\tconst controls = useIntervalFn(callback ? () => {\n\t\tupdate();\n\t\tcallback(counter.value);\n\t} : update, interval, { immediate });\n\tif (exposeControls) return {\n\t\tcounter: shallowReadonly(counter),\n\t\treset,\n\t\t...controls\n\t};\n\telse return shallowReadonly(counter);\n}\n\n//#endregion\n//#region useLastChanged/index.ts\nfunction useLastChanged(source, options = {}) {\n\tvar _options$initialValue;\n\tconst ms = shallowRef((_options$initialValue = options.initialValue) !== null && _options$initialValue !== void 0 ? _options$initialValue : null);\n\twatch(source, () => ms.value = timestamp(), options);\n\treturn shallowReadonly(ms);\n}\n\n//#endregion\n//#region useTimeoutFn/index.ts\n/**\n* Wrapper for `setTimeout` with controls.\n*\n* @param cb\n* @param interval\n* @param options\n*/\nfunction useTimeoutFn(cb, interval, options = {}) {\n\tconst { immediate = true, immediateCallback = false } = options;\n\tconst isPending = shallowRef(false);\n\tlet timer;\n\tfunction clear() {\n\t\tif (timer) {\n\t\t\tclearTimeout(timer);\n\t\t\ttimer = void 0;\n\t\t}\n\t}\n\tfunction stop() {\n\t\tisPending.value = false;\n\t\tclear();\n\t}\n\tfunction start(...args) {\n\t\tif (immediateCallback) cb();\n\t\tclear();\n\t\tisPending.value = true;\n\t\ttimer = setTimeout(() => {\n\t\t\tisPending.value = false;\n\t\t\ttimer = void 0;\n\t\t\tcb(...args);\n\t\t}, toValue(interval));\n\t}\n\tif (immediate) {\n\t\tisPending.value = true;\n\t\tif (isClient) start();\n\t}\n\ttryOnScopeDispose(stop);\n\treturn {\n\t\tisPending: shallowReadonly(isPending),\n\t\tstart,\n\t\tstop\n\t};\n}\n\n//#endregion\n//#region useTimeout/index.ts\nfunction useTimeout(interval = 1e3, options = {}) {\n\tconst { controls: exposeControls = false, callback } = options;\n\tconst controls = useTimeoutFn(callback !== null && callback !== void 0 ? callback : noop, interval, options);\n\tconst ready = computed(() => !controls.isPending.value);\n\tif (exposeControls) return {\n\t\tready,\n\t\t...controls\n\t};\n\telse return ready;\n}\n\n//#endregion\n//#region useToNumber/index.ts\n/**\n* Reactively convert a string ref to number.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useToNumber(value, options = {}) {\n\tconst { method = \"parseFloat\", radix, nanToZero } = options;\n\treturn computed(() => {\n\t\tlet resolved = toValue(value);\n\t\tif (typeof method === \"function\") resolved = method(resolved);\n\t\telse if (typeof resolved === \"string\") resolved = Number[method](resolved, radix);\n\t\tif (nanToZero && Number.isNaN(resolved)) resolved = 0;\n\t\treturn resolved;\n\t});\n}\n\n//#endregion\n//#region useToString/index.ts\n/**\n* Reactively convert a ref to string.\n*\n* @see https://vueuse.org/useToString\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useToString(value) {\n\treturn computed(() => `${toValue(value)}`);\n}\n\n//#endregion\n//#region useToggle/index.ts\n/**\n* A boolean ref with a toggler\n*\n* @see https://vueuse.org/useToggle\n* @param [initialValue]\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useToggle(initialValue = false, options = {}) {\n\tconst { truthyValue = true, falsyValue = false } = options;\n\tconst valueIsRef = isRef(initialValue);\n\tconst _value = shallowRef(initialValue);\n\tfunction toggle(value) {\n\t\tif (arguments.length) {\n\t\t\t_value.value = value;\n\t\t\treturn _value.value;\n\t\t} else {\n\t\t\tconst truthy = toValue(truthyValue);\n\t\t\t_value.value = _value.value === truthy ? toValue(falsyValue) : truthy;\n\t\t\treturn _value.value;\n\t\t}\n\t}\n\tif (valueIsRef) return toggle;\n\telse return [_value, toggle];\n}\n\n//#endregion\n//#region watchArray/index.ts\n/**\n* Watch for an array with additions and removals.\n*\n* @see https://vueuse.org/watchArray\n*/\nfunction watchArray(source, cb, options) {\n\tlet oldList = (options === null || options === void 0 ? void 0 : options.immediate) ? [] : [...typeof source === \"function\" ? source() : Array.isArray(source) ? source : toValue(source)];\n\treturn watch(source, (newList, _, onCleanup) => {\n\t\tconst oldListRemains = Array.from({ length: oldList.length });\n\t\tconst added = [];\n\t\tfor (const obj of newList) {\n\t\t\tlet found = false;\n\t\t\tfor (let i = 0; i < oldList.length; i++) if (!oldListRemains[i] && obj === oldList[i]) {\n\t\t\t\toldListRemains[i] = true;\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (!found) added.push(obj);\n\t\t}\n\t\tconst removed = oldList.filter((_$1, i) => !oldListRemains[i]);\n\t\tcb(newList, oldList, added, removed, onCleanup);\n\t\toldList = [...newList];\n\t}, options);\n}\n\n//#endregion\n//#region watchAtMost/index.ts\nfunction watchAtMost(source, cb, options) {\n\tconst { count,...watchOptions } = options;\n\tconst current = shallowRef(0);\n\tconst { stop, resume, pause } = watchWithFilter(source, (...args) => {\n\t\tcurrent.value += 1;\n\t\tif (current.value >= toValue(count)) nextTick(() => stop());\n\t\tcb(...args);\n\t}, watchOptions);\n\treturn {\n\t\tcount: current,\n\t\tstop,\n\t\tresume,\n\t\tpause\n\t};\n}\n\n//#endregion\n//#region watchDebounced/index.ts\nfunction watchDebounced(source, cb, options = {}) {\n\tconst { debounce = 0, maxWait = void 0,...watchOptions } = options;\n\treturn watchWithFilter(source, cb, {\n\t\t...watchOptions,\n\t\teventFilter: debounceFilter(debounce, { maxWait })\n\t});\n}\n/** @deprecated use `watchDebounced` instead */\nconst debouncedWatch = watchDebounced;\n\n//#endregion\n//#region watchDeep/index.ts\n/**\n* Shorthand for watching value with {deep: true}\n*\n* @see https://vueuse.org/watchDeep\n*/\nfunction watchDeep(source, cb, options) {\n\treturn watch(source, cb, {\n\t\t...options,\n\t\tdeep: true\n\t});\n}\n\n//#endregion\n//#region watchIgnorable/index.ts\nfunction watchIgnorable(source, cb, options = {}) {\n\tconst { eventFilter = bypassFilter,...watchOptions } = options;\n\tconst filteredCb = createFilterWrapper(eventFilter, cb);\n\tlet ignoreUpdates;\n\tlet ignorePrevAsyncUpdates;\n\tlet stop;\n\tif (watchOptions.flush === \"sync\") {\n\t\tlet ignore = false;\n\t\tignorePrevAsyncUpdates = () => {};\n\t\tignoreUpdates = (updater) => {\n\t\t\tignore = true;\n\t\t\tupdater();\n\t\t\tignore = false;\n\t\t};\n\t\tstop = watch(source, (...args) => {\n\t\t\tif (!ignore) filteredCb(...args);\n\t\t}, watchOptions);\n\t} else {\n\t\tconst disposables = [];\n\t\tlet ignoreCounter = 0;\n\t\tlet syncCounter = 0;\n\t\tignorePrevAsyncUpdates = () => {\n\t\t\tignoreCounter = syncCounter;\n\t\t};\n\t\tdisposables.push(watch(source, () => {\n\t\t\tsyncCounter++;\n\t\t}, {\n\t\t\t...watchOptions,\n\t\t\tflush: \"sync\"\n\t\t}));\n\t\tignoreUpdates = (updater) => {\n\t\t\tconst syncCounterPrev = syncCounter;\n\t\t\tupdater();\n\t\t\tignoreCounter += syncCounter - syncCounterPrev;\n\t\t};\n\t\tdisposables.push(watch(source, (...args) => {\n\t\t\tconst ignore = ignoreCounter > 0 && ignoreCounter === syncCounter;\n\t\t\tignoreCounter = 0;\n\t\t\tsyncCounter = 0;\n\t\t\tif (ignore) return;\n\t\t\tfilteredCb(...args);\n\t\t}, watchOptions));\n\t\tstop = () => {\n\t\t\tdisposables.forEach((fn) => fn());\n\t\t};\n\t}\n\treturn {\n\t\tstop,\n\t\tignoreUpdates,\n\t\tignorePrevAsyncUpdates\n\t};\n}\n/** @deprecated use `watchIgnorable` instead */\nconst ignorableWatch = watchIgnorable;\n\n//#endregion\n//#region watchImmediate/index.ts\n/**\n* Shorthand for watching value with {immediate: true}\n*\n* @see https://vueuse.org/watchImmediate\n*/\nfunction watchImmediate(source, cb, options) {\n\treturn watch(source, cb, {\n\t\t...options,\n\t\timmediate: true\n\t});\n}\n\n//#endregion\n//#region watchOnce/index.ts\n/**\n* Shorthand for watching value with { once: true }\n*\n* @see https://vueuse.org/watchOnce\n*/\nfunction watchOnce(source, cb, options) {\n\treturn watch(source, cb, {\n\t\t...options,\n\t\tonce: true\n\t});\n}\n\n//#endregion\n//#region watchThrottled/index.ts\nfunction watchThrottled(source, cb, options = {}) {\n\tconst { throttle = 0, trailing = true, leading = true,...watchOptions } = options;\n\treturn watchWithFilter(source, cb, {\n\t\t...watchOptions,\n\t\teventFilter: throttleFilter(throttle, trailing, leading)\n\t});\n}\n/** @deprecated use `watchThrottled` instead */\nconst throttledWatch = watchThrottled;\n\n//#endregion\n//#region watchTriggerable/index.ts\nfunction watchTriggerable(source, cb, options = {}) {\n\tlet cleanupFn;\n\tfunction onEffect() {\n\t\tif (!cleanupFn) return;\n\t\tconst fn = cleanupFn;\n\t\tcleanupFn = void 0;\n\t\tfn();\n\t}\n\t/** Register the function `cleanupFn` */\n\tfunction onCleanup(callback) {\n\t\tcleanupFn = callback;\n\t}\n\tconst _cb = (value, oldValue) => {\n\t\tonEffect();\n\t\treturn cb(value, oldValue, onCleanup);\n\t};\n\tconst res = watchIgnorable(source, _cb, options);\n\tconst { ignoreUpdates } = res;\n\tconst trigger = () => {\n\t\tlet res$1;\n\t\tignoreUpdates(() => {\n\t\t\tres$1 = _cb(getWatchSources(source), getOldValue(source));\n\t\t});\n\t\treturn res$1;\n\t};\n\treturn {\n\t\t...res,\n\t\ttrigger\n\t};\n}\nfunction getWatchSources(sources) {\n\tif (isReactive(sources)) return sources;\n\tif (Array.isArray(sources)) return sources.map((item) => toValue(item));\n\treturn toValue(sources);\n}\nfunction getOldValue(source) {\n\treturn Array.isArray(source) ? source.map(() => void 0) : void 0;\n}\n\n//#endregion\n//#region whenever/index.ts\n/**\n* Shorthand for watching value to be truthy\n*\n* @see https://vueuse.org/whenever\n*/\nfunction whenever(source, cb, options) {\n\tconst stop = watch(source, (v, ov, onInvalidate) => {\n\t\tif (v) {\n\t\t\tif (options === null || options === void 0 ? void 0 : options.once) nextTick(() => stop());\n\t\t\tcb(v, ov, onInvalidate);\n\t\t}\n\t}, {\n\t\t...options,\n\t\tonce: false\n\t});\n\treturn stop;\n}\n\n//#endregion\nexport { assert, autoResetRef, bypassFilter, camelize, clamp, computedEager, computedWithControl, containsProp, controlledComputed, controlledRef, createEventHook, createFilterWrapper, createGlobalState, createInjectionState, createReactiveFn, createRef, createSharedComposable, createSingletonPromise, debounceFilter, debouncedRef, debouncedWatch, eagerComputed, extendRef, formatDate, get, getLifeCycleTarget, hasOwn, hyphenate, identity, ignorableWatch, increaseWithUnit, injectLocal, invoke, isClient, isDef, isDefined, isIOS, isObject, isWorker, makeDestructurable, noop, normalizeDate, notNullish, now, objectEntries, objectOmit, objectPick, pausableFilter, pausableWatch, promiseTimeout, provideLocal, pxValue, rand, reactify, reactifyObject, reactiveComputed, reactiveOmit, reactivePick, refAutoReset, refDebounced, refDefault, refManualReset, refThrottled, refWithControl, set, syncRef, syncRefs, throttleFilter, throttledRef, throttledWatch, timestamp, toArray, toReactive, toRef, toRefs, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useArrayDifference, useArrayEvery, useArrayFilter, useArrayFind, useArrayFindIndex, useArrayFindLast, useArrayIncludes, useArrayJoin, useArrayMap, useArrayReduce, useArraySome, useArrayUnique, useCounter, useDateFormat, useDebounce, useDebounceFn, useInterval, useIntervalFn, useLastChanged, useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useToNumber, useToString, useToggle, watchArray, watchAtMost, watchDebounced, watchDeep, watchIgnorable, watchImmediate, watchOnce, watchPausable, watchThrottled, watchTriggerable, watchWithFilter, whenever };","import { bypassFilter, camelize, clamp, computedWithControl, containsProp, createEventHook, createFilterWrapper, createRef, createSingletonPromise, debounceFilter, hasOwn, identity, increaseWithUnit, injectLocal, isClient, isDef, isIOS, isObject, isWorker, makeDestructurable, noop, notNullish, objectEntries, objectOmit, objectPick, pausableFilter, pausableWatch, promiseTimeout, provideLocal, pxValue, syncRef, throttleFilter, timestamp, toArray, toRef, toRefs, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useDebounceFn, useIntervalFn, useThrottleFn, useTimeoutFn, watchIgnorable, watchImmediate, watchOnce, watchWithFilter, whenever } from \"@vueuse/shared\";\nimport { Fragment, TransitionGroup, computed, customRef, defineComponent, getCurrentInstance, getCurrentScope, h, hasInjectionContext, inject, isReadonly, isRef, markRaw, nextTick, onBeforeUpdate, onMounted, onUpdated, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, toRaw, toValue, unref, watch, watchEffect } from \"vue\";\n\nexport * from \"@vueuse/shared\"\n\n//#region computedAsync/index.ts\nfunction computedAsync(evaluationCallback, initialState, optionsOrRef) {\n\tvar _globalThis$reportErr;\n\tlet options;\n\tif (isRef(optionsOrRef)) options = { evaluating: optionsOrRef };\n\telse options = optionsOrRef || {};\n\tconst { lazy = false, flush = \"sync\", evaluating = void 0, shallow = true, onError = (_globalThis$reportErr = globalThis.reportError) !== null && _globalThis$reportErr !== void 0 ? _globalThis$reportErr : noop } = options;\n\tconst started = shallowRef(!lazy);\n\tconst current = shallow ? shallowRef(initialState) : ref(initialState);\n\tlet counter = 0;\n\twatchEffect(async (onInvalidate) => {\n\t\tif (!started.value) return;\n\t\tcounter++;\n\t\tconst counterAtBeginning = counter;\n\t\tlet hasFinished = false;\n\t\tif (evaluating) Promise.resolve().then(() => {\n\t\t\tevaluating.value = true;\n\t\t});\n\t\ttry {\n\t\t\tconst result = await evaluationCallback((cancelCallback) => {\n\t\t\t\tonInvalidate(() => {\n\t\t\t\t\tif (evaluating) evaluating.value = false;\n\t\t\t\t\tif (!hasFinished) cancelCallback();\n\t\t\t\t});\n\t\t\t});\n\t\t\tif (counterAtBeginning === counter) current.value = result;\n\t\t} catch (e) {\n\t\t\tonError(e);\n\t\t} finally {\n\t\t\tif (evaluating && counterAtBeginning === counter) evaluating.value = false;\n\t\t\thasFinished = true;\n\t\t}\n\t}, { flush });\n\tif (lazy) return computed(() => {\n\t\tstarted.value = true;\n\t\treturn current.value;\n\t});\n\telse return current;\n}\n/** @deprecated use `computedAsync` instead */\nconst asyncComputed = computedAsync;\n\n//#endregion\n//#region computedInject/index.ts\nfunction computedInject(key, options, defaultSource, treatDefaultAsFactory) {\n\tlet source = inject(key);\n\tif (defaultSource) source = inject(key, defaultSource);\n\tif (treatDefaultAsFactory) source = inject(key, defaultSource, treatDefaultAsFactory);\n\tif (typeof options === \"function\") return computed((oldValue) => options(source, oldValue));\n\telse return computed({\n\t\tget: (oldValue) => options.get(source, oldValue),\n\t\tset: options.set\n\t});\n}\n\n//#endregion\n//#region createReusableTemplate/index.ts\n/**\n* This function creates `define` and `reuse` components in pair,\n* It also allow to pass a generic to bind with type.\n*\n* @see https://vueuse.org/createReusableTemplate\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction createReusableTemplate(options = {}) {\n\tconst { inheritAttrs = true } = options;\n\tconst render = shallowRef();\n\tconst define = defineComponent({ setup(_, { slots }) {\n\t\treturn () => {\n\t\t\trender.value = slots.default;\n\t\t};\n\t} });\n\tconst reuse = defineComponent({\n\t\tinheritAttrs,\n\t\tprops: options.props,\n\t\tsetup(props, { attrs, slots }) {\n\t\t\treturn () => {\n\t\t\t\tvar _render$value;\n\t\t\t\tif (!render.value && true) throw new Error(\"[VueUse] Failed to find the definition of reusable template\");\n\t\t\t\tconst vnode = (_render$value = render.value) === null || _render$value === void 0 ? void 0 : _render$value.call(render, {\n\t\t\t\t\t...options.props == null ? keysToCamelKebabCase(attrs) : props,\n\t\t\t\t\t$slots: slots\n\t\t\t\t});\n\t\t\t\treturn inheritAttrs && (vnode === null || vnode === void 0 ? void 0 : vnode.length) === 1 ? vnode[0] : vnode;\n\t\t\t};\n\t\t}\n\t});\n\treturn makeDestructurable({\n\t\tdefine,\n\t\treuse\n\t}, [define, reuse]);\n}\nfunction keysToCamelKebabCase(obj) {\n\tconst newObj = {};\n\tfor (const key in obj) newObj[camelize(key)] = obj[key];\n\treturn newObj;\n}\n\n//#endregion\n//#region createTemplatePromise/index.ts\n/**\n* Creates a template promise component.\n*\n* @see https://vueuse.org/createTemplatePromise\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction createTemplatePromise(options = {}) {\n\tlet index = 0;\n\tconst instances = ref([]);\n\tfunction create(...args) {\n\t\tconst props = shallowReactive({\n\t\t\tkey: index++,\n\t\t\targs,\n\t\t\tpromise: void 0,\n\t\t\tresolve: () => {},\n\t\t\treject: () => {},\n\t\t\tisResolving: false,\n\t\t\toptions\n\t\t});\n\t\tinstances.value.push(props);\n\t\tprops.promise = new Promise((_resolve, _reject) => {\n\t\t\tprops.resolve = (v) => {\n\t\t\t\tprops.isResolving = true;\n\t\t\t\treturn _resolve(v);\n\t\t\t};\n\t\t\tprops.reject = _reject;\n\t\t}).finally(() => {\n\t\t\tprops.promise = void 0;\n\t\t\tconst index$1 = instances.value.indexOf(props);\n\t\t\tif (index$1 !== -1) instances.value.splice(index$1, 1);\n\t\t});\n\t\treturn props.promise;\n\t}\n\tfunction start(...args) {\n\t\tif (options.singleton && instances.value.length > 0) return instances.value[0].promise;\n\t\treturn create(...args);\n\t}\n\tconst component = defineComponent((_, { slots }) => {\n\t\tconst renderList = () => instances.value.map((props) => {\n\t\t\tvar _slots$default;\n\t\t\treturn h(Fragment, { key: props.key }, (_slots$default = slots.default) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots, props));\n\t\t});\n\t\tif (options.transition) return () => h(TransitionGroup, options.transition, renderList);\n\t\treturn renderList;\n\t});\n\tcomponent.start = start;\n\treturn component;\n}\n\n//#endregion\n//#region createUnrefFn/index.ts\n/**\n* Make a plain function accepting ref and raw values as arguments.\n* Returns the same value the unconverted function returns, with proper typing.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction createUnrefFn(fn) {\n\treturn function(...args) {\n\t\treturn fn.apply(this, args.map((i) => toValue(i)));\n\t};\n}\n\n//#endregion\n//#region _configurable.ts\nconst defaultWindow = isClient ? window : void 0;\nconst defaultDocument = isClient ? window.document : void 0;\nconst defaultNavigator = isClient ? window.navigator : void 0;\nconst defaultLocation = isClient ? window.location : void 0;\n\n//#endregion\n//#region unrefElement/index.ts\n/**\n* Get the dom element of a ref of element or Vue component instance\n*\n* @param elRef\n*/\nfunction unrefElement(elRef) {\n\tvar _$el;\n\tconst plain = toValue(elRef);\n\treturn (_$el = plain === null || plain === void 0 ? void 0 : plain.$el) !== null && _$el !== void 0 ? _$el : plain;\n}\n\n//#endregion\n//#region useEventListener/index.ts\nfunction useEventListener(...args) {\n\tconst register = (el, event, listener, options) => {\n\t\tel.addEventListener(event, listener, options);\n\t\treturn () => el.removeEventListener(event, listener, options);\n\t};\n\tconst firstParamTargets = computed(() => {\n\t\tconst test = toArray(toValue(args[0])).filter((e) => e != null);\n\t\treturn test.every((e) => typeof e !== \"string\") ? test : void 0;\n\t});\n\treturn watchImmediate(() => {\n\t\tvar _firstParamTargets$va, _firstParamTargets$va2;\n\t\treturn [\n\t\t\t(_firstParamTargets$va = (_firstParamTargets$va2 = firstParamTargets.value) === null || _firstParamTargets$va2 === void 0 ? void 0 : _firstParamTargets$va2.map((e) => unrefElement(e))) !== null && _firstParamTargets$va !== void 0 ? _firstParamTargets$va : [defaultWindow].filter((e) => e != null),\n\t\t\ttoArray(toValue(firstParamTargets.value ? args[1] : args[0])),\n\t\t\ttoArray(unref(firstParamTargets.value ? args[2] : args[1])),\n\t\t\ttoValue(firstParamTargets.value ? args[3] : args[2])\n\t\t];\n\t}, ([raw_targets, raw_events, raw_listeners, raw_options], _, onCleanup) => {\n\t\tif (!(raw_targets === null || raw_targets === void 0 ? void 0 : raw_targets.length) || !(raw_events === null || raw_events === void 0 ? void 0 : raw_events.length) || !(raw_listeners === null || raw_listeners === void 0 ? void 0 : raw_listeners.length)) return;\n\t\tconst optionsClone = isObject(raw_options) ? { ...raw_options } : raw_options;\n\t\tconst cleanups = raw_targets.flatMap((el) => raw_events.flatMap((event) => raw_listeners.map((listener) => register(el, event, listener, optionsClone))));\n\t\tonCleanup(() => {\n\t\t\tcleanups.forEach((fn) => fn());\n\t\t});\n\t}, { flush: \"post\" });\n}\n\n//#endregion\n//#region onClickOutside/index.ts\nlet _iOSWorkaround = false;\nfunction onClickOutside(target, handler, options = {}) {\n\tconst { window: window$1 = defaultWindow, ignore = [], capture = true, detectIframe = false, controls = false } = options;\n\tif (!window$1) return controls ? {\n\t\tstop: noop,\n\t\tcancel: noop,\n\t\ttrigger: noop\n\t} : noop;\n\tif (isIOS && !_iOSWorkaround) {\n\t\t_iOSWorkaround = true;\n\t\tconst listenerOptions = { passive: true };\n\t\tArray.from(window$1.document.body.children).forEach((el) => el.addEventListener(\"click\", noop, listenerOptions));\n\t\twindow$1.document.documentElement.addEventListener(\"click\", noop, listenerOptions);\n\t}\n\tlet shouldListen = true;\n\tconst shouldIgnore = (event) => {\n\t\treturn toValue(ignore).some((target$1) => {\n\t\t\tif (typeof target$1 === \"string\") return Array.from(window$1.document.querySelectorAll(target$1)).some((el) => el === event.target || event.composedPath().includes(el));\n\t\t\telse {\n\t\t\t\tconst el = unrefElement(target$1);\n\t\t\t\treturn el && (event.target === el || event.composedPath().includes(el));\n\t\t\t}\n\t\t});\n\t};\n\t/**\n\t* Determines if the given target has multiple root elements.\n\t* Referenced from: https://github.com/vuejs/test-utils/blob/ccb460be55f9f6be05ab708500a41ec8adf6f4bc/src/vue-wrapper.ts#L21\n\t*/\n\tfunction hasMultipleRoots(target$1) {\n\t\tconst vm = toValue(target$1);\n\t\treturn vm && vm.$.subTree.shapeFlag === 16;\n\t}\n\tfunction checkMultipleRoots(target$1, event) {\n\t\tconst vm = toValue(target$1);\n\t\tconst children = vm.$.subTree && vm.$.subTree.children;\n\t\tif (children == null || !Array.isArray(children)) return false;\n\t\treturn children.some((child) => child.el === event.target || event.composedPath().includes(child.el));\n\t}\n\tconst listener = (event) => {\n\t\tconst el = unrefElement(target);\n\t\tif (event.target == null) return;\n\t\tif (!(el instanceof Element) && hasMultipleRoots(target) && checkMultipleRoots(target, event)) return;\n\t\tif (!el || el === event.target || event.composedPath().includes(el)) return;\n\t\tif (\"detail\" in event && event.detail === 0) shouldListen = !shouldIgnore(event);\n\t\tif (!shouldListen) {\n\t\t\tshouldListen = true;\n\t\t\treturn;\n\t\t}\n\t\thandler(event);\n\t};\n\tlet isProcessingClick = false;\n\tconst cleanup = [\n\t\tuseEventListener(window$1, \"click\", (event) => {\n\t\t\tif (!isProcessingClick) {\n\t\t\t\tisProcessingClick = true;\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tisProcessingClick = false;\n\t\t\t\t}, 0);\n\t\t\t\tlistener(event);\n\t\t\t}\n\t\t}, {\n\t\t\tpassive: true,\n\t\t\tcapture\n\t\t}),\n\t\tuseEventListener(window$1, \"pointerdown\", (e) => {\n\t\t\tconst el = unrefElement(target);\n\t\t\tshouldListen = !shouldIgnore(e) && !!(el && !e.composedPath().includes(el));\n\t\t}, { passive: true }),\n\t\tdetectIframe && useEventListener(window$1, \"blur\", (event) => {\n\t\t\tsetTimeout(() => {\n\t\t\t\tvar _window$document$acti;\n\t\t\t\tconst el = unrefElement(target);\n\t\t\t\tif (((_window$document$acti = window$1.document.activeElement) === null || _window$document$acti === void 0 ? void 0 : _window$document$acti.tagName) === \"IFRAME\" && !(el === null || el === void 0 ? void 0 : el.contains(window$1.document.activeElement))) handler(event);\n\t\t\t}, 0);\n\t\t}, { passive: true })\n\t].filter(Boolean);\n\tconst stop = () => cleanup.forEach((fn) => fn());\n\tif (controls) return {\n\t\tstop,\n\t\tcancel: () => {\n\t\t\tshouldListen = false;\n\t\t},\n\t\ttrigger: (event) => {\n\t\t\tshouldListen = true;\n\t\t\tlistener(event);\n\t\t\tshouldListen = false;\n\t\t}\n\t};\n\treturn stop;\n}\n\n//#endregion\n//#region useMounted/index.ts\n/**\n* Mounted state in ref.\n*\n* @see https://vueuse.org/useMounted\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useMounted() {\n\tconst isMounted = shallowRef(false);\n\tconst instance = getCurrentInstance();\n\tif (instance) onMounted(() => {\n\t\tisMounted.value = true;\n\t}, instance);\n\treturn isMounted;\n}\n\n//#endregion\n//#region useSupported/index.ts\n/* @__NO_SIDE_EFFECTS__ */\nfunction useSupported(callback) {\n\tconst isMounted = useMounted();\n\treturn computed(() => {\n\t\tisMounted.value;\n\t\treturn Boolean(callback());\n\t});\n}\n\n//#endregion\n//#region useMutationObserver/index.ts\n/**\n* Watch for changes being made to the DOM tree.\n*\n* @see https://vueuse.org/useMutationObserver\n* @see https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver MutationObserver MDN\n* @param target\n* @param callback\n* @param options\n*/\nfunction useMutationObserver(target, callback, options = {}) {\n\tconst { window: window$1 = defaultWindow,...mutationOptions } = options;\n\tlet observer;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => window$1 && \"MutationObserver\" in window$1);\n\tconst cleanup = () => {\n\t\tif (observer) {\n\t\t\tobserver.disconnect();\n\t\t\tobserver = void 0;\n\t\t}\n\t};\n\tconst stopWatch = watch(computed(() => {\n\t\tconst items = toArray(toValue(target)).map(unrefElement).filter(notNullish);\n\t\treturn new Set(items);\n\t}), (newTargets) => {\n\t\tcleanup();\n\t\tif (isSupported.value && newTargets.size) {\n\t\t\tobserver = new MutationObserver(callback);\n\t\t\tnewTargets.forEach((el) => observer.observe(el, mutationOptions));\n\t\t}\n\t}, {\n\t\timmediate: true,\n\t\tflush: \"post\"\n\t});\n\tconst takeRecords = () => {\n\t\treturn observer === null || observer === void 0 ? void 0 : observer.takeRecords();\n\t};\n\tconst stop = () => {\n\t\tstopWatch();\n\t\tcleanup();\n\t};\n\ttryOnScopeDispose(stop);\n\treturn {\n\t\tisSupported,\n\t\tstop,\n\t\ttakeRecords\n\t};\n}\n\n//#endregion\n//#region onElementRemoval/index.ts\n/**\n* Fires when the element or any element containing it is removed.\n*\n* @param target\n* @param callback\n* @param options\n*/\nfunction onElementRemoval(target, callback, options = {}) {\n\tconst { window: window$1 = defaultWindow, document: document$1 = window$1 === null || window$1 === void 0 ? void 0 : window$1.document, flush = \"sync\" } = options;\n\tif (!window$1 || !document$1) return noop;\n\tlet stopFn;\n\tconst cleanupAndUpdate = (fn) => {\n\t\tstopFn === null || stopFn === void 0 || stopFn();\n\t\tstopFn = fn;\n\t};\n\tconst stopWatch = watchEffect(() => {\n\t\tconst el = unrefElement(target);\n\t\tif (el) {\n\t\t\tconst { stop } = useMutationObserver(document$1, (mutationsList) => {\n\t\t\t\tif (mutationsList.map((mutation) => [...mutation.removedNodes]).flat().some((node) => node === el || node.contains(el))) callback(mutationsList);\n\t\t\t}, {\n\t\t\t\twindow: window$1,\n\t\t\t\tchildList: true,\n\t\t\t\tsubtree: true\n\t\t\t});\n\t\t\tcleanupAndUpdate(stop);\n\t\t}\n\t}, { flush });\n\tconst stopHandle = () => {\n\t\tstopWatch();\n\t\tcleanupAndUpdate();\n\t};\n\ttryOnScopeDispose(stopHandle);\n\treturn stopHandle;\n}\n\n//#endregion\n//#region onKeyStroke/index.ts\nfunction createKeyPredicate(keyFilter) {\n\tif (typeof keyFilter === \"function\") return keyFilter;\n\telse if (typeof keyFilter === \"string\") return (event) => event.key === keyFilter;\n\telse if (Array.isArray(keyFilter)) return (event) => keyFilter.includes(event.key);\n\treturn () => true;\n}\nfunction onKeyStroke(...args) {\n\tlet key;\n\tlet handler;\n\tlet options = {};\n\tif (args.length === 3) {\n\t\tkey = args[0];\n\t\thandler = args[1];\n\t\toptions = args[2];\n\t} else if (args.length === 2) if (typeof args[1] === \"object\") {\n\t\tkey = true;\n\t\thandler = args[0];\n\t\toptions = args[1];\n\t} else {\n\t\tkey = args[0];\n\t\thandler = args[1];\n\t}\n\telse {\n\t\tkey = true;\n\t\thandler = args[0];\n\t}\n\tconst { target = defaultWindow, eventName = \"keydown\", passive = false, dedupe = false } = options;\n\tconst predicate = createKeyPredicate(key);\n\tconst listener = (e) => {\n\t\tif (e.repeat && toValue(dedupe)) return;\n\t\tif (predicate(e)) handler(e);\n\t};\n\treturn useEventListener(target, eventName, listener, passive);\n}\n/**\n* Listen to the keydown event of the given key.\n*\n* @see https://vueuse.org/onKeyStroke\n* @param key\n* @param handler\n* @param options\n*/\nfunction onKeyDown(key, handler, options = {}) {\n\treturn onKeyStroke(key, handler, {\n\t\t...options,\n\t\teventName: \"keydown\"\n\t});\n}\n/**\n* Listen to the keypress event of the given key.\n*\n* @see https://vueuse.org/onKeyStroke\n* @param key\n* @param handler\n* @param options\n*/\nfunction onKeyPressed(key, handler, options = {}) {\n\treturn onKeyStroke(key, handler, {\n\t\t...options,\n\t\teventName: \"keypress\"\n\t});\n}\n/**\n* Listen to the keyup event of the given key.\n*\n* @see https://vueuse.org/onKeyStroke\n* @param key\n* @param handler\n* @param options\n*/\nfunction onKeyUp(key, handler, options = {}) {\n\treturn onKeyStroke(key, handler, {\n\t\t...options,\n\t\teventName: \"keyup\"\n\t});\n}\n\n//#endregion\n//#region onLongPress/index.ts\nconst DEFAULT_DELAY = 500;\nconst DEFAULT_THRESHOLD = 10;\nfunction onLongPress(target, handler, options) {\n\tvar _options$modifiers10, _options$modifiers11;\n\tconst elementRef = computed(() => unrefElement(target));\n\tlet timeout;\n\tlet posStart;\n\tlet startTimestamp;\n\tlet hasLongPressed = false;\n\tfunction clear() {\n\t\tif (timeout) {\n\t\t\tclearTimeout(timeout);\n\t\t\ttimeout = void 0;\n\t\t}\n\t\tposStart = void 0;\n\t\tstartTimestamp = void 0;\n\t\thasLongPressed = false;\n\t}\n\tfunction getDelay(ev) {\n\t\tconst delay = options === null || options === void 0 ? void 0 : options.delay;\n\t\tif (typeof delay === \"function\") return delay(ev);\n\t\treturn delay !== null && delay !== void 0 ? delay : DEFAULT_DELAY;\n\t}\n\tfunction onRelease(ev) {\n\t\tvar _options$modifiers, _options$modifiers2, _options$modifiers3;\n\t\tconst [_startTimestamp, _posStart, _hasLongPressed] = [\n\t\t\tstartTimestamp,\n\t\t\tposStart,\n\t\t\thasLongPressed\n\t\t];\n\t\tclear();\n\t\tif (!(options === null || options === void 0 ? void 0 : options.onMouseUp) || !_posStart || !_startTimestamp) return;\n\t\tif ((options === null || options === void 0 || (_options$modifiers = options.modifiers) === null || _options$modifiers === void 0 ? void 0 : _options$modifiers.self) && ev.target !== elementRef.value) return;\n\t\tif (options === null || options === void 0 || (_options$modifiers2 = options.modifiers) === null || _options$modifiers2 === void 0 ? void 0 : _options$modifiers2.prevent) ev.preventDefault();\n\t\tif (options === null || options === void 0 || (_options$modifiers3 = options.modifiers) === null || _options$modifiers3 === void 0 ? void 0 : _options$modifiers3.stop) ev.stopPropagation();\n\t\tconst dx = ev.x - _posStart.x;\n\t\tconst dy = ev.y - _posStart.y;\n\t\tconst distance = Math.sqrt(dx * dx + dy * dy);\n\t\toptions.onMouseUp(ev.timeStamp - _startTimestamp, distance, _hasLongPressed);\n\t}\n\tfunction onDown(ev) {\n\t\tvar _options$modifiers4, _options$modifiers5, _options$modifiers6;\n\t\tif ((options === null || options === void 0 || (_options$modifiers4 = options.modifiers) === null || _options$modifiers4 === void 0 ? void 0 : _options$modifiers4.self) && ev.target !== elementRef.value) return;\n\t\tclear();\n\t\tif (options === null || options === void 0 || (_options$modifiers5 = options.modifiers) === null || _options$modifiers5 === void 0 ? void 0 : _options$modifiers5.prevent) ev.preventDefault();\n\t\tif (options === null || options === void 0 || (_options$modifiers6 = options.modifiers) === null || _options$modifiers6 === void 0 ? void 0 : _options$modifiers6.stop) ev.stopPropagation();\n\t\tposStart = {\n\t\t\tx: ev.x,\n\t\t\ty: ev.y\n\t\t};\n\t\tstartTimestamp = ev.timeStamp;\n\t\ttimeout = setTimeout(() => {\n\t\t\thasLongPressed = true;\n\t\t\thandler(ev);\n\t\t}, getDelay(ev));\n\t}\n\tfunction onMove(ev) {\n\t\tvar _options$modifiers7, _options$modifiers8, _options$modifiers9, _options$distanceThre;\n\t\tif ((options === null || options === void 0 || (_options$modifiers7 = options.modifiers) === null || _options$modifiers7 === void 0 ? void 0 : _options$modifiers7.self) && ev.target !== elementRef.value) return;\n\t\tif (!posStart || (options === null || options === void 0 ? void 0 : options.distanceThreshold) === false) return;\n\t\tif (options === null || options === void 0 || (_options$modifiers8 = options.modifiers) === null || _options$modifiers8 === void 0 ? void 0 : _options$modifiers8.prevent) ev.preventDefault();\n\t\tif (options === null || options === void 0 || (_options$modifiers9 = options.modifiers) === null || _options$modifiers9 === void 0 ? void 0 : _options$modifiers9.stop) ev.stopPropagation();\n\t\tconst dx = ev.x - posStart.x;\n\t\tconst dy = ev.y - posStart.y;\n\t\tif (Math.sqrt(dx * dx + dy * dy) >= ((_options$distanceThre = options === null || options === void 0 ? void 0 : options.distanceThreshold) !== null && _options$distanceThre !== void 0 ? _options$distanceThre : DEFAULT_THRESHOLD)) clear();\n\t}\n\tconst listenerOptions = {\n\t\tcapture: options === null || options === void 0 || (_options$modifiers10 = options.modifiers) === null || _options$modifiers10 === void 0 ? void 0 : _options$modifiers10.capture,\n\t\tonce: options === null || options === void 0 || (_options$modifiers11 = options.modifiers) === null || _options$modifiers11 === void 0 ? void 0 : _options$modifiers11.once\n\t};\n\tconst cleanup = [\n\t\tuseEventListener(elementRef, \"pointerdown\", onDown, listenerOptions),\n\t\tuseEventListener(elementRef, \"pointermove\", onMove, listenerOptions),\n\t\tuseEventListener(elementRef, [\"pointerup\", \"pointerleave\"], onRelease, listenerOptions)\n\t];\n\tconst stop = () => cleanup.forEach((fn) => fn());\n\treturn stop;\n}\n\n//#endregion\n//#region onStartTyping/index.ts\nfunction isFocusedElementEditable() {\n\tconst { activeElement, body } = document;\n\tif (!activeElement) return false;\n\tif (activeElement === body) return false;\n\tswitch (activeElement.tagName) {\n\t\tcase \"INPUT\":\n\t\tcase \"TEXTAREA\": return true;\n\t}\n\treturn activeElement.hasAttribute(\"contenteditable\");\n}\nfunction isTypedCharValid({ keyCode, metaKey, ctrlKey, altKey }) {\n\tif (metaKey || ctrlKey || altKey) return false;\n\tif (keyCode >= 48 && keyCode <= 57 || keyCode >= 96 && keyCode <= 105) return true;\n\tif (keyCode >= 65 && keyCode <= 90) return true;\n\treturn false;\n}\n/**\n* Fires when users start typing on non-editable elements.\n*\n* @see https://vueuse.org/onStartTyping\n* @param callback\n* @param options\n*/\nfunction onStartTyping(callback, options = {}) {\n\tconst { document: document$1 = defaultDocument } = options;\n\tconst keydown = (event) => {\n\t\tif (!isFocusedElementEditable() && isTypedCharValid(event)) callback(event);\n\t};\n\tif (document$1) useEventListener(document$1, \"keydown\", keydown, { passive: true });\n}\n\n//#endregion\n//#region templateRef/index.ts\n/**\n* @deprecated Use Vue's built-in `useTemplateRef` instead.\n*\n* Shorthand for binding ref to template element.\n*\n* @see https://vueuse.org/templateRef\n* @param key\n* @param initialValue\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction templateRef(key, initialValue = null) {\n\tconst instance = getCurrentInstance();\n\tlet _trigger = () => {};\n\tconst element = customRef((track, trigger) => {\n\t\t_trigger = trigger;\n\t\treturn {\n\t\t\tget() {\n\t\t\t\tvar _instance$proxy$$refs, _instance$proxy;\n\t\t\t\ttrack();\n\t\t\t\treturn (_instance$proxy$$refs = instance === null || instance === void 0 || (_instance$proxy = instance.proxy) === null || _instance$proxy === void 0 ? void 0 : _instance$proxy.$refs[key]) !== null && _instance$proxy$$refs !== void 0 ? _instance$proxy$$refs : initialValue;\n\t\t\t},\n\t\t\tset() {}\n\t\t};\n\t});\n\ttryOnMounted(_trigger);\n\tonUpdated(_trigger);\n\treturn element;\n}\n\n//#endregion\n//#region useActiveElement/index.ts\n/**\n* Reactive `document.activeElement`\n*\n* @see https://vueuse.org/useActiveElement\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useActiveElement(options = {}) {\n\tvar _options$document;\n\tconst { window: window$1 = defaultWindow, deep = true, triggerOnRemoval = false } = options;\n\tconst document$1 = (_options$document = options.document) !== null && _options$document !== void 0 ? _options$document : window$1 === null || window$1 === void 0 ? void 0 : window$1.document;\n\tconst getDeepActiveElement = () => {\n\t\tlet element = document$1 === null || document$1 === void 0 ? void 0 : document$1.activeElement;\n\t\tif (deep) {\n\t\t\tvar _element$shadowRoot;\n\t\t\twhile (element === null || element === void 0 ? void 0 : element.shadowRoot) element = element === null || element === void 0 || (_element$shadowRoot = element.shadowRoot) === null || _element$shadowRoot === void 0 ? void 0 : _element$shadowRoot.activeElement;\n\t\t}\n\t\treturn element;\n\t};\n\tconst activeElement = shallowRef();\n\tconst trigger = () => {\n\t\tactiveElement.value = getDeepActiveElement();\n\t};\n\tif (window$1) {\n\t\tconst listenerOptions = {\n\t\t\tcapture: true,\n\t\t\tpassive: true\n\t\t};\n\t\tuseEventListener(window$1, \"blur\", (event) => {\n\t\t\tif (event.relatedTarget !== null) return;\n\t\t\ttrigger();\n\t\t}, listenerOptions);\n\t\tuseEventListener(window$1, \"focus\", trigger, listenerOptions);\n\t}\n\tif (triggerOnRemoval) onElementRemoval(activeElement, trigger, { document: document$1 });\n\ttrigger();\n\treturn activeElement;\n}\n\n//#endregion\n//#region useRafFn/index.ts\n/**\n* Call function on every `requestAnimationFrame`. With controls of pausing and resuming.\n*\n* @see https://vueuse.org/useRafFn\n* @param fn\n* @param options\n*/\nfunction useRafFn(fn, options = {}) {\n\tconst { immediate = true, fpsLimit = void 0, window: window$1 = defaultWindow, once = false } = options;\n\tconst isActive = shallowRef(false);\n\tconst intervalLimit = computed(() => {\n\t\treturn fpsLimit ? 1e3 / toValue(fpsLimit) : null;\n\t});\n\tlet previousFrameTimestamp = 0;\n\tlet rafId = null;\n\tfunction loop(timestamp$1) {\n\t\tif (!isActive.value || !window$1) return;\n\t\tif (!previousFrameTimestamp) previousFrameTimestamp = timestamp$1;\n\t\tconst delta = timestamp$1 - previousFrameTimestamp;\n\t\tif (intervalLimit.value && delta < intervalLimit.value) {\n\t\t\trafId = window$1.requestAnimationFrame(loop);\n\t\t\treturn;\n\t\t}\n\t\tpreviousFrameTimestamp = timestamp$1;\n\t\tfn({\n\t\t\tdelta,\n\t\t\ttimestamp: timestamp$1\n\t\t});\n\t\tif (once) {\n\t\t\tisActive.value = false;\n\t\t\trafId = null;\n\t\t\treturn;\n\t\t}\n\t\trafId = window$1.requestAnimationFrame(loop);\n\t}\n\tfunction resume() {\n\t\tif (!isActive.value && window$1) {\n\t\t\tisActive.value = true;\n\t\t\tpreviousFrameTimestamp = 0;\n\t\t\trafId = window$1.requestAnimationFrame(loop);\n\t\t}\n\t}\n\tfunction pause() {\n\t\tisActive.value = false;\n\t\tif (rafId != null && window$1) {\n\t\t\twindow$1.cancelAnimationFrame(rafId);\n\t\t\trafId = null;\n\t\t}\n\t}\n\tif (immediate) resume();\n\ttryOnScopeDispose(pause);\n\treturn {\n\t\tisActive: readonly(isActive),\n\t\tpause,\n\t\tresume\n\t};\n}\n\n//#endregion\n//#region useAnimate/index.ts\n/**\n* Reactive Web Animations API\n*\n* @see https://vueuse.org/useAnimate\n* @param target\n* @param keyframes\n* @param options\n*/\nfunction useAnimate(target, keyframes, options) {\n\tlet config;\n\tlet animateOptions;\n\tif (isObject(options)) {\n\t\tconfig = options;\n\t\tanimateOptions = objectOmit(options, [\n\t\t\t\"window\",\n\t\t\t\"immediate\",\n\t\t\t\"commitStyles\",\n\t\t\t\"persist\",\n\t\t\t\"onReady\",\n\t\t\t\"onError\"\n\t\t]);\n\t} else {\n\t\tconfig = { duration: options };\n\t\tanimateOptions = options;\n\t}\n\tconst { window: window$1 = defaultWindow, immediate = true, commitStyles, persist, playbackRate: _playbackRate = 1, onReady, onError = (e) => {\n\t\tconsole.error(e);\n\t} } = config;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => window$1 && HTMLElement && \"animate\" in HTMLElement.prototype);\n\tconst animate = shallowRef(void 0);\n\tconst store = shallowReactive({\n\t\tstartTime: null,\n\t\tcurrentTime: null,\n\t\ttimeline: null,\n\t\tplaybackRate: _playbackRate,\n\t\tpending: false,\n\t\tplayState: immediate ? \"idle\" : \"paused\",\n\t\treplaceState: \"active\"\n\t});\n\tconst pending = computed(() => store.pending);\n\tconst playState = computed(() => store.playState);\n\tconst replaceState = computed(() => store.replaceState);\n\tconst startTime = computed({\n\t\tget() {\n\t\t\treturn store.startTime;\n\t\t},\n\t\tset(value) {\n\t\t\tstore.startTime = value;\n\t\t\tif (animate.value) animate.value.startTime = value;\n\t\t}\n\t});\n\tconst currentTime = computed({\n\t\tget() {\n\t\t\treturn store.currentTime;\n\t\t},\n\t\tset(value) {\n\t\t\tstore.currentTime = value;\n\t\t\tif (animate.value) {\n\t\t\t\tanimate.value.currentTime = value;\n\t\t\t\tsyncResume();\n\t\t\t}\n\t\t}\n\t});\n\tconst timeline = computed({\n\t\tget() {\n\t\t\treturn store.timeline;\n\t\t},\n\t\tset(value) {\n\t\t\tstore.timeline = value;\n\t\t\tif (animate.value) animate.value.timeline = value;\n\t\t}\n\t});\n\tconst playbackRate = computed({\n\t\tget() {\n\t\t\treturn store.playbackRate;\n\t\t},\n\t\tset(value) {\n\t\t\tstore.playbackRate = value;\n\t\t\tif (animate.value) animate.value.playbackRate = value;\n\t\t}\n\t});\n\tconst play = () => {\n\t\tif (animate.value) try {\n\t\t\tanimate.value.play();\n\t\t\tsyncResume();\n\t\t} catch (e) {\n\t\t\tsyncPause();\n\t\t\tonError(e);\n\t\t}\n\t\telse update();\n\t};\n\tconst pause = () => {\n\t\ttry {\n\t\t\tvar _animate$value;\n\t\t\t(_animate$value = animate.value) === null || _animate$value === void 0 || _animate$value.pause();\n\t\t\tsyncPause();\n\t\t} catch (e) {\n\t\t\tonError(e);\n\t\t}\n\t};\n\tconst reverse = () => {\n\t\tif (!animate.value) update();\n\t\ttry {\n\t\t\tvar _animate$value2;\n\t\t\t(_animate$value2 = animate.value) === null || _animate$value2 === void 0 || _animate$value2.reverse();\n\t\t\tsyncResume();\n\t\t} catch (e) {\n\t\t\tsyncPause();\n\t\t\tonError(e);\n\t\t}\n\t};\n\tconst finish = () => {\n\t\ttry {\n\t\t\tvar _animate$value3;\n\t\t\t(_animate$value3 = animate.value) === null || _animate$value3 === void 0 || _animate$value3.finish();\n\t\t\tsyncPause();\n\t\t} catch (e) {\n\t\t\tonError(e);\n\t\t}\n\t};\n\tconst cancel = () => {\n\t\ttry {\n\t\t\tvar _animate$value4;\n\t\t\t(_animate$value4 = animate.value) === null || _animate$value4 === void 0 || _animate$value4.cancel();\n\t\t\tsyncPause();\n\t\t} catch (e) {\n\t\t\tonError(e);\n\t\t}\n\t};\n\twatch(() => unrefElement(target), (el) => {\n\t\tif (el) update(true);\n\t\telse animate.value = void 0;\n\t});\n\twatch(() => keyframes, (value) => {\n\t\tif (animate.value) {\n\t\t\tupdate();\n\t\t\tconst targetEl = unrefElement(target);\n\t\t\tif (targetEl) animate.value.effect = new KeyframeEffect(targetEl, toValue(value), animateOptions);\n\t\t}\n\t}, { deep: true });\n\ttryOnMounted(() => update(true), false);\n\ttryOnScopeDispose(cancel);\n\tfunction update(init) {\n\t\tconst el = unrefElement(target);\n\t\tif (!isSupported.value || !el) return;\n\t\tif (!animate.value) animate.value = el.animate(toValue(keyframes), animateOptions);\n\t\tif (persist) animate.value.persist();\n\t\tif (_playbackRate !== 1) animate.value.playbackRate = _playbackRate;\n\t\tif (init && !immediate) animate.value.pause();\n\t\telse syncResume();\n\t\tonReady === null || onReady === void 0 || onReady(animate.value);\n\t}\n\tconst listenerOptions = { passive: true };\n\tuseEventListener(animate, [\n\t\t\"cancel\",\n\t\t\"finish\",\n\t\t\"remove\"\n\t], syncPause, listenerOptions);\n\tuseEventListener(animate, \"finish\", () => {\n\t\tvar _animate$value5;\n\t\tif (commitStyles) (_animate$value5 = animate.value) === null || _animate$value5 === void 0 || _animate$value5.commitStyles();\n\t}, listenerOptions);\n\tconst { resume: resumeRef, pause: pauseRef } = useRafFn(() => {\n\t\tif (!animate.value) return;\n\t\tstore.pending = animate.value.pending;\n\t\tstore.playState = animate.value.playState;\n\t\tstore.replaceState = animate.value.replaceState;\n\t\tstore.startTime = animate.value.startTime;\n\t\tstore.currentTime = animate.value.currentTime;\n\t\tstore.timeline = animate.value.timeline;\n\t\tstore.playbackRate = animate.value.playbackRate;\n\t}, { immediate: false });\n\tfunction syncResume() {\n\t\tif (isSupported.value) resumeRef();\n\t}\n\tfunction syncPause() {\n\t\tif (isSupported.value && window$1) window$1.requestAnimationFrame(pauseRef);\n\t}\n\treturn {\n\t\tisSupported,\n\t\tanimate,\n\t\tplay,\n\t\tpause,\n\t\treverse,\n\t\tfinish,\n\t\tcancel,\n\t\tpending,\n\t\tplayState,\n\t\treplaceState,\n\t\tstartTime,\n\t\tcurrentTime,\n\t\ttimeline,\n\t\tplaybackRate\n\t};\n}\n\n//#endregion\n//#region useAsyncQueue/index.ts\n/**\n* Asynchronous queue task controller.\n*\n* @see https://vueuse.org/useAsyncQueue\n* @param tasks\n* @param options\n*/\nfunction useAsyncQueue(tasks, options) {\n\tconst { interrupt = true, onError = noop, onFinished = noop, signal } = options || {};\n\tconst promiseState = {\n\t\taborted: \"aborted\",\n\t\tfulfilled: \"fulfilled\",\n\t\tpending: \"pending\",\n\t\trejected: \"rejected\"\n\t};\n\tconst result = reactive(Array.from(Array.from({ length: tasks.length }), () => ({\n\t\tstate: promiseState.pending,\n\t\tdata: null\n\t})));\n\tconst activeIndex = shallowRef(-1);\n\tif (!tasks || tasks.length === 0) {\n\t\tonFinished();\n\t\treturn {\n\t\t\tactiveIndex,\n\t\t\tresult\n\t\t};\n\t}\n\tfunction updateResult(state, res) {\n\t\tactiveIndex.value++;\n\t\tresult[activeIndex.value].data = res;\n\t\tresult[activeIndex.value].state = state;\n\t}\n\ttasks.reduce((prev, curr) => {\n\t\treturn prev.then((prevRes) => {\n\t\t\tvar _result$activeIndex$v;\n\t\t\tif (signal === null || signal === void 0 ? void 0 : signal.aborted) {\n\t\t\t\tupdateResult(promiseState.aborted, /* @__PURE__ */ new Error(\"aborted\"));\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (((_result$activeIndex$v = result[activeIndex.value]) === null || _result$activeIndex$v === void 0 ? void 0 : _result$activeIndex$v.state) === promiseState.rejected && interrupt) {\n\t\t\t\tonFinished();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst done = curr(prevRes).then((currentRes) => {\n\t\t\t\tupdateResult(promiseState.fulfilled, currentRes);\n\t\t\t\tif (activeIndex.value === tasks.length - 1) onFinished();\n\t\t\t\treturn currentRes;\n\t\t\t});\n\t\t\tif (!signal) return done;\n\t\t\treturn Promise.race([done, whenAborted(signal)]);\n\t\t}).catch((e) => {\n\t\t\tif (signal === null || signal === void 0 ? void 0 : signal.aborted) {\n\t\t\t\tupdateResult(promiseState.aborted, e);\n\t\t\t\treturn e;\n\t\t\t}\n\t\t\tupdateResult(promiseState.rejected, e);\n\t\t\tonError();\n\t\t\tif (activeIndex.value === tasks.length - 1) onFinished();\n\t\t\treturn e;\n\t\t});\n\t}, Promise.resolve());\n\treturn {\n\t\tactiveIndex,\n\t\tresult\n\t};\n}\nfunction whenAborted(signal) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst error = /* @__PURE__ */ new Error(\"aborted\");\n\t\tif (signal.aborted) reject(error);\n\t\telse signal.addEventListener(\"abort\", () => reject(error), { once: true });\n\t});\n}\n\n//#endregion\n//#region useAsyncState/index.ts\n/**\n* Reactive async state. Will not block your setup function and will trigger changes once\n* the promise is ready.\n*\n* @see https://vueuse.org/useAsyncState\n* @param promise The promise / async function to be resolved\n* @param initialState The initial state, used until the first evaluation finishes\n* @param options\n*/\nfunction useAsyncState(promise, initialState, options) {\n\tvar _globalThis$reportErr;\n\tconst { immediate = true, delay = 0, onError = (_globalThis$reportErr = globalThis.reportError) !== null && _globalThis$reportErr !== void 0 ? _globalThis$reportErr : noop, onSuccess = noop, resetOnExecute = true, shallow = true, throwError } = options !== null && options !== void 0 ? options : {};\n\tconst state = shallow ? shallowRef(initialState) : ref(initialState);\n\tconst isReady = shallowRef(false);\n\tconst isLoading = shallowRef(false);\n\tconst error = shallowRef(void 0);\n\tlet executionsCount = 0;\n\tasync function execute(delay$1 = 0, ...args) {\n\t\tconst executionId = executionsCount += 1;\n\t\tif (resetOnExecute) state.value = toValue(initialState);\n\t\terror.value = void 0;\n\t\tisReady.value = false;\n\t\tisLoading.value = true;\n\t\tif (delay$1 > 0) await promiseTimeout(delay$1);\n\t\tconst _promise = typeof promise === \"function\" ? promise(...args) : promise;\n\t\ttry {\n\t\t\tconst data = await _promise;\n\t\t\tif (executionId === executionsCount) {\n\t\t\t\tstate.value = data;\n\t\t\t\tisReady.value = true;\n\t\t\t}\n\t\t\tonSuccess(data);\n\t\t} catch (e) {\n\t\t\tif (executionId === executionsCount) error.value = e;\n\t\t\tonError(e);\n\t\t\tif (throwError) throw e;\n\t\t} finally {\n\t\t\tif (executionId === executionsCount) isLoading.value = false;\n\t\t}\n\t\treturn state.value;\n\t}\n\tif (immediate) execute(delay);\n\tconst shell = {\n\t\tstate,\n\t\tisReady,\n\t\tisLoading,\n\t\terror,\n\t\texecute,\n\t\texecuteImmediate: (...args) => execute(0, ...args)\n\t};\n\tfunction waitUntilIsLoaded() {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tuntil(isLoading).toBe(false).then(() => resolve(shell)).catch(reject);\n\t\t});\n\t}\n\treturn {\n\t\t...shell,\n\t\tthen(onFulfilled, onRejected) {\n\t\t\treturn waitUntilIsLoaded().then(onFulfilled, onRejected);\n\t\t}\n\t};\n}\n\n//#endregion\n//#region useBase64/serialization.ts\nconst defaults = {\n\tarray: (v) => JSON.stringify(v),\n\tobject: (v) => JSON.stringify(v),\n\tset: (v) => JSON.stringify(Array.from(v)),\n\tmap: (v) => JSON.stringify(Object.fromEntries(v)),\n\tnull: () => \"\"\n};\nfunction getDefaultSerialization(target) {\n\tif (!target) return defaults.null;\n\tif (target instanceof Map) return defaults.map;\n\telse if (target instanceof Set) return defaults.set;\n\telse if (Array.isArray(target)) return defaults.array;\n\telse return defaults.object;\n}\n\n//#endregion\n//#region useBase64/index.ts\nfunction useBase64(target, options) {\n\tconst base64 = shallowRef(\"\");\n\tconst promise = shallowRef();\n\tfunction execute() {\n\t\tif (!isClient) return;\n\t\tpromise.value = new Promise((resolve, reject) => {\n\t\t\ttry {\n\t\t\t\tconst _target = toValue(target);\n\t\t\t\tif (_target == null) resolve(\"\");\n\t\t\t\telse if (typeof _target === \"string\") resolve(blobToBase64(new Blob([_target], { type: \"text/plain\" })));\n\t\t\t\telse if (_target instanceof Blob) resolve(blobToBase64(_target));\n\t\t\t\telse if (_target instanceof ArrayBuffer) resolve(window.btoa(String.fromCharCode(...new Uint8Array(_target))));\n\t\t\t\telse if (_target instanceof HTMLCanvasElement) resolve(_target.toDataURL(options === null || options === void 0 ? void 0 : options.type, options === null || options === void 0 ? void 0 : options.quality));\n\t\t\t\telse if (_target instanceof HTMLImageElement) {\n\t\t\t\t\tconst img = _target.cloneNode(false);\n\t\t\t\t\timg.crossOrigin = \"Anonymous\";\n\t\t\t\t\timgLoaded(img).then(() => {\n\t\t\t\t\t\tconst canvas = document.createElement(\"canvas\");\n\t\t\t\t\t\tconst ctx = canvas.getContext(\"2d\");\n\t\t\t\t\t\tcanvas.width = img.width;\n\t\t\t\t\t\tcanvas.height = img.height;\n\t\t\t\t\t\tctx.drawImage(img, 0, 0, canvas.width, canvas.height);\n\t\t\t\t\t\tresolve(canvas.toDataURL(options === null || options === void 0 ? void 0 : options.type, options === null || options === void 0 ? void 0 : options.quality));\n\t\t\t\t\t}).catch(reject);\n\t\t\t\t} else if (typeof _target === \"object\") {\n\t\t\t\t\tconst serialized = ((options === null || options === void 0 ? void 0 : options.serializer) || getDefaultSerialization(_target))(_target);\n\t\t\t\t\treturn resolve(blobToBase64(new Blob([serialized], { type: \"application/json\" })));\n\t\t\t\t} else reject(/* @__PURE__ */ new Error(\"target is unsupported types\"));\n\t\t\t} catch (error) {\n\t\t\t\treject(error);\n\t\t\t}\n\t\t});\n\t\tpromise.value.then((res) => {\n\t\t\tbase64.value = (options === null || options === void 0 ? void 0 : options.dataUrl) === false ? res.replace(/^data:.*?;base64,/, \"\") : res;\n\t\t});\n\t\treturn promise.value;\n\t}\n\tif (isRef(target) || typeof target === \"function\") watch(target, execute, { immediate: true });\n\telse execute();\n\treturn {\n\t\tbase64,\n\t\tpromise,\n\t\texecute\n\t};\n}\nfunction imgLoaded(img) {\n\treturn new Promise((resolve, reject) => {\n\t\tif (!img.complete) {\n\t\t\timg.onload = () => {\n\t\t\t\tresolve();\n\t\t\t};\n\t\t\timg.onerror = reject;\n\t\t} else resolve();\n\t});\n}\nfunction blobToBase64(blob) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst fr = new FileReader();\n\t\tfr.onload = (e) => {\n\t\t\tresolve(e.target.result);\n\t\t};\n\t\tfr.onerror = reject;\n\t\tfr.readAsDataURL(blob);\n\t});\n}\n\n//#endregion\n//#region useBattery/index.ts\n/**\n* Reactive Battery Status API.\n*\n* @see https://vueuse.org/useBattery\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useBattery(options = {}) {\n\tconst { navigator: navigator$1 = defaultNavigator } = options;\n\tconst events$1 = [\n\t\t\"chargingchange\",\n\t\t\"chargingtimechange\",\n\t\t\"dischargingtimechange\",\n\t\t\"levelchange\"\n\t];\n\tconst isSupported = /* @__PURE__ */ useSupported(() => navigator$1 && \"getBattery\" in navigator$1 && typeof navigator$1.getBattery === \"function\");\n\tconst charging = shallowRef(false);\n\tconst chargingTime = shallowRef(0);\n\tconst dischargingTime = shallowRef(0);\n\tconst level = shallowRef(1);\n\tlet battery;\n\tfunction updateBatteryInfo() {\n\t\tcharging.value = this.charging;\n\t\tchargingTime.value = this.chargingTime || 0;\n\t\tdischargingTime.value = this.dischargingTime || 0;\n\t\tlevel.value = this.level;\n\t}\n\tif (isSupported.value) navigator$1.getBattery().then((_battery) => {\n\t\tbattery = _battery;\n\t\tupdateBatteryInfo.call(battery);\n\t\tuseEventListener(battery, events$1, updateBatteryInfo, { passive: true });\n\t});\n\treturn {\n\t\tisSupported,\n\t\tcharging,\n\t\tchargingTime,\n\t\tdischargingTime,\n\t\tlevel\n\t};\n}\n\n//#endregion\n//#region useBluetooth/index.ts\n/* @__NO_SIDE_EFFECTS__ */\nfunction useBluetooth(options) {\n\tlet { acceptAllDevices = false } = options || {};\n\tconst { filters = void 0, optionalServices = void 0, navigator: navigator$1 = defaultNavigator } = options || {};\n\tconst isSupported = /* @__PURE__ */ useSupported(() => navigator$1 && \"bluetooth\" in navigator$1);\n\tconst device = shallowRef();\n\tconst error = shallowRef(null);\n\twatch(device, () => {\n\t\tconnectToBluetoothGATTServer();\n\t});\n\tasync function requestDevice() {\n\t\tif (!isSupported.value) return;\n\t\terror.value = null;\n\t\tif (filters && filters.length > 0) acceptAllDevices = false;\n\t\ttry {\n\t\t\tdevice.value = await (navigator$1 === null || navigator$1 === void 0 ? void 0 : navigator$1.bluetooth.requestDevice({\n\t\t\t\tacceptAllDevices,\n\t\t\t\tfilters,\n\t\t\t\toptionalServices\n\t\t\t}));\n\t\t} catch (err) {\n\t\t\terror.value = err;\n\t\t}\n\t}\n\tconst server = shallowRef();\n\tconst isConnected = shallowRef(false);\n\tfunction reset() {\n\t\tisConnected.value = false;\n\t\tdevice.value = void 0;\n\t\tserver.value = void 0;\n\t}\n\tasync function connectToBluetoothGATTServer() {\n\t\terror.value = null;\n\t\tif (device.value && device.value.gatt) {\n\t\t\tuseEventListener(device, \"gattserverdisconnected\", reset, { passive: true });\n\t\t\ttry {\n\t\t\t\tserver.value = await device.value.gatt.connect();\n\t\t\t\tisConnected.value = server.value.connected;\n\t\t\t} catch (err) {\n\t\t\t\terror.value = err;\n\t\t\t}\n\t\t}\n\t}\n\ttryOnMounted(() => {\n\t\tvar _device$value$gatt;\n\t\tif (device.value) (_device$value$gatt = device.value.gatt) === null || _device$value$gatt === void 0 || _device$value$gatt.connect();\n\t});\n\ttryOnScopeDispose(() => {\n\t\tvar _device$value$gatt2;\n\t\tif (device.value) (_device$value$gatt2 = device.value.gatt) === null || _device$value$gatt2 === void 0 || _device$value$gatt2.disconnect();\n\t});\n\treturn {\n\t\tisSupported,\n\t\tisConnected: readonly(isConnected),\n\t\tdevice,\n\t\trequestDevice,\n\t\tserver,\n\t\terror\n\t};\n}\n\n//#endregion\n//#region useSSRWidth/index.ts\nconst ssrWidthSymbol = Symbol(\"vueuse-ssr-width\");\n/* @__NO_SIDE_EFFECTS__ */\nfunction useSSRWidth() {\n\tconst ssrWidth = hasInjectionContext() ? injectLocal(ssrWidthSymbol, null) : null;\n\treturn typeof ssrWidth === \"number\" ? ssrWidth : void 0;\n}\nfunction provideSSRWidth(width, app) {\n\tif (app !== void 0) app.provide(ssrWidthSymbol, width);\n\telse provideLocal(ssrWidthSymbol, width);\n}\n\n//#endregion\n//#region useMediaQuery/index.ts\n/**\n* Reactive Media Query.\n*\n* @see https://vueuse.org/useMediaQuery\n* @param query\n* @param options\n*/\nfunction useMediaQuery(query, options = {}) {\n\tconst { window: window$1 = defaultWindow, ssrWidth = /* @__PURE__ */ useSSRWidth() } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => window$1 && \"matchMedia\" in window$1 && typeof window$1.matchMedia === \"function\");\n\tconst ssrSupport = shallowRef(typeof ssrWidth === \"number\");\n\tconst mediaQuery = shallowRef();\n\tconst matches = shallowRef(false);\n\tconst handler = (event) => {\n\t\tmatches.value = event.matches;\n\t};\n\twatchEffect(() => {\n\t\tif (ssrSupport.value) {\n\t\t\tssrSupport.value = !isSupported.value;\n\t\t\tmatches.value = toValue(query).split(\",\").some((queryString) => {\n\t\t\t\tconst not = queryString.includes(\"not all\");\n\t\t\t\tconst minWidth = queryString.match(/\\(\\s*min-width:\\s*(-?\\d+(?:\\.\\d*)?[a-z]+\\s*)\\)/);\n\t\t\t\tconst maxWidth = queryString.match(/\\(\\s*max-width:\\s*(-?\\d+(?:\\.\\d*)?[a-z]+\\s*)\\)/);\n\t\t\t\tlet res = Boolean(minWidth || maxWidth);\n\t\t\t\tif (minWidth && res) res = ssrWidth >= pxValue(minWidth[1]);\n\t\t\t\tif (maxWidth && res) res = ssrWidth <= pxValue(maxWidth[1]);\n\t\t\t\treturn not ? !res : res;\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tif (!isSupported.value) return;\n\t\tmediaQuery.value = window$1.matchMedia(toValue(query));\n\t\tmatches.value = mediaQuery.value.matches;\n\t});\n\tuseEventListener(mediaQuery, \"change\", handler, { passive: true });\n\treturn computed(() => matches.value);\n}\n\n//#endregion\n//#region useBreakpoints/breakpoints.ts\n/**\n* Breakpoints from Tailwind V2\n*\n* @see https://tailwindcss.com/docs/breakpoints\n*/\nconst breakpointsTailwind = {\n\t\"sm\": 640,\n\t\"md\": 768,\n\t\"lg\": 1024,\n\t\"xl\": 1280,\n\t\"2xl\": 1536\n};\n/**\n* Breakpoints from Bootstrap V5\n*\n* @see https://getbootstrap.com/docs/5.0/layout/breakpoints\n*/\nconst breakpointsBootstrapV5 = {\n\txs: 0,\n\tsm: 576,\n\tmd: 768,\n\tlg: 992,\n\txl: 1200,\n\txxl: 1400\n};\n/**\n* Breakpoints from Vuetify V2\n*\n* @see https://v2.vuetifyjs.com/en/features/breakpoints/\n*/\nconst breakpointsVuetifyV2 = {\n\txs: 0,\n\tsm: 600,\n\tmd: 960,\n\tlg: 1264,\n\txl: 1904\n};\n/**\n* Breakpoints from Vuetify V3\n*\n* @see https://vuetifyjs.com/en/styles/float/#overview\n*/\nconst breakpointsVuetifyV3 = {\n\txs: 0,\n\tsm: 600,\n\tmd: 960,\n\tlg: 1280,\n\txl: 1920,\n\txxl: 2560\n};\n/**\n* Alias to `breakpointsVuetifyV2`\n*\n* @deprecated explictly use `breakpointsVuetifyV2` or `breakpointsVuetifyV3` instead\n*/\nconst breakpointsVuetify = breakpointsVuetifyV2;\n/**\n* Breakpoints from Ant Design\n*\n* @see https://ant.design/components/layout/#breakpoint-width\n*/\nconst breakpointsAntDesign = {\n\txs: 480,\n\tsm: 576,\n\tmd: 768,\n\tlg: 992,\n\txl: 1200,\n\txxl: 1600\n};\n/**\n* Breakpoints from Quasar V2\n*\n* @see https://quasar.dev/style/breakpoints\n*/\nconst breakpointsQuasar = {\n\txs: 0,\n\tsm: 600,\n\tmd: 1024,\n\tlg: 1440,\n\txl: 1920\n};\n/**\n* Sematic Breakpoints\n*/\nconst breakpointsSematic = {\n\tmobileS: 320,\n\tmobileM: 375,\n\tmobileL: 425,\n\ttablet: 768,\n\tlaptop: 1024,\n\tlaptopL: 1440,\n\tdesktop4K: 2560\n};\n/**\n* Breakpoints from Master CSS\n*\n* @see https://docs.master.co/css/breakpoints\n*/\nconst breakpointsMasterCss = {\n\t\"3xs\": 360,\n\t\"2xs\": 480,\n\t\"xs\": 600,\n\t\"sm\": 768,\n\t\"md\": 1024,\n\t\"lg\": 1280,\n\t\"xl\": 1440,\n\t\"2xl\": 1600,\n\t\"3xl\": 1920,\n\t\"4xl\": 2560\n};\n/**\n* Breakpoints from PrimeFlex\n*\n* @see https://primeflex.org/installation\n*/\nconst breakpointsPrimeFlex = {\n\tsm: 576,\n\tmd: 768,\n\tlg: 992,\n\txl: 1200\n};\n/**\n* Breakpoints from ElementUI/ElementPlus\n*\n* @see https://element.eleme.io/#/en-US/component/layout\n* @see https://element-plus.org/en-US/component/layout.html\n*/\nconst breakpointsElement = {\n\txs: 0,\n\tsm: 768,\n\tmd: 992,\n\tlg: 1200,\n\txl: 1920\n};\n\n//#endregion\n//#region useBreakpoints/index.ts\n/**\n* Reactively viewport breakpoints\n*\n* @see https://vueuse.org/useBreakpoints\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useBreakpoints(breakpoints, options = {}) {\n\tfunction getValue$1(k, delta) {\n\t\tlet v = toValue(breakpoints[toValue(k)]);\n\t\tif (delta != null) v = increaseWithUnit(v, delta);\n\t\tif (typeof v === \"number\") v = `${v}px`;\n\t\treturn v;\n\t}\n\tconst { window: window$1 = defaultWindow, strategy = \"min-width\", ssrWidth = /* @__PURE__ */ useSSRWidth() } = options;\n\tconst ssrSupport = typeof ssrWidth === \"number\";\n\tconst mounted = ssrSupport ? shallowRef(false) : { value: true };\n\tif (ssrSupport) tryOnMounted(() => mounted.value = !!window$1);\n\tfunction match(query, size) {\n\t\tif (!mounted.value && ssrSupport) return query === \"min\" ? ssrWidth >= pxValue(size) : ssrWidth <= pxValue(size);\n\t\tif (!window$1) return false;\n\t\treturn window$1.matchMedia(`(${query}-width: ${size})`).matches;\n\t}\n\tconst greaterOrEqual = (k) => {\n\t\treturn useMediaQuery(() => `(min-width: ${getValue$1(k)})`, options);\n\t};\n\tconst smallerOrEqual = (k) => {\n\t\treturn useMediaQuery(() => `(max-width: ${getValue$1(k)})`, options);\n\t};\n\tconst shortcutMethods = Object.keys(breakpoints).reduce((shortcuts, k) => {\n\t\tObject.defineProperty(shortcuts, k, {\n\t\t\tget: () => strategy === \"min-width\" ? greaterOrEqual(k) : smallerOrEqual(k),\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true\n\t\t});\n\t\treturn shortcuts;\n\t}, {});\n\tfunction current() {\n\t\tconst points = Object.keys(breakpoints).map((k) => [\n\t\t\tk,\n\t\t\tshortcutMethods[k],\n\t\t\tpxValue(getValue$1(k))\n\t\t]).sort((a, b) => a[2] - b[2]);\n\t\treturn computed(() => points.filter(([, v]) => v.value).map(([k]) => k));\n\t}\n\treturn Object.assign(shortcutMethods, {\n\t\tgreaterOrEqual,\n\t\tsmallerOrEqual,\n\t\tgreater(k) {\n\t\t\treturn useMediaQuery(() => `(min-width: ${getValue$1(k, .1)})`, options);\n\t\t},\n\t\tsmaller(k) {\n\t\t\treturn useMediaQuery(() => `(max-width: ${getValue$1(k, -.1)})`, options);\n\t\t},\n\t\tbetween(a, b) {\n\t\t\treturn useMediaQuery(() => `(min-width: ${getValue$1(a)}) and (max-width: ${getValue$1(b, -.1)})`, options);\n\t\t},\n\t\tisGreater(k) {\n\t\t\treturn match(\"min\", getValue$1(k, .1));\n\t\t},\n\t\tisGreaterOrEqual(k) {\n\t\t\treturn match(\"min\", getValue$1(k));\n\t\t},\n\t\tisSmaller(k) {\n\t\t\treturn match(\"max\", getValue$1(k, -.1));\n\t\t},\n\t\tisSmallerOrEqual(k) {\n\t\t\treturn match(\"max\", getValue$1(k));\n\t\t},\n\t\tisInBetween(a, b) {\n\t\t\treturn match(\"min\", getValue$1(a)) && match(\"max\", getValue$1(b, -.1));\n\t\t},\n\t\tcurrent,\n\t\tactive() {\n\t\t\tconst bps = current();\n\t\t\treturn computed(() => bps.value.length === 0 ? \"\" : bps.value.at(strategy === \"min-width\" ? -1 : 0));\n\t\t}\n\t});\n}\n\n//#endregion\n//#region useBroadcastChannel/index.ts\n/**\n* Reactive BroadcastChannel\n*\n* @see https://vueuse.org/useBroadcastChannel\n* @see https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel\n* @param options\n*\n*/\nfunction useBroadcastChannel(options) {\n\tconst { name, window: window$1 = defaultWindow } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => window$1 && \"BroadcastChannel\" in window$1);\n\tconst isClosed = shallowRef(false);\n\tconst channel = ref();\n\tconst data = ref();\n\tconst error = shallowRef(null);\n\tconst post = (data$1) => {\n\t\tif (channel.value) channel.value.postMessage(data$1);\n\t};\n\tconst close = () => {\n\t\tif (channel.value) channel.value.close();\n\t\tisClosed.value = true;\n\t};\n\tif (isSupported.value) tryOnMounted(() => {\n\t\terror.value = null;\n\t\tchannel.value = new BroadcastChannel(name);\n\t\tconst listenerOptions = { passive: true };\n\t\tuseEventListener(channel, \"message\", (e) => {\n\t\t\tdata.value = e.data;\n\t\t}, listenerOptions);\n\t\tuseEventListener(channel, \"messageerror\", (e) => {\n\t\t\terror.value = e;\n\t\t}, listenerOptions);\n\t\tuseEventListener(channel, \"close\", () => {\n\t\t\tisClosed.value = true;\n\t\t}, listenerOptions);\n\t});\n\ttryOnScopeDispose(() => {\n\t\tclose();\n\t});\n\treturn {\n\t\tisSupported,\n\t\tchannel,\n\t\tdata,\n\t\tpost,\n\t\tclose,\n\t\terror,\n\t\tisClosed\n\t};\n}\n\n//#endregion\n//#region useBrowserLocation/index.ts\nconst WRITABLE_PROPERTIES = [\n\t\"hash\",\n\t\"host\",\n\t\"hostname\",\n\t\"href\",\n\t\"pathname\",\n\t\"port\",\n\t\"protocol\",\n\t\"search\"\n];\n/**\n* Reactive browser location.\n*\n* @see https://vueuse.org/useBrowserLocation\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useBrowserLocation(options = {}) {\n\tconst { window: window$1 = defaultWindow } = options;\n\tconst refs = Object.fromEntries(WRITABLE_PROPERTIES.map((key) => [key, ref()]));\n\tfor (const [key, ref$1] of objectEntries(refs)) watch(ref$1, (value) => {\n\t\tif (!(window$1 === null || window$1 === void 0 ? void 0 : window$1.location) || window$1.location[key] === value) return;\n\t\twindow$1.location[key] = value;\n\t});\n\tconst buildState = (trigger) => {\n\t\tvar _window$location;\n\t\tconst { state: state$1, length } = (window$1 === null || window$1 === void 0 ? void 0 : window$1.history) || {};\n\t\tconst { origin } = (window$1 === null || window$1 === void 0 ? void 0 : window$1.location) || {};\n\t\tfor (const key of WRITABLE_PROPERTIES) refs[key].value = window$1 === null || window$1 === void 0 || (_window$location = window$1.location) === null || _window$location === void 0 ? void 0 : _window$location[key];\n\t\treturn reactive({\n\t\t\ttrigger,\n\t\t\tstate: state$1,\n\t\t\tlength,\n\t\t\torigin,\n\t\t\t...refs\n\t\t});\n\t};\n\tconst state = ref(buildState(\"load\"));\n\tif (window$1) {\n\t\tconst listenerOptions = { passive: true };\n\t\tuseEventListener(window$1, \"popstate\", () => state.value = buildState(\"popstate\"), listenerOptions);\n\t\tuseEventListener(window$1, \"hashchange\", () => state.value = buildState(\"hashchange\"), listenerOptions);\n\t}\n\treturn state;\n}\n\n//#endregion\n//#region useCached/index.ts\nfunction useCached(refValue, comparator = (a, b) => a === b, options) {\n\tconst { deepRefs = true,...watchOptions } = options || {};\n\tconst cachedValue = createRef(refValue.value, deepRefs);\n\twatch(() => refValue.value, (value) => {\n\t\tif (!comparator(value, cachedValue.value)) cachedValue.value = value;\n\t}, watchOptions);\n\treturn cachedValue;\n}\n\n//#endregion\n//#region usePermission/index.ts\n/**\n* Reactive Permissions API.\n*\n* @see https://vueuse.org/usePermission\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction usePermission(permissionDesc, options = {}) {\n\tconst { controls = false, navigator: navigator$1 = defaultNavigator } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => navigator$1 && \"permissions\" in navigator$1);\n\tconst permissionStatus = shallowRef();\n\tconst desc = typeof permissionDesc === \"string\" ? { name: permissionDesc } : permissionDesc;\n\tconst state = shallowRef();\n\tconst update = () => {\n\t\tvar _permissionStatus$val, _permissionStatus$val2;\n\t\tstate.value = (_permissionStatus$val = (_permissionStatus$val2 = permissionStatus.value) === null || _permissionStatus$val2 === void 0 ? void 0 : _permissionStatus$val2.state) !== null && _permissionStatus$val !== void 0 ? _permissionStatus$val : \"prompt\";\n\t};\n\tuseEventListener(permissionStatus, \"change\", update, { passive: true });\n\tconst query = createSingletonPromise(async () => {\n\t\tif (!isSupported.value) return;\n\t\tif (!permissionStatus.value) try {\n\t\t\tpermissionStatus.value = await navigator$1.permissions.query(desc);\n\t\t} catch (_unused) {\n\t\t\tpermissionStatus.value = void 0;\n\t\t} finally {\n\t\t\tupdate();\n\t\t}\n\t\tif (controls) return toRaw(permissionStatus.value);\n\t});\n\tquery();\n\tif (controls) return {\n\t\tstate,\n\t\tisSupported,\n\t\tquery\n\t};\n\telse return state;\n}\n\n//#endregion\n//#region useClipboard/index.ts\nfunction useClipboard(options = {}) {\n\tconst { navigator: navigator$1 = defaultNavigator, read = false, source, copiedDuring = 1500, legacy = false } = options;\n\tconst isClipboardApiSupported = /* @__PURE__ */ useSupported(() => navigator$1 && \"clipboard\" in navigator$1);\n\tconst permissionRead = usePermission(\"clipboard-read\");\n\tconst permissionWrite = usePermission(\"clipboard-write\");\n\tconst isSupported = computed(() => isClipboardApiSupported.value || legacy);\n\tconst text = shallowRef(\"\");\n\tconst copied = shallowRef(false);\n\tconst timeout = useTimeoutFn(() => copied.value = false, copiedDuring, { immediate: false });\n\tasync function updateText() {\n\t\tlet useLegacy = !(isClipboardApiSupported.value && isAllowed(permissionRead.value));\n\t\tif (!useLegacy) try {\n\t\t\ttext.value = await navigator$1.clipboard.readText();\n\t\t} catch (_unused) {\n\t\t\tuseLegacy = true;\n\t\t}\n\t\tif (useLegacy) text.value = legacyRead();\n\t}\n\tif (isSupported.value && read) useEventListener([\"copy\", \"cut\"], updateText, { passive: true });\n\tasync function copy(value = toValue(source)) {\n\t\tif (isSupported.value && value != null) {\n\t\t\tlet useLegacy = !(isClipboardApiSupported.value && isAllowed(permissionWrite.value));\n\t\t\tif (!useLegacy) try {\n\t\t\t\tawait navigator$1.clipboard.writeText(value);\n\t\t\t} catch (_unused2) {\n\t\t\t\tuseLegacy = true;\n\t\t\t}\n\t\t\tif (useLegacy) legacyCopy(value);\n\t\t\ttext.value = value;\n\t\t\tcopied.value = true;\n\t\t\ttimeout.start();\n\t\t}\n\t}\n\tfunction legacyCopy(value) {\n\t\tconst ta = document.createElement(\"textarea\");\n\t\tta.value = value;\n\t\tta.style.position = \"absolute\";\n\t\tta.style.opacity = \"0\";\n\t\tta.setAttribute(\"readonly\", \"\");\n\t\tdocument.body.appendChild(ta);\n\t\tta.select();\n\t\tdocument.execCommand(\"copy\");\n\t\tta.remove();\n\t}\n\tfunction legacyRead() {\n\t\tvar _document$getSelectio, _document, _document$getSelectio2;\n\t\treturn (_document$getSelectio = (_document = document) === null || _document === void 0 || (_document$getSelectio2 = _document.getSelection) === null || _document$getSelectio2 === void 0 || (_document$getSelectio2 = _document$getSelectio2.call(_document)) === null || _document$getSelectio2 === void 0 ? void 0 : _document$getSelectio2.toString()) !== null && _document$getSelectio !== void 0 ? _document$getSelectio : \"\";\n\t}\n\tfunction isAllowed(status) {\n\t\treturn status === \"granted\" || status === \"prompt\";\n\t}\n\treturn {\n\t\tisSupported,\n\t\ttext: readonly(text),\n\t\tcopied: readonly(copied),\n\t\tcopy\n\t};\n}\n\n//#endregion\n//#region useClipboardItems/index.ts\nfunction useClipboardItems(options = {}) {\n\tconst { navigator: navigator$1 = defaultNavigator, read = false, source, copiedDuring = 1500 } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => navigator$1 && \"clipboard\" in navigator$1);\n\tconst content = ref([]);\n\tconst copied = shallowRef(false);\n\tconst timeout = useTimeoutFn(() => copied.value = false, copiedDuring, { immediate: false });\n\tfunction updateContent() {\n\t\tif (isSupported.value) navigator$1.clipboard.read().then((items) => {\n\t\t\tcontent.value = items;\n\t\t});\n\t}\n\tif (isSupported.value && read) useEventListener([\"copy\", \"cut\"], updateContent, { passive: true });\n\tasync function copy(value = toValue(source)) {\n\t\tif (isSupported.value && value != null) {\n\t\t\tawait navigator$1.clipboard.write(value);\n\t\t\tcontent.value = value;\n\t\t\tcopied.value = true;\n\t\t\ttimeout.start();\n\t\t}\n\t}\n\treturn {\n\t\tisSupported,\n\t\tcontent: shallowReadonly(content),\n\t\tcopied: readonly(copied),\n\t\tcopy,\n\t\tread: updateContent\n\t};\n}\n\n//#endregion\n//#region useCloned/index.ts\nfunction cloneFnJSON(source) {\n\treturn JSON.parse(JSON.stringify(source));\n}\nfunction useCloned(source, options = {}) {\n\tconst cloned = ref({});\n\tconst isModified = shallowRef(false);\n\tlet _lastSync = false;\n\tconst { manual, clone = cloneFnJSON, deep = true, immediate = true } = options;\n\twatch(cloned, () => {\n\t\tif (_lastSync) {\n\t\t\t_lastSync = false;\n\t\t\treturn;\n\t\t}\n\t\tisModified.value = true;\n\t}, {\n\t\tdeep: true,\n\t\tflush: \"sync\"\n\t});\n\tfunction sync() {\n\t\t_lastSync = true;\n\t\tisModified.value = false;\n\t\tcloned.value = clone(toValue(source));\n\t}\n\tif (!manual && (isRef(source) || typeof source === \"function\")) watch(source, sync, {\n\t\t...options,\n\t\tdeep,\n\t\timmediate\n\t});\n\telse sync();\n\treturn {\n\t\tcloned,\n\t\tisModified,\n\t\tsync\n\t};\n}\n\n//#endregion\n//#region ssr-handlers.ts\nconst _global = typeof globalThis !== \"undefined\" ? globalThis : typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : {};\nconst globalKey = \"__vueuse_ssr_handlers__\";\nconst handlers = /* @__PURE__ */ getHandlers();\nfunction getHandlers() {\n\tif (!(globalKey in _global)) _global[globalKey] = _global[globalKey] || {};\n\treturn _global[globalKey];\n}\nfunction getSSRHandler(key, fallback) {\n\treturn handlers[key] || fallback;\n}\nfunction setSSRHandler(key, fn) {\n\thandlers[key] = fn;\n}\n\n//#endregion\n//#region usePreferredDark/index.ts\n/**\n* Reactive dark theme preference.\n*\n* @see https://vueuse.org/usePreferredDark\n* @param [options]\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction usePreferredDark(options) {\n\treturn useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n}\n\n//#endregion\n//#region useStorage/guess.ts\nfunction guessSerializerType(rawInit) {\n\treturn rawInit == null ? \"any\" : rawInit instanceof Set ? \"set\" : rawInit instanceof Map ? \"map\" : rawInit instanceof Date ? \"date\" : typeof rawInit === \"boolean\" ? \"boolean\" : typeof rawInit === \"string\" ? \"string\" : typeof rawInit === \"object\" ? \"object\" : !Number.isNaN(rawInit) ? \"number\" : \"any\";\n}\n\n//#endregion\n//#region useStorage/index.ts\nconst StorageSerializers = {\n\tboolean: {\n\t\tread: (v) => v === \"true\",\n\t\twrite: (v) => String(v)\n\t},\n\tobject: {\n\t\tread: (v) => JSON.parse(v),\n\t\twrite: (v) => JSON.stringify(v)\n\t},\n\tnumber: {\n\t\tread: (v) => Number.parseFloat(v),\n\t\twrite: (v) => String(v)\n\t},\n\tany: {\n\t\tread: (v) => v,\n\t\twrite: (v) => String(v)\n\t},\n\tstring: {\n\t\tread: (v) => v,\n\t\twrite: (v) => String(v)\n\t},\n\tmap: {\n\t\tread: (v) => new Map(JSON.parse(v)),\n\t\twrite: (v) => JSON.stringify(Array.from(v.entries()))\n\t},\n\tset: {\n\t\tread: (v) => new Set(JSON.parse(v)),\n\t\twrite: (v) => JSON.stringify(Array.from(v))\n\t},\n\tdate: {\n\t\tread: (v) => new Date(v),\n\t\twrite: (v) => v.toISOString()\n\t}\n};\nconst customStorageEventName = \"vueuse-storage\";\n/**\n* Reactive LocalStorage/SessionStorage.\n*\n* @see https://vueuse.org/useStorage\n*/\nfunction useStorage(key, defaults$1, storage, options = {}) {\n\tvar _options$serializer;\n\tconst { flush = \"pre\", deep = true, listenToStorageChanges = true, writeDefaults = true, mergeDefaults = false, shallow, window: window$1 = defaultWindow, eventFilter, onError = (e) => {\n\t\tconsole.error(e);\n\t}, initOnMounted } = options;\n\tconst data = (shallow ? shallowRef : ref)(typeof defaults$1 === \"function\" ? defaults$1() : defaults$1);\n\tconst keyComputed = computed(() => toValue(key));\n\tif (!storage) try {\n\t\tstorage = getSSRHandler(\"getDefaultStorage\", () => defaultWindow === null || defaultWindow === void 0 ? void 0 : defaultWindow.localStorage)();\n\t} catch (e) {\n\t\tonError(e);\n\t}\n\tif (!storage) return data;\n\tconst rawInit = toValue(defaults$1);\n\tconst type = guessSerializerType(rawInit);\n\tconst serializer = (_options$serializer = options.serializer) !== null && _options$serializer !== void 0 ? _options$serializer : StorageSerializers[type];\n\tconst { pause: pauseWatch, resume: resumeWatch } = pausableWatch(data, (newValue) => write(newValue), {\n\t\tflush,\n\t\tdeep,\n\t\teventFilter\n\t});\n\twatch(keyComputed, () => update(), { flush });\n\tlet firstMounted = false;\n\tconst onStorageEvent = (ev) => {\n\t\tif (initOnMounted && !firstMounted) return;\n\t\tupdate(ev);\n\t};\n\tconst onStorageCustomEvent = (ev) => {\n\t\tif (initOnMounted && !firstMounted) return;\n\t\tupdateFromCustomEvent(ev);\n\t};\n\t/**\n\t* The custom event is needed for same-document syncing when using custom\n\t* storage backends, but it doesn't work across different documents.\n\t*\n\t* TODO: Consider implementing a BroadcastChannel-based solution that fixes this.\n\t*/\n\tif (window$1 && listenToStorageChanges) if (storage instanceof Storage) useEventListener(window$1, \"storage\", onStorageEvent, { passive: true });\n\telse useEventListener(window$1, customStorageEventName, onStorageCustomEvent);\n\tif (initOnMounted) tryOnMounted(() => {\n\t\tfirstMounted = true;\n\t\tupdate();\n\t});\n\telse update();\n\tfunction dispatchWriteEvent(oldValue, newValue) {\n\t\tif (window$1) {\n\t\t\tconst payload = {\n\t\t\t\tkey: keyComputed.value,\n\t\t\t\toldValue,\n\t\t\t\tnewValue,\n\t\t\t\tstorageArea: storage\n\t\t\t};\n\t\t\twindow$1.dispatchEvent(storage instanceof Storage ? new StorageEvent(\"storage\", payload) : new CustomEvent(customStorageEventName, { detail: payload }));\n\t\t}\n\t}\n\tfunction write(v) {\n\t\ttry {\n\t\t\tconst oldValue = storage.getItem(keyComputed.value);\n\t\t\tif (v == null) {\n\t\t\t\tdispatchWriteEvent(oldValue, null);\n\t\t\t\tstorage.removeItem(keyComputed.value);\n\t\t\t} else {\n\t\t\t\tconst serialized = serializer.write(v);\n\t\t\t\tif (oldValue !== serialized) {\n\t\t\t\t\tstorage.setItem(keyComputed.value, serialized);\n\t\t\t\t\tdispatchWriteEvent(oldValue, serialized);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tonError(e);\n\t\t}\n\t}\n\tfunction read(event) {\n\t\tconst rawValue = event ? event.newValue : storage.getItem(keyComputed.value);\n\t\tif (rawValue == null) {\n\t\t\tif (writeDefaults && rawInit != null) storage.setItem(keyComputed.value, serializer.write(rawInit));\n\t\t\treturn rawInit;\n\t\t} else if (!event && mergeDefaults) {\n\t\t\tconst value = serializer.read(rawValue);\n\t\t\tif (typeof mergeDefaults === \"function\") return mergeDefaults(value, rawInit);\n\t\t\telse if (type === \"object\" && !Array.isArray(value)) return {\n\t\t\t\t...rawInit,\n\t\t\t\t...value\n\t\t\t};\n\t\t\treturn value;\n\t\t} else if (typeof rawValue !== \"string\") return rawValue;\n\t\telse return serializer.read(rawValue);\n\t}\n\tfunction update(event) {\n\t\tif (event && event.storageArea !== storage) return;\n\t\tif (event && event.key == null) {\n\t\t\tdata.value = rawInit;\n\t\t\treturn;\n\t\t}\n\t\tif (event && event.key !== keyComputed.value) return;\n\t\tpauseWatch();\n\t\ttry {\n\t\t\tconst serializedData = serializer.write(data.value);\n\t\t\tif (event === void 0 || (event === null || event === void 0 ? void 0 : event.newValue) !== serializedData) data.value = read(event);\n\t\t} catch (e) {\n\t\t\tonError(e);\n\t\t} finally {\n\t\t\tif (event) nextTick(resumeWatch);\n\t\t\telse resumeWatch();\n\t\t}\n\t}\n\tfunction updateFromCustomEvent(event) {\n\t\tupdate(event.detail);\n\t}\n\treturn data;\n}\n\n//#endregion\n//#region useColorMode/index.ts\nconst CSS_DISABLE_TRANS = \"*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}\";\n/**\n* Reactive color mode with auto data persistence.\n*\n* @see https://vueuse.org/useColorMode\n* @param options\n*/\nfunction useColorMode(options = {}) {\n\tconst { selector = \"html\", attribute = \"class\", initialValue = \"auto\", window: window$1 = defaultWindow, storage, storageKey = \"vueuse-color-scheme\", listenToStorageChanges = true, storageRef, emitAuto, disableTransition = true } = options;\n\tconst modes = {\n\t\tauto: \"\",\n\t\tlight: \"light\",\n\t\tdark: \"dark\",\n\t\t...options.modes || {}\n\t};\n\tconst preferredDark = usePreferredDark({ window: window$1 });\n\tconst system = computed(() => preferredDark.value ? \"dark\" : \"light\");\n\tconst store = storageRef || (storageKey == null ? toRef(initialValue) : useStorage(storageKey, initialValue, storage, {\n\t\twindow: window$1,\n\t\tlistenToStorageChanges\n\t}));\n\tconst state = computed(() => store.value === \"auto\" ? system.value : store.value);\n\tconst updateHTMLAttrs = getSSRHandler(\"updateHTMLAttrs\", (selector$1, attribute$1, value) => {\n\t\tconst el = typeof selector$1 === \"string\" ? window$1 === null || window$1 === void 0 ? void 0 : window$1.document.querySelector(selector$1) : unrefElement(selector$1);\n\t\tif (!el) return;\n\t\tconst classesToAdd = /* @__PURE__ */ new Set();\n\t\tconst classesToRemove = /* @__PURE__ */ new Set();\n\t\tlet attributeToChange = null;\n\t\tif (attribute$1 === \"class\") {\n\t\t\tconst current = value.split(/\\s/g);\n\t\t\tObject.values(modes).flatMap((i) => (i || \"\").split(/\\s/g)).filter(Boolean).forEach((v) => {\n\t\t\t\tif (current.includes(v)) classesToAdd.add(v);\n\t\t\t\telse classesToRemove.add(v);\n\t\t\t});\n\t\t} else attributeToChange = {\n\t\t\tkey: attribute$1,\n\t\t\tvalue\n\t\t};\n\t\tif (classesToAdd.size === 0 && classesToRemove.size === 0 && attributeToChange === null) return;\n\t\tlet style;\n\t\tif (disableTransition) {\n\t\t\tstyle = window$1.document.createElement(\"style\");\n\t\t\tstyle.appendChild(document.createTextNode(CSS_DISABLE_TRANS));\n\t\t\twindow$1.document.head.appendChild(style);\n\t\t}\n\t\tfor (const c of classesToAdd) el.classList.add(c);\n\t\tfor (const c of classesToRemove) el.classList.remove(c);\n\t\tif (attributeToChange) el.setAttribute(attributeToChange.key, attributeToChange.value);\n\t\tif (disableTransition) {\n\t\t\twindow$1.getComputedStyle(style).opacity;\n\t\t\tdocument.head.removeChild(style);\n\t\t}\n\t});\n\tfunction defaultOnChanged(mode) {\n\t\tvar _modes$mode;\n\t\tupdateHTMLAttrs(selector, attribute, (_modes$mode = modes[mode]) !== null && _modes$mode !== void 0 ? _modes$mode : mode);\n\t}\n\tfunction onChanged(mode) {\n\t\tif (options.onChanged) options.onChanged(mode, defaultOnChanged);\n\t\telse defaultOnChanged(mode);\n\t}\n\twatch(state, onChanged, {\n\t\tflush: \"post\",\n\t\timmediate: true\n\t});\n\ttryOnMounted(() => onChanged(state.value));\n\tconst auto = computed({\n\t\tget() {\n\t\t\treturn emitAuto ? store.value : state.value;\n\t\t},\n\t\tset(v) {\n\t\t\tstore.value = v;\n\t\t}\n\t});\n\treturn Object.assign(auto, {\n\t\tstore,\n\t\tsystem,\n\t\tstate\n\t});\n}\n\n//#endregion\n//#region useConfirmDialog/index.ts\n/**\n* Hooks for creating confirm dialogs. Useful for modal windows, popups and logins.\n*\n* @see https://vueuse.org/useConfirmDialog/\n* @param revealed `boolean` `ref` that handles a modal window\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useConfirmDialog(revealed = shallowRef(false)) {\n\tconst confirmHook = createEventHook();\n\tconst cancelHook = createEventHook();\n\tconst revealHook = createEventHook();\n\tlet _resolve = noop;\n\tconst reveal = (data) => {\n\t\trevealHook.trigger(data);\n\t\trevealed.value = true;\n\t\treturn new Promise((resolve) => {\n\t\t\t_resolve = resolve;\n\t\t});\n\t};\n\tconst confirm = (data) => {\n\t\trevealed.value = false;\n\t\tconfirmHook.trigger(data);\n\t\t_resolve({\n\t\t\tdata,\n\t\t\tisCanceled: false\n\t\t});\n\t};\n\tconst cancel = (data) => {\n\t\trevealed.value = false;\n\t\tcancelHook.trigger(data);\n\t\t_resolve({\n\t\t\tdata,\n\t\t\tisCanceled: true\n\t\t});\n\t};\n\treturn {\n\t\tisRevealed: computed(() => revealed.value),\n\t\treveal,\n\t\tconfirm,\n\t\tcancel,\n\t\tonReveal: revealHook.on,\n\t\tonConfirm: confirmHook.on,\n\t\tonCancel: cancelHook.on\n\t};\n}\n\n//#endregion\n//#region useCountdown/index.ts\n/**\n* Wrapper for `useIntervalFn` that provides a countdown timer in seconds.\n*\n* @param initialCountdown\n* @param options\n*\n* @see https://vueuse.org/useCountdown\n*/\nfunction useCountdown(initialCountdown, options) {\n\tvar _options$interval, _options$immediate;\n\tconst remaining = shallowRef(toValue(initialCountdown));\n\tconst intervalController = useIntervalFn(() => {\n\t\tvar _options$onTick;\n\t\tconst value = remaining.value - 1;\n\t\tremaining.value = value < 0 ? 0 : value;\n\t\toptions === null || options === void 0 || (_options$onTick = options.onTick) === null || _options$onTick === void 0 || _options$onTick.call(options);\n\t\tif (remaining.value <= 0) {\n\t\t\tvar _options$onComplete;\n\t\t\tintervalController.pause();\n\t\t\toptions === null || options === void 0 || (_options$onComplete = options.onComplete) === null || _options$onComplete === void 0 || _options$onComplete.call(options);\n\t\t}\n\t}, (_options$interval = options === null || options === void 0 ? void 0 : options.interval) !== null && _options$interval !== void 0 ? _options$interval : 1e3, { immediate: (_options$immediate = options === null || options === void 0 ? void 0 : options.immediate) !== null && _options$immediate !== void 0 ? _options$immediate : false });\n\tconst reset = (countdown) => {\n\t\tvar _toValue;\n\t\tremaining.value = (_toValue = toValue(countdown)) !== null && _toValue !== void 0 ? _toValue : toValue(initialCountdown);\n\t};\n\tconst stop = () => {\n\t\tintervalController.pause();\n\t\treset();\n\t};\n\tconst resume = () => {\n\t\tif (!intervalController.isActive.value) {\n\t\t\tif (remaining.value > 0) intervalController.resume();\n\t\t}\n\t};\n\tconst start = (countdown) => {\n\t\treset(countdown);\n\t\tintervalController.resume();\n\t};\n\treturn {\n\t\tremaining,\n\t\treset,\n\t\tstop,\n\t\tstart,\n\t\tpause: intervalController.pause,\n\t\tresume,\n\t\tisActive: intervalController.isActive\n\t};\n}\n\n//#endregion\n//#region useCssVar/index.ts\n/**\n* Manipulate CSS variables.\n*\n* @see https://vueuse.org/useCssVar\n* @param prop\n* @param target\n* @param options\n*/\nfunction useCssVar(prop, target, options = {}) {\n\tconst { window: window$1 = defaultWindow, initialValue, observe = false } = options;\n\tconst variable = shallowRef(initialValue);\n\tconst elRef = computed(() => {\n\t\tvar _window$document;\n\t\treturn unrefElement(target) || (window$1 === null || window$1 === void 0 || (_window$document = window$1.document) === null || _window$document === void 0 ? void 0 : _window$document.documentElement);\n\t});\n\tfunction updateCssVar() {\n\t\tconst key = toValue(prop);\n\t\tconst el = toValue(elRef);\n\t\tif (el && window$1 && key) {\n\t\t\tvar _window$getComputedSt;\n\t\t\tvariable.value = ((_window$getComputedSt = window$1.getComputedStyle(el).getPropertyValue(key)) === null || _window$getComputedSt === void 0 ? void 0 : _window$getComputedSt.trim()) || variable.value || initialValue;\n\t\t}\n\t}\n\tif (observe) useMutationObserver(elRef, updateCssVar, {\n\t\tattributeFilter: [\"style\", \"class\"],\n\t\twindow: window$1\n\t});\n\twatch([elRef, () => toValue(prop)], (_, old) => {\n\t\tif (old[0] && old[1]) old[0].style.removeProperty(old[1]);\n\t\tupdateCssVar();\n\t}, { immediate: true });\n\twatch([variable, elRef], ([val, el]) => {\n\t\tconst raw_prop = toValue(prop);\n\t\tif ((el === null || el === void 0 ? void 0 : el.style) && raw_prop) if (val == null) el.style.removeProperty(raw_prop);\n\t\telse el.style.setProperty(raw_prop, val);\n\t}, { immediate: true });\n\treturn variable;\n}\n\n//#endregion\n//#region useCurrentElement/index.ts\nfunction useCurrentElement(rootComponent) {\n\tconst vm = getCurrentInstance();\n\tconst currentElement = computedWithControl(() => null, () => rootComponent ? unrefElement(rootComponent) : vm.proxy.$el);\n\tonUpdated(currentElement.trigger);\n\tonMounted(currentElement.trigger);\n\treturn currentElement;\n}\n\n//#endregion\n//#region useCycleList/index.ts\n/**\n* Cycle through a list of items\n*\n* @see https://vueuse.org/useCycleList\n*/\nfunction useCycleList(list, options) {\n\tconst state = shallowRef(getInitialValue());\n\tconst listRef = toRef(list);\n\tconst index = computed({\n\t\tget() {\n\t\t\tvar _options$fallbackInde;\n\t\t\tconst targetList = listRef.value;\n\t\t\tlet index$1 = (options === null || options === void 0 ? void 0 : options.getIndexOf) ? options.getIndexOf(state.value, targetList) : targetList.indexOf(state.value);\n\t\t\tif (index$1 < 0) index$1 = (_options$fallbackInde = options === null || options === void 0 ? void 0 : options.fallbackIndex) !== null && _options$fallbackInde !== void 0 ? _options$fallbackInde : 0;\n\t\t\treturn index$1;\n\t\t},\n\t\tset(v) {\n\t\t\tset(v);\n\t\t}\n\t});\n\tfunction set(i) {\n\t\tconst targetList = listRef.value;\n\t\tconst length = targetList.length;\n\t\tconst value = targetList[(i % length + length) % length];\n\t\tstate.value = value;\n\t\treturn value;\n\t}\n\tfunction shift(delta = 1) {\n\t\treturn set(index.value + delta);\n\t}\n\tfunction next(n = 1) {\n\t\treturn shift(n);\n\t}\n\tfunction prev(n = 1) {\n\t\treturn shift(-n);\n\t}\n\tfunction getInitialValue() {\n\t\tvar _toValue, _options$initialValue;\n\t\treturn (_toValue = toValue((_options$initialValue = options === null || options === void 0 ? void 0 : options.initialValue) !== null && _options$initialValue !== void 0 ? _options$initialValue : toValue(list)[0])) !== null && _toValue !== void 0 ? _toValue : void 0;\n\t}\n\twatch(listRef, () => set(index.value));\n\treturn {\n\t\tstate,\n\t\tindex,\n\t\tnext,\n\t\tprev,\n\t\tgo: set\n\t};\n}\n\n//#endregion\n//#region useDark/index.ts\n/**\n* Reactive dark mode with auto data persistence.\n*\n* @see https://vueuse.org/useDark\n* @param options\n*/\nfunction useDark(options = {}) {\n\tconst { valueDark = \"dark\", valueLight = \"\" } = options;\n\tconst mode = useColorMode({\n\t\t...options,\n\t\tonChanged: (mode$1, defaultHandler) => {\n\t\t\tvar _options$onChanged;\n\t\t\tif (options.onChanged) (_options$onChanged = options.onChanged) === null || _options$onChanged === void 0 || _options$onChanged.call(options, mode$1 === \"dark\", defaultHandler, mode$1);\n\t\t\telse defaultHandler(mode$1);\n\t\t},\n\t\tmodes: {\n\t\t\tdark: valueDark,\n\t\t\tlight: valueLight\n\t\t}\n\t});\n\tconst system = computed(() => mode.system.value);\n\treturn computed({\n\t\tget() {\n\t\t\treturn mode.value === \"dark\";\n\t\t},\n\t\tset(v) {\n\t\t\tconst modeVal = v ? \"dark\" : \"light\";\n\t\t\tif (system.value === modeVal) mode.value = \"auto\";\n\t\t\telse mode.value = modeVal;\n\t\t}\n\t});\n}\n\n//#endregion\n//#region useManualRefHistory/index.ts\nfunction fnBypass(v) {\n\treturn v;\n}\nfunction fnSetSource(source, value) {\n\treturn source.value = value;\n}\nfunction defaultDump(clone) {\n\treturn clone ? typeof clone === \"function\" ? clone : cloneFnJSON : fnBypass;\n}\nfunction defaultParse(clone) {\n\treturn clone ? typeof clone === \"function\" ? clone : cloneFnJSON : fnBypass;\n}\n/**\n* Track the change history of a ref, also provides undo and redo functionality.\n*\n* @see https://vueuse.org/useManualRefHistory\n* @param source\n* @param options\n*/\nfunction useManualRefHistory(source, options = {}) {\n\tconst { clone = false, dump = defaultDump(clone), parse = defaultParse(clone), setSource = fnSetSource } = options;\n\tfunction _createHistoryRecord() {\n\t\treturn markRaw({\n\t\t\tsnapshot: dump(source.value),\n\t\t\ttimestamp: timestamp()\n\t\t});\n\t}\n\tconst last = ref(_createHistoryRecord());\n\tconst undoStack = ref([]);\n\tconst redoStack = ref([]);\n\tconst _setSource = (record) => {\n\t\tsetSource(source, parse(record.snapshot));\n\t\tlast.value = record;\n\t};\n\tconst commit = () => {\n\t\tundoStack.value.unshift(last.value);\n\t\tlast.value = _createHistoryRecord();\n\t\tif (options.capacity && undoStack.value.length > options.capacity) undoStack.value.splice(options.capacity, Number.POSITIVE_INFINITY);\n\t\tif (redoStack.value.length) redoStack.value.splice(0, redoStack.value.length);\n\t};\n\tconst clear = () => {\n\t\tundoStack.value.splice(0, undoStack.value.length);\n\t\tredoStack.value.splice(0, redoStack.value.length);\n\t};\n\tconst undo = () => {\n\t\tconst state = undoStack.value.shift();\n\t\tif (state) {\n\t\t\tredoStack.value.unshift(last.value);\n\t\t\t_setSource(state);\n\t\t}\n\t};\n\tconst redo = () => {\n\t\tconst state = redoStack.value.shift();\n\t\tif (state) {\n\t\t\tundoStack.value.unshift(last.value);\n\t\t\t_setSource(state);\n\t\t}\n\t};\n\tconst reset = () => {\n\t\t_setSource(last.value);\n\t};\n\treturn {\n\t\tsource,\n\t\tundoStack,\n\t\tredoStack,\n\t\tlast,\n\t\thistory: computed(() => [last.value, ...undoStack.value]),\n\t\tcanUndo: computed(() => undoStack.value.length > 0),\n\t\tcanRedo: computed(() => redoStack.value.length > 0),\n\t\tclear,\n\t\tcommit,\n\t\treset,\n\t\tundo,\n\t\tredo\n\t};\n}\n\n//#endregion\n//#region useRefHistory/index.ts\n/**\n* Track the change history of a ref, also provides undo and redo functionality.\n*\n* @see https://vueuse.org/useRefHistory\n* @param source\n* @param options\n*/\nfunction useRefHistory(source, options = {}) {\n\tconst { deep = false, flush = \"pre\", eventFilter, shouldCommit = () => true } = options;\n\tconst { eventFilter: composedFilter, pause, resume: resumeTracking, isActive: isTracking } = pausableFilter(eventFilter);\n\tlet lastRawValue = source.value;\n\tconst { ignoreUpdates, ignorePrevAsyncUpdates, stop } = watchIgnorable(source, commit, {\n\t\tdeep,\n\t\tflush,\n\t\teventFilter: composedFilter\n\t});\n\tfunction setSource(source$1, value) {\n\t\tignorePrevAsyncUpdates();\n\t\tignoreUpdates(() => {\n\t\t\tsource$1.value = value;\n\t\t\tlastRawValue = value;\n\t\t});\n\t}\n\tconst manualHistory = useManualRefHistory(source, {\n\t\t...options,\n\t\tclone: options.clone || deep,\n\t\tsetSource\n\t});\n\tconst { clear, commit: manualCommit } = manualHistory;\n\tfunction commit() {\n\t\tignorePrevAsyncUpdates();\n\t\tif (!shouldCommit(lastRawValue, source.value)) return;\n\t\tlastRawValue = source.value;\n\t\tmanualCommit();\n\t}\n\tfunction resume(commitNow) {\n\t\tresumeTracking();\n\t\tif (commitNow) commit();\n\t}\n\tfunction batch(fn) {\n\t\tlet canceled = false;\n\t\tconst cancel = () => canceled = true;\n\t\tignoreUpdates(() => {\n\t\t\tfn(cancel);\n\t\t});\n\t\tif (!canceled) commit();\n\t}\n\tfunction dispose() {\n\t\tstop();\n\t\tclear();\n\t}\n\treturn {\n\t\t...manualHistory,\n\t\tisTracking,\n\t\tpause,\n\t\tresume,\n\t\tcommit,\n\t\tbatch,\n\t\tdispose\n\t};\n}\n\n//#endregion\n//#region useDebouncedRefHistory/index.ts\n/**\n* Shorthand for [useRefHistory](https://vueuse.org/useRefHistory) with debounce filter.\n*\n* @see https://vueuse.org/useDebouncedRefHistory\n* @param source\n* @param options\n*/\nfunction useDebouncedRefHistory(source, options = {}) {\n\tconst filter = options.debounce ? debounceFilter(options.debounce) : void 0;\n\treturn { ...useRefHistory(source, {\n\t\t...options,\n\t\teventFilter: filter\n\t}) };\n}\n\n//#endregion\n//#region useDeviceMotion/index.ts\n/**\n* Reactive DeviceMotionEvent.\n*\n* @see https://vueuse.org/useDeviceMotion\n* @param options\n*/\nfunction useDeviceMotion(options = {}) {\n\tconst { window: window$1 = defaultWindow, requestPermissions = false, eventFilter = bypassFilter } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => typeof DeviceMotionEvent !== \"undefined\");\n\tconst requirePermissions = /* @__PURE__ */ useSupported(() => isSupported.value && \"requestPermission\" in DeviceMotionEvent && typeof DeviceMotionEvent.requestPermission === \"function\");\n\tconst permissionGranted = shallowRef(false);\n\tconst acceleration = ref({\n\t\tx: null,\n\t\ty: null,\n\t\tz: null\n\t});\n\tconst rotationRate = ref({\n\t\talpha: null,\n\t\tbeta: null,\n\t\tgamma: null\n\t});\n\tconst interval = shallowRef(0);\n\tconst accelerationIncludingGravity = ref({\n\t\tx: null,\n\t\ty: null,\n\t\tz: null\n\t});\n\tfunction init() {\n\t\tif (window$1) useEventListener(window$1, \"devicemotion\", createFilterWrapper(eventFilter, (event) => {\n\t\t\tvar _event$acceleration, _event$acceleration2, _event$acceleration3, _event$accelerationIn, _event$accelerationIn2, _event$accelerationIn3, _event$rotationRate, _event$rotationRate2, _event$rotationRate3;\n\t\t\tacceleration.value = {\n\t\t\t\tx: ((_event$acceleration = event.acceleration) === null || _event$acceleration === void 0 ? void 0 : _event$acceleration.x) || null,\n\t\t\t\ty: ((_event$acceleration2 = event.acceleration) === null || _event$acceleration2 === void 0 ? void 0 : _event$acceleration2.y) || null,\n\t\t\t\tz: ((_event$acceleration3 = event.acceleration) === null || _event$acceleration3 === void 0 ? void 0 : _event$acceleration3.z) || null\n\t\t\t};\n\t\t\taccelerationIncludingGravity.value = {\n\t\t\t\tx: ((_event$accelerationIn = event.accelerationIncludingGravity) === null || _event$accelerationIn === void 0 ? void 0 : _event$accelerationIn.x) || null,\n\t\t\t\ty: ((_event$accelerationIn2 = event.accelerationIncludingGravity) === null || _event$accelerationIn2 === void 0 ? void 0 : _event$accelerationIn2.y) || null,\n\t\t\t\tz: ((_event$accelerationIn3 = event.accelerationIncludingGravity) === null || _event$accelerationIn3 === void 0 ? void 0 : _event$accelerationIn3.z) || null\n\t\t\t};\n\t\t\trotationRate.value = {\n\t\t\t\talpha: ((_event$rotationRate = event.rotationRate) === null || _event$rotationRate === void 0 ? void 0 : _event$rotationRate.alpha) || null,\n\t\t\t\tbeta: ((_event$rotationRate2 = event.rotationRate) === null || _event$rotationRate2 === void 0 ? void 0 : _event$rotationRate2.beta) || null,\n\t\t\t\tgamma: ((_event$rotationRate3 = event.rotationRate) === null || _event$rotationRate3 === void 0 ? void 0 : _event$rotationRate3.gamma) || null\n\t\t\t};\n\t\t\tinterval.value = event.interval;\n\t\t}), { passive: true });\n\t}\n\tconst ensurePermissions = async () => {\n\t\tif (!requirePermissions.value) permissionGranted.value = true;\n\t\tif (permissionGranted.value) return;\n\t\tif (requirePermissions.value) {\n\t\t\tconst requestPermission = DeviceMotionEvent.requestPermission;\n\t\t\ttry {\n\t\t\t\tif (await requestPermission() === \"granted\") {\n\t\t\t\t\tpermissionGranted.value = true;\n\t\t\t\t\tinit();\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(error);\n\t\t\t}\n\t\t}\n\t};\n\tif (isSupported.value) if (requestPermissions && requirePermissions.value) ensurePermissions().then(() => init());\n\telse init();\n\treturn {\n\t\tacceleration,\n\t\taccelerationIncludingGravity,\n\t\trotationRate,\n\t\tinterval,\n\t\tisSupported,\n\t\trequirePermissions,\n\t\tensurePermissions,\n\t\tpermissionGranted\n\t};\n}\n\n//#endregion\n//#region useDeviceOrientation/index.ts\n/**\n* Reactive DeviceOrientationEvent.\n*\n* @see https://vueuse.org/useDeviceOrientation\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useDeviceOrientation(options = {}) {\n\tconst { window: window$1 = defaultWindow } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => window$1 && \"DeviceOrientationEvent\" in window$1);\n\tconst isAbsolute = shallowRef(false);\n\tconst alpha = shallowRef(null);\n\tconst beta = shallowRef(null);\n\tconst gamma = shallowRef(null);\n\tif (window$1 && isSupported.value) useEventListener(window$1, \"deviceorientation\", (event) => {\n\t\tisAbsolute.value = event.absolute;\n\t\talpha.value = event.alpha;\n\t\tbeta.value = event.beta;\n\t\tgamma.value = event.gamma;\n\t}, { passive: true });\n\treturn {\n\t\tisSupported,\n\t\tisAbsolute,\n\t\talpha,\n\t\tbeta,\n\t\tgamma\n\t};\n}\n\n//#endregion\n//#region useDevicePixelRatio/index.ts\n/**\n* Reactively track `window.devicePixelRatio`.\n*\n* @see https://vueuse.org/useDevicePixelRatio\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useDevicePixelRatio(options = {}) {\n\tconst { window: window$1 = defaultWindow } = options;\n\tconst pixelRatio = shallowRef(1);\n\tconst query = useMediaQuery(() => `(resolution: ${pixelRatio.value}dppx)`, options);\n\tlet stop = noop;\n\tif (window$1) stop = watchImmediate(query, () => pixelRatio.value = window$1.devicePixelRatio);\n\treturn {\n\t\tpixelRatio: readonly(pixelRatio),\n\t\tstop\n\t};\n}\n\n//#endregion\n//#region useDevicesList/index.ts\n/**\n* Reactive `enumerateDevices` listing available input/output devices\n*\n* @see https://vueuse.org/useDevicesList\n* @param options\n*/\nfunction useDevicesList(options = {}) {\n\tconst { navigator: navigator$1 = defaultNavigator, requestPermissions = false, constraints = {\n\t\taudio: true,\n\t\tvideo: true\n\t}, onUpdated: onUpdated$1 } = options;\n\tconst devices = ref([]);\n\tconst videoInputs = computed(() => devices.value.filter((i) => i.kind === \"videoinput\"));\n\tconst audioInputs = computed(() => devices.value.filter((i) => i.kind === \"audioinput\"));\n\tconst audioOutputs = computed(() => devices.value.filter((i) => i.kind === \"audiooutput\"));\n\tconst isSupported = /* @__PURE__ */ useSupported(() => navigator$1 && navigator$1.mediaDevices && navigator$1.mediaDevices.enumerateDevices);\n\tconst permissionGranted = shallowRef(false);\n\tlet stream;\n\tasync function update() {\n\t\tif (!isSupported.value) return;\n\t\tdevices.value = await navigator$1.mediaDevices.enumerateDevices();\n\t\tonUpdated$1 === null || onUpdated$1 === void 0 || onUpdated$1(devices.value);\n\t\tif (stream) {\n\t\t\tstream.getTracks().forEach((t) => t.stop());\n\t\t\tstream = null;\n\t\t}\n\t}\n\tasync function ensurePermissions() {\n\t\tconst deviceName = constraints.video ? \"camera\" : \"microphone\";\n\t\tif (!isSupported.value) return false;\n\t\tif (permissionGranted.value) return true;\n\t\tconst { state, query } = usePermission(deviceName, { controls: true });\n\t\tawait query();\n\t\tif (state.value !== \"granted\") {\n\t\t\tlet granted = true;\n\t\t\ttry {\n\t\t\t\tconst allDevices = await navigator$1.mediaDevices.enumerateDevices();\n\t\t\t\tconst hasCamera = allDevices.some((device) => device.kind === \"videoinput\");\n\t\t\t\tconst hasMicrophone = allDevices.some((device) => device.kind === \"audioinput\" || device.kind === \"audiooutput\");\n\t\t\t\tconstraints.video = hasCamera ? constraints.video : false;\n\t\t\t\tconstraints.audio = hasMicrophone ? constraints.audio : false;\n\t\t\t\tstream = await navigator$1.mediaDevices.getUserMedia(constraints);\n\t\t\t} catch (_unused) {\n\t\t\t\tstream = null;\n\t\t\t\tgranted = false;\n\t\t\t}\n\t\t\tupdate();\n\t\t\tpermissionGranted.value = granted;\n\t\t} else permissionGranted.value = true;\n\t\treturn permissionGranted.value;\n\t}\n\tif (isSupported.value) {\n\t\tif (requestPermissions) ensurePermissions();\n\t\tuseEventListener(navigator$1.mediaDevices, \"devicechange\", update, { passive: true });\n\t\tupdate();\n\t}\n\treturn {\n\t\tdevices,\n\t\tensurePermissions,\n\t\tpermissionGranted,\n\t\tvideoInputs,\n\t\taudioInputs,\n\t\taudioOutputs,\n\t\tisSupported\n\t};\n}\n\n//#endregion\n//#region useDisplayMedia/index.ts\n/**\n* Reactive `mediaDevices.getDisplayMedia` streaming\n*\n* @see https://vueuse.org/useDisplayMedia\n* @param options\n*/\nfunction useDisplayMedia(options = {}) {\n\tvar _options$enabled;\n\tconst enabled = shallowRef((_options$enabled = options.enabled) !== null && _options$enabled !== void 0 ? _options$enabled : false);\n\tconst video = options.video;\n\tconst audio = options.audio;\n\tconst { navigator: navigator$1 = defaultNavigator } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => {\n\t\tvar _navigator$mediaDevic;\n\t\treturn navigator$1 === null || navigator$1 === void 0 || (_navigator$mediaDevic = navigator$1.mediaDevices) === null || _navigator$mediaDevic === void 0 ? void 0 : _navigator$mediaDevic.getDisplayMedia;\n\t});\n\tconst constraint = {\n\t\taudio,\n\t\tvideo\n\t};\n\tconst stream = shallowRef();\n\tasync function _start() {\n\t\tvar _stream$value;\n\t\tif (!isSupported.value || stream.value) return;\n\t\tstream.value = await navigator$1.mediaDevices.getDisplayMedia(constraint);\n\t\t(_stream$value = stream.value) === null || _stream$value === void 0 || _stream$value.getTracks().forEach((t) => useEventListener(t, \"ended\", stop, { passive: true }));\n\t\treturn stream.value;\n\t}\n\tasync function _stop() {\n\t\tvar _stream$value2;\n\t\t(_stream$value2 = stream.value) === null || _stream$value2 === void 0 || _stream$value2.getTracks().forEach((t) => t.stop());\n\t\tstream.value = void 0;\n\t}\n\tfunction stop() {\n\t\t_stop();\n\t\tenabled.value = false;\n\t}\n\tasync function start() {\n\t\tawait _start();\n\t\tif (stream.value) enabled.value = true;\n\t\treturn stream.value;\n\t}\n\twatch(enabled, (v) => {\n\t\tif (v) _start();\n\t\telse _stop();\n\t}, { immediate: true });\n\treturn {\n\t\tisSupported,\n\t\tstream,\n\t\tstart,\n\t\tstop,\n\t\tenabled\n\t};\n}\n\n//#endregion\n//#region useDocumentVisibility/index.ts\n/**\n* Reactively track `document.visibilityState`.\n*\n* @see https://vueuse.org/useDocumentVisibility\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useDocumentVisibility(options = {}) {\n\tconst { document: document$1 = defaultDocument } = options;\n\tif (!document$1) return shallowRef(\"visible\");\n\tconst visibility = shallowRef(document$1.visibilityState);\n\tuseEventListener(document$1, \"visibilitychange\", () => {\n\t\tvisibility.value = document$1.visibilityState;\n\t}, { passive: true });\n\treturn visibility;\n}\n\n//#endregion\n//#region useDraggable/index.ts\n/**\n* Make elements draggable.\n*\n* @see https://vueuse.org/useDraggable\n* @param target\n* @param options\n*/\nfunction useDraggable(target, options = {}) {\n\tvar _toValue;\n\tconst { pointerTypes, preventDefault: preventDefault$1, stopPropagation, exact, onMove, onEnd, onStart, initialValue, axis = \"both\", draggingElement = defaultWindow, containerElement, handle: draggingHandle = target, buttons = [0] } = options;\n\tconst position = ref((_toValue = toValue(initialValue)) !== null && _toValue !== void 0 ? _toValue : {\n\t\tx: 0,\n\t\ty: 0\n\t});\n\tconst pressedDelta = ref();\n\tconst filterEvent = (e) => {\n\t\tif (pointerTypes) return pointerTypes.includes(e.pointerType);\n\t\treturn true;\n\t};\n\tconst handleEvent = (e) => {\n\t\tif (toValue(preventDefault$1)) e.preventDefault();\n\t\tif (toValue(stopPropagation)) e.stopPropagation();\n\t};\n\tconst start = (e) => {\n\t\tvar _container$getBoundin;\n\t\tif (!toValue(buttons).includes(e.button)) return;\n\t\tif (toValue(options.disabled) || !filterEvent(e)) return;\n\t\tif (toValue(exact) && e.target !== toValue(target)) return;\n\t\tconst container = toValue(containerElement);\n\t\tconst containerRect = container === null || container === void 0 || (_container$getBoundin = container.getBoundingClientRect) === null || _container$getBoundin === void 0 ? void 0 : _container$getBoundin.call(container);\n\t\tconst targetRect = toValue(target).getBoundingClientRect();\n\t\tconst pos = {\n\t\t\tx: e.clientX - (container ? targetRect.left - containerRect.left + container.scrollLeft : targetRect.left),\n\t\t\ty: e.clientY - (container ? targetRect.top - containerRect.top + container.scrollTop : targetRect.top)\n\t\t};\n\t\tif ((onStart === null || onStart === void 0 ? void 0 : onStart(pos, e)) === false) return;\n\t\tpressedDelta.value = pos;\n\t\thandleEvent(e);\n\t};\n\tconst move = (e) => {\n\t\tif (toValue(options.disabled) || !filterEvent(e)) return;\n\t\tif (!pressedDelta.value) return;\n\t\tconst container = toValue(containerElement);\n\t\tconst targetRect = toValue(target).getBoundingClientRect();\n\t\tlet { x, y } = position.value;\n\t\tif (axis === \"x\" || axis === \"both\") {\n\t\t\tx = e.clientX - pressedDelta.value.x;\n\t\t\tif (container) x = Math.min(Math.max(0, x), container.scrollWidth - targetRect.width);\n\t\t}\n\t\tif (axis === \"y\" || axis === \"both\") {\n\t\t\ty = e.clientY - pressedDelta.value.y;\n\t\t\tif (container) y = Math.min(Math.max(0, y), container.scrollHeight - targetRect.height);\n\t\t}\n\t\tposition.value = {\n\t\t\tx,\n\t\t\ty\n\t\t};\n\t\tonMove === null || onMove === void 0 || onMove(position.value, e);\n\t\thandleEvent(e);\n\t};\n\tconst end = (e) => {\n\t\tif (toValue(options.disabled) || !filterEvent(e)) return;\n\t\tif (!pressedDelta.value) return;\n\t\tpressedDelta.value = void 0;\n\t\tonEnd === null || onEnd === void 0 || onEnd(position.value, e);\n\t\thandleEvent(e);\n\t};\n\tif (isClient) {\n\t\tconst config = () => {\n\t\t\tvar _options$capture;\n\t\t\treturn {\n\t\t\t\tcapture: (_options$capture = options.capture) !== null && _options$capture !== void 0 ? _options$capture : true,\n\t\t\t\tpassive: !toValue(preventDefault$1)\n\t\t\t};\n\t\t};\n\t\tuseEventListener(draggingHandle, \"pointerdown\", start, config);\n\t\tuseEventListener(draggingElement, \"pointermove\", move, config);\n\t\tuseEventListener(draggingElement, \"pointerup\", end, config);\n\t}\n\treturn {\n\t\t...toRefs(position),\n\t\tposition,\n\t\tisDragging: computed(() => !!pressedDelta.value),\n\t\tstyle: computed(() => `left:${position.value.x}px;top:${position.value.y}px;`)\n\t};\n}\n\n//#endregion\n//#region useDropZone/index.ts\nfunction useDropZone(target, options = {}) {\n\tconst isOverDropZone = shallowRef(false);\n\tconst files = shallowRef(null);\n\tlet counter = 0;\n\tlet isValid = true;\n\tif (isClient) {\n\t\tvar _options$multiple, _options$preventDefau;\n\t\tconst _options = typeof options === \"function\" ? { onDrop: options } : options;\n\t\tconst multiple = (_options$multiple = _options.multiple) !== null && _options$multiple !== void 0 ? _options$multiple : true;\n\t\tconst preventDefaultForUnhandled = (_options$preventDefau = _options.preventDefaultForUnhandled) !== null && _options$preventDefau !== void 0 ? _options$preventDefau : false;\n\t\tconst getFiles = (event) => {\n\t\t\tvar _event$dataTransfer$f, _event$dataTransfer;\n\t\t\tconst list = Array.from((_event$dataTransfer$f = (_event$dataTransfer = event.dataTransfer) === null || _event$dataTransfer === void 0 ? void 0 : _event$dataTransfer.files) !== null && _event$dataTransfer$f !== void 0 ? _event$dataTransfer$f : []);\n\t\t\treturn list.length === 0 ? null : multiple ? list : [list[0]];\n\t\t};\n\t\tconst checkDataTypes = (types) => {\n\t\t\tconst dataTypes = unref(_options.dataTypes);\n\t\t\tif (typeof dataTypes === \"function\") return dataTypes(types);\n\t\t\tif (!(dataTypes === null || dataTypes === void 0 ? void 0 : dataTypes.length)) return true;\n\t\t\tif (types.length === 0) return false;\n\t\t\treturn types.every((type) => dataTypes.some((allowedType) => type.includes(allowedType)));\n\t\t};\n\t\tconst checkValidity = (items) => {\n\t\t\tif (_options.checkValidity) return _options.checkValidity(items);\n\t\t\tconst dataTypesValid = checkDataTypes(Array.from(items !== null && items !== void 0 ? items : []).map((item) => item.type));\n\t\t\tconst multipleFilesValid = multiple || items.length <= 1;\n\t\t\treturn dataTypesValid && multipleFilesValid;\n\t\t};\n\t\tconst isSafari = () => /^(?:(?!chrome|android).)*safari/i.test(navigator.userAgent) && !(\"chrome\" in window);\n\t\tconst handleDragEvent = (event, eventType) => {\n\t\t\tvar _event$dataTransfer2, _ref;\n\t\t\tconst dataTransferItemList = (_event$dataTransfer2 = event.dataTransfer) === null || _event$dataTransfer2 === void 0 ? void 0 : _event$dataTransfer2.items;\n\t\t\tisValid = (_ref = dataTransferItemList && checkValidity(dataTransferItemList)) !== null && _ref !== void 0 ? _ref : false;\n\t\t\tif (preventDefaultForUnhandled) event.preventDefault();\n\t\t\tif (!isSafari() && !isValid) {\n\t\t\t\tif (event.dataTransfer) event.dataTransfer.dropEffect = \"none\";\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tevent.preventDefault();\n\t\t\tif (event.dataTransfer) event.dataTransfer.dropEffect = \"copy\";\n\t\t\tconst currentFiles = getFiles(event);\n\t\t\tswitch (eventType) {\n\t\t\t\tcase \"enter\":\n\t\t\t\t\tvar _options$onEnter;\n\t\t\t\t\tcounter += 1;\n\t\t\t\t\tisOverDropZone.value = true;\n\t\t\t\t\t(_options$onEnter = _options.onEnter) === null || _options$onEnter === void 0 || _options$onEnter.call(_options, null, event);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"over\":\n\t\t\t\t\tvar _options$onOver;\n\t\t\t\t\t(_options$onOver = _options.onOver) === null || _options$onOver === void 0 || _options$onOver.call(_options, null, event);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"leave\":\n\t\t\t\t\tvar _options$onLeave;\n\t\t\t\t\tcounter -= 1;\n\t\t\t\t\tif (counter === 0) isOverDropZone.value = false;\n\t\t\t\t\t(_options$onLeave = _options.onLeave) === null || _options$onLeave === void 0 || _options$onLeave.call(_options, null, event);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"drop\":\n\t\t\t\t\tcounter = 0;\n\t\t\t\t\tisOverDropZone.value = false;\n\t\t\t\t\tif (isValid) {\n\t\t\t\t\t\tvar _options$onDrop;\n\t\t\t\t\t\tfiles.value = currentFiles;\n\t\t\t\t\t\t(_options$onDrop = _options.onDrop) === null || _options$onDrop === void 0 || _options$onDrop.call(_options, currentFiles, event);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t};\n\t\tuseEventListener(target, \"dragenter\", (event) => handleDragEvent(event, \"enter\"));\n\t\tuseEventListener(target, \"dragover\", (event) => handleDragEvent(event, \"over\"));\n\t\tuseEventListener(target, \"dragleave\", (event) => handleDragEvent(event, \"leave\"));\n\t\tuseEventListener(target, \"drop\", (event) => handleDragEvent(event, \"drop\"));\n\t}\n\treturn {\n\t\tfiles,\n\t\tisOverDropZone\n\t};\n}\n\n//#endregion\n//#region useResizeObserver/index.ts\n/**\n* Reports changes to the dimensions of an Element's content or the border-box\n*\n* @see https://vueuse.org/useResizeObserver\n* @param target\n* @param callback\n* @param options\n*/\nfunction useResizeObserver(target, callback, options = {}) {\n\tconst { window: window$1 = defaultWindow,...observerOptions } = options;\n\tlet observer;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => window$1 && \"ResizeObserver\" in window$1);\n\tconst cleanup = () => {\n\t\tif (observer) {\n\t\t\tobserver.disconnect();\n\t\t\tobserver = void 0;\n\t\t}\n\t};\n\tconst stopWatch = watch(computed(() => {\n\t\tconst _targets = toValue(target);\n\t\treturn Array.isArray(_targets) ? _targets.map((el) => unrefElement(el)) : [unrefElement(_targets)];\n\t}), (els) => {\n\t\tcleanup();\n\t\tif (isSupported.value && window$1) {\n\t\t\tobserver = new ResizeObserver(callback);\n\t\t\tfor (const _el of els) if (_el) observer.observe(_el, observerOptions);\n\t\t}\n\t}, {\n\t\timmediate: true,\n\t\tflush: \"post\"\n\t});\n\tconst stop = () => {\n\t\tcleanup();\n\t\tstopWatch();\n\t};\n\ttryOnScopeDispose(stop);\n\treturn {\n\t\tisSupported,\n\t\tstop\n\t};\n}\n\n//#endregion\n//#region useElementBounding/index.ts\n/**\n* Reactive bounding box of an HTML element.\n*\n* @see https://vueuse.org/useElementBounding\n* @param target\n*/\nfunction useElementBounding(target, options = {}) {\n\tconst { reset = true, windowResize = true, windowScroll = true, immediate = true, updateTiming = \"sync\" } = options;\n\tconst height = shallowRef(0);\n\tconst bottom = shallowRef(0);\n\tconst left = shallowRef(0);\n\tconst right = shallowRef(0);\n\tconst top = shallowRef(0);\n\tconst width = shallowRef(0);\n\tconst x = shallowRef(0);\n\tconst y = shallowRef(0);\n\tfunction recalculate() {\n\t\tconst el = unrefElement(target);\n\t\tif (!el) {\n\t\t\tif (reset) {\n\t\t\t\theight.value = 0;\n\t\t\t\tbottom.value = 0;\n\t\t\t\tleft.value = 0;\n\t\t\t\tright.value = 0;\n\t\t\t\ttop.value = 0;\n\t\t\t\twidth.value = 0;\n\t\t\t\tx.value = 0;\n\t\t\t\ty.value = 0;\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tconst rect = el.getBoundingClientRect();\n\t\theight.value = rect.height;\n\t\tbottom.value = rect.bottom;\n\t\tleft.value = rect.left;\n\t\tright.value = rect.right;\n\t\ttop.value = rect.top;\n\t\twidth.value = rect.width;\n\t\tx.value = rect.x;\n\t\ty.value = rect.y;\n\t}\n\tfunction update() {\n\t\tif (updateTiming === \"sync\") recalculate();\n\t\telse if (updateTiming === \"next-frame\") requestAnimationFrame(() => recalculate());\n\t}\n\tuseResizeObserver(target, update);\n\twatch(() => unrefElement(target), (ele) => !ele && update());\n\tuseMutationObserver(target, update, { attributeFilter: [\"style\", \"class\"] });\n\tif (windowScroll) useEventListener(\"scroll\", update, {\n\t\tcapture: true,\n\t\tpassive: true\n\t});\n\tif (windowResize) useEventListener(\"resize\", update, { passive: true });\n\ttryOnMounted(() => {\n\t\tif (immediate) update();\n\t});\n\treturn {\n\t\theight,\n\t\tbottom,\n\t\tleft,\n\t\tright,\n\t\ttop,\n\t\twidth,\n\t\tx,\n\t\ty,\n\t\tupdate\n\t};\n}\n\n//#endregion\n//#region useElementByPoint/index.ts\n/**\n* Reactive element by point.\n*\n* @see https://vueuse.org/useElementByPoint\n* @param options - UseElementByPointOptions\n*/\nfunction useElementByPoint(options) {\n\tconst { x, y, document: document$1 = defaultDocument, multiple, interval = \"requestAnimationFrame\", immediate = true } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => {\n\t\tif (toValue(multiple)) return document$1 && \"elementsFromPoint\" in document$1;\n\t\treturn document$1 && \"elementFromPoint\" in document$1;\n\t});\n\tconst element = shallowRef(null);\n\tconst cb = () => {\n\t\tvar _document$elementsFro, _document$elementFrom;\n\t\telement.value = toValue(multiple) ? (_document$elementsFro = document$1 === null || document$1 === void 0 ? void 0 : document$1.elementsFromPoint(toValue(x), toValue(y))) !== null && _document$elementsFro !== void 0 ? _document$elementsFro : [] : (_document$elementFrom = document$1 === null || document$1 === void 0 ? void 0 : document$1.elementFromPoint(toValue(x), toValue(y))) !== null && _document$elementFrom !== void 0 ? _document$elementFrom : null;\n\t};\n\treturn {\n\t\tisSupported,\n\t\telement,\n\t\t...interval === \"requestAnimationFrame\" ? useRafFn(cb, { immediate }) : useIntervalFn(cb, interval, { immediate })\n\t};\n}\n\n//#endregion\n//#region useElementHover/index.ts\nfunction useElementHover(el, options = {}) {\n\tconst { delayEnter = 0, delayLeave = 0, triggerOnRemoval = false, window: window$1 = defaultWindow } = options;\n\tconst isHovered = shallowRef(false);\n\tlet timer;\n\tconst toggle = (entering) => {\n\t\tconst delay = entering ? delayEnter : delayLeave;\n\t\tif (timer) {\n\t\t\tclearTimeout(timer);\n\t\t\ttimer = void 0;\n\t\t}\n\t\tif (delay) timer = setTimeout(() => isHovered.value = entering, delay);\n\t\telse isHovered.value = entering;\n\t};\n\tif (!window$1) return isHovered;\n\tuseEventListener(el, \"mouseenter\", () => toggle(true), { passive: true });\n\tuseEventListener(el, \"mouseleave\", () => toggle(false), { passive: true });\n\tif (triggerOnRemoval) onElementRemoval(computed(() => unrefElement(el)), () => toggle(false));\n\treturn isHovered;\n}\n\n//#endregion\n//#region useElementSize/index.ts\n/**\n* Reactive size of an HTML element.\n*\n* @see https://vueuse.org/useElementSize\n*/\nfunction useElementSize(target, initialSize = {\n\twidth: 0,\n\theight: 0\n}, options = {}) {\n\tconst { window: window$1 = defaultWindow, box = \"content-box\" } = options;\n\tconst isSVG = computed(() => {\n\t\tvar _unrefElement;\n\t\treturn (_unrefElement = unrefElement(target)) === null || _unrefElement === void 0 || (_unrefElement = _unrefElement.namespaceURI) === null || _unrefElement === void 0 ? void 0 : _unrefElement.includes(\"svg\");\n\t});\n\tconst width = shallowRef(initialSize.width);\n\tconst height = shallowRef(initialSize.height);\n\tconst { stop: stop1 } = useResizeObserver(target, ([entry]) => {\n\t\tconst boxSize = box === \"border-box\" ? entry.borderBoxSize : box === \"content-box\" ? entry.contentBoxSize : entry.devicePixelContentBoxSize;\n\t\tif (window$1 && isSVG.value) {\n\t\t\tconst $elem = unrefElement(target);\n\t\t\tif ($elem) {\n\t\t\t\tconst rect = $elem.getBoundingClientRect();\n\t\t\t\twidth.value = rect.width;\n\t\t\t\theight.value = rect.height;\n\t\t\t}\n\t\t} else if (boxSize) {\n\t\t\tconst formatBoxSize = toArray(boxSize);\n\t\t\twidth.value = formatBoxSize.reduce((acc, { inlineSize }) => acc + inlineSize, 0);\n\t\t\theight.value = formatBoxSize.reduce((acc, { blockSize }) => acc + blockSize, 0);\n\t\t} else {\n\t\t\twidth.value = entry.contentRect.width;\n\t\t\theight.value = entry.contentRect.height;\n\t\t}\n\t}, options);\n\ttryOnMounted(() => {\n\t\tconst ele = unrefElement(target);\n\t\tif (ele) {\n\t\t\twidth.value = \"offsetWidth\" in ele ? ele.offsetWidth : initialSize.width;\n\t\t\theight.value = \"offsetHeight\" in ele ? ele.offsetHeight : initialSize.height;\n\t\t}\n\t});\n\tconst stop2 = watch(() => unrefElement(target), (ele) => {\n\t\twidth.value = ele ? initialSize.width : 0;\n\t\theight.value = ele ? initialSize.height : 0;\n\t});\n\tfunction stop() {\n\t\tstop1();\n\t\tstop2();\n\t}\n\treturn {\n\t\twidth,\n\t\theight,\n\t\tstop\n\t};\n}\n\n//#endregion\n//#region useIntersectionObserver/index.ts\n/**\n* Detects that a target element's visibility.\n*\n* @see https://vueuse.org/useIntersectionObserver\n* @param target\n* @param callback\n* @param options\n*/\nfunction useIntersectionObserver(target, callback, options = {}) {\n\tconst { root, rootMargin = \"0px\", threshold = 0, window: window$1 = defaultWindow, immediate = true } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => window$1 && \"IntersectionObserver\" in window$1);\n\tconst targets = computed(() => {\n\t\treturn toArray(toValue(target)).map(unrefElement).filter(notNullish);\n\t});\n\tlet cleanup = noop;\n\tconst isActive = shallowRef(immediate);\n\tconst stopWatch = isSupported.value ? watch(() => [\n\t\ttargets.value,\n\t\tunrefElement(root),\n\t\tisActive.value\n\t], ([targets$1, root$1]) => {\n\t\tcleanup();\n\t\tif (!isActive.value) return;\n\t\tif (!targets$1.length) return;\n\t\tconst observer = new IntersectionObserver(callback, {\n\t\t\troot: unrefElement(root$1),\n\t\t\trootMargin,\n\t\t\tthreshold\n\t\t});\n\t\ttargets$1.forEach((el) => el && observer.observe(el));\n\t\tcleanup = () => {\n\t\t\tobserver.disconnect();\n\t\t\tcleanup = noop;\n\t\t};\n\t}, {\n\t\timmediate,\n\t\tflush: \"post\"\n\t}) : noop;\n\tconst stop = () => {\n\t\tcleanup();\n\t\tstopWatch();\n\t\tisActive.value = false;\n\t};\n\ttryOnScopeDispose(stop);\n\treturn {\n\t\tisSupported,\n\t\tisActive,\n\t\tpause() {\n\t\t\tcleanup();\n\t\t\tisActive.value = false;\n\t\t},\n\t\tresume() {\n\t\t\tisActive.value = true;\n\t\t},\n\t\tstop\n\t};\n}\n\n//#endregion\n//#region useElementVisibility/index.ts\n/**\n* Tracks the visibility of an element within the viewport.\n*\n* @see https://vueuse.org/useElementVisibility\n*/\nfunction useElementVisibility(element, options = {}) {\n\tconst { window: window$1 = defaultWindow, scrollTarget, threshold = 0, rootMargin, once = false, initialValue = false } = options;\n\tconst elementIsVisible = shallowRef(initialValue);\n\tconst { stop } = useIntersectionObserver(element, (intersectionObserverEntries) => {\n\t\tlet isIntersecting = elementIsVisible.value;\n\t\tlet latestTime = 0;\n\t\tfor (const entry of intersectionObserverEntries) if (entry.time >= latestTime) {\n\t\t\tlatestTime = entry.time;\n\t\t\tisIntersecting = entry.isIntersecting;\n\t\t}\n\t\telementIsVisible.value = isIntersecting;\n\t\tif (once) watchOnce(elementIsVisible, () => {\n\t\t\tstop();\n\t\t});\n\t}, {\n\t\troot: scrollTarget,\n\t\twindow: window$1,\n\t\tthreshold,\n\t\trootMargin: toValue(rootMargin)\n\t});\n\treturn elementIsVisible;\n}\n\n//#endregion\n//#region useEventBus/internal.ts\nconst events = /* @__PURE__ */ new Map();\n\n//#endregion\n//#region useEventBus/index.ts\n/* @__NO_SIDE_EFFECTS__ */\nfunction useEventBus(key) {\n\tconst scope = getCurrentScope();\n\tfunction on(listener) {\n\t\tvar _scope$cleanups;\n\t\tconst listeners = events.get(key) || /* @__PURE__ */ new Set();\n\t\tlisteners.add(listener);\n\t\tevents.set(key, listeners);\n\t\tconst _off = () => off(listener);\n\t\tscope === null || scope === void 0 || (_scope$cleanups = scope.cleanups) === null || _scope$cleanups === void 0 || _scope$cleanups.push(_off);\n\t\treturn _off;\n\t}\n\tfunction once(listener) {\n\t\tfunction _listener(...args) {\n\t\t\toff(_listener);\n\t\t\tlistener(...args);\n\t\t}\n\t\treturn on(_listener);\n\t}\n\tfunction off(listener) {\n\t\tconst listeners = events.get(key);\n\t\tif (!listeners) return;\n\t\tlisteners.delete(listener);\n\t\tif (!listeners.size) reset();\n\t}\n\tfunction reset() {\n\t\tevents.delete(key);\n\t}\n\tfunction emit(event, payload) {\n\t\tvar _events$get;\n\t\t(_events$get = events.get(key)) === null || _events$get === void 0 || _events$get.forEach((v) => v(event, payload));\n\t}\n\treturn {\n\t\ton,\n\t\tonce,\n\t\toff,\n\t\temit,\n\t\treset\n\t};\n}\n\n//#endregion\n//#region useEventSource/index.ts\nfunction resolveNestedOptions$1(options) {\n\tif (options === true) return {};\n\treturn options;\n}\n/**\n* Reactive wrapper for EventSource.\n*\n* @see https://vueuse.org/useEventSource\n* @see https://developer.mozilla.org/en-US/docs/Web/API/EventSource/EventSource EventSource\n* @param url\n* @param events\n* @param options\n*/\nfunction useEventSource(url, events$1 = [], options = {}) {\n\tconst event = shallowRef(null);\n\tconst data = shallowRef(null);\n\tconst status = shallowRef(\"CONNECTING\");\n\tconst eventSource = ref(null);\n\tconst error = shallowRef(null);\n\tconst urlRef = toRef(url);\n\tconst lastEventId = shallowRef(null);\n\tlet explicitlyClosed = false;\n\tlet retried = 0;\n\tconst { withCredentials = false, immediate = true, autoConnect = true, autoReconnect, serializer = { read: (v) => v } } = options;\n\tconst close = () => {\n\t\tif (isClient && eventSource.value) {\n\t\t\teventSource.value.close();\n\t\t\teventSource.value = null;\n\t\t\tstatus.value = \"CLOSED\";\n\t\t\texplicitlyClosed = true;\n\t\t}\n\t};\n\tconst _init = () => {\n\t\tif (explicitlyClosed || typeof urlRef.value === \"undefined\") return;\n\t\tconst es = new EventSource(urlRef.value, { withCredentials });\n\t\tstatus.value = \"CONNECTING\";\n\t\teventSource.value = es;\n\t\tes.onopen = () => {\n\t\t\tstatus.value = \"OPEN\";\n\t\t\terror.value = null;\n\t\t};\n\t\tes.onerror = (e) => {\n\t\t\tstatus.value = \"CLOSED\";\n\t\t\terror.value = e;\n\t\t\tif (es.readyState === 2 && !explicitlyClosed && autoReconnect) {\n\t\t\t\tes.close();\n\t\t\t\tconst { retries = -1, delay = 1e3, onFailed } = resolveNestedOptions$1(autoReconnect);\n\t\t\t\tretried += 1;\n\t\t\t\tif (typeof retries === \"number\" && (retries < 0 || retried < retries)) setTimeout(_init, delay);\n\t\t\t\telse if (typeof retries === \"function\" && retries()) setTimeout(_init, delay);\n\t\t\t\telse onFailed === null || onFailed === void 0 || onFailed();\n\t\t\t}\n\t\t};\n\t\tes.onmessage = (e) => {\n\t\t\tvar _serializer$read;\n\t\t\tevent.value = null;\n\t\t\tdata.value = (_serializer$read = serializer.read(e.data)) !== null && _serializer$read !== void 0 ? _serializer$read : null;\n\t\t\tlastEventId.value = e.lastEventId;\n\t\t};\n\t\tfor (const event_name of events$1) useEventListener(es, event_name, (e) => {\n\t\t\tvar _serializer$read2, _e$lastEventId;\n\t\t\tevent.value = event_name;\n\t\t\tdata.value = (_serializer$read2 = serializer.read(e.data)) !== null && _serializer$read2 !== void 0 ? _serializer$read2 : null;\n\t\t\tlastEventId.value = (_e$lastEventId = e.lastEventId) !== null && _e$lastEventId !== void 0 ? _e$lastEventId : null;\n\t\t}, { passive: true });\n\t};\n\tconst open = () => {\n\t\tif (!isClient) return;\n\t\tclose();\n\t\texplicitlyClosed = false;\n\t\tretried = 0;\n\t\t_init();\n\t};\n\tif (immediate) open();\n\tif (autoConnect) watch(urlRef, open);\n\ttryOnScopeDispose(close);\n\treturn {\n\t\teventSource,\n\t\tevent,\n\t\tdata,\n\t\tstatus,\n\t\terror,\n\t\topen,\n\t\tclose,\n\t\tlastEventId\n\t};\n}\n\n//#endregion\n//#region useEyeDropper/index.ts\n/**\n* Reactive [EyeDropper API](https://developer.mozilla.org/en-US/docs/Web/API/EyeDropper_API)\n*\n* @see https://vueuse.org/useEyeDropper\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useEyeDropper(options = {}) {\n\tconst { initialValue = \"\" } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => typeof window !== \"undefined\" && \"EyeDropper\" in window);\n\tconst sRGBHex = shallowRef(initialValue);\n\tasync function open(openOptions) {\n\t\tif (!isSupported.value) return;\n\t\tconst result = await new window.EyeDropper().open(openOptions);\n\t\tsRGBHex.value = result.sRGBHex;\n\t\treturn result;\n\t}\n\treturn {\n\t\tisSupported,\n\t\tsRGBHex,\n\t\topen\n\t};\n}\n\n//#endregion\n//#region useFavicon/index.ts\nfunction useFavicon(newIcon = null, options = {}) {\n\tconst { baseUrl = \"\", rel = \"icon\", document: document$1 = defaultDocument } = options;\n\tconst favicon = toRef(newIcon);\n\tconst applyIcon = (icon) => {\n\t\tconst elements = document$1 === null || document$1 === void 0 ? void 0 : document$1.head.querySelectorAll(`link[rel*=\"${rel}\"]`);\n\t\tif (!elements || elements.length === 0) {\n\t\t\tconst link = document$1 === null || document$1 === void 0 ? void 0 : document$1.createElement(\"link\");\n\t\t\tif (link) {\n\t\t\t\tlink.rel = rel;\n\t\t\t\tlink.href = `${baseUrl}${icon}`;\n\t\t\t\tlink.type = `image/${icon.split(\".\").pop()}`;\n\t\t\t\tdocument$1 === null || document$1 === void 0 || document$1.head.append(link);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\telements === null || elements === void 0 || elements.forEach((el) => el.href = `${baseUrl}${icon}`);\n\t};\n\twatch(favicon, (i, o) => {\n\t\tif (typeof i === \"string\" && i !== o) applyIcon(i);\n\t}, { immediate: true });\n\treturn favicon;\n}\n\n//#endregion\n//#region useFetch/index.ts\nconst payloadMapping = {\n\tjson: \"application/json\",\n\ttext: \"text/plain\"\n};\n/**\n* !!!IMPORTANT!!!\n*\n* If you update the UseFetchOptions interface, be sure to update this object\n* to include the new options\n*/\nfunction isFetchOptions(obj) {\n\treturn obj && containsProp(obj, \"immediate\", \"refetch\", \"initialData\", \"timeout\", \"beforeFetch\", \"afterFetch\", \"onFetchError\", \"fetch\", \"updateDataOnError\");\n}\nconst reAbsolute = /^(?:[a-z][a-z\\d+\\-.]*:)?\\/\\//i;\nfunction isAbsoluteURL(url) {\n\treturn reAbsolute.test(url);\n}\nfunction headersToObject(headers) {\n\tif (typeof Headers !== \"undefined\" && headers instanceof Headers) return Object.fromEntries(headers.entries());\n\treturn headers;\n}\nfunction combineCallbacks(combination, ...callbacks) {\n\tif (combination === \"overwrite\") return async (ctx) => {\n\t\tlet callback;\n\t\tfor (let i = callbacks.length - 1; i >= 0; i--) if (callbacks[i] != null) {\n\t\t\tcallback = callbacks[i];\n\t\t\tbreak;\n\t\t}\n\t\tif (callback) return {\n\t\t\t...ctx,\n\t\t\t...await callback(ctx)\n\t\t};\n\t\treturn ctx;\n\t};\n\telse return async (ctx) => {\n\t\tfor (const callback of callbacks) if (callback) ctx = {\n\t\t\t...ctx,\n\t\t\t...await callback(ctx)\n\t\t};\n\t\treturn ctx;\n\t};\n}\nfunction createFetch(config = {}) {\n\tconst _combination = config.combination || \"chain\";\n\tconst _options = config.options || {};\n\tconst _fetchOptions = config.fetchOptions || {};\n\tfunction useFactoryFetch(url, ...args) {\n\t\tconst computedUrl = computed(() => {\n\t\t\tconst baseUrl = toValue(config.baseUrl);\n\t\t\tconst targetUrl = toValue(url);\n\t\t\treturn baseUrl && !isAbsoluteURL(targetUrl) ? joinPaths(baseUrl, targetUrl) : targetUrl;\n\t\t});\n\t\tlet options = _options;\n\t\tlet fetchOptions = _fetchOptions;\n\t\tif (args.length > 0) if (isFetchOptions(args[0])) options = {\n\t\t\t...options,\n\t\t\t...args[0],\n\t\t\tbeforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[0].beforeFetch),\n\t\t\tafterFetch: combineCallbacks(_combination, _options.afterFetch, args[0].afterFetch),\n\t\t\tonFetchError: combineCallbacks(_combination, _options.onFetchError, args[0].onFetchError)\n\t\t};\n\t\telse fetchOptions = {\n\t\t\t...fetchOptions,\n\t\t\t...args[0],\n\t\t\theaders: {\n\t\t\t\t...headersToObject(fetchOptions.headers) || {},\n\t\t\t\t...headersToObject(args[0].headers) || {}\n\t\t\t}\n\t\t};\n\t\tif (args.length > 1 && isFetchOptions(args[1])) options = {\n\t\t\t...options,\n\t\t\t...args[1],\n\t\t\tbeforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[1].beforeFetch),\n\t\t\tafterFetch: combineCallbacks(_combination, _options.afterFetch, args[1].afterFetch),\n\t\t\tonFetchError: combineCallbacks(_combination, _options.onFetchError, args[1].onFetchError)\n\t\t};\n\t\treturn useFetch(computedUrl, fetchOptions, options);\n\t}\n\treturn useFactoryFetch;\n}\nfunction useFetch(url, ...args) {\n\tvar _defaultWindow$fetch, _globalThis;\n\tconst supportsAbort = typeof AbortController === \"function\";\n\tlet fetchOptions = {};\n\tlet options = {\n\t\timmediate: true,\n\t\trefetch: false,\n\t\ttimeout: 0,\n\t\tupdateDataOnError: false\n\t};\n\tconst config = {\n\t\tmethod: \"GET\",\n\t\ttype: \"text\",\n\t\tpayload: void 0\n\t};\n\tif (args.length > 0) if (isFetchOptions(args[0])) options = {\n\t\t...options,\n\t\t...args[0]\n\t};\n\telse fetchOptions = args[0];\n\tif (args.length > 1) {\n\t\tif (isFetchOptions(args[1])) options = {\n\t\t\t...options,\n\t\t\t...args[1]\n\t\t};\n\t}\n\tconst { fetch = (_defaultWindow$fetch = defaultWindow === null || defaultWindow === void 0 ? void 0 : defaultWindow.fetch) !== null && _defaultWindow$fetch !== void 0 ? _defaultWindow$fetch : (_globalThis = globalThis) === null || _globalThis === void 0 ? void 0 : _globalThis.fetch, initialData, timeout } = options;\n\tconst responseEvent = createEventHook();\n\tconst errorEvent = createEventHook();\n\tconst finallyEvent = createEventHook();\n\tconst isFinished = shallowRef(false);\n\tconst isFetching = shallowRef(false);\n\tconst aborted = shallowRef(false);\n\tconst statusCode = shallowRef(null);\n\tconst response = shallowRef(null);\n\tconst error = shallowRef(null);\n\tconst data = shallowRef(initialData || null);\n\tconst canAbort = computed(() => supportsAbort && isFetching.value);\n\tlet controller;\n\tlet timer;\n\tconst abort = (reason) => {\n\t\tif (supportsAbort) {\n\t\t\tcontroller === null || controller === void 0 || controller.abort(reason);\n\t\t\tcontroller = new AbortController();\n\t\t\tcontroller.signal.onabort = () => aborted.value = true;\n\t\t\tfetchOptions = {\n\t\t\t\t...fetchOptions,\n\t\t\t\tsignal: controller.signal\n\t\t\t};\n\t\t}\n\t};\n\tconst loading = (isLoading) => {\n\t\tisFetching.value = isLoading;\n\t\tisFinished.value = !isLoading;\n\t};\n\tif (timeout) timer = useTimeoutFn(abort, timeout, { immediate: false });\n\tlet executeCounter = 0;\n\tconst execute = async (throwOnFailed = false) => {\n\t\tvar _context$options;\n\t\tabort();\n\t\tloading(true);\n\t\terror.value = null;\n\t\tstatusCode.value = null;\n\t\taborted.value = false;\n\t\texecuteCounter += 1;\n\t\tconst currentExecuteCounter = executeCounter;\n\t\tconst defaultFetchOptions = {\n\t\t\tmethod: config.method,\n\t\t\theaders: {}\n\t\t};\n\t\tconst payload = toValue(config.payload);\n\t\tif (payload) {\n\t\t\tvar _payloadMapping$confi;\n\t\t\tconst headers = headersToObject(defaultFetchOptions.headers);\n\t\t\tconst proto = Object.getPrototypeOf(payload);\n\t\t\tif (!config.payloadType && payload && (proto === Object.prototype || Array.isArray(proto)) && !(payload instanceof FormData)) config.payloadType = \"json\";\n\t\t\tif (config.payloadType) headers[\"Content-Type\"] = (_payloadMapping$confi = payloadMapping[config.payloadType]) !== null && _payloadMapping$confi !== void 0 ? _payloadMapping$confi : config.payloadType;\n\t\t\tdefaultFetchOptions.body = config.payloadType === \"json\" ? JSON.stringify(payload) : payload;\n\t\t}\n\t\tlet isCanceled = false;\n\t\tconst context = {\n\t\t\turl: toValue(url),\n\t\t\toptions: {\n\t\t\t\t...defaultFetchOptions,\n\t\t\t\t...fetchOptions\n\t\t\t},\n\t\t\tcancel: () => {\n\t\t\t\tisCanceled = true;\n\t\t\t}\n\t\t};\n\t\tif (options.beforeFetch) Object.assign(context, await options.beforeFetch(context));\n\t\tif (isCanceled || !fetch) {\n\t\t\tloading(false);\n\t\t\treturn Promise.resolve(null);\n\t\t}\n\t\tlet responseData = null;\n\t\tif (timer) timer.start();\n\t\treturn fetch(context.url, {\n\t\t\t...defaultFetchOptions,\n\t\t\t...context.options,\n\t\t\theaders: {\n\t\t\t\t...headersToObject(defaultFetchOptions.headers),\n\t\t\t\t...headersToObject((_context$options = context.options) === null || _context$options === void 0 ? void 0 : _context$options.headers)\n\t\t\t}\n\t\t}).then(async (fetchResponse) => {\n\t\t\tresponse.value = fetchResponse;\n\t\t\tstatusCode.value = fetchResponse.status;\n\t\t\tresponseData = await fetchResponse.clone()[config.type]();\n\t\t\tif (!fetchResponse.ok) {\n\t\t\t\tdata.value = initialData || null;\n\t\t\t\tthrow new Error(fetchResponse.statusText);\n\t\t\t}\n\t\t\tif (options.afterFetch) ({data: responseData} = await options.afterFetch({\n\t\t\t\tdata: responseData,\n\t\t\t\tresponse: fetchResponse,\n\t\t\t\tcontext,\n\t\t\t\texecute\n\t\t\t}));\n\t\t\tdata.value = responseData;\n\t\t\tresponseEvent.trigger(fetchResponse);\n\t\t\treturn fetchResponse;\n\t\t}).catch(async (fetchError) => {\n\t\t\tlet errorData = fetchError.message || fetchError.name;\n\t\t\tif (options.onFetchError) ({error: errorData, data: responseData} = await options.onFetchError({\n\t\t\t\tdata: responseData,\n\t\t\t\terror: fetchError,\n\t\t\t\tresponse: response.value,\n\t\t\t\tcontext,\n\t\t\t\texecute\n\t\t\t}));\n\t\t\terror.value = errorData;\n\t\t\tif (options.updateDataOnError) data.value = responseData;\n\t\t\terrorEvent.trigger(fetchError);\n\t\t\tif (throwOnFailed) throw fetchError;\n\t\t\treturn null;\n\t\t}).finally(() => {\n\t\t\tif (currentExecuteCounter === executeCounter) loading(false);\n\t\t\tif (timer) timer.stop();\n\t\t\tfinallyEvent.trigger(null);\n\t\t});\n\t};\n\tconst refetch = toRef(options.refetch);\n\twatch([refetch, toRef(url)], ([refetch$1]) => refetch$1 && execute(), { deep: true });\n\tconst shell = {\n\t\tisFinished: readonly(isFinished),\n\t\tisFetching: readonly(isFetching),\n\t\tstatusCode,\n\t\tresponse,\n\t\terror,\n\t\tdata,\n\t\tcanAbort,\n\t\taborted,\n\t\tabort,\n\t\texecute,\n\t\tonFetchResponse: responseEvent.on,\n\t\tonFetchError: errorEvent.on,\n\t\tonFetchFinally: finallyEvent.on,\n\t\tget: setMethod(\"GET\"),\n\t\tput: setMethod(\"PUT\"),\n\t\tpost: setMethod(\"POST\"),\n\t\tdelete: setMethod(\"DELETE\"),\n\t\tpatch: setMethod(\"PATCH\"),\n\t\thead: setMethod(\"HEAD\"),\n\t\toptions: setMethod(\"OPTIONS\"),\n\t\tjson: setType(\"json\"),\n\t\ttext: setType(\"text\"),\n\t\tblob: setType(\"blob\"),\n\t\tarrayBuffer: setType(\"arrayBuffer\"),\n\t\tformData: setType(\"formData\")\n\t};\n\tfunction setMethod(method) {\n\t\treturn (payload, payloadType) => {\n\t\t\tif (!isFetching.value) {\n\t\t\t\tconfig.method = method;\n\t\t\t\tconfig.payload = payload;\n\t\t\t\tconfig.payloadType = payloadType;\n\t\t\t\tif (isRef(config.payload)) watch([refetch, toRef(config.payload)], ([refetch$1]) => refetch$1 && execute(), { deep: true });\n\t\t\t\treturn {\n\t\t\t\t\t...shell,\n\t\t\t\t\tthen(onFulfilled, onRejected) {\n\t\t\t\t\t\treturn waitUntilFinished().then(onFulfilled, onRejected);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\t}\n\tfunction waitUntilFinished() {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tuntil(isFinished).toBe(true).then(() => resolve(shell)).catch(reject);\n\t\t});\n\t}\n\tfunction setType(type) {\n\t\treturn () => {\n\t\t\tif (!isFetching.value) {\n\t\t\t\tconfig.type = type;\n\t\t\t\treturn {\n\t\t\t\t\t...shell,\n\t\t\t\t\tthen(onFulfilled, onRejected) {\n\t\t\t\t\t\treturn waitUntilFinished().then(onFulfilled, onRejected);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\t}\n\tif (options.immediate) Promise.resolve().then(() => execute());\n\treturn {\n\t\t...shell,\n\t\tthen(onFulfilled, onRejected) {\n\t\t\treturn waitUntilFinished().then(onFulfilled, onRejected);\n\t\t}\n\t};\n}\nfunction joinPaths(start, end) {\n\tif (!start.endsWith(\"/\") && !end.startsWith(\"/\")) return `${start}/${end}`;\n\tif (start.endsWith(\"/\") && end.startsWith(\"/\")) return `${start.slice(0, -1)}${end}`;\n\treturn `${start}${end}`;\n}\n\n//#endregion\n//#region useFileDialog/index.ts\nconst DEFAULT_OPTIONS = {\n\tmultiple: true,\n\taccept: \"*\",\n\treset: false,\n\tdirectory: false\n};\nfunction prepareInitialFiles(files) {\n\tif (!files) return null;\n\tif (files instanceof FileList) return files;\n\tconst dt = new DataTransfer();\n\tfor (const file of files) dt.items.add(file);\n\treturn dt.files;\n}\n/**\n* Open file dialog with ease.\n*\n* @see https://vueuse.org/useFileDialog\n* @param options\n*/\nfunction useFileDialog(options = {}) {\n\tconst { document: document$1 = defaultDocument } = options;\n\tconst files = ref(prepareInitialFiles(options.initialFiles));\n\tconst { on: onChange, trigger: changeTrigger } = createEventHook();\n\tconst { on: onCancel, trigger: cancelTrigger } = createEventHook();\n\tconst inputRef = computed(() => {\n\t\tvar _unrefElement;\n\t\tconst input = (_unrefElement = unrefElement(options.input)) !== null && _unrefElement !== void 0 ? _unrefElement : document$1 ? document$1.createElement(\"input\") : void 0;\n\t\tif (input) {\n\t\t\tinput.type = \"file\";\n\t\t\tinput.onchange = (event) => {\n\t\t\t\tfiles.value = event.target.files;\n\t\t\t\tchangeTrigger(files.value);\n\t\t\t};\n\t\t\tinput.oncancel = () => {\n\t\t\t\tcancelTrigger();\n\t\t\t};\n\t\t}\n\t\treturn input;\n\t});\n\tconst reset = () => {\n\t\tfiles.value = null;\n\t\tif (inputRef.value && inputRef.value.value) {\n\t\t\tinputRef.value.value = \"\";\n\t\t\tchangeTrigger(null);\n\t\t}\n\t};\n\tconst applyOptions = (options$1) => {\n\t\tconst el = inputRef.value;\n\t\tif (!el) return;\n\t\tel.multiple = toValue(options$1.multiple);\n\t\tel.accept = toValue(options$1.accept);\n\t\tel.webkitdirectory = toValue(options$1.directory);\n\t\tif (hasOwn(options$1, \"capture\")) el.capture = toValue(options$1.capture);\n\t};\n\tconst open = (localOptions) => {\n\t\tconst el = inputRef.value;\n\t\tif (!el) return;\n\t\tconst mergedOptions = {\n\t\t\t...DEFAULT_OPTIONS,\n\t\t\t...options,\n\t\t\t...localOptions\n\t\t};\n\t\tapplyOptions(mergedOptions);\n\t\tif (toValue(mergedOptions.reset)) reset();\n\t\tel.click();\n\t};\n\twatchEffect(() => {\n\t\tapplyOptions(options);\n\t});\n\treturn {\n\t\tfiles: readonly(files),\n\t\topen,\n\t\treset,\n\t\tonCancel,\n\t\tonChange\n\t};\n}\n\n//#endregion\n//#region useFileSystemAccess/index.ts\nfunction useFileSystemAccess(options = {}) {\n\tconst { window: _window = defaultWindow, dataType = \"Text\" } = options;\n\tconst window$1 = _window;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => window$1 && \"showSaveFilePicker\" in window$1 && \"showOpenFilePicker\" in window$1);\n\tconst fileHandle = shallowRef();\n\tconst data = shallowRef();\n\tconst file = shallowRef();\n\tconst fileName = computed(() => {\n\t\tvar _file$value$name, _file$value;\n\t\treturn (_file$value$name = (_file$value = file.value) === null || _file$value === void 0 ? void 0 : _file$value.name) !== null && _file$value$name !== void 0 ? _file$value$name : \"\";\n\t});\n\tconst fileMIME = computed(() => {\n\t\tvar _file$value$type, _file$value2;\n\t\treturn (_file$value$type = (_file$value2 = file.value) === null || _file$value2 === void 0 ? void 0 : _file$value2.type) !== null && _file$value$type !== void 0 ? _file$value$type : \"\";\n\t});\n\tconst fileSize = computed(() => {\n\t\tvar _file$value$size, _file$value3;\n\t\treturn (_file$value$size = (_file$value3 = file.value) === null || _file$value3 === void 0 ? void 0 : _file$value3.size) !== null && _file$value$size !== void 0 ? _file$value$size : 0;\n\t});\n\tconst fileLastModified = computed(() => {\n\t\tvar _file$value$lastModif, _file$value4;\n\t\treturn (_file$value$lastModif = (_file$value4 = file.value) === null || _file$value4 === void 0 ? void 0 : _file$value4.lastModified) !== null && _file$value$lastModif !== void 0 ? _file$value$lastModif : 0;\n\t});\n\tasync function open(_options = {}) {\n\t\tif (!isSupported.value) return;\n\t\tconst [handle] = await window$1.showOpenFilePicker({\n\t\t\t...toValue(options),\n\t\t\t..._options\n\t\t});\n\t\tfileHandle.value = handle;\n\t\tawait updateData();\n\t}\n\tasync function create(_options = {}) {\n\t\tif (!isSupported.value) return;\n\t\tfileHandle.value = await window$1.showSaveFilePicker({\n\t\t\t...options,\n\t\t\t..._options\n\t\t});\n\t\tdata.value = void 0;\n\t\tawait updateData();\n\t}\n\tasync function save(_options = {}) {\n\t\tif (!isSupported.value) return;\n\t\tif (!fileHandle.value) return saveAs(_options);\n\t\tif (data.value) {\n\t\t\tconst writableStream = await fileHandle.value.createWritable();\n\t\t\tawait writableStream.write(data.value);\n\t\t\tawait writableStream.close();\n\t\t}\n\t\tawait updateFile();\n\t}\n\tasync function saveAs(_options = {}) {\n\t\tif (!isSupported.value) return;\n\t\tfileHandle.value = await window$1.showSaveFilePicker({\n\t\t\t...options,\n\t\t\t..._options\n\t\t});\n\t\tif (data.value) {\n\t\t\tconst writableStream = await fileHandle.value.createWritable();\n\t\t\tawait writableStream.write(data.value);\n\t\t\tawait writableStream.close();\n\t\t}\n\t\tawait updateFile();\n\t}\n\tasync function updateFile() {\n\t\tvar _fileHandle$value;\n\t\tfile.value = await ((_fileHandle$value = fileHandle.value) === null || _fileHandle$value === void 0 ? void 0 : _fileHandle$value.getFile());\n\t}\n\tasync function updateData() {\n\t\tvar _file$value5, _file$value6;\n\t\tawait updateFile();\n\t\tconst type = toValue(dataType);\n\t\tif (type === \"Text\") data.value = await ((_file$value5 = file.value) === null || _file$value5 === void 0 ? void 0 : _file$value5.text());\n\t\telse if (type === \"ArrayBuffer\") data.value = await ((_file$value6 = file.value) === null || _file$value6 === void 0 ? void 0 : _file$value6.arrayBuffer());\n\t\telse if (type === \"Blob\") data.value = file.value;\n\t}\n\twatch(() => toValue(dataType), updateData);\n\treturn {\n\t\tisSupported,\n\t\tdata,\n\t\tfile,\n\t\tfileName,\n\t\tfileMIME,\n\t\tfileSize,\n\t\tfileLastModified,\n\t\topen,\n\t\tcreate,\n\t\tsave,\n\t\tsaveAs,\n\t\tupdateData\n\t};\n}\n\n//#endregion\n//#region useFocus/index.ts\n/**\n* Track or set the focus state of a DOM element.\n*\n* @see https://vueuse.org/useFocus\n* @param target The target element for the focus and blur events.\n* @param options\n*/\nfunction useFocus(target, options = {}) {\n\tconst { initialValue = false, focusVisible = false, preventScroll = false } = options;\n\tconst innerFocused = shallowRef(false);\n\tconst targetElement = computed(() => unrefElement(target));\n\tconst listenerOptions = { passive: true };\n\tuseEventListener(targetElement, \"focus\", (event) => {\n\t\tvar _matches, _ref;\n\t\tif (!focusVisible || ((_matches = (_ref = event.target).matches) === null || _matches === void 0 ? void 0 : _matches.call(_ref, \":focus-visible\"))) innerFocused.value = true;\n\t}, listenerOptions);\n\tuseEventListener(targetElement, \"blur\", () => innerFocused.value = false, listenerOptions);\n\tconst focused = computed({\n\t\tget: () => innerFocused.value,\n\t\tset(value) {\n\t\t\tvar _targetElement$value, _targetElement$value2;\n\t\t\tif (!value && innerFocused.value) (_targetElement$value = targetElement.value) === null || _targetElement$value === void 0 || _targetElement$value.blur();\n\t\t\telse if (value && !innerFocused.value) (_targetElement$value2 = targetElement.value) === null || _targetElement$value2 === void 0 || _targetElement$value2.focus({ preventScroll });\n\t\t}\n\t});\n\twatch(targetElement, () => {\n\t\tfocused.value = initialValue;\n\t}, {\n\t\timmediate: true,\n\t\tflush: \"post\"\n\t});\n\treturn { focused };\n}\n\n//#endregion\n//#region useFocusWithin/index.ts\nconst EVENT_FOCUS_IN = \"focusin\";\nconst EVENT_FOCUS_OUT = \"focusout\";\nconst PSEUDO_CLASS_FOCUS_WITHIN = \":focus-within\";\n/**\n* Track if focus is contained within the target element\n*\n* @see https://vueuse.org/useFocusWithin\n* @param target The target element to track\n* @param options Focus within options\n*/\nfunction useFocusWithin(target, options = {}) {\n\tconst { window: window$1 = defaultWindow } = options;\n\tconst targetElement = computed(() => unrefElement(target));\n\tconst _focused = shallowRef(false);\n\tconst focused = computed(() => _focused.value);\n\tconst activeElement = useActiveElement(options);\n\tif (!window$1 || !activeElement.value) return { focused };\n\tconst listenerOptions = { passive: true };\n\tuseEventListener(targetElement, EVENT_FOCUS_IN, () => _focused.value = true, listenerOptions);\n\tuseEventListener(targetElement, EVENT_FOCUS_OUT, () => {\n\t\tvar _targetElement$value$, _targetElement$value, _targetElement$value$2;\n\t\treturn _focused.value = (_targetElement$value$ = (_targetElement$value = targetElement.value) === null || _targetElement$value === void 0 || (_targetElement$value$2 = _targetElement$value.matches) === null || _targetElement$value$2 === void 0 ? void 0 : _targetElement$value$2.call(_targetElement$value, PSEUDO_CLASS_FOCUS_WITHIN)) !== null && _targetElement$value$ !== void 0 ? _targetElement$value$ : false;\n\t}, listenerOptions);\n\treturn { focused };\n}\n\n//#endregion\n//#region useFps/index.ts\n/* @__NO_SIDE_EFFECTS__ */\nfunction useFps(options) {\n\tvar _options$every;\n\tconst fps = shallowRef(0);\n\tif (typeof performance === \"undefined\") return fps;\n\tconst every = (_options$every = options === null || options === void 0 ? void 0 : options.every) !== null && _options$every !== void 0 ? _options$every : 10;\n\tlet last = performance.now();\n\tlet ticks = 0;\n\tuseRafFn(() => {\n\t\tticks += 1;\n\t\tif (ticks >= every) {\n\t\t\tconst now = performance.now();\n\t\t\tconst diff = now - last;\n\t\t\tfps.value = Math.round(1e3 / (diff / ticks));\n\t\t\tlast = now;\n\t\t\tticks = 0;\n\t\t}\n\t});\n\treturn fps;\n}\n\n//#endregion\n//#region useFullscreen/index.ts\nconst eventHandlers = [\n\t\"fullscreenchange\",\n\t\"webkitfullscreenchange\",\n\t\"webkitendfullscreen\",\n\t\"mozfullscreenchange\",\n\t\"MSFullscreenChange\"\n];\n/**\n* Reactive Fullscreen API.\n*\n* @see https://vueuse.org/useFullscreen\n* @param target\n* @param options\n*/\nfunction useFullscreen(target, options = {}) {\n\tconst { document: document$1 = defaultDocument, autoExit = false } = options;\n\tconst targetRef = computed(() => {\n\t\tvar _unrefElement;\n\t\treturn (_unrefElement = unrefElement(target)) !== null && _unrefElement !== void 0 ? _unrefElement : document$1 === null || document$1 === void 0 ? void 0 : document$1.documentElement;\n\t});\n\tconst isFullscreen = shallowRef(false);\n\tconst requestMethod = computed(() => {\n\t\treturn [\n\t\t\t\"requestFullscreen\",\n\t\t\t\"webkitRequestFullscreen\",\n\t\t\t\"webkitEnterFullscreen\",\n\t\t\t\"webkitEnterFullScreen\",\n\t\t\t\"webkitRequestFullScreen\",\n\t\t\t\"mozRequestFullScreen\",\n\t\t\t\"msRequestFullscreen\"\n\t\t].find((m) => document$1 && m in document$1 || targetRef.value && m in targetRef.value);\n\t});\n\tconst exitMethod = computed(() => {\n\t\treturn [\n\t\t\t\"exitFullscreen\",\n\t\t\t\"webkitExitFullscreen\",\n\t\t\t\"webkitExitFullScreen\",\n\t\t\t\"webkitCancelFullScreen\",\n\t\t\t\"mozCancelFullScreen\",\n\t\t\t\"msExitFullscreen\"\n\t\t].find((m) => document$1 && m in document$1 || targetRef.value && m in targetRef.value);\n\t});\n\tconst fullscreenEnabled = computed(() => {\n\t\treturn [\n\t\t\t\"fullScreen\",\n\t\t\t\"webkitIsFullScreen\",\n\t\t\t\"webkitDisplayingFullscreen\",\n\t\t\t\"mozFullScreen\",\n\t\t\t\"msFullscreenElement\"\n\t\t].find((m) => document$1 && m in document$1 || targetRef.value && m in targetRef.value);\n\t});\n\tconst fullscreenElementMethod = [\n\t\t\"fullscreenElement\",\n\t\t\"webkitFullscreenElement\",\n\t\t\"mozFullScreenElement\",\n\t\t\"msFullscreenElement\"\n\t].find((m) => document$1 && m in document$1);\n\tconst isSupported = /* @__PURE__ */ useSupported(() => targetRef.value && document$1 && requestMethod.value !== void 0 && exitMethod.value !== void 0 && fullscreenEnabled.value !== void 0);\n\tconst isCurrentElementFullScreen = () => {\n\t\tif (fullscreenElementMethod) return (document$1 === null || document$1 === void 0 ? void 0 : document$1[fullscreenElementMethod]) === targetRef.value;\n\t\treturn false;\n\t};\n\tconst isElementFullScreen = () => {\n\t\tif (fullscreenEnabled.value) if (document$1 && document$1[fullscreenEnabled.value] != null) return document$1[fullscreenEnabled.value];\n\t\telse {\n\t\t\tconst target$1 = targetRef.value;\n\t\t\tif ((target$1 === null || target$1 === void 0 ? void 0 : target$1[fullscreenEnabled.value]) != null) return Boolean(target$1[fullscreenEnabled.value]);\n\t\t}\n\t\treturn false;\n\t};\n\tasync function exit() {\n\t\tif (!isSupported.value || !isFullscreen.value) return;\n\t\tif (exitMethod.value) if ((document$1 === null || document$1 === void 0 ? void 0 : document$1[exitMethod.value]) != null) await document$1[exitMethod.value]();\n\t\telse {\n\t\t\tconst target$1 = targetRef.value;\n\t\t\tif ((target$1 === null || target$1 === void 0 ? void 0 : target$1[exitMethod.value]) != null) await target$1[exitMethod.value]();\n\t\t}\n\t\tisFullscreen.value = false;\n\t}\n\tasync function enter() {\n\t\tif (!isSupported.value || isFullscreen.value) return;\n\t\tif (isElementFullScreen()) await exit();\n\t\tconst target$1 = targetRef.value;\n\t\tif (requestMethod.value && (target$1 === null || target$1 === void 0 ? void 0 : target$1[requestMethod.value]) != null) {\n\t\t\tawait target$1[requestMethod.value]();\n\t\t\tisFullscreen.value = true;\n\t\t}\n\t}\n\tasync function toggle() {\n\t\tawait (isFullscreen.value ? exit() : enter());\n\t}\n\tconst handlerCallback = () => {\n\t\tconst isElementFullScreenValue = isElementFullScreen();\n\t\tif (!isElementFullScreenValue || isElementFullScreenValue && isCurrentElementFullScreen()) isFullscreen.value = isElementFullScreenValue;\n\t};\n\tconst listenerOptions = {\n\t\tcapture: false,\n\t\tpassive: true\n\t};\n\tuseEventListener(document$1, eventHandlers, handlerCallback, listenerOptions);\n\tuseEventListener(() => unrefElement(targetRef), eventHandlers, handlerCallback, listenerOptions);\n\ttryOnMounted(handlerCallback, false);\n\tif (autoExit) tryOnScopeDispose(exit);\n\treturn {\n\t\tisSupported,\n\t\tisFullscreen,\n\t\tenter,\n\t\texit,\n\t\ttoggle\n\t};\n}\n\n//#endregion\n//#region useGamepad/index.ts\n/**\n* Maps a standard standard gamepad to an Xbox 360 Controller.\n*/\nfunction mapGamepadToXbox360Controller(gamepad) {\n\treturn computed(() => {\n\t\tif (gamepad.value) return {\n\t\t\tbuttons: {\n\t\t\t\ta: gamepad.value.buttons[0],\n\t\t\t\tb: gamepad.value.buttons[1],\n\t\t\t\tx: gamepad.value.buttons[2],\n\t\t\t\ty: gamepad.value.buttons[3]\n\t\t\t},\n\t\t\tbumper: {\n\t\t\t\tleft: gamepad.value.buttons[4],\n\t\t\t\tright: gamepad.value.buttons[5]\n\t\t\t},\n\t\t\ttriggers: {\n\t\t\t\tleft: gamepad.value.buttons[6],\n\t\t\t\tright: gamepad.value.buttons[7]\n\t\t\t},\n\t\t\tstick: {\n\t\t\t\tleft: {\n\t\t\t\t\thorizontal: gamepad.value.axes[0],\n\t\t\t\t\tvertical: gamepad.value.axes[1],\n\t\t\t\t\tbutton: gamepad.value.buttons[10]\n\t\t\t\t},\n\t\t\t\tright: {\n\t\t\t\t\thorizontal: gamepad.value.axes[2],\n\t\t\t\t\tvertical: gamepad.value.axes[3],\n\t\t\t\t\tbutton: gamepad.value.buttons[11]\n\t\t\t\t}\n\t\t\t},\n\t\t\tdpad: {\n\t\t\t\tup: gamepad.value.buttons[12],\n\t\t\t\tdown: gamepad.value.buttons[13],\n\t\t\t\tleft: gamepad.value.buttons[14],\n\t\t\t\tright: gamepad.value.buttons[15]\n\t\t\t},\n\t\t\tback: gamepad.value.buttons[8],\n\t\t\tstart: gamepad.value.buttons[9]\n\t\t};\n\t\treturn null;\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction useGamepad(options = {}) {\n\tconst { navigator: navigator$1 = defaultNavigator } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => navigator$1 && \"getGamepads\" in navigator$1);\n\tconst gamepads = ref([]);\n\tconst onConnectedHook = createEventHook();\n\tconst onDisconnectedHook = createEventHook();\n\tconst stateFromGamepad = (gamepad) => {\n\t\tconst hapticActuators = [];\n\t\tconst vibrationActuator = \"vibrationActuator\" in gamepad ? gamepad.vibrationActuator : null;\n\t\tif (vibrationActuator) hapticActuators.push(vibrationActuator);\n\t\tif (gamepad.hapticActuators) hapticActuators.push(...gamepad.hapticActuators);\n\t\treturn {\n\t\t\tid: gamepad.id,\n\t\t\tindex: gamepad.index,\n\t\t\tconnected: gamepad.connected,\n\t\t\tmapping: gamepad.mapping,\n\t\t\ttimestamp: gamepad.timestamp,\n\t\t\tvibrationActuator: gamepad.vibrationActuator,\n\t\t\thapticActuators,\n\t\t\taxes: gamepad.axes.map((axes) => axes),\n\t\t\tbuttons: gamepad.buttons.map((button) => ({\n\t\t\t\tpressed: button.pressed,\n\t\t\t\ttouched: button.touched,\n\t\t\t\tvalue: button.value\n\t\t\t}))\n\t\t};\n\t};\n\tconst updateGamepadState = () => {\n\t\tconst _gamepads = (navigator$1 === null || navigator$1 === void 0 ? void 0 : navigator$1.getGamepads()) || [];\n\t\tfor (const gamepad of _gamepads) if (gamepad && gamepads.value[gamepad.index]) gamepads.value[gamepad.index] = stateFromGamepad(gamepad);\n\t};\n\tconst { isActive, pause, resume } = useRafFn(updateGamepadState);\n\tconst onGamepadConnected = (gamepad) => {\n\t\tif (!gamepads.value.some(({ index }) => index === gamepad.index)) {\n\t\t\tgamepads.value.push(stateFromGamepad(gamepad));\n\t\t\tonConnectedHook.trigger(gamepad.index);\n\t\t}\n\t\tresume();\n\t};\n\tconst onGamepadDisconnected = (gamepad) => {\n\t\tgamepads.value = gamepads.value.filter((x) => x.index !== gamepad.index);\n\t\tonDisconnectedHook.trigger(gamepad.index);\n\t};\n\tconst listenerOptions = { passive: true };\n\tuseEventListener(\"gamepadconnected\", (e) => onGamepadConnected(e.gamepad), listenerOptions);\n\tuseEventListener(\"gamepaddisconnected\", (e) => onGamepadDisconnected(e.gamepad), listenerOptions);\n\ttryOnMounted(() => {\n\t\tconst _gamepads = (navigator$1 === null || navigator$1 === void 0 ? void 0 : navigator$1.getGamepads()) || [];\n\t\tfor (const gamepad of _gamepads) if (gamepad && gamepads.value[gamepad.index]) onGamepadConnected(gamepad);\n\t});\n\tpause();\n\treturn {\n\t\tisSupported,\n\t\tonConnected: onConnectedHook.on,\n\t\tonDisconnected: onDisconnectedHook.on,\n\t\tgamepads,\n\t\tpause,\n\t\tresume,\n\t\tisActive\n\t};\n}\n\n//#endregion\n//#region useGeolocation/index.ts\n/**\n* Reactive Geolocation API.\n*\n* @see https://vueuse.org/useGeolocation\n* @param options\n*/\nfunction useGeolocation(options = {}) {\n\tconst { enableHighAccuracy = true, maximumAge = 3e4, timeout = 27e3, navigator: navigator$1 = defaultNavigator, immediate = true } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => navigator$1 && \"geolocation\" in navigator$1);\n\tconst locatedAt = shallowRef(null);\n\tconst error = shallowRef(null);\n\tconst coords = ref({\n\t\taccuracy: 0,\n\t\tlatitude: Number.POSITIVE_INFINITY,\n\t\tlongitude: Number.POSITIVE_INFINITY,\n\t\taltitude: null,\n\t\taltitudeAccuracy: null,\n\t\theading: null,\n\t\tspeed: null\n\t});\n\tfunction updatePosition(position) {\n\t\tlocatedAt.value = position.timestamp;\n\t\tcoords.value = position.coords;\n\t\terror.value = null;\n\t}\n\tlet watcher;\n\tfunction resume() {\n\t\tif (isSupported.value) watcher = navigator$1.geolocation.watchPosition(updatePosition, (err) => error.value = err, {\n\t\t\tenableHighAccuracy,\n\t\t\tmaximumAge,\n\t\t\ttimeout\n\t\t});\n\t}\n\tif (immediate) resume();\n\tfunction pause() {\n\t\tif (watcher && navigator$1) navigator$1.geolocation.clearWatch(watcher);\n\t}\n\ttryOnScopeDispose(() => {\n\t\tpause();\n\t});\n\treturn {\n\t\tisSupported,\n\t\tcoords,\n\t\tlocatedAt,\n\t\terror,\n\t\tresume,\n\t\tpause\n\t};\n}\n\n//#endregion\n//#region useIdle/index.ts\nconst defaultEvents$1 = [\n\t\"mousemove\",\n\t\"mousedown\",\n\t\"resize\",\n\t\"keydown\",\n\t\"touchstart\",\n\t\"wheel\"\n];\nconst oneMinute = 6e4;\n/**\n* Tracks whether the user is being inactive.\n*\n* @see https://vueuse.org/useIdle\n* @param timeout default to 1 minute\n* @param options IdleOptions\n*/\nfunction useIdle(timeout = oneMinute, options = {}) {\n\tconst { initialState = false, listenForVisibilityChange = true, events: events$1 = defaultEvents$1, window: window$1 = defaultWindow, eventFilter = throttleFilter(50) } = options;\n\tconst idle = shallowRef(initialState);\n\tconst lastActive = shallowRef(timestamp());\n\tconst isPending = shallowRef(false);\n\tlet timer;\n\tconst reset = () => {\n\t\tidle.value = false;\n\t\tclearTimeout(timer);\n\t\ttimer = setTimeout(() => idle.value = true, timeout);\n\t};\n\tconst onEvent = createFilterWrapper(eventFilter, () => {\n\t\tlastActive.value = timestamp();\n\t\treset();\n\t});\n\tif (window$1) {\n\t\tconst document$1 = window$1.document;\n\t\tconst listenerOptions = { passive: true };\n\t\tfor (const event of events$1) useEventListener(window$1, event, () => {\n\t\t\tif (!isPending.value) return;\n\t\t\tonEvent();\n\t\t}, listenerOptions);\n\t\tif (listenForVisibilityChange) useEventListener(document$1, \"visibilitychange\", () => {\n\t\t\tif (document$1.hidden || !isPending.value) return;\n\t\t\tonEvent();\n\t\t}, listenerOptions);\n\t\tstart();\n\t}\n\tfunction start() {\n\t\tif (isPending.value) return;\n\t\tisPending.value = true;\n\t\tif (!initialState) reset();\n\t}\n\tfunction stop() {\n\t\tidle.value = initialState;\n\t\tclearTimeout(timer);\n\t\tisPending.value = false;\n\t}\n\treturn {\n\t\tidle,\n\t\tlastActive,\n\t\treset,\n\t\tstop,\n\t\tstart,\n\t\tisPending: shallowReadonly(isPending)\n\t};\n}\n\n//#endregion\n//#region useImage/index.ts\nasync function loadImage(options) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst img = new Image();\n\t\tconst { src, srcset, sizes, class: clazz, loading, crossorigin, referrerPolicy, width, height, decoding, fetchPriority, ismap, usemap } = options;\n\t\timg.src = src;\n\t\tif (srcset != null) img.srcset = srcset;\n\t\tif (sizes != null) img.sizes = sizes;\n\t\tif (clazz != null) img.className = clazz;\n\t\tif (loading != null) img.loading = loading;\n\t\tif (crossorigin != null) img.crossOrigin = crossorigin;\n\t\tif (referrerPolicy != null) img.referrerPolicy = referrerPolicy;\n\t\tif (width != null) img.width = width;\n\t\tif (height != null) img.height = height;\n\t\tif (decoding != null) img.decoding = decoding;\n\t\tif (fetchPriority != null) img.fetchPriority = fetchPriority;\n\t\tif (ismap != null) img.isMap = ismap;\n\t\tif (usemap != null) img.useMap = usemap;\n\t\timg.onload = () => resolve(img);\n\t\timg.onerror = reject;\n\t});\n}\n/**\n* Reactive load an image in the browser, you can wait the result to display it or show a fallback.\n*\n* @see https://vueuse.org/useImage\n* @param options Image attributes, as used in the <img> tag\n* @param asyncStateOptions\n*/\nfunction useImage(options, asyncStateOptions = {}) {\n\tconst state = useAsyncState(() => loadImage(toValue(options)), void 0, {\n\t\tresetOnExecute: true,\n\t\t...asyncStateOptions\n\t});\n\twatch(() => toValue(options), () => state.execute(asyncStateOptions.delay), { deep: true });\n\treturn state;\n}\n\n//#endregion\n//#region _resolve-element.ts\n/**\n* Resolves an element from a given element, window, or document.\n*\n* @internal\n*/\nfunction resolveElement(el) {\n\tif (typeof Window !== \"undefined\" && el instanceof Window) return el.document.documentElement;\n\tif (typeof Document !== \"undefined\" && el instanceof Document) return el.documentElement;\n\treturn el;\n}\n\n//#endregion\n//#region useScroll/index.ts\n/**\n* We have to check if the scroll amount is close enough to some threshold in order to\n* more accurately calculate arrivedState. This is because scrollTop/scrollLeft are non-rounded\n* numbers, while scrollHeight/scrollWidth and clientHeight/clientWidth are rounded.\n* https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollHeight#determine_if_an_element_has_been_totally_scrolled\n*/\nconst ARRIVED_STATE_THRESHOLD_PIXELS = 1;\n/**\n* Reactive scroll.\n*\n* @see https://vueuse.org/useScroll\n* @param element\n* @param options\n*/\nfunction useScroll(element, options = {}) {\n\tconst { throttle = 0, idle = 200, onStop = noop, onScroll = noop, offset = {\n\t\tleft: 0,\n\t\tright: 0,\n\t\ttop: 0,\n\t\tbottom: 0\n\t}, observe: _observe = { mutation: false }, eventListenerOptions = {\n\t\tcapture: false,\n\t\tpassive: true\n\t}, behavior = \"auto\", window: window$1 = defaultWindow, onError = (e) => {\n\t\tconsole.error(e);\n\t} } = options;\n\tconst observe = typeof _observe === \"boolean\" ? { mutation: _observe } : _observe;\n\tconst internalX = shallowRef(0);\n\tconst internalY = shallowRef(0);\n\tconst x = computed({\n\t\tget() {\n\t\t\treturn internalX.value;\n\t\t},\n\t\tset(x$1) {\n\t\t\tscrollTo(x$1, void 0);\n\t\t}\n\t});\n\tconst y = computed({\n\t\tget() {\n\t\t\treturn internalY.value;\n\t\t},\n\t\tset(y$1) {\n\t\t\tscrollTo(void 0, y$1);\n\t\t}\n\t});\n\tfunction scrollTo(_x, _y) {\n\t\tvar _ref, _toValue, _toValue2, _document;\n\t\tif (!window$1) return;\n\t\tconst _element = toValue(element);\n\t\tif (!_element) return;\n\t\t(_ref = _element instanceof Document ? window$1.document.body : _element) === null || _ref === void 0 || _ref.scrollTo({\n\t\t\ttop: (_toValue = toValue(_y)) !== null && _toValue !== void 0 ? _toValue : y.value,\n\t\t\tleft: (_toValue2 = toValue(_x)) !== null && _toValue2 !== void 0 ? _toValue2 : x.value,\n\t\t\tbehavior: toValue(behavior)\n\t\t});\n\t\tconst scrollContainer = (_element === null || _element === void 0 || (_document = _element.document) === null || _document === void 0 ? void 0 : _document.documentElement) || (_element === null || _element === void 0 ? void 0 : _element.documentElement) || _element;\n\t\tif (x != null) internalX.value = scrollContainer.scrollLeft;\n\t\tif (y != null) internalY.value = scrollContainer.scrollTop;\n\t}\n\tconst isScrolling = shallowRef(false);\n\tconst arrivedState = reactive({\n\t\tleft: true,\n\t\tright: false,\n\t\ttop: true,\n\t\tbottom: false\n\t});\n\tconst directions = reactive({\n\t\tleft: false,\n\t\tright: false,\n\t\ttop: false,\n\t\tbottom: false\n\t});\n\tconst onScrollEnd = (e) => {\n\t\tif (!isScrolling.value) return;\n\t\tisScrolling.value = false;\n\t\tdirections.left = false;\n\t\tdirections.right = false;\n\t\tdirections.top = false;\n\t\tdirections.bottom = false;\n\t\tonStop(e);\n\t};\n\tconst onScrollEndDebounced = useDebounceFn(onScrollEnd, throttle + idle);\n\tconst setArrivedState = (target) => {\n\t\tvar _document2;\n\t\tif (!window$1) return;\n\t\tconst el = (target === null || target === void 0 || (_document2 = target.document) === null || _document2 === void 0 ? void 0 : _document2.documentElement) || (target === null || target === void 0 ? void 0 : target.documentElement) || unrefElement(target);\n\t\tconst { display, flexDirection, direction } = window$1.getComputedStyle(el);\n\t\tconst directionMultipler = direction === \"rtl\" ? -1 : 1;\n\t\tconst scrollLeft = el.scrollLeft;\n\t\tdirections.left = scrollLeft < internalX.value;\n\t\tdirections.right = scrollLeft > internalX.value;\n\t\tconst left = Math.abs(scrollLeft * directionMultipler) <= (offset.left || 0);\n\t\tconst right = Math.abs(scrollLeft * directionMultipler) + el.clientWidth >= el.scrollWidth - (offset.right || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;\n\t\tif (display === \"flex\" && flexDirection === \"row-reverse\") {\n\t\t\tarrivedState.left = right;\n\t\t\tarrivedState.right = left;\n\t\t} else {\n\t\t\tarrivedState.left = left;\n\t\t\tarrivedState.right = right;\n\t\t}\n\t\tinternalX.value = scrollLeft;\n\t\tlet scrollTop = el.scrollTop;\n\t\tif (target === window$1.document && !scrollTop) scrollTop = window$1.document.body.scrollTop;\n\t\tdirections.top = scrollTop < internalY.value;\n\t\tdirections.bottom = scrollTop > internalY.value;\n\t\tconst top = Math.abs(scrollTop) <= (offset.top || 0);\n\t\tconst bottom = Math.abs(scrollTop) + el.clientHeight >= el.scrollHeight - (offset.bottom || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;\n\t\t/**\n\t\t* reverse columns and rows behave exactly the other way around,\n\t\t* bottom is treated as top and top is treated as the negative version of bottom\n\t\t*/\n\t\tif (display === \"flex\" && flexDirection === \"column-reverse\") {\n\t\t\tarrivedState.top = bottom;\n\t\t\tarrivedState.bottom = top;\n\t\t} else {\n\t\t\tarrivedState.top = top;\n\t\t\tarrivedState.bottom = bottom;\n\t\t}\n\t\tinternalY.value = scrollTop;\n\t};\n\tconst onScrollHandler = (e) => {\n\t\tvar _documentElement;\n\t\tif (!window$1) return;\n\t\tsetArrivedState((_documentElement = e.target.documentElement) !== null && _documentElement !== void 0 ? _documentElement : e.target);\n\t\tisScrolling.value = true;\n\t\tonScrollEndDebounced(e);\n\t\tonScroll(e);\n\t};\n\tuseEventListener(element, \"scroll\", throttle ? useThrottleFn(onScrollHandler, throttle, true, false) : onScrollHandler, eventListenerOptions);\n\ttryOnMounted(() => {\n\t\ttry {\n\t\t\tconst _element = toValue(element);\n\t\t\tif (!_element) return;\n\t\t\tsetArrivedState(_element);\n\t\t} catch (e) {\n\t\t\tonError(e);\n\t\t}\n\t});\n\tif ((observe === null || observe === void 0 ? void 0 : observe.mutation) && element != null && element !== window$1 && element !== document) useMutationObserver(element, () => {\n\t\tconst _element = toValue(element);\n\t\tif (!_element) return;\n\t\tsetArrivedState(_element);\n\t}, {\n\t\tattributes: true,\n\t\tchildList: true,\n\t\tsubtree: true\n\t});\n\tuseEventListener(element, \"scrollend\", onScrollEnd, eventListenerOptions);\n\treturn {\n\t\tx,\n\t\ty,\n\t\tisScrolling,\n\t\tarrivedState,\n\t\tdirections,\n\t\tmeasure() {\n\t\t\tconst _element = toValue(element);\n\t\t\tif (window$1 && _element) setArrivedState(_element);\n\t\t}\n\t};\n}\n\n//#endregion\n//#region useInfiniteScroll/index.ts\n/**\n* Reactive infinite scroll.\n*\n* @see https://vueuse.org/useInfiniteScroll\n*/\nfunction useInfiniteScroll(element, onLoadMore, options = {}) {\n\tvar _options$distance;\n\tconst { direction = \"bottom\", interval = 100, canLoadMore = () => true } = options;\n\tconst state = reactive(useScroll(element, {\n\t\t...options,\n\t\toffset: {\n\t\t\t[direction]: (_options$distance = options.distance) !== null && _options$distance !== void 0 ? _options$distance : 0,\n\t\t\t...options.offset\n\t\t}\n\t}));\n\tconst promise = ref();\n\tconst isLoading = computed(() => !!promise.value);\n\tconst observedElement = computed(() => {\n\t\treturn resolveElement(toValue(element));\n\t});\n\tconst isElementVisible = useElementVisibility(observedElement);\n\tconst canLoad = computed(() => {\n\t\tif (!observedElement.value) return false;\n\t\treturn canLoadMore(observedElement.value);\n\t});\n\tfunction checkAndLoad() {\n\t\tstate.measure();\n\t\tif (!observedElement.value || !isElementVisible.value || !canLoad.value) return;\n\t\tconst { scrollHeight, clientHeight, scrollWidth, clientWidth } = observedElement.value;\n\t\tconst isNarrower = direction === \"bottom\" || direction === \"top\" ? scrollHeight <= clientHeight : scrollWidth <= clientWidth;\n\t\tif (state.arrivedState[direction] || isNarrower) {\n\t\t\tif (!promise.value) promise.value = Promise.all([onLoadMore(state), new Promise((resolve) => setTimeout(resolve, interval))]).finally(() => {\n\t\t\t\tpromise.value = null;\n\t\t\t\tnextTick(() => checkAndLoad());\n\t\t\t});\n\t\t}\n\t}\n\ttryOnUnmounted(watch(() => [\n\t\tstate.arrivedState[direction],\n\t\tisElementVisible.value,\n\t\tcanLoad.value\n\t], checkAndLoad, { immediate: true }));\n\treturn {\n\t\tisLoading,\n\t\treset() {\n\t\t\tnextTick(() => checkAndLoad());\n\t\t}\n\t};\n}\n\n//#endregion\n//#region useKeyModifier/index.ts\nconst defaultEvents = [\n\t\"mousedown\",\n\t\"mouseup\",\n\t\"keydown\",\n\t\"keyup\"\n];\n/* @__NO_SIDE_EFFECTS__ */\nfunction useKeyModifier(modifier, options = {}) {\n\tconst { events: events$1 = defaultEvents, document: document$1 = defaultDocument, initial = null } = options;\n\tconst state = shallowRef(initial);\n\tif (document$1) events$1.forEach((listenerEvent) => {\n\t\tuseEventListener(document$1, listenerEvent, (evt) => {\n\t\t\tif (typeof evt.getModifierState === \"function\") state.value = evt.getModifierState(modifier);\n\t\t}, { passive: true });\n\t});\n\treturn state;\n}\n\n//#endregion\n//#region useLocalStorage/index.ts\n/**\n* Reactive LocalStorage.\n*\n* @see https://vueuse.org/useLocalStorage\n* @param key\n* @param initialValue\n* @param options\n*/\nfunction useLocalStorage(key, initialValue, options = {}) {\n\tconst { window: window$1 = defaultWindow } = options;\n\treturn useStorage(key, initialValue, window$1 === null || window$1 === void 0 ? void 0 : window$1.localStorage, options);\n}\n\n//#endregion\n//#region useMagicKeys/aliasMap.ts\nconst DefaultMagicKeysAliasMap = {\n\tctrl: \"control\",\n\tcommand: \"meta\",\n\tcmd: \"meta\",\n\toption: \"alt\",\n\tup: \"arrowup\",\n\tdown: \"arrowdown\",\n\tleft: \"arrowleft\",\n\tright: \"arrowright\"\n};\n\n//#endregion\n//#region useMagicKeys/index.ts\n/**\n* Reactive keys pressed state, with magical keys combination support.\n*\n* @see https://vueuse.org/useMagicKeys\n*/\nfunction useMagicKeys(options = {}) {\n\tconst { reactive: useReactive = false, target = defaultWindow, aliasMap = DefaultMagicKeysAliasMap, passive = true, onEventFired = noop } = options;\n\tconst current = reactive(/* @__PURE__ */ new Set());\n\tconst obj = {\n\t\ttoJSON() {\n\t\t\treturn {};\n\t\t},\n\t\tcurrent\n\t};\n\tconst refs = useReactive ? reactive(obj) : obj;\n\tconst metaDeps = /* @__PURE__ */ new Set();\n\tconst depsMap = new Map([\n\t\t[\"Meta\", metaDeps],\n\t\t[\"Shift\", /* @__PURE__ */ new Set()],\n\t\t[\"Alt\", /* @__PURE__ */ new Set()]\n\t]);\n\tconst usedKeys = /* @__PURE__ */ new Set();\n\tfunction setRefs(key, value) {\n\t\tif (key in refs) if (useReactive) refs[key] = value;\n\t\telse refs[key].value = value;\n\t}\n\tfunction reset() {\n\t\tcurrent.clear();\n\t\tfor (const key of usedKeys) setRefs(key, false);\n\t}\n\tfunction updateDeps(value, e, keys$1) {\n\t\tif (!value || typeof e.getModifierState !== \"function\") return;\n\t\tfor (const [modifier, depsSet] of depsMap) if (e.getModifierState(modifier)) {\n\t\t\tkeys$1.forEach((key) => depsSet.add(key));\n\t\t\tbreak;\n\t\t}\n\t}\n\tfunction clearDeps(value, key) {\n\t\tif (value) return;\n\t\tconst depsMapKey = `${key[0].toUpperCase()}${key.slice(1)}`;\n\t\tconst deps = depsMap.get(depsMapKey);\n\t\tif (![\"shift\", \"alt\"].includes(key) || !deps) return;\n\t\tconst depsArray = Array.from(deps);\n\t\tconst depsIndex = depsArray.indexOf(key);\n\t\tdepsArray.forEach((key$1, index) => {\n\t\t\tif (index >= depsIndex) {\n\t\t\t\tcurrent.delete(key$1);\n\t\t\t\tsetRefs(key$1, false);\n\t\t\t}\n\t\t});\n\t\tdeps.clear();\n\t}\n\tfunction updateRefs(e, value) {\n\t\tvar _e$key, _e$code;\n\t\tconst key = (_e$key = e.key) === null || _e$key === void 0 ? void 0 : _e$key.toLowerCase();\n\t\tconst values = [(_e$code = e.code) === null || _e$code === void 0 ? void 0 : _e$code.toLowerCase(), key].filter(Boolean);\n\t\tif (key === \"\") return;\n\t\tif (key) if (value) current.add(key);\n\t\telse current.delete(key);\n\t\tfor (const key$1 of values) {\n\t\t\tusedKeys.add(key$1);\n\t\t\tsetRefs(key$1, value);\n\t\t}\n\t\tupdateDeps(value, e, [...current, ...values]);\n\t\tclearDeps(value, key);\n\t\tif (key === \"meta\" && !value) {\n\t\t\tmetaDeps.forEach((key$1) => {\n\t\t\t\tcurrent.delete(key$1);\n\t\t\t\tsetRefs(key$1, false);\n\t\t\t});\n\t\t\tmetaDeps.clear();\n\t\t}\n\t}\n\tuseEventListener(target, \"keydown\", (e) => {\n\t\tupdateRefs(e, true);\n\t\treturn onEventFired(e);\n\t}, { passive });\n\tuseEventListener(target, \"keyup\", (e) => {\n\t\tupdateRefs(e, false);\n\t\treturn onEventFired(e);\n\t}, { passive });\n\tuseEventListener(\"blur\", reset, { passive });\n\tuseEventListener(\"focus\", reset, { passive });\n\tconst proxy = new Proxy(refs, { get(target$1, prop, rec) {\n\t\tif (typeof prop !== \"string\") return Reflect.get(target$1, prop, rec);\n\t\tprop = prop.toLowerCase();\n\t\tif (prop in aliasMap) prop = aliasMap[prop];\n\t\tif (!(prop in refs)) if (/[+_-]/.test(prop)) {\n\t\t\tconst keys$1 = prop.split(/[+_-]/g).map((i) => i.trim());\n\t\t\trefs[prop] = computed(() => keys$1.map((key) => toValue(proxy[key])).every(Boolean));\n\t\t} else refs[prop] = shallowRef(false);\n\t\tconst r = Reflect.get(target$1, prop, rec);\n\t\treturn useReactive ? toValue(r) : r;\n\t} });\n\treturn proxy;\n}\n\n//#endregion\n//#region useMediaControls/index.ts\n/**\n* Automatically check if the ref exists and if it does run the cb fn\n*/\nfunction usingElRef(source, cb) {\n\tif (toValue(source)) cb(toValue(source));\n}\n/**\n* Converts a TimeRange object to an array\n*/\nfunction timeRangeToArray(timeRanges) {\n\tlet ranges = [];\n\tfor (let i = 0; i < timeRanges.length; ++i) ranges = [...ranges, [timeRanges.start(i), timeRanges.end(i)]];\n\treturn ranges;\n}\n/**\n* Converts a TextTrackList object to an array of `UseMediaTextTrack`\n*/\nfunction tracksToArray(tracks) {\n\treturn Array.from(tracks).map(({ label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType }, id) => ({\n\t\tid,\n\t\tlabel,\n\t\tkind,\n\t\tlanguage,\n\t\tmode,\n\t\tactiveCues,\n\t\tcues,\n\t\tinBandMetadataTrackDispatchType\n\t}));\n}\nconst defaultOptions = {\n\tsrc: \"\",\n\ttracks: []\n};\nfunction useMediaControls(target, options = {}) {\n\ttarget = toRef(target);\n\toptions = {\n\t\t...defaultOptions,\n\t\t...options\n\t};\n\tconst { document: document$1 = defaultDocument } = options;\n\tconst listenerOptions = { passive: true };\n\tconst currentTime = shallowRef(0);\n\tconst duration = shallowRef(0);\n\tconst seeking = shallowRef(false);\n\tconst volume = shallowRef(1);\n\tconst waiting = shallowRef(false);\n\tconst ended = shallowRef(false);\n\tconst playing = shallowRef(false);\n\tconst rate = shallowRef(1);\n\tconst stalled = shallowRef(false);\n\tconst buffered = ref([]);\n\tconst tracks = ref([]);\n\tconst selectedTrack = shallowRef(-1);\n\tconst isPictureInPicture = shallowRef(false);\n\tconst muted = shallowRef(false);\n\tconst supportsPictureInPicture = document$1 && \"pictureInPictureEnabled\" in document$1;\n\tconst sourceErrorEvent = createEventHook();\n\tconst playbackErrorEvent = createEventHook();\n\t/**\n\t* Disables the specified track. If no track is specified then\n\t* all tracks will be disabled\n\t*\n\t* @param track The id of the track to disable\n\t*/\n\tconst disableTrack = (track) => {\n\t\tusingElRef(target, (el) => {\n\t\t\tif (track) {\n\t\t\t\tconst id = typeof track === \"number\" ? track : track.id;\n\t\t\t\tel.textTracks[id].mode = \"disabled\";\n\t\t\t} else for (let i = 0; i < el.textTracks.length; ++i) el.textTracks[i].mode = \"disabled\";\n\t\t\tselectedTrack.value = -1;\n\t\t});\n\t};\n\t/**\n\t* Enables the specified track and disables the\n\t* other tracks unless otherwise specified\n\t*\n\t* @param track The track of the id of the track to enable\n\t* @param disableTracks Disable all other tracks\n\t*/\n\tconst enableTrack = (track, disableTracks = true) => {\n\t\tusingElRef(target, (el) => {\n\t\t\tconst id = typeof track === \"number\" ? track : track.id;\n\t\t\tif (disableTracks) disableTrack();\n\t\t\tel.textTracks[id].mode = \"showing\";\n\t\t\tselectedTrack.value = id;\n\t\t});\n\t};\n\t/**\n\t* Toggle picture in picture mode for the player.\n\t*/\n\tconst togglePictureInPicture = () => {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tusingElRef(target, async (el) => {\n\t\t\t\tif (supportsPictureInPicture) if (!isPictureInPicture.value) el.requestPictureInPicture().then(resolve).catch(reject);\n\t\t\t\telse document$1.exitPictureInPicture().then(resolve).catch(reject);\n\t\t\t});\n\t\t});\n\t};\n\t/**\n\t* This will automatically inject sources to the media element. The sources will be\n\t* appended as children to the media element as `<source>` elements.\n\t*/\n\twatchEffect(() => {\n\t\tif (!document$1) return;\n\t\tconst el = toValue(target);\n\t\tif (!el) return;\n\t\tconst src = toValue(options.src);\n\t\tlet sources = [];\n\t\tif (!src) return;\n\t\tif (typeof src === \"string\") sources = [{ src }];\n\t\telse if (Array.isArray(src)) sources = src;\n\t\telse if (isObject(src)) sources = [src];\n\t\tel.querySelectorAll(\"source\").forEach((e) => {\n\t\t\te.remove();\n\t\t});\n\t\tsources.forEach(({ src: src$1, type, media }) => {\n\t\t\tconst source = document$1.createElement(\"source\");\n\t\t\tsource.setAttribute(\"src\", src$1);\n\t\t\tsource.setAttribute(\"type\", type || \"\");\n\t\t\tsource.setAttribute(\"media\", media || \"\");\n\t\t\tuseEventListener(source, \"error\", sourceErrorEvent.trigger, listenerOptions);\n\t\t\tel.appendChild(source);\n\t\t});\n\t\tel.load();\n\t});\n\t/**\n\t* Apply composable state to the element, also when element is changed\n\t*/\n\twatch([target, volume], () => {\n\t\tconst el = toValue(target);\n\t\tif (!el) return;\n\t\tel.volume = volume.value;\n\t});\n\twatch([target, muted], () => {\n\t\tconst el = toValue(target);\n\t\tif (!el) return;\n\t\tel.muted = muted.value;\n\t});\n\twatch([target, rate], () => {\n\t\tconst el = toValue(target);\n\t\tif (!el) return;\n\t\tel.playbackRate = rate.value;\n\t});\n\t/**\n\t* Load Tracks\n\t*/\n\twatchEffect(() => {\n\t\tif (!document$1) return;\n\t\tconst textTracks = toValue(options.tracks);\n\t\tconst el = toValue(target);\n\t\tif (!textTracks || !textTracks.length || !el) return;\n\t\t/**\n\t\t* The MediaAPI provides an API for adding text tracks, but they don't currently\n\t\t* have an API for removing text tracks, so instead we will just create and remove\n\t\t* the tracks manually using the HTML api.\n\t\t*/\n\t\tel.querySelectorAll(\"track\").forEach((e) => e.remove());\n\t\ttextTracks.forEach(({ default: isDefault, kind, label, src, srcLang }, i) => {\n\t\t\tconst track = document$1.createElement(\"track\");\n\t\t\ttrack.default = isDefault || false;\n\t\t\ttrack.kind = kind;\n\t\t\ttrack.label = label;\n\t\t\ttrack.src = src;\n\t\t\ttrack.srclang = srcLang;\n\t\t\tif (track.default) selectedTrack.value = i;\n\t\t\tel.appendChild(track);\n\t\t});\n\t});\n\t/**\n\t* This will allow us to update the current time from the timeupdate event\n\t* without setting the medias current position, but if the user changes the\n\t* current time via the ref, then the media will seek.\n\t*\n\t* If we did not use an ignorable watch, then the current time update from\n\t* the timeupdate event would cause the media to stutter.\n\t*/\n\tconst { ignoreUpdates: ignoreCurrentTimeUpdates } = watchIgnorable(currentTime, (time) => {\n\t\tconst el = toValue(target);\n\t\tif (!el) return;\n\t\tel.currentTime = time;\n\t});\n\t/**\n\t* Using an ignorable watch so we can control the play state using a ref and not\n\t* a function\n\t*/\n\tconst { ignoreUpdates: ignorePlayingUpdates } = watchIgnorable(playing, (isPlaying) => {\n\t\tconst el = toValue(target);\n\t\tif (!el) return;\n\t\tif (isPlaying) el.play().catch((e) => {\n\t\t\tplaybackErrorEvent.trigger(e);\n\t\t\tthrow e;\n\t\t});\n\t\telse el.pause();\n\t});\n\tuseEventListener(target, \"timeupdate\", () => ignoreCurrentTimeUpdates(() => currentTime.value = toValue(target).currentTime), listenerOptions);\n\tuseEventListener(target, \"durationchange\", () => duration.value = toValue(target).duration, listenerOptions);\n\tuseEventListener(target, \"progress\", () => buffered.value = timeRangeToArray(toValue(target).buffered), listenerOptions);\n\tuseEventListener(target, \"seeking\", () => seeking.value = true, listenerOptions);\n\tuseEventListener(target, \"seeked\", () => seeking.value = false, listenerOptions);\n\tuseEventListener(target, [\"waiting\", \"loadstart\"], () => {\n\t\twaiting.value = true;\n\t\tignorePlayingUpdates(() => playing.value = false);\n\t}, listenerOptions);\n\tuseEventListener(target, \"loadeddata\", () => waiting.value = false, listenerOptions);\n\tuseEventListener(target, \"playing\", () => {\n\t\twaiting.value = false;\n\t\tended.value = false;\n\t\tignorePlayingUpdates(() => playing.value = true);\n\t}, listenerOptions);\n\tuseEventListener(target, \"ratechange\", () => rate.value = toValue(target).playbackRate, listenerOptions);\n\tuseEventListener(target, \"stalled\", () => stalled.value = true, listenerOptions);\n\tuseEventListener(target, \"ended\", () => ended.value = true, listenerOptions);\n\tuseEventListener(target, \"pause\", () => ignorePlayingUpdates(() => playing.value = false), listenerOptions);\n\tuseEventListener(target, \"play\", () => ignorePlayingUpdates(() => playing.value = true), listenerOptions);\n\tuseEventListener(target, \"enterpictureinpicture\", () => isPictureInPicture.value = true, listenerOptions);\n\tuseEventListener(target, \"leavepictureinpicture\", () => isPictureInPicture.value = false, listenerOptions);\n\tuseEventListener(target, \"volumechange\", () => {\n\t\tconst el = toValue(target);\n\t\tif (!el) return;\n\t\tvolume.value = el.volume;\n\t\tmuted.value = el.muted;\n\t}, listenerOptions);\n\t/**\n\t* The following listeners need to listen to a nested\n\t* object on the target, so we will have to use a nested\n\t* watch and manually remove the listeners\n\t*/\n\tconst listeners = [];\n\tconst stop = watch([target], () => {\n\t\tconst el = toValue(target);\n\t\tif (!el) return;\n\t\tstop();\n\t\tlisteners[0] = useEventListener(el.textTracks, \"addtrack\", () => tracks.value = tracksToArray(el.textTracks), listenerOptions);\n\t\tlisteners[1] = useEventListener(el.textTracks, \"removetrack\", () => tracks.value = tracksToArray(el.textTracks), listenerOptions);\n\t\tlisteners[2] = useEventListener(el.textTracks, \"change\", () => tracks.value = tracksToArray(el.textTracks), listenerOptions);\n\t});\n\ttryOnScopeDispose(() => listeners.forEach((listener) => listener()));\n\treturn {\n\t\tcurrentTime,\n\t\tduration,\n\t\twaiting,\n\t\tseeking,\n\t\tended,\n\t\tstalled,\n\t\tbuffered,\n\t\tplaying,\n\t\trate,\n\t\tvolume,\n\t\tmuted,\n\t\ttracks,\n\t\tselectedTrack,\n\t\tenableTrack,\n\t\tdisableTrack,\n\t\tsupportsPictureInPicture,\n\t\ttogglePictureInPicture,\n\t\tisPictureInPicture,\n\t\tonSourceError: sourceErrorEvent.on,\n\t\tonPlaybackError: playbackErrorEvent.on\n\t};\n}\n\n//#endregion\n//#region useMemoize/index.ts\n/**\n* Reactive function result cache based on arguments\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useMemoize(resolver, options) {\n\tconst initCache = () => {\n\t\tif (options === null || options === void 0 ? void 0 : options.cache) return shallowReactive(options.cache);\n\t\treturn shallowReactive(/* @__PURE__ */ new Map());\n\t};\n\tconst cache = initCache();\n\t/**\n\t* Generate key from args\n\t*/\n\tconst generateKey = (...args) => (options === null || options === void 0 ? void 0 : options.getKey) ? options.getKey(...args) : JSON.stringify(args);\n\t/**\n\t* Load data and save in cache\n\t*/\n\tconst _loadData = (key, ...args) => {\n\t\tcache.set(key, resolver(...args));\n\t\treturn cache.get(key);\n\t};\n\tconst loadData = (...args) => _loadData(generateKey(...args), ...args);\n\t/**\n\t* Delete key from cache\n\t*/\n\tconst deleteData = (...args) => {\n\t\tcache.delete(generateKey(...args));\n\t};\n\t/**\n\t* Clear cached data\n\t*/\n\tconst clearData = () => {\n\t\tcache.clear();\n\t};\n\tconst memoized = (...args) => {\n\t\tconst key = generateKey(...args);\n\t\tif (cache.has(key)) return cache.get(key);\n\t\treturn _loadData(key, ...args);\n\t};\n\tmemoized.load = loadData;\n\tmemoized.delete = deleteData;\n\tmemoized.clear = clearData;\n\tmemoized.generateKey = generateKey;\n\tmemoized.cache = cache;\n\treturn memoized;\n}\n\n//#endregion\n//#region useMemory/index.ts\n/**\n* Reactive Memory Info.\n*\n* @see https://vueuse.org/useMemory\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useMemory(options = {}) {\n\tconst memory = ref();\n\tconst isSupported = /* @__PURE__ */ useSupported(() => typeof performance !== \"undefined\" && \"memory\" in performance);\n\tif (isSupported.value) {\n\t\tconst { interval = 1e3 } = options;\n\t\tuseIntervalFn(() => {\n\t\t\tmemory.value = performance.memory;\n\t\t}, interval, {\n\t\t\timmediate: options.immediate,\n\t\t\timmediateCallback: options.immediateCallback\n\t\t});\n\t}\n\treturn {\n\t\tisSupported,\n\t\tmemory\n\t};\n}\n\n//#endregion\n//#region useMouse/index.ts\nconst UseMouseBuiltinExtractors = {\n\tpage: (event) => [event.pageX, event.pageY],\n\tclient: (event) => [event.clientX, event.clientY],\n\tscreen: (event) => [event.screenX, event.screenY],\n\tmovement: (event) => event instanceof MouseEvent ? [event.movementX, event.movementY] : null\n};\n/**\n* Reactive mouse position.\n*\n* @see https://vueuse.org/useMouse\n* @param options\n*/\nfunction useMouse(options = {}) {\n\tconst { type = \"page\", touch = true, resetOnTouchEnds = false, initialValue = {\n\t\tx: 0,\n\t\ty: 0\n\t}, window: window$1 = defaultWindow, target = window$1, scroll = true, eventFilter } = options;\n\tlet _prevMouseEvent = null;\n\tlet _prevScrollX = 0;\n\tlet _prevScrollY = 0;\n\tconst x = shallowRef(initialValue.x);\n\tconst y = shallowRef(initialValue.y);\n\tconst sourceType = shallowRef(null);\n\tconst extractor = typeof type === \"function\" ? type : UseMouseBuiltinExtractors[type];\n\tconst mouseHandler = (event) => {\n\t\tconst result = extractor(event);\n\t\t_prevMouseEvent = event;\n\t\tif (result) {\n\t\t\t[x.value, y.value] = result;\n\t\t\tsourceType.value = \"mouse\";\n\t\t}\n\t\tif (window$1) {\n\t\t\t_prevScrollX = window$1.scrollX;\n\t\t\t_prevScrollY = window$1.scrollY;\n\t\t}\n\t};\n\tconst touchHandler = (event) => {\n\t\tif (event.touches.length > 0) {\n\t\t\tconst result = extractor(event.touches[0]);\n\t\t\tif (result) {\n\t\t\t\t[x.value, y.value] = result;\n\t\t\t\tsourceType.value = \"touch\";\n\t\t\t}\n\t\t}\n\t};\n\tconst scrollHandler = () => {\n\t\tif (!_prevMouseEvent || !window$1) return;\n\t\tconst pos = extractor(_prevMouseEvent);\n\t\tif (_prevMouseEvent instanceof MouseEvent && pos) {\n\t\t\tx.value = pos[0] + window$1.scrollX - _prevScrollX;\n\t\t\ty.value = pos[1] + window$1.scrollY - _prevScrollY;\n\t\t}\n\t};\n\tconst reset = () => {\n\t\tx.value = initialValue.x;\n\t\ty.value = initialValue.y;\n\t};\n\tconst mouseHandlerWrapper = eventFilter ? (event) => eventFilter(() => mouseHandler(event), {}) : (event) => mouseHandler(event);\n\tconst touchHandlerWrapper = eventFilter ? (event) => eventFilter(() => touchHandler(event), {}) : (event) => touchHandler(event);\n\tconst scrollHandlerWrapper = eventFilter ? () => eventFilter(() => scrollHandler(), {}) : () => scrollHandler();\n\tif (target) {\n\t\tconst listenerOptions = { passive: true };\n\t\tuseEventListener(target, [\"mousemove\", \"dragover\"], mouseHandlerWrapper, listenerOptions);\n\t\tif (touch && type !== \"movement\") {\n\t\t\tuseEventListener(target, [\"touchstart\", \"touchmove\"], touchHandlerWrapper, listenerOptions);\n\t\t\tif (resetOnTouchEnds) useEventListener(target, \"touchend\", reset, listenerOptions);\n\t\t}\n\t\tif (scroll && type === \"page\") useEventListener(window$1, \"scroll\", scrollHandlerWrapper, listenerOptions);\n\t}\n\treturn {\n\t\tx,\n\t\ty,\n\t\tsourceType\n\t};\n}\n\n//#endregion\n//#region useMouseInElement/index.ts\n/**\n* Reactive mouse position related to an element.\n*\n* @see https://vueuse.org/useMouseInElement\n* @param target\n* @param options\n*/\nfunction useMouseInElement(target, options = {}) {\n\tconst { windowResize = true, windowScroll = true, handleOutside = true, window: window$1 = defaultWindow } = options;\n\tconst type = options.type || \"page\";\n\tconst { x, y, sourceType } = useMouse(options);\n\tconst targetRef = shallowRef(target !== null && target !== void 0 ? target : window$1 === null || window$1 === void 0 ? void 0 : window$1.document.body);\n\tconst elementX = shallowRef(0);\n\tconst elementY = shallowRef(0);\n\tconst elementPositionX = shallowRef(0);\n\tconst elementPositionY = shallowRef(0);\n\tconst elementHeight = shallowRef(0);\n\tconst elementWidth = shallowRef(0);\n\tconst isOutside = shallowRef(true);\n\tfunction update() {\n\t\tif (!window$1) return;\n\t\tconst el = unrefElement(targetRef);\n\t\tif (!el || !(el instanceof Element)) return;\n\t\tfor (const rect of el.getClientRects()) {\n\t\t\tconst { left, top, width, height } = rect;\n\t\t\telementPositionX.value = left + (type === \"page\" ? window$1.pageXOffset : 0);\n\t\t\telementPositionY.value = top + (type === \"page\" ? window$1.pageYOffset : 0);\n\t\t\telementHeight.value = height;\n\t\t\telementWidth.value = width;\n\t\t\tconst elX = x.value - elementPositionX.value;\n\t\t\tconst elY = y.value - elementPositionY.value;\n\t\t\tisOutside.value = width === 0 || height === 0 || elX < 0 || elY < 0 || elX > width || elY > height;\n\t\t\tif (handleOutside || !isOutside.value) {\n\t\t\t\telementX.value = elX;\n\t\t\t\telementY.value = elY;\n\t\t\t}\n\t\t\tif (!isOutside.value) break;\n\t\t}\n\t}\n\tconst stopFnList = [];\n\tfunction stop() {\n\t\tstopFnList.forEach((fn) => fn());\n\t\tstopFnList.length = 0;\n\t}\n\ttryOnMounted(() => {\n\t\tupdate();\n\t});\n\tif (window$1) {\n\t\tconst { stop: stopResizeObserver } = useResizeObserver(targetRef, update);\n\t\tconst { stop: stopMutationObserver } = useMutationObserver(targetRef, update, { attributeFilter: [\"style\", \"class\"] });\n\t\tconst stopWatch = watch([\n\t\t\ttargetRef,\n\t\t\tx,\n\t\t\ty\n\t\t], update);\n\t\tstopFnList.push(stopResizeObserver, stopMutationObserver, stopWatch);\n\t\tuseEventListener(document, \"mouseleave\", () => isOutside.value = true, { passive: true });\n\t\tif (windowScroll) stopFnList.push(useEventListener(\"scroll\", update, {\n\t\t\tcapture: true,\n\t\t\tpassive: true\n\t\t}));\n\t\tif (windowResize) stopFnList.push(useEventListener(\"resize\", update, { passive: true }));\n\t}\n\treturn {\n\t\tx,\n\t\ty,\n\t\tsourceType,\n\t\telementX,\n\t\telementY,\n\t\telementPositionX,\n\t\telementPositionY,\n\t\telementHeight,\n\t\telementWidth,\n\t\tisOutside,\n\t\tstop\n\t};\n}\n\n//#endregion\n//#region useMousePressed/index.ts\n/**\n* Reactive mouse pressing state.\n*\n* @see https://vueuse.org/useMousePressed\n* @param options\n*/\nfunction useMousePressed(options = {}) {\n\tconst { touch = true, drag = true, capture = false, initialValue = false, window: window$1 = defaultWindow } = options;\n\tconst pressed = shallowRef(initialValue);\n\tconst sourceType = shallowRef(null);\n\tif (!window$1) return {\n\t\tpressed,\n\t\tsourceType\n\t};\n\tconst onPressed = (srcType) => (event) => {\n\t\tvar _options$onPressed;\n\t\tpressed.value = true;\n\t\tsourceType.value = srcType;\n\t\t(_options$onPressed = options.onPressed) === null || _options$onPressed === void 0 || _options$onPressed.call(options, event);\n\t};\n\tconst onReleased = (event) => {\n\t\tvar _options$onReleased;\n\t\tpressed.value = false;\n\t\tsourceType.value = null;\n\t\t(_options$onReleased = options.onReleased) === null || _options$onReleased === void 0 || _options$onReleased.call(options, event);\n\t};\n\tconst target = computed(() => unrefElement(options.target) || window$1);\n\tconst listenerOptions = {\n\t\tpassive: true,\n\t\tcapture\n\t};\n\tuseEventListener(target, \"mousedown\", onPressed(\"mouse\"), listenerOptions);\n\tuseEventListener(window$1, \"mouseleave\", onReleased, listenerOptions);\n\tuseEventListener(window$1, \"mouseup\", onReleased, listenerOptions);\n\tif (drag) {\n\t\tuseEventListener(target, \"dragstart\", onPressed(\"mouse\"), listenerOptions);\n\t\tuseEventListener(window$1, \"drop\", onReleased, listenerOptions);\n\t\tuseEventListener(window$1, \"dragend\", onReleased, listenerOptions);\n\t}\n\tif (touch) {\n\t\tuseEventListener(target, \"touchstart\", onPressed(\"touch\"), listenerOptions);\n\t\tuseEventListener(window$1, \"touchend\", onReleased, listenerOptions);\n\t\tuseEventListener(window$1, \"touchcancel\", onReleased, listenerOptions);\n\t}\n\treturn {\n\t\tpressed,\n\t\tsourceType\n\t};\n}\n\n//#endregion\n//#region useNavigatorLanguage/index.ts\n/**\n*\n* Reactive useNavigatorLanguage\n*\n* Detects the currently selected user language and returns a reactive language\n* @see https://vueuse.org/useNavigatorLanguage\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useNavigatorLanguage(options = {}) {\n\tconst { window: window$1 = defaultWindow } = options;\n\tconst navigator$1 = window$1 === null || window$1 === void 0 ? void 0 : window$1.navigator;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => navigator$1 && \"language\" in navigator$1);\n\tconst language = shallowRef(navigator$1 === null || navigator$1 === void 0 ? void 0 : navigator$1.language);\n\tuseEventListener(window$1, \"languagechange\", () => {\n\t\tif (navigator$1) language.value = navigator$1.language;\n\t}, { passive: true });\n\treturn {\n\t\tisSupported,\n\t\tlanguage\n\t};\n}\n\n//#endregion\n//#region useNetwork/index.ts\n/**\n* Reactive Network status.\n*\n* @see https://vueuse.org/useNetwork\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useNetwork(options = {}) {\n\tconst { window: window$1 = defaultWindow } = options;\n\tconst navigator$1 = window$1 === null || window$1 === void 0 ? void 0 : window$1.navigator;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => navigator$1 && \"connection\" in navigator$1);\n\tconst isOnline = shallowRef(true);\n\tconst saveData = shallowRef(false);\n\tconst offlineAt = shallowRef(void 0);\n\tconst onlineAt = shallowRef(void 0);\n\tconst downlink = shallowRef(void 0);\n\tconst downlinkMax = shallowRef(void 0);\n\tconst rtt = shallowRef(void 0);\n\tconst effectiveType = shallowRef(void 0);\n\tconst type = shallowRef(\"unknown\");\n\tconst connection = isSupported.value && navigator$1.connection;\n\tfunction updateNetworkInformation() {\n\t\tif (!navigator$1) return;\n\t\tisOnline.value = navigator$1.onLine;\n\t\tofflineAt.value = isOnline.value ? void 0 : Date.now();\n\t\tonlineAt.value = isOnline.value ? Date.now() : void 0;\n\t\tif (connection) {\n\t\t\tdownlink.value = connection.downlink;\n\t\t\tdownlinkMax.value = connection.downlinkMax;\n\t\t\teffectiveType.value = connection.effectiveType;\n\t\t\trtt.value = connection.rtt;\n\t\t\tsaveData.value = connection.saveData;\n\t\t\ttype.value = connection.type;\n\t\t}\n\t}\n\tconst listenerOptions = { passive: true };\n\tif (window$1) {\n\t\tuseEventListener(window$1, \"offline\", () => {\n\t\t\tisOnline.value = false;\n\t\t\tofflineAt.value = Date.now();\n\t\t}, listenerOptions);\n\t\tuseEventListener(window$1, \"online\", () => {\n\t\t\tisOnline.value = true;\n\t\t\tonlineAt.value = Date.now();\n\t\t}, listenerOptions);\n\t}\n\tif (connection) useEventListener(connection, \"change\", updateNetworkInformation, listenerOptions);\n\tupdateNetworkInformation();\n\treturn {\n\t\tisSupported,\n\t\tisOnline: readonly(isOnline),\n\t\tsaveData: readonly(saveData),\n\t\tofflineAt: readonly(offlineAt),\n\t\tonlineAt: readonly(onlineAt),\n\t\tdownlink: readonly(downlink),\n\t\tdownlinkMax: readonly(downlinkMax),\n\t\teffectiveType: readonly(effectiveType),\n\t\trtt: readonly(rtt),\n\t\ttype: readonly(type)\n\t};\n}\n\n//#endregion\n//#region useNow/index.ts\n/**\n* Reactive current Date instance.\n*\n* @see https://vueuse.org/useNow\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useNow(options = {}) {\n\tconst { controls: exposeControls = false, interval = \"requestAnimationFrame\", immediate = true } = options;\n\tconst now = ref(/* @__PURE__ */ new Date());\n\tconst update = () => now.value = /* @__PURE__ */ new Date();\n\tconst controls = interval === \"requestAnimationFrame\" ? useRafFn(update, { immediate }) : useIntervalFn(update, interval, { immediate });\n\tif (exposeControls) return {\n\t\tnow,\n\t\t...controls\n\t};\n\telse return now;\n}\n\n//#endregion\n//#region useObjectUrl/index.ts\n/**\n* Reactive URL representing an object.\n*\n* @see https://vueuse.org/useObjectUrl\n* @param object\n*/\nfunction useObjectUrl(object) {\n\tconst url = shallowRef();\n\tconst release = () => {\n\t\tif (url.value) URL.revokeObjectURL(url.value);\n\t\turl.value = void 0;\n\t};\n\twatch(() => toValue(object), (newObject) => {\n\t\trelease();\n\t\tif (newObject) url.value = URL.createObjectURL(newObject);\n\t}, { immediate: true });\n\ttryOnScopeDispose(release);\n\treturn readonly(url);\n}\n\n//#endregion\n//#region ../math/useClamp/index.ts\n/**\n* Reactively clamp a value between two other values.\n*\n* @see https://vueuse.org/useClamp\n* @param value number\n* @param min\n* @param max\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useClamp(value, min, max) {\n\tif (typeof value === \"function\" || isReadonly(value)) return computed(() => clamp(toValue(value), toValue(min), toValue(max)));\n\tconst _value = ref(value);\n\treturn computed({\n\t\tget() {\n\t\t\treturn _value.value = clamp(_value.value, toValue(min), toValue(max));\n\t\t},\n\t\tset(value$1) {\n\t\t\t_value.value = clamp(value$1, toValue(min), toValue(max));\n\t\t}\n\t});\n}\n\n//#endregion\n//#region useOffsetPagination/index.ts\nfunction useOffsetPagination(options) {\n\tconst { total = Number.POSITIVE_INFINITY, pageSize = 10, page = 1, onPageChange = noop, onPageSizeChange = noop, onPageCountChange = noop } = options;\n\tconst currentPageSize = useClamp(pageSize, 1, Number.POSITIVE_INFINITY);\n\tconst pageCount = computed(() => Math.max(1, Math.ceil(toValue(total) / toValue(currentPageSize))));\n\tconst currentPage = useClamp(page, 1, pageCount);\n\tconst isFirstPage = computed(() => currentPage.value === 1);\n\tconst isLastPage = computed(() => currentPage.value === pageCount.value);\n\tif (isRef(page)) syncRef(page, currentPage, { direction: isReadonly(page) ? \"ltr\" : \"both\" });\n\tif (isRef(pageSize)) syncRef(pageSize, currentPageSize, { direction: isReadonly(pageSize) ? \"ltr\" : \"both\" });\n\tfunction prev() {\n\t\tcurrentPage.value--;\n\t}\n\tfunction next() {\n\t\tcurrentPage.value++;\n\t}\n\tconst returnValue = {\n\t\tcurrentPage,\n\t\tcurrentPageSize,\n\t\tpageCount,\n\t\tisFirstPage,\n\t\tisLastPage,\n\t\tprev,\n\t\tnext\n\t};\n\twatch(currentPage, () => {\n\t\tonPageChange(reactive(returnValue));\n\t});\n\twatch(currentPageSize, () => {\n\t\tonPageSizeChange(reactive(returnValue));\n\t});\n\twatch(pageCount, () => {\n\t\tonPageCountChange(reactive(returnValue));\n\t});\n\treturn returnValue;\n}\n\n//#endregion\n//#region useOnline/index.ts\n/**\n* Reactive online state.\n*\n* @see https://vueuse.org/useOnline\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useOnline(options = {}) {\n\tconst { isOnline } = useNetwork(options);\n\treturn isOnline;\n}\n\n//#endregion\n//#region usePageLeave/index.ts\n/**\n* Reactive state to show whether mouse leaves the page.\n*\n* @see https://vueuse.org/usePageLeave\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction usePageLeave(options = {}) {\n\tconst { window: window$1 = defaultWindow } = options;\n\tconst isLeft = shallowRef(false);\n\tconst handler = (event) => {\n\t\tif (!window$1) return;\n\t\tevent = event || window$1.event;\n\t\tisLeft.value = !(event.relatedTarget || event.toElement);\n\t};\n\tif (window$1) {\n\t\tconst listenerOptions = { passive: true };\n\t\tuseEventListener(window$1, \"mouseout\", handler, listenerOptions);\n\t\tuseEventListener(window$1.document, \"mouseleave\", handler, listenerOptions);\n\t\tuseEventListener(window$1.document, \"mouseenter\", handler, listenerOptions);\n\t}\n\treturn isLeft;\n}\n\n//#endregion\n//#region useScreenOrientation/index.ts\n/**\n* Reactive screen orientation\n*\n* @see https://vueuse.org/useScreenOrientation\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useScreenOrientation(options = {}) {\n\tconst { window: window$1 = defaultWindow } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => window$1 && \"screen\" in window$1 && \"orientation\" in window$1.screen);\n\tconst screenOrientation = isSupported.value ? window$1.screen.orientation : {};\n\tconst orientation = ref(screenOrientation.type);\n\tconst angle = shallowRef(screenOrientation.angle || 0);\n\tif (isSupported.value) useEventListener(window$1, \"orientationchange\", () => {\n\t\torientation.value = screenOrientation.type;\n\t\tangle.value = screenOrientation.angle;\n\t}, { passive: true });\n\tconst lockOrientation = (type) => {\n\t\tif (isSupported.value && typeof screenOrientation.lock === \"function\") return screenOrientation.lock(type);\n\t\treturn Promise.reject(/* @__PURE__ */ new Error(\"Not supported\"));\n\t};\n\tconst unlockOrientation = () => {\n\t\tif (isSupported.value && typeof screenOrientation.unlock === \"function\") screenOrientation.unlock();\n\t};\n\treturn {\n\t\tisSupported,\n\t\torientation,\n\t\tangle,\n\t\tlockOrientation,\n\t\tunlockOrientation\n\t};\n}\n\n//#endregion\n//#region useParallax/index.ts\n/**\n* Create parallax effect easily. It uses `useDeviceOrientation` and fallback to `useMouse`\n* if orientation is not supported.\n*\n* @param target\n* @param options\n*/\nfunction useParallax(target, options = {}) {\n\tconst { deviceOrientationTiltAdjust = (i) => i, deviceOrientationRollAdjust = (i) => i, mouseTiltAdjust = (i) => i, mouseRollAdjust = (i) => i, window: window$1 = defaultWindow } = options;\n\tconst orientation = reactive(useDeviceOrientation({ window: window$1 }));\n\tconst screenOrientation = reactive(useScreenOrientation({ window: window$1 }));\n\tconst { elementX: x, elementY: y, elementWidth: width, elementHeight: height } = useMouseInElement(target, {\n\t\thandleOutside: false,\n\t\twindow: window$1\n\t});\n\tconst source = computed(() => {\n\t\tif (orientation.isSupported && (orientation.alpha != null && orientation.alpha !== 0 || orientation.gamma != null && orientation.gamma !== 0)) return \"deviceOrientation\";\n\t\treturn \"mouse\";\n\t});\n\treturn {\n\t\troll: computed(() => {\n\t\t\tif (source.value === \"deviceOrientation\") {\n\t\t\t\tlet value;\n\t\t\t\tswitch (screenOrientation.orientation) {\n\t\t\t\t\tcase \"landscape-primary\":\n\t\t\t\t\t\tvalue = orientation.gamma / 90;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"landscape-secondary\":\n\t\t\t\t\t\tvalue = -orientation.gamma / 90;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"portrait-primary\":\n\t\t\t\t\t\tvalue = -orientation.beta / 90;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"portrait-secondary\":\n\t\t\t\t\t\tvalue = orientation.beta / 90;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault: value = -orientation.beta / 90;\n\t\t\t\t}\n\t\t\t\treturn deviceOrientationRollAdjust(value);\n\t\t\t} else return mouseRollAdjust(-(y.value - height.value / 2) / height.value);\n\t\t}),\n\t\ttilt: computed(() => {\n\t\t\tif (source.value === \"deviceOrientation\") {\n\t\t\t\tlet value;\n\t\t\t\tswitch (screenOrientation.orientation) {\n\t\t\t\t\tcase \"landscape-primary\":\n\t\t\t\t\t\tvalue = orientation.beta / 90;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"landscape-secondary\":\n\t\t\t\t\t\tvalue = -orientation.beta / 90;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"portrait-primary\":\n\t\t\t\t\t\tvalue = orientation.gamma / 90;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"portrait-secondary\":\n\t\t\t\t\t\tvalue = -orientation.gamma / 90;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault: value = orientation.gamma / 90;\n\t\t\t\t}\n\t\t\t\treturn deviceOrientationTiltAdjust(value);\n\t\t\t} else return mouseTiltAdjust((x.value - width.value / 2) / width.value);\n\t\t}),\n\t\tsource\n\t};\n}\n\n//#endregion\n//#region useParentElement/index.ts\nfunction useParentElement(element = useCurrentElement()) {\n\tconst parentElement = shallowRef();\n\tconst update = () => {\n\t\tconst el = unrefElement(element);\n\t\tif (el) parentElement.value = el.parentElement;\n\t};\n\ttryOnMounted(update);\n\twatch(() => toValue(element), update);\n\treturn parentElement;\n}\n\n//#endregion\n//#region usePerformanceObserver/index.ts\n/**\n* Observe performance metrics.\n*\n* @see https://vueuse.org/usePerformanceObserver\n* @param options\n*/\nfunction usePerformanceObserver(options, callback) {\n\tconst { window: window$1 = defaultWindow, immediate = true,...performanceOptions } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => window$1 && \"PerformanceObserver\" in window$1);\n\tlet observer;\n\tconst stop = () => {\n\t\tobserver === null || observer === void 0 || observer.disconnect();\n\t};\n\tconst start = () => {\n\t\tif (isSupported.value) {\n\t\t\tstop();\n\t\t\tobserver = new PerformanceObserver(callback);\n\t\t\tobserver.observe(performanceOptions);\n\t\t}\n\t};\n\ttryOnScopeDispose(stop);\n\tif (immediate) start();\n\treturn {\n\t\tisSupported,\n\t\tstart,\n\t\tstop\n\t};\n}\n\n//#endregion\n//#region usePointer/index.ts\nconst defaultState = {\n\tx: 0,\n\ty: 0,\n\tpointerId: 0,\n\tpressure: 0,\n\ttiltX: 0,\n\ttiltY: 0,\n\twidth: 0,\n\theight: 0,\n\ttwist: 0,\n\tpointerType: null\n};\nconst keys = /* @__PURE__ */ Object.keys(defaultState);\n/**\n* Reactive pointer state.\n*\n* @see https://vueuse.org/usePointer\n* @param options\n*/\nfunction usePointer(options = {}) {\n\tconst { target = defaultWindow } = options;\n\tconst isInside = shallowRef(false);\n\tconst state = shallowRef(options.initialValue || {});\n\tObject.assign(state.value, defaultState, state.value);\n\tconst handler = (event) => {\n\t\tisInside.value = true;\n\t\tif (options.pointerTypes && !options.pointerTypes.includes(event.pointerType)) return;\n\t\tstate.value = objectPick(event, keys, false);\n\t};\n\tif (target) {\n\t\tconst listenerOptions = { passive: true };\n\t\tuseEventListener(target, [\n\t\t\t\"pointerdown\",\n\t\t\t\"pointermove\",\n\t\t\t\"pointerup\"\n\t\t], handler, listenerOptions);\n\t\tuseEventListener(target, \"pointerleave\", () => isInside.value = false, listenerOptions);\n\t}\n\treturn {\n\t\t...toRefs(state),\n\t\tisInside\n\t};\n}\n\n//#endregion\n//#region usePointerLock/index.ts\n/**\n* Reactive pointer lock.\n*\n* @see https://vueuse.org/usePointerLock\n* @param target\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction usePointerLock(target, options = {}) {\n\tconst { document: document$1 = defaultDocument } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => document$1 && \"pointerLockElement\" in document$1);\n\tconst element = shallowRef();\n\tconst triggerElement = shallowRef();\n\tlet targetElement;\n\tif (isSupported.value) {\n\t\tconst listenerOptions = { passive: true };\n\t\tuseEventListener(document$1, \"pointerlockchange\", () => {\n\t\t\tvar _pointerLockElement;\n\t\t\tconst currentElement = (_pointerLockElement = document$1.pointerLockElement) !== null && _pointerLockElement !== void 0 ? _pointerLockElement : element.value;\n\t\t\tif (targetElement && currentElement === targetElement) {\n\t\t\t\telement.value = document$1.pointerLockElement;\n\t\t\t\tif (!element.value) targetElement = triggerElement.value = null;\n\t\t\t}\n\t\t}, listenerOptions);\n\t\tuseEventListener(document$1, \"pointerlockerror\", () => {\n\t\t\tvar _pointerLockElement2;\n\t\t\tconst currentElement = (_pointerLockElement2 = document$1.pointerLockElement) !== null && _pointerLockElement2 !== void 0 ? _pointerLockElement2 : element.value;\n\t\t\tif (targetElement && currentElement === targetElement) {\n\t\t\t\tconst action = document$1.pointerLockElement ? \"release\" : \"acquire\";\n\t\t\t\tthrow new Error(`Failed to ${action} pointer lock.`);\n\t\t\t}\n\t\t}, listenerOptions);\n\t}\n\tasync function lock(e) {\n\t\tvar _unrefElement;\n\t\tif (!isSupported.value) throw new Error(\"Pointer Lock API is not supported by your browser.\");\n\t\ttriggerElement.value = e instanceof Event ? e.currentTarget : null;\n\t\ttargetElement = e instanceof Event ? (_unrefElement = unrefElement(target)) !== null && _unrefElement !== void 0 ? _unrefElement : triggerElement.value : unrefElement(e);\n\t\tif (!targetElement) throw new Error(\"Target element undefined.\");\n\t\ttargetElement.requestPointerLock();\n\t\treturn await until(element).toBe(targetElement);\n\t}\n\tasync function unlock() {\n\t\tif (!element.value) return false;\n\t\tdocument$1.exitPointerLock();\n\t\tawait until(element).toBeNull();\n\t\treturn true;\n\t}\n\treturn {\n\t\tisSupported,\n\t\telement,\n\t\ttriggerElement,\n\t\tlock,\n\t\tunlock\n\t};\n}\n\n//#endregion\n//#region usePointerSwipe/index.ts\n/**\n* Reactive swipe detection based on PointerEvents.\n*\n* @see https://vueuse.org/usePointerSwipe\n* @param target\n* @param options\n*/\nfunction usePointerSwipe(target, options = {}) {\n\tconst targetRef = toRef(target);\n\tconst { threshold = 50, onSwipe, onSwipeEnd, onSwipeStart, disableTextSelect = false } = options;\n\tconst posStart = reactive({\n\t\tx: 0,\n\t\ty: 0\n\t});\n\tconst updatePosStart = (x, y) => {\n\t\tposStart.x = x;\n\t\tposStart.y = y;\n\t};\n\tconst posEnd = reactive({\n\t\tx: 0,\n\t\ty: 0\n\t});\n\tconst updatePosEnd = (x, y) => {\n\t\tposEnd.x = x;\n\t\tposEnd.y = y;\n\t};\n\tconst distanceX = computed(() => posStart.x - posEnd.x);\n\tconst distanceY = computed(() => posStart.y - posEnd.y);\n\tconst { max, abs } = Math;\n\tconst isThresholdExceeded = computed(() => max(abs(distanceX.value), abs(distanceY.value)) >= threshold);\n\tconst isSwiping = shallowRef(false);\n\tconst isPointerDown = shallowRef(false);\n\tconst direction = computed(() => {\n\t\tif (!isThresholdExceeded.value) return \"none\";\n\t\tif (abs(distanceX.value) > abs(distanceY.value)) return distanceX.value > 0 ? \"left\" : \"right\";\n\t\telse return distanceY.value > 0 ? \"up\" : \"down\";\n\t});\n\tconst eventIsAllowed = (e) => {\n\t\tvar _ref, _options$pointerTypes, _options$pointerTypes2;\n\t\tconst isReleasingButton = e.buttons === 0;\n\t\tconst isPrimaryButton = e.buttons === 1;\n\t\treturn (_ref = (_options$pointerTypes = (_options$pointerTypes2 = options.pointerTypes) === null || _options$pointerTypes2 === void 0 ? void 0 : _options$pointerTypes2.includes(e.pointerType)) !== null && _options$pointerTypes !== void 0 ? _options$pointerTypes : isReleasingButton || isPrimaryButton) !== null && _ref !== void 0 ? _ref : true;\n\t};\n\tconst listenerOptions = { passive: true };\n\tconst stops = [\n\t\tuseEventListener(target, \"pointerdown\", (e) => {\n\t\t\tif (!eventIsAllowed(e)) return;\n\t\t\tisPointerDown.value = true;\n\t\t\tconst eventTarget = e.target;\n\t\t\teventTarget === null || eventTarget === void 0 || eventTarget.setPointerCapture(e.pointerId);\n\t\t\tconst { clientX: x, clientY: y } = e;\n\t\t\tupdatePosStart(x, y);\n\t\t\tupdatePosEnd(x, y);\n\t\t\tonSwipeStart === null || onSwipeStart === void 0 || onSwipeStart(e);\n\t\t}, listenerOptions),\n\t\tuseEventListener(target, \"pointermove\", (e) => {\n\t\t\tif (!eventIsAllowed(e)) return;\n\t\t\tif (!isPointerDown.value) return;\n\t\t\tconst { clientX: x, clientY: y } = e;\n\t\t\tupdatePosEnd(x, y);\n\t\t\tif (!isSwiping.value && isThresholdExceeded.value) isSwiping.value = true;\n\t\t\tif (isSwiping.value) onSwipe === null || onSwipe === void 0 || onSwipe(e);\n\t\t}, listenerOptions),\n\t\tuseEventListener(target, \"pointerup\", (e) => {\n\t\t\tif (!eventIsAllowed(e)) return;\n\t\t\tif (isSwiping.value) onSwipeEnd === null || onSwipeEnd === void 0 || onSwipeEnd(e, direction.value);\n\t\t\tisPointerDown.value = false;\n\t\t\tisSwiping.value = false;\n\t\t}, listenerOptions)\n\t];\n\ttryOnMounted(() => {\n\t\tvar _targetRef$value;\n\t\t(_targetRef$value = targetRef.value) === null || _targetRef$value === void 0 || (_targetRef$value = _targetRef$value.style) === null || _targetRef$value === void 0 || _targetRef$value.setProperty(\"touch-action\", \"pan-y\");\n\t\tif (disableTextSelect) {\n\t\t\tvar _targetRef$value2, _targetRef$value3, _targetRef$value4;\n\t\t\t(_targetRef$value2 = targetRef.value) === null || _targetRef$value2 === void 0 || (_targetRef$value2 = _targetRef$value2.style) === null || _targetRef$value2 === void 0 || _targetRef$value2.setProperty(\"-webkit-user-select\", \"none\");\n\t\t\t(_targetRef$value3 = targetRef.value) === null || _targetRef$value3 === void 0 || (_targetRef$value3 = _targetRef$value3.style) === null || _targetRef$value3 === void 0 || _targetRef$value3.setProperty(\"-ms-user-select\", \"none\");\n\t\t\t(_targetRef$value4 = targetRef.value) === null || _targetRef$value4 === void 0 || (_targetRef$value4 = _targetRef$value4.style) === null || _targetRef$value4 === void 0 || _targetRef$value4.setProperty(\"user-select\", \"none\");\n\t\t}\n\t});\n\tconst stop = () => stops.forEach((s) => s());\n\treturn {\n\t\tisSwiping: readonly(isSwiping),\n\t\tdirection: readonly(direction),\n\t\tposStart: readonly(posStart),\n\t\tposEnd: readonly(posEnd),\n\t\tdistanceX,\n\t\tdistanceY,\n\t\tstop\n\t};\n}\n\n//#endregion\n//#region usePreferredColorScheme/index.ts\n/**\n* Reactive prefers-color-scheme media query.\n*\n* @see https://vueuse.org/usePreferredColorScheme\n* @param [options]\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction usePreferredColorScheme(options) {\n\tconst isLight = useMediaQuery(\"(prefers-color-scheme: light)\", options);\n\tconst isDark = useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n\treturn computed(() => {\n\t\tif (isDark.value) return \"dark\";\n\t\tif (isLight.value) return \"light\";\n\t\treturn \"no-preference\";\n\t});\n}\n\n//#endregion\n//#region usePreferredContrast/index.ts\n/**\n* Reactive prefers-contrast media query.\n*\n* @see https://vueuse.org/usePreferredContrast\n* @param [options]\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction usePreferredContrast(options) {\n\tconst isMore = useMediaQuery(\"(prefers-contrast: more)\", options);\n\tconst isLess = useMediaQuery(\"(prefers-contrast: less)\", options);\n\tconst isCustom = useMediaQuery(\"(prefers-contrast: custom)\", options);\n\treturn computed(() => {\n\t\tif (isMore.value) return \"more\";\n\t\tif (isLess.value) return \"less\";\n\t\tif (isCustom.value) return \"custom\";\n\t\treturn \"no-preference\";\n\t});\n}\n\n//#endregion\n//#region usePreferredLanguages/index.ts\n/**\n* Reactive Navigator Languages.\n*\n* @see https://vueuse.org/usePreferredLanguages\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction usePreferredLanguages(options = {}) {\n\tconst { window: window$1 = defaultWindow } = options;\n\tif (!window$1) return shallowRef([\"en\"]);\n\tconst navigator$1 = window$1.navigator;\n\tconst value = shallowRef(navigator$1.languages);\n\tuseEventListener(window$1, \"languagechange\", () => {\n\t\tvalue.value = navigator$1.languages;\n\t}, { passive: true });\n\treturn value;\n}\n\n//#endregion\n//#region usePreferredReducedMotion/index.ts\n/**\n* Reactive prefers-reduced-motion media query.\n*\n* @see https://vueuse.org/usePreferredReducedMotion\n* @param [options]\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction usePreferredReducedMotion(options) {\n\tconst isReduced = useMediaQuery(\"(prefers-reduced-motion: reduce)\", options);\n\treturn computed(() => {\n\t\tif (isReduced.value) return \"reduce\";\n\t\treturn \"no-preference\";\n\t});\n}\n\n//#endregion\n//#region usePreferredReducedTransparency/index.ts\n/**\n* Reactive prefers-reduced-transparency media query.\n*\n* @see https://vueuse.org/usePreferredReducedTransparency\n* @param [options]\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction usePreferredReducedTransparency(options) {\n\tconst isReduced = useMediaQuery(\"(prefers-reduced-transparency: reduce)\", options);\n\treturn computed(() => {\n\t\tif (isReduced.value) return \"reduce\";\n\t\treturn \"no-preference\";\n\t});\n}\n\n//#endregion\n//#region usePrevious/index.ts\nfunction usePrevious(value, initialValue) {\n\tconst previous = shallowRef(initialValue);\n\twatch(toRef(value), (_, oldValue) => {\n\t\tprevious.value = oldValue;\n\t}, { flush: \"sync\" });\n\treturn readonly(previous);\n}\n\n//#endregion\n//#region useScreenSafeArea/index.ts\nconst topVarName = \"--vueuse-safe-area-top\";\nconst rightVarName = \"--vueuse-safe-area-right\";\nconst bottomVarName = \"--vueuse-safe-area-bottom\";\nconst leftVarName = \"--vueuse-safe-area-left\";\n/**\n* Reactive `env(safe-area-inset-*)`\n*\n* @see https://vueuse.org/useScreenSafeArea\n*/\nfunction useScreenSafeArea() {\n\tconst top = shallowRef(\"\");\n\tconst right = shallowRef(\"\");\n\tconst bottom = shallowRef(\"\");\n\tconst left = shallowRef(\"\");\n\tif (isClient) {\n\t\tconst topCssVar = useCssVar(topVarName);\n\t\tconst rightCssVar = useCssVar(rightVarName);\n\t\tconst bottomCssVar = useCssVar(bottomVarName);\n\t\tconst leftCssVar = useCssVar(leftVarName);\n\t\ttopCssVar.value = \"env(safe-area-inset-top, 0px)\";\n\t\trightCssVar.value = \"env(safe-area-inset-right, 0px)\";\n\t\tbottomCssVar.value = \"env(safe-area-inset-bottom, 0px)\";\n\t\tleftCssVar.value = \"env(safe-area-inset-left, 0px)\";\n\t\ttryOnMounted(update);\n\t\tuseEventListener(\"resize\", useDebounceFn(update), { passive: true });\n\t}\n\tfunction update() {\n\t\ttop.value = getValue(topVarName);\n\t\tright.value = getValue(rightVarName);\n\t\tbottom.value = getValue(bottomVarName);\n\t\tleft.value = getValue(leftVarName);\n\t}\n\treturn {\n\t\ttop,\n\t\tright,\n\t\tbottom,\n\t\tleft,\n\t\tupdate\n\t};\n}\nfunction getValue(position) {\n\treturn getComputedStyle(document.documentElement).getPropertyValue(position);\n}\n\n//#endregion\n//#region useScriptTag/index.ts\n/**\n* Async script tag loading.\n*\n* @see https://vueuse.org/useScriptTag\n* @param src\n* @param onLoaded\n* @param options\n*/\nfunction useScriptTag(src, onLoaded = noop, options = {}) {\n\tconst { immediate = true, manual = false, type = \"text/javascript\", async = true, crossOrigin, referrerPolicy, noModule, defer, document: document$1 = defaultDocument, attrs = {}, nonce = void 0 } = options;\n\tconst scriptTag = shallowRef(null);\n\tlet _promise = null;\n\t/**\n\t* Load the script specified via `src`.\n\t*\n\t* @param waitForScriptLoad Whether if the Promise should resolve once the \"load\" event is emitted by the <script> attribute, or right after appending it to the DOM.\n\t* @returns Promise<HTMLScriptElement>\n\t*/\n\tconst loadScript = (waitForScriptLoad) => new Promise((resolve, reject) => {\n\t\tconst resolveWithElement = (el$1) => {\n\t\t\tscriptTag.value = el$1;\n\t\t\tresolve(el$1);\n\t\t\treturn el$1;\n\t\t};\n\t\tif (!document$1) {\n\t\t\tresolve(false);\n\t\t\treturn;\n\t\t}\n\t\tlet shouldAppend = false;\n\t\tlet el = document$1.querySelector(`script[src=\"${toValue(src)}\"]`);\n\t\tif (!el) {\n\t\t\tel = document$1.createElement(\"script\");\n\t\t\tel.type = type;\n\t\t\tel.async = async;\n\t\t\tel.src = toValue(src);\n\t\t\tif (defer) el.defer = defer;\n\t\t\tif (crossOrigin) el.crossOrigin = crossOrigin;\n\t\t\tif (noModule) el.noModule = noModule;\n\t\t\tif (referrerPolicy) el.referrerPolicy = referrerPolicy;\n\t\t\tif (nonce) el.nonce = nonce;\n\t\t\tObject.entries(attrs).forEach(([name, value]) => el === null || el === void 0 ? void 0 : el.setAttribute(name, value));\n\t\t\tshouldAppend = true;\n\t\t} else if (el.hasAttribute(\"data-loaded\")) resolveWithElement(el);\n\t\tconst listenerOptions = { passive: true };\n\t\tuseEventListener(el, \"error\", (event) => reject(event), listenerOptions);\n\t\tuseEventListener(el, \"abort\", (event) => reject(event), listenerOptions);\n\t\tuseEventListener(el, \"load\", () => {\n\t\t\tel.setAttribute(\"data-loaded\", \"true\");\n\t\t\tonLoaded(el);\n\t\t\tresolveWithElement(el);\n\t\t}, listenerOptions);\n\t\tif (shouldAppend) el = document$1.head.appendChild(el);\n\t\tif (!waitForScriptLoad) resolveWithElement(el);\n\t});\n\t/**\n\t* Exposed singleton wrapper for `loadScript`, avoiding calling it twice.\n\t*\n\t* @param waitForScriptLoad Whether if the Promise should resolve once the \"load\" event is emitted by the <script> attribute, or right after appending it to the DOM.\n\t* @returns Promise<HTMLScriptElement>\n\t*/\n\tconst load = (waitForScriptLoad = true) => {\n\t\tif (!_promise) _promise = loadScript(waitForScriptLoad);\n\t\treturn _promise;\n\t};\n\t/**\n\t* Unload the script specified by `src`.\n\t*/\n\tconst unload = () => {\n\t\tif (!document$1) return;\n\t\t_promise = null;\n\t\tif (scriptTag.value) scriptTag.value = null;\n\t\tconst el = document$1.querySelector(`script[src=\"${toValue(src)}\"]`);\n\t\tif (el) document$1.head.removeChild(el);\n\t};\n\tif (immediate && !manual) tryOnMounted(load);\n\tif (!manual) tryOnUnmounted(unload);\n\treturn {\n\t\tscriptTag,\n\t\tload,\n\t\tunload\n\t};\n}\n\n//#endregion\n//#region useScrollLock/index.ts\nfunction checkOverflowScroll(ele) {\n\tconst style = window.getComputedStyle(ele);\n\tif (style.overflowX === \"scroll\" || style.overflowY === \"scroll\" || style.overflowX === \"auto\" && ele.clientWidth < ele.scrollWidth || style.overflowY === \"auto\" && ele.clientHeight < ele.scrollHeight) return true;\n\telse {\n\t\tconst parent = ele.parentNode;\n\t\tif (!parent || parent.tagName === \"BODY\") return false;\n\t\treturn checkOverflowScroll(parent);\n\t}\n}\nfunction preventDefault(rawEvent) {\n\tconst e = rawEvent || window.event;\n\tconst _target = e.target;\n\tif (checkOverflowScroll(_target)) return false;\n\tif (e.touches.length > 1) return true;\n\tif (e.preventDefault) e.preventDefault();\n\treturn false;\n}\nconst elInitialOverflow = /* @__PURE__ */ new WeakMap();\n/**\n* Lock scrolling of the element.\n*\n* @see https://vueuse.org/useScrollLock\n* @param element\n*/\nfunction useScrollLock(element, initialState = false) {\n\tconst isLocked = shallowRef(initialState);\n\tlet stopTouchMoveListener = null;\n\tlet initialOverflow = \"\";\n\twatch(toRef(element), (el) => {\n\t\tconst target = resolveElement(toValue(el));\n\t\tif (target) {\n\t\t\tconst ele = target;\n\t\t\tif (!elInitialOverflow.get(ele)) elInitialOverflow.set(ele, ele.style.overflow);\n\t\t\tif (ele.style.overflow !== \"hidden\") initialOverflow = ele.style.overflow;\n\t\t\tif (ele.style.overflow === \"hidden\") return isLocked.value = true;\n\t\t\tif (isLocked.value) return ele.style.overflow = \"hidden\";\n\t\t}\n\t}, { immediate: true });\n\tconst lock = () => {\n\t\tconst el = resolveElement(toValue(element));\n\t\tif (!el || isLocked.value) return;\n\t\tif (isIOS) stopTouchMoveListener = useEventListener(el, \"touchmove\", (e) => {\n\t\t\tpreventDefault(e);\n\t\t}, { passive: false });\n\t\tel.style.overflow = \"hidden\";\n\t\tisLocked.value = true;\n\t};\n\tconst unlock = () => {\n\t\tconst el = resolveElement(toValue(element));\n\t\tif (!el || !isLocked.value) return;\n\t\tif (isIOS) stopTouchMoveListener === null || stopTouchMoveListener === void 0 || stopTouchMoveListener();\n\t\tel.style.overflow = initialOverflow;\n\t\telInitialOverflow.delete(el);\n\t\tisLocked.value = false;\n\t};\n\ttryOnScopeDispose(unlock);\n\treturn computed({\n\t\tget() {\n\t\t\treturn isLocked.value;\n\t\t},\n\t\tset(v) {\n\t\t\tif (v) lock();\n\t\t\telse unlock();\n\t\t}\n\t});\n}\n\n//#endregion\n//#region useSessionStorage/index.ts\n/**\n* Reactive SessionStorage.\n*\n* @see https://vueuse.org/useSessionStorage\n* @param key\n* @param initialValue\n* @param options\n*/\nfunction useSessionStorage(key, initialValue, options = {}) {\n\tconst { window: window$1 = defaultWindow } = options;\n\treturn useStorage(key, initialValue, window$1 === null || window$1 === void 0 ? void 0 : window$1.sessionStorage, options);\n}\n\n//#endregion\n//#region useShare/index.ts\n/**\n* Reactive Web Share API.\n*\n* @see https://vueuse.org/useShare\n* @param shareOptions\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useShare(shareOptions = {}, options = {}) {\n\tconst { navigator: navigator$1 = defaultNavigator } = options;\n\tconst _navigator = navigator$1;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => _navigator && \"canShare\" in _navigator);\n\tconst share = async (overrideOptions = {}) => {\n\t\tif (isSupported.value) {\n\t\t\tconst data = {\n\t\t\t\t...toValue(shareOptions),\n\t\t\t\t...toValue(overrideOptions)\n\t\t\t};\n\t\t\tlet granted = false;\n\t\t\tif (_navigator.canShare) granted = _navigator.canShare(data);\n\t\t\tif (granted) return _navigator.share(data);\n\t\t}\n\t};\n\treturn {\n\t\tisSupported,\n\t\tshare\n\t};\n}\n\n//#endregion\n//#region useSorted/index.ts\nconst defaultSortFn = (source, compareFn) => source.sort(compareFn);\nconst defaultCompare = (a, b) => a - b;\nfunction useSorted(...args) {\n\tconst [source] = args;\n\tlet compareFn = defaultCompare;\n\tlet options = {};\n\tif (args.length === 2) if (typeof args[1] === \"object\") {\n\t\tvar _options$compareFn;\n\t\toptions = args[1];\n\t\tcompareFn = (_options$compareFn = options.compareFn) !== null && _options$compareFn !== void 0 ? _options$compareFn : defaultCompare;\n\t} else {\n\t\tvar _args$;\n\t\tcompareFn = (_args$ = args[1]) !== null && _args$ !== void 0 ? _args$ : defaultCompare;\n\t}\n\telse if (args.length > 2) {\n\t\tvar _args$2, _args$3;\n\t\tcompareFn = (_args$2 = args[1]) !== null && _args$2 !== void 0 ? _args$2 : defaultCompare;\n\t\toptions = (_args$3 = args[2]) !== null && _args$3 !== void 0 ? _args$3 : {};\n\t}\n\tconst { dirty = false, sortFn = defaultSortFn } = options;\n\tif (!dirty) return computed(() => sortFn([...toValue(source)], compareFn));\n\twatchEffect(() => {\n\t\tconst result = sortFn(toValue(source), compareFn);\n\t\tif (isRef(source)) source.value = result;\n\t\telse source.splice(0, source.length, ...result);\n\t});\n\treturn source;\n}\n\n//#endregion\n//#region useSpeechRecognition/index.ts\n/**\n* Reactive SpeechRecognition.\n*\n* @see https://vueuse.org/useSpeechRecognition\n* @see https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition SpeechRecognition\n* @param options\n*/\nfunction useSpeechRecognition(options = {}) {\n\tconst { interimResults = true, continuous = true, maxAlternatives = 1, window: window$1 = defaultWindow } = options;\n\tconst lang = toRef(options.lang || \"en-US\");\n\tconst isListening = shallowRef(false);\n\tconst isFinal = shallowRef(false);\n\tconst result = shallowRef(\"\");\n\tconst error = shallowRef(void 0);\n\tlet recognition;\n\tconst start = () => {\n\t\tisListening.value = true;\n\t};\n\tconst stop = () => {\n\t\tisListening.value = false;\n\t};\n\tconst toggle = (value = !isListening.value) => {\n\t\tif (value) start();\n\t\telse stop();\n\t};\n\tconst SpeechRecognition = window$1 && (window$1.SpeechRecognition || window$1.webkitSpeechRecognition);\n\tconst isSupported = /* @__PURE__ */ useSupported(() => SpeechRecognition);\n\tif (isSupported.value) {\n\t\trecognition = new SpeechRecognition();\n\t\trecognition.continuous = continuous;\n\t\trecognition.interimResults = interimResults;\n\t\trecognition.lang = toValue(lang);\n\t\trecognition.maxAlternatives = maxAlternatives;\n\t\trecognition.onstart = () => {\n\t\t\tisListening.value = true;\n\t\t\tisFinal.value = false;\n\t\t};\n\t\twatch(lang, (lang$1) => {\n\t\t\tif (recognition && !isListening.value) recognition.lang = lang$1;\n\t\t});\n\t\trecognition.onresult = (event) => {\n\t\t\tconst currentResult = event.results[event.resultIndex];\n\t\t\tconst { transcript } = currentResult[0];\n\t\t\tisFinal.value = currentResult.isFinal;\n\t\t\tresult.value = transcript;\n\t\t\terror.value = void 0;\n\t\t};\n\t\trecognition.onerror = (event) => {\n\t\t\terror.value = event;\n\t\t};\n\t\trecognition.onend = () => {\n\t\t\tisListening.value = false;\n\t\t\trecognition.lang = toValue(lang);\n\t\t};\n\t\twatch(isListening, (newValue, oldValue) => {\n\t\t\tif (newValue === oldValue) return;\n\t\t\ttry {\n\t\t\t\tif (newValue) recognition.start();\n\t\t\t\telse recognition.stop();\n\t\t\t} catch (err) {\n\t\t\t\terror.value = err;\n\t\t\t}\n\t\t});\n\t}\n\ttryOnScopeDispose(() => {\n\t\tstop();\n\t});\n\treturn {\n\t\tisSupported,\n\t\tisListening,\n\t\tisFinal,\n\t\trecognition,\n\t\tresult,\n\t\terror,\n\t\ttoggle,\n\t\tstart,\n\t\tstop\n\t};\n}\n\n//#endregion\n//#region useSpeechSynthesis/index.ts\n/**\n* Reactive SpeechSynthesis.\n*\n* @see https://vueuse.org/useSpeechSynthesis\n* @see https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis SpeechSynthesis\n*/\nfunction useSpeechSynthesis(text, options = {}) {\n\tconst { pitch = 1, rate = 1, volume = 1, window: window$1 = defaultWindow, onBoundary } = options;\n\tconst synth = window$1 && window$1.speechSynthesis;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => synth);\n\tconst isPlaying = shallowRef(false);\n\tconst status = shallowRef(\"init\");\n\tconst spokenText = toRef(text || \"\");\n\tconst lang = toRef(options.lang || \"en-US\");\n\tconst error = shallowRef(void 0);\n\tconst toggle = (value = !isPlaying.value) => {\n\t\tisPlaying.value = value;\n\t};\n\tconst bindEventsForUtterance = (utterance$1) => {\n\t\tutterance$1.lang = toValue(lang);\n\t\tutterance$1.voice = toValue(options.voice) || null;\n\t\tutterance$1.pitch = toValue(pitch);\n\t\tutterance$1.rate = toValue(rate);\n\t\tutterance$1.volume = toValue(volume);\n\t\tutterance$1.onstart = () => {\n\t\t\tisPlaying.value = true;\n\t\t\tstatus.value = \"play\";\n\t\t};\n\t\tutterance$1.onpause = () => {\n\t\t\tisPlaying.value = false;\n\t\t\tstatus.value = \"pause\";\n\t\t};\n\t\tutterance$1.onresume = () => {\n\t\t\tisPlaying.value = true;\n\t\t\tstatus.value = \"play\";\n\t\t};\n\t\tutterance$1.onend = () => {\n\t\t\tisPlaying.value = false;\n\t\t\tstatus.value = \"end\";\n\t\t};\n\t\tutterance$1.onerror = (event) => {\n\t\t\terror.value = event;\n\t\t};\n\t\tutterance$1.onboundary = (event) => {\n\t\t\tonBoundary === null || onBoundary === void 0 || onBoundary(event);\n\t\t};\n\t};\n\tconst utterance = computed(() => {\n\t\tisPlaying.value = false;\n\t\tstatus.value = \"init\";\n\t\tconst newUtterance = new SpeechSynthesisUtterance(spokenText.value);\n\t\tbindEventsForUtterance(newUtterance);\n\t\treturn newUtterance;\n\t});\n\tconst speak = () => {\n\t\tsynth.cancel();\n\t\tif (utterance) synth.speak(utterance.value);\n\t};\n\tconst stop = () => {\n\t\tsynth.cancel();\n\t\tisPlaying.value = false;\n\t};\n\tif (isSupported.value) {\n\t\tbindEventsForUtterance(utterance.value);\n\t\twatch(lang, (lang$1) => {\n\t\t\tif (utterance.value && !isPlaying.value) utterance.value.lang = lang$1;\n\t\t});\n\t\tif (options.voice) watch(options.voice, () => {\n\t\t\tsynth.cancel();\n\t\t});\n\t\twatch(isPlaying, () => {\n\t\t\tif (isPlaying.value) synth.resume();\n\t\t\telse synth.pause();\n\t\t});\n\t}\n\ttryOnScopeDispose(() => {\n\t\tisPlaying.value = false;\n\t});\n\treturn {\n\t\tisSupported,\n\t\tisPlaying,\n\t\tstatus,\n\t\tutterance,\n\t\terror,\n\t\tstop,\n\t\ttoggle,\n\t\tspeak\n\t};\n}\n\n//#endregion\n//#region useStepper/index.ts\n/* @__NO_SIDE_EFFECTS__ */\nfunction useStepper(steps, initialStep) {\n\tconst stepsRef = ref(steps);\n\tconst stepNames = computed(() => Array.isArray(stepsRef.value) ? stepsRef.value : Object.keys(stepsRef.value));\n\tconst index = ref(stepNames.value.indexOf(initialStep !== null && initialStep !== void 0 ? initialStep : stepNames.value[0]));\n\tconst current = computed(() => at(index.value));\n\tconst isFirst = computed(() => index.value === 0);\n\tconst isLast = computed(() => index.value === stepNames.value.length - 1);\n\tconst next = computed(() => stepNames.value[index.value + 1]);\n\tconst previous = computed(() => stepNames.value[index.value - 1]);\n\tfunction at(index$1) {\n\t\tif (Array.isArray(stepsRef.value)) return stepsRef.value[index$1];\n\t\treturn stepsRef.value[stepNames.value[index$1]];\n\t}\n\tfunction get(step) {\n\t\tif (!stepNames.value.includes(step)) return;\n\t\treturn at(stepNames.value.indexOf(step));\n\t}\n\tfunction goTo(step) {\n\t\tif (stepNames.value.includes(step)) index.value = stepNames.value.indexOf(step);\n\t}\n\tfunction goToNext() {\n\t\tif (isLast.value) return;\n\t\tindex.value++;\n\t}\n\tfunction goToPrevious() {\n\t\tif (isFirst.value) return;\n\t\tindex.value--;\n\t}\n\tfunction goBackTo(step) {\n\t\tif (isAfter(step)) goTo(step);\n\t}\n\tfunction isNext(step) {\n\t\treturn stepNames.value.indexOf(step) === index.value + 1;\n\t}\n\tfunction isPrevious(step) {\n\t\treturn stepNames.value.indexOf(step) === index.value - 1;\n\t}\n\tfunction isCurrent(step) {\n\t\treturn stepNames.value.indexOf(step) === index.value;\n\t}\n\tfunction isBefore(step) {\n\t\treturn index.value < stepNames.value.indexOf(step);\n\t}\n\tfunction isAfter(step) {\n\t\treturn index.value > stepNames.value.indexOf(step);\n\t}\n\treturn {\n\t\tsteps: stepsRef,\n\t\tstepNames,\n\t\tindex,\n\t\tcurrent,\n\t\tnext,\n\t\tprevious,\n\t\tisFirst,\n\t\tisLast,\n\t\tat,\n\t\tget,\n\t\tgoTo,\n\t\tgoToNext,\n\t\tgoToPrevious,\n\t\tgoBackTo,\n\t\tisNext,\n\t\tisPrevious,\n\t\tisCurrent,\n\t\tisBefore,\n\t\tisAfter\n\t};\n}\n\n//#endregion\n//#region useStorageAsync/index.ts\n/**\n* Reactive Storage in with async support.\n*\n* @see https://vueuse.org/useStorageAsync\n* @param key\n* @param initialValue\n* @param storage\n* @param options\n*/\nfunction useStorageAsync(key, initialValue, storage, options = {}) {\n\tvar _options$serializer;\n\tconst { flush = \"pre\", deep = true, listenToStorageChanges = true, writeDefaults = true, mergeDefaults = false, shallow, window: window$1 = defaultWindow, eventFilter, onError = (e) => {\n\t\tconsole.error(e);\n\t}, onReady } = options;\n\tconst rawInit = toValue(initialValue);\n\tconst type = guessSerializerType(rawInit);\n\tconst data = (shallow ? shallowRef : ref)(toValue(initialValue));\n\tconst serializer = (_options$serializer = options.serializer) !== null && _options$serializer !== void 0 ? _options$serializer : StorageSerializers[type];\n\tif (!storage) try {\n\t\tstorage = getSSRHandler(\"getDefaultStorageAsync\", () => defaultWindow === null || defaultWindow === void 0 ? void 0 : defaultWindow.localStorage)();\n\t} catch (e) {\n\t\tonError(e);\n\t}\n\tasync function read(event) {\n\t\tif (!storage || event && event.key !== key) return;\n\t\ttry {\n\t\t\tconst rawValue = event ? event.newValue : await storage.getItem(key);\n\t\t\tif (rawValue == null) {\n\t\t\t\tdata.value = rawInit;\n\t\t\t\tif (writeDefaults && rawInit !== null) await storage.setItem(key, await serializer.write(rawInit));\n\t\t\t} else if (mergeDefaults) {\n\t\t\t\tconst value = await serializer.read(rawValue);\n\t\t\t\tif (typeof mergeDefaults === \"function\") data.value = mergeDefaults(value, rawInit);\n\t\t\t\telse if (type === \"object\" && !Array.isArray(value)) data.value = {\n\t\t\t\t\t...rawInit,\n\t\t\t\t\t...value\n\t\t\t\t};\n\t\t\t\telse data.value = value;\n\t\t\t} else data.value = await serializer.read(rawValue);\n\t\t} catch (e) {\n\t\t\tonError(e);\n\t\t}\n\t}\n\tconst promise = new Promise((resolve) => {\n\t\tread().then(() => {\n\t\t\tonReady === null || onReady === void 0 || onReady(data.value);\n\t\t\tresolve(data);\n\t\t});\n\t});\n\tif (window$1 && listenToStorageChanges) useEventListener(window$1, \"storage\", (e) => Promise.resolve().then(() => read(e)), { passive: true });\n\tif (storage) watchWithFilter(data, async () => {\n\t\ttry {\n\t\t\tif (data.value == null) await storage.removeItem(key);\n\t\t\telse await storage.setItem(key, await serializer.write(data.value));\n\t\t} catch (e) {\n\t\t\tonError(e);\n\t\t}\n\t}, {\n\t\tflush,\n\t\tdeep,\n\t\teventFilter\n\t});\n\tObject.assign(data, {\n\t\tthen: promise.then.bind(promise),\n\t\tcatch: promise.catch.bind(promise)\n\t});\n\treturn data;\n}\n\n//#endregion\n//#region useStyleTag/index.ts\nlet _id = 0;\n/**\n* Inject <style> element in head.\n*\n* Overload: Omitted id\n*\n* @see https://vueuse.org/useStyleTag\n* @param css\n* @param options\n*/\nfunction useStyleTag(css, options = {}) {\n\tconst isLoaded = shallowRef(false);\n\tconst { document: document$1 = defaultDocument, immediate = true, manual = false, id = `vueuse_styletag_${++_id}` } = options;\n\tconst cssRef = shallowRef(css);\n\tlet stop = () => {};\n\tconst load = () => {\n\t\tif (!document$1) return;\n\t\tconst el = document$1.getElementById(id) || document$1.createElement(\"style\");\n\t\tif (!el.isConnected) {\n\t\t\tel.id = id;\n\t\t\tif (options.nonce) el.nonce = options.nonce;\n\t\t\tif (options.media) el.media = options.media;\n\t\t\tdocument$1.head.appendChild(el);\n\t\t}\n\t\tif (isLoaded.value) return;\n\t\tstop = watch(cssRef, (value) => {\n\t\t\tel.textContent = value;\n\t\t}, { immediate: true });\n\t\tisLoaded.value = true;\n\t};\n\tconst unload = () => {\n\t\tif (!document$1 || !isLoaded.value) return;\n\t\tstop();\n\t\tdocument$1.head.removeChild(document$1.getElementById(id));\n\t\tisLoaded.value = false;\n\t};\n\tif (immediate && !manual) tryOnMounted(load);\n\tif (!manual) tryOnScopeDispose(unload);\n\treturn {\n\t\tid,\n\t\tcss: cssRef,\n\t\tunload,\n\t\tload,\n\t\tisLoaded: readonly(isLoaded)\n\t};\n}\n\n//#endregion\n//#region useSwipe/index.ts\n/**\n* Reactive swipe detection.\n*\n* @see https://vueuse.org/useSwipe\n* @param target\n* @param options\n*/\nfunction useSwipe(target, options = {}) {\n\tconst { threshold = 50, onSwipe, onSwipeEnd, onSwipeStart, passive = true } = options;\n\tconst coordsStart = reactive({\n\t\tx: 0,\n\t\ty: 0\n\t});\n\tconst coordsEnd = reactive({\n\t\tx: 0,\n\t\ty: 0\n\t});\n\tconst diffX = computed(() => coordsStart.x - coordsEnd.x);\n\tconst diffY = computed(() => coordsStart.y - coordsEnd.y);\n\tconst { max, abs } = Math;\n\tconst isThresholdExceeded = computed(() => max(abs(diffX.value), abs(diffY.value)) >= threshold);\n\tconst isSwiping = shallowRef(false);\n\tconst direction = computed(() => {\n\t\tif (!isThresholdExceeded.value) return \"none\";\n\t\tif (abs(diffX.value) > abs(diffY.value)) return diffX.value > 0 ? \"left\" : \"right\";\n\t\telse return diffY.value > 0 ? \"up\" : \"down\";\n\t});\n\tconst getTouchEventCoords = (e) => [e.touches[0].clientX, e.touches[0].clientY];\n\tconst updateCoordsStart = (x, y) => {\n\t\tcoordsStart.x = x;\n\t\tcoordsStart.y = y;\n\t};\n\tconst updateCoordsEnd = (x, y) => {\n\t\tcoordsEnd.x = x;\n\t\tcoordsEnd.y = y;\n\t};\n\tconst listenerOptions = {\n\t\tpassive,\n\t\tcapture: !passive\n\t};\n\tconst onTouchEnd = (e) => {\n\t\tif (isSwiping.value) onSwipeEnd === null || onSwipeEnd === void 0 || onSwipeEnd(e, direction.value);\n\t\tisSwiping.value = false;\n\t};\n\tconst stops = [\n\t\tuseEventListener(target, \"touchstart\", (e) => {\n\t\t\tif (e.touches.length !== 1) return;\n\t\t\tconst [x, y] = getTouchEventCoords(e);\n\t\t\tupdateCoordsStart(x, y);\n\t\t\tupdateCoordsEnd(x, y);\n\t\t\tonSwipeStart === null || onSwipeStart === void 0 || onSwipeStart(e);\n\t\t}, listenerOptions),\n\t\tuseEventListener(target, \"touchmove\", (e) => {\n\t\t\tif (e.touches.length !== 1) return;\n\t\t\tconst [x, y] = getTouchEventCoords(e);\n\t\t\tupdateCoordsEnd(x, y);\n\t\t\tif (listenerOptions.capture && !listenerOptions.passive && Math.abs(diffX.value) > Math.abs(diffY.value)) e.preventDefault();\n\t\t\tif (!isSwiping.value && isThresholdExceeded.value) isSwiping.value = true;\n\t\t\tif (isSwiping.value) onSwipe === null || onSwipe === void 0 || onSwipe(e);\n\t\t}, listenerOptions),\n\t\tuseEventListener(target, [\"touchend\", \"touchcancel\"], onTouchEnd, listenerOptions)\n\t];\n\tconst stop = () => stops.forEach((s) => s());\n\treturn {\n\t\tisSwiping,\n\t\tdirection,\n\t\tcoordsStart,\n\t\tcoordsEnd,\n\t\tlengthX: diffX,\n\t\tlengthY: diffY,\n\t\tstop\n\t};\n}\n\n//#endregion\n//#region useTemplateRefsList/index.ts\n/* @__NO_SIDE_EFFECTS__ */\nfunction useTemplateRefsList() {\n\tconst refs = ref([]);\n\trefs.value.set = (el) => {\n\t\tif (el) refs.value.push(el);\n\t};\n\tonBeforeUpdate(() => {\n\t\trefs.value.length = 0;\n\t});\n\treturn refs;\n}\n\n//#endregion\n//#region useTextDirection/index.ts\n/**\n* Reactive dir of the element's text.\n*\n* @see https://vueuse.org/useTextDirection\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useTextDirection(options = {}) {\n\tconst { document: document$1 = defaultDocument, selector = \"html\", observe = false, initialValue = \"ltr\" } = options;\n\tfunction getValue$1() {\n\t\tvar _ref, _document$querySelect;\n\t\treturn (_ref = document$1 === null || document$1 === void 0 || (_document$querySelect = document$1.querySelector(selector)) === null || _document$querySelect === void 0 ? void 0 : _document$querySelect.getAttribute(\"dir\")) !== null && _ref !== void 0 ? _ref : initialValue;\n\t}\n\tconst dir = ref(getValue$1());\n\ttryOnMounted(() => dir.value = getValue$1());\n\tif (observe && document$1) useMutationObserver(document$1.querySelector(selector), () => dir.value = getValue$1(), { attributes: true });\n\treturn computed({\n\t\tget() {\n\t\t\treturn dir.value;\n\t\t},\n\t\tset(v) {\n\t\t\tvar _document$querySelect2, _document$querySelect3;\n\t\t\tdir.value = v;\n\t\t\tif (!document$1) return;\n\t\t\tif (dir.value) (_document$querySelect2 = document$1.querySelector(selector)) === null || _document$querySelect2 === void 0 || _document$querySelect2.setAttribute(\"dir\", dir.value);\n\t\t\telse (_document$querySelect3 = document$1.querySelector(selector)) === null || _document$querySelect3 === void 0 || _document$querySelect3.removeAttribute(\"dir\");\n\t\t}\n\t});\n}\n\n//#endregion\n//#region useTextSelection/index.ts\nfunction getRangesFromSelection(selection) {\n\tvar _selection$rangeCount;\n\tconst rangeCount = (_selection$rangeCount = selection.rangeCount) !== null && _selection$rangeCount !== void 0 ? _selection$rangeCount : 0;\n\treturn Array.from({ length: rangeCount }, (_, i) => selection.getRangeAt(i));\n}\n/**\n* Reactively track user text selection based on [`Window.getSelection`](https://developer.mozilla.org/en-US/docs/Web/API/Window/getSelection).\n*\n* @see https://vueuse.org/useTextSelection\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useTextSelection(options = {}) {\n\tvar _window$getSelection;\n\tconst { window: window$1 = defaultWindow } = options;\n\tconst selection = shallowRef((_window$getSelection = window$1 === null || window$1 === void 0 ? void 0 : window$1.getSelection()) !== null && _window$getSelection !== void 0 ? _window$getSelection : null);\n\tconst text = computed(() => {\n\t\tvar _selection$value$toSt, _selection$value;\n\t\treturn (_selection$value$toSt = (_selection$value = selection.value) === null || _selection$value === void 0 ? void 0 : _selection$value.toString()) !== null && _selection$value$toSt !== void 0 ? _selection$value$toSt : \"\";\n\t});\n\tconst ranges = computed(() => selection.value ? getRangesFromSelection(selection.value) : []);\n\tconst rects = computed(() => ranges.value.map((range) => range.getBoundingClientRect()));\n\tfunction onSelectionChange() {\n\t\tselection.value = null;\n\t\tif (window$1) selection.value = window$1.getSelection();\n\t}\n\tif (window$1) useEventListener(window$1.document, \"selectionchange\", onSelectionChange, { passive: true });\n\treturn {\n\t\ttext,\n\t\trects,\n\t\tranges,\n\t\tselection\n\t};\n}\n\n//#endregion\n//#region useTextareaAutosize/index.ts\n/**\n* Call window.requestAnimationFrame(), if not available, just call the function\n*\n* @param window\n* @param fn\n*/\nfunction tryRequestAnimationFrame(window$1 = defaultWindow, fn) {\n\tif (window$1 && typeof window$1.requestAnimationFrame === \"function\") window$1.requestAnimationFrame(fn);\n\telse fn();\n}\nfunction useTextareaAutosize(options = {}) {\n\tvar _options$input, _options$styleProp;\n\tconst { window: window$1 = defaultWindow } = options;\n\tconst textarea = toRef(options === null || options === void 0 ? void 0 : options.element);\n\tconst input = toRef((_options$input = options === null || options === void 0 ? void 0 : options.input) !== null && _options$input !== void 0 ? _options$input : \"\");\n\tconst styleProp = (_options$styleProp = options === null || options === void 0 ? void 0 : options.styleProp) !== null && _options$styleProp !== void 0 ? _options$styleProp : \"height\";\n\tconst textareaScrollHeight = shallowRef(1);\n\tconst textareaOldWidth = shallowRef(0);\n\tfunction triggerResize() {\n\t\tvar _textarea$value;\n\t\tif (!textarea.value) return;\n\t\tlet height = \"\";\n\t\ttextarea.value.style[styleProp] = \"1px\";\n\t\ttextareaScrollHeight.value = (_textarea$value = textarea.value) === null || _textarea$value === void 0 ? void 0 : _textarea$value.scrollHeight;\n\t\tconst _styleTarget = toValue(options === null || options === void 0 ? void 0 : options.styleTarget);\n\t\tif (_styleTarget) _styleTarget.style[styleProp] = `${textareaScrollHeight.value}px`;\n\t\telse height = `${textareaScrollHeight.value}px`;\n\t\ttextarea.value.style[styleProp] = height;\n\t}\n\twatch([input, textarea], () => nextTick(triggerResize), { immediate: true });\n\twatch(textareaScrollHeight, () => {\n\t\tvar _options$onResize;\n\t\treturn options === null || options === void 0 || (_options$onResize = options.onResize) === null || _options$onResize === void 0 ? void 0 : _options$onResize.call(options);\n\t});\n\tuseResizeObserver(textarea, ([{ contentRect }]) => {\n\t\tif (textareaOldWidth.value === contentRect.width) return;\n\t\ttryRequestAnimationFrame(window$1, () => {\n\t\t\ttextareaOldWidth.value = contentRect.width;\n\t\t\ttriggerResize();\n\t\t});\n\t});\n\tif (options === null || options === void 0 ? void 0 : options.watch) watch(options.watch, triggerResize, {\n\t\timmediate: true,\n\t\tdeep: true\n\t});\n\treturn {\n\t\ttextarea,\n\t\tinput,\n\t\ttriggerResize\n\t};\n}\n\n//#endregion\n//#region useThrottledRefHistory/index.ts\n/**\n* Shorthand for [useRefHistory](https://vueuse.org/useRefHistory) with throttled filter.\n*\n* @see https://vueuse.org/useThrottledRefHistory\n* @param source\n* @param options\n*/\nfunction useThrottledRefHistory(source, options = {}) {\n\tconst { throttle = 200, trailing = true } = options;\n\tconst filter = throttleFilter(throttle, trailing);\n\treturn { ...useRefHistory(source, {\n\t\t...options,\n\t\teventFilter: filter\n\t}) };\n}\n\n//#endregion\n//#region useTimeAgo/index.ts\nconst DEFAULT_UNITS = [\n\t{\n\t\tmax: 6e4,\n\t\tvalue: 1e3,\n\t\tname: \"second\"\n\t},\n\t{\n\t\tmax: 276e4,\n\t\tvalue: 6e4,\n\t\tname: \"minute\"\n\t},\n\t{\n\t\tmax: 72e6,\n\t\tvalue: 36e5,\n\t\tname: \"hour\"\n\t},\n\t{\n\t\tmax: 5184e5,\n\t\tvalue: 864e5,\n\t\tname: \"day\"\n\t},\n\t{\n\t\tmax: 24192e5,\n\t\tvalue: 6048e5,\n\t\tname: \"week\"\n\t},\n\t{\n\t\tmax: 28512e6,\n\t\tvalue: 2592e6,\n\t\tname: \"month\"\n\t},\n\t{\n\t\tmax: Number.POSITIVE_INFINITY,\n\t\tvalue: 31536e6,\n\t\tname: \"year\"\n\t}\n];\nconst DEFAULT_MESSAGES = {\n\tjustNow: \"just now\",\n\tpast: (n) => n.match(/\\d/) ? `${n} ago` : n,\n\tfuture: (n) => n.match(/\\d/) ? `in ${n}` : n,\n\tmonth: (n, past) => n === 1 ? past ? \"last month\" : \"next month\" : `${n} month${n > 1 ? \"s\" : \"\"}`,\n\tyear: (n, past) => n === 1 ? past ? \"last year\" : \"next year\" : `${n} year${n > 1 ? \"s\" : \"\"}`,\n\tday: (n, past) => n === 1 ? past ? \"yesterday\" : \"tomorrow\" : `${n} day${n > 1 ? \"s\" : \"\"}`,\n\tweek: (n, past) => n === 1 ? past ? \"last week\" : \"next week\" : `${n} week${n > 1 ? \"s\" : \"\"}`,\n\thour: (n) => `${n} hour${n > 1 ? \"s\" : \"\"}`,\n\tminute: (n) => `${n} minute${n > 1 ? \"s\" : \"\"}`,\n\tsecond: (n) => `${n} second${n > 1 ? \"s\" : \"\"}`,\n\tinvalid: \"\"\n};\nfunction DEFAULT_FORMATTER(date) {\n\treturn date.toISOString().slice(0, 10);\n}\n/**\n* Reactive time ago formatter.\n*\n* @see https://vueuse.org/useTimeAgo\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useTimeAgo(time, options = {}) {\n\tconst { controls: exposeControls = false, updateInterval = 3e4 } = options;\n\tconst { now,...controls } = useNow({\n\t\tinterval: updateInterval,\n\t\tcontrols: true\n\t});\n\tconst timeAgo = computed(() => formatTimeAgo(new Date(toValue(time)), options, toValue(now)));\n\tif (exposeControls) return {\n\t\ttimeAgo,\n\t\t...controls\n\t};\n\telse return timeAgo;\n}\nfunction formatTimeAgo(from, options = {}, now = Date.now()) {\n\tconst { max, messages = DEFAULT_MESSAGES, fullDateFormatter = DEFAULT_FORMATTER, units = DEFAULT_UNITS, showSecond = false, rounding = \"round\" } = options;\n\tconst roundFn = typeof rounding === \"number\" ? (n) => +n.toFixed(rounding) : Math[rounding];\n\tconst diff = +now - +from;\n\tconst absDiff = Math.abs(diff);\n\tfunction getValue$1(diff$1, unit) {\n\t\treturn roundFn(Math.abs(diff$1) / unit.value);\n\t}\n\tfunction format(diff$1, unit) {\n\t\tconst val = getValue$1(diff$1, unit);\n\t\tconst past = diff$1 > 0;\n\t\tconst str = applyFormat(unit.name, val, past);\n\t\treturn applyFormat(past ? \"past\" : \"future\", str, past);\n\t}\n\tfunction applyFormat(name, val, isPast) {\n\t\tconst formatter = messages[name];\n\t\tif (typeof formatter === \"function\") return formatter(val, isPast);\n\t\treturn formatter.replace(\"{0}\", val.toString());\n\t}\n\tif (absDiff < 6e4 && !showSecond) return messages.justNow;\n\tif (typeof max === \"number\" && absDiff > max) return fullDateFormatter(new Date(from));\n\tif (typeof max === \"string\") {\n\t\tvar _units$find;\n\t\tconst unitMax = (_units$find = units.find((i) => i.name === max)) === null || _units$find === void 0 ? void 0 : _units$find.max;\n\t\tif (unitMax && absDiff > unitMax) return fullDateFormatter(new Date(from));\n\t}\n\tfor (const [idx, unit] of units.entries()) {\n\t\tif (getValue$1(diff, unit) <= 0 && units[idx - 1]) return format(diff, units[idx - 1]);\n\t\tif (absDiff < unit.max) return format(diff, unit);\n\t}\n\treturn messages.invalid;\n}\n\n//#endregion\n//#region useTimeAgoIntl/index.ts\nconst UNITS = [\n\t{\n\t\tname: \"year\",\n\t\tms: 31536e6\n\t},\n\t{\n\t\tname: \"month\",\n\t\tms: 2592e6\n\t},\n\t{\n\t\tname: \"week\",\n\t\tms: 6048e5\n\t},\n\t{\n\t\tname: \"day\",\n\t\tms: 864e5\n\t},\n\t{\n\t\tname: \"hour\",\n\t\tms: 36e5\n\t},\n\t{\n\t\tname: \"minute\",\n\t\tms: 6e4\n\t},\n\t{\n\t\tname: \"second\",\n\t\tms: 1e3\n\t}\n];\nfunction useTimeAgoIntl(time, options = {}) {\n\tconst { controls: exposeControls = false, updateInterval = 3e4 } = options;\n\tconst { now,...controls } = useNow({\n\t\tinterval: updateInterval,\n\t\tcontrols: true\n\t});\n\tconst result = computed(() => getTimeAgoIntlResult(new Date(toValue(time)), options, toValue(now)));\n\tconst parts = computed(() => result.value.parts);\n\tconst timeAgoIntl = computed(() => formatTimeAgoIntlParts(parts.value, {\n\t\t...options,\n\t\tlocale: result.value.resolvedLocale\n\t}));\n\treturn exposeControls ? {\n\t\ttimeAgoIntl,\n\t\tparts,\n\t\t...controls\n\t} : timeAgoIntl;\n}\n/**\n* Non-reactive version of useTimeAgoIntl\n*/\nfunction formatTimeAgoIntl(from, options = {}, now = Date.now()) {\n\tconst { parts, resolvedLocale } = getTimeAgoIntlResult(from, options, now);\n\treturn formatTimeAgoIntlParts(parts, {\n\t\t...options,\n\t\tlocale: resolvedLocale\n\t});\n}\n/**\n* Get parts from `Intl.RelativeTimeFormat.formatToParts`.\n*/\nfunction getTimeAgoIntlResult(from, options = {}, now = Date.now()) {\n\tvar _options$units;\n\tconst { locale, relativeTimeFormatOptions = { numeric: \"auto\" } } = options;\n\tconst rtf = new Intl.RelativeTimeFormat(locale, relativeTimeFormatOptions);\n\tconst { locale: resolvedLocale } = rtf.resolvedOptions();\n\tconst diff = +from - +now;\n\tconst absDiff = Math.abs(diff);\n\tconst units = (_options$units = options.units) !== null && _options$units !== void 0 ? _options$units : UNITS;\n\tfor (const { name, ms } of units) if (absDiff >= ms) return {\n\t\tresolvedLocale,\n\t\tparts: rtf.formatToParts(Math.round(diff / ms), name)\n\t};\n\treturn {\n\t\tresolvedLocale,\n\t\tparts: rtf.formatToParts(0, units[units.length - 1].name)\n\t};\n}\n/**\n* Format parts into a string\n*/\nfunction formatTimeAgoIntlParts(parts, options = {}) {\n\tconst { insertSpace = true, joinParts, locale } = options;\n\tif (typeof joinParts === \"function\") return joinParts(parts, locale);\n\tif (!insertSpace) return parts.map((part) => part.value).join(\"\");\n\treturn parts.map((part) => part.value.trim()).join(\" \");\n}\n\n//#endregion\n//#region useTimeoutPoll/index.ts\nfunction useTimeoutPoll(fn, interval, options = {}) {\n\tconst { immediate = true, immediateCallback = false } = options;\n\tconst { start } = useTimeoutFn(loop, interval, { immediate });\n\tconst isActive = shallowRef(false);\n\tasync function loop() {\n\t\tif (!isActive.value) return;\n\t\tawait fn();\n\t\tstart();\n\t}\n\tfunction resume() {\n\t\tif (!isActive.value) {\n\t\t\tisActive.value = true;\n\t\t\tif (immediateCallback) fn();\n\t\t\tstart();\n\t\t}\n\t}\n\tfunction pause() {\n\t\tisActive.value = false;\n\t}\n\tif (immediate && isClient) resume();\n\ttryOnScopeDispose(pause);\n\treturn {\n\t\tisActive,\n\t\tpause,\n\t\tresume\n\t};\n}\n\n//#endregion\n//#region useTimestamp/index.ts\nfunction useTimestamp(options = {}) {\n\tconst { controls: exposeControls = false, offset = 0, immediate = true, interval = \"requestAnimationFrame\", callback } = options;\n\tconst ts = shallowRef(timestamp() + offset);\n\tconst update = () => ts.value = timestamp() + offset;\n\tconst cb = callback ? () => {\n\t\tupdate();\n\t\tcallback(ts.value);\n\t} : update;\n\tconst controls = interval === \"requestAnimationFrame\" ? useRafFn(cb, { immediate }) : useIntervalFn(cb, interval, { immediate });\n\tif (exposeControls) return {\n\t\ttimestamp: ts,\n\t\t...controls\n\t};\n\telse return ts;\n}\n\n//#endregion\n//#region useTitle/index.ts\nfunction useTitle(newTitle = null, options = {}) {\n\tvar _document$title, _ref;\n\tconst { document: document$1 = defaultDocument, restoreOnUnmount = (t) => t } = options;\n\tconst originalTitle = (_document$title = document$1 === null || document$1 === void 0 ? void 0 : document$1.title) !== null && _document$title !== void 0 ? _document$title : \"\";\n\tconst title = toRef((_ref = newTitle !== null && newTitle !== void 0 ? newTitle : document$1 === null || document$1 === void 0 ? void 0 : document$1.title) !== null && _ref !== void 0 ? _ref : null);\n\tconst isReadonly$1 = !!(newTitle && typeof newTitle === \"function\");\n\tfunction format(t) {\n\t\tif (!(\"titleTemplate\" in options)) return t;\n\t\tconst template = options.titleTemplate || \"%s\";\n\t\treturn typeof template === \"function\" ? template(t) : toValue(template).replace(/%s/g, t);\n\t}\n\twatch(title, (newValue, oldValue) => {\n\t\tif (newValue !== oldValue && document$1) document$1.title = format(newValue !== null && newValue !== void 0 ? newValue : \"\");\n\t}, { immediate: true });\n\tif (options.observe && !options.titleTemplate && document$1 && !isReadonly$1) {\n\t\tvar _document$head;\n\t\tuseMutationObserver((_document$head = document$1.head) === null || _document$head === void 0 ? void 0 : _document$head.querySelector(\"title\"), () => {\n\t\t\tif (document$1 && document$1.title !== title.value) title.value = format(document$1.title);\n\t\t}, { childList: true });\n\t}\n\ttryOnScopeDispose(() => {\n\t\tif (restoreOnUnmount) {\n\t\t\tconst restoredTitle = restoreOnUnmount(originalTitle, title.value || \"\");\n\t\t\tif (restoredTitle != null && document$1) document$1.title = restoredTitle;\n\t\t}\n\t});\n\treturn title;\n}\n\n//#endregion\n//#region useTransition/index.ts\nconst _TransitionPresets = {\n\teaseInSine: [\n\t\t.12,\n\t\t0,\n\t\t.39,\n\t\t0\n\t],\n\teaseOutSine: [\n\t\t.61,\n\t\t1,\n\t\t.88,\n\t\t1\n\t],\n\teaseInOutSine: [\n\t\t.37,\n\t\t0,\n\t\t.63,\n\t\t1\n\t],\n\teaseInQuad: [\n\t\t.11,\n\t\t0,\n\t\t.5,\n\t\t0\n\t],\n\teaseOutQuad: [\n\t\t.5,\n\t\t1,\n\t\t.89,\n\t\t1\n\t],\n\teaseInOutQuad: [\n\t\t.45,\n\t\t0,\n\t\t.55,\n\t\t1\n\t],\n\teaseInCubic: [\n\t\t.32,\n\t\t0,\n\t\t.67,\n\t\t0\n\t],\n\teaseOutCubic: [\n\t\t.33,\n\t\t1,\n\t\t.68,\n\t\t1\n\t],\n\teaseInOutCubic: [\n\t\t.65,\n\t\t0,\n\t\t.35,\n\t\t1\n\t],\n\teaseInQuart: [\n\t\t.5,\n\t\t0,\n\t\t.75,\n\t\t0\n\t],\n\teaseOutQuart: [\n\t\t.25,\n\t\t1,\n\t\t.5,\n\t\t1\n\t],\n\teaseInOutQuart: [\n\t\t.76,\n\t\t0,\n\t\t.24,\n\t\t1\n\t],\n\teaseInQuint: [\n\t\t.64,\n\t\t0,\n\t\t.78,\n\t\t0\n\t],\n\teaseOutQuint: [\n\t\t.22,\n\t\t1,\n\t\t.36,\n\t\t1\n\t],\n\teaseInOutQuint: [\n\t\t.83,\n\t\t0,\n\t\t.17,\n\t\t1\n\t],\n\teaseInExpo: [\n\t\t.7,\n\t\t0,\n\t\t.84,\n\t\t0\n\t],\n\teaseOutExpo: [\n\t\t.16,\n\t\t1,\n\t\t.3,\n\t\t1\n\t],\n\teaseInOutExpo: [\n\t\t.87,\n\t\t0,\n\t\t.13,\n\t\t1\n\t],\n\teaseInCirc: [\n\t\t.55,\n\t\t0,\n\t\t1,\n\t\t.45\n\t],\n\teaseOutCirc: [\n\t\t0,\n\t\t.55,\n\t\t.45,\n\t\t1\n\t],\n\teaseInOutCirc: [\n\t\t.85,\n\t\t0,\n\t\t.15,\n\t\t1\n\t],\n\teaseInBack: [\n\t\t.36,\n\t\t0,\n\t\t.66,\n\t\t-.56\n\t],\n\teaseOutBack: [\n\t\t.34,\n\t\t1.56,\n\t\t.64,\n\t\t1\n\t],\n\teaseInOutBack: [\n\t\t.68,\n\t\t-.6,\n\t\t.32,\n\t\t1.6\n\t]\n};\n/**\n* Common transitions\n*\n* @see https://easings.net\n*/\nconst TransitionPresets = /* @__PURE__ */ Object.assign({}, { linear: identity }, _TransitionPresets);\n/**\n* Create an easing function from cubic bezier points.\n*/\nfunction createEasingFunction([p0, p1, p2, p3]) {\n\tconst a = (a1, a2) => 1 - 3 * a2 + 3 * a1;\n\tconst b = (a1, a2) => 3 * a2 - 6 * a1;\n\tconst c = (a1) => 3 * a1;\n\tconst calcBezier = (t, a1, a2) => ((a(a1, a2) * t + b(a1, a2)) * t + c(a1)) * t;\n\tconst getSlope = (t, a1, a2) => 3 * a(a1, a2) * t * t + 2 * b(a1, a2) * t + c(a1);\n\tconst getTforX = (x) => {\n\t\tlet aGuessT = x;\n\t\tfor (let i = 0; i < 4; ++i) {\n\t\t\tconst currentSlope = getSlope(aGuessT, p0, p2);\n\t\t\tif (currentSlope === 0) return aGuessT;\n\t\t\tconst currentX = calcBezier(aGuessT, p0, p2) - x;\n\t\t\taGuessT -= currentX / currentSlope;\n\t\t}\n\t\treturn aGuessT;\n\t};\n\treturn (x) => p0 === p1 && p2 === p3 ? x : calcBezier(getTforX(x), p1, p3);\n}\nfunction lerp(a, b, alpha) {\n\treturn a + alpha * (b - a);\n}\nfunction defaultInterpolation(a, b, t) {\n\tconst aVal = toValue(a);\n\tconst bVal = toValue(b);\n\tif (typeof aVal === \"number\" && typeof bVal === \"number\") return lerp(aVal, bVal, t);\n\tif (Array.isArray(aVal) && Array.isArray(bVal)) return aVal.map((v, i) => lerp(v, toValue(bVal[i]), t));\n\tthrow new TypeError(\"Unknown transition type, specify an interpolation function.\");\n}\nfunction normalizeEasing(easing) {\n\tvar _toValue;\n\treturn typeof easing === \"function\" ? easing : (_toValue = toValue(easing)) !== null && _toValue !== void 0 ? _toValue : identity;\n}\n/**\n* Transition from one value to another.\n*\n* @param source\n* @param from\n* @param to\n* @param options\n*/\nfunction transition(source, from, to, options = {}) {\n\tvar _toValue2;\n\tconst { window: window$1 = defaultWindow } = options;\n\tconst fromVal = toValue(from);\n\tconst toVal = toValue(to);\n\tconst duration = (_toValue2 = toValue(options.duration)) !== null && _toValue2 !== void 0 ? _toValue2 : 1e3;\n\tconst startedAt = Date.now();\n\tconst endAt = Date.now() + duration;\n\tconst interpolation = typeof options.interpolation === \"function\" ? options.interpolation : defaultInterpolation;\n\tconst trans = typeof options.easing !== \"undefined\" ? normalizeEasing(options.easing) : normalizeEasing(options.transition);\n\tconst ease = typeof trans === \"function\" ? trans : createEasingFunction(trans);\n\treturn new Promise((resolve) => {\n\t\tsource.value = fromVal;\n\t\tconst tick = () => {\n\t\t\tvar _options$abort;\n\t\t\tif ((_options$abort = options.abort) === null || _options$abort === void 0 ? void 0 : _options$abort.call(options)) {\n\t\t\t\tresolve();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst now = Date.now();\n\t\t\tsource.value = interpolation(fromVal, toVal, ease((now - startedAt) / duration));\n\t\t\tif (now < endAt) window$1 === null || window$1 === void 0 || window$1.requestAnimationFrame(tick);\n\t\t\telse {\n\t\t\t\tsource.value = toVal;\n\t\t\t\tresolve();\n\t\t\t}\n\t\t};\n\t\ttick();\n\t});\n}\n/**\n* Transition from one value to another.\n* @deprecated The `executeTransition` function is deprecated, use `transition` instead.\n*\n* @param source\n* @param from\n* @param to\n* @param options\n*/\nfunction executeTransition(source, from, to, options = {}) {\n\treturn transition(source, from, to, options);\n}\n/**\n* Follow value with a transition.\n*\n* @see https://vueuse.org/useTransition\n* @param source\n* @param options\n*/\nfunction useTransition(source, options = {}) {\n\tlet currentId = 0;\n\tconst sourceVal = () => {\n\t\tconst v = toValue(source);\n\t\treturn typeof options.interpolation === \"undefined\" && Array.isArray(v) ? v.map(toValue) : v;\n\t};\n\tconst outputRef = shallowRef(sourceVal());\n\twatch(sourceVal, async (to) => {\n\t\tvar _options$onStarted, _options$onFinished;\n\t\tif (toValue(options.disabled)) return;\n\t\tconst id = ++currentId;\n\t\tif (options.delay) await promiseTimeout(toValue(options.delay));\n\t\tif (id !== currentId) return;\n\t\t(_options$onStarted = options.onStarted) === null || _options$onStarted === void 0 || _options$onStarted.call(options);\n\t\tawait transition(outputRef, outputRef.value, to, {\n\t\t\t...options,\n\t\t\tabort: () => {\n\t\t\t\tvar _options$abort2;\n\t\t\t\treturn id !== currentId || ((_options$abort2 = options.abort) === null || _options$abort2 === void 0 ? void 0 : _options$abort2.call(options));\n\t\t\t}\n\t\t});\n\t\t(_options$onFinished = options.onFinished) === null || _options$onFinished === void 0 || _options$onFinished.call(options);\n\t}, { deep: true });\n\twatch(() => toValue(options.disabled), (disabled) => {\n\t\tif (disabled) {\n\t\t\tcurrentId++;\n\t\t\toutputRef.value = sourceVal();\n\t\t}\n\t});\n\ttryOnScopeDispose(() => {\n\t\tcurrentId++;\n\t});\n\treturn computed(() => toValue(options.disabled) ? sourceVal() : outputRef.value);\n}\n\n//#endregion\n//#region useUrlSearchParams/index.ts\n/**\n* Reactive URLSearchParams\n*\n* @see https://vueuse.org/useUrlSearchParams\n* @param mode\n* @param options\n*/\nfunction useUrlSearchParams(mode = \"history\", options = {}) {\n\tconst { initialValue = {}, removeNullishValues = true, removeFalsyValues = false, write: enableWrite = true, writeMode = \"replace\", window: window$1 = defaultWindow, stringify = (params) => params.toString() } = options;\n\tif (!window$1) return reactive(initialValue);\n\tconst state = reactive({});\n\tfunction getRawParams() {\n\t\tif (mode === \"history\") return window$1.location.search || \"\";\n\t\telse if (mode === \"hash\") {\n\t\t\tconst hash = window$1.location.hash || \"\";\n\t\t\tconst index = hash.indexOf(\"?\");\n\t\t\treturn index > 0 ? hash.slice(index) : \"\";\n\t\t} else return (window$1.location.hash || \"\").replace(/^#/, \"\");\n\t}\n\tfunction constructQuery(params) {\n\t\tconst stringified = stringify(params);\n\t\tif (mode === \"history\") return `${stringified ? `?${stringified}` : \"\"}${window$1.location.hash || \"\"}`;\n\t\tif (mode === \"hash-params\") return `${window$1.location.search || \"\"}${stringified ? `#${stringified}` : \"\"}`;\n\t\tconst hash = window$1.location.hash || \"#\";\n\t\tconst index = hash.indexOf(\"?\");\n\t\tif (index > 0) return `${window$1.location.search || \"\"}${hash.slice(0, index)}${stringified ? `?${stringified}` : \"\"}`;\n\t\treturn `${window$1.location.search || \"\"}${hash}${stringified ? `?${stringified}` : \"\"}`;\n\t}\n\tfunction read() {\n\t\treturn new URLSearchParams(getRawParams());\n\t}\n\tfunction updateState(params) {\n\t\tconst unusedKeys = new Set(Object.keys(state));\n\t\tfor (const key of params.keys()) {\n\t\t\tconst paramsForKey = params.getAll(key);\n\t\t\tstate[key] = paramsForKey.length > 1 ? paramsForKey : params.get(key) || \"\";\n\t\t\tunusedKeys.delete(key);\n\t\t}\n\t\tArray.from(unusedKeys).forEach((key) => delete state[key]);\n\t}\n\tconst { pause, resume } = pausableWatch(state, () => {\n\t\tconst params = new URLSearchParams(\"\");\n\t\tObject.keys(state).forEach((key) => {\n\t\t\tconst mapEntry = state[key];\n\t\t\tif (Array.isArray(mapEntry)) mapEntry.forEach((value) => params.append(key, value));\n\t\t\telse if (removeNullishValues && mapEntry == null) params.delete(key);\n\t\t\telse if (removeFalsyValues && !mapEntry) params.delete(key);\n\t\t\telse params.set(key, mapEntry);\n\t\t});\n\t\twrite(params, false);\n\t}, { deep: true });\n\tfunction write(params, shouldUpdate, shouldWriteHistory = true) {\n\t\tpause();\n\t\tif (shouldUpdate) updateState(params);\n\t\tif (writeMode === \"replace\") window$1.history.replaceState(window$1.history.state, window$1.document.title, window$1.location.pathname + constructQuery(params));\n\t\telse if (shouldWriteHistory) window$1.history.pushState(window$1.history.state, window$1.document.title, window$1.location.pathname + constructQuery(params));\n\t\tnextTick(() => resume());\n\t}\n\tfunction onChanged() {\n\t\tif (!enableWrite) return;\n\t\twrite(read(), true, false);\n\t}\n\tconst listenerOptions = { passive: true };\n\tuseEventListener(window$1, \"popstate\", onChanged, listenerOptions);\n\tif (mode !== \"history\") useEventListener(window$1, \"hashchange\", onChanged, listenerOptions);\n\tconst initial = read();\n\tif (initial.keys().next().value) updateState(initial);\n\telse Object.assign(state, initialValue);\n\treturn state;\n}\n\n//#endregion\n//#region useUserMedia/index.ts\n/**\n* Reactive `mediaDevices.getUserMedia` streaming\n*\n* @see https://vueuse.org/useUserMedia\n* @param options\n*/\nfunction useUserMedia(options = {}) {\n\tvar _options$enabled, _options$autoSwitch;\n\tconst enabled = shallowRef((_options$enabled = options.enabled) !== null && _options$enabled !== void 0 ? _options$enabled : false);\n\tconst autoSwitch = shallowRef((_options$autoSwitch = options.autoSwitch) !== null && _options$autoSwitch !== void 0 ? _options$autoSwitch : true);\n\tconst constraints = ref(options.constraints);\n\tconst { navigator: navigator$1 = defaultNavigator } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => {\n\t\tvar _navigator$mediaDevic;\n\t\treturn navigator$1 === null || navigator$1 === void 0 || (_navigator$mediaDevic = navigator$1.mediaDevices) === null || _navigator$mediaDevic === void 0 ? void 0 : _navigator$mediaDevic.getUserMedia;\n\t});\n\tconst stream = shallowRef();\n\tfunction getDeviceOptions(type) {\n\t\tswitch (type) {\n\t\t\tcase \"video\":\n\t\t\t\tif (constraints.value) return constraints.value.video || false;\n\t\t\t\tbreak;\n\t\t\tcase \"audio\":\n\t\t\t\tif (constraints.value) return constraints.value.audio || false;\n\t\t\t\tbreak;\n\t\t}\n\t}\n\tasync function _start() {\n\t\tif (!isSupported.value || stream.value) return;\n\t\tstream.value = await navigator$1.mediaDevices.getUserMedia({\n\t\t\tvideo: getDeviceOptions(\"video\"),\n\t\t\taudio: getDeviceOptions(\"audio\")\n\t\t});\n\t\treturn stream.value;\n\t}\n\tfunction _stop() {\n\t\tvar _stream$value;\n\t\t(_stream$value = stream.value) === null || _stream$value === void 0 || _stream$value.getTracks().forEach((t) => t.stop());\n\t\tstream.value = void 0;\n\t}\n\tfunction stop() {\n\t\t_stop();\n\t\tenabled.value = false;\n\t}\n\tasync function start() {\n\t\tawait _start();\n\t\tif (stream.value) enabled.value = true;\n\t\treturn stream.value;\n\t}\n\tasync function restart() {\n\t\t_stop();\n\t\treturn await start();\n\t}\n\twatch(enabled, (v) => {\n\t\tif (v) _start();\n\t\telse _stop();\n\t}, { immediate: true });\n\twatch(constraints, () => {\n\t\tif (autoSwitch.value && stream.value) restart();\n\t}, {\n\t\timmediate: true,\n\t\tdeep: true\n\t});\n\ttryOnScopeDispose(() => {\n\t\tstop();\n\t});\n\treturn {\n\t\tisSupported,\n\t\tstream,\n\t\tstart,\n\t\tstop,\n\t\trestart,\n\t\tconstraints,\n\t\tenabled,\n\t\tautoSwitch\n\t};\n}\n\n//#endregion\n//#region useVModel/index.ts\n/**\n* Shorthand for v-model binding, props + emit -> ref\n*\n* @see https://vueuse.org/useVModel\n* @param props\n* @param key (default 'modelValue')\n* @param emit\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useVModel(props, key, emit, options = {}) {\n\tvar _vm$$emit, _vm$proxy;\n\tconst { clone = false, passive = false, eventName, deep = false, defaultValue, shouldEmit } = options;\n\tconst vm = getCurrentInstance();\n\tconst _emit = emit || (vm === null || vm === void 0 ? void 0 : vm.emit) || (vm === null || vm === void 0 || (_vm$$emit = vm.$emit) === null || _vm$$emit === void 0 ? void 0 : _vm$$emit.bind(vm)) || (vm === null || vm === void 0 || (_vm$proxy = vm.proxy) === null || _vm$proxy === void 0 || (_vm$proxy = _vm$proxy.$emit) === null || _vm$proxy === void 0 ? void 0 : _vm$proxy.bind(vm === null || vm === void 0 ? void 0 : vm.proxy));\n\tlet event = eventName;\n\tif (!key) key = \"modelValue\";\n\tevent = event || `update:${key.toString()}`;\n\tconst cloneFn = (val) => !clone ? val : typeof clone === \"function\" ? clone(val) : cloneFnJSON(val);\n\tconst getValue$1 = () => isDef(props[key]) ? cloneFn(props[key]) : defaultValue;\n\tconst triggerEmit = (value) => {\n\t\tif (shouldEmit) {\n\t\t\tif (shouldEmit(value)) _emit(event, value);\n\t\t} else _emit(event, value);\n\t};\n\tif (passive) {\n\t\tconst proxy = ref(getValue$1());\n\t\tlet isUpdating = false;\n\t\twatch(() => props[key], (v) => {\n\t\t\tif (!isUpdating) {\n\t\t\t\tisUpdating = true;\n\t\t\t\tproxy.value = cloneFn(v);\n\t\t\t\tnextTick(() => isUpdating = false);\n\t\t\t}\n\t\t});\n\t\twatch(proxy, (v) => {\n\t\t\tif (!isUpdating && (v !== props[key] || deep)) triggerEmit(v);\n\t\t}, { deep });\n\t\treturn proxy;\n\t} else return computed({\n\t\tget() {\n\t\t\treturn getValue$1();\n\t\t},\n\t\tset(value) {\n\t\t\ttriggerEmit(value);\n\t\t}\n\t});\n}\n\n//#endregion\n//#region useVModels/index.ts\n/**\n* Shorthand for props v-model binding. Think like `toRefs(props)` but changes will also emit out.\n*\n* @see https://vueuse.org/useVModels\n* @param props\n* @param emit\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useVModels(props, emit, options = {}) {\n\tconst ret = {};\n\tfor (const key in props) ret[key] = useVModel(props, key, emit, options);\n\treturn ret;\n}\n\n//#endregion\n//#region useVibrate/index.ts\n/**\n* Reactive vibrate\n*\n* @see https://vueuse.org/useVibrate\n* @see https://developer.mozilla.org/en-US/docs/Web/API/Vibration_API\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useVibrate(options) {\n\tconst { pattern = [], interval = 0, navigator: navigator$1 = defaultNavigator } = options || {};\n\tconst isSupported = /* @__PURE__ */ useSupported(() => typeof navigator$1 !== \"undefined\" && \"vibrate\" in navigator$1);\n\tconst patternRef = toRef(pattern);\n\tlet intervalControls;\n\tconst vibrate = (pattern$1 = patternRef.value) => {\n\t\tif (isSupported.value) navigator$1.vibrate(pattern$1);\n\t};\n\tconst stop = () => {\n\t\tif (isSupported.value) navigator$1.vibrate(0);\n\t\tintervalControls === null || intervalControls === void 0 || intervalControls.pause();\n\t};\n\tif (interval > 0) intervalControls = useIntervalFn(vibrate, interval, {\n\t\timmediate: false,\n\t\timmediateCallback: false\n\t});\n\treturn {\n\t\tisSupported,\n\t\tpattern,\n\t\tintervalControls,\n\t\tvibrate,\n\t\tstop\n\t};\n}\n\n//#endregion\n//#region useVirtualList/index.ts\n/**\n* Please consider using [`vue-virtual-scroller`](https://github.com/Akryum/vue-virtual-scroller) if you are looking for more features.\n*/\nfunction useVirtualList(list, options) {\n\tconst { containerStyle, wrapperProps, scrollTo, calculateRange, currentList, containerRef } = \"itemHeight\" in options ? useVerticalVirtualList(options, list) : useHorizontalVirtualList(options, list);\n\treturn {\n\t\tlist: currentList,\n\t\tscrollTo,\n\t\tcontainerProps: {\n\t\t\tref: containerRef,\n\t\t\tonScroll: () => {\n\t\t\t\tcalculateRange();\n\t\t\t},\n\t\t\tstyle: containerStyle\n\t\t},\n\t\twrapperProps\n\t};\n}\nfunction useVirtualListResources(list) {\n\tconst containerRef = shallowRef(null);\n\tconst size = useElementSize(containerRef);\n\tconst currentList = ref([]);\n\tconst source = shallowRef(list);\n\treturn {\n\t\tstate: ref({\n\t\t\tstart: 0,\n\t\t\tend: 10\n\t\t}),\n\t\tsource,\n\t\tcurrentList,\n\t\tsize,\n\t\tcontainerRef\n\t};\n}\nfunction createGetViewCapacity(state, source, itemSize) {\n\treturn (containerSize) => {\n\t\tif (typeof itemSize === \"number\") return Math.ceil(containerSize / itemSize);\n\t\tconst { start = 0 } = state.value;\n\t\tlet sum = 0;\n\t\tlet capacity = 0;\n\t\tfor (let i = start; i < source.value.length; i++) {\n\t\t\tconst size = itemSize(i);\n\t\t\tsum += size;\n\t\t\tcapacity = i;\n\t\t\tif (sum > containerSize) break;\n\t\t}\n\t\treturn capacity - start;\n\t};\n}\nfunction createGetOffset(source, itemSize) {\n\treturn (scrollDirection) => {\n\t\tif (typeof itemSize === \"number\") return Math.floor(scrollDirection / itemSize) + 1;\n\t\tlet sum = 0;\n\t\tlet offset = 0;\n\t\tfor (let i = 0; i < source.value.length; i++) {\n\t\t\tconst size = itemSize(i);\n\t\t\tsum += size;\n\t\t\tif (sum >= scrollDirection) {\n\t\t\t\toffset = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn offset + 1;\n\t};\n}\nfunction createCalculateRange(type, overscan, getOffset, getViewCapacity, { containerRef, state, currentList, source }) {\n\treturn () => {\n\t\tconst element = containerRef.value;\n\t\tif (element) {\n\t\t\tconst offset = getOffset(type === \"vertical\" ? element.scrollTop : element.scrollLeft);\n\t\t\tconst viewCapacity = getViewCapacity(type === \"vertical\" ? element.clientHeight : element.clientWidth);\n\t\t\tconst from = offset - overscan;\n\t\t\tconst to = offset + viewCapacity + overscan;\n\t\t\tstate.value = {\n\t\t\t\tstart: from < 0 ? 0 : from,\n\t\t\t\tend: to > source.value.length ? source.value.length : to\n\t\t\t};\n\t\t\tcurrentList.value = source.value.slice(state.value.start, state.value.end).map((ele, index) => ({\n\t\t\t\tdata: ele,\n\t\t\t\tindex: index + state.value.start\n\t\t\t}));\n\t\t}\n\t};\n}\nfunction createGetDistance(itemSize, source) {\n\treturn (index) => {\n\t\tif (typeof itemSize === \"number\") return index * itemSize;\n\t\treturn source.value.slice(0, index).reduce((sum, _, i) => sum + itemSize(i), 0);\n\t};\n}\nfunction useWatchForSizes(size, list, containerRef, calculateRange) {\n\twatch([\n\t\tsize.width,\n\t\tsize.height,\n\t\t() => toValue(list),\n\t\tcontainerRef\n\t], () => {\n\t\tcalculateRange();\n\t});\n}\nfunction createComputedTotalSize(itemSize, source) {\n\treturn computed(() => {\n\t\tif (typeof itemSize === \"number\") return source.value.length * itemSize;\n\t\treturn source.value.reduce((sum, _, index) => sum + itemSize(index), 0);\n\t});\n}\nconst scrollToDictionaryForElementScrollKey = {\n\thorizontal: \"scrollLeft\",\n\tvertical: \"scrollTop\"\n};\nfunction createScrollTo(type, calculateRange, getDistance, containerRef) {\n\treturn (index) => {\n\t\tif (containerRef.value) {\n\t\t\tcontainerRef.value[scrollToDictionaryForElementScrollKey[type]] = getDistance(index);\n\t\t\tcalculateRange();\n\t\t}\n\t};\n}\nfunction useHorizontalVirtualList(options, list) {\n\tconst resources = useVirtualListResources(list);\n\tconst { state, source, currentList, size, containerRef } = resources;\n\tconst containerStyle = { overflowX: \"auto\" };\n\tconst { itemWidth, overscan = 5 } = options;\n\tconst getViewCapacity = createGetViewCapacity(state, source, itemWidth);\n\tconst calculateRange = createCalculateRange(\"horizontal\", overscan, createGetOffset(source, itemWidth), getViewCapacity, resources);\n\tconst getDistanceLeft = createGetDistance(itemWidth, source);\n\tconst offsetLeft = computed(() => getDistanceLeft(state.value.start));\n\tconst totalWidth = createComputedTotalSize(itemWidth, source);\n\tuseWatchForSizes(size, list, containerRef, calculateRange);\n\treturn {\n\t\tscrollTo: createScrollTo(\"horizontal\", calculateRange, getDistanceLeft, containerRef),\n\t\tcalculateRange,\n\t\twrapperProps: computed(() => {\n\t\t\treturn { style: {\n\t\t\t\theight: \"100%\",\n\t\t\t\twidth: `${totalWidth.value - offsetLeft.value}px`,\n\t\t\t\tmarginLeft: `${offsetLeft.value}px`,\n\t\t\t\tdisplay: \"flex\"\n\t\t\t} };\n\t\t}),\n\t\tcontainerStyle,\n\t\tcurrentList,\n\t\tcontainerRef\n\t};\n}\nfunction useVerticalVirtualList(options, list) {\n\tconst resources = useVirtualListResources(list);\n\tconst { state, source, currentList, size, containerRef } = resources;\n\tconst containerStyle = { overflowY: \"auto\" };\n\tconst { itemHeight, overscan = 5 } = options;\n\tconst getViewCapacity = createGetViewCapacity(state, source, itemHeight);\n\tconst calculateRange = createCalculateRange(\"vertical\", overscan, createGetOffset(source, itemHeight), getViewCapacity, resources);\n\tconst getDistanceTop = createGetDistance(itemHeight, source);\n\tconst offsetTop = computed(() => getDistanceTop(state.value.start));\n\tconst totalHeight = createComputedTotalSize(itemHeight, source);\n\tuseWatchForSizes(size, list, containerRef, calculateRange);\n\treturn {\n\t\tcalculateRange,\n\t\tscrollTo: createScrollTo(\"vertical\", calculateRange, getDistanceTop, containerRef),\n\t\tcontainerStyle,\n\t\twrapperProps: computed(() => {\n\t\t\treturn { style: {\n\t\t\t\twidth: \"100%\",\n\t\t\t\theight: `${totalHeight.value - offsetTop.value}px`,\n\t\t\t\tmarginTop: `${offsetTop.value}px`\n\t\t\t} };\n\t\t}),\n\t\tcurrentList,\n\t\tcontainerRef\n\t};\n}\n\n//#endregion\n//#region useWakeLock/index.ts\n/**\n* Reactive Screen Wake Lock API.\n*\n* @see https://vueuse.org/useWakeLock\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useWakeLock(options = {}) {\n\tconst { navigator: navigator$1 = defaultNavigator, document: document$1 = defaultDocument } = options;\n\tconst requestedType = shallowRef(false);\n\tconst sentinel = shallowRef(null);\n\tconst documentVisibility = useDocumentVisibility({ document: document$1 });\n\tconst isSupported = /* @__PURE__ */ useSupported(() => navigator$1 && \"wakeLock\" in navigator$1);\n\tconst isActive = computed(() => !!sentinel.value && documentVisibility.value === \"visible\");\n\tif (isSupported.value) {\n\t\tuseEventListener(sentinel, \"release\", () => {\n\t\t\tvar _sentinel$value$type, _sentinel$value;\n\t\t\trequestedType.value = (_sentinel$value$type = (_sentinel$value = sentinel.value) === null || _sentinel$value === void 0 ? void 0 : _sentinel$value.type) !== null && _sentinel$value$type !== void 0 ? _sentinel$value$type : false;\n\t\t}, { passive: true });\n\t\twhenever(() => documentVisibility.value === \"visible\" && (document$1 === null || document$1 === void 0 ? void 0 : document$1.visibilityState) === \"visible\" && requestedType.value, (type) => {\n\t\t\trequestedType.value = false;\n\t\t\tforceRequest(type);\n\t\t});\n\t}\n\tasync function forceRequest(type) {\n\t\tvar _sentinel$value2;\n\t\tawait ((_sentinel$value2 = sentinel.value) === null || _sentinel$value2 === void 0 ? void 0 : _sentinel$value2.release());\n\t\tsentinel.value = isSupported.value ? await navigator$1.wakeLock.request(type) : null;\n\t}\n\tasync function request(type) {\n\t\tif (documentVisibility.value === \"visible\") await forceRequest(type);\n\t\telse requestedType.value = type;\n\t}\n\tasync function release() {\n\t\trequestedType.value = false;\n\t\tconst s = sentinel.value;\n\t\tsentinel.value = null;\n\t\tawait (s === null || s === void 0 ? void 0 : s.release());\n\t}\n\treturn {\n\t\tsentinel,\n\t\tisSupported,\n\t\tisActive,\n\t\trequest,\n\t\tforceRequest,\n\t\trelease\n\t};\n}\n\n//#endregion\n//#region useWebNotification/index.ts\n/**\n* Reactive useWebNotification\n*\n* @see https://vueuse.org/useWebNotification\n* @see https://developer.mozilla.org/en-US/docs/Web/API/notification\n*/\nfunction useWebNotification(options = {}) {\n\tconst { window: window$1 = defaultWindow, requestPermissions: _requestForPermissions = true } = options;\n\tconst defaultWebNotificationOptions = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => {\n\t\tif (!window$1 || !(\"Notification\" in window$1)) return false;\n\t\tif (Notification.permission === \"granted\") return true;\n\t\ttry {\n\t\t\tconst notification$1 = new Notification(\"\");\n\t\t\tnotification$1.onshow = () => {\n\t\t\t\tnotification$1.close();\n\t\t\t};\n\t\t} catch (e) {\n\t\t\tif (e.name === \"TypeError\") return false;\n\t\t}\n\t\treturn true;\n\t});\n\tconst permissionGranted = shallowRef(isSupported.value && \"permission\" in Notification && Notification.permission === \"granted\");\n\tconst notification = ref(null);\n\tconst ensurePermissions = async () => {\n\t\tif (!isSupported.value) return;\n\t\tif (!permissionGranted.value && Notification.permission !== \"denied\") {\n\t\t\tif (await Notification.requestPermission() === \"granted\") permissionGranted.value = true;\n\t\t}\n\t\treturn permissionGranted.value;\n\t};\n\tconst { on: onClick, trigger: clickTrigger } = createEventHook();\n\tconst { on: onShow, trigger: showTrigger } = createEventHook();\n\tconst { on: onError, trigger: errorTrigger } = createEventHook();\n\tconst { on: onClose, trigger: closeTrigger } = createEventHook();\n\tconst show = async (overrides) => {\n\t\tif (!isSupported.value || !permissionGranted.value) return;\n\t\tconst options$1 = Object.assign({}, defaultWebNotificationOptions, overrides);\n\t\tnotification.value = new Notification(options$1.title || \"\", options$1);\n\t\tnotification.value.onclick = clickTrigger;\n\t\tnotification.value.onshow = showTrigger;\n\t\tnotification.value.onerror = errorTrigger;\n\t\tnotification.value.onclose = closeTrigger;\n\t\treturn notification.value;\n\t};\n\tconst close = () => {\n\t\tif (notification.value) notification.value.close();\n\t\tnotification.value = null;\n\t};\n\tif (_requestForPermissions) tryOnMounted(ensurePermissions);\n\ttryOnScopeDispose(close);\n\tif (isSupported.value && window$1) {\n\t\tconst document$1 = window$1.document;\n\t\tuseEventListener(document$1, \"visibilitychange\", (e) => {\n\t\t\te.preventDefault();\n\t\t\tif (document$1.visibilityState === \"visible\") close();\n\t\t});\n\t}\n\treturn {\n\t\tisSupported,\n\t\tnotification,\n\t\tensurePermissions,\n\t\tpermissionGranted,\n\t\tshow,\n\t\tclose,\n\t\tonClick,\n\t\tonShow,\n\t\tonError,\n\t\tonClose\n\t};\n}\n\n//#endregion\n//#region useWebSocket/index.ts\nconst DEFAULT_PING_MESSAGE = \"ping\";\nfunction resolveNestedOptions(options) {\n\tif (options === true) return {};\n\treturn options;\n}\n/**\n* Reactive WebSocket client.\n*\n* @see https://vueuse.org/useWebSocket\n* @param url\n*/\nfunction useWebSocket(url, options = {}) {\n\tconst { onConnected, onDisconnected, onError, onMessage, immediate = true, autoConnect = true, autoClose = true, protocols = [] } = options;\n\tconst data = ref(null);\n\tconst status = shallowRef(\"CLOSED\");\n\tconst wsRef = ref();\n\tconst urlRef = toRef(url);\n\tlet heartbeatPause;\n\tlet heartbeatResume;\n\tlet explicitlyClosed = false;\n\tlet retried = 0;\n\tlet bufferedData = [];\n\tlet retryTimeout;\n\tlet pongTimeoutWait;\n\tconst _sendBuffer = () => {\n\t\tif (bufferedData.length && wsRef.value && status.value === \"OPEN\") {\n\t\t\tfor (const buffer of bufferedData) wsRef.value.send(buffer);\n\t\t\tbufferedData = [];\n\t\t}\n\t};\n\tconst resetRetry = () => {\n\t\tif (retryTimeout != null) {\n\t\t\tclearTimeout(retryTimeout);\n\t\t\tretryTimeout = void 0;\n\t\t}\n\t};\n\tconst resetHeartbeat = () => {\n\t\tclearTimeout(pongTimeoutWait);\n\t\tpongTimeoutWait = void 0;\n\t};\n\tconst close = (code = 1e3, reason) => {\n\t\tresetRetry();\n\t\tif (!isClient && !isWorker || !wsRef.value) return;\n\t\texplicitlyClosed = true;\n\t\tresetHeartbeat();\n\t\theartbeatPause === null || heartbeatPause === void 0 || heartbeatPause();\n\t\twsRef.value.close(code, reason);\n\t\twsRef.value = void 0;\n\t};\n\tconst send = (data$1, useBuffer = true) => {\n\t\tif (!wsRef.value || status.value !== \"OPEN\") {\n\t\t\tif (useBuffer) bufferedData.push(data$1);\n\t\t\treturn false;\n\t\t}\n\t\t_sendBuffer();\n\t\twsRef.value.send(data$1);\n\t\treturn true;\n\t};\n\tconst _init = () => {\n\t\tif (explicitlyClosed || typeof urlRef.value === \"undefined\") return;\n\t\tconst ws = new WebSocket(urlRef.value, protocols);\n\t\twsRef.value = ws;\n\t\tstatus.value = \"CONNECTING\";\n\t\tws.onopen = () => {\n\t\t\tstatus.value = \"OPEN\";\n\t\t\tretried = 0;\n\t\t\tonConnected === null || onConnected === void 0 || onConnected(ws);\n\t\t\theartbeatResume === null || heartbeatResume === void 0 || heartbeatResume();\n\t\t\t_sendBuffer();\n\t\t};\n\t\tws.onclose = (ev) => {\n\t\t\tstatus.value = \"CLOSED\";\n\t\t\tresetHeartbeat();\n\t\t\theartbeatPause === null || heartbeatPause === void 0 || heartbeatPause();\n\t\t\tonDisconnected === null || onDisconnected === void 0 || onDisconnected(ws, ev);\n\t\t\tif (!explicitlyClosed && options.autoReconnect && (wsRef.value == null || ws === wsRef.value)) {\n\t\t\t\tconst { retries = -1, delay = 1e3, onFailed } = resolveNestedOptions(options.autoReconnect);\n\t\t\t\tif ((typeof retries === \"function\" ? retries : () => typeof retries === \"number\" && (retries < 0 || retried < retries))(retried)) {\n\t\t\t\t\tretried += 1;\n\t\t\t\t\tconst delayTime = typeof delay === \"function\" ? delay(retried) : delay;\n\t\t\t\t\tretryTimeout = setTimeout(_init, delayTime);\n\t\t\t\t} else onFailed === null || onFailed === void 0 || onFailed();\n\t\t\t}\n\t\t};\n\t\tws.onerror = (e) => {\n\t\t\tonError === null || onError === void 0 || onError(ws, e);\n\t\t};\n\t\tws.onmessage = (e) => {\n\t\t\tif (options.heartbeat) {\n\t\t\t\tresetHeartbeat();\n\t\t\t\tconst { message = DEFAULT_PING_MESSAGE, responseMessage = message } = resolveNestedOptions(options.heartbeat);\n\t\t\t\tif (e.data === toValue(responseMessage)) return;\n\t\t\t}\n\t\t\tdata.value = e.data;\n\t\t\tonMessage === null || onMessage === void 0 || onMessage(ws, e);\n\t\t};\n\t};\n\tif (options.heartbeat) {\n\t\tconst { message = DEFAULT_PING_MESSAGE, interval = 1e3, pongTimeout = 1e3 } = resolveNestedOptions(options.heartbeat);\n\t\tconst { pause, resume } = useIntervalFn(() => {\n\t\t\tsend(toValue(message), false);\n\t\t\tif (pongTimeoutWait != null) return;\n\t\t\tpongTimeoutWait = setTimeout(() => {\n\t\t\t\tclose();\n\t\t\t\texplicitlyClosed = false;\n\t\t\t}, pongTimeout);\n\t\t}, interval, { immediate: false });\n\t\theartbeatPause = pause;\n\t\theartbeatResume = resume;\n\t}\n\tif (autoClose) {\n\t\tif (isClient) useEventListener(\"beforeunload\", () => close(), { passive: true });\n\t\ttryOnScopeDispose(close);\n\t}\n\tconst open = () => {\n\t\tif (!isClient && !isWorker) return;\n\t\tclose();\n\t\texplicitlyClosed = false;\n\t\tretried = 0;\n\t\t_init();\n\t};\n\tif (immediate) open();\n\tif (autoConnect) watch(urlRef, open);\n\treturn {\n\t\tdata,\n\t\tstatus,\n\t\tclose,\n\t\tsend,\n\t\topen,\n\t\tws: wsRef\n\t};\n}\n\n//#endregion\n//#region useWebWorker/index.ts\nfunction useWebWorker(arg0, workerOptions, options) {\n\tconst { window: window$1 = defaultWindow } = options !== null && options !== void 0 ? options : {};\n\tconst data = ref(null);\n\tconst worker = shallowRef();\n\tconst post = (...args) => {\n\t\tif (!worker.value) return;\n\t\tworker.value.postMessage(...args);\n\t};\n\tconst terminate = function terminate$1() {\n\t\tif (!worker.value) return;\n\t\tworker.value.terminate();\n\t};\n\tif (window$1) {\n\t\tif (typeof arg0 === \"string\") worker.value = new Worker(arg0, workerOptions);\n\t\telse if (typeof arg0 === \"function\") worker.value = arg0();\n\t\telse worker.value = arg0;\n\t\tworker.value.onmessage = (e) => {\n\t\t\tdata.value = e.data;\n\t\t};\n\t\ttryOnScopeDispose(() => {\n\t\t\tif (worker.value) worker.value.terminate();\n\t\t});\n\t}\n\treturn {\n\t\tdata,\n\t\tpost,\n\t\tterminate,\n\t\tworker\n\t};\n}\n\n//#endregion\n//#region useWebWorkerFn/lib/depsParser.ts\n/**\n*\n* Concatenates the dependencies into a comma separated string.\n* this string will then be passed as an argument to the \"importScripts\" function\n*\n* @param deps array of string\n* @param localDeps array of function\n* @returns a string composed by the concatenation of the array\n* elements \"deps\" and \"importScripts\".\n*\n* @example\n* depsParser(['demo1', 'demo2']) // return importScripts('demo1', 'demo2')\n*/\nfunction depsParser(deps, localDeps) {\n\tif (deps.length === 0 && localDeps.length === 0) return \"\";\n\tconst depsString = deps.map((dep) => `'${dep}'`).toString();\n\tconst depsFunctionString = localDeps.filter((dep) => typeof dep === \"function\").map((fn) => {\n\t\tconst str = fn.toString();\n\t\tif (str.trim().startsWith(\"function\")) return str;\n\t\telse return `const ${fn.name} = ${str}`;\n\t}).join(\";\");\n\tconst importString = `importScripts(${depsString});`;\n\treturn `${depsString.trim() === \"\" ? \"\" : importString} ${depsFunctionString}`;\n}\nvar depsParser_default = depsParser;\n\n//#endregion\n//#region useWebWorkerFn/lib/jobRunner.ts\n/**\n* This function accepts as a parameter a function \"userFunc\"\n* And as a result returns an anonymous function.\n* This anonymous function, accepts as arguments,\n* the parameters to pass to the function \"useArgs\" and returns a Promise\n* This function can be used as a wrapper, only inside a Worker\n* because it depends by \"postMessage\".\n*\n* @param userFunc {Function} fn the function to run with web worker\n*\n* @returns returns a function that accepts the parameters\n* to be passed to the \"userFunc\" function\n*/\nfunction jobRunner(userFunc) {\n\treturn (e) => {\n\t\tconst userFuncArgs = e.data[0];\n\t\treturn Promise.resolve(userFunc.apply(void 0, userFuncArgs)).then((result) => {\n\t\t\tpostMessage([\"SUCCESS\", result]);\n\t\t}).catch((error) => {\n\t\t\tpostMessage([\"ERROR\", error]);\n\t\t});\n\t};\n}\nvar jobRunner_default = jobRunner;\n\n//#endregion\n//#region useWebWorkerFn/lib/createWorkerBlobUrl.ts\n/**\n* Converts the \"fn\" function into the syntax needed to be executed within a web worker\n*\n* @param fn the function to run with web worker\n* @param deps array of strings, imported into the worker through \"importScripts\"\n* @param localDeps array of function, local dependencies\n*\n* @returns a blob url, containing the code of \"fn\" as a string\n*\n* @example\n* createWorkerBlobUrl((a,b) => a+b, [])\n* // return \"onmessage=return Promise.resolve((a,b) => a + b)\n* .then(postMessage(['SUCCESS', result]))\n* .catch(postMessage(['ERROR', error])\"\n*/\nfunction createWorkerBlobUrl(fn, deps, localDeps) {\n\tconst blobCode = `${depsParser_default(deps, localDeps)}; onmessage=(${jobRunner_default})(${fn})`;\n\tconst blob = new Blob([blobCode], { type: \"text/javascript\" });\n\treturn URL.createObjectURL(blob);\n}\nvar createWorkerBlobUrl_default = createWorkerBlobUrl;\n\n//#endregion\n//#region useWebWorkerFn/index.ts\n/**\n* Run expensive function without blocking the UI, using a simple syntax that makes use of Promise.\n*\n* @see https://vueuse.org/useWebWorkerFn\n* @param fn\n* @param options\n*/\nfunction useWebWorkerFn(fn, options = {}) {\n\tconst { dependencies = [], localDependencies = [], timeout, window: window$1 = defaultWindow } = options;\n\tconst worker = ref();\n\tconst workerStatus = shallowRef(\"PENDING\");\n\tconst promise = ref({});\n\tconst timeoutId = shallowRef();\n\tconst workerTerminate = (status = \"PENDING\") => {\n\t\tif (worker.value && worker.value._url && window$1) {\n\t\t\tworker.value.terminate();\n\t\t\tURL.revokeObjectURL(worker.value._url);\n\t\t\tpromise.value = {};\n\t\t\tworker.value = void 0;\n\t\t\twindow$1.clearTimeout(timeoutId.value);\n\t\t\tworkerStatus.value = status;\n\t\t}\n\t};\n\tworkerTerminate();\n\ttryOnScopeDispose(workerTerminate);\n\tconst generateWorker = () => {\n\t\tconst blobUrl = createWorkerBlobUrl_default(fn, dependencies, localDependencies);\n\t\tconst newWorker = new Worker(blobUrl);\n\t\tnewWorker._url = blobUrl;\n\t\tnewWorker.onmessage = (e) => {\n\t\t\tconst { resolve = () => {}, reject = () => {} } = promise.value;\n\t\t\tconst [status, result] = e.data;\n\t\t\tswitch (status) {\n\t\t\t\tcase \"SUCCESS\":\n\t\t\t\t\tresolve(result);\n\t\t\t\t\tworkerTerminate(status);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\treject(result);\n\t\t\t\t\tworkerTerminate(\"ERROR\");\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t};\n\t\tnewWorker.onerror = (e) => {\n\t\t\tconst { reject = () => {} } = promise.value;\n\t\t\te.preventDefault();\n\t\t\treject(e);\n\t\t\tworkerTerminate(\"ERROR\");\n\t\t};\n\t\tif (timeout) timeoutId.value = setTimeout(() => workerTerminate(\"TIMEOUT_EXPIRED\"), timeout);\n\t\treturn newWorker;\n\t};\n\tconst callWorker = (...fnArgs) => new Promise((resolve, reject) => {\n\t\tvar _worker$value;\n\t\tpromise.value = {\n\t\t\tresolve,\n\t\t\treject\n\t\t};\n\t\t(_worker$value = worker.value) === null || _worker$value === void 0 || _worker$value.postMessage([[...fnArgs]]);\n\t\tworkerStatus.value = \"RUNNING\";\n\t});\n\tconst workerFn = (...fnArgs) => {\n\t\tif (workerStatus.value === \"RUNNING\") {\n\t\t\tconsole.error(\"[useWebWorkerFn] You can only run one instance of the worker at a time.\");\n\t\t\treturn Promise.reject();\n\t\t}\n\t\tworker.value = generateWorker();\n\t\treturn callWorker(...fnArgs);\n\t};\n\treturn {\n\t\tworkerFn,\n\t\tworkerStatus,\n\t\tworkerTerminate\n\t};\n}\n\n//#endregion\n//#region useWindowFocus/index.ts\n/**\n* Reactively track window focus with `window.onfocus` and `window.onblur`.\n*\n* @see https://vueuse.org/useWindowFocus\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useWindowFocus(options = {}) {\n\tconst { window: window$1 = defaultWindow } = options;\n\tif (!window$1) return shallowRef(false);\n\tconst focused = shallowRef(window$1.document.hasFocus());\n\tconst listenerOptions = { passive: true };\n\tuseEventListener(window$1, \"blur\", () => {\n\t\tfocused.value = false;\n\t}, listenerOptions);\n\tuseEventListener(window$1, \"focus\", () => {\n\t\tfocused.value = true;\n\t}, listenerOptions);\n\treturn focused;\n}\n\n//#endregion\n//#region useWindowScroll/index.ts\n/**\n* Reactive window scroll.\n*\n* @see https://vueuse.org/useWindowScroll\n* @param options\n*/\nfunction useWindowScroll(options = {}) {\n\tconst { window: window$1 = defaultWindow,...rest } = options;\n\treturn useScroll(window$1, rest);\n}\n\n//#endregion\n//#region useWindowSize/index.ts\n/**\n* Reactive window size.\n*\n* @see https://vueuse.org/useWindowSize\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useWindowSize(options = {}) {\n\tconst { window: window$1 = defaultWindow, initialWidth = Number.POSITIVE_INFINITY, initialHeight = Number.POSITIVE_INFINITY, listenOrientation = true, includeScrollbar = true, type = \"inner\" } = options;\n\tconst width = shallowRef(initialWidth);\n\tconst height = shallowRef(initialHeight);\n\tconst update = () => {\n\t\tif (window$1) if (type === \"outer\") {\n\t\t\twidth.value = window$1.outerWidth;\n\t\t\theight.value = window$1.outerHeight;\n\t\t} else if (type === \"visual\" && window$1.visualViewport) {\n\t\t\tconst { width: visualViewportWidth, height: visualViewportHeight, scale } = window$1.visualViewport;\n\t\t\twidth.value = Math.round(visualViewportWidth * scale);\n\t\t\theight.value = Math.round(visualViewportHeight * scale);\n\t\t} else if (includeScrollbar) {\n\t\t\twidth.value = window$1.innerWidth;\n\t\t\theight.value = window$1.innerHeight;\n\t\t} else {\n\t\t\twidth.value = window$1.document.documentElement.clientWidth;\n\t\t\theight.value = window$1.document.documentElement.clientHeight;\n\t\t}\n\t};\n\tupdate();\n\ttryOnMounted(update);\n\tconst listenerOptions = { passive: true };\n\tuseEventListener(\"resize\", update, listenerOptions);\n\tif (window$1 && type === \"visual\" && window$1.visualViewport) useEventListener(window$1.visualViewport, \"resize\", update, listenerOptions);\n\tif (listenOrientation) watch(useMediaQuery(\"(orientation: portrait)\"), () => update());\n\treturn {\n\t\twidth,\n\t\theight\n\t};\n}\n\n//#endregion\nexport { DefaultMagicKeysAliasMap, StorageSerializers, TransitionPresets, asyncComputed, breakpointsAntDesign, breakpointsBootstrapV5, breakpointsElement, breakpointsMasterCss, breakpointsPrimeFlex, breakpointsQuasar, breakpointsSematic, breakpointsTailwind, breakpointsVuetify, breakpointsVuetifyV2, breakpointsVuetifyV3, cloneFnJSON, computedAsync, computedInject, createFetch, createReusableTemplate, createTemplatePromise, createUnrefFn, customStorageEventName, defaultDocument, defaultLocation, defaultNavigator, defaultWindow, executeTransition, formatTimeAgo, formatTimeAgoIntl, formatTimeAgoIntlParts, getSSRHandler, mapGamepadToXbox360Controller, onClickOutside, onElementRemoval, onKeyDown, onKeyPressed, onKeyStroke, onKeyUp, onLongPress, onStartTyping, provideSSRWidth, setSSRHandler, templateRef, transition, unrefElement, useActiveElement, useAnimate, useAsyncQueue, useAsyncState, useBase64, useBattery, useBluetooth, useBreakpoints, useBroadcastChannel, useBrowserLocation, useCached, useClipboard, useClipboardItems, useCloned, useColorMode, useConfirmDialog, useCountdown, useCssVar, useCurrentElement, useCycleList, useDark, useDebouncedRefHistory, useDeviceMotion, useDeviceOrientation, useDevicePixelRatio, useDevicesList, useDisplayMedia, useDocumentVisibility, useDraggable, useDropZone, useElementBounding, useElementByPoint, useElementHover, useElementSize, useElementVisibility, useEventBus, useEventListener, useEventSource, useEyeDropper, useFavicon, useFetch, useFileDialog, useFileSystemAccess, useFocus, useFocusWithin, useFps, useFullscreen, useGamepad, useGeolocation, useIdle, useImage, useInfiniteScroll, useIntersectionObserver, useKeyModifier, useLocalStorage, useMagicKeys, useManualRefHistory, useMediaControls, useMediaQuery, useMemoize, useMemory, useMounted, useMouse, useMouseInElement, useMousePressed, useMutationObserver, useNavigatorLanguage, useNetwork, useNow, useObjectUrl, useOffsetPagination, useOnline, usePageLeave, useParallax, useParentElement, usePerformanceObserver, usePermission, usePointer, usePointerLock, usePointerSwipe, usePreferredColorScheme, usePreferredContrast, usePreferredDark, usePreferredLanguages, usePreferredReducedMotion, usePreferredReducedTransparency, usePrevious, useRafFn, useRefHistory, useResizeObserver, useSSRWidth, useScreenOrientation, useScreenSafeArea, useScriptTag, useScroll, useScrollLock, useSessionStorage, useShare, useSorted, useSpeechRecognition, useSpeechSynthesis, useStepper, useStorage, useStorageAsync, useStyleTag, useSupported, useSwipe, useTemplateRefsList, useTextDirection, useTextSelection, useTextareaAutosize, useThrottledRefHistory, useTimeAgo, useTimeAgoIntl, useTimeoutPoll, useTimestamp, useTitle, useTransition, useUrlSearchParams, useUserMedia, useVModel, useVModels, useVibrate, useVirtualList, useWakeLock, useWebNotification, useWebSocket, useWebWorker, useWebWorkerFn, useWindowFocus, useWindowScroll, useWindowSize };","import { defineStore } from 'pinia'\nimport { ref, computed, watch } from 'vue'\nimport { useLocalStorage } from '@vueuse/core'\nimport type {\n\tHSTOperation,\n\tHSTOperationInput,\n\tOperationLogConfig,\n\tUndoRedoState,\n\tOperationLogSnapshot,\n\tCrossTabMessage,\n\tOperationSource,\n} from '../types/operation-log'\nimport type { HSTNode } from './hst'\n\n/**\n * Generate a UUID using crypto API or fallback\n */\nfunction generateId(): string {\n\tif (typeof crypto !== 'undefined' && crypto.randomUUID) {\n\t\treturn crypto.randomUUID()\n\t}\n\t// Fallback for environments without crypto.randomUUID\n\treturn `${Date.now()}-${Math.random().toString(36).substring(2, 9)}`\n}\n\n/**\n * Serialize a message for BroadcastChannel\n * Converts Date objects to ISO strings for structured clone compatibility\n */\ntype SerializedOperation = Omit<HSTOperation, 'timestamp'> & { timestamp: string }\ntype SerializedCrossTabMessage = Omit<CrossTabMessage, 'timestamp' | 'operation' | 'operations'> & {\n\ttimestamp: string\n\toperation?: SerializedOperation\n\toperations?: SerializedOperation[]\n}\n\nfunction serializeForBroadcast(message: CrossTabMessage): SerializedCrossTabMessage {\n\tconst serialized: SerializedCrossTabMessage = {\n\t\ttype: message.type,\n\t\tclientId: message.clientId,\n\t\ttimestamp: message.timestamp.toISOString(),\n\t}\n\n\tif (message.operation) {\n\t\tserialized.operation = {\n\t\t\t...message.operation,\n\t\t\ttimestamp: message.operation.timestamp.toISOString(),\n\t\t}\n\t}\n\n\tif (message.operations) {\n\t\tserialized.operations = message.operations.map(op => ({\n\t\t\t...op,\n\t\t\ttimestamp: op.timestamp.toISOString(),\n\t\t}))\n\t}\n\n\treturn serialized\n}\n\n/**\n * Deserialize a message from BroadcastChannel\n * Converts ISO strings back to Date objects\n */\nfunction deserializeFromBroadcast(serialized: SerializedCrossTabMessage): CrossTabMessage {\n\tconst message: CrossTabMessage = {\n\t\ttype: serialized.type,\n\t\tclientId: serialized.clientId,\n\t\ttimestamp: new Date(serialized.timestamp),\n\t}\n\n\tif (serialized.operation) {\n\t\tmessage.operation = {\n\t\t\t...serialized.operation,\n\t\t\ttimestamp: new Date(serialized.operation.timestamp),\n\t\t}\n\t}\n\n\tif (serialized.operations) {\n\t\tmessage.operations = serialized.operations.map(op => ({\n\t\t\t...op,\n\t\t\ttimestamp: new Date(op.timestamp),\n\t\t}))\n\t}\n\n\treturn message\n}\n\n/**\n * Global HST Operation Log Store\n * Tracks all mutations with full metadata for undo/redo, sync, and audit\n *\n * @public\n */\nexport const useOperationLogStore = defineStore('hst-operation-log', () => {\n\t// Configuration\n\tconst config = ref<OperationLogConfig>({\n\t\tmaxOperations: 100,\n\t\tenableCrossTabSync: true,\n\t\tautoSyncInterval: 30000,\n\t\tenablePersistence: false,\n\t\tpersistenceKeyPrefix: 'stonecrop-ops',\n\t})\n\n\t// State\n\tconst operations = ref<HSTOperation[]>([])\n\tconst currentIndex = ref(-1) // Points to the last applied operation\n\tconst clientId = ref(generateId())\n\tconst batchMode = ref(false)\n\tconst currentBatch = ref<HSTOperation[]>([])\n\tconst currentBatchId = ref<string | null>(null)\n\n\t// Computed\n\tconst canUndo = computed(() => {\n\t\t// Can undo if there are operations and we're not at the beginning\n\t\tif (currentIndex.value < 0) return false\n\n\t\t// Check if the operation at currentIndex is reversible\n\t\tconst operation = operations.value[currentIndex.value]\n\t\treturn operation?.reversible ?? false\n\t})\n\n\tconst canRedo = computed(() => {\n\t\t// Can redo if there are operations ahead of current index\n\t\treturn currentIndex.value < operations.value.length - 1\n\t})\n\n\tconst undoCount = computed(() => {\n\t\tlet count = 0\n\t\tfor (let i = currentIndex.value; i >= 0; i--) {\n\t\t\tif (operations.value[i]?.reversible) count++\n\t\t\telse break\n\t\t}\n\t\treturn count\n\t})\n\n\tconst redoCount = computed(() => {\n\t\treturn operations.value.length - 1 - currentIndex.value\n\t})\n\n\tconst undoRedoState = computed<UndoRedoState>(() => ({\n\t\tcanUndo: canUndo.value,\n\t\tcanRedo: canRedo.value,\n\t\tundoCount: undoCount.value,\n\t\tredoCount: redoCount.value,\n\t\tcurrentIndex: currentIndex.value,\n\t}))\n\n\t// Core Methods\n\n\t/**\n\t * Configure the operation log\n\t */\n\tfunction configure(options: Partial<OperationLogConfig>) {\n\t\tconfig.value = { ...config.value, ...options }\n\n\t\t// Set up persistence if enabled\n\t\tif (config.value.enablePersistence) {\n\t\t\tloadFromPersistence()\n\t\t\tsetupPersistenceWatcher()\n\t\t}\n\n\t\t// Set up cross-tab sync if enabled\n\t\tif (config.value.enableCrossTabSync) {\n\t\t\tsetupCrossTabSync()\n\t\t}\n\t}\n\n\t/**\n\t * Add an operation to the log\n\t */\n\tfunction addOperation(operation: HSTOperationInput, source: OperationSource = 'user') {\n\t\tconst fullOperation: HSTOperation = {\n\t\t\t...operation,\n\t\t\tid: generateId(),\n\t\t\ttimestamp: new Date(),\n\t\t\tsource: source,\n\t\t\tuserId: config.value.userId,\n\t\t}\n\n\t\t// Apply filter if configured\n\t\tif (config.value.operationFilter && !config.value.operationFilter(fullOperation)) {\n\t\t\treturn fullOperation.id\n\t\t}\n\n\t\t// If in batch mode, collect operations\n\t\tif (batchMode.value) {\n\t\t\tcurrentBatch.value.push(fullOperation)\n\t\t\treturn fullOperation.id\n\t\t}\n\n\t\t// Remove any operations after current index (they become invalid after new operation)\n\t\tif (currentIndex.value < operations.value.length - 1) {\n\t\t\toperations.value = operations.value.slice(0, currentIndex.value + 1)\n\t\t}\n\n\t\t// Add new operation\n\t\toperations.value.push(fullOperation)\n\t\tcurrentIndex.value++\n\n\t\t// Enforce max operations limit\n\t\tif (config.value.maxOperations && operations.value.length > config.value.maxOperations) {\n\t\t\tconst overflow = operations.value.length - config.value.maxOperations\n\t\t\toperations.value = operations.value.slice(overflow)\n\t\t\tcurrentIndex.value -= overflow\n\t\t}\n\n\t\t// Broadcast to other tabs\n\t\tif (config.value.enableCrossTabSync) {\n\t\t\tbroadcastOperation(fullOperation)\n\t\t}\n\n\t\treturn fullOperation.id\n\t}\n\n\t/**\n\t * Start batch mode - collect multiple operations\n\t */\n\tfunction startBatch() {\n\t\tbatchMode.value = true\n\t\tcurrentBatch.value = []\n\t\tcurrentBatchId.value = generateId()\n\t}\n\n\t/**\n\t * Commit batch - create a single batch operation\n\t */\n\tfunction commitBatch(description?: string): string | null {\n\t\tif (!batchMode.value || currentBatch.value.length === 0) {\n\t\t\tbatchMode.value = false\n\t\t\tcurrentBatch.value = []\n\t\t\tcurrentBatchId.value = null\n\t\t\treturn null\n\t\t}\n\n\t\tconst batchId = currentBatchId.value!\n\t\tconst allReversible = currentBatch.value.every(op => op.reversible)\n\n\t\t// Create parent batch operation\n\t\tconst batchOperation: HSTOperation = {\n\t\t\tid: batchId,\n\t\t\ttype: 'batch',\n\t\t\tpath: '', // Batch doesn't have a single path\n\t\t\tfieldname: '',\n\t\t\tbeforeValue: null,\n\t\t\tafterValue: null,\n\t\t\tdoctype: currentBatch.value[0]?.doctype || '',\n\t\t\ttimestamp: new Date(),\n\t\t\tsource: 'user',\n\t\t\treversible: allReversible,\n\t\t\tirreversibleReason: allReversible ? undefined : 'Contains irreversible operations',\n\t\t\tchildOperationIds: currentBatch.value.map(op => op.id),\n\t\t\tmetadata: { description },\n\t\t}\n\n\t\t// Add parent operation ID to all children\n\t\tcurrentBatch.value.forEach(op => {\n\t\t\top.parentOperationId = batchId\n\t\t})\n\n\t\t// Add all operations to the log\n\t\toperations.value.push(...currentBatch.value, batchOperation)\n\t\tcurrentIndex.value = operations.value.length - 1\n\n\t\t// Broadcast batch\n\t\tif (config.value.enableCrossTabSync) {\n\t\t\tbroadcastBatch(currentBatch.value, batchOperation)\n\t\t}\n\n\t\t// Reset batch state\n\t\tconst result = batchId\n\t\tbatchMode.value = false\n\t\tcurrentBatch.value = []\n\t\tcurrentBatchId.value = null\n\n\t\treturn result\n\t}\n\n\t/**\n\t * Cancel batch mode without committing\n\t */\n\tfunction cancelBatch() {\n\t\tbatchMode.value = false\n\t\tcurrentBatch.value = []\n\t\tcurrentBatchId.value = null\n\t}\n\n\t/**\n\t * Undo the last operation\n\t */\n\tfunction undo(store: HSTNode): boolean {\n\t\tif (!canUndo.value) return false\n\n\t\tconst operation = operations.value[currentIndex.value]\n\n\t\tif (!operation.reversible) {\n\t\t\t// Warn about irreversible operation\n\t\t\tif (typeof console !== 'undefined' && operation.irreversibleReason) {\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.warn('Cannot undo irreversible operation:', operation.irreversibleReason)\n\t\t\t}\n\t\t\treturn false\n\t\t}\n\n\t\ttry {\n\t\t\t// Handle batch operations\n\t\t\tif (operation.type === 'batch' && operation.childOperationIds) {\n\t\t\t\t// Undo all child operations in reverse order\n\t\t\t\tfor (let i = operation.childOperationIds.length - 1; i >= 0; i--) {\n\t\t\t\t\tconst childId = operation.childOperationIds[i]\n\t\t\t\t\tconst childOp = operations.value.find(op => op.id === childId)\n\t\t\t\t\tif (childOp) {\n\t\t\t\t\t\trevertOperation(childOp, store)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Undo single operation\n\t\t\t\trevertOperation(operation, store)\n\t\t\t}\n\n\t\t\tcurrentIndex.value--\n\n\t\t\t// Broadcast undo to other tabs\n\t\t\tif (config.value.enableCrossTabSync) {\n\t\t\t\tbroadcastUndo(operation)\n\t\t\t}\n\n\t\t\treturn true\n\t\t} catch (error) {\n\t\t\t// Log error in development\n\t\t\tif (typeof console !== 'undefined') {\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.error('Undo failed:', error)\n\t\t\t}\n\t\t\treturn false\n\t\t}\n\t}\n\n\t/**\n\t * Redo the next operation\n\t */\n\tfunction redo(store: HSTNode): boolean {\n\t\tif (!canRedo.value) return false\n\n\t\tconst operation = operations.value[currentIndex.value + 1]\n\n\t\ttry {\n\t\t\t// Handle batch operations\n\t\t\tif (operation.type === 'batch' && operation.childOperationIds) {\n\t\t\t\t// Redo all child operations in order\n\t\t\t\tfor (const childId of operation.childOperationIds) {\n\t\t\t\t\tconst childOp = operations.value.find(op => op.id === childId)\n\t\t\t\t\tif (childOp) {\n\t\t\t\t\t\tapplyOperation(childOp, store)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Redo single operation\n\t\t\t\tapplyOperation(operation, store)\n\t\t\t}\n\n\t\t\tcurrentIndex.value++\n\n\t\t\t// Broadcast redo to other tabs\n\t\t\tif (config.value.enableCrossTabSync) {\n\t\t\t\tbroadcastRedo(operation)\n\t\t\t}\n\n\t\t\treturn true\n\t\t} catch (error) {\n\t\t\t// Log error in development\n\t\t\tif (typeof console !== 'undefined') {\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.error('Redo failed:', error)\n\t\t\t}\n\t\t\treturn false\n\t\t}\n\t}\n\n\t/**\n\t * Revert an operation (apply beforeValue)\n\t */\n\tfunction revertOperation(operation: HSTOperation, store: HSTNode) {\n\t\t// Both 'set' and 'delete' operations can be reverted by setting to beforeValue\n\t\tif ((operation.type === 'set' || operation.type === 'delete') && store && typeof store.set === 'function') {\n\t\t\tstore.set(operation.path, operation.beforeValue, 'undo')\n\t\t}\n\t\t// Note: 'transition' operations are marked as non-reversible, so they won't reach here\n\t\t// Note: 'batch' operations are handled separately in the undo function\n\t}\n\n\t/**\n\t * Apply an operation (apply afterValue)\n\t */\n\tfunction applyOperation(operation: HSTOperation, store: HSTNode) {\n\t\t// Both 'set' and 'delete' operations can be applied by setting to afterValue\n\t\tif ((operation.type === 'set' || operation.type === 'delete') && store && typeof store.set === 'function') {\n\t\t\tstore.set(operation.path, operation.afterValue, 'redo')\n\t\t}\n\t\t// Note: 'transition' operations are marked as non-reversible, so they won't reach here\n\t\t// Note: 'batch' operations are handled separately in the redo function\n\t}\n\n\t/**\n\t * Get operation log snapshot for debugging\n\t */\n\tfunction getSnapshot(): OperationLogSnapshot {\n\t\tconst reversibleOps = operations.value.filter(op => op.reversible).length\n\t\tconst timestamps = operations.value.map(op => op.timestamp)\n\n\t\treturn {\n\t\t\toperations: [...operations.value],\n\t\t\tcurrentIndex: currentIndex.value,\n\t\t\ttotalOperations: operations.value.length,\n\t\t\treversibleOperations: reversibleOps,\n\t\t\tirreversibleOperations: operations.value.length - reversibleOps,\n\t\t\toldestOperation: timestamps.length > 0 ? new Date(Math.min(...timestamps.map(t => t.getTime()))) : undefined,\n\t\t\tnewestOperation: timestamps.length > 0 ? new Date(Math.max(...timestamps.map(t => t.getTime()))) : undefined,\n\t\t}\n\t}\n\n\t/**\n\t * Clear all operations\n\t */\n\tfunction clear() {\n\t\toperations.value = []\n\t\tcurrentIndex.value = -1\n\t}\n\n\t/**\n\t * Get operations for a specific doctype and recordId\n\t */\n\tfunction getOperationsFor(doctype: string, recordId?: string): HSTOperation[] {\n\t\treturn operations.value.filter(op => op.doctype === doctype && (recordId === undefined || op.recordId === recordId))\n\t}\n\n\t/**\n\t * Mark an operation as irreversible\n\t * @param operationId - The ID of the operation to mark\n\t * @param reason - The reason why the operation is irreversible\n\t */\n\tfunction markIrreversible(operationId: string, reason: string) {\n\t\tconst operation = operations.value.find(op => op.id === operationId)\n\t\tif (operation) {\n\t\t\toperation.reversible = false\n\t\t\toperation.irreversibleReason = reason\n\t\t}\n\t}\n\n\t/**\n\t * Log an action execution (stateless actions like print, email, etc.)\n\t * These operations are tracked but typically not reversible\n\t * @param doctype - The doctype the action was executed on\n\t * @param actionName - The name of the action that was executed\n\t * @param recordIds - Optional array of record IDs the action was executed on\n\t * @param result - The result of the action execution\n\t * @param error - Optional error message if action failed\n\t * @returns The operation ID\n\t */\n\tfunction logAction(\n\t\tdoctype: string,\n\t\tactionName: string,\n\t\trecordIds?: string[],\n\t\tresult: 'success' | 'failure' | 'pending' = 'success',\n\t\terror?: string\n\t): string {\n\t\tconst operation: HSTOperationInput = {\n\t\t\ttype: 'action',\n\t\t\tpath: recordIds && recordIds.length > 0 ? `${doctype}.${recordIds[0]}` : doctype,\n\t\t\tfieldname: '',\n\t\t\tbeforeValue: null,\n\t\t\tafterValue: null,\n\t\t\tdoctype,\n\t\t\trecordId: recordIds && recordIds.length > 0 ? recordIds[0] : undefined,\n\t\t\treversible: false, // Actions are typically not reversible\n\t\t\tactionName,\n\t\t\tactionRecordIds: recordIds,\n\t\t\tactionResult: result,\n\t\t\tactionError: error,\n\t\t}\n\n\t\treturn addOperation(operation)\n\t}\n\n\t// Cross-tab synchronization\n\tlet broadcastChannel: BroadcastChannel | null = null\n\n\tfunction setupCrossTabSync() {\n\t\tif (typeof window === 'undefined' || !window.BroadcastChannel) return\n\n\t\tbroadcastChannel = new BroadcastChannel('stonecrop-operation-log')\n\n\t\tbroadcastChannel.addEventListener('message', (event: MessageEvent) => {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n\t\t\tconst rawMessage = event.data\n\n\t\t\tif (!rawMessage || typeof rawMessage !== 'object') return\n\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n\t\t\tconst message = deserializeFromBroadcast(rawMessage)\n\n\t\t\t// Ignore messages from this tab\n\t\t\tif (message.clientId === clientId.value) return\n\n\t\t\tif (message.type === 'operation' && message.operation) {\n\t\t\t\t// Add operation from another tab\n\t\t\t\toperations.value.push({ ...message.operation, source: 'sync' as OperationSource })\n\t\t\t\tcurrentIndex.value = operations.value.length - 1\n\t\t\t} else if (message.type === 'operation' && message.operations) {\n\t\t\t\t// Add batch operations from another tab\n\t\t\t\toperations.value.push(...message.operations.map(op => ({ ...op, source: 'sync' as OperationSource })))\n\t\t\t\tcurrentIndex.value = operations.value.length - 1\n\t\t\t}\n\t\t})\n\t}\n\n\tfunction broadcastOperation(operation: HSTOperation) {\n\t\tif (!broadcastChannel) return\n\n\t\tconst message: CrossTabMessage = {\n\t\t\ttype: 'operation',\n\t\t\toperation,\n\t\t\tclientId: clientId.value,\n\t\t\ttimestamp: new Date(),\n\t\t}\n\t\tbroadcastChannel.postMessage(serializeForBroadcast(message))\n\t}\n\n\tfunction broadcastBatch(childOps: HSTOperation[], batchOp: HSTOperation) {\n\t\tif (!broadcastChannel) return\n\n\t\tconst message: CrossTabMessage = {\n\t\t\ttype: 'operation',\n\t\t\toperations: [...childOps, batchOp],\n\t\t\tclientId: clientId.value,\n\t\t\ttimestamp: new Date(),\n\t\t}\n\t\tbroadcastChannel.postMessage(serializeForBroadcast(message))\n\t}\n\n\tfunction broadcastUndo(operation: HSTOperation) {\n\t\tif (!broadcastChannel) return\n\n\t\tconst message: CrossTabMessage = {\n\t\t\ttype: 'undo',\n\t\t\toperation,\n\t\t\tclientId: clientId.value,\n\t\t\ttimestamp: new Date(),\n\t\t}\n\t\tbroadcastChannel.postMessage(serializeForBroadcast(message))\n\t}\n\n\tfunction broadcastRedo(operation: HSTOperation) {\n\t\tif (!broadcastChannel) return\n\n\t\tconst message: CrossTabMessage = {\n\t\t\ttype: 'redo',\n\t\t\toperation,\n\t\t\tclientId: clientId.value,\n\t\t\ttimestamp: new Date(),\n\t\t}\n\t\tbroadcastChannel.postMessage(serializeForBroadcast(message))\n\t}\n\n\t// Persistence using VueUse\n\ttype PersistedData = {\n\t\toperations: Array<Omit<HSTOperation, 'timestamp'> & { timestamp: string }>\n\t\tcurrentIndex: number\n\t}\n\n\tconst persistedData = useLocalStorage<PersistedData | null>('stonecrop-ops-operations', null, {\n\t\tserializer: {\n\t\t\tread: (v: string) => {\n\t\t\t\ttry {\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n\t\t\t\t\tconst data = JSON.parse(v)\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-return\n\t\t\t\t\treturn data\n\t\t\t\t} catch {\n\t\t\t\t\treturn null\n\t\t\t\t}\n\t\t\t},\n\t\t\twrite: (v: PersistedData | null) => {\n\t\t\t\tif (!v) return ''\n\t\t\t\treturn JSON.stringify(v)\n\t\t\t},\n\t\t},\n\t})\n\n\tfunction loadFromPersistence() {\n\t\tif (typeof window === 'undefined') return\n\n\t\ttry {\n\t\t\tconst data = persistedData.value\n\t\t\tif (data && Array.isArray(data.operations)) {\n\t\t\t\toperations.value = data.operations.map(op => ({\n\t\t\t\t\t...op,\n\t\t\t\t\ttimestamp: new Date(op.timestamp),\n\t\t\t\t}))\n\t\t\t\tcurrentIndex.value = data.currentIndex ?? -1\n\t\t\t}\n\t\t} catch (error) {\n\t\t\t// Log error in development\n\t\t\tif (typeof console !== 'undefined') {\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.error('Failed to load operations from persistence:', error)\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction saveToPersistence() {\n\t\tif (typeof window === 'undefined') return\n\n\t\ttry {\n\t\t\tpersistedData.value = {\n\t\t\t\toperations: operations.value.map(op => ({\n\t\t\t\t\t...op,\n\t\t\t\t\ttimestamp: op.timestamp.toISOString(),\n\t\t\t\t})),\n\t\t\t\tcurrentIndex: currentIndex.value,\n\t\t\t}\n\t\t} catch (error) {\n\t\t\t// Log error in development\n\t\t\tif (typeof console !== 'undefined') {\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.error('Failed to save operations to persistence:', error)\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction setupPersistenceWatcher() {\n\t\twatch(\n\t\t\t[operations, currentIndex],\n\t\t\t() => {\n\t\t\t\tif (config.value.enablePersistence) {\n\t\t\t\t\tsaveToPersistence()\n\t\t\t\t}\n\t\t\t},\n\t\t\t{ deep: true }\n\t\t)\n\t}\n\n\treturn {\n\t\t// State\n\t\toperations,\n\t\tcurrentIndex,\n\t\tconfig,\n\t\tclientId,\n\t\tundoRedoState,\n\n\t\t// Computed\n\t\tcanUndo,\n\t\tcanRedo,\n\t\tundoCount,\n\t\tredoCount,\n\n\t\t// Methods\n\t\tconfigure,\n\t\taddOperation,\n\t\tstartBatch,\n\t\tcommitBatch,\n\t\tcancelBatch,\n\t\tundo,\n\t\tredo,\n\t\tclear,\n\t\tgetOperationsFor,\n\t\tgetSnapshot,\n\t\tmarkIrreversible,\n\t\tlogAction,\n\t}\n})\n","/* eslint-disable no-new-func, no-eval */\nimport type { Map as ImmutableMap } from 'immutable'\nimport { useOperationLogStore } from './stores/operation-log'\nimport type {\n\tFieldActionFunction,\n\tFieldChangeContext,\n\tFieldTriggerExecutionResult,\n\tFieldTriggerOptions,\n\tActionExecutionResult,\n\tTransitionChangeContext,\n\tTransitionActionFunction,\n\tTransitionExecutionResult,\n} from './types/field-triggers'\n\n/**\n * Field trigger execution engine integrated with Registry\n * Singleton pattern following Registry implementation\n * @public\n */\nexport class FieldTriggerEngine {\n\t/**\n\t * The root FieldTriggerEngine instance\n\t */\n\tstatic _root: FieldTriggerEngine\n\n\tprivate options: FieldTriggerOptions & { defaultTimeout: number; debug: boolean; enableRollback: boolean }\n\tprivate doctypeActions = new Map<string, Map<string, string[]>>() // doctype -> action/field -> functions\n\tprivate doctypeTransitions = new Map<string, Map<string, string[]>>() // doctype -> transition -> functions\n\tprivate fieldRollbackConfig = new Map<string, Map<string, boolean>>() // doctype -> field -> rollback enabled\n\tprivate globalActions = new Map<string, FieldActionFunction>() // action name -> function\n\tprivate globalTransitionActions = new Map<string, TransitionActionFunction>() // transition action name -> function\n\n\t/**\n\t * Creates a new FieldTriggerEngine instance (singleton pattern)\n\t * @param options - Configuration options for the field trigger engine\n\t */\n\tconstructor(options: FieldTriggerOptions = {}) {\n\t\tif (FieldTriggerEngine._root) {\n\t\t\treturn FieldTriggerEngine._root\n\t\t}\n\t\tFieldTriggerEngine._root = this\n\t\tthis.options = {\n\t\t\tdefaultTimeout: options.defaultTimeout ?? 5000,\n\t\t\tdebug: options.debug ?? false,\n\t\t\tenableRollback: options.enableRollback ?? true,\n\t\t\terrorHandler: options.errorHandler,\n\t\t}\n\t}\n\n\t/**\n\t * Register a global action function\n\t * @param name - The name of the action\n\t * @param fn - The action function\n\t */\n\tregisterAction(name: string, fn: FieldActionFunction): void {\n\t\tthis.globalActions.set(name, fn)\n\t}\n\n\t/**\n\t * Register a global XState transition action function\n\t * @param name - The name of the transition action\n\t * @param fn - The transition action function\n\t */\n\tregisterTransitionAction(name: string, fn: TransitionActionFunction): void {\n\t\tthis.globalTransitionActions.set(name, fn)\n\t}\n\n\t/**\n\t * Configure rollback behavior for a specific field trigger\n\t * @param doctype - The doctype name\n\t * @param fieldname - The field name\n\t * @param enableRollback - Whether to enable rollback\n\t */\n\tsetFieldRollback(doctype: string, fieldname: string, enableRollback: boolean): void {\n\t\tif (!this.fieldRollbackConfig.has(doctype)) {\n\t\t\tthis.fieldRollbackConfig.set(doctype, new Map())\n\t\t}\n\t\tthis.fieldRollbackConfig.get(doctype)!.set(fieldname, enableRollback)\n\t}\n\n\t/**\n\t * Get rollback configuration for a specific field trigger\n\t */\n\tprivate getFieldRollback(doctype: string, fieldname: string): boolean | undefined {\n\t\treturn this.fieldRollbackConfig.get(doctype)?.get(fieldname)\n\t}\n\n\t/**\n\t * Register actions from a doctype - both regular actions and field triggers\n\t * Separates XState transitions (uppercase) from field triggers (lowercase)\n\t * @param doctype - The doctype name\n\t * @param actions - The actions to register (supports Immutable Map, Map, or plain object)\n\t */\n\tregisterDoctypeActions(\n\t\tdoctype: string,\n\t\tactions: ImmutableMap<string, string[]> | Map<string, string[]> | Record<string, string[]> | undefined\n\t): void {\n\t\tif (!actions) return\n\n\t\tconst actionMap = new Map<string, string[]>()\n\t\tconst transitionMap = new Map<string, string[]>()\n\n\t\t// Convert from different Map types to regular Map\n\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\tif (typeof (actions as any).entrySeq === 'function') {\n\t\t\t// Immutable Map\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t\t;(actions as any).entrySeq().forEach(([key, value]: [string, string[]]) => {\n\t\t\t\tthis.categorizeAction(key, value, actionMap, transitionMap)\n\t\t\t})\n\t\t} else if (actions instanceof Map) {\n\t\t\t// Regular Map\n\t\t\tfor (const [key, value] of actions) {\n\t\t\t\tthis.categorizeAction(key, value, actionMap, transitionMap)\n\t\t\t}\n\t\t} else if (actions && typeof actions === 'object') {\n\t\t\t// Plain object\n\t\t\tObject.entries(actions).forEach(([key, value]) => {\n\t\t\t\tthis.categorizeAction(key, value as string[], actionMap, transitionMap)\n\t\t\t})\n\t\t}\n\n\t\t// Always set the maps, even if empty\n\t\tthis.doctypeActions.set(doctype, actionMap)\n\t\tthis.doctypeTransitions.set(doctype, transitionMap)\n\t}\n\n\t/**\n\t * Categorize an action as either a field trigger or XState transition\n\t * Uses uppercase convention: UPPERCASE = transition, lowercase/mixed = field trigger\n\t */\n\tprivate categorizeAction(\n\t\tkey: string,\n\t\tvalue: string[],\n\t\tactionMap: Map<string, string[]>,\n\t\ttransitionMap: Map<string, string[]>\n\t): void {\n\t\t// Check if the key is all uppercase (XState transition convention)\n\t\tif (this.isTransitionKey(key)) {\n\t\t\ttransitionMap.set(key, value)\n\t\t} else {\n\t\t\tactionMap.set(key, value)\n\t\t}\n\t}\n\n\t/**\n\t * Determine if a key represents an XState transition\n\t * Transitions are identified by being all uppercase\n\t */\n\tprivate isTransitionKey(key: string): boolean {\n\t\t// Must be all uppercase letters/numbers/underscores\n\t\treturn /^[A-Z0-9_]+$/.test(key) && key.length > 0\n\t}\n\n\t/**\n\t * Execute field triggers for a changed field\n\t * @param context - The field change context\n\t * @param options - Execution options (timeout and enableRollback)\n\t */\n\tasync executeFieldTriggers(\n\t\tcontext: FieldChangeContext,\n\t\toptions: { timeout?: number; enableRollback?: boolean } = {}\n\t): Promise<FieldTriggerExecutionResult> {\n\t\tconst { doctype, fieldname } = context\n\t\tconst triggers = this.findFieldTriggers(doctype, fieldname)\n\n\t\tif (triggers.length === 0) {\n\t\t\treturn {\n\t\t\t\tpath: context.path,\n\t\t\t\tactionResults: [],\n\t\t\t\ttotalExecutionTime: 0,\n\t\t\t\tallSucceeded: true,\n\t\t\t\tstoppedOnError: false,\n\t\t\t\trolledBack: false,\n\t\t\t}\n\t\t}\n\n\t\tconst startTime = performance.now()\n\t\tconst actionResults: ActionExecutionResult[] = []\n\t\tlet stoppedOnError = false\n\t\tlet rolledBack = false\n\t\tlet snapshot: any = undefined\n\n\t\t// Determine if rollback is enabled (priority: execution option > field config > global setting)\n\t\tconst fieldRollbackConfig = this.getFieldRollback(doctype, fieldname)\n\t\tconst rollbackEnabled = options.enableRollback ?? fieldRollbackConfig ?? this.options.enableRollback\n\n\t\t// Capture snapshot before executing actions if rollback is enabled\n\t\tif (rollbackEnabled && context.store) {\n\t\t\tsnapshot = this.captureSnapshot(context)\n\t\t}\n\n\t\t// Execute actions sequentially\n\t\tfor (const actionName of triggers) {\n\t\t\ttry {\n\t\t\t\tconst actionResult = await this.executeAction(actionName, context, options.timeout)\n\t\t\t\tactionResults.push(actionResult)\n\n\t\t\t\tif (!actionResult.success) {\n\t\t\t\t\tstoppedOnError = true\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tconst actionError = error instanceof Error ? error : new Error(String(error))\n\t\t\t\tconst errorResult: ActionExecutionResult = {\n\t\t\t\t\tsuccess: false,\n\t\t\t\t\terror: actionError,\n\t\t\t\t\texecutionTime: 0,\n\t\t\t\t\taction: actionName,\n\t\t\t\t}\n\t\t\t\tactionResults.push(errorResult)\n\t\t\t\tstoppedOnError = true\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\n\t\t// Perform rollback if enabled, errors occurred, and we have a snapshot\n\t\tif (rollbackEnabled && stoppedOnError && snapshot && context.store) {\n\t\t\ttry {\n\t\t\t\tthis.restoreSnapshot(context, snapshot)\n\t\t\t\trolledBack = true\n\t\t\t} catch (rollbackError) {\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.error('[FieldTriggers] Rollback failed:', rollbackError)\n\t\t\t}\n\t\t}\n\n\t\tconst totalExecutionTime = performance.now() - startTime\n\n\t\t// Call global error handler if configured and errors occurred\n\t\tconst failedResults = actionResults.filter(r => !r.success)\n\t\tif (failedResults.length > 0 && this.options.errorHandler) {\n\t\t\tfor (const failedResult of failedResults) {\n\t\t\t\ttry {\n\t\t\t\t\tthis.options.errorHandler(failedResult.error!, context, failedResult.action)\n\t\t\t\t} catch (handlerError) {\n\t\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\t\tconsole.error('[FieldTriggers] Error in global error handler:', handlerError)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst result: FieldTriggerExecutionResult = {\n\t\t\tpath: context.path,\n\t\t\tactionResults,\n\t\t\ttotalExecutionTime,\n\t\t\tallSucceeded: actionResults.every(r => r.success),\n\t\t\tstoppedOnError,\n\t\t\trolledBack,\n\t\t\tsnapshot: this.options.debug && rollbackEnabled ? snapshot : undefined, // Only include snapshot in debug mode if rollback is enabled\n\t\t}\n\n\t\treturn result\n\t}\n\n\t/**\n\t * Execute XState transition actions\n\t * Similar to field triggers but specifically for FSM state transitions\n\t * @param context - The transition change context\n\t * @param options - Execution options (timeout)\n\t */\n\tasync executeTransitionActions(\n\t\tcontext: TransitionChangeContext,\n\t\toptions: { timeout?: number } = {}\n\t): Promise<TransitionExecutionResult[]> {\n\t\tconst { doctype, transition } = context\n\t\tconst transitionActions = this.findTransitionActions(doctype, transition)\n\n\t\tif (transitionActions.length === 0) {\n\t\t\treturn []\n\t\t}\n\n\t\tconst results: TransitionExecutionResult[] = []\n\n\t\t// Execute transition actions sequentially\n\t\tfor (const actionName of transitionActions) {\n\t\t\ttry {\n\t\t\t\tconst actionResult = await this.executeTransitionAction(actionName, context, options.timeout)\n\t\t\t\tresults.push(actionResult)\n\n\t\t\t\tif (!actionResult.success) {\n\t\t\t\t\t// Stop on first error for transitions\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tconst actionError = error instanceof Error ? error : new Error(String(error))\n\t\t\t\tconst errorResult: TransitionExecutionResult = {\n\t\t\t\t\tsuccess: false,\n\t\t\t\t\terror: actionError,\n\t\t\t\t\texecutionTime: 0,\n\t\t\t\t\taction: actionName,\n\t\t\t\t\ttransition,\n\t\t\t\t}\n\t\t\t\tresults.push(errorResult)\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\n\t\t// Call global error handler if configured and errors occurred\n\t\tconst failedResults = results.filter(r => !r.success)\n\t\tif (failedResults.length > 0 && this.options.errorHandler) {\n\t\t\tfor (const failedResult of failedResults) {\n\t\t\t\ttry {\n\t\t\t\t\t// Call with FieldChangeContext (base context type)\n\t\t\t\t\tthis.options.errorHandler(failedResult.error!, context, failedResult.action)\n\t\t\t\t} catch (handlerError) {\n\t\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\t\tconsole.error('[FieldTriggers] Error in global error handler:', handlerError)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn results\n\t}\n\n\t/**\n\t * Find transition actions for a specific doctype and transition\n\t */\n\tprivate findTransitionActions(doctype: string, transition: string): string[] {\n\t\tconst doctypeTransitions = this.doctypeTransitions.get(doctype)\n\t\tif (!doctypeTransitions) return []\n\n\t\treturn doctypeTransitions.get(transition) || []\n\t}\n\n\t/**\n\t * Execute a single transition action by name\n\t */\n\tprivate async executeTransitionAction(\n\t\tactionName: string,\n\t\tcontext: TransitionChangeContext,\n\t\ttimeout?: number\n\t): Promise<TransitionExecutionResult> {\n\t\tconst startTime = performance.now()\n\t\tconst actionTimeout = timeout ?? this.options.defaultTimeout\n\n\t\ttry {\n\t\t\t// Look up action in transition-specific registry first, then fall back to global\n\t\t\tlet actionFn = this.globalTransitionActions.get(actionName)\n\n\t\t\t// If not found in transition registry, try regular action registry\n\t\t\t// This allows sharing actions between field triggers and transitions\n\t\t\tif (!actionFn) {\n\t\t\t\tconst regularActionFn = this.globalActions.get(actionName)\n\t\t\t\tif (regularActionFn) {\n\t\t\t\t\t// Wrap regular action to accept TransitionChangeContext\n\t\t\t\t\tactionFn = regularActionFn as unknown as TransitionActionFunction\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!actionFn) {\n\t\t\t\tthrow new Error(`Transition action \"${actionName}\" not found in registry`)\n\t\t\t}\n\n\t\t\tawait this.executeWithTimeout(actionFn as FieldActionFunction, context, actionTimeout)\n\t\t\tconst executionTime = performance.now() - startTime\n\n\t\t\treturn {\n\t\t\t\tsuccess: true,\n\t\t\t\texecutionTime,\n\t\t\t\taction: actionName,\n\t\t\t\ttransition: context.transition,\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tconst executionTime = performance.now() - startTime\n\t\t\tconst actionError = error instanceof Error ? error : new Error(String(error))\n\n\t\t\treturn {\n\t\t\t\tsuccess: false,\n\t\t\t\terror: actionError,\n\t\t\t\texecutionTime,\n\t\t\t\taction: actionName,\n\t\t\t\ttransition: context.transition,\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Find field triggers for a specific doctype and field\n\t * Field triggers are identified by keys that look like field paths (contain dots or match field names)\n\t */\n\tprivate findFieldTriggers(doctype: string, fieldname: string): string[] {\n\t\tconst doctypeActions = this.doctypeActions.get(doctype)\n\t\tif (!doctypeActions) return []\n\n\t\tconst triggers: string[] = []\n\n\t\tfor (const [key, actionNames] of doctypeActions) {\n\t\t\t// Check if this key is a field trigger pattern\n\t\t\tif (this.isFieldTriggerKey(key, fieldname)) {\n\t\t\t\ttriggers.push(...actionNames)\n\t\t\t}\n\t\t}\n\n\t\treturn triggers\n\t}\n\n\t/**\n\t * Determine if an action key represents a field trigger\n\t * Field triggers can be:\n\t * - Exact field name match: \"emailAddress\"\n\t * - Wildcard patterns: \"emailAddress.*\", \"*.is_primary\"\n\t * - Nested field paths: \"address.street\", \"contact.email\"\n\t */\n\tprivate isFieldTriggerKey(key: string, fieldname: string): boolean {\n\t\t// Exact match\n\t\tif (key === fieldname) return true\n\n\t\t// Contains dots - likely a field path pattern\n\t\tif (key.includes('.')) {\n\t\t\treturn this.matchFieldPattern(key, fieldname)\n\t\t}\n\n\t\t// Contains wildcards\n\t\tif (key.includes('*')) {\n\t\t\treturn this.matchFieldPattern(key, fieldname)\n\t\t}\n\n\t\treturn false\n\t}\n\n\t/**\n\t * Match a field pattern against a field name\n\t * Supports wildcards (*) for dynamic segments\n\t */\n\tprivate matchFieldPattern(pattern: string, fieldname: string): boolean {\n\t\tconst patternParts = pattern.split('.')\n\t\tconst fieldParts = fieldname.split('.')\n\n\t\tif (patternParts.length !== fieldParts.length) {\n\t\t\treturn false\n\t\t}\n\n\t\tfor (let i = 0; i < patternParts.length; i++) {\n\t\t\tconst patternPart = patternParts[i]\n\t\t\tconst fieldPart = fieldParts[i]\n\n\t\t\tif (patternPart === '*') {\n\t\t\t\t// Wildcard matches any segment\n\t\t\t\tcontinue\n\t\t\t} else if (patternPart !== fieldPart) {\n\t\t\t\t// Exact match required\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\n\t\treturn true\n\t}\n\n\t/**\n\t * Execute a single action by name\n\t */\n\tprivate async executeAction(\n\t\tactionName: string,\n\t\tcontext: FieldChangeContext,\n\t\ttimeout?: number\n\t): Promise<ActionExecutionResult> {\n\t\tconst startTime = performance.now()\n\t\tconst actionTimeout = timeout ?? this.options.defaultTimeout\n\n\t\ttry {\n\t\t\t// Look up action in global registry\n\t\t\tconst actionFn = this.globalActions.get(actionName)\n\t\t\tif (!actionFn) {\n\t\t\t\tthrow new Error(`Action \"${actionName}\" not found in registry`)\n\t\t\t}\n\n\t\t\tawait this.executeWithTimeout(actionFn, context, actionTimeout)\n\t\t\tconst executionTime = performance.now() - startTime\n\n\t\t\treturn {\n\t\t\t\tsuccess: true,\n\t\t\t\texecutionTime,\n\t\t\t\taction: actionName,\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tconst executionTime = performance.now() - startTime\n\t\t\tconst actionError = error instanceof Error ? error : new Error(String(error))\n\n\t\t\treturn {\n\t\t\t\tsuccess: false,\n\t\t\t\terror: actionError,\n\t\t\t\texecutionTime,\n\t\t\t\taction: actionName,\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Execute a function with timeout\n\t */\n\tprivate async executeWithTimeout(\n\t\tfn: FieldActionFunction,\n\t\tcontext: FieldChangeContext,\n\t\ttimeout: number\n\t): Promise<unknown> {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tconst timeoutId = setTimeout(() => {\n\t\t\t\treject(new Error(`Action timeout after ${timeout}ms`))\n\t\t\t}, timeout)\n\n\t\t\tPromise.resolve(fn(context))\n\t\t\t\t.then(result => {\n\t\t\t\t\tclearTimeout(timeoutId)\n\t\t\t\t\tresolve(result)\n\t\t\t\t})\n\t\t\t\t.catch(error => {\n\t\t\t\t\tclearTimeout(timeoutId)\n\t\t\t\t\treject(error)\n\t\t\t\t})\n\t\t})\n\t}\n\n\t/**\n\t * Capture a snapshot of the record state before executing actions\n\t * This creates a deep copy of the record data for potential rollback\n\t */\n\tprivate captureSnapshot(context: FieldChangeContext): any {\n\t\tif (!context.store || !context.doctype || !context.recordId) {\n\t\t\treturn undefined\n\t\t}\n\n\t\ttry {\n\t\t\t// Get the record path (doctype.recordId)\n\t\t\tconst recordPath = `${context.doctype}.${context.recordId}`\n\n\t\t\t// Get the current record data\n\t\t\tconst recordData = context.store.get(recordPath)\n\n\t\t\tif (!recordData || typeof recordData !== 'object') {\n\t\t\t\treturn undefined\n\t\t\t}\n\n\t\t\t// Create a deep copy to avoid reference issues\n\t\t\treturn JSON.parse(JSON.stringify(recordData))\n\t\t} catch (error) {\n\t\t\tif (this.options.debug) {\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.warn('[FieldTriggers] Failed to capture snapshot:', error)\n\t\t\t}\n\t\t\treturn undefined\n\t\t}\n\t}\n\n\t/**\n\t * Restore a previously captured snapshot\n\t * This reverts the record to its state before actions were executed\n\t */\n\tprivate restoreSnapshot(context: FieldChangeContext, snapshot: any): void {\n\t\tif (!context.store || !context.doctype || !context.recordId || !snapshot) {\n\t\t\treturn\n\t\t}\n\n\t\ttry {\n\t\t\t// Get the record path (doctype.recordId)\n\t\t\tconst recordPath = `${context.doctype}.${context.recordId}`\n\n\t\t\t// Restore the entire record from snapshot\n\t\t\tcontext.store.set(recordPath, snapshot)\n\n\t\t\tif (this.options.debug) {\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.log(`[FieldTriggers] Rolled back ${recordPath} to previous state`)\n\t\t\t}\n\t\t} catch (error) {\n\t\t\t// eslint-disable-next-line no-console\n\t\t\tconsole.error('[FieldTriggers] Failed to restore snapshot:', error)\n\t\t\tthrow error\n\t\t}\n\t}\n}\n\n/**\n * Get or create the global field trigger engine singleton\n * @param options - Optional configuration for the field trigger engine\n * @public\n */\nexport function getGlobalTriggerEngine(options?: FieldTriggerOptions): FieldTriggerEngine {\n\treturn new FieldTriggerEngine(options)\n}\n\n/**\n * Register a global action function that can be used in field triggers\n * @param name - The name of the action to register\n * @param fn - The action function to execute when the trigger fires\n * @public\n */\nexport function registerGlobalAction(name: string, fn: FieldActionFunction): void {\n\tconst engine = getGlobalTriggerEngine()\n\tengine.registerAction(name, fn)\n}\n\n/**\n * Register a global XState transition action function\n * @param name - The name of the transition action to register\n * @param fn - The transition action function to execute\n * @public\n */\nexport function registerTransitionAction(name: string, fn: TransitionActionFunction): void {\n\tconst engine = getGlobalTriggerEngine()\n\tengine.registerTransitionAction(name, fn)\n}\n\n/**\n * Configure rollback behavior for a specific field trigger\n * @param doctype - The doctype name\n * @param fieldname - The field name\n * @param enableRollback - Whether to enable automatic rollback for this field\n * @public\n */\nexport function setFieldRollback(doctype: string, fieldname: string, enableRollback: boolean): void {\n\tconst engine = getGlobalTriggerEngine()\n\tengine.setFieldRollback(doctype, fieldname, enableRollback)\n}\n\n/**\n * Manually trigger an XState transition for a specific doctype/record\n * This can be called directly when you need to execute transition actions programmatically\n * @param doctype - The doctype name\n * @param transition - The XState transition name to trigger\n * @param options - Optional configuration for the transition\n * @public\n */\nexport async function triggerTransition(\n\tdoctype: string,\n\ttransition: string,\n\toptions?: {\n\t\trecordId?: string\n\t\tcurrentState?: string\n\t\ttargetState?: string\n\t\tfsmContext?: Record<string, any>\n\t\tpath?: string\n\t}\n): Promise<any> {\n\tconst engine = getGlobalTriggerEngine()\n\n\tconst context: TransitionChangeContext = {\n\t\tpath: options?.path || (options?.recordId ? `${doctype}.${options.recordId}` : doctype),\n\t\tfieldname: '',\n\t\tbeforeValue: undefined,\n\t\tafterValue: undefined,\n\t\toperation: 'set',\n\t\tdoctype,\n\t\trecordId: options?.recordId,\n\t\ttimestamp: new Date(),\n\t\ttransition,\n\t\tcurrentState: options?.currentState,\n\t\ttargetState: options?.targetState,\n\t\tfsmContext: options?.fsmContext,\n\t}\n\n\treturn await engine.executeTransitionActions(context)\n}\n\n/**\n * Mark a specific operation as irreversible.\n * Used to prevent undo of critical operations like publishing or deletion.\n * @param operationId - The ID of the operation to mark as irreversible\n * @param reason - Human-readable reason why the operation cannot be undone\n * @public\n */\nexport function markOperationIrreversible(operationId: string | undefined, reason: string): void {\n\tif (!operationId) return\n\n\ttry {\n\t\tconst store = useOperationLogStore()\n\t\tstore.markIrreversible(operationId, reason)\n\t} catch {\n\t\t// Operation log is optional\n\t}\n}\n","import { getGlobalTriggerEngine } from '../field-triggers'\nimport type { FieldChangeContext, TransitionChangeContext } from '../types/field-triggers'\nimport { useOperationLogStore } from './operation-log'\n\n/**\n * Get the operation log store if available\n */\nfunction getOperationLogStore() {\n\ttry {\n\t\treturn useOperationLogStore()\n\t} catch {\n\t\t// Operation log is optional\n\t\treturn null\n\t}\n}\n\n/**\n * Core HST Interface - enhanced with tree navigation\n * Provides a hierarchical state tree interface for navigating and manipulating nested data structures.\n *\n * @public\n */\ninterface HSTNode {\n\t/**\n\t * Gets a value at the specified path\n\t * @param path - The dot-separated path to the value\n\t * @returns The value at the specified path\n\t */\n\tget(path: string): any\n\n\t/**\n\t * Sets a value at the specified path\n\t * @param path - The dot-separated path where to set the value\n\t * @param value - The value to set\n\t * @param source - Optional source of the operation (user, system, sync, undo, redo)\n\t */\n\tset(path: string, value: any, source?: 'user' | 'system' | 'sync' | 'undo' | 'redo'): void\n\n\t/**\n\t * Checks if a value exists at the specified path\n\t * @param path - The dot-separated path to check\n\t * @returns True if the path exists, false otherwise\n\t */\n\thas(path: string): boolean\n\n\t/**\n\t * Gets the parent node in the tree hierarchy\n\t * @returns The parent HSTNode or null if this is the root\n\t */\n\tgetParent(): HSTNode | null\n\n\t/**\n\t * Gets the root node of the tree\n\t * @returns The root HSTNode\n\t */\n\tgetRoot(): HSTNode\n\n\t/**\n\t * Gets the full path from root to this node\n\t * @returns The dot-separated path string\n\t */\n\tgetPath(): string\n\n\t/**\n\t * Gets the depth level of this node in the tree\n\t * @returns The depth as a number (0 for root)\n\t */\n\tgetDepth(): number\n\n\t/**\n\t * Gets an array of path segments from root to this node\n\t * @returns Array of path segments representing breadcrumbs\n\t */\n\tgetBreadcrumbs(): string[]\n\n\t/**\n\t * Gets a child node at the specified relative path\n\t * @param path - The relative path to the child node\n\t * @returns The child HSTNode\n\t */\n\tgetNode(path: string): HSTNode\n\n\t/**\n\t * Trigger an XState transition with optional context data\n\t * @param transition - The transition name (should be uppercase per convention)\n\t * @param context - Optional additional FSM context data\n\t * @returns Promise resolving to the transition execution results\n\t */\n\ttriggerTransition(\n\t\ttransition: string,\n\t\tcontext?: { currentState?: string; targetState?: string; fsmContext?: Record<string, any> }\n\t): Promise<any>\n}\n\n// Type definitions for global Registry\ninterface RegistryGlobal {\n\tRegistry?: {\n\t\t_root?: {\n\t\t\tregistry: Record<string, any>\n\t\t}\n\t}\n}\n\n// Interface for Immutable-like objects\ninterface ImmutableLike {\n\tget(key: string): any\n\tset(key: string, value: any): ImmutableLike\n\thas(key: string): boolean\n\tsize?: number\n\t__ownerID?: any\n\t_map?: any\n\t_list?: any\n\t_origin?: any\n\t_capacity?: any\n\t_defaultValues?: any\n\t_tail?: any\n\t_root?: any\n}\n\n// Interface for Vue reactive objects\ninterface VueReactive {\n\t__v_isReactive: boolean\n\t[key: string]: any\n}\n\n// Interface for Pinia stores\ninterface PiniaStore {\n\t$state?: Record<string, any>\n\t$patch?: (partial: Record<string, any>) => void\n\t$id?: string\n\t[key: string]: any\n}\n\n// Interface for objects with property access\ninterface PropertyAccessible {\n\t[key: string]: any\n}\n\n// Extend global interfaces\ndeclare global {\n\tinterface Window extends RegistryGlobal {}\n\tconst global: RegistryGlobal | undefined\n}\n\n/**\n * Global HST Manager (Singleton)\n * Manages hierarchical state trees and provides access to the global registry.\n *\n * @public\n */\nclass HST {\n\tprivate static instance: HST\n\n\t/**\n\t * Gets the singleton instance of HST\n\t * @returns The HST singleton instance\n\t */\n\tstatic getInstance(): HST {\n\t\tif (!HST.instance) {\n\t\t\tHST.instance = new HST()\n\t\t}\n\t\treturn HST.instance\n\t}\n\n\t/**\n\t * Gets the global registry instance\n\t * @returns The global registry object or undefined if not found\n\t */\n\tgetRegistry(): any {\n\t\t// In test environment, try different ways to access Registry\n\t\t// First, try the global Registry if it exists\n\t\tif (typeof globalThis !== 'undefined') {\n\t\t\tconst globalRegistry = (globalThis as RegistryGlobal).Registry?._root\n\t\t\tif (globalRegistry) {\n\t\t\t\treturn globalRegistry\n\t\t\t}\n\t\t}\n\n\t\t// Try to access through window (browser environment)\n\t\tif (typeof window !== 'undefined') {\n\t\t\tconst windowRegistry = window.Registry?._root\n\t\t\tif (windowRegistry) {\n\t\t\t\treturn windowRegistry\n\t\t\t}\n\t\t}\n\n\t\t// Try to access through global (Node environment)\n\t\tif (typeof global !== 'undefined' && global) {\n\t\t\tconst nodeRegistry = global.Registry?._root\n\t\t\tif (nodeRegistry) {\n\t\t\t\treturn nodeRegistry\n\t\t\t}\n\t\t}\n\n\t\t// If we can't find it globally, it might not be set up\n\t\t// This is expected in test environments where Registry is created locally\n\t\treturn undefined\n\t}\n\n\t/**\n\t * Helper method to get doctype metadata from the registry\n\t * @param doctype - The name of the doctype to retrieve metadata for\n\t * @returns The doctype metadata object or undefined if not found\n\t */\n\tgetDoctypeMeta(doctype: string) {\n\t\tconst registry = this.getRegistry()\n\t\tif (registry && typeof registry === 'object' && 'registry' in registry) {\n\t\t\treturn (registry as { registry: Record<string, any> }).registry[doctype]\n\t\t}\n\t\treturn undefined\n\t}\n}\n\n// Enhanced HST Proxy with tree navigation\nclass HSTProxy implements HSTNode {\n\tprivate target: any\n\tprivate parentPath: string\n\tprivate rootNode: HSTNode | null\n\tprivate doctype: string\n\tprivate parentDoctype?: string\n\tprivate hst: HST\n\n\tconstructor(target: any, doctype: string, parentPath = '', rootNode: HSTNode | null = null, parentDoctype?: string) {\n\t\tthis.target = target\n\t\tthis.parentPath = parentPath\n\t\tthis.rootNode = rootNode || this\n\t\tthis.doctype = doctype\n\t\tthis.parentDoctype = parentDoctype\n\t\tthis.hst = HST.getInstance()\n\n\t\treturn new Proxy(this, {\n\t\t\tget(hst, prop) {\n\t\t\t\t// Return HST methods directly\n\t\t\t\tif (prop in hst) return hst[prop]\n\n\t\t\t\t// Handle property access - return tree nodes for navigation\n\t\t\t\tconst path = String(prop)\n\t\t\t\treturn hst.getNode(path)\n\t\t\t},\n\n\t\t\tset(hst, prop, value) {\n\t\t\t\tconst path = String(prop)\n\t\t\t\thst.set(path, value)\n\t\t\t\treturn true\n\t\t\t},\n\t\t})\n\t}\n\n\tget(path: string): any {\n\t\treturn this.resolveValue(path)\n\t}\n\n\t// Method to get a tree-wrapped node for navigation\n\tgetNode(path: string): HSTNode {\n\t\tconst fullPath = this.resolvePath(path)\n\t\tconst value = this.resolveValue(path)\n\n\t\t// Determine the correct doctype for this node based on the path\n\t\tconst pathSegments = fullPath.split('.')\n\t\tlet nodeDoctype = this.doctype\n\n\t\t// If we're at the root level and this is a StonecropStore, use the first path segment as the doctype\n\t\tif (this.doctype === 'StonecropStore' && pathSegments.length >= 1) {\n\t\t\tnodeDoctype = pathSegments[0]\n\t\t}\n\n\t\t// Always wrap in HSTProxy for tree navigation\n\t\tif (typeof value === 'object' && value !== null && !this.isPrimitive(value)) {\n\t\t\treturn new HSTProxy(value, nodeDoctype, fullPath, this.rootNode, this.parentDoctype)\n\t\t}\n\n\t\t// For primitives, return a minimal wrapper that throws on tree operations\n\t\treturn new HSTProxy(value, nodeDoctype, fullPath, this.rootNode, this.parentDoctype)\n\t}\n\n\tset(path: string, value: any, source: 'user' | 'system' | 'sync' | 'undo' | 'redo' = 'user'): void {\n\t\t// Get current value for change context\n\t\tconst fullPath = this.resolvePath(path)\n\t\tconst beforeValue = this.has(path) ? this.get(path) : undefined\n\n\t\t// Log operation if not from undo/redo and store is available\n\t\tif (source !== 'undo' && source !== 'redo') {\n\t\t\tconst logStore = getOperationLogStore()\n\t\t\tif (logStore && typeof logStore.addOperation === 'function') {\n\t\t\t\tconst pathSegments = fullPath.split('.')\n\t\t\t\tconst doctype = this.doctype === 'StonecropStore' && pathSegments.length >= 1 ? pathSegments[0] : this.doctype\n\t\t\t\tconst recordId = pathSegments.length >= 2 ? pathSegments[1] : undefined\n\t\t\t\tconst fieldname = pathSegments.slice(2).join('.') || pathSegments[pathSegments.length - 1]\n\n\t\t\t\t// Detect if this is a DELETE operation (setting to undefined when a value existed)\n\t\t\t\tconst isDelete = value === undefined && beforeValue !== undefined\n\t\t\t\tconst operationType: 'set' | 'delete' = isDelete ? 'delete' : 'set'\n\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-call\n\t\t\t\tlogStore.addOperation(\n\t\t\t\t\t{\n\t\t\t\t\t\ttype: operationType,\n\t\t\t\t\t\tpath: fullPath,\n\t\t\t\t\t\tfieldname,\n\t\t\t\t\t\tbeforeValue,\n\t\t\t\t\t\tafterValue: value,\n\t\t\t\t\t\tdoctype,\n\t\t\t\t\t\trecordId,\n\t\t\t\t\t\treversible: true, // Default to reversible, can be changed by field triggers\n\t\t\t\t\t},\n\t\t\t\t\tsource\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\n\t\t// Update the value\n\t\tthis.updateValue(path, value)\n\n\t\t// Trigger field actions asynchronously (don't block the set operation)\n\t\tvoid this.triggerFieldActions(fullPath, beforeValue, value)\n\t}\n\n\thas(path: string): boolean {\n\t\ttry {\n\t\t\t// Handle empty path case\n\t\t\tif (path === '') {\n\t\t\t\treturn true // empty path refers to the root object\n\t\t\t}\n\n\t\t\tconst segments = this.parsePath(path)\n\t\t\tlet current = this.target\n\n\t\t\tfor (let i = 0; i < segments.length; i++) {\n\t\t\t\tconst segment = segments[i]\n\n\t\t\t\tif (current === null || current === undefined) {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\n\t\t\t\t// Check if this is the last segment\n\t\t\t\tif (i === segments.length - 1) {\n\t\t\t\t\t// For the final property, check if it exists\n\t\t\t\t\tif (this.isImmutable(current)) {\n\t\t\t\t\t\treturn current.has(segment)\n\t\t\t\t\t} else if (this.isPiniaStore(current)) {\n\t\t\t\t\t\treturn (current.$state && segment in current.$state) || segment in current\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn segment in current\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Navigate to the next level\n\t\t\t\tcurrent = this.getProperty(current, segment)\n\t\t\t}\n\n\t\t\treturn false\n\t\t} catch {\n\t\t\treturn false\n\t\t}\n\t}\n\n\t// Tree navigation methods\n\tgetParent(): HSTNode | null {\n\t\tif (!this.parentPath) return null\n\n\t\tconst parentSegments = this.parentPath.split('.').slice(0, -1)\n\t\tconst parentPath = parentSegments.join('.')\n\n\t\tif (parentPath === '') {\n\t\t\treturn this.rootNode\n\t\t}\n\n\t\t// Return a wrapped node, not raw data\n\t\treturn this.rootNode!.getNode(parentPath)\n\t}\n\n\tgetRoot(): HSTNode {\n\t\treturn this.rootNode!\n\t}\n\n\tgetPath(): string {\n\t\treturn this.parentPath\n\t}\n\n\tgetDepth(): number {\n\t\treturn this.parentPath ? this.parentPath.split('.').length : 0\n\t}\n\n\tgetBreadcrumbs(): string[] {\n\t\treturn this.parentPath ? this.parentPath.split('.') : []\n\t}\n\n\t/**\n\t * Trigger an XState transition with optional context data\n\t */\n\tasync triggerTransition(\n\t\ttransition: string,\n\t\tcontext?: { currentState?: string; targetState?: string; fsmContext?: Record<string, any> }\n\t): Promise<any> {\n\t\tconst triggerEngine = getGlobalTriggerEngine()\n\n\t\t// Determine doctype and recordId from the current path\n\t\tconst pathSegments = this.parentPath.split('.')\n\t\tlet doctype = this.doctype\n\t\tlet recordId: string | undefined\n\n\t\t// If we're at the root level and this is a StonecropStore, use the first path segment as the doctype\n\t\tif (this.doctype === 'StonecropStore' && pathSegments.length >= 1) {\n\t\t\tdoctype = pathSegments[0]\n\t\t}\n\n\t\t// Extract recordId from path if it follows the expected pattern\n\t\tif (pathSegments.length >= 2) {\n\t\t\trecordId = pathSegments[1]\n\t\t}\n\n\t\t// Build transition context\n\t\tconst transitionContext: TransitionChangeContext = {\n\t\t\tpath: this.parentPath,\n\t\t\tfieldname: '', // No specific field for transitions\n\t\t\tbeforeValue: undefined,\n\t\t\tafterValue: undefined,\n\t\t\toperation: 'set',\n\t\t\tdoctype,\n\t\t\trecordId,\n\t\t\ttimestamp: new Date(),\n\t\t\tstore: this.rootNode || undefined,\n\t\t\ttransition,\n\t\t\tcurrentState: context?.currentState,\n\t\t\ttargetState: context?.targetState,\n\t\t\tfsmContext: context?.fsmContext,\n\t\t}\n\n\t\t// Log FSM transition operation\n\t\tconst logStore = getOperationLogStore()\n\t\tif (logStore && typeof logStore.addOperation === 'function') {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-call\n\t\t\tlogStore.addOperation(\n\t\t\t\t{\n\t\t\t\t\ttype: 'transition' as const,\n\t\t\t\t\tpath: this.parentPath,\n\t\t\t\t\tfieldname: transition,\n\t\t\t\t\tbeforeValue: context?.currentState,\n\t\t\t\t\tafterValue: context?.targetState,\n\t\t\t\t\tdoctype,\n\t\t\t\t\trecordId,\n\t\t\t\t\treversible: false, // FSM transitions are generally not reversible\n\t\t\t\t\tmetadata: {\n\t\t\t\t\t\ttransition,\n\t\t\t\t\t\tcurrentState: context?.currentState,\n\t\t\t\t\t\ttargetState: context?.targetState,\n\t\t\t\t\t\tfsmContext: context?.fsmContext,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t'user'\n\t\t\t)\n\t\t}\n\n\t\t// Execute transition actions\n\t\treturn await triggerEngine.executeTransitionActions(transitionContext)\n\t}\n\n\t// Private helper methods\n\tprivate resolvePath(path: string): string {\n\t\tif (path === '') return this.parentPath\n\t\treturn this.parentPath ? `${this.parentPath}.${path}` : path\n\t}\n\n\tprivate resolveValue(path: string): any {\n\t\t// Handle empty path - return the target object\n\t\tif (path === '') {\n\t\t\treturn this.target\n\t\t}\n\n\t\tconst segments = this.parsePath(path)\n\t\tlet current = this.target\n\n\t\tfor (const segment of segments) {\n\t\t\tif (current === null || current === undefined) {\n\t\t\t\treturn undefined\n\t\t\t}\n\n\t\t\tcurrent = this.getProperty(current, segment)\n\t\t}\n\n\t\treturn current\n\t}\n\n\tprivate updateValue(path: string, value: any): void {\n\t\t// Handle empty path case - should throw error\n\t\tif (path === '') {\n\t\t\tthrow new Error('Cannot set value on empty path')\n\t\t}\n\n\t\tconst segments = this.parsePath(path)\n\t\tconst lastSegment = segments.pop()!\n\t\tlet current = this.target\n\n\t\t// Navigate to parent object\n\t\tfor (const segment of segments) {\n\t\t\tcurrent = this.getProperty(current, segment)\n\t\t\tif (current === null || current === undefined) {\n\t\t\t\tthrow new Error(`Cannot set property on null/undefined path: ${path}`)\n\t\t\t}\n\t\t}\n\n\t\t// Set the final property\n\t\tthis.setProperty(current, lastSegment, value)\n\t}\n\n\tprivate getProperty(obj: any, key: string): any {\n\t\t// Immutable objects\n\t\tif (this.isImmutable(obj)) {\n\t\t\treturn obj.get(key)\n\t\t}\n\n\t\t// Vue reactive object\n\t\tif (this.isVueReactive(obj)) {\n\t\t\treturn obj[key]\n\t\t}\n\n\t\t// Pinia store\n\t\tif (this.isPiniaStore(obj)) {\n\t\t\treturn obj.$state?.[key] ?? obj[key]\n\t\t}\n\n\t\t// Plain object\n\t\treturn (obj as PropertyAccessible)[key]\n\t}\n\n\tprivate setProperty(obj: any, key: string, value: any): void {\n\t\t// Immutable objects\n\t\tif (this.isImmutable(obj)) {\n\t\t\tthrow new Error('Cannot directly mutate immutable objects. Use immutable update methods instead.')\n\t\t}\n\n\t\t// Pinia store\n\t\tif (this.isPiniaStore(obj)) {\n\t\t\tif (obj.$patch) {\n\t\t\t\tobj.$patch({ [key]: value })\n\t\t\t} else {\n\t\t\t\t;(obj as PropertyAccessible)[key] = value\n\t\t\t}\n\t\t\treturn\n\t\t}\n\n\t\t// Vue reactive or plain object\n\t\t;(obj as PropertyAccessible)[key] = value\n\t}\n\n\tprivate async triggerFieldActions(fullPath: string, beforeValue: any, afterValue: any): Promise<void> {\n\t\ttry {\n\t\t\t// Guard against undefined or null fullPath\n\t\t\tif (!fullPath || typeof fullPath !== 'string') {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst pathSegments = fullPath.split('.')\n\n\t\t\t// Only trigger field actions for actual field changes (at least 3 levels deep: doctype.recordId.fieldname)\n\t\t\t// Skip triggering for doctype-level or record-level changes\n\t\t\tif (pathSegments.length < 3) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst triggerEngine = getGlobalTriggerEngine()\n\t\t\tconst fieldname = pathSegments.slice(2).join('.') || pathSegments[pathSegments.length - 1]\n\n\t\t\t// Determine the correct doctype for this path using the same logic as getNode()\n\t\t\t// The path should be in format: \"doctype.recordId.fieldname\"\n\t\t\tlet doctype = this.doctype\n\n\t\t\t// If we're at the root level and this is a StonecropStore, use the first path segment as the doctype\n\t\t\tif (this.doctype === 'StonecropStore' && pathSegments.length >= 1) {\n\t\t\t\tdoctype = pathSegments[0]\n\t\t\t}\n\n\t\t\tlet recordId: string | undefined\n\n\t\t\t// Extract recordId from path if it follows the expected pattern\n\t\t\tif (pathSegments.length >= 2) {\n\t\t\t\trecordId = pathSegments[1]\n\t\t\t}\n\n\t\t\tconst context: FieldChangeContext = {\n\t\t\t\tpath: fullPath,\n\t\t\t\tfieldname,\n\t\t\t\tbeforeValue,\n\t\t\t\tafterValue,\n\t\t\t\toperation: 'set',\n\t\t\t\tdoctype,\n\t\t\t\trecordId,\n\t\t\t\ttimestamp: new Date(),\n\t\t\t\tstore: this.rootNode || undefined, // Pass the root store for snapshot/rollback capabilities\n\t\t\t}\n\n\t\t\tawait triggerEngine.executeFieldTriggers(context)\n\t\t} catch (error) {\n\t\t\t// Silently handle trigger errors to not break the main flow\n\t\t\t// In production, you might want to log this error\n\t\t\tif (error instanceof Error) {\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.warn('Field trigger error:', error.message)\n\t\t\t\t// Optional: emit an event or call error handler\n\t\t\t}\n\t\t}\n\t}\n\tprivate isVueReactive(obj: any): obj is VueReactive {\n\t\treturn (\n\t\t\tobj &&\n\t\t\ttypeof obj === 'object' &&\n\t\t\t'__v_isReactive' in obj &&\n\t\t\t(obj as { __v_isReactive: boolean }).__v_isReactive === true\n\t\t)\n\t}\n\n\tprivate isPiniaStore(obj: any): obj is PiniaStore {\n\t\treturn obj && typeof obj === 'object' && ('$state' in obj || '$patch' in obj || '$id' in obj)\n\t}\n\n\tprivate isImmutable(obj: any): obj is ImmutableLike {\n\t\tif (!obj || typeof obj !== 'object') {\n\t\t\treturn false\n\t\t}\n\n\t\tconst hasGetMethod = 'get' in obj && typeof (obj as Record<string, unknown>).get === 'function'\n\t\tconst hasSetMethod = 'set' in obj && typeof (obj as Record<string, unknown>).set === 'function'\n\t\tconst hasHasMethod = 'has' in obj && typeof (obj as Record<string, unknown>).has === 'function'\n\n\t\tconst hasImmutableMarkers =\n\t\t\t'__ownerID' in obj ||\n\t\t\t'_map' in obj ||\n\t\t\t'_list' in obj ||\n\t\t\t'_origin' in obj ||\n\t\t\t'_capacity' in obj ||\n\t\t\t'_defaultValues' in obj ||\n\t\t\t'_tail' in obj ||\n\t\t\t'_root' in obj ||\n\t\t\t('size' in obj && hasGetMethod && hasSetMethod)\n\n\t\tlet constructorName: string | undefined\n\t\ttry {\n\t\t\tconst objWithConstructor = obj as Record<string, unknown>\n\t\t\tif (\n\t\t\t\t'constructor' in objWithConstructor &&\n\t\t\t\tobjWithConstructor.constructor &&\n\t\t\t\ttypeof objWithConstructor.constructor === 'object' &&\n\t\t\t\t'name' in objWithConstructor.constructor\n\t\t\t) {\n\t\t\t\tconst nameValue = (objWithConstructor.constructor as { name: unknown }).name\n\t\t\t\tconstructorName = typeof nameValue === 'string' ? nameValue : undefined\n\t\t\t}\n\t\t} catch {\n\t\t\tconstructorName = undefined\n\t\t}\n\n\t\tconst isImmutableConstructor =\n\t\t\tconstructorName &&\n\t\t\t(constructorName.includes('Map') ||\n\t\t\t\tconstructorName.includes('List') ||\n\t\t\t\tconstructorName.includes('Set') ||\n\t\t\t\tconstructorName.includes('Stack') ||\n\t\t\t\tconstructorName.includes('Seq')) &&\n\t\t\t(hasGetMethod || hasSetMethod)\n\n\t\treturn Boolean(\n\t\t\t(hasGetMethod && hasSetMethod && hasHasMethod && hasImmutableMarkers) ||\n\t\t\t\t(hasGetMethod && hasSetMethod && isImmutableConstructor)\n\t\t)\n\t}\n\n\tprivate isPrimitive(value: any): boolean {\n\t\t// Don't wrap primitive values, functions, or null/undefined\n\t\treturn (\n\t\t\tvalue === null ||\n\t\t\tvalue === undefined ||\n\t\t\ttypeof value === 'string' ||\n\t\t\ttypeof value === 'number' ||\n\t\t\ttypeof value === 'boolean' ||\n\t\t\ttypeof value === 'function' ||\n\t\t\ttypeof value === 'symbol' ||\n\t\t\ttypeof value === 'bigint'\n\t\t)\n\t}\n\n\tprivate parsePath(path: string): string[] {\n\t\tif (!path) return []\n\t\treturn path.split('.').filter(segment => segment.length > 0)\n\t}\n}\n\n/**\n * Factory function for HST creation\n * Creates a new HSTNode proxy for hierarchical state tree navigation.\n *\n * @param target - The target object to wrap with HST functionality\n * @param doctype - The document type identifier\n * @param parentDoctype - Optional parent document type identifier\n * @returns A new HSTNode proxy instance\n *\n * @public\n */\nfunction createHST(target: any, doctype: string, parentDoctype?: string): HSTNode {\n\treturn new HSTProxy(target, doctype, '', null, parentDoctype)\n}\n\n// Export everything\nexport { HSTProxy, HST, createHST, type HSTNode }\n","import DoctypeMeta from './doctype'\nimport Registry from './registry'\nimport { createHST, type HSTNode } from './stores/hst'\nimport { useOperationLogStore } from './stores/operation-log'\nimport type { OperationLogConfig } from './types/operation-log'\nimport type { RouteContext } from './types/registry'\n\n/**\n * Main Stonecrop class with HST integration and built-in Operation Log\n * @public\n */\nexport class Stonecrop {\n\tprivate hstStore: HSTNode\n\tprivate _operationLogStore?: ReturnType<typeof useOperationLogStore>\n\tprivate _operationLogConfig?: Partial<OperationLogConfig>\n\n\t/** The registry instance containing all doctype definitions */\n\treadonly registry: Registry\n\n\t/**\n\t * Creates a new Stonecrop instance with HST integration\n\t * @param registry - The Registry instance containing doctype definitions\n\t * @param operationLogConfig - Optional configuration for the operation log\n\t */\n\tconstructor(registry: Registry, operationLogConfig?: Partial<OperationLogConfig>) {\n\t\tthis.registry = registry\n\n\t\t// Store config for lazy initialization\n\t\tthis._operationLogConfig = operationLogConfig\n\n\t\t// Initialize HST store with auto-sync to Registry\n\t\tthis.initializeHSTStore()\n\t\tthis.setupRegistrySync()\n\t}\n\n\t/**\n\t * Get the operation log store (lazy initialization)\n\t * @internal\n\t */\n\tgetOperationLogStore() {\n\t\tif (!this._operationLogStore) {\n\t\t\tthis._operationLogStore = useOperationLogStore()\n\t\t\tif (this._operationLogConfig) {\n\t\t\t\tthis._operationLogStore.configure(this._operationLogConfig)\n\t\t\t}\n\t\t}\n\t\treturn this._operationLogStore\n\t}\n\n\t/**\n\t * Initialize the HST store structure\n\t */\n\tprivate initializeHSTStore(): void {\n\t\tconst initialStoreStructure: Record<string, any> = {}\n\n\t\t// Auto-populate from existing Registry doctypes\n\t\tObject.keys(this.registry.registry).forEach(doctypeSlug => {\n\t\t\tinitialStoreStructure[doctypeSlug] = {}\n\t\t})\n\n\t\tthis.hstStore = createHST(initialStoreStructure, 'StonecropStore')\n\t}\n\n\t/**\n\t * Setup automatic sync with Registry when doctypes are added\n\t */\n\tprivate setupRegistrySync(): void {\n\t\t// Extend Registry.addDoctype to auto-create HST store sections\n\t\tconst originalAddDoctype = this.registry.addDoctype.bind(this.registry)\n\n\t\tthis.registry.addDoctype = (doctype: DoctypeMeta) => {\n\t\t\t// Call original method\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-call\n\t\t\toriginalAddDoctype(doctype)\n\n\t\t\t// Auto-create HST store section for new doctype\n\t\t\tif (!this.hstStore.has(doctype.slug)) {\n\t\t\t\tthis.hstStore.set(doctype.slug, {})\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Get records hash for a doctype\n\t * @param doctype - The doctype to get records for\n\t * @returns HST node containing records hash\n\t */\n\trecords(doctype: string | DoctypeMeta): HSTNode {\n\t\tconst slug = typeof doctype === 'string' ? doctype : doctype.slug\n\t\tthis.ensureDoctypeExists(slug)\n\t\treturn this.hstStore.getNode(slug)\n\t}\n\n\t/**\n\t * Add a record to the store\n\t * @param doctype - The doctype\n\t * @param recordId - The record ID\n\t * @param recordData - The record data\n\t */\n\taddRecord(doctype: string | DoctypeMeta, recordId: string, recordData: any): void {\n\t\tconst slug = typeof doctype === 'string' ? doctype : doctype.slug\n\n\t\tthis.ensureDoctypeExists(slug)\n\n\t\t// Store raw record data - let HST handle wrapping with proper hierarchy\n\t\tthis.hstStore.set(`${slug}.${recordId}`, recordData)\n\t}\n\n\t/**\n\t * Get a specific record\n\t * @param doctype - The doctype\n\t * @param recordId - The record ID\n\t * @returns HST node for the record or undefined\n\t */\n\tgetRecordById(doctype: string | DoctypeMeta, recordId: string): HSTNode | undefined {\n\t\tconst slug = typeof doctype === 'string' ? doctype : doctype.slug\n\t\tthis.ensureDoctypeExists(slug)\n\n\t\t// First check if the record exists\n\t\tconst recordExists = this.hstStore.has(`${slug}.${recordId}`)\n\t\tif (!recordExists) {\n\t\t\treturn undefined\n\t\t}\n\n\t\t// Check if the actual value is undefined (i.e., record was removed)\n\t\tconst recordValue = this.hstStore.get(`${slug}.${recordId}`)\n\t\tif (recordValue === undefined) {\n\t\t\treturn undefined\n\t\t}\n\n\t\t// Use getNode to get the properly wrapped HST node with correct parent relationships\n\t\treturn this.hstStore.getNode(`${slug}.${recordId}`)\n\t}\n\n\t/**\n\t * Remove a record from the store\n\t * @param doctype - The doctype\n\t * @param recordId - The record ID\n\t */\n\tremoveRecord(doctype: string | DoctypeMeta, recordId: string): void {\n\t\tconst slug = typeof doctype === 'string' ? doctype : doctype.slug\n\t\tthis.ensureDoctypeExists(slug)\n\n\t\t// Remove the specific record directly by setting to undefined\n\t\tif (this.hstStore.has(`${slug}.${recordId}`)) {\n\t\t\tthis.hstStore.set(`${slug}.${recordId}`, undefined)\n\t\t}\n\t}\n\n\t/**\n\t * Get all record IDs for a doctype\n\t * @param doctype - The doctype\n\t * @returns Array of record IDs\n\t */\n\tgetRecordIds(doctype: string | DoctypeMeta): string[] {\n\t\tconst slug = typeof doctype === 'string' ? doctype : doctype.slug\n\t\tthis.ensureDoctypeExists(slug)\n\n\t\tconst doctypeNode = this.hstStore.get(slug) as Record<string, any>\n\t\tif (!doctypeNode || typeof doctypeNode !== 'object') {\n\t\t\treturn []\n\t\t}\n\n\t\treturn Object.keys(doctypeNode).filter(key => doctypeNode[key] !== undefined)\n\t}\n\n\t/**\n\t * Clear all records for a doctype\n\t * @param doctype - The doctype\n\t */\n\tclearRecords(doctype: string | DoctypeMeta): void {\n\t\tconst slug = typeof doctype === 'string' ? doctype : doctype.slug\n\t\tthis.ensureDoctypeExists(slug)\n\n\t\t// Get all record IDs and remove them\n\t\tconst recordIds = this.getRecordIds(slug)\n\t\trecordIds.forEach(recordId => {\n\t\t\tthis.hstStore.set(`${slug}.${recordId}`, undefined)\n\t\t})\n\t}\n\n\t/**\n\t * Setup method for doctype initialization\n\t * @param doctype - The doctype to setup\n\t */\n\tsetup(doctype: DoctypeMeta): void {\n\t\t// Ensure doctype exists in store\n\t\tthis.ensureDoctypeExists(doctype.slug)\n\t}\n\n\t/**\n\t * Run action on doctype\n\t * Executes the action and logs it to the operation log for audit tracking\n\t * @param doctype - The doctype\n\t * @param action - The action to run\n\t * @param args - Action arguments (typically record IDs)\n\t */\n\trunAction(doctype: DoctypeMeta, action: string, args?: any[]): void {\n\t\tconst registry = this.registry.registry[doctype.slug]\n\t\tconst actions = registry?.actions?.get(action)\n\t\tconst recordIds = Array.isArray(args) ? args.filter((arg): arg is string => typeof arg === 'string') : undefined\n\n\t\t// Log action execution start\n\t\tconst opLogStore = this.getOperationLogStore()\n\t\tlet actionResult: 'success' | 'failure' | 'pending' = 'success'\n\t\tlet actionError: string | undefined\n\n\t\ttry {\n\t\t\t// Execute action functions\n\t\t\tif (actions && actions.length > 0) {\n\t\t\t\tactions.forEach(actionStr => {\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-implied-eval\n\t\t\t\t\t\tconst actionFn = new Function('args', actionStr)\n\t\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-call\n\t\t\t\t\t\tactionFn(args)\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tactionResult = 'failure'\n\t\t\t\t\t\tactionError = error instanceof Error ? error.message : 'Unknown error'\n\t\t\t\t\t\tthrow error\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t} catch {\n\t\t\t// Error already set in inner catch\n\t\t} finally {\n\t\t\t// Log the action execution to operation log\n\t\t\topLogStore.logAction(doctype.doctype, action, recordIds, actionResult, actionError)\n\t\t}\n\t}\n\n\t/**\n\t * Get records from server (maintains compatibility)\n\t * @param doctype - The doctype\n\t */\n\tasync getRecords(doctype: DoctypeMeta): Promise<void> {\n\t\tconst response = await fetch(`/${doctype.slug}`)\n\t\tconst records = await response.json()\n\n\t\t// Store each record in HST\n\t\trecords.forEach((record: any) => {\n\t\t\tif (record.id) {\n\t\t\t\tthis.addRecord(doctype, record.id, record)\n\t\t\t}\n\t\t})\n\t}\n\n\t/**\n\t * Get single record from server (maintains compatibility)\n\t * @param doctype - The doctype\n\t * @param recordId - The record ID\n\t */\n\tasync getRecord(doctype: DoctypeMeta, recordId: string): Promise<void> {\n\t\tconst response = await fetch(`/${doctype.slug}/${recordId}`)\n\t\tconst record = await response.json()\n\n\t\t// Store record\n\t\tthis.addRecord(doctype, recordId, record)\n\t}\n\n\t/**\n\t * Ensure doctype section exists in HST store\n\t * @param slug - The doctype slug\n\t */\n\tprivate ensureDoctypeExists(slug: string): void {\n\t\tif (!this.hstStore.has(slug)) {\n\t\t\tthis.hstStore.set(slug, {})\n\t\t}\n\t}\n\n\t/**\n\t * Get doctype metadata from the registry\n\t * @param context - The route context\n\t * @returns The doctype metadata\n\t */\n\tasync getMeta(context: RouteContext): Promise<any> {\n\t\tif (!this.registry.getMeta) {\n\t\t\tthrow new Error('No getMeta function provided to Registry')\n\t\t}\n\t\treturn await this.registry.getMeta(context)\n\t}\n\n\t/**\n\t * Get the root HST store node for advanced usage\n\t * @returns Root HST node\n\t */\n\tgetStore(): HSTNode {\n\t\treturn this.hstStore\n\t}\n}\n","// src/composable.ts\nimport { inject, onMounted, Ref, ref, watch, provide, computed, ComputedRef } from 'vue'\n\nimport Registry from './registry'\nimport { Stonecrop } from './stonecrop'\nimport DoctypeMeta from './doctype'\nimport type { HSTNode } from './stores/hst'\nimport { RouteContext } from './types/registry'\nimport { storeToRefs } from 'pinia'\nimport type { HSTOperation, OperationLogConfig, OperationLogSnapshot } from './types/operation-log'\n\n/**\n * Operation Log API - nested object containing all operation log functionality\n * @public\n */\nexport type OperationLogAPI = {\n\toperations: Ref<HSTOperation[]>\n\tcurrentIndex: Ref<number>\n\tundoRedoState: ComputedRef<{\n\t\tcanUndo: boolean\n\t\tcanRedo: boolean\n\t\tundoCount: number\n\t\tredoCount: number\n\t\tcurrentIndex: number\n\t}>\n\tcanUndo: ComputedRef<boolean>\n\tcanRedo: ComputedRef<boolean>\n\tundoCount: ComputedRef<number>\n\tredoCount: ComputedRef<number>\n\tundo: (hstStore: HSTNode) => boolean\n\tredo: (hstStore: HSTNode) => boolean\n\tstartBatch: () => void\n\tcommitBatch: (description?: string) => string | null\n\tcancelBatch: () => void\n\tclear: () => void\n\tgetOperationsFor: (doctype: string, recordId?: string) => HSTOperation[]\n\tgetSnapshot: () => OperationLogSnapshot\n\tmarkIrreversible: (operationId: string, reason: string) => void\n\tlogAction: (\n\t\tdoctype: string,\n\t\tactionName: string,\n\t\trecordIds?: string[],\n\t\tresult?: 'success' | 'failure' | 'pending',\n\t\terror?: string\n\t) => string\n\tconfigure: (options: Partial<OperationLogConfig>) => void\n}\n\n/**\n * Base Stonecrop composable return type - includes operation log functionality\n * @public\n */\nexport type BaseStonecropReturn = {\n\tstonecrop: Ref<Stonecrop | undefined>\n\toperationLog: OperationLogAPI\n}\n\n/**\n * HST-enabled Stonecrop composable return type\n * @public\n */\nexport type HSTStonecropReturn = BaseStonecropReturn & {\n\tprovideHSTPath: (fieldname: string, recordId?: string) => string\n\thandleHSTChange: (changeData: HSTChangeData) => void\n\thstStore: Ref<HSTNode | undefined>\n\tformData: Ref<Record<string, any>>\n}\n\n/**\n * HST Change data structure\n * @public\n */\nexport type HSTChangeData = {\n\tpath: string\n\tvalue: any\n\tfieldname: string\n\trecordId?: string\n}\n\n/**\n * Unified Stonecrop composable - handles both general operations and HST reactive integration\n *\n * @param options - Configuration options for the composable\n * @returns Stonecrop instance and optional HST integration utilities\n * @public\n */\nexport function useStonecrop(): BaseStonecropReturn | HSTStonecropReturn\n/**\n * Unified Stonecrop composable with HST integration for a specific doctype and record\n *\n * @param options - Configuration with doctype and optional recordId\n * @returns Stonecrop instance with full HST integration utilities\n * @public\n */\nexport function useStonecrop(options: {\n\tregistry?: Registry\n\tdoctype: DoctypeMeta\n\trecordId?: string\n}): HSTStonecropReturn\n/**\n * @public\n */\nexport function useStonecrop(options?: {\n\tregistry?: Registry\n\tdoctype?: DoctypeMeta\n\trecordId?: string\n}): BaseStonecropReturn | HSTStonecropReturn {\n\tif (!options) options = {}\n\n\tconst registry = options.registry || inject<Registry>('$registry')\n\tconst providedStonecrop = inject<Stonecrop>('$stonecrop')\n\tconst stonecrop = ref<Stonecrop>()\n\tconst hstStore = ref<HSTNode>()\n\tconst formData = ref<Record<string, any>>({})\n\n\t// Use refs for router-loaded doctype to maintain reactivity\n\tconst routerDoctype = ref<DoctypeMeta | undefined>()\n\tconst routerRecordId = ref<string | undefined>()\n\n\t// Operation log state and methods - will be populated after stonecrop instance is created\n\tconst operations = ref<HSTOperation[]>([])\n\tconst currentIndex = ref(-1)\n\tconst canUndo = computed(() => stonecrop.value?.getOperationLogStore().canUndo ?? false)\n\tconst canRedo = computed(() => stonecrop.value?.getOperationLogStore().canRedo ?? false)\n\tconst undoCount = computed(() => stonecrop.value?.getOperationLogStore().undoCount ?? 0)\n\tconst redoCount = computed(() => stonecrop.value?.getOperationLogStore().redoCount ?? 0)\n\tconst undoRedoState = computed(\n\t\t() =>\n\t\t\tstonecrop.value?.getOperationLogStore().undoRedoState ?? {\n\t\t\t\tcanUndo: false,\n\t\t\t\tcanRedo: false,\n\t\t\t\tundoCount: 0,\n\t\t\t\tredoCount: 0,\n\t\t\t\tcurrentIndex: -1,\n\t\t\t}\n\t)\n\n\t// Operation log methods\n\tconst undo = (hstStore: HSTNode): boolean => {\n\t\treturn stonecrop.value?.getOperationLogStore().undo(hstStore) ?? false\n\t}\n\n\tconst redo = (hstStore: HSTNode): boolean => {\n\t\treturn stonecrop.value?.getOperationLogStore().redo(hstStore) ?? false\n\t}\n\n\tconst startBatch = () => {\n\t\tstonecrop.value?.getOperationLogStore().startBatch()\n\t}\n\n\tconst commitBatch = (description?: string): string | null => {\n\t\treturn stonecrop.value?.getOperationLogStore().commitBatch(description) ?? null\n\t}\n\n\tconst cancelBatch = () => {\n\t\tstonecrop.value?.getOperationLogStore().cancelBatch()\n\t}\n\n\tconst clear = () => {\n\t\tstonecrop.value?.getOperationLogStore().clear()\n\t}\n\n\tconst getOperationsFor = (doctype: string, recordId?: string) => {\n\t\treturn stonecrop.value?.getOperationLogStore().getOperationsFor(doctype, recordId) ?? []\n\t}\n\n\tconst getSnapshot = () => {\n\t\treturn (\n\t\t\tstonecrop.value?.getOperationLogStore().getSnapshot() ?? {\n\t\t\t\toperations: [],\n\t\t\t\tcurrentIndex: -1,\n\t\t\t\ttotalOperations: 0,\n\t\t\t\treversibleOperations: 0,\n\t\t\t\tirreversibleOperations: 0,\n\t\t\t}\n\t\t)\n\t}\n\n\tconst markIrreversible = (operationId: string, reason: string) => {\n\t\tstonecrop.value?.getOperationLogStore().markIrreversible(operationId, reason)\n\t}\n\n\tconst logAction = (\n\t\tdoctype: string,\n\t\tactionName: string,\n\t\trecordIds?: string[],\n\t\tresult: 'success' | 'failure' | 'pending' = 'success',\n\t\terror?: string\n\t): string => {\n\t\treturn stonecrop.value?.getOperationLogStore().logAction(doctype, actionName, recordIds, result, error) ?? ''\n\t}\n\n\tconst configure = (config: Partial<OperationLogConfig>) => {\n\t\tstonecrop.value?.getOperationLogStore().configure(config)\n\t}\n\n\t// Initialize Stonecrop instance\n\tonMounted(async () => {\n\t\tif (!registry) {\n\t\t\treturn\n\t\t}\n\n\t\tstonecrop.value = providedStonecrop || new Stonecrop(registry)\n\n\t\t// Set up reactive refs from operation log store - only if Pinia is available\n\t\ttry {\n\t\t\tconst opLogStore = stonecrop.value.getOperationLogStore()\n\t\t\tconst opLogRefs = storeToRefs(opLogStore)\n\t\t\toperations.value = opLogRefs.operations.value\n\t\t\tcurrentIndex.value = opLogRefs.currentIndex.value\n\n\t\t\t// Watch for changes in operation log state\n\t\t\twatch(\n\t\t\t\t() => opLogRefs.operations.value,\n\t\t\t\tnewOps => {\n\t\t\t\t\toperations.value = newOps\n\t\t\t\t}\n\t\t\t)\n\t\t\twatch(\n\t\t\t\t() => opLogRefs.currentIndex.value,\n\t\t\t\tnewIndex => {\n\t\t\t\t\tcurrentIndex.value = newIndex\n\t\t\t\t}\n\t\t\t)\n\t\t} catch {\n\t\t\t// Pinia not available (e.g., in tests) - operation log features will not be available\n\t\t\t// Silently fail - operation log is optional\n\t\t}\n\n\t\t// Handle router-based setup if no specific doctype provided\n\t\tif (!options.doctype && registry.router) {\n\t\t\tconst route = registry.router.currentRoute.value\n\n\t\t\t// Parse route path - let the application determine the doctype from the route\n\t\t\tif (!route.path) return // Early return if no path available\n\n\t\t\tconst pathSegments = route.path.split('/').filter(segment => segment.length > 0)\n\t\t\tconst recordId = pathSegments[1]?.toLowerCase()\n\n\t\t\tif (pathSegments.length > 0) {\n\t\t\t\t// Create route context for getMeta function\n\t\t\t\tconst routeContext: RouteContext = {\n\t\t\t\t\tpath: route.path,\n\t\t\t\t\tsegments: pathSegments,\n\t\t\t\t}\n\n\t\t\t\tconst doctype = await registry.getMeta?.(routeContext)\n\t\t\t\tif (doctype) {\n\t\t\t\t\tregistry.addDoctype(doctype)\n\t\t\t\t\tstonecrop.value.setup(doctype)\n\n\t\t\t\t\t// Set reactive refs for router-based doctype\n\t\t\t\t\trouterDoctype.value = doctype\n\t\t\t\t\trouterRecordId.value = recordId\n\t\t\t\t\thstStore.value = stonecrop.value.getStore()\n\n\t\t\t\t\tif (recordId && recordId !== 'new') {\n\t\t\t\t\t\tconst existingRecord = stonecrop.value.getRecordById(doctype, recordId)\n\t\t\t\t\t\tif (existingRecord) {\n\t\t\t\t\t\t\tformData.value = existingRecord.get('') || {}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tawait stonecrop.value.getRecord(doctype, recordId)\n\t\t\t\t\t\t\t\tconst loadedRecord = stonecrop.value.getRecordById(doctype, recordId)\n\t\t\t\t\t\t\t\tif (loadedRecord) {\n\t\t\t\t\t\t\t\t\tformData.value = loadedRecord.get('') || {}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} catch {\n\t\t\t\t\t\t\t\tformData.value = initializeNewRecord(doctype)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tformData.value = initializeNewRecord(doctype)\n\t\t\t\t\t}\n\n\t\t\t\t\tif (hstStore.value) {\n\t\t\t\t\t\tsetupDeepReactivity(doctype, recordId || 'new', formData, hstStore.value)\n\t\t\t\t\t}\n\n\t\t\t\t\tstonecrop.value.runAction(doctype, 'load', recordId ? [recordId] : undefined)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Handle HST integration if doctype is provided explicitly\n\t\tif (options.doctype) {\n\t\t\thstStore.value = stonecrop.value.getStore()\n\t\t\tconst doctype = options.doctype\n\t\t\tconst recordId = options.recordId\n\n\t\t\tif (recordId && recordId !== 'new') {\n\t\t\t\tconst existingRecord = stonecrop.value.getRecordById(doctype, recordId)\n\t\t\t\tif (existingRecord) {\n\t\t\t\t\tformData.value = existingRecord.get('') || {}\n\t\t\t\t} else {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tawait stonecrop.value.getRecord(doctype, recordId)\n\t\t\t\t\t\tconst loadedRecord = stonecrop.value.getRecordById(doctype, recordId)\n\t\t\t\t\t\tif (loadedRecord) {\n\t\t\t\t\t\t\tformData.value = loadedRecord.get('') || {}\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch {\n\t\t\t\t\t\tformData.value = initializeNewRecord(doctype)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tformData.value = initializeNewRecord(doctype)\n\t\t\t}\n\n\t\t\tif (hstStore.value) {\n\t\t\t\tsetupDeepReactivity(doctype, recordId || 'new', formData, hstStore.value)\n\t\t\t}\n\t\t}\n\t})\n\n\t// HST integration functions - always created but only populated when HST is available\n\tconst provideHSTPath = (fieldname: string, customRecordId?: string): string => {\n\t\tconst doctype = options.doctype || routerDoctype.value\n\t\tif (!doctype) return ''\n\n\t\tconst actualRecordId = customRecordId || options.recordId || routerRecordId.value || 'new'\n\t\treturn `${doctype.slug}.${actualRecordId}.${fieldname}`\n\t}\n\n\tconst handleHSTChange = (changeData: HSTChangeData): void => {\n\t\tconst doctype = options.doctype || routerDoctype.value\n\t\tif (!hstStore.value || !stonecrop.value || !doctype) {\n\t\t\treturn\n\t\t}\n\n\t\ttry {\n\t\t\tconst pathParts = changeData.path.split('.')\n\t\t\tif (pathParts.length >= 2) {\n\t\t\t\tconst doctypeSlug = pathParts[0]\n\t\t\t\tconst recordId = pathParts[1]\n\n\t\t\t\tif (!hstStore.value.has(`${doctypeSlug}.${recordId}`)) {\n\t\t\t\t\tstonecrop.value.addRecord(doctype, recordId, { ...formData.value })\n\t\t\t\t}\n\n\t\t\t\tif (pathParts.length > 3) {\n\t\t\t\t\tconst recordPath = `${doctypeSlug}.${recordId}`\n\t\t\t\t\tconst nestedParts = pathParts.slice(2)\n\n\t\t\t\t\tlet currentPath = recordPath\n\t\t\t\t\tfor (let i = 0; i < nestedParts.length - 1; i++) {\n\t\t\t\t\t\tcurrentPath += `.${nestedParts[i]}`\n\n\t\t\t\t\t\tif (!hstStore.value.has(currentPath)) {\n\t\t\t\t\t\t\tconst nextPart = nestedParts[i + 1]\n\t\t\t\t\t\t\tconst isArray = !isNaN(Number(nextPart))\n\t\t\t\t\t\t\thstStore.value.set(currentPath, isArray ? [] : {})\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\thstStore.value.set(changeData.path, changeData.value)\n\n\t\t\tconst fieldParts = changeData.fieldname.split('.')\n\t\t\tconst newFormData = { ...formData.value }\n\n\t\t\tif (fieldParts.length === 1) {\n\t\t\t\tnewFormData[fieldParts[0]] = changeData.value\n\t\t\t} else {\n\t\t\t\tupdateNestedObject(newFormData, fieldParts, changeData.value)\n\t\t\t}\n\n\t\t\tformData.value = newFormData\n\t\t} catch {\n\t\t\t// Silently handle errors\n\t\t}\n\t}\n\n\t// Provide injection tokens if HST will be available\n\tif (options.doctype || registry?.router) {\n\t\tprovide('hstPathProvider', provideHSTPath)\n\t\tprovide('hstChangeHandler', handleHSTChange)\n\t}\n\n\t// Create operation log API object\n\tconst operationLog: OperationLogAPI = {\n\t\toperations,\n\t\tcurrentIndex,\n\t\tundoRedoState,\n\t\tcanUndo,\n\t\tcanRedo,\n\t\tundoCount,\n\t\tredoCount,\n\t\tundo,\n\t\tredo,\n\t\tstartBatch,\n\t\tcommitBatch,\n\t\tcancelBatch,\n\t\tclear,\n\t\tgetOperationsFor,\n\t\tgetSnapshot,\n\t\tmarkIrreversible,\n\t\tlogAction,\n\t\tconfigure,\n\t}\n\t// Always return HST functions if doctype is provided or will be loaded from router\n\tif (options.doctype) {\n\t\t// Explicit doctype - return HST immediately\n\t\treturn {\n\t\t\tstonecrop,\n\t\t\toperationLog,\n\t\t\tprovideHSTPath,\n\t\t\thandleHSTChange,\n\t\t\thstStore,\n\t\t\tformData,\n\t\t} as HSTStonecropReturn\n\t} else if (!options.doctype && registry?.router) {\n\t\t// Router-based - return HST (will be populated after mount)\n\t\treturn {\n\t\t\tstonecrop,\n\t\t\toperationLog,\n\t\t\tprovideHSTPath,\n\t\t\thandleHSTChange,\n\t\t\thstStore,\n\t\t\tformData,\n\t\t} as HSTStonecropReturn\n\t}\n\n\t// No doctype and no router - basic mode\n\treturn {\n\t\tstonecrop,\n\t\toperationLog,\n\t} as BaseStonecropReturn\n}\n\n/**\n * Initialize new record structure based on doctype schema\n */\nfunction initializeNewRecord(doctype: DoctypeMeta): Record<string, any> {\n\tconst initialData: Record<string, any> = {}\n\n\tif (!doctype.schema) {\n\t\treturn initialData\n\t}\n\n\tdoctype.schema.forEach(field => {\n\t\tconst fieldtype = 'fieldtype' in field ? field.fieldtype : 'Data'\n\n\t\tswitch (fieldtype) {\n\t\t\tcase 'Data':\n\t\t\tcase 'Text':\n\t\t\t\tinitialData[field.fieldname] = ''\n\t\t\t\tbreak\n\t\t\tcase 'Check':\n\t\t\t\tinitialData[field.fieldname] = false\n\t\t\t\tbreak\n\t\t\tcase 'Int':\n\t\t\tcase 'Float':\n\t\t\t\tinitialData[field.fieldname] = 0\n\t\t\t\tbreak\n\t\t\tcase 'Table':\n\t\t\t\tinitialData[field.fieldname] = []\n\t\t\t\tbreak\n\t\t\tcase 'JSON':\n\t\t\t\tinitialData[field.fieldname] = {}\n\t\t\t\tbreak\n\t\t\tdefault:\n\t\t\t\tinitialData[field.fieldname] = null\n\t\t}\n\t})\n\n\treturn initialData\n}\n\n/**\n * Setup deep reactivity between form data and HST store\n */\nfunction setupDeepReactivity(\n\tdoctype: DoctypeMeta,\n\trecordId: string,\n\tformData: Ref<Record<string, any>>,\n\thstStore: HSTNode\n): void {\n\twatch(\n\t\tformData,\n\t\tnewData => {\n\t\t\tconst recordPath = `${doctype.slug}.${recordId}`\n\n\t\t\tObject.keys(newData).forEach(fieldname => {\n\t\t\t\tconst path = `${recordPath}.${fieldname}`\n\t\t\t\ttry {\n\t\t\t\t\thstStore.set(path, newData[fieldname])\n\t\t\t\t} catch {\n\t\t\t\t\t// Silently handle errors\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\t\t{ deep: true }\n\t)\n}\n\n/**\n * Update nested object with dot-notation path\n */\nfunction updateNestedObject(obj: any, path: string[], value: any): void {\n\tlet current = obj as Record<string, any>\n\n\tfor (let i = 0; i < path.length - 1; i++) {\n\t\tconst key = path[i]\n\n\t\tif (!(key in current) || typeof current[key] !== 'object') {\n\t\t\tcurrent[key] = isNaN(Number(path[i + 1])) ? {} : []\n\t\t}\n\n\t\tcurrent = current[key] as Record<string, any>\n\t}\n\n\tconst finalKey = path[path.length - 1]\n\tcurrent[finalKey] = value\n}\n","import { useMagicKeys, whenever } from '@vueuse/core'\nimport { storeToRefs } from 'pinia'\nimport { inject } from 'vue'\n\nimport type { HSTNode } from '../stores/hst'\nimport { useOperationLogStore } from '../stores/operation-log'\nimport type { OperationLogConfig } from '../types/operation-log'\n\n/**\n * Composable for operation log management\n * Provides easy access to undo/redo functionality and operation history\n *\n * @param config - Optional configuration for the operation log\n * @returns Operation log interface\n *\n * @example\n * ```typescript\n * const { undo, redo, canUndo, canRedo, operations, configure } = useOperationLog()\n *\n * // Configure the log\n * configure({\n * maxOperations: 50,\n * enableCrossTabSync: true,\n * enablePersistence: true\n * })\n *\n * // Undo/redo\n * await undo(hstStore)\n * await redo(hstStore)\n * ```\n *\n * @public\n */\nexport function useOperationLog(config?: Partial<OperationLogConfig>) {\n\t// Try to use the injected store from the Stonecrop plugin first\n\t// This ensures we use the same Pinia instance as the app\n\tconst injectedStore = inject<ReturnType<typeof useOperationLogStore> | undefined>('$operationLogStore', undefined)\n\tconst store = injectedStore || useOperationLogStore()\n\n\t// Apply configuration if provided\n\tif (config) {\n\t\tstore.configure(config)\n\t}\n\n\t// Extract reactive state\n\tconst { operations, currentIndex, undoRedoState, canUndo, canRedo, undoCount, redoCount } = storeToRefs(store)\n\n\t/**\n\t * Undo the last operation\n\t */\n\tfunction undo(hstStore: HSTNode): boolean {\n\t\treturn store.undo(hstStore)\n\t}\n\n\t/**\n\t * Redo the next operation\n\t */\n\tfunction redo(hstStore: HSTNode): boolean {\n\t\treturn store.redo(hstStore)\n\t}\n\n\t/**\n\t * Start a batch operation\n\t */\n\tfunction startBatch() {\n\t\tstore.startBatch()\n\t}\n\n\t/**\n\t * Commit the current batch\n\t */\n\tfunction commitBatch(description?: string): string | null {\n\t\treturn store.commitBatch(description)\n\t}\n\n\t/**\n\t * Cancel the current batch\n\t */\n\tfunction cancelBatch() {\n\t\tstore.cancelBatch()\n\t}\n\n\t/**\n\t * Clear all operations\n\t */\n\tfunction clear() {\n\t\tstore.clear()\n\t}\n\n\t/**\n\t * Get operations for a specific doctype/record\n\t */\n\tfunction getOperationsFor(doctype: string, recordId?: string) {\n\t\treturn store.getOperationsFor(doctype, recordId)\n\t}\n\n\t/**\n\t * Get a snapshot of the operation log\n\t */\n\tfunction getSnapshot() {\n\t\treturn store.getSnapshot()\n\t}\n\n\t/**\n\t * Mark an operation as irreversible\n\t * @param operationId - The ID of the operation to mark\n\t * @param reason - The reason why the operation is irreversible\n\t */\n\tfunction markIrreversible(operationId: string, reason: string) {\n\t\tstore.markIrreversible(operationId, reason)\n\t}\n\n\t/**\n\t * Log an action execution (stateless actions like print, email, etc.)\n\t * @param doctype - The doctype the action was executed on\n\t * @param actionName - The name of the action that was executed\n\t * @param recordIds - Optional array of record IDs the action was executed on\n\t * @param result - The result of the action execution\n\t * @param error - Optional error message if action failed\n\t * @returns The operation ID\n\t */\n\tfunction logAction(\n\t\tdoctype: string,\n\t\tactionName: string,\n\t\trecordIds?: string[],\n\t\tresult: 'success' | 'failure' | 'pending' = 'success',\n\t\terror?: string\n\t): string {\n\t\treturn store.logAction(doctype, actionName, recordIds, result, error)\n\t}\n\n\t/**\n\t * Update configuration\n\t * @param options - Configuration options to update\n\t */\n\tfunction configure(options: Partial<OperationLogConfig>) {\n\t\tstore.configure(options)\n\t}\n\n\treturn {\n\t\t// State\n\t\toperations,\n\t\tcurrentIndex,\n\t\tundoRedoState,\n\t\tcanUndo,\n\t\tcanRedo,\n\t\tundoCount,\n\t\tredoCount,\n\n\t\t// Methods\n\t\tundo,\n\t\tredo,\n\t\tstartBatch,\n\t\tcommitBatch,\n\t\tcancelBatch,\n\t\tclear,\n\t\tgetOperationsFor,\n\t\tgetSnapshot,\n\t\tmarkIrreversible,\n\t\tlogAction,\n\t\tconfigure,\n\t}\n}\n\n/**\n * Keyboard shortcut handler for undo/redo\n * Automatically binds Ctrl+Z (undo) and Ctrl+Shift+Z/Ctrl+Y (redo) using VueUse\n *\n * @param hstStore - The HST store to operate on\n * @param enabled - Whether shortcuts are enabled (default: true)\n *\n * @example\n * ```typescript\n * import { onMounted } from 'vue'\n *\n * const stonecrop = useStonecrop({ doctype, recordId })\n * useUndoRedoShortcuts(stonecrop.hstStore)\n * ```\n *\n * @public\n */\nexport function useUndoRedoShortcuts(hstStore: HSTNode, enabled = true) {\n\tif (!enabled) return\n\n\tconst { undo, redo, canUndo, canRedo } = useOperationLog()\n\tconst keys = useMagicKeys()\n\n\t// Undo shortcuts: Ctrl+Z or Cmd+Z (Mac)\n\twhenever(keys['Ctrl+Z'], () => {\n\t\tif (canUndo.value) {\n\t\t\tundo(hstStore)\n\t\t}\n\t})\n\n\twhenever(keys['Meta+Z'], () => {\n\t\tif (canUndo.value) {\n\t\t\tundo(hstStore)\n\t\t}\n\t})\n\n\t// Redo shortcuts: Ctrl+Shift+Z, Cmd+Shift+Z (Mac), or Ctrl+Y\n\twhenever(keys['Ctrl+Shift+Z'], () => {\n\t\tif (canRedo.value) {\n\t\t\tredo(hstStore)\n\t\t}\n\t})\n\n\twhenever(keys['Meta+Shift+Z'], () => {\n\t\tif (canRedo.value) {\n\t\t\tredo(hstStore)\n\t\t}\n\t})\n\n\twhenever(keys['Ctrl+Y'], () => {\n\t\tif (canRedo.value) {\n\t\t\tredo(hstStore)\n\t\t}\n\t})\n}\n\n/**\n * Batch operation helper\n * Wraps a function execution in a batch operation\n *\n * @param fn - The function to execute within a batch\n * @param description - Optional description for the batch\n * @returns The batch operation ID\n *\n * @example\n * ```typescript\n * const { withBatch } = useOperationLog()\n *\n * const batchId = await withBatch(() => {\n * hstStore.set('task.123.title', 'New Title')\n * hstStore.set('task.123.status', 'active')\n * hstStore.set('task.123.priority', 'high')\n * }, 'Update task details')\n * ```\n *\n * @public\n */\nexport async function withBatch<T>(fn: () => T | Promise<T>, description?: string): Promise<string | null> {\n\tconst { startBatch, commitBatch, cancelBatch } = useOperationLog()\n\n\tstartBatch()\n\n\ttry {\n\t\tawait fn()\n\t\treturn commitBatch(description)\n\t} catch (error) {\n\t\tcancelBatch()\n\t\tthrow error\n\t}\n}\n","import { Component } from 'vue'\n\nimport type { ImmutableDoctype } from './types'\n\n/**\n * Doctype Meta class\n * @public\n */\nexport default class DoctypeMeta {\n\t/**\n\t * The doctype name\n\t * @public\n\t * @readonly\n\t */\n\treadonly doctype: string\n\n\t/**\n\t * The doctype schema\n\t * @public\n\t * @readonly\n\t */\n\treadonly schema: ImmutableDoctype['schema']\n\n\t/**\n\t * The doctype workflow\n\t * @public\n\t * @readonly\n\t */\n\treadonly workflow: ImmutableDoctype['workflow']\n\n\t/**\n\t * The doctype actions and field triggers\n\t * @public\n\t * @readonly\n\t */\n\treadonly actions: ImmutableDoctype['actions']\n\n\t/**\n\t * The doctype component\n\t * @public\n\t * @readonly\n\t */\n\treadonly component?: Component\n\n\t/**\n\t * Creates a new DoctypeMeta instance\n\t * @param doctype - The doctype name\n\t * @param schema - The doctype schema definition\n\t * @param workflow - The doctype workflow configuration (XState machine)\n\t * @param actions - The doctype actions and field triggers\n\t * @param component - Optional Vue component for rendering the doctype\n\t */\n\tconstructor(\n\t\tdoctype: string,\n\t\tschema: ImmutableDoctype['schema'],\n\t\tworkflow: ImmutableDoctype['workflow'],\n\t\tactions: ImmutableDoctype['actions'],\n\t\tcomponent?: Component\n\t) {\n\t\tthis.doctype = doctype\n\t\tthis.schema = schema\n\t\tthis.workflow = workflow\n\t\tthis.actions = actions\n\t\tthis.component = component\n\t}\n\n\t/**\n\t * Converts the registered doctype string to a slug (kebab-case). The following conversions are made:\n\t * - It replaces camelCase and PascalCase with kebab-case strings\n\t * - It replaces spaces and underscores with hyphens\n\t * - It converts the string to lowercase\n\t *\n\t * @returns The slugified doctype string\n\t *\n\t * @example\n\t * ```ts\n\t * const doctype = new DoctypeMeta('TaskItem', schema, workflow, actions\n\t * console.log(doctype.slug) // 'task-item'\n\t * ```\n\t *\n\t * @public\n\t */\n\tget slug() {\n\t\treturn this.doctype\n\t\t\t.replace(/([a-z])([A-Z])/g, '$1-$2')\n\t\t\t.replace(/[\\s_]+/g, '-')\n\t\t\t.toLowerCase()\n\t}\n}\n","import { Router } from 'vue-router'\n\nimport DoctypeMeta from './doctype'\nimport { getGlobalTriggerEngine } from './field-triggers'\nimport { RouteContext } from './types/registry'\n\n/**\n * Stonecrop Registry class\n * @public\n */\nexport default class Registry {\n\t/**\n\t * The root Registry instance\n\t */\n\tstatic _root: Registry\n\n\t/**\n\t * The name of the Registry instance\n\t *\n\t * @defaultValue 'Registry'\n\t */\n\treadonly name: string\n\n\t/**\n\t * The registry property contains a collection of doctypes\n\t * @see {@link DoctypeMeta}\n\t */\n\treadonly registry: Record<string, DoctypeMeta>\n\n\t/**\n\t * The Vue router instance\n\t * @see {@link https://router.vuejs.org/}\n\t */\n\treadonly router?: Router\n\n\t/**\n\t * Creates a new Registry instance (singleton pattern)\n\t * @param router - Optional Vue router instance for route management\n\t * @param getMeta - Optional function to fetch doctype metadata from an API\n\t */\n\tconstructor(router?: Router, getMeta?: (routeContext: RouteContext) => DoctypeMeta | Promise<DoctypeMeta>) {\n\t\tif (Registry._root) {\n\t\t\treturn Registry._root\n\t\t}\n\t\tRegistry._root = this\n\t\tthis.name = 'Registry'\n\t\tthis.registry = {}\n\t\tthis.router = router\n\t\tthis.getMeta = getMeta\n\t}\n\n\t/**\n\t * The getMeta function fetches doctype metadata from an API based on route context\n\t * @see {@link DoctypeMeta}\n\t */\n\tgetMeta?: (routeContext: RouteContext) => DoctypeMeta | Promise<DoctypeMeta>\n\n\t/**\n\t * Get doctype metadata\n\t * @param doctype - The doctype to fetch metadata for\n\t * @returns The doctype metadata\n\t * @see {@link DoctypeMeta}\n\t */\n\taddDoctype(doctype: DoctypeMeta) {\n\t\tif (!(doctype.doctype in Object.keys(this.registry))) {\n\t\t\tthis.registry[doctype.slug] = doctype\n\t\t}\n\n\t\t// Register actions (including field triggers) with the field trigger engine\n\t\tconst triggerEngine = getGlobalTriggerEngine()\n\t\t// Register under both doctype name and slug to handle different lookup patterns\n\t\ttriggerEngine.registerDoctypeActions(doctype.doctype, doctype.actions)\n\t\tif (doctype.slug !== doctype.doctype) {\n\t\t\ttriggerEngine.registerDoctypeActions(doctype.slug, doctype.actions)\n\t\t}\n\n\t\tif (doctype.component && this.router && !this.router.hasRoute(doctype.doctype)) {\n\t\t\tthis.router.addRoute({\n\t\t\t\tpath: `/${doctype.slug}`,\n\t\t\t\tname: doctype.slug,\n\t\t\t\tcomponent: doctype.component,\n\t\t\t})\n\t\t}\n\t}\n\n\t// TODO: should we allow clearing the registry at all?\n\t// clear() {\n\t// \tthis.registry = {}\n\t// \tif (this.router) {\n\t// \t\tconst routes = this.router.getRoutes()\n\t// \t\tfor (const route of routes) {\n\t// \t\t\tif (route.name) {\n\t// \t\t\t\tthis.router.removeRoute(route.name)\n\t// \t\t\t}\n\t// \t\t}\n\t// \t}\n\t// }\n}\n","import { App, type Plugin, nextTick } from 'vue'\nimport type { Pinia } from 'pinia'\n\nimport Registry from '../registry'\nimport { Stonecrop } from '../stonecrop'\nimport type { InstallOptions } from '../types'\nimport { useOperationLogStore } from '../stores/operation-log'\n\n/**\n * Setup auto-initialization for user-defined initialization logic\n * This function handles the post-mount initialization automatically\n */\nasync function setupAutoInitialization(\n\tregistry: Registry,\n\tstonecrop: Stonecrop,\n\tonRouterInitialized: (registry: Registry, stonecrop: Stonecrop) => void | Promise<void>\n) {\n\t// Wait for the next tick to ensure the app is mounted\n\tawait nextTick()\n\n\ttry {\n\t\tawait onRouterInitialized(registry, stonecrop)\n\t} catch {\n\t\t// Silent error handling - application should handle initialization errors\n\t}\n}\n\n/**\n * Stonecrop Vue plugin\n * @param app - The Vue app instance\n * @param options - The plugin options\n * @example\n * ```ts\n * import { createApp } from 'vue'\n * import Stonecrop from '@stonecrop/stonecrop'\n * import router from './router'\n *\n * const app = createApp(App)\n * app.use(Stonecrop, {\n * router,\n * getMeta: async (routeContext) => {\n * // routeContext contains: { path, segments }\n * // fetch doctype meta from your API using the route context\n * },\n * autoInitializeRouter: true,\n * onRouterInitialized: async (registry, stonecrop) => {\n * // your custom initialization logic here\n * }\n * })\n * app.mount('#app')\n * ```\n * @public\n */\nconst plugin: Plugin = {\n\tinstall: (app: App, options?: InstallOptions) => {\n\t\t// Check for existing router installation\n\t\tconst existingRouter = app.config.globalProperties.$router\n\t\tconst providedRouter = options?.router\n\t\tconst router = existingRouter || providedRouter\n\t\tif (!existingRouter && providedRouter) {\n\t\t\tapp.use(providedRouter)\n\t\t}\n\n\t\t// Create registry with available router\n\t\tconst registry = new Registry(router, options?.getMeta)\n\t\tapp.provide('$registry', registry)\n\t\tapp.config.globalProperties.$registry = registry\n\n\t\t// Create and provide a global Stonecrop instance\n\t\tconst stonecrop = new Stonecrop(registry)\n\t\tapp.provide('$stonecrop', stonecrop)\n\t\tapp.config.globalProperties.$stonecrop = stonecrop\n\n\t\t// Initialize operation log store if Pinia is available\n\t\t// This ensures the store is created with the app's Pinia instance\n\t\ttry {\n\t\t\tconst pinia = app.config.globalProperties.$pinia as Pinia | undefined\n\t\t\tif (pinia) {\n\t\t\t\t// Initialize the operation log store with the app's Pinia instance\n\t\t\t\tconst operationLogStore = useOperationLogStore(pinia)\n\n\t\t\t\t// Provide the store so components can access it\n\t\t\t\tapp.provide('$operationLogStore', operationLogStore)\n\t\t\t\tapp.config.globalProperties.$operationLogStore = operationLogStore\n\t\t\t}\n\t\t} catch (error) {\n\t\t\t// Pinia not available - operation log won't work, but app should still function\n\t\t\tconsole.warn('Pinia not available - operation log features will be disabled:', error)\n\t\t}\n\n\t\t// Register custom components\n\t\tif (options?.components) {\n\t\t\tfor (const [tag, component] of Object.entries(options.components)) {\n\t\t\t\tapp.component(tag, component)\n\t\t\t}\n\t\t}\n\n\t\t// Setup auto-initialization if requested\n\t\tif (options?.autoInitializeRouter && options.onRouterInitialized) {\n\t\t\tvoid setupAutoInitialization(registry, stonecrop, options.onRouterInitialized)\n\t\t}\n\t},\n}\n\nexport default plugin\n"],"names":["IS_CLIENT","activePinia","setActivePinia","pinia","piniaSymbol","isPlainObject","MutationType","patchObject","newState","oldState","key","subPatch","targetValue","isRef","isReactive","noop","addSubscription","subscriptions","callback","detached","onCleanup","removeSubscription","getCurrentScope","onScopeDispose","triggerSubscriptions","args","fallbackRunWithContext","fn","ACTION_MARKER","ACTION_NAME","mergeReactiveObjects","target","patchToApply","value","skipHydrateSymbol","shouldHydrate","obj","assign","isComputed","createOptionsStore","id","options","hot","state","actions","getters","initialState","store","setup","localState","toRefs","ref","computedGetters","name","markRaw","computed","createSetupStore","$id","isOptionsStore","scope","optionsForPlugin","$subscribeOptions","event","isListening","debuggerEvents","isSyncListening","actionSubscriptions","hotState","activeListener","$patch","partialStateOrMutator","subscriptionMutation","myListenerId","nextTick","$reset","$state","$dispose","action","wrappedAction","afterCallbackSet","onErrorCallbackSet","after","onError","ret","error","_hmrPayload","partialStore","stopWatcher","watch","reactive","setupStore","effectScope","prop","toRef","actionValue","toRaw","newStore","stateKey","newStateTarget","oldStateSource","actionName","actionFn","getterName","getter","getterValue","nonEnumerable","p","extender","extensions","defineStore","setupOptions","isSetupStore","useStore","hasContext","hasInjectionContext","inject","hotId","currentInstance","getCurrentInstance","vm","cache","storeToRefs","rawStore","refs","isClient","toString","isObject","val","toRef$1","r","readonly","customRef","createFilterWrapper","filter","wrapper","resolve","reject","bypassFilter","invoke$1","pausableFilter","extendFilter","isActive","pause","resume","eventFilter","toArray","getLifeCycleTarget","watchWithFilter","source","cb","watchOptions","watchPausable","pausableWatch","tryOnMounted","sync","onMounted","watchImmediate","whenever","v","ov","onInvalidate","defaultWindow","unrefElement","elRef","_$el","plain","toValue","useEventListener","register","el","listener","firstParamTargets","test","e","_firstParamTargets$va","_firstParamTargets$va2","unref","raw_targets","raw_events","raw_listeners","raw_options","_","optionsClone","cleanups","_global","globalKey","handlers","getHandlers","getSSRHandler","fallback","guessSerializerType","rawInit","StorageSerializers","customStorageEventName","useStorage","defaults$1","storage","_options$serializer","flush","deep","listenToStorageChanges","writeDefaults","mergeDefaults","shallow","window$1","initOnMounted","data","shallowRef","keyComputed","type","serializer","pauseWatch","resumeWatch","newValue","write","update","firstMounted","onStorageEvent","ev","onStorageCustomEvent","updateFromCustomEvent","dispatchWriteEvent","oldValue","payload","serialized","read","rawValue","serializedData","useLocalStorage","initialValue","DefaultMagicKeysAliasMap","useMagicKeys","useReactive","aliasMap","passive","onEventFired","current","metaDeps","depsMap","usedKeys","setRefs","reset","updateDeps","keys$1","modifier","depsSet","clearDeps","depsMapKey","deps","depsArray","depsIndex","key$1","index","updateRefs","_e$key","_e$code","values","proxy","target$1","rec","i","generateId","serializeForBroadcast","message","op","deserializeFromBroadcast","useOperationLogStore","config","operations","currentIndex","clientId","batchMode","currentBatch","currentBatchId","canUndo","canRedo","undoCount","count","redoCount","undoRedoState","configure","loadFromPersistence","setupPersistenceWatcher","setupCrossTabSync","addOperation","operation","fullOperation","overflow","broadcastOperation","startBatch","commitBatch","description","batchId","allReversible","batchOperation","broadcastBatch","result","cancelBatch","undo","childId","childOp","revertOperation","broadcastUndo","redo","applyOperation","broadcastRedo","getSnapshot","reversibleOps","timestamps","t","clear","getOperationsFor","doctype","recordId","markIrreversible","operationId","reason","logAction","recordIds","broadcastChannel","rawMessage","childOps","batchOp","persistedData","saveToPersistence","FieldTriggerEngine","fieldname","enableRollback","actionMap","transitionMap","context","triggers","startTime","actionResults","stoppedOnError","rolledBack","snapshot","fieldRollbackConfig","rollbackEnabled","actionResult","errorResult","rollbackError","totalExecutionTime","failedResults","failedResult","handlerError","transition","transitionActions","results","doctypeTransitions","timeout","actionTimeout","regularActionFn","executionTime","doctypeActions","actionNames","pattern","patternParts","fieldParts","patternPart","fieldPart","timeoutId","recordPath","recordData","getGlobalTriggerEngine","registerGlobalAction","registerTransitionAction","setFieldRollback","triggerTransition","engine","markOperationIrreversible","getOperationLogStore","HST","globalRegistry","windowRegistry","nodeRegistry","registry","HSTProxy","parentPath","rootNode","parentDoctype","hst","path","fullPath","pathSegments","nodeDoctype","beforeValue","logStore","operationType","segments","segment","triggerEngine","transitionContext","lastSegment","afterValue","hasGetMethod","hasSetMethod","hasHasMethod","hasImmutableMarkers","constructorName","objWithConstructor","nameValue","isImmutableConstructor","createHST","Stonecrop","operationLogConfig","initialStoreStructure","doctypeSlug","originalAddDoctype","slug","doctypeNode","arg","opLogStore","actionError","actionStr","record","useStonecrop","providedStonecrop","stonecrop","hstStore","formData","routerDoctype","routerRecordId","opLogRefs","newOps","newIndex","route","routeContext","existingRecord","loadedRecord","initializeNewRecord","setupDeepReactivity","provideHSTPath","customRecordId","actualRecordId","handleHSTChange","changeData","pathParts","nestedParts","currentPath","nextPart","isArray","newFormData","updateNestedObject","provide","operationLog","initialData","field","newData","finalKey","useOperationLog","useUndoRedoShortcuts","enabled","keys","withBatch","DoctypeMeta","schema","workflow","component","Registry","router","getMeta","setupAutoInitialization","onRouterInitialized","plugin","app","existingRouter","providedRouter","operationLogStore","tag"],"mappings":"6QAQA,MAAMA,EAAY,OAAO,OAAW,IAMpC,IAAIC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Y,EAAO,CAEf,QAAQ,KAAK,iEAAkEA,CAAK,CACrF,CAGA,GAAI3C,GAAS,WACZ,SAAW,CAAC4a,EAAKX,CAAS,IAAK,OAAO,QAAQja,EAAQ,UAAU,EAC/Dwa,EAAI,UAAUI,EAAKX,CAAS,EAK1Bja,GAAS,sBAAwBA,EAAQ,qBACvCqa,GAAwBtF,EAAU0C,EAAWzX,EAAQ,mBAAmB,CAE/E,CACD","x_google_ignoreList":[0,1,2]}
1
+ {"version":3,"file":"stonecrop.umd.cjs","sources":["../../common/temp/node_modules/.pnpm/pinia@3.0.4_typescript@5.9.3_vue@3.5.26_typescript@5.9.3_/node_modules/pinia/dist/pinia.mjs","../../common/temp/node_modules/.pnpm/@vueuse+shared@14.1.0_vue@3.5.26_typescript@5.9.3_/node_modules/@vueuse/shared/dist/index.js","../../common/temp/node_modules/.pnpm/@vueuse+core@14.1.0_vue@3.5.26_typescript@5.9.3_/node_modules/@vueuse/core/dist/index.js","../src/stores/operation-log.ts","../src/field-triggers.ts","../src/stores/hst.ts","../src/stonecrop.ts","../src/composable.ts","../src/composables/operation-log.ts","../src/doctype.ts","../src/registry.ts","../src/plugins/index.ts","../src/schema-validator.ts"],"sourcesContent":["/*!\n * pinia v3.0.4\n * (c) 2025 Eduardo San Martin Morote\n * @license MIT\n */\nimport { hasInjectionContext, inject, toRaw, watch, unref, markRaw, effectScope, ref, isRef, isReactive, getCurrentScope, onScopeDispose, getCurrentInstance, reactive, toRef, nextTick, computed, toRefs } from 'vue';\nimport { setupDevtoolsPlugin } from '@vue/devtools-api';\n\nconst IS_CLIENT = typeof window !== 'undefined';\n\n/**\n * setActivePinia must be called to handle SSR at the top of functions like\n * `fetch`, `setup`, `serverPrefetch` and others\n */\nlet activePinia;\n/**\n * Sets or unsets the active pinia. Used in SSR and internally when calling\n * actions and getters\n *\n * @param pinia - Pinia instance\n */\n// @ts-expect-error: cannot constrain the type of the return\nconst setActivePinia = (pinia) => (activePinia = pinia);\n/**\n * Get the currently active pinia if there is any.\n */\nconst getActivePinia = (process.env.NODE_ENV !== 'production')\n ? () => {\n const pinia = hasInjectionContext() && inject(piniaSymbol);\n if (!pinia && !IS_CLIENT) {\n console.error(`[🍍]: Pinia instance not found in context. This falls back to the global activePinia which exposes you to cross-request pollution on the server. Most of the time, it means you are calling \"useStore()\" in the wrong place.\\n` +\n `Read https://vuejs.org/guide/reusability/composables.html to learn more`);\n }\n return pinia || activePinia;\n }\n : () => (hasInjectionContext() && inject(piniaSymbol)) || activePinia;\nconst piniaSymbol = ((process.env.NODE_ENV !== 'production') ? Symbol('pinia') : /* istanbul ignore next */ Symbol());\n\nfunction isPlainObject(\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\no) {\n return (o &&\n typeof o === 'object' &&\n Object.prototype.toString.call(o) === '[object Object]' &&\n typeof o.toJSON !== 'function');\n}\n// type DeepReadonly<T> = { readonly [P in keyof T]: DeepReadonly<T[P]> }\n// TODO: can we change these to numbers?\n/**\n * Possible types for SubscriptionCallback\n */\nvar MutationType;\n(function (MutationType) {\n /**\n * Direct mutation of the state:\n *\n * - `store.name = 'new name'`\n * - `store.$state.name = 'new name'`\n * - `store.list.push('new item')`\n */\n MutationType[\"direct\"] = \"direct\";\n /**\n * Mutated the state with `$patch` and an object\n *\n * - `store.$patch({ name: 'newName' })`\n */\n MutationType[\"patchObject\"] = \"patch object\";\n /**\n * Mutated the state with `$patch` and a function\n *\n * - `store.$patch(state => state.name = 'newName')`\n */\n MutationType[\"patchFunction\"] = \"patch function\";\n // maybe reset? for $state = {} and $reset\n})(MutationType || (MutationType = {}));\n\n/*\n * FileSaver.js A saveAs() FileSaver implementation.\n *\n * Originally by Eli Grey, adapted as an ESM module by Eduardo San Martin\n * Morote.\n *\n * License : MIT\n */\n// The one and only way of getting global scope in all environments\n// https://stackoverflow.com/q/3277182/1008999\nconst _global = /*#__PURE__*/ (() => typeof window === 'object' && window.window === window\n ? window\n : typeof self === 'object' && self.self === self\n ? self\n : typeof global === 'object' && global.global === global\n ? global\n : typeof globalThis === 'object'\n ? globalThis\n : { HTMLElement: null })();\nfunction bom(blob, { autoBom = false } = {}) {\n // prepend BOM for UTF-8 XML and text/* types (including HTML)\n // note: your browser will automatically convert UTF-16 U+FEFF to EF BB BF\n if (autoBom &&\n /^\\s*(?:text\\/\\S*|application\\/xml|\\S*\\/\\S*\\+xml)\\s*;.*charset\\s*=\\s*utf-8/i.test(blob.type)) {\n return new Blob([String.fromCharCode(0xfeff), blob], { type: blob.type });\n }\n return blob;\n}\nfunction download(url, name, opts) {\n const xhr = new XMLHttpRequest();\n xhr.open('GET', url);\n xhr.responseType = 'blob';\n xhr.onload = function () {\n saveAs(xhr.response, name, opts);\n };\n xhr.onerror = function () {\n console.error('could not download file');\n };\n xhr.send();\n}\nfunction corsEnabled(url) {\n const xhr = new XMLHttpRequest();\n // use sync to avoid popup blocker\n xhr.open('HEAD', url, false);\n try {\n xhr.send();\n }\n catch (e) { }\n return xhr.status >= 200 && xhr.status <= 299;\n}\n// `a.click()` doesn't work for all browsers (#465)\nfunction click(node) {\n try {\n node.dispatchEvent(new MouseEvent('click'));\n }\n catch (e) {\n const evt = new MouseEvent('click', {\n bubbles: true,\n cancelable: true,\n view: window,\n detail: 0,\n screenX: 80,\n screenY: 20,\n clientX: 80,\n clientY: 20,\n ctrlKey: false,\n altKey: false,\n shiftKey: false,\n metaKey: false,\n button: 0,\n relatedTarget: null,\n });\n node.dispatchEvent(evt);\n }\n}\nconst _navigator = typeof navigator === 'object' ? navigator : { userAgent: '' };\n// Detect WebView inside a native macOS app by ruling out all browsers\n// We just need to check for 'Safari' because all other browsers (besides Firefox) include that too\n// https://www.whatismybrowser.com/guides/the-latest-user-agent/macos\nconst isMacOSWebView = /*#__PURE__*/ (() => /Macintosh/.test(_navigator.userAgent) &&\n /AppleWebKit/.test(_navigator.userAgent) &&\n !/Safari/.test(_navigator.userAgent))();\nconst saveAs = !IS_CLIENT\n ? () => { } // noop\n : // Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program\n typeof HTMLAnchorElement !== 'undefined' &&\n 'download' in HTMLAnchorElement.prototype &&\n !isMacOSWebView\n ? downloadSaveAs\n : // Use msSaveOrOpenBlob as a second approach\n 'msSaveOrOpenBlob' in _navigator\n ? msSaveAs\n : // Fallback to using FileReader and a popup\n fileSaverSaveAs;\nfunction downloadSaveAs(blob, name = 'download', opts) {\n const a = document.createElement('a');\n a.download = name;\n a.rel = 'noopener'; // tabnabbing\n // TODO: detect chrome extensions & packaged apps\n // a.target = '_blank'\n if (typeof blob === 'string') {\n // Support regular links\n a.href = blob;\n if (a.origin !== location.origin) {\n if (corsEnabled(a.href)) {\n download(blob, name, opts);\n }\n else {\n a.target = '_blank';\n click(a);\n }\n }\n else {\n click(a);\n }\n }\n else {\n // Support blobs\n a.href = URL.createObjectURL(blob);\n setTimeout(function () {\n URL.revokeObjectURL(a.href);\n }, 4e4); // 40s\n setTimeout(function () {\n click(a);\n }, 0);\n }\n}\nfunction msSaveAs(blob, name = 'download', opts) {\n if (typeof blob === 'string') {\n if (corsEnabled(blob)) {\n download(blob, name, opts);\n }\n else {\n const a = document.createElement('a');\n a.href = blob;\n a.target = '_blank';\n setTimeout(function () {\n click(a);\n });\n }\n }\n else {\n // @ts-ignore: works on windows\n navigator.msSaveOrOpenBlob(bom(blob, opts), name);\n }\n}\nfunction fileSaverSaveAs(blob, name, opts, popup) {\n // Open a popup immediately do go around popup blocker\n // Mostly only available on user interaction and the fileReader is async so...\n popup = popup || open('', '_blank');\n if (popup) {\n popup.document.title = popup.document.body.innerText = 'downloading...';\n }\n if (typeof blob === 'string')\n return download(blob, name, opts);\n const force = blob.type === 'application/octet-stream';\n const isSafari = /constructor/i.test(String(_global.HTMLElement)) || 'safari' in _global;\n const isChromeIOS = /CriOS\\/[\\d]+/.test(navigator.userAgent);\n if ((isChromeIOS || (force && isSafari) || isMacOSWebView) &&\n typeof FileReader !== 'undefined') {\n // Safari doesn't allow downloading of blob URLs\n const reader = new FileReader();\n reader.onloadend = function () {\n let url = reader.result;\n if (typeof url !== 'string') {\n popup = null;\n throw new Error('Wrong reader.result type');\n }\n url = isChromeIOS\n ? url\n : url.replace(/^data:[^;]*;/, 'data:attachment/file;');\n if (popup) {\n popup.location.href = url;\n }\n else {\n location.assign(url);\n }\n popup = null; // reverse-tabnabbing #460\n };\n reader.readAsDataURL(blob);\n }\n else {\n const url = URL.createObjectURL(blob);\n if (popup)\n popup.location.assign(url);\n else\n location.href = url;\n popup = null; // reverse-tabnabbing #460\n setTimeout(function () {\n URL.revokeObjectURL(url);\n }, 4e4); // 40s\n }\n}\n\n/**\n * Shows a toast or console.log\n *\n * @param message - message to log\n * @param type - different color of the tooltip\n */\nfunction toastMessage(message, type) {\n const piniaMessage = '🍍 ' + message;\n if (typeof __VUE_DEVTOOLS_TOAST__ === 'function') {\n // No longer available :(\n __VUE_DEVTOOLS_TOAST__(piniaMessage, type);\n }\n else if (type === 'error') {\n console.error(piniaMessage);\n }\n else if (type === 'warn') {\n console.warn(piniaMessage);\n }\n else {\n console.log(piniaMessage);\n }\n}\nfunction isPinia(o) {\n return '_a' in o && 'install' in o;\n}\n\n/**\n * This file contain devtools actions, they are not Pinia actions.\n */\n// ---\nfunction checkClipboardAccess() {\n if (!('clipboard' in navigator)) {\n toastMessage(`Your browser doesn't support the Clipboard API`, 'error');\n return true;\n }\n}\nfunction checkNotFocusedError(error) {\n if (error instanceof Error &&\n error.message.toLowerCase().includes('document is not focused')) {\n toastMessage('You need to activate the \"Emulate a focused page\" setting in the \"Rendering\" panel of devtools.', 'warn');\n return true;\n }\n return false;\n}\nasync function actionGlobalCopyState(pinia) {\n if (checkClipboardAccess())\n return;\n try {\n await navigator.clipboard.writeText(JSON.stringify(pinia.state.value));\n toastMessage('Global state copied to clipboard.');\n }\n catch (error) {\n if (checkNotFocusedError(error))\n return;\n toastMessage(`Failed to serialize the state. Check the console for more details.`, 'error');\n console.error(error);\n }\n}\nasync function actionGlobalPasteState(pinia) {\n if (checkClipboardAccess())\n return;\n try {\n loadStoresState(pinia, JSON.parse(await navigator.clipboard.readText()));\n toastMessage('Global state pasted from clipboard.');\n }\n catch (error) {\n if (checkNotFocusedError(error))\n return;\n toastMessage(`Failed to deserialize the state from clipboard. Check the console for more details.`, 'error');\n console.error(error);\n }\n}\nasync function actionGlobalSaveState(pinia) {\n try {\n saveAs(new Blob([JSON.stringify(pinia.state.value)], {\n type: 'text/plain;charset=utf-8',\n }), 'pinia-state.json');\n }\n catch (error) {\n toastMessage(`Failed to export the state as JSON. Check the console for more details.`, 'error');\n console.error(error);\n }\n}\nlet fileInput;\nfunction getFileOpener() {\n if (!fileInput) {\n fileInput = document.createElement('input');\n fileInput.type = 'file';\n fileInput.accept = '.json';\n }\n function openFile() {\n return new Promise((resolve, reject) => {\n fileInput.onchange = async () => {\n const files = fileInput.files;\n if (!files)\n return resolve(null);\n const file = files.item(0);\n if (!file)\n return resolve(null);\n return resolve({ text: await file.text(), file });\n };\n // @ts-ignore: TODO: changed from 4.3 to 4.4\n fileInput.oncancel = () => resolve(null);\n fileInput.onerror = reject;\n fileInput.click();\n });\n }\n return openFile;\n}\nasync function actionGlobalOpenStateFile(pinia) {\n try {\n const open = getFileOpener();\n const result = await open();\n if (!result)\n return;\n const { text, file } = result;\n loadStoresState(pinia, JSON.parse(text));\n toastMessage(`Global state imported from \"${file.name}\".`);\n }\n catch (error) {\n toastMessage(`Failed to import the state from JSON. Check the console for more details.`, 'error');\n console.error(error);\n }\n}\nfunction loadStoresState(pinia, state) {\n for (const key in state) {\n const storeState = pinia.state.value[key];\n // store is already instantiated, patch it\n if (storeState) {\n Object.assign(storeState, state[key]);\n }\n else {\n // store is not instantiated, set the initial state\n pinia.state.value[key] = state[key];\n }\n }\n}\n\nfunction formatDisplay(display) {\n return {\n _custom: {\n display,\n },\n };\n}\nconst PINIA_ROOT_LABEL = '🍍 Pinia (root)';\nconst PINIA_ROOT_ID = '_root';\nfunction formatStoreForInspectorTree(store) {\n return isPinia(store)\n ? {\n id: PINIA_ROOT_ID,\n label: PINIA_ROOT_LABEL,\n }\n : {\n id: store.$id,\n label: store.$id,\n };\n}\nfunction formatStoreForInspectorState(store) {\n if (isPinia(store)) {\n const storeNames = Array.from(store._s.keys());\n const storeMap = store._s;\n const state = {\n state: storeNames.map((storeId) => ({\n editable: true,\n key: storeId,\n value: store.state.value[storeId],\n })),\n getters: storeNames\n .filter((id) => storeMap.get(id)._getters)\n .map((id) => {\n const store = storeMap.get(id);\n return {\n editable: false,\n key: id,\n value: store._getters.reduce((getters, key) => {\n getters[key] = store[key];\n return getters;\n }, {}),\n };\n }),\n };\n return state;\n }\n const state = {\n state: Object.keys(store.$state).map((key) => ({\n editable: true,\n key,\n value: store.$state[key],\n })),\n };\n // avoid adding empty getters\n if (store._getters && store._getters.length) {\n state.getters = store._getters.map((getterName) => ({\n editable: false,\n key: getterName,\n value: store[getterName],\n }));\n }\n if (store._customProperties.size) {\n state.customProperties = Array.from(store._customProperties).map((key) => ({\n editable: true,\n key,\n value: store[key],\n }));\n }\n return state;\n}\nfunction formatEventData(events) {\n if (!events)\n return {};\n if (Array.isArray(events)) {\n // TODO: handle add and delete for arrays and objects\n return events.reduce((data, event) => {\n data.keys.push(event.key);\n data.operations.push(event.type);\n data.oldValue[event.key] = event.oldValue;\n data.newValue[event.key] = event.newValue;\n return data;\n }, {\n oldValue: {},\n keys: [],\n operations: [],\n newValue: {},\n });\n }\n else {\n return {\n operation: formatDisplay(events.type),\n key: formatDisplay(events.key),\n oldValue: events.oldValue,\n newValue: events.newValue,\n };\n }\n}\nfunction formatMutationType(type) {\n switch (type) {\n case MutationType.direct:\n return 'mutation';\n case MutationType.patchFunction:\n return '$patch';\n case MutationType.patchObject:\n return '$patch';\n default:\n return 'unknown';\n }\n}\n\n// timeline can be paused when directly changing the state\nlet isTimelineActive = true;\nconst componentStateTypes = [];\nconst MUTATIONS_LAYER_ID = 'pinia:mutations';\nconst INSPECTOR_ID = 'pinia';\nconst { assign: assign$1 } = Object;\n/**\n * Gets the displayed name of a store in devtools\n *\n * @param id - id of the store\n * @returns a formatted string\n */\nconst getStoreType = (id) => '🍍 ' + id;\n/**\n * Add the pinia plugin without any store. Allows displaying a Pinia plugin tab\n * as soon as it is added to the application.\n *\n * @param app - Vue application\n * @param pinia - pinia instance\n */\nfunction registerPiniaDevtools(app, pinia) {\n setupDevtoolsPlugin({\n id: 'dev.esm.pinia',\n label: 'Pinia 🍍',\n logo: 'https://pinia.vuejs.org/logo.svg',\n packageName: 'pinia',\n homepage: 'https://pinia.vuejs.org',\n componentStateTypes,\n app,\n }, (api) => {\n if (typeof api.now !== 'function') {\n toastMessage('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.');\n }\n api.addTimelineLayer({\n id: MUTATIONS_LAYER_ID,\n label: `Pinia 🍍`,\n color: 0xe5df88,\n });\n api.addInspector({\n id: INSPECTOR_ID,\n label: 'Pinia 🍍',\n icon: 'storage',\n treeFilterPlaceholder: 'Search stores',\n actions: [\n {\n icon: 'content_copy',\n action: () => {\n actionGlobalCopyState(pinia);\n },\n tooltip: 'Serialize and copy the state',\n },\n {\n icon: 'content_paste',\n action: async () => {\n await actionGlobalPasteState(pinia);\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n },\n tooltip: 'Replace the state with the content of your clipboard',\n },\n {\n icon: 'save',\n action: () => {\n actionGlobalSaveState(pinia);\n },\n tooltip: 'Save the state as a JSON file',\n },\n {\n icon: 'folder_open',\n action: async () => {\n await actionGlobalOpenStateFile(pinia);\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n },\n tooltip: 'Import the state from a JSON file',\n },\n ],\n nodeActions: [\n {\n icon: 'restore',\n tooltip: 'Reset the state (with \"$reset\")',\n action: (nodeId) => {\n const store = pinia._s.get(nodeId);\n if (!store) {\n toastMessage(`Cannot reset \"${nodeId}\" store because it wasn't found.`, 'warn');\n }\n else if (typeof store.$reset !== 'function') {\n toastMessage(`Cannot reset \"${nodeId}\" store because it doesn't have a \"$reset\" method implemented.`, 'warn');\n }\n else {\n store.$reset();\n toastMessage(`Store \"${nodeId}\" reset.`);\n }\n },\n },\n ],\n });\n api.on.inspectComponent((payload) => {\n const proxy = (payload.componentInstance &&\n payload.componentInstance.proxy);\n if (proxy && proxy._pStores) {\n const piniaStores = payload.componentInstance.proxy._pStores;\n Object.values(piniaStores).forEach((store) => {\n payload.instanceData.state.push({\n type: getStoreType(store.$id),\n key: 'state',\n editable: true,\n value: store._isOptionsAPI\n ? {\n _custom: {\n value: toRaw(store.$state),\n actions: [\n {\n icon: 'restore',\n tooltip: 'Reset the state of this store',\n action: () => store.$reset(),\n },\n ],\n },\n }\n : // NOTE: workaround to unwrap transferred refs\n Object.keys(store.$state).reduce((state, key) => {\n state[key] = store.$state[key];\n return state;\n }, {}),\n });\n if (store._getters && store._getters.length) {\n payload.instanceData.state.push({\n type: getStoreType(store.$id),\n key: 'getters',\n editable: false,\n value: store._getters.reduce((getters, key) => {\n try {\n getters[key] = store[key];\n }\n catch (error) {\n // @ts-expect-error: we just want to show it in devtools\n getters[key] = error;\n }\n return getters;\n }, {}),\n });\n }\n });\n }\n });\n api.on.getInspectorTree((payload) => {\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n let stores = [pinia];\n stores = stores.concat(Array.from(pinia._s.values()));\n payload.rootNodes = (payload.filter\n ? stores.filter((store) => '$id' in store\n ? store.$id\n .toLowerCase()\n .includes(payload.filter.toLowerCase())\n : PINIA_ROOT_LABEL.toLowerCase().includes(payload.filter.toLowerCase()))\n : stores).map(formatStoreForInspectorTree);\n }\n });\n // Expose pinia instance as $pinia to window\n globalThis.$pinia = pinia;\n api.on.getInspectorState((payload) => {\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n const inspectedStore = payload.nodeId === PINIA_ROOT_ID\n ? pinia\n : pinia._s.get(payload.nodeId);\n if (!inspectedStore) {\n // this could be the selected store restored for a different project\n // so it's better not to say anything here\n return;\n }\n if (inspectedStore) {\n // Expose selected store as $store to window\n if (payload.nodeId !== PINIA_ROOT_ID)\n globalThis.$store = toRaw(inspectedStore);\n payload.state = formatStoreForInspectorState(inspectedStore);\n }\n }\n });\n api.on.editInspectorState((payload) => {\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n const inspectedStore = payload.nodeId === PINIA_ROOT_ID\n ? pinia\n : pinia._s.get(payload.nodeId);\n if (!inspectedStore) {\n return toastMessage(`store \"${payload.nodeId}\" not found`, 'error');\n }\n const { path } = payload;\n if (!isPinia(inspectedStore)) {\n // access only the state\n if (path.length !== 1 ||\n !inspectedStore._customProperties.has(path[0]) ||\n path[0] in inspectedStore.$state) {\n path.unshift('$state');\n }\n }\n else {\n // Root access, we can omit the `.value` because the devtools API does it for us\n path.unshift('state');\n }\n isTimelineActive = false;\n payload.set(inspectedStore, path, payload.state.value);\n isTimelineActive = true;\n }\n });\n api.on.editComponentState((payload) => {\n if (payload.type.startsWith('🍍')) {\n const storeId = payload.type.replace(/^🍍\\s*/, '');\n const store = pinia._s.get(storeId);\n if (!store) {\n return toastMessage(`store \"${storeId}\" not found`, 'error');\n }\n const { path } = payload;\n if (path[0] !== 'state') {\n return toastMessage(`Invalid path for store \"${storeId}\":\\n${path}\\nOnly state can be modified.`);\n }\n // rewrite the first entry to be able to directly set the state as\n // well as any other path\n path[0] = '$state';\n isTimelineActive = false;\n payload.set(store, path, payload.state.value);\n isTimelineActive = true;\n }\n });\n });\n}\nfunction addStoreToDevtools(app, store) {\n if (!componentStateTypes.includes(getStoreType(store.$id))) {\n componentStateTypes.push(getStoreType(store.$id));\n }\n setupDevtoolsPlugin({\n id: 'dev.esm.pinia',\n label: 'Pinia 🍍',\n logo: 'https://pinia.vuejs.org/logo.svg',\n packageName: 'pinia',\n homepage: 'https://pinia.vuejs.org',\n componentStateTypes,\n app,\n settings: {\n logStoreChanges: {\n label: 'Notify about new/deleted stores',\n type: 'boolean',\n defaultValue: true,\n },\n // useEmojis: {\n // label: 'Use emojis in messages ⚡️',\n // type: 'boolean',\n // defaultValue: true,\n // },\n },\n }, (api) => {\n // gracefully handle errors\n const now = typeof api.now === 'function' ? api.now.bind(api) : Date.now;\n store.$onAction(({ after, onError, name, args }) => {\n const groupId = runningActionId++;\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now(),\n title: '🛫 ' + name,\n subtitle: 'start',\n data: {\n store: formatDisplay(store.$id),\n action: formatDisplay(name),\n args,\n },\n groupId,\n },\n });\n after((result) => {\n activeAction = undefined;\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now(),\n title: '🛬 ' + name,\n subtitle: 'end',\n data: {\n store: formatDisplay(store.$id),\n action: formatDisplay(name),\n args,\n result,\n },\n groupId,\n },\n });\n });\n onError((error) => {\n activeAction = undefined;\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now(),\n logType: 'error',\n title: '💥 ' + name,\n subtitle: 'end',\n data: {\n store: formatDisplay(store.$id),\n action: formatDisplay(name),\n args,\n error,\n },\n groupId,\n },\n });\n });\n }, true);\n store._customProperties.forEach((name) => {\n watch(() => unref(store[name]), (newValue, oldValue) => {\n api.notifyComponentUpdate();\n api.sendInspectorState(INSPECTOR_ID);\n if (isTimelineActive) {\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now(),\n title: 'Change',\n subtitle: name,\n data: {\n newValue,\n oldValue,\n },\n groupId: activeAction,\n },\n });\n }\n }, { deep: true });\n });\n store.$subscribe(({ events, type }, state) => {\n api.notifyComponentUpdate();\n api.sendInspectorState(INSPECTOR_ID);\n if (!isTimelineActive)\n return;\n // rootStore.state[store.id] = state\n const eventData = {\n time: now(),\n title: formatMutationType(type),\n data: assign$1({ store: formatDisplay(store.$id) }, formatEventData(events)),\n groupId: activeAction,\n };\n if (type === MutationType.patchFunction) {\n eventData.subtitle = '⤵️';\n }\n else if (type === MutationType.patchObject) {\n eventData.subtitle = '🧩';\n }\n else if (events && !Array.isArray(events)) {\n eventData.subtitle = events.type;\n }\n if (events) {\n eventData.data['rawEvent(s)'] = {\n _custom: {\n display: 'DebuggerEvent',\n type: 'object',\n tooltip: 'raw DebuggerEvent[]',\n value: events,\n },\n };\n }\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: eventData,\n });\n }, { detached: true, flush: 'sync' });\n const hotUpdate = store._hotUpdate;\n store._hotUpdate = markRaw((newStore) => {\n hotUpdate(newStore);\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now(),\n title: '🔥 ' + store.$id,\n subtitle: 'HMR update',\n data: {\n store: formatDisplay(store.$id),\n info: formatDisplay(`HMR update`),\n },\n },\n });\n // update the devtools too\n api.notifyComponentUpdate();\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n });\n const { $dispose } = store;\n store.$dispose = () => {\n $dispose();\n api.notifyComponentUpdate();\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n api.getSettings().logStoreChanges &&\n toastMessage(`Disposed \"${store.$id}\" store 🗑`);\n };\n // trigger an update so it can display new registered stores\n api.notifyComponentUpdate();\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n api.getSettings().logStoreChanges &&\n toastMessage(`\"${store.$id}\" store installed 🆕`);\n });\n}\nlet runningActionId = 0;\nlet activeAction;\n/**\n * Patches a store to enable action grouping in devtools by wrapping the store with a Proxy that is passed as the\n * context of all actions, allowing us to set `runningAction` on each access and effectively associating any state\n * mutation to the action.\n *\n * @param store - store to patch\n * @param actionNames - list of actionst to patch\n */\nfunction patchActionForGrouping(store, actionNames, wrapWithProxy) {\n // original actions of the store as they are given by pinia. We are going to override them\n const actions = actionNames.reduce((storeActions, actionName) => {\n // use toRaw to avoid tracking #541\n storeActions[actionName] = toRaw(store)[actionName];\n return storeActions;\n }, {});\n for (const actionName in actions) {\n store[actionName] = function () {\n // the running action id is incremented in a before action hook\n const _actionId = runningActionId;\n const trackedStore = wrapWithProxy\n ? new Proxy(store, {\n get(...args) {\n activeAction = _actionId;\n return Reflect.get(...args);\n },\n set(...args) {\n activeAction = _actionId;\n return Reflect.set(...args);\n },\n })\n : store;\n // For Setup Stores we need https://github.com/tc39/proposal-async-context\n activeAction = _actionId;\n const retValue = actions[actionName].apply(trackedStore, arguments);\n // this is safer as async actions in Setup Stores would associate mutations done outside of the action\n activeAction = undefined;\n return retValue;\n };\n }\n}\n/**\n * pinia.use(devtoolsPlugin)\n */\nfunction devtoolsPlugin({ app, store, options }) {\n // HMR module\n if (store.$id.startsWith('__hot:')) {\n return;\n }\n // detect option api vs setup api\n store._isOptionsAPI = !!options.state;\n // Do not overwrite actions mocked by @pinia/testing (#2298)\n if (!store._p._testing) {\n patchActionForGrouping(store, Object.keys(options.actions), store._isOptionsAPI);\n // Upgrade the HMR to also update the new actions\n const originalHotUpdate = store._hotUpdate;\n toRaw(store)._hotUpdate = function (newStore) {\n originalHotUpdate.apply(this, arguments);\n patchActionForGrouping(store, Object.keys(newStore._hmrPayload.actions), !!store._isOptionsAPI);\n };\n }\n addStoreToDevtools(app, \n // FIXME: is there a way to allow the assignment from Store<Id, S, G, A> to StoreGeneric?\n store);\n}\n\n/**\n * Creates a Pinia instance to be used by the application\n */\nfunction createPinia() {\n const scope = effectScope(true);\n // NOTE: here we could check the window object for a state and directly set it\n // if there is anything like it with Vue 3 SSR\n const state = scope.run(() => ref({}));\n let _p = [];\n // plugins added before calling app.use(pinia)\n let toBeInstalled = [];\n const pinia = markRaw({\n install(app) {\n // this allows calling useStore() outside of a component setup after\n // installing pinia's plugin\n setActivePinia(pinia);\n pinia._a = app;\n app.provide(piniaSymbol, pinia);\n app.config.globalProperties.$pinia = pinia;\n /* istanbul ignore else */\n if ((((process.env.NODE_ENV !== 'production') || (typeof __VUE_PROD_DEVTOOLS__ !== 'undefined' && __VUE_PROD_DEVTOOLS__)) && !(process.env.NODE_ENV === 'test')) && IS_CLIENT) {\n registerPiniaDevtools(app, pinia);\n }\n toBeInstalled.forEach((plugin) => _p.push(plugin));\n toBeInstalled = [];\n },\n use(plugin) {\n if (!this._a) {\n toBeInstalled.push(plugin);\n }\n else {\n _p.push(plugin);\n }\n return this;\n },\n _p,\n // it's actually undefined here\n // @ts-expect-error\n _a: null,\n _e: scope,\n _s: new Map(),\n state,\n });\n // pinia devtools rely on dev only features so they cannot be forced unless\n // the dev build of Vue is used. Avoid old browsers like IE11.\n if ((((process.env.NODE_ENV !== 'production') || (typeof __VUE_PROD_DEVTOOLS__ !== 'undefined' && __VUE_PROD_DEVTOOLS__)) && !(process.env.NODE_ENV === 'test')) && IS_CLIENT && typeof Proxy !== 'undefined') {\n pinia.use(devtoolsPlugin);\n }\n return pinia;\n}\n/**\n * Dispose a Pinia instance by stopping its effectScope and removing the state, plugins and stores. This is mostly\n * useful in tests, with both a testing pinia or a regular pinia and in applications that use multiple pinia instances.\n * Once disposed, the pinia instance cannot be used anymore.\n *\n * @param pinia - pinia instance\n */\nfunction disposePinia(pinia) {\n pinia._e.stop();\n pinia._s.clear();\n pinia._p.splice(0);\n pinia.state.value = {};\n // @ts-expect-error: non valid\n pinia._a = null;\n}\n\n/**\n * Checks if a function is a `StoreDefinition`.\n *\n * @param fn - object to test\n * @returns true if `fn` is a StoreDefinition\n */\nconst isUseStore = (fn) => {\n return typeof fn === 'function' && typeof fn.$id === 'string';\n};\n/**\n * Mutates in place `newState` with `oldState` to _hot update_ it. It will\n * remove any key not existing in `newState` and recursively merge plain\n * objects.\n *\n * @param newState - new state object to be patched\n * @param oldState - old state that should be used to patch newState\n * @returns - newState\n */\nfunction patchObject(newState, oldState) {\n // no need to go through symbols because they cannot be serialized anyway\n for (const key in oldState) {\n const subPatch = oldState[key];\n // skip the whole sub tree\n if (!(key in newState)) {\n continue;\n }\n const targetValue = newState[key];\n if (isPlainObject(targetValue) &&\n isPlainObject(subPatch) &&\n !isRef(subPatch) &&\n !isReactive(subPatch)) {\n newState[key] = patchObject(targetValue, subPatch);\n }\n else {\n // objects are either a bit more complex (e.g. refs) or primitives, so we\n // just set the whole thing\n newState[key] = subPatch;\n }\n }\n return newState;\n}\n/**\n * Creates an _accept_ function to pass to `import.meta.hot` in Vite applications.\n *\n * @example\n * ```js\n * const useUser = defineStore(...)\n * if (import.meta.hot) {\n * import.meta.hot.accept(acceptHMRUpdate(useUser, import.meta.hot))\n * }\n * ```\n *\n * @param initialUseStore - return of the defineStore to hot update\n * @param hot - `import.meta.hot`\n */\nfunction acceptHMRUpdate(initialUseStore, hot) {\n // strip as much as possible from iife.prod\n if (!(process.env.NODE_ENV !== 'production')) {\n return () => { };\n }\n return (newModule) => {\n const pinia = hot.data.pinia || initialUseStore._pinia;\n if (!pinia) {\n // this store is still not used\n return;\n }\n // preserve the pinia instance across loads\n hot.data.pinia = pinia;\n // console.log('got data', newStore)\n for (const exportName in newModule) {\n const useStore = newModule[exportName];\n // console.log('checking for', exportName)\n if (isUseStore(useStore) && pinia._s.has(useStore.$id)) {\n // console.log('Accepting update for', useStore.$id)\n const id = useStore.$id;\n if (id !== initialUseStore.$id) {\n console.warn(`The id of the store changed from \"${initialUseStore.$id}\" to \"${id}\". Reloading.`);\n // return import.meta.hot.invalidate()\n return hot.invalidate();\n }\n const existingStore = pinia._s.get(id);\n if (!existingStore) {\n console.log(`[Pinia]: skipping hmr because store doesn't exist yet`);\n return;\n }\n useStore(pinia, existingStore);\n }\n }\n };\n}\n\nconst noop = () => { };\nfunction addSubscription(subscriptions, callback, detached, onCleanup = noop) {\n subscriptions.add(callback);\n const removeSubscription = () => {\n const isDel = subscriptions.delete(callback);\n isDel && onCleanup();\n };\n if (!detached && getCurrentScope()) {\n onScopeDispose(removeSubscription);\n }\n return removeSubscription;\n}\nfunction triggerSubscriptions(subscriptions, ...args) {\n subscriptions.forEach((callback) => {\n callback(...args);\n });\n}\n\nconst fallbackRunWithContext = (fn) => fn();\n/**\n * Marks a function as an action for `$onAction`\n * @internal\n */\nconst ACTION_MARKER = Symbol();\n/**\n * Action name symbol. Allows to add a name to an action after defining it\n * @internal\n */\nconst ACTION_NAME = Symbol();\nfunction mergeReactiveObjects(target, patchToApply) {\n // Handle Map instances\n if (target instanceof Map && patchToApply instanceof Map) {\n patchToApply.forEach((value, key) => target.set(key, value));\n }\n else if (target instanceof Set && patchToApply instanceof Set) {\n // Handle Set instances\n patchToApply.forEach(target.add, target);\n }\n // no need to go through symbols because they cannot be serialized anyway\n for (const key in patchToApply) {\n if (!patchToApply.hasOwnProperty(key))\n continue;\n const subPatch = patchToApply[key];\n const targetValue = target[key];\n if (isPlainObject(targetValue) &&\n isPlainObject(subPatch) &&\n target.hasOwnProperty(key) &&\n !isRef(subPatch) &&\n !isReactive(subPatch)) {\n // NOTE: here I wanted to warn about inconsistent types but it's not possible because in setup stores one might\n // start the value of a property as a certain type e.g. a Map, and then for some reason, during SSR, change that\n // to `undefined`. When trying to hydrate, we want to override the Map with `undefined`.\n target[key] = mergeReactiveObjects(targetValue, subPatch);\n }\n else {\n // @ts-expect-error: subPatch is a valid value\n target[key] = subPatch;\n }\n }\n return target;\n}\nconst skipHydrateSymbol = (process.env.NODE_ENV !== 'production')\n ? Symbol('pinia:skipHydration')\n : /* istanbul ignore next */ Symbol();\n/**\n * Tells Pinia to skip the hydration process of a given object. This is useful in setup stores (only) when you return a\n * stateful object in the store but it isn't really state. e.g. returning a router instance in a setup store.\n *\n * @param obj - target object\n * @returns obj\n */\nfunction skipHydrate(obj) {\n return Object.defineProperty(obj, skipHydrateSymbol, {});\n}\n/**\n * Returns whether a value should be hydrated\n *\n * @param obj - target variable\n * @returns true if `obj` should be hydrated\n */\nfunction shouldHydrate(obj) {\n return (!isPlainObject(obj) ||\n !Object.prototype.hasOwnProperty.call(obj, skipHydrateSymbol));\n}\nconst { assign } = Object;\nfunction isComputed(o) {\n return !!(isRef(o) && o.effect);\n}\nfunction createOptionsStore(id, options, pinia, hot) {\n const { state, actions, getters } = options;\n const initialState = pinia.state.value[id];\n let store;\n function setup() {\n if (!initialState && (!(process.env.NODE_ENV !== 'production') || !hot)) {\n /* istanbul ignore if */\n pinia.state.value[id] = state ? state() : {};\n }\n // avoid creating a state in pinia.state.value\n const localState = (process.env.NODE_ENV !== 'production') && hot\n ? // use ref() to unwrap refs inside state TODO: check if this is still necessary\n toRefs(ref(state ? state() : {}).value)\n : toRefs(pinia.state.value[id]);\n return assign(localState, actions, Object.keys(getters || {}).reduce((computedGetters, name) => {\n if ((process.env.NODE_ENV !== 'production') && name in localState) {\n console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with \"${name}\" in store \"${id}\".`);\n }\n computedGetters[name] = markRaw(computed(() => {\n setActivePinia(pinia);\n // it was created just before\n const store = pinia._s.get(id);\n // allow cross using stores\n // @ts-expect-error\n // return getters![name].call(context, context)\n // TODO: avoid reading the getter while assigning with a global variable\n return getters[name].call(store, store);\n }));\n return computedGetters;\n }, {}));\n }\n store = createSetupStore(id, setup, options, pinia, hot, true);\n return store;\n}\nfunction createSetupStore($id, setup, options = {}, pinia, hot, isOptionsStore) {\n let scope;\n const optionsForPlugin = assign({ actions: {} }, options);\n /* istanbul ignore if */\n if ((process.env.NODE_ENV !== 'production') && !pinia._e.active) {\n throw new Error('Pinia destroyed');\n }\n // watcher options for $subscribe\n const $subscribeOptions = { deep: true };\n /* istanbul ignore else */\n if ((process.env.NODE_ENV !== 'production')) {\n $subscribeOptions.onTrigger = (event) => {\n /* istanbul ignore else */\n if (isListening) {\n debuggerEvents = event;\n // avoid triggering this while the store is being built and the state is being set in pinia\n }\n else if (isListening == false && !store._hotUpdating) {\n // let patch send all the events together later\n /* istanbul ignore else */\n if (Array.isArray(debuggerEvents)) {\n debuggerEvents.push(event);\n }\n else {\n console.error('🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug.');\n }\n }\n };\n }\n // internal state\n let isListening; // set to true at the end\n let isSyncListening; // set to true at the end\n let subscriptions = new Set();\n let actionSubscriptions = new Set();\n let debuggerEvents;\n const initialState = pinia.state.value[$id];\n // avoid setting the state for option stores if it is set\n // by the setup\n if (!isOptionsStore && !initialState && (!(process.env.NODE_ENV !== 'production') || !hot)) {\n /* istanbul ignore if */\n pinia.state.value[$id] = {};\n }\n const hotState = ref({});\n // avoid triggering too many listeners\n // https://github.com/vuejs/pinia/issues/1129\n let activeListener;\n function $patch(partialStateOrMutator) {\n let subscriptionMutation;\n isListening = isSyncListening = false;\n // reset the debugger events since patches are sync\n /* istanbul ignore else */\n if ((process.env.NODE_ENV !== 'production')) {\n debuggerEvents = [];\n }\n if (typeof partialStateOrMutator === 'function') {\n partialStateOrMutator(pinia.state.value[$id]);\n subscriptionMutation = {\n type: MutationType.patchFunction,\n storeId: $id,\n events: debuggerEvents,\n };\n }\n else {\n mergeReactiveObjects(pinia.state.value[$id], partialStateOrMutator);\n subscriptionMutation = {\n type: MutationType.patchObject,\n payload: partialStateOrMutator,\n storeId: $id,\n events: debuggerEvents,\n };\n }\n const myListenerId = (activeListener = Symbol());\n nextTick().then(() => {\n if (activeListener === myListenerId) {\n isListening = true;\n }\n });\n isSyncListening = true;\n // because we paused the watcher, we need to manually call the subscriptions\n triggerSubscriptions(subscriptions, subscriptionMutation, pinia.state.value[$id]);\n }\n const $reset = isOptionsStore\n ? function $reset() {\n const { state } = options;\n const newState = state ? state() : {};\n // we use a patch to group all changes into one single subscription\n this.$patch(($state) => {\n // @ts-expect-error: FIXME: shouldn't error?\n assign($state, newState);\n });\n }\n : /* istanbul ignore next */\n (process.env.NODE_ENV !== 'production')\n ? () => {\n throw new Error(`🍍: Store \"${$id}\" is built using the setup syntax and does not implement $reset().`);\n }\n : noop;\n function $dispose() {\n scope.stop();\n subscriptions.clear();\n actionSubscriptions.clear();\n pinia._s.delete($id);\n }\n /**\n * Helper that wraps function so it can be tracked with $onAction\n * @param fn - action to wrap\n * @param name - name of the action\n */\n const action = (fn, name = '') => {\n if (ACTION_MARKER in fn) {\n fn[ACTION_NAME] = name;\n return fn;\n }\n const wrappedAction = function () {\n setActivePinia(pinia);\n const args = Array.from(arguments);\n const afterCallbackSet = new Set();\n const onErrorCallbackSet = new Set();\n function after(callback) {\n afterCallbackSet.add(callback);\n }\n function onError(callback) {\n onErrorCallbackSet.add(callback);\n }\n // @ts-expect-error\n triggerSubscriptions(actionSubscriptions, {\n args,\n name: wrappedAction[ACTION_NAME],\n store,\n after,\n onError,\n });\n let ret;\n try {\n ret = fn.apply(this && this.$id === $id ? this : store, args);\n // handle sync errors\n }\n catch (error) {\n triggerSubscriptions(onErrorCallbackSet, error);\n throw error;\n }\n if (ret instanceof Promise) {\n return ret\n .then((value) => {\n triggerSubscriptions(afterCallbackSet, value);\n return value;\n })\n .catch((error) => {\n triggerSubscriptions(onErrorCallbackSet, error);\n return Promise.reject(error);\n });\n }\n // trigger after callbacks\n triggerSubscriptions(afterCallbackSet, ret);\n return ret;\n };\n wrappedAction[ACTION_MARKER] = true;\n wrappedAction[ACTION_NAME] = name; // will be set later\n // @ts-expect-error: we are intentionally limiting the returned type to just Fn\n // because all the added properties are internals that are exposed through `$onAction()` only\n return wrappedAction;\n };\n const _hmrPayload = /*#__PURE__*/ markRaw({\n actions: {},\n getters: {},\n state: [],\n hotState,\n });\n const partialStore = {\n _p: pinia,\n // _s: scope,\n $id,\n $onAction: addSubscription.bind(null, actionSubscriptions),\n $patch,\n $reset,\n $subscribe(callback, options = {}) {\n const removeSubscription = addSubscription(subscriptions, callback, options.detached, () => stopWatcher());\n const stopWatcher = scope.run(() => watch(() => pinia.state.value[$id], (state) => {\n if (options.flush === 'sync' ? isSyncListening : isListening) {\n callback({\n storeId: $id,\n type: MutationType.direct,\n events: debuggerEvents,\n }, state);\n }\n }, assign({}, $subscribeOptions, options)));\n return removeSubscription;\n },\n $dispose,\n };\n const store = reactive((process.env.NODE_ENV !== 'production') || ((((process.env.NODE_ENV !== 'production') || (typeof __VUE_PROD_DEVTOOLS__ !== 'undefined' && __VUE_PROD_DEVTOOLS__)) && !(process.env.NODE_ENV === 'test')) && IS_CLIENT)\n ? assign({\n _hmrPayload,\n _customProperties: markRaw(new Set()), // devtools custom properties\n }, partialStore\n // must be added later\n // setupStore\n )\n : partialStore);\n // store the partial store now so the setup of stores can instantiate each other before they are finished without\n // creating infinite loops.\n pinia._s.set($id, store);\n const runWithContext = (pinia._a && pinia._a.runWithContext) || fallbackRunWithContext;\n // TODO: idea create skipSerialize that marks properties as non serializable and they are skipped\n const setupStore = runWithContext(() => pinia._e.run(() => (scope = effectScope()).run(() => setup({ action }))));\n // overwrite existing actions to support $onAction\n for (const key in setupStore) {\n const prop = setupStore[key];\n if ((isRef(prop) && !isComputed(prop)) || isReactive(prop)) {\n // mark it as a piece of state to be serialized\n if ((process.env.NODE_ENV !== 'production') && hot) {\n hotState.value[key] = toRef(setupStore, key);\n // createOptionStore directly sets the state in pinia.state.value so we\n // can just skip that\n }\n else if (!isOptionsStore) {\n // in setup stores we must hydrate the state and sync pinia state tree with the refs the user just created\n if (initialState && shouldHydrate(prop)) {\n if (isRef(prop)) {\n prop.value = initialState[key];\n }\n else {\n // probably a reactive object, lets recursively assign\n // @ts-expect-error: prop is unknown\n mergeReactiveObjects(prop, initialState[key]);\n }\n }\n // transfer the ref to the pinia state to keep everything in sync\n pinia.state.value[$id][key] = prop;\n }\n /* istanbul ignore else */\n if ((process.env.NODE_ENV !== 'production')) {\n _hmrPayload.state.push(key);\n }\n // action\n }\n else if (typeof prop === 'function') {\n const actionValue = (process.env.NODE_ENV !== 'production') && hot ? prop : action(prop, key);\n // this a hot module replacement store because the hotUpdate method needs\n // to do it with the right context\n // @ts-expect-error\n setupStore[key] = actionValue;\n /* istanbul ignore else */\n if ((process.env.NODE_ENV !== 'production')) {\n _hmrPayload.actions[key] = prop;\n }\n // list actions so they can be used in plugins\n // @ts-expect-error\n optionsForPlugin.actions[key] = prop;\n }\n else if ((process.env.NODE_ENV !== 'production')) {\n // add getters for devtools\n if (isComputed(prop)) {\n _hmrPayload.getters[key] = isOptionsStore\n ? // @ts-expect-error\n options.getters[key]\n : prop;\n if (IS_CLIENT) {\n const getters = setupStore._getters ||\n // @ts-expect-error: same\n (setupStore._getters = markRaw([]));\n getters.push(key);\n }\n }\n }\n }\n // add the state, getters, and action properties\n /* istanbul ignore if */\n assign(store, setupStore);\n // allows retrieving reactive objects with `storeToRefs()`. Must be called after assigning to the reactive object.\n // Make `storeToRefs()` work with `reactive()` #799\n assign(toRaw(store), setupStore);\n // use this instead of a computed with setter to be able to create it anywhere\n // without linking the computed lifespan to wherever the store is first\n // created.\n Object.defineProperty(store, '$state', {\n get: () => ((process.env.NODE_ENV !== 'production') && hot ? hotState.value : pinia.state.value[$id]),\n set: (state) => {\n /* istanbul ignore if */\n if ((process.env.NODE_ENV !== 'production') && hot) {\n throw new Error('cannot set hotState');\n }\n $patch(($state) => {\n // @ts-expect-error: FIXME: shouldn't error?\n assign($state, state);\n });\n },\n });\n // add the hotUpdate before plugins to allow them to override it\n /* istanbul ignore else */\n if ((process.env.NODE_ENV !== 'production')) {\n store._hotUpdate = markRaw((newStore) => {\n store._hotUpdating = true;\n newStore._hmrPayload.state.forEach((stateKey) => {\n if (stateKey in store.$state) {\n const newStateTarget = newStore.$state[stateKey];\n const oldStateSource = store.$state[stateKey];\n if (typeof newStateTarget === 'object' &&\n isPlainObject(newStateTarget) &&\n isPlainObject(oldStateSource)) {\n patchObject(newStateTarget, oldStateSource);\n }\n else {\n // transfer the ref\n newStore.$state[stateKey] = oldStateSource;\n }\n }\n // patch direct access properties to allow store.stateProperty to work as\n // store.$state.stateProperty\n // @ts-expect-error: any type\n store[stateKey] = toRef(newStore.$state, stateKey);\n });\n // remove deleted state properties\n Object.keys(store.$state).forEach((stateKey) => {\n if (!(stateKey in newStore.$state)) {\n // @ts-expect-error: noop if doesn't exist\n delete store[stateKey];\n }\n });\n // avoid devtools logging this as a mutation\n isListening = false;\n isSyncListening = false;\n pinia.state.value[$id] = toRef(newStore._hmrPayload, 'hotState');\n isSyncListening = true;\n nextTick().then(() => {\n isListening = true;\n });\n for (const actionName in newStore._hmrPayload.actions) {\n const actionFn = newStore[actionName];\n // @ts-expect-error: actionName is a string\n store[actionName] =\n //\n action(actionFn, actionName);\n }\n // TODO: does this work in both setup and option store?\n for (const getterName in newStore._hmrPayload.getters) {\n const getter = newStore._hmrPayload.getters[getterName];\n const getterValue = isOptionsStore\n ? // special handling of options api\n computed(() => {\n setActivePinia(pinia);\n return getter.call(store, store);\n })\n : getter;\n // @ts-expect-error: getterName is a string\n store[getterName] =\n //\n getterValue;\n }\n // remove deleted getters\n Object.keys(store._hmrPayload.getters).forEach((key) => {\n if (!(key in newStore._hmrPayload.getters)) {\n // @ts-expect-error: noop if doesn't exist\n delete store[key];\n }\n });\n // remove old actions\n Object.keys(store._hmrPayload.actions).forEach((key) => {\n if (!(key in newStore._hmrPayload.actions)) {\n // @ts-expect-error: noop if doesn't exist\n delete store[key];\n }\n });\n // update the values used in devtools and to allow deleting new properties later on\n store._hmrPayload = newStore._hmrPayload;\n store._getters = newStore._getters;\n store._hotUpdating = false;\n });\n }\n if ((((process.env.NODE_ENV !== 'production') || (typeof __VUE_PROD_DEVTOOLS__ !== 'undefined' && __VUE_PROD_DEVTOOLS__)) && !(process.env.NODE_ENV === 'test')) && IS_CLIENT) {\n const nonEnumerable = {\n writable: true,\n configurable: true,\n // avoid warning on devtools trying to display this property\n enumerable: false,\n };\n ['_p', '_hmrPayload', '_getters', '_customProperties'].forEach((p) => {\n Object.defineProperty(store, p, assign({ value: store[p] }, nonEnumerable));\n });\n }\n // apply all plugins\n pinia._p.forEach((extender) => {\n /* istanbul ignore else */\n if ((((process.env.NODE_ENV !== 'production') || (typeof __VUE_PROD_DEVTOOLS__ !== 'undefined' && __VUE_PROD_DEVTOOLS__)) && !(process.env.NODE_ENV === 'test')) && IS_CLIENT) {\n const extensions = scope.run(() => extender({\n store: store,\n app: pinia._a,\n pinia,\n options: optionsForPlugin,\n }));\n Object.keys(extensions || {}).forEach((key) => store._customProperties.add(key));\n assign(store, extensions);\n }\n else {\n assign(store, scope.run(() => extender({\n store: store,\n app: pinia._a,\n pinia,\n options: optionsForPlugin,\n })));\n }\n });\n if ((process.env.NODE_ENV !== 'production') &&\n store.$state &&\n typeof store.$state === 'object' &&\n typeof store.$state.constructor === 'function' &&\n !store.$state.constructor.toString().includes('[native code]')) {\n console.warn(`[🍍]: The \"state\" must be a plain object. It cannot be\\n` +\n `\\tstate: () => new MyClass()\\n` +\n `Found in store \"${store.$id}\".`);\n }\n // only apply hydrate to option stores with an initial state in pinia\n if (initialState &&\n isOptionsStore &&\n options.hydrate) {\n options.hydrate(store.$state, initialState);\n }\n isListening = true;\n isSyncListening = true;\n return store;\n}\n// allows unused stores to be tree shaken\n/*! #__NO_SIDE_EFFECTS__ */\nfunction defineStore(\n// TODO: add proper types from above\nid, setup, setupOptions) {\n let options;\n const isSetupStore = typeof setup === 'function';\n // the option store setup will contain the actual options in this case\n options = isSetupStore ? setupOptions : setup;\n function useStore(pinia, hot) {\n const hasContext = hasInjectionContext();\n pinia =\n // in test mode, ignore the argument provided as we can always retrieve a\n // pinia instance with getActivePinia()\n ((process.env.NODE_ENV === 'test') && activePinia && activePinia._testing ? null : pinia) ||\n (hasContext ? inject(piniaSymbol, null) : null);\n if (pinia)\n setActivePinia(pinia);\n if ((process.env.NODE_ENV !== 'production') && !activePinia) {\n throw new Error(`[🍍]: \"getActivePinia()\" was called but there was no active Pinia. Are you trying to use a store before calling \"app.use(pinia)\"?\\n` +\n `See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.\\n` +\n `This will fail in production.`);\n }\n pinia = activePinia;\n if (!pinia._s.has(id)) {\n // creating the store registers it in `pinia._s`\n if (isSetupStore) {\n createSetupStore(id, setup, options, pinia);\n }\n else {\n createOptionsStore(id, options, pinia);\n }\n /* istanbul ignore else */\n if ((process.env.NODE_ENV !== 'production')) {\n // @ts-expect-error: not the right inferred type\n useStore._pinia = pinia;\n }\n }\n const store = pinia._s.get(id);\n if ((process.env.NODE_ENV !== 'production') && hot) {\n const hotId = '__hot:' + id;\n const newStore = isSetupStore\n ? createSetupStore(hotId, setup, options, pinia, true)\n : createOptionsStore(hotId, assign({}, options), pinia, true);\n hot._hotUpdate(newStore);\n // cleanup the state properties and the store from the cache\n delete pinia.state.value[hotId];\n pinia._s.delete(hotId);\n }\n if ((process.env.NODE_ENV !== 'production') && IS_CLIENT) {\n const currentInstance = getCurrentInstance();\n // save stores in instances to access them devtools\n if (currentInstance &&\n currentInstance.proxy &&\n // avoid adding stores that are just built for hot module replacement\n !hot) {\n const vm = currentInstance.proxy;\n const cache = '_pStores' in vm ? vm._pStores : (vm._pStores = {});\n cache[id] = store;\n }\n }\n // StoreGeneric cannot be casted towards Store\n return store;\n }\n useStore.$id = id;\n return useStore;\n}\n\nlet mapStoreSuffix = 'Store';\n/**\n * Changes the suffix added by `mapStores()`. Can be set to an empty string.\n * Defaults to `\"Store\"`. Make sure to extend the MapStoresCustomization\n * interface if you are using TypeScript.\n *\n * @param suffix - new suffix\n */\nfunction setMapStoreSuffix(suffix // could be 'Store' but that would be annoying for JS\n) {\n mapStoreSuffix = suffix;\n}\n/**\n * Allows using stores without the composition API (`setup()`) by generating an\n * object to be spread in the `computed` field of a component. It accepts a list\n * of store definitions.\n *\n * @example\n * ```js\n * export default {\n * computed: {\n * // other computed properties\n * ...mapStores(useUserStore, useCartStore)\n * },\n *\n * created() {\n * this.userStore // store with id \"user\"\n * this.cartStore // store with id \"cart\"\n * }\n * }\n * ```\n *\n * @param stores - list of stores to map to an object\n */\nfunction mapStores(...stores) {\n if ((process.env.NODE_ENV !== 'production') && Array.isArray(stores[0])) {\n console.warn(`[🍍]: Directly pass all stores to \"mapStores()\" without putting them in an array:\\n` +\n `Replace\\n` +\n `\\tmapStores([useAuthStore, useCartStore])\\n` +\n `with\\n` +\n `\\tmapStores(useAuthStore, useCartStore)\\n` +\n `This will fail in production if not fixed.`);\n stores = stores[0];\n }\n return stores.reduce((reduced, useStore) => {\n // @ts-expect-error: $id is added by defineStore\n reduced[useStore.$id + mapStoreSuffix] = function () {\n return useStore(this.$pinia);\n };\n return reduced;\n }, {});\n}\n/**\n * Allows using state and getters from one store without using the composition\n * API (`setup()`) by generating an object to be spread in the `computed` field\n * of a component.\n *\n * @param useStore - store to map from\n * @param keysOrMapper - array or object\n */\nfunction mapState(useStore, keysOrMapper) {\n return Array.isArray(keysOrMapper)\n ? keysOrMapper.reduce((reduced, key) => {\n reduced[key] = function () {\n // @ts-expect-error: FIXME: should work?\n return useStore(this.$pinia)[key];\n };\n return reduced;\n }, {})\n : Object.keys(keysOrMapper).reduce((reduced, key) => {\n // @ts-expect-error\n reduced[key] = function () {\n const store = useStore(this.$pinia);\n const storeKey = keysOrMapper[key];\n // for some reason TS is unable to infer the type of storeKey to be a\n // function\n return typeof storeKey === 'function'\n ? storeKey.call(this, store)\n : // @ts-expect-error: FIXME: should work?\n store[storeKey];\n };\n return reduced;\n }, {});\n}\n/**\n * Alias for `mapState()`. You should use `mapState()` instead.\n * @deprecated use `mapState()` instead.\n */\nconst mapGetters = mapState;\n/**\n * Allows directly using actions from your store without using the composition\n * API (`setup()`) by generating an object to be spread in the `methods` field\n * of a component.\n *\n * @param useStore - store to map from\n * @param keysOrMapper - array or object\n */\nfunction mapActions(useStore, keysOrMapper) {\n return Array.isArray(keysOrMapper)\n ? keysOrMapper.reduce((reduced, key) => {\n // @ts-expect-error\n reduced[key] = function (...args) {\n // @ts-expect-error: FIXME: should work?\n return useStore(this.$pinia)[key](...args);\n };\n return reduced;\n }, {})\n : Object.keys(keysOrMapper).reduce((reduced, key) => {\n // @ts-expect-error\n reduced[key] = function (...args) {\n // @ts-expect-error: FIXME: should work?\n return useStore(this.$pinia)[keysOrMapper[key]](...args);\n };\n return reduced;\n }, {});\n}\n/**\n * Allows using state and getters from one store without using the composition\n * API (`setup()`) by generating an object to be spread in the `computed` field\n * of a component.\n *\n * @param useStore - store to map from\n * @param keysOrMapper - array or object\n */\nfunction mapWritableState(useStore, keysOrMapper) {\n return Array.isArray(keysOrMapper)\n ? keysOrMapper.reduce((reduced, key) => {\n reduced[key] = {\n get() {\n return useStore(this.$pinia)[key];\n },\n set(value) {\n return (useStore(this.$pinia)[key] = value);\n },\n };\n return reduced;\n }, {})\n : Object.keys(keysOrMapper).reduce((reduced, key) => {\n reduced[key] = {\n get() {\n return useStore(this.$pinia)[keysOrMapper[key]];\n },\n set(value) {\n return (useStore(this.$pinia)[keysOrMapper[key]] = value);\n },\n };\n return reduced;\n }, {});\n}\n\n/**\n * Creates an object of references with all the state, getters, and plugin-added\n * state properties of the store. Similar to `toRefs()` but specifically\n * designed for Pinia stores so methods and non reactive properties are\n * completely ignored.\n *\n * @param store - store to extract the refs from\n */\nfunction storeToRefs(store) {\n const rawStore = toRaw(store);\n const refs = {};\n for (const key in rawStore) {\n const value = rawStore[key];\n // There is no native method to check for a computed\n // https://github.com/vuejs/core/pull/4165\n if (value.effect) {\n // @ts-expect-error: too hard to type correctly\n refs[key] =\n // ...\n computed({\n get: () => store[key],\n set(value) {\n store[key] = value;\n },\n });\n }\n else if (isRef(value) || isReactive(value)) {\n // @ts-expect-error: the key is state or getter\n refs[key] =\n // ---\n toRef(store, key);\n }\n }\n return refs;\n}\n\nexport { MutationType, acceptHMRUpdate, createPinia, defineStore, disposePinia, getActivePinia, mapActions, mapGetters, mapState, mapStores, mapWritableState, setActivePinia, setMapStoreSuffix, shouldHydrate, skipHydrate, storeToRefs };\n","import { computed, customRef, effectScope, getCurrentInstance, getCurrentScope, hasInjectionContext, inject, isReactive, isRef, nextTick, onBeforeMount, onBeforeUnmount, onMounted, onScopeDispose, onUnmounted, provide, reactive, readonly, ref, shallowReadonly, shallowRef, toRef as toRef$1, toRefs as toRefs$1, toValue, unref, watch, watchEffect } from \"vue\";\n\n//#region computedEager/index.ts\n/**\n*\n* @deprecated This function will be removed in future version.\n*\n* Note: If you are using Vue 3.4+, you can straight use computed instead.\n* Because in Vue 3.4+, if computed new value does not change,\n* computed, effect, watch, watchEffect, render dependencies will not be triggered.\n* refer: https://github.com/vuejs/core/pull/5912\n*\n* @param fn effect function\n* @param options WatchOptionsBase\n* @returns readonly shallowRef\n*/\nfunction computedEager(fn, options) {\n\tvar _options$flush;\n\tconst result = shallowRef();\n\twatchEffect(() => {\n\t\tresult.value = fn();\n\t}, {\n\t\t...options,\n\t\tflush: (_options$flush = options === null || options === void 0 ? void 0 : options.flush) !== null && _options$flush !== void 0 ? _options$flush : \"sync\"\n\t});\n\treturn readonly(result);\n}\n/** @deprecated use `computedEager` instead */\nconst eagerComputed = computedEager;\n\n//#endregion\n//#region computedWithControl/index.ts\n/**\n* Explicitly define the deps of computed.\n*\n* @param source\n* @param fn\n*/\nfunction computedWithControl(source, fn, options = {}) {\n\tlet v = void 0;\n\tlet track;\n\tlet trigger;\n\tlet dirty = true;\n\tconst update = () => {\n\t\tdirty = true;\n\t\ttrigger();\n\t};\n\twatch(source, update, {\n\t\tflush: \"sync\",\n\t\t...options\n\t});\n\tconst get$1 = typeof fn === \"function\" ? fn : fn.get;\n\tconst set$1 = typeof fn === \"function\" ? void 0 : fn.set;\n\tconst result = customRef((_track, _trigger) => {\n\t\ttrack = _track;\n\t\ttrigger = _trigger;\n\t\treturn {\n\t\t\tget() {\n\t\t\t\tif (dirty) {\n\t\t\t\t\tv = get$1(v);\n\t\t\t\t\tdirty = false;\n\t\t\t\t}\n\t\t\t\ttrack();\n\t\t\t\treturn v;\n\t\t\t},\n\t\t\tset(v$1) {\n\t\t\t\tset$1 === null || set$1 === void 0 || set$1(v$1);\n\t\t\t}\n\t\t};\n\t});\n\tresult.trigger = update;\n\treturn result;\n}\n/** @deprecated use `computedWithControl` instead */\nconst controlledComputed = computedWithControl;\n\n//#endregion\n//#region tryOnScopeDispose/index.ts\n/**\n* Call onScopeDispose() if it's inside an effect scope lifecycle, if not, do nothing\n*\n* @param fn\n*/\nfunction tryOnScopeDispose(fn, failSilently) {\n\tif (getCurrentScope()) {\n\t\tonScopeDispose(fn, failSilently);\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n//#endregion\n//#region createEventHook/index.ts\n/**\n* Utility for creating event hooks\n*\n* @see https://vueuse.org/createEventHook\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction createEventHook() {\n\tconst fns = /* @__PURE__ */ new Set();\n\tconst off = (fn) => {\n\t\tfns.delete(fn);\n\t};\n\tconst clear = () => {\n\t\tfns.clear();\n\t};\n\tconst on = (fn) => {\n\t\tfns.add(fn);\n\t\tconst offFn = () => off(fn);\n\t\ttryOnScopeDispose(offFn);\n\t\treturn { off: offFn };\n\t};\n\tconst trigger = (...args) => {\n\t\treturn Promise.all(Array.from(fns).map((fn) => fn(...args)));\n\t};\n\treturn {\n\t\ton,\n\t\toff,\n\t\ttrigger,\n\t\tclear\n\t};\n}\n\n//#endregion\n//#region createGlobalState/index.ts\n/**\n* Keep states in the global scope to be reusable across Vue instances.\n*\n* @see https://vueuse.org/createGlobalState\n* @param stateFactory A factory function to create the state\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction createGlobalState(stateFactory) {\n\tlet initialized = false;\n\tlet state;\n\tconst scope = effectScope(true);\n\treturn ((...args) => {\n\t\tif (!initialized) {\n\t\t\tstate = scope.run(() => stateFactory(...args));\n\t\t\tinitialized = true;\n\t\t}\n\t\treturn state;\n\t});\n}\n\n//#endregion\n//#region provideLocal/map.ts\nconst localProvidedStateMap = /* @__PURE__ */ new WeakMap();\n\n//#endregion\n//#region injectLocal/index.ts\n/**\n* On the basis of `inject`, it is allowed to directly call inject to obtain the value after call provide in the same component.\n*\n* @example\n* ```ts\n* injectLocal('MyInjectionKey', 1)\n* const injectedValue = injectLocal('MyInjectionKey') // injectedValue === 1\n* ```\n*\n* @__NO_SIDE_EFFECTS__\n*/\nconst injectLocal = (...args) => {\n\tvar _getCurrentInstance;\n\tconst key = args[0];\n\tconst instance = (_getCurrentInstance = getCurrentInstance()) === null || _getCurrentInstance === void 0 ? void 0 : _getCurrentInstance.proxy;\n\tconst owner = instance !== null && instance !== void 0 ? instance : getCurrentScope();\n\tif (owner == null && !hasInjectionContext()) throw new Error(\"injectLocal must be called in setup\");\n\tif (owner && localProvidedStateMap.has(owner) && key in localProvidedStateMap.get(owner)) return localProvidedStateMap.get(owner)[key];\n\treturn inject(...args);\n};\n\n//#endregion\n//#region provideLocal/index.ts\n/**\n* On the basis of `provide`, it is allowed to directly call inject to obtain the value after call provide in the same component.\n*\n* @example\n* ```ts\n* provideLocal('MyInjectionKey', 1)\n* const injectedValue = injectLocal('MyInjectionKey') // injectedValue === 1\n* ```\n*/\nfunction provideLocal(key, value) {\n\tvar _getCurrentInstance;\n\tconst instance = (_getCurrentInstance = getCurrentInstance()) === null || _getCurrentInstance === void 0 ? void 0 : _getCurrentInstance.proxy;\n\tconst owner = instance !== null && instance !== void 0 ? instance : getCurrentScope();\n\tif (owner == null) throw new Error(\"provideLocal must be called in setup\");\n\tif (!localProvidedStateMap.has(owner)) localProvidedStateMap.set(owner, Object.create(null));\n\tconst localProvidedState = localProvidedStateMap.get(owner);\n\tlocalProvidedState[key] = value;\n\treturn provide(key, value);\n}\n\n//#endregion\n//#region createInjectionState/index.ts\n/**\n* Create global state that can be injected into components.\n*\n* @see https://vueuse.org/createInjectionState\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction createInjectionState(composable, options) {\n\tconst key = (options === null || options === void 0 ? void 0 : options.injectionKey) || Symbol(composable.name || \"InjectionState\");\n\tconst defaultValue = options === null || options === void 0 ? void 0 : options.defaultValue;\n\tconst useProvidingState = (...args) => {\n\t\tconst state = composable(...args);\n\t\tprovideLocal(key, state);\n\t\treturn state;\n\t};\n\tconst useInjectedState = () => injectLocal(key, defaultValue);\n\treturn [useProvidingState, useInjectedState];\n}\n\n//#endregion\n//#region createRef/index.ts\n/**\n* Returns a `deepRef` or `shallowRef` depending on the `deep` param.\n*\n* @example createRef(1) // ShallowRef<number>\n* @example createRef(1, false) // ShallowRef<number>\n* @example createRef(1, true) // Ref<number>\n* @example createRef(\"string\") // ShallowRef<string>\n* @example createRef<\"A\"|\"B\">(\"A\", true) // Ref<\"A\"|\"B\">\n*\n* @param value\n* @param deep\n* @returns the `deepRef` or `shallowRef`\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction createRef(value, deep) {\n\tif (deep === true) return ref(value);\n\telse return shallowRef(value);\n}\n\n//#endregion\n//#region utils/is.ts\nconst isClient = typeof window !== \"undefined\" && typeof document !== \"undefined\";\nconst isWorker = typeof WorkerGlobalScope !== \"undefined\" && globalThis instanceof WorkerGlobalScope;\nconst isDef = (val) => typeof val !== \"undefined\";\nconst notNullish = (val) => val != null;\nconst assert = (condition, ...infos) => {\n\tif (!condition) console.warn(...infos);\n};\nconst toString = Object.prototype.toString;\nconst isObject = (val) => toString.call(val) === \"[object Object]\";\nconst now = () => Date.now();\nconst timestamp = () => +Date.now();\nconst clamp = (n, min, max) => Math.min(max, Math.max(min, n));\nconst noop = () => {};\nconst rand = (min, max) => {\n\tmin = Math.ceil(min);\n\tmax = Math.floor(max);\n\treturn Math.floor(Math.random() * (max - min + 1)) + min;\n};\nconst hasOwn = (val, key) => Object.prototype.hasOwnProperty.call(val, key);\nconst isIOS = /* @__PURE__ */ getIsIOS();\nfunction getIsIOS() {\n\tvar _window, _window2, _window3;\n\treturn isClient && !!((_window = window) === null || _window === void 0 || (_window = _window.navigator) === null || _window === void 0 ? void 0 : _window.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((_window2 = window) === null || _window2 === void 0 || (_window2 = _window2.navigator) === null || _window2 === void 0 ? void 0 : _window2.maxTouchPoints) > 2 && /iPad|Macintosh/.test((_window3 = window) === null || _window3 === void 0 ? void 0 : _window3.navigator.userAgent));\n}\n\n//#endregion\n//#region toRef/index.ts\nfunction toRef(...args) {\n\tif (args.length !== 1) return toRef$1(...args);\n\tconst r = args[0];\n\treturn typeof r === \"function\" ? readonly(customRef(() => ({\n\t\tget: r,\n\t\tset: noop\n\t}))) : ref(r);\n}\n\n//#endregion\n//#region utils/filters.ts\n/**\n* @internal\n*/\nfunction createFilterWrapper(filter, fn) {\n\tfunction wrapper(...args) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tPromise.resolve(filter(() => fn.apply(this, args), {\n\t\t\t\tfn,\n\t\t\t\tthisArg: this,\n\t\t\t\targs\n\t\t\t})).then(resolve).catch(reject);\n\t\t});\n\t}\n\treturn wrapper;\n}\nconst bypassFilter = (invoke$1) => {\n\treturn invoke$1();\n};\n/**\n* Create an EventFilter that debounce the events\n*/\nfunction debounceFilter(ms, options = {}) {\n\tlet timer;\n\tlet maxTimer;\n\tlet lastRejector = noop;\n\tconst _clearTimeout = (timer$1) => {\n\t\tclearTimeout(timer$1);\n\t\tlastRejector();\n\t\tlastRejector = noop;\n\t};\n\tlet lastInvoker;\n\tconst filter = (invoke$1) => {\n\t\tconst duration = toValue(ms);\n\t\tconst maxDuration = toValue(options.maxWait);\n\t\tif (timer) _clearTimeout(timer);\n\t\tif (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {\n\t\t\tif (maxTimer) {\n\t\t\t\t_clearTimeout(maxTimer);\n\t\t\t\tmaxTimer = void 0;\n\t\t\t}\n\t\t\treturn Promise.resolve(invoke$1());\n\t\t}\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tlastRejector = options.rejectOnCancel ? reject : resolve;\n\t\t\tlastInvoker = invoke$1;\n\t\t\tif (maxDuration && !maxTimer) maxTimer = setTimeout(() => {\n\t\t\t\tif (timer) _clearTimeout(timer);\n\t\t\t\tmaxTimer = void 0;\n\t\t\t\tresolve(lastInvoker());\n\t\t\t}, maxDuration);\n\t\t\ttimer = setTimeout(() => {\n\t\t\t\tif (maxTimer) _clearTimeout(maxTimer);\n\t\t\t\tmaxTimer = void 0;\n\t\t\t\tresolve(invoke$1());\n\t\t\t}, duration);\n\t\t});\n\t};\n\treturn filter;\n}\nfunction throttleFilter(...args) {\n\tlet lastExec = 0;\n\tlet timer;\n\tlet isLeading = true;\n\tlet lastRejector = noop;\n\tlet lastValue;\n\tlet ms;\n\tlet trailing;\n\tlet leading;\n\tlet rejectOnCancel;\n\tif (!isRef(args[0]) && typeof args[0] === \"object\") ({delay: ms, trailing = true, leading = true, rejectOnCancel = false} = args[0]);\n\telse [ms, trailing = true, leading = true, rejectOnCancel = false] = args;\n\tconst clear = () => {\n\t\tif (timer) {\n\t\t\tclearTimeout(timer);\n\t\t\ttimer = void 0;\n\t\t\tlastRejector();\n\t\t\tlastRejector = noop;\n\t\t}\n\t};\n\tconst filter = (_invoke) => {\n\t\tconst duration = toValue(ms);\n\t\tconst elapsed = Date.now() - lastExec;\n\t\tconst invoke$1 = () => {\n\t\t\treturn lastValue = _invoke();\n\t\t};\n\t\tclear();\n\t\tif (duration <= 0) {\n\t\t\tlastExec = Date.now();\n\t\t\treturn invoke$1();\n\t\t}\n\t\tif (elapsed > duration) {\n\t\t\tlastExec = Date.now();\n\t\t\tif (leading || !isLeading) invoke$1();\n\t\t} else if (trailing) lastValue = new Promise((resolve, reject) => {\n\t\t\tlastRejector = rejectOnCancel ? reject : resolve;\n\t\t\ttimer = setTimeout(() => {\n\t\t\t\tlastExec = Date.now();\n\t\t\t\tisLeading = true;\n\t\t\t\tresolve(invoke$1());\n\t\t\t\tclear();\n\t\t\t}, Math.max(0, duration - elapsed));\n\t\t});\n\t\tif (!leading && !timer) timer = setTimeout(() => isLeading = true, duration);\n\t\tisLeading = false;\n\t\treturn lastValue;\n\t};\n\treturn filter;\n}\n/**\n* EventFilter that gives extra controls to pause and resume the filter\n*\n* @param extendFilter Extra filter to apply when the PausableFilter is active, default to none\n* @param options Options to configure the filter\n*/\nfunction pausableFilter(extendFilter = bypassFilter, options = {}) {\n\tconst { initialState = \"active\" } = options;\n\tconst isActive = toRef(initialState === \"active\");\n\tfunction pause() {\n\t\tisActive.value = false;\n\t}\n\tfunction resume() {\n\t\tisActive.value = true;\n\t}\n\tconst eventFilter = (...args) => {\n\t\tif (isActive.value) extendFilter(...args);\n\t};\n\treturn {\n\t\tisActive: readonly(isActive),\n\t\tpause,\n\t\tresume,\n\t\teventFilter\n\t};\n}\n\n//#endregion\n//#region utils/general.ts\nfunction promiseTimeout(ms, throwOnTimeout = false, reason = \"Timeout\") {\n\treturn new Promise((resolve, reject) => {\n\t\tif (throwOnTimeout) setTimeout(() => reject(reason), ms);\n\t\telse setTimeout(resolve, ms);\n\t});\n}\nfunction identity(arg) {\n\treturn arg;\n}\n/**\n* Create singleton promise function\n*\n* @example\n* ```\n* const promise = createSingletonPromise(async () => { ... })\n*\n* await promise()\n* await promise() // all of them will be bind to a single promise instance\n* await promise() // and be resolved together\n* ```\n*/\nfunction createSingletonPromise(fn) {\n\tlet _promise;\n\tfunction wrapper() {\n\t\tif (!_promise) _promise = fn();\n\t\treturn _promise;\n\t}\n\twrapper.reset = async () => {\n\t\tconst _prev = _promise;\n\t\t_promise = void 0;\n\t\tif (_prev) await _prev;\n\t};\n\treturn wrapper;\n}\nfunction invoke(fn) {\n\treturn fn();\n}\nfunction containsProp(obj, ...props) {\n\treturn props.some((k) => k in obj);\n}\nfunction increaseWithUnit(target, delta) {\n\tvar _target$match;\n\tif (typeof target === \"number\") return target + delta;\n\tconst value = ((_target$match = target.match(/^-?\\d+\\.?\\d*/)) === null || _target$match === void 0 ? void 0 : _target$match[0]) || \"\";\n\tconst unit = target.slice(value.length);\n\tconst result = Number.parseFloat(value) + delta;\n\tif (Number.isNaN(result)) return target;\n\treturn result + unit;\n}\n/**\n* Get a px value for SSR use, do not rely on this method outside of SSR as REM unit is assumed at 16px, which might not be the case on the client\n*/\nfunction pxValue(px) {\n\treturn px.endsWith(\"rem\") ? Number.parseFloat(px) * 16 : Number.parseFloat(px);\n}\n/**\n* Create a new subset object by giving keys\n*/\nfunction objectPick(obj, keys, omitUndefined = false) {\n\treturn keys.reduce((n, k) => {\n\t\tif (k in obj) {\n\t\t\tif (!omitUndefined || obj[k] !== void 0) n[k] = obj[k];\n\t\t}\n\t\treturn n;\n\t}, {});\n}\n/**\n* Create a new subset object by omit giving keys\n*/\nfunction objectOmit(obj, keys, omitUndefined = false) {\n\treturn Object.fromEntries(Object.entries(obj).filter(([key, value]) => {\n\t\treturn (!omitUndefined || value !== void 0) && !keys.includes(key);\n\t}));\n}\nfunction objectEntries(obj) {\n\treturn Object.entries(obj);\n}\nfunction toArray(value) {\n\treturn Array.isArray(value) ? value : [value];\n}\n\n//#endregion\n//#region utils/port.ts\nfunction cacheStringFunction(fn) {\n\tconst cache = Object.create(null);\n\treturn ((str) => {\n\t\treturn cache[str] || (cache[str] = fn(str));\n\t});\n}\nconst hyphenateRE = /\\B([A-Z])/g;\nconst hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, \"-$1\").toLowerCase());\nconst camelizeRE = /-(\\w)/g;\nconst camelize = cacheStringFunction((str) => {\n\treturn str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : \"\");\n});\n\n//#endregion\n//#region utils/vue.ts\nfunction getLifeCycleTarget(target) {\n\treturn target || getCurrentInstance();\n}\n\n//#endregion\n//#region createSharedComposable/index.ts\n/**\n* Make a composable function usable with multiple Vue instances.\n*\n* @see https://vueuse.org/createSharedComposable\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction createSharedComposable(composable) {\n\tif (!isClient) return composable;\n\tlet subscribers = 0;\n\tlet state;\n\tlet scope;\n\tconst dispose = () => {\n\t\tsubscribers -= 1;\n\t\tif (scope && subscribers <= 0) {\n\t\t\tscope.stop();\n\t\t\tstate = void 0;\n\t\t\tscope = void 0;\n\t\t}\n\t};\n\treturn ((...args) => {\n\t\tsubscribers += 1;\n\t\tif (!scope) {\n\t\t\tscope = effectScope(true);\n\t\t\tstate = scope.run(() => composable(...args));\n\t\t}\n\t\ttryOnScopeDispose(dispose);\n\t\treturn state;\n\t});\n}\n\n//#endregion\n//#region extendRef/index.ts\nfunction extendRef(ref$1, extend, { enumerable = false, unwrap = true } = {}) {\n\tfor (const [key, value] of Object.entries(extend)) {\n\t\tif (key === \"value\") continue;\n\t\tif (isRef(value) && unwrap) Object.defineProperty(ref$1, key, {\n\t\t\tget() {\n\t\t\t\treturn value.value;\n\t\t\t},\n\t\t\tset(v) {\n\t\t\t\tvalue.value = v;\n\t\t\t},\n\t\t\tenumerable\n\t\t});\n\t\telse Object.defineProperty(ref$1, key, {\n\t\t\tvalue,\n\t\t\tenumerable\n\t\t});\n\t}\n\treturn ref$1;\n}\n\n//#endregion\n//#region get/index.ts\nfunction get(obj, key) {\n\tif (key == null) return unref(obj);\n\treturn unref(obj)[key];\n}\n\n//#endregion\n//#region isDefined/index.ts\nfunction isDefined(v) {\n\treturn unref(v) != null;\n}\n\n//#endregion\n//#region makeDestructurable/index.ts\n/* @__NO_SIDE_EFFECTS__ */\nfunction makeDestructurable(obj, arr) {\n\tif (typeof Symbol !== \"undefined\") {\n\t\tconst clone = { ...obj };\n\t\tObject.defineProperty(clone, Symbol.iterator, {\n\t\t\tenumerable: false,\n\t\t\tvalue() {\n\t\t\t\tlet index = 0;\n\t\t\t\treturn { next: () => ({\n\t\t\t\t\tvalue: arr[index++],\n\t\t\t\t\tdone: index > arr.length\n\t\t\t\t}) };\n\t\t\t}\n\t\t});\n\t\treturn clone;\n\t} else return Object.assign([...arr], obj);\n}\n\n//#endregion\n//#region reactify/index.ts\n/**\n* Converts plain function into a reactive function.\n* The converted function accepts refs as it's arguments\n* and returns a ComputedRef, with proper typing.\n*\n* @param fn - Source function\n* @param options - Options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction reactify(fn, options) {\n\tconst unrefFn = (options === null || options === void 0 ? void 0 : options.computedGetter) === false ? unref : toValue;\n\treturn function(...args) {\n\t\treturn computed(() => fn.apply(this, args.map((i) => unrefFn(i))));\n\t};\n}\n/** @deprecated use `reactify` instead */\nconst createReactiveFn = reactify;\n\n//#endregion\n//#region reactifyObject/index.ts\n/**\n* Apply `reactify` to an object\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction reactifyObject(obj, optionsOrKeys = {}) {\n\tlet keys = [];\n\tlet options;\n\tif (Array.isArray(optionsOrKeys)) keys = optionsOrKeys;\n\telse {\n\t\toptions = optionsOrKeys;\n\t\tconst { includeOwnProperties = true } = optionsOrKeys;\n\t\tkeys.push(...Object.keys(obj));\n\t\tif (includeOwnProperties) keys.push(...Object.getOwnPropertyNames(obj));\n\t}\n\treturn Object.fromEntries(keys.map((key) => {\n\t\tconst value = obj[key];\n\t\treturn [key, typeof value === \"function\" ? reactify(value.bind(obj), options) : value];\n\t}));\n}\n\n//#endregion\n//#region toReactive/index.ts\n/**\n* Converts ref to reactive.\n*\n* @see https://vueuse.org/toReactive\n* @param objectRef A ref of object\n*/\nfunction toReactive(objectRef) {\n\tif (!isRef(objectRef)) return reactive(objectRef);\n\treturn reactive(new Proxy({}, {\n\t\tget(_, p, receiver) {\n\t\t\treturn unref(Reflect.get(objectRef.value, p, receiver));\n\t\t},\n\t\tset(_, p, value) {\n\t\t\tif (isRef(objectRef.value[p]) && !isRef(value)) objectRef.value[p].value = value;\n\t\t\telse objectRef.value[p] = value;\n\t\t\treturn true;\n\t\t},\n\t\tdeleteProperty(_, p) {\n\t\t\treturn Reflect.deleteProperty(objectRef.value, p);\n\t\t},\n\t\thas(_, p) {\n\t\t\treturn Reflect.has(objectRef.value, p);\n\t\t},\n\t\townKeys() {\n\t\t\treturn Object.keys(objectRef.value);\n\t\t},\n\t\tgetOwnPropertyDescriptor() {\n\t\t\treturn {\n\t\t\t\tenumerable: true,\n\t\t\t\tconfigurable: true\n\t\t\t};\n\t\t}\n\t}));\n}\n\n//#endregion\n//#region reactiveComputed/index.ts\n/**\n* Computed reactive object.\n*/\nfunction reactiveComputed(fn) {\n\treturn toReactive(computed(fn));\n}\n\n//#endregion\n//#region reactiveOmit/index.ts\n/**\n* Reactively omit fields from a reactive object\n*\n* @see https://vueuse.org/reactiveOmit\n*/\nfunction reactiveOmit(obj, ...keys) {\n\tconst flatKeys = keys.flat();\n\tconst predicate = flatKeys[0];\n\treturn reactiveComputed(() => typeof predicate === \"function\" ? Object.fromEntries(Object.entries(toRefs$1(obj)).filter(([k, v]) => !predicate(toValue(v), k))) : Object.fromEntries(Object.entries(toRefs$1(obj)).filter((e) => !flatKeys.includes(e[0]))));\n}\n\n//#endregion\n//#region reactivePick/index.ts\n/**\n* Reactively pick fields from a reactive object\n*\n* @see https://vueuse.org/reactivePick\n*/\nfunction reactivePick(obj, ...keys) {\n\tconst flatKeys = keys.flat();\n\tconst predicate = flatKeys[0];\n\treturn reactiveComputed(() => typeof predicate === \"function\" ? Object.fromEntries(Object.entries(toRefs$1(obj)).filter(([k, v]) => predicate(toValue(v), k))) : Object.fromEntries(flatKeys.map((k) => [k, toRef(obj, k)])));\n}\n\n//#endregion\n//#region refAutoReset/index.ts\n/**\n* Create a ref which will be reset to the default value after some time.\n*\n* @see https://vueuse.org/refAutoReset\n* @param defaultValue The value which will be set.\n* @param afterMs A zero-or-greater delay in milliseconds.\n*/\nfunction refAutoReset(defaultValue, afterMs = 1e4) {\n\treturn customRef((track, trigger) => {\n\t\tlet value = toValue(defaultValue);\n\t\tlet timer;\n\t\tconst resetAfter = () => setTimeout(() => {\n\t\t\tvalue = toValue(defaultValue);\n\t\t\ttrigger();\n\t\t}, toValue(afterMs));\n\t\ttryOnScopeDispose(() => {\n\t\t\tclearTimeout(timer);\n\t\t});\n\t\treturn {\n\t\t\tget() {\n\t\t\t\ttrack();\n\t\t\t\treturn value;\n\t\t\t},\n\t\t\tset(newValue) {\n\t\t\t\tvalue = newValue;\n\t\t\t\ttrigger();\n\t\t\t\tclearTimeout(timer);\n\t\t\t\ttimer = resetAfter();\n\t\t\t}\n\t\t};\n\t});\n}\n/** @deprecated use `refAutoReset` instead */\nconst autoResetRef = refAutoReset;\n\n//#endregion\n//#region useDebounceFn/index.ts\n/**\n* Debounce execution of a function.\n*\n* @see https://vueuse.org/useDebounceFn\n* @param fn A function to be executed after delay milliseconds debounced.\n* @param ms A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.\n* @param options Options\n*\n* @return A new, debounce, function.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useDebounceFn(fn, ms = 200, options = {}) {\n\treturn createFilterWrapper(debounceFilter(ms, options), fn);\n}\n\n//#endregion\n//#region refDebounced/index.ts\n/**\n* Debounce updates of a ref.\n*\n* @return A new debounced ref.\n*/\nfunction refDebounced(value, ms = 200, options = {}) {\n\tconst debounced = ref(toValue(value));\n\tconst updater = useDebounceFn(() => {\n\t\tdebounced.value = value.value;\n\t}, ms, options);\n\twatch(value, () => updater());\n\treturn shallowReadonly(debounced);\n}\n/** @deprecated use `refDebounced` instead */\nconst debouncedRef = refDebounced;\n/** @deprecated use `refDebounced` instead */\nconst useDebounce = refDebounced;\n\n//#endregion\n//#region refDefault/index.ts\n/**\n* Apply default value to a ref.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction refDefault(source, defaultValue) {\n\treturn computed({\n\t\tget() {\n\t\t\tvar _source$value;\n\t\t\treturn (_source$value = source.value) !== null && _source$value !== void 0 ? _source$value : defaultValue;\n\t\t},\n\t\tset(value) {\n\t\t\tsource.value = value;\n\t\t}\n\t});\n}\n\n//#endregion\n//#region refManualReset/index.ts\n/**\n* Create a ref with manual reset functionality.\n*\n* @see https://vueuse.org/refManualReset\n* @param defaultValue The value which will be set.\n*/\nfunction refManualReset(defaultValue) {\n\tlet value = toValue(defaultValue);\n\tlet trigger;\n\tconst reset = () => {\n\t\tvalue = toValue(defaultValue);\n\t\ttrigger();\n\t};\n\tconst refValue = customRef((track, _trigger) => {\n\t\ttrigger = _trigger;\n\t\treturn {\n\t\t\tget() {\n\t\t\t\ttrack();\n\t\t\t\treturn value;\n\t\t\t},\n\t\t\tset(newValue) {\n\t\t\t\tvalue = newValue;\n\t\t\t\ttrigger();\n\t\t\t}\n\t\t};\n\t});\n\trefValue.reset = reset;\n\treturn refValue;\n}\n\n//#endregion\n//#region useThrottleFn/index.ts\n/**\n* Throttle execution of a function. Especially useful for rate limiting\n* execution of handlers on events like resize and scroll.\n*\n* @param fn A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,\n* to `callback` when the throttled-function is executed.\n* @param ms A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.\n* (default value: 200)\n*\n* @param [trailing] if true, call fn again after the time is up (default value: false)\n*\n* @param [leading] if true, call fn on the leading edge of the ms timeout (default value: true)\n*\n* @param [rejectOnCancel] if true, reject the last call if it's been cancel (default value: false)\n*\n* @return A new, throttled, function.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useThrottleFn(fn, ms = 200, trailing = false, leading = true, rejectOnCancel = false) {\n\treturn createFilterWrapper(throttleFilter(ms, trailing, leading, rejectOnCancel), fn);\n}\n\n//#endregion\n//#region refThrottled/index.ts\n/**\n* Throttle execution of a function. Especially useful for rate limiting\n* execution of handlers on events like resize and scroll.\n*\n* @param value Ref value to be watched with throttle effect\n* @param delay A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.\n* @param trailing if true, update the value again after the delay time is up\n* @param leading if true, update the value on the leading edge of the ms timeout\n*/\nfunction refThrottled(value, delay = 200, trailing = true, leading = true) {\n\tif (delay <= 0) return value;\n\tconst throttled = ref(toValue(value));\n\tconst updater = useThrottleFn(() => {\n\t\tthrottled.value = value.value;\n\t}, delay, trailing, leading);\n\twatch(value, () => updater());\n\treturn throttled;\n}\n/** @deprecated use `refThrottled` instead */\nconst throttledRef = refThrottled;\n/** @deprecated use `refThrottled` instead */\nconst useThrottle = refThrottled;\n\n//#endregion\n//#region refWithControl/index.ts\n/**\n* Fine-grained controls over ref and its reactivity.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction refWithControl(initial, options = {}) {\n\tlet source = initial;\n\tlet track;\n\tlet trigger;\n\tconst ref$1 = customRef((_track, _trigger) => {\n\t\ttrack = _track;\n\t\ttrigger = _trigger;\n\t\treturn {\n\t\t\tget() {\n\t\t\t\treturn get$1();\n\t\t\t},\n\t\t\tset(v) {\n\t\t\t\tset$1(v);\n\t\t\t}\n\t\t};\n\t});\n\tfunction get$1(tracking = true) {\n\t\tif (tracking) track();\n\t\treturn source;\n\t}\n\tfunction set$1(value, triggering = true) {\n\t\tvar _options$onBeforeChan, _options$onChanged;\n\t\tif (value === source) return;\n\t\tconst old = source;\n\t\tif (((_options$onBeforeChan = options.onBeforeChange) === null || _options$onBeforeChan === void 0 ? void 0 : _options$onBeforeChan.call(options, value, old)) === false) return;\n\t\tsource = value;\n\t\t(_options$onChanged = options.onChanged) === null || _options$onChanged === void 0 || _options$onChanged.call(options, value, old);\n\t\tif (triggering) trigger();\n\t}\n\t/**\n\t* Get the value without tracked in the reactivity system\n\t*/\n\tconst untrackedGet = () => get$1(false);\n\t/**\n\t* Set the value without triggering the reactivity system\n\t*/\n\tconst silentSet = (v) => set$1(v, false);\n\t/**\n\t* Get the value without tracked in the reactivity system.\n\t*\n\t* Alias for `untrackedGet()`\n\t*/\n\tconst peek = () => get$1(false);\n\t/**\n\t* Set the value without triggering the reactivity system\n\t*\n\t* Alias for `silentSet(v)`\n\t*/\n\tconst lay = (v) => set$1(v, false);\n\treturn extendRef(ref$1, {\n\t\tget: get$1,\n\t\tset: set$1,\n\t\tuntrackedGet,\n\t\tsilentSet,\n\t\tpeek,\n\t\tlay\n\t}, { enumerable: true });\n}\n/** @deprecated use `refWithControl` instead */\nconst controlledRef = refWithControl;\n\n//#endregion\n//#region set/index.ts\n/**\n* Shorthand for `ref.value = x`\n*/\nfunction set(...args) {\n\tif (args.length === 2) {\n\t\tconst [ref$1, value] = args;\n\t\tref$1.value = value;\n\t}\n\tif (args.length === 3) {\n\t\tconst [target, key, value] = args;\n\t\ttarget[key] = value;\n\t}\n}\n\n//#endregion\n//#region watchWithFilter/index.ts\nfunction watchWithFilter(source, cb, options = {}) {\n\tconst { eventFilter = bypassFilter,...watchOptions } = options;\n\treturn watch(source, createFilterWrapper(eventFilter, cb), watchOptions);\n}\n\n//#endregion\n//#region watchPausable/index.ts\nfunction watchPausable(source, cb, options = {}) {\n\tconst { eventFilter: filter, initialState = \"active\",...watchOptions } = options;\n\tconst { eventFilter, pause, resume, isActive } = pausableFilter(filter, { initialState });\n\treturn {\n\t\tstop: watchWithFilter(source, cb, {\n\t\t\t...watchOptions,\n\t\t\teventFilter\n\t\t}),\n\t\tpause,\n\t\tresume,\n\t\tisActive\n\t};\n}\n/** @deprecated use `watchPausable` instead */\nconst pausableWatch = watchPausable;\n\n//#endregion\n//#region syncRef/index.ts\n/**\n* Two-way refs synchronization.\n* From the set theory perspective to restrict the option's type\n* Check in the following order:\n* 1. L = R\n* 2. L ∩ R ≠ ∅\n* 3. L ⊆ R\n* 4. L ∩ R = ∅\n*/\nfunction syncRef(left, right, ...[options]) {\n\tconst { flush = \"sync\", deep = false, immediate = true, direction = \"both\", transform = {} } = options || {};\n\tconst watchers = [];\n\tconst transformLTR = \"ltr\" in transform && transform.ltr || ((v) => v);\n\tconst transformRTL = \"rtl\" in transform && transform.rtl || ((v) => v);\n\tif (direction === \"both\" || direction === \"ltr\") watchers.push(pausableWatch(left, (newValue) => {\n\t\twatchers.forEach((w) => w.pause());\n\t\tright.value = transformLTR(newValue);\n\t\twatchers.forEach((w) => w.resume());\n\t}, {\n\t\tflush,\n\t\tdeep,\n\t\timmediate\n\t}));\n\tif (direction === \"both\" || direction === \"rtl\") watchers.push(pausableWatch(right, (newValue) => {\n\t\twatchers.forEach((w) => w.pause());\n\t\tleft.value = transformRTL(newValue);\n\t\twatchers.forEach((w) => w.resume());\n\t}, {\n\t\tflush,\n\t\tdeep,\n\t\timmediate\n\t}));\n\tconst stop = () => {\n\t\twatchers.forEach((w) => w.stop());\n\t};\n\treturn stop;\n}\n\n//#endregion\n//#region syncRefs/index.ts\n/**\n* Keep target ref(s) in sync with the source ref\n*\n* @param source source ref\n* @param targets\n*/\nfunction syncRefs(source, targets, options = {}) {\n\tconst { flush = \"sync\", deep = false, immediate = true } = options;\n\tconst targetsArray = toArray(targets);\n\treturn watch(source, (newValue) => targetsArray.forEach((target) => target.value = newValue), {\n\t\tflush,\n\t\tdeep,\n\t\timmediate\n\t});\n}\n\n//#endregion\n//#region toRefs/index.ts\n/**\n* Extended `toRefs` that also accepts refs of an object.\n*\n* @see https://vueuse.org/toRefs\n* @param objectRef A ref or normal object or array.\n* @param options Options\n*/\nfunction toRefs(objectRef, options = {}) {\n\tif (!isRef(objectRef)) return toRefs$1(objectRef);\n\tconst result = Array.isArray(objectRef.value) ? Array.from({ length: objectRef.value.length }) : {};\n\tfor (const key in objectRef.value) result[key] = customRef(() => ({\n\t\tget() {\n\t\t\treturn objectRef.value[key];\n\t\t},\n\t\tset(v) {\n\t\t\tvar _toValue;\n\t\t\tif ((_toValue = toValue(options.replaceRef)) !== null && _toValue !== void 0 ? _toValue : true) if (Array.isArray(objectRef.value)) {\n\t\t\t\tconst copy = [...objectRef.value];\n\t\t\t\tcopy[key] = v;\n\t\t\t\tobjectRef.value = copy;\n\t\t\t} else {\n\t\t\t\tconst newObject = {\n\t\t\t\t\t...objectRef.value,\n\t\t\t\t\t[key]: v\n\t\t\t\t};\n\t\t\t\tObject.setPrototypeOf(newObject, Object.getPrototypeOf(objectRef.value));\n\t\t\t\tobjectRef.value = newObject;\n\t\t\t}\n\t\t\telse objectRef.value[key] = v;\n\t\t}\n\t}));\n\treturn result;\n}\n\n//#endregion\n//#region tryOnBeforeMount/index.ts\n/**\n* Call onBeforeMount() if it's inside a component lifecycle, if not, just call the function\n*\n* @param fn\n* @param sync if set to false, it will run in the nextTick() of Vue\n* @param target\n*/\nfunction tryOnBeforeMount(fn, sync = true, target) {\n\tif (getLifeCycleTarget(target)) onBeforeMount(fn, target);\n\telse if (sync) fn();\n\telse nextTick(fn);\n}\n\n//#endregion\n//#region tryOnBeforeUnmount/index.ts\n/**\n* Call onBeforeUnmount() if it's inside a component lifecycle, if not, do nothing\n*\n* @param fn\n* @param target\n*/\nfunction tryOnBeforeUnmount(fn, target) {\n\tif (getLifeCycleTarget(target)) onBeforeUnmount(fn, target);\n}\n\n//#endregion\n//#region tryOnMounted/index.ts\n/**\n* Call onMounted() if it's inside a component lifecycle, if not, just call the function\n*\n* @param fn\n* @param sync if set to false, it will run in the nextTick() of Vue\n* @param target\n*/\nfunction tryOnMounted(fn, sync = true, target) {\n\tif (getLifeCycleTarget(target)) onMounted(fn, target);\n\telse if (sync) fn();\n\telse nextTick(fn);\n}\n\n//#endregion\n//#region tryOnUnmounted/index.ts\n/**\n* Call onUnmounted() if it's inside a component lifecycle, if not, do nothing\n*\n* @param fn\n* @param target\n*/\nfunction tryOnUnmounted(fn, target) {\n\tif (getLifeCycleTarget(target)) onUnmounted(fn, target);\n}\n\n//#endregion\n//#region until/index.ts\nfunction createUntil(r, isNot = false) {\n\tfunction toMatch(condition, { flush = \"sync\", deep = false, timeout, throwOnTimeout } = {}) {\n\t\tlet stop = null;\n\t\tconst promises = [new Promise((resolve) => {\n\t\t\tstop = watch(r, (v) => {\n\t\t\t\tif (condition(v) !== isNot) {\n\t\t\t\t\tif (stop) stop();\n\t\t\t\t\telse nextTick(() => stop === null || stop === void 0 ? void 0 : stop());\n\t\t\t\t\tresolve(v);\n\t\t\t\t}\n\t\t\t}, {\n\t\t\t\tflush,\n\t\t\t\tdeep,\n\t\t\t\timmediate: true\n\t\t\t});\n\t\t})];\n\t\tif (timeout != null) promises.push(promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r)).finally(() => stop === null || stop === void 0 ? void 0 : stop()));\n\t\treturn Promise.race(promises);\n\t}\n\tfunction toBe(value, options) {\n\t\tif (!isRef(value)) return toMatch((v) => v === value, options);\n\t\tconst { flush = \"sync\", deep = false, timeout, throwOnTimeout } = options !== null && options !== void 0 ? options : {};\n\t\tlet stop = null;\n\t\tconst promises = [new Promise((resolve) => {\n\t\t\tstop = watch([r, value], ([v1, v2]) => {\n\t\t\t\tif (isNot !== (v1 === v2)) {\n\t\t\t\t\tif (stop) stop();\n\t\t\t\t\telse nextTick(() => stop === null || stop === void 0 ? void 0 : stop());\n\t\t\t\t\tresolve(v1);\n\t\t\t\t}\n\t\t\t}, {\n\t\t\t\tflush,\n\t\t\t\tdeep,\n\t\t\t\timmediate: true\n\t\t\t});\n\t\t})];\n\t\tif (timeout != null) promises.push(promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r)).finally(() => {\n\t\t\tstop === null || stop === void 0 || stop();\n\t\t\treturn toValue(r);\n\t\t}));\n\t\treturn Promise.race(promises);\n\t}\n\tfunction toBeTruthy(options) {\n\t\treturn toMatch((v) => Boolean(v), options);\n\t}\n\tfunction toBeNull(options) {\n\t\treturn toBe(null, options);\n\t}\n\tfunction toBeUndefined(options) {\n\t\treturn toBe(void 0, options);\n\t}\n\tfunction toBeNaN(options) {\n\t\treturn toMatch(Number.isNaN, options);\n\t}\n\tfunction toContains(value, options) {\n\t\treturn toMatch((v) => {\n\t\t\tconst array = Array.from(v);\n\t\t\treturn array.includes(value) || array.includes(toValue(value));\n\t\t}, options);\n\t}\n\tfunction changed(options) {\n\t\treturn changedTimes(1, options);\n\t}\n\tfunction changedTimes(n = 1, options) {\n\t\tlet count = -1;\n\t\treturn toMatch(() => {\n\t\t\tcount += 1;\n\t\t\treturn count >= n;\n\t\t}, options);\n\t}\n\tif (Array.isArray(toValue(r))) return {\n\t\ttoMatch,\n\t\ttoContains,\n\t\tchanged,\n\t\tchangedTimes,\n\t\tget not() {\n\t\t\treturn createUntil(r, !isNot);\n\t\t}\n\t};\n\telse return {\n\t\ttoMatch,\n\t\ttoBe,\n\t\ttoBeTruthy,\n\t\ttoBeNull,\n\t\ttoBeNaN,\n\t\ttoBeUndefined,\n\t\tchanged,\n\t\tchangedTimes,\n\t\tget not() {\n\t\t\treturn createUntil(r, !isNot);\n\t\t}\n\t};\n}\nfunction until(r) {\n\treturn createUntil(r);\n}\n\n//#endregion\n//#region useArrayDifference/index.ts\nfunction defaultComparator(value, othVal) {\n\treturn value === othVal;\n}\n/**\n* Reactive get array difference of two array\n* @see https://vueuse.org/useArrayDifference\n* @returns - the difference of two array\n* @param args\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useArrayDifference(...args) {\n\tvar _args$, _args$2;\n\tconst list = args[0];\n\tconst values = args[1];\n\tlet compareFn = (_args$ = args[2]) !== null && _args$ !== void 0 ? _args$ : defaultComparator;\n\tconst { symmetric = false } = (_args$2 = args[3]) !== null && _args$2 !== void 0 ? _args$2 : {};\n\tif (typeof compareFn === \"string\") {\n\t\tconst key = compareFn;\n\t\tcompareFn = (value, othVal) => value[key] === othVal[key];\n\t}\n\tconst diff1 = computed(() => toValue(list).filter((x) => toValue(values).findIndex((y) => compareFn(x, y)) === -1));\n\tif (symmetric) {\n\t\tconst diff2 = computed(() => toValue(values).filter((x) => toValue(list).findIndex((y) => compareFn(x, y)) === -1));\n\t\treturn computed(() => symmetric ? [...toValue(diff1), ...toValue(diff2)] : toValue(diff1));\n\t} else return diff1;\n}\n\n//#endregion\n//#region useArrayEvery/index.ts\n/**\n* Reactive `Array.every`\n*\n* @see https://vueuse.org/useArrayEvery\n* @param list - the array was called upon.\n* @param fn - a function to test each element.\n*\n* @returns **true** if the `fn` function returns a **truthy** value for every element from the array. Otherwise, **false**.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useArrayEvery(list, fn) {\n\treturn computed(() => toValue(list).every((element, index, array) => fn(toValue(element), index, array)));\n}\n\n//#endregion\n//#region useArrayFilter/index.ts\n/**\n* Reactive `Array.filter`\n*\n* @see https://vueuse.org/useArrayFilter\n* @param list - the array was called upon.\n* @param fn - a function that is called for every element of the given `list`. Each time `fn` executes, the returned value is added to the new array.\n*\n* @returns a shallow copy of a portion of the given array, filtered down to just the elements from the given array that pass the test implemented by the provided function. If no elements pass the test, an empty array will be returned.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useArrayFilter(list, fn) {\n\treturn computed(() => toValue(list).map((i) => toValue(i)).filter(fn));\n}\n\n//#endregion\n//#region useArrayFind/index.ts\n/**\n* Reactive `Array.find`\n*\n* @see https://vueuse.org/useArrayFind\n* @param list - the array was called upon.\n* @param fn - a function to test each element.\n*\n* @returns the first element in the array that satisfies the provided testing function. Otherwise, undefined is returned.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useArrayFind(list, fn) {\n\treturn computed(() => toValue(toValue(list).find((element, index, array) => fn(toValue(element), index, array))));\n}\n\n//#endregion\n//#region useArrayFindIndex/index.ts\n/**\n* Reactive `Array.findIndex`\n*\n* @see https://vueuse.org/useArrayFindIndex\n* @param list - the array was called upon.\n* @param fn - a function to test each element.\n*\n* @returns the index of the first element in the array that passes the test. Otherwise, \"-1\".\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useArrayFindIndex(list, fn) {\n\treturn computed(() => toValue(list).findIndex((element, index, array) => fn(toValue(element), index, array)));\n}\n\n//#endregion\n//#region useArrayFindLast/index.ts\nfunction findLast(arr, cb) {\n\tlet index = arr.length;\n\twhile (index-- > 0) if (cb(arr[index], index, arr)) return arr[index];\n}\n/**\n* Reactive `Array.findLast`\n*\n* @see https://vueuse.org/useArrayFindLast\n* @param list - the array was called upon.\n* @param fn - a function to test each element.\n*\n* @returns the last element in the array that satisfies the provided testing function. Otherwise, undefined is returned.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useArrayFindLast(list, fn) {\n\treturn computed(() => toValue(!Array.prototype.findLast ? findLast(toValue(list), (element, index, array) => fn(toValue(element), index, array)) : toValue(list).findLast((element, index, array) => fn(toValue(element), index, array))));\n}\n\n//#endregion\n//#region useArrayIncludes/index.ts\nfunction isArrayIncludesOptions(obj) {\n\treturn isObject(obj) && containsProp(obj, \"formIndex\", \"comparator\");\n}\n/**\n* Reactive `Array.includes`\n*\n* @see https://vueuse.org/useArrayIncludes\n*\n* @returns true if the `value` is found in the array. Otherwise, false.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useArrayIncludes(...args) {\n\tvar _comparator;\n\tconst list = args[0];\n\tconst value = args[1];\n\tlet comparator = args[2];\n\tlet formIndex = 0;\n\tif (isArrayIncludesOptions(comparator)) {\n\t\tvar _comparator$fromIndex;\n\t\tformIndex = (_comparator$fromIndex = comparator.fromIndex) !== null && _comparator$fromIndex !== void 0 ? _comparator$fromIndex : 0;\n\t\tcomparator = comparator.comparator;\n\t}\n\tif (typeof comparator === \"string\") {\n\t\tconst key = comparator;\n\t\tcomparator = (element, value$1) => element[key] === toValue(value$1);\n\t}\n\tcomparator = (_comparator = comparator) !== null && _comparator !== void 0 ? _comparator : ((element, value$1) => element === toValue(value$1));\n\treturn computed(() => toValue(list).slice(formIndex).some((element, index, array) => comparator(toValue(element), toValue(value), index, toValue(array))));\n}\n\n//#endregion\n//#region useArrayJoin/index.ts\n/**\n* Reactive `Array.join`\n*\n* @see https://vueuse.org/useArrayJoin\n* @param list - the array was called upon.\n* @param separator - a string to separate each pair of adjacent elements of the array. If omitted, the array elements are separated with a comma (\",\").\n*\n* @returns a string with all array elements joined. If arr.length is 0, the empty string is returned.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useArrayJoin(list, separator) {\n\treturn computed(() => toValue(list).map((i) => toValue(i)).join(toValue(separator)));\n}\n\n//#endregion\n//#region useArrayMap/index.ts\n/**\n* Reactive `Array.map`\n*\n* @see https://vueuse.org/useArrayMap\n* @param list - the array was called upon.\n* @param fn - a function that is called for every element of the given `list`. Each time `fn` executes, the returned value is added to the new array.\n*\n* @returns a new array with each element being the result of the callback function.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useArrayMap(list, fn) {\n\treturn computed(() => toValue(list).map((i) => toValue(i)).map(fn));\n}\n\n//#endregion\n//#region useArrayReduce/index.ts\n/**\n* Reactive `Array.reduce`\n*\n* @see https://vueuse.org/useArrayReduce\n* @param list - the array was called upon.\n* @param reducer - a \"reducer\" function.\n* @param args\n*\n* @returns the value that results from running the \"reducer\" callback function to completion over the entire array.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useArrayReduce(list, reducer, ...args) {\n\tconst reduceCallback = (sum, value, index) => reducer(toValue(sum), toValue(value), index);\n\treturn computed(() => {\n\t\tconst resolved = toValue(list);\n\t\treturn args.length ? resolved.reduce(reduceCallback, typeof args[0] === \"function\" ? toValue(args[0]()) : toValue(args[0])) : resolved.reduce(reduceCallback);\n\t});\n}\n\n//#endregion\n//#region useArraySome/index.ts\n/**\n* Reactive `Array.some`\n*\n* @see https://vueuse.org/useArraySome\n* @param list - the array was called upon.\n* @param fn - a function to test each element.\n*\n* @returns **true** if the `fn` function returns a **truthy** value for any element from the array. Otherwise, **false**.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useArraySome(list, fn) {\n\treturn computed(() => toValue(list).some((element, index, array) => fn(toValue(element), index, array)));\n}\n\n//#endregion\n//#region useArrayUnique/index.ts\nfunction uniq(array) {\n\treturn Array.from(new Set(array));\n}\nfunction uniqueElementsBy(array, fn) {\n\treturn array.reduce((acc, v) => {\n\t\tif (!acc.some((x) => fn(v, x, array))) acc.push(v);\n\t\treturn acc;\n\t}, []);\n}\n/**\n* reactive unique array\n* @see https://vueuse.org/useArrayUnique\n* @param list - the array was called upon.\n* @param compareFn\n* @returns A computed ref that returns a unique array of items.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useArrayUnique(list, compareFn) {\n\treturn computed(() => {\n\t\tconst resolvedList = toValue(list).map((element) => toValue(element));\n\t\treturn compareFn ? uniqueElementsBy(resolvedList, compareFn) : uniq(resolvedList);\n\t});\n}\n\n//#endregion\n//#region useCounter/index.ts\n/**\n* Basic counter with utility functions.\n*\n* @see https://vueuse.org/useCounter\n* @param [initialValue]\n* @param options\n*/\nfunction useCounter(initialValue = 0, options = {}) {\n\tlet _initialValue = unref(initialValue);\n\tconst count = shallowRef(initialValue);\n\tconst { max = Number.POSITIVE_INFINITY, min = Number.NEGATIVE_INFINITY } = options;\n\tconst inc = (delta = 1) => count.value = Math.max(Math.min(max, count.value + delta), min);\n\tconst dec = (delta = 1) => count.value = Math.min(Math.max(min, count.value - delta), max);\n\tconst get$1 = () => count.value;\n\tconst set$1 = (val) => count.value = Math.max(min, Math.min(max, val));\n\tconst reset = (val = _initialValue) => {\n\t\t_initialValue = val;\n\t\treturn set$1(val);\n\t};\n\treturn {\n\t\tcount: shallowReadonly(count),\n\t\tinc,\n\t\tdec,\n\t\tget: get$1,\n\t\tset: set$1,\n\t\treset\n\t};\n}\n\n//#endregion\n//#region useDateFormat/index.ts\nconst REGEX_PARSE = /^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[T\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/i;\nconst REGEX_FORMAT = /[YMDHhms]o|\\[([^\\]]+)\\]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|z{1,4}|SSS/g;\nfunction defaultMeridiem(hours, minutes, isLowercase, hasPeriod) {\n\tlet m = hours < 12 ? \"AM\" : \"PM\";\n\tif (hasPeriod) m = m.split(\"\").reduce((acc, curr) => acc += `${curr}.`, \"\");\n\treturn isLowercase ? m.toLowerCase() : m;\n}\nfunction formatOrdinal(num) {\n\tconst suffixes = [\n\t\t\"th\",\n\t\t\"st\",\n\t\t\"nd\",\n\t\t\"rd\"\n\t];\n\tconst v = num % 100;\n\treturn num + (suffixes[(v - 20) % 10] || suffixes[v] || suffixes[0]);\n}\nfunction formatDate(date, formatStr, options = {}) {\n\tvar _options$customMeridi;\n\tconst years = date.getFullYear();\n\tconst month = date.getMonth();\n\tconst days = date.getDate();\n\tconst hours = date.getHours();\n\tconst minutes = date.getMinutes();\n\tconst seconds = date.getSeconds();\n\tconst milliseconds = date.getMilliseconds();\n\tconst day = date.getDay();\n\tconst meridiem = (_options$customMeridi = options.customMeridiem) !== null && _options$customMeridi !== void 0 ? _options$customMeridi : defaultMeridiem;\n\tconst stripTimeZone = (dateString) => {\n\t\tvar _dateString$split$;\n\t\treturn (_dateString$split$ = dateString.split(\" \")[1]) !== null && _dateString$split$ !== void 0 ? _dateString$split$ : \"\";\n\t};\n\tconst matches = {\n\t\tYo: () => formatOrdinal(years),\n\t\tYY: () => String(years).slice(-2),\n\t\tYYYY: () => years,\n\t\tM: () => month + 1,\n\t\tMo: () => formatOrdinal(month + 1),\n\t\tMM: () => `${month + 1}`.padStart(2, \"0\"),\n\t\tMMM: () => date.toLocaleDateString(toValue(options.locales), { month: \"short\" }),\n\t\tMMMM: () => date.toLocaleDateString(toValue(options.locales), { month: \"long\" }),\n\t\tD: () => String(days),\n\t\tDo: () => formatOrdinal(days),\n\t\tDD: () => `${days}`.padStart(2, \"0\"),\n\t\tH: () => String(hours),\n\t\tHo: () => formatOrdinal(hours),\n\t\tHH: () => `${hours}`.padStart(2, \"0\"),\n\t\th: () => `${hours % 12 || 12}`.padStart(1, \"0\"),\n\t\tho: () => formatOrdinal(hours % 12 || 12),\n\t\thh: () => `${hours % 12 || 12}`.padStart(2, \"0\"),\n\t\tm: () => String(minutes),\n\t\tmo: () => formatOrdinal(minutes),\n\t\tmm: () => `${minutes}`.padStart(2, \"0\"),\n\t\ts: () => String(seconds),\n\t\tso: () => formatOrdinal(seconds),\n\t\tss: () => `${seconds}`.padStart(2, \"0\"),\n\t\tSSS: () => `${milliseconds}`.padStart(3, \"0\"),\n\t\td: () => day,\n\t\tdd: () => date.toLocaleDateString(toValue(options.locales), { weekday: \"narrow\" }),\n\t\tddd: () => date.toLocaleDateString(toValue(options.locales), { weekday: \"short\" }),\n\t\tdddd: () => date.toLocaleDateString(toValue(options.locales), { weekday: \"long\" }),\n\t\tA: () => meridiem(hours, minutes),\n\t\tAA: () => meridiem(hours, minutes, false, true),\n\t\ta: () => meridiem(hours, minutes, true),\n\t\taa: () => meridiem(hours, minutes, true, true),\n\t\tz: () => stripTimeZone(date.toLocaleDateString(toValue(options.locales), { timeZoneName: \"shortOffset\" })),\n\t\tzz: () => stripTimeZone(date.toLocaleDateString(toValue(options.locales), { timeZoneName: \"shortOffset\" })),\n\t\tzzz: () => stripTimeZone(date.toLocaleDateString(toValue(options.locales), { timeZoneName: \"shortOffset\" })),\n\t\tzzzz: () => stripTimeZone(date.toLocaleDateString(toValue(options.locales), { timeZoneName: \"longOffset\" }))\n\t};\n\treturn formatStr.replace(REGEX_FORMAT, (match, $1) => {\n\t\tvar _ref, _matches$match;\n\t\treturn (_ref = $1 !== null && $1 !== void 0 ? $1 : (_matches$match = matches[match]) === null || _matches$match === void 0 ? void 0 : _matches$match.call(matches)) !== null && _ref !== void 0 ? _ref : match;\n\t});\n}\nfunction normalizeDate(date) {\n\tif (date === null) return /* @__PURE__ */ new Date(NaN);\n\tif (date === void 0) return /* @__PURE__ */ new Date();\n\tif (date instanceof Date) return new Date(date);\n\tif (typeof date === \"string\" && !/Z$/i.test(date)) {\n\t\tconst d = date.match(REGEX_PARSE);\n\t\tif (d) {\n\t\t\tconst m = d[2] - 1 || 0;\n\t\t\tconst ms = (d[7] || \"0\").substring(0, 3);\n\t\t\treturn new Date(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms);\n\t\t}\n\t}\n\treturn new Date(date);\n}\n/**\n* Get the formatted date according to the string of tokens passed in.\n*\n* @see https://vueuse.org/useDateFormat\n* @param date - The date to format, can either be a `Date` object, a timestamp, or a string\n* @param formatStr - The combination of tokens to format the date\n* @param options - UseDateFormatOptions\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useDateFormat(date, formatStr = \"HH:mm:ss\", options = {}) {\n\treturn computed(() => formatDate(normalizeDate(toValue(date)), toValue(formatStr), options));\n}\n\n//#endregion\n//#region useIntervalFn/index.ts\n/**\n* Wrapper for `setInterval` with controls\n*\n* @see https://vueuse.org/useIntervalFn\n* @param cb\n* @param interval\n* @param options\n*/\nfunction useIntervalFn(cb, interval = 1e3, options = {}) {\n\tconst { immediate = true, immediateCallback = false } = options;\n\tlet timer = null;\n\tconst isActive = shallowRef(false);\n\tfunction clean() {\n\t\tif (timer) {\n\t\t\tclearInterval(timer);\n\t\t\ttimer = null;\n\t\t}\n\t}\n\tfunction pause() {\n\t\tisActive.value = false;\n\t\tclean();\n\t}\n\tfunction resume() {\n\t\tconst intervalValue = toValue(interval);\n\t\tif (intervalValue <= 0) return;\n\t\tisActive.value = true;\n\t\tif (immediateCallback) cb();\n\t\tclean();\n\t\tif (isActive.value) timer = setInterval(cb, intervalValue);\n\t}\n\tif (immediate && isClient) resume();\n\tif (isRef(interval) || typeof interval === \"function\") tryOnScopeDispose(watch(interval, () => {\n\t\tif (isActive.value && isClient) resume();\n\t}));\n\ttryOnScopeDispose(pause);\n\treturn {\n\t\tisActive: shallowReadonly(isActive),\n\t\tpause,\n\t\tresume\n\t};\n}\n\n//#endregion\n//#region useInterval/index.ts\nfunction useInterval(interval = 1e3, options = {}) {\n\tconst { controls: exposeControls = false, immediate = true, callback } = options;\n\tconst counter = shallowRef(0);\n\tconst update = () => counter.value += 1;\n\tconst reset = () => {\n\t\tcounter.value = 0;\n\t};\n\tconst controls = useIntervalFn(callback ? () => {\n\t\tupdate();\n\t\tcallback(counter.value);\n\t} : update, interval, { immediate });\n\tif (exposeControls) return {\n\t\tcounter: shallowReadonly(counter),\n\t\treset,\n\t\t...controls\n\t};\n\telse return shallowReadonly(counter);\n}\n\n//#endregion\n//#region useLastChanged/index.ts\nfunction useLastChanged(source, options = {}) {\n\tvar _options$initialValue;\n\tconst ms = shallowRef((_options$initialValue = options.initialValue) !== null && _options$initialValue !== void 0 ? _options$initialValue : null);\n\twatch(source, () => ms.value = timestamp(), options);\n\treturn shallowReadonly(ms);\n}\n\n//#endregion\n//#region useTimeoutFn/index.ts\n/**\n* Wrapper for `setTimeout` with controls.\n*\n* @param cb\n* @param interval\n* @param options\n*/\nfunction useTimeoutFn(cb, interval, options = {}) {\n\tconst { immediate = true, immediateCallback = false } = options;\n\tconst isPending = shallowRef(false);\n\tlet timer;\n\tfunction clear() {\n\t\tif (timer) {\n\t\t\tclearTimeout(timer);\n\t\t\ttimer = void 0;\n\t\t}\n\t}\n\tfunction stop() {\n\t\tisPending.value = false;\n\t\tclear();\n\t}\n\tfunction start(...args) {\n\t\tif (immediateCallback) cb();\n\t\tclear();\n\t\tisPending.value = true;\n\t\ttimer = setTimeout(() => {\n\t\t\tisPending.value = false;\n\t\t\ttimer = void 0;\n\t\t\tcb(...args);\n\t\t}, toValue(interval));\n\t}\n\tif (immediate) {\n\t\tisPending.value = true;\n\t\tif (isClient) start();\n\t}\n\ttryOnScopeDispose(stop);\n\treturn {\n\t\tisPending: shallowReadonly(isPending),\n\t\tstart,\n\t\tstop\n\t};\n}\n\n//#endregion\n//#region useTimeout/index.ts\nfunction useTimeout(interval = 1e3, options = {}) {\n\tconst { controls: exposeControls = false, callback } = options;\n\tconst controls = useTimeoutFn(callback !== null && callback !== void 0 ? callback : noop, interval, options);\n\tconst ready = computed(() => !controls.isPending.value);\n\tif (exposeControls) return {\n\t\tready,\n\t\t...controls\n\t};\n\telse return ready;\n}\n\n//#endregion\n//#region useToNumber/index.ts\n/**\n* Reactively convert a string ref to number.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useToNumber(value, options = {}) {\n\tconst { method = \"parseFloat\", radix, nanToZero } = options;\n\treturn computed(() => {\n\t\tlet resolved = toValue(value);\n\t\tif (typeof method === \"function\") resolved = method(resolved);\n\t\telse if (typeof resolved === \"string\") resolved = Number[method](resolved, radix);\n\t\tif (nanToZero && Number.isNaN(resolved)) resolved = 0;\n\t\treturn resolved;\n\t});\n}\n\n//#endregion\n//#region useToString/index.ts\n/**\n* Reactively convert a ref to string.\n*\n* @see https://vueuse.org/useToString\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useToString(value) {\n\treturn computed(() => `${toValue(value)}`);\n}\n\n//#endregion\n//#region useToggle/index.ts\n/**\n* A boolean ref with a toggler\n*\n* @see https://vueuse.org/useToggle\n* @param [initialValue]\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useToggle(initialValue = false, options = {}) {\n\tconst { truthyValue = true, falsyValue = false } = options;\n\tconst valueIsRef = isRef(initialValue);\n\tconst _value = shallowRef(initialValue);\n\tfunction toggle(value) {\n\t\tif (arguments.length) {\n\t\t\t_value.value = value;\n\t\t\treturn _value.value;\n\t\t} else {\n\t\t\tconst truthy = toValue(truthyValue);\n\t\t\t_value.value = _value.value === truthy ? toValue(falsyValue) : truthy;\n\t\t\treturn _value.value;\n\t\t}\n\t}\n\tif (valueIsRef) return toggle;\n\telse return [_value, toggle];\n}\n\n//#endregion\n//#region watchArray/index.ts\n/**\n* Watch for an array with additions and removals.\n*\n* @see https://vueuse.org/watchArray\n*/\nfunction watchArray(source, cb, options) {\n\tlet oldList = (options === null || options === void 0 ? void 0 : options.immediate) ? [] : [...typeof source === \"function\" ? source() : Array.isArray(source) ? source : toValue(source)];\n\treturn watch(source, (newList, _, onCleanup) => {\n\t\tconst oldListRemains = Array.from({ length: oldList.length });\n\t\tconst added = [];\n\t\tfor (const obj of newList) {\n\t\t\tlet found = false;\n\t\t\tfor (let i = 0; i < oldList.length; i++) if (!oldListRemains[i] && obj === oldList[i]) {\n\t\t\t\toldListRemains[i] = true;\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (!found) added.push(obj);\n\t\t}\n\t\tconst removed = oldList.filter((_$1, i) => !oldListRemains[i]);\n\t\tcb(newList, oldList, added, removed, onCleanup);\n\t\toldList = [...newList];\n\t}, options);\n}\n\n//#endregion\n//#region watchAtMost/index.ts\nfunction watchAtMost(source, cb, options) {\n\tconst { count,...watchOptions } = options;\n\tconst current = shallowRef(0);\n\tconst { stop, resume, pause } = watchWithFilter(source, (...args) => {\n\t\tcurrent.value += 1;\n\t\tif (current.value >= toValue(count)) nextTick(() => stop());\n\t\tcb(...args);\n\t}, watchOptions);\n\treturn {\n\t\tcount: current,\n\t\tstop,\n\t\tresume,\n\t\tpause\n\t};\n}\n\n//#endregion\n//#region watchDebounced/index.ts\nfunction watchDebounced(source, cb, options = {}) {\n\tconst { debounce = 0, maxWait = void 0,...watchOptions } = options;\n\treturn watchWithFilter(source, cb, {\n\t\t...watchOptions,\n\t\teventFilter: debounceFilter(debounce, { maxWait })\n\t});\n}\n/** @deprecated use `watchDebounced` instead */\nconst debouncedWatch = watchDebounced;\n\n//#endregion\n//#region watchDeep/index.ts\n/**\n* Shorthand for watching value with {deep: true}\n*\n* @see https://vueuse.org/watchDeep\n*/\nfunction watchDeep(source, cb, options) {\n\treturn watch(source, cb, {\n\t\t...options,\n\t\tdeep: true\n\t});\n}\n\n//#endregion\n//#region watchIgnorable/index.ts\nfunction watchIgnorable(source, cb, options = {}) {\n\tconst { eventFilter = bypassFilter,...watchOptions } = options;\n\tconst filteredCb = createFilterWrapper(eventFilter, cb);\n\tlet ignoreUpdates;\n\tlet ignorePrevAsyncUpdates;\n\tlet stop;\n\tif (watchOptions.flush === \"sync\") {\n\t\tlet ignore = false;\n\t\tignorePrevAsyncUpdates = () => {};\n\t\tignoreUpdates = (updater) => {\n\t\t\tignore = true;\n\t\t\tupdater();\n\t\t\tignore = false;\n\t\t};\n\t\tstop = watch(source, (...args) => {\n\t\t\tif (!ignore) filteredCb(...args);\n\t\t}, watchOptions);\n\t} else {\n\t\tconst disposables = [];\n\t\tlet ignoreCounter = 0;\n\t\tlet syncCounter = 0;\n\t\tignorePrevAsyncUpdates = () => {\n\t\t\tignoreCounter = syncCounter;\n\t\t};\n\t\tdisposables.push(watch(source, () => {\n\t\t\tsyncCounter++;\n\t\t}, {\n\t\t\t...watchOptions,\n\t\t\tflush: \"sync\"\n\t\t}));\n\t\tignoreUpdates = (updater) => {\n\t\t\tconst syncCounterPrev = syncCounter;\n\t\t\tupdater();\n\t\t\tignoreCounter += syncCounter - syncCounterPrev;\n\t\t};\n\t\tdisposables.push(watch(source, (...args) => {\n\t\t\tconst ignore = ignoreCounter > 0 && ignoreCounter === syncCounter;\n\t\t\tignoreCounter = 0;\n\t\t\tsyncCounter = 0;\n\t\t\tif (ignore) return;\n\t\t\tfilteredCb(...args);\n\t\t}, watchOptions));\n\t\tstop = () => {\n\t\t\tdisposables.forEach((fn) => fn());\n\t\t};\n\t}\n\treturn {\n\t\tstop,\n\t\tignoreUpdates,\n\t\tignorePrevAsyncUpdates\n\t};\n}\n/** @deprecated use `watchIgnorable` instead */\nconst ignorableWatch = watchIgnorable;\n\n//#endregion\n//#region watchImmediate/index.ts\n/**\n* Shorthand for watching value with {immediate: true}\n*\n* @see https://vueuse.org/watchImmediate\n*/\nfunction watchImmediate(source, cb, options) {\n\treturn watch(source, cb, {\n\t\t...options,\n\t\timmediate: true\n\t});\n}\n\n//#endregion\n//#region watchOnce/index.ts\n/**\n* Shorthand for watching value with { once: true }\n*\n* @see https://vueuse.org/watchOnce\n*/\nfunction watchOnce(source, cb, options) {\n\treturn watch(source, cb, {\n\t\t...options,\n\t\tonce: true\n\t});\n}\n\n//#endregion\n//#region watchThrottled/index.ts\nfunction watchThrottled(source, cb, options = {}) {\n\tconst { throttle = 0, trailing = true, leading = true,...watchOptions } = options;\n\treturn watchWithFilter(source, cb, {\n\t\t...watchOptions,\n\t\teventFilter: throttleFilter(throttle, trailing, leading)\n\t});\n}\n/** @deprecated use `watchThrottled` instead */\nconst throttledWatch = watchThrottled;\n\n//#endregion\n//#region watchTriggerable/index.ts\nfunction watchTriggerable(source, cb, options = {}) {\n\tlet cleanupFn;\n\tfunction onEffect() {\n\t\tif (!cleanupFn) return;\n\t\tconst fn = cleanupFn;\n\t\tcleanupFn = void 0;\n\t\tfn();\n\t}\n\t/** Register the function `cleanupFn` */\n\tfunction onCleanup(callback) {\n\t\tcleanupFn = callback;\n\t}\n\tconst _cb = (value, oldValue) => {\n\t\tonEffect();\n\t\treturn cb(value, oldValue, onCleanup);\n\t};\n\tconst res = watchIgnorable(source, _cb, options);\n\tconst { ignoreUpdates } = res;\n\tconst trigger = () => {\n\t\tlet res$1;\n\t\tignoreUpdates(() => {\n\t\t\tres$1 = _cb(getWatchSources(source), getOldValue(source));\n\t\t});\n\t\treturn res$1;\n\t};\n\treturn {\n\t\t...res,\n\t\ttrigger\n\t};\n}\nfunction getWatchSources(sources) {\n\tif (isReactive(sources)) return sources;\n\tif (Array.isArray(sources)) return sources.map((item) => toValue(item));\n\treturn toValue(sources);\n}\nfunction getOldValue(source) {\n\treturn Array.isArray(source) ? source.map(() => void 0) : void 0;\n}\n\n//#endregion\n//#region whenever/index.ts\n/**\n* Shorthand for watching value to be truthy\n*\n* @see https://vueuse.org/whenever\n*/\nfunction whenever(source, cb, options) {\n\tconst stop = watch(source, (v, ov, onInvalidate) => {\n\t\tif (v) {\n\t\t\tif (options === null || options === void 0 ? void 0 : options.once) nextTick(() => stop());\n\t\t\tcb(v, ov, onInvalidate);\n\t\t}\n\t}, {\n\t\t...options,\n\t\tonce: false\n\t});\n\treturn stop;\n}\n\n//#endregion\nexport { assert, autoResetRef, bypassFilter, camelize, clamp, computedEager, computedWithControl, containsProp, controlledComputed, controlledRef, createEventHook, createFilterWrapper, createGlobalState, createInjectionState, createReactiveFn, createRef, createSharedComposable, createSingletonPromise, debounceFilter, debouncedRef, debouncedWatch, eagerComputed, extendRef, formatDate, get, getLifeCycleTarget, hasOwn, hyphenate, identity, ignorableWatch, increaseWithUnit, injectLocal, invoke, isClient, isDef, isDefined, isIOS, isObject, isWorker, makeDestructurable, noop, normalizeDate, notNullish, now, objectEntries, objectOmit, objectPick, pausableFilter, pausableWatch, promiseTimeout, provideLocal, pxValue, rand, reactify, reactifyObject, reactiveComputed, reactiveOmit, reactivePick, refAutoReset, refDebounced, refDefault, refManualReset, refThrottled, refWithControl, set, syncRef, syncRefs, throttleFilter, throttledRef, throttledWatch, timestamp, toArray, toReactive, toRef, toRefs, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useArrayDifference, useArrayEvery, useArrayFilter, useArrayFind, useArrayFindIndex, useArrayFindLast, useArrayIncludes, useArrayJoin, useArrayMap, useArrayReduce, useArraySome, useArrayUnique, useCounter, useDateFormat, useDebounce, useDebounceFn, useInterval, useIntervalFn, useLastChanged, useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useToNumber, useToString, useToggle, watchArray, watchAtMost, watchDebounced, watchDeep, watchIgnorable, watchImmediate, watchOnce, watchPausable, watchThrottled, watchTriggerable, watchWithFilter, whenever };","import { bypassFilter, camelize, clamp, computedWithControl, containsProp, createEventHook, createFilterWrapper, createRef, createSingletonPromise, debounceFilter, hasOwn, identity, increaseWithUnit, injectLocal, isClient, isDef, isIOS, isObject, isWorker, makeDestructurable, noop, notNullish, objectEntries, objectOmit, objectPick, pausableFilter, pausableWatch, promiseTimeout, provideLocal, pxValue, syncRef, throttleFilter, timestamp, toArray, toRef, toRefs, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useDebounceFn, useIntervalFn, useThrottleFn, useTimeoutFn, watchIgnorable, watchImmediate, watchOnce, watchWithFilter, whenever } from \"@vueuse/shared\";\nimport { Fragment, TransitionGroup, computed, customRef, defineComponent, getCurrentInstance, getCurrentScope, h, hasInjectionContext, inject, isReadonly, isRef, markRaw, nextTick, onBeforeUpdate, onMounted, onUpdated, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, toRaw, toValue, unref, watch, watchEffect } from \"vue\";\n\nexport * from \"@vueuse/shared\"\n\n//#region computedAsync/index.ts\nfunction computedAsync(evaluationCallback, initialState, optionsOrRef) {\n\tvar _globalThis$reportErr;\n\tlet options;\n\tif (isRef(optionsOrRef)) options = { evaluating: optionsOrRef };\n\telse options = optionsOrRef || {};\n\tconst { lazy = false, flush = \"sync\", evaluating = void 0, shallow = true, onError = (_globalThis$reportErr = globalThis.reportError) !== null && _globalThis$reportErr !== void 0 ? _globalThis$reportErr : noop } = options;\n\tconst started = shallowRef(!lazy);\n\tconst current = shallow ? shallowRef(initialState) : ref(initialState);\n\tlet counter = 0;\n\twatchEffect(async (onInvalidate) => {\n\t\tif (!started.value) return;\n\t\tcounter++;\n\t\tconst counterAtBeginning = counter;\n\t\tlet hasFinished = false;\n\t\tif (evaluating) Promise.resolve().then(() => {\n\t\t\tevaluating.value = true;\n\t\t});\n\t\ttry {\n\t\t\tconst result = await evaluationCallback((cancelCallback) => {\n\t\t\t\tonInvalidate(() => {\n\t\t\t\t\tif (evaluating) evaluating.value = false;\n\t\t\t\t\tif (!hasFinished) cancelCallback();\n\t\t\t\t});\n\t\t\t});\n\t\t\tif (counterAtBeginning === counter) current.value = result;\n\t\t} catch (e) {\n\t\t\tonError(e);\n\t\t} finally {\n\t\t\tif (evaluating && counterAtBeginning === counter) evaluating.value = false;\n\t\t\thasFinished = true;\n\t\t}\n\t}, { flush });\n\tif (lazy) return computed(() => {\n\t\tstarted.value = true;\n\t\treturn current.value;\n\t});\n\telse return current;\n}\n/** @deprecated use `computedAsync` instead */\nconst asyncComputed = computedAsync;\n\n//#endregion\n//#region computedInject/index.ts\nfunction computedInject(key, options, defaultSource, treatDefaultAsFactory) {\n\tlet source = inject(key);\n\tif (defaultSource) source = inject(key, defaultSource);\n\tif (treatDefaultAsFactory) source = inject(key, defaultSource, treatDefaultAsFactory);\n\tif (typeof options === \"function\") return computed((oldValue) => options(source, oldValue));\n\telse return computed({\n\t\tget: (oldValue) => options.get(source, oldValue),\n\t\tset: options.set\n\t});\n}\n\n//#endregion\n//#region createReusableTemplate/index.ts\n/**\n* This function creates `define` and `reuse` components in pair,\n* It also allow to pass a generic to bind with type.\n*\n* @see https://vueuse.org/createReusableTemplate\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction createReusableTemplate(options = {}) {\n\tconst { inheritAttrs = true } = options;\n\tconst render = shallowRef();\n\tconst define = defineComponent({ setup(_, { slots }) {\n\t\treturn () => {\n\t\t\trender.value = slots.default;\n\t\t};\n\t} });\n\tconst reuse = defineComponent({\n\t\tinheritAttrs,\n\t\tprops: options.props,\n\t\tsetup(props, { attrs, slots }) {\n\t\t\treturn () => {\n\t\t\t\tvar _render$value;\n\t\t\t\tif (!render.value && true) throw new Error(\"[VueUse] Failed to find the definition of reusable template\");\n\t\t\t\tconst vnode = (_render$value = render.value) === null || _render$value === void 0 ? void 0 : _render$value.call(render, {\n\t\t\t\t\t...options.props == null ? keysToCamelKebabCase(attrs) : props,\n\t\t\t\t\t$slots: slots\n\t\t\t\t});\n\t\t\t\treturn inheritAttrs && (vnode === null || vnode === void 0 ? void 0 : vnode.length) === 1 ? vnode[0] : vnode;\n\t\t\t};\n\t\t}\n\t});\n\treturn makeDestructurable({\n\t\tdefine,\n\t\treuse\n\t}, [define, reuse]);\n}\nfunction keysToCamelKebabCase(obj) {\n\tconst newObj = {};\n\tfor (const key in obj) newObj[camelize(key)] = obj[key];\n\treturn newObj;\n}\n\n//#endregion\n//#region createTemplatePromise/index.ts\n/**\n* Creates a template promise component.\n*\n* @see https://vueuse.org/createTemplatePromise\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction createTemplatePromise(options = {}) {\n\tlet index = 0;\n\tconst instances = ref([]);\n\tfunction create(...args) {\n\t\tconst props = shallowReactive({\n\t\t\tkey: index++,\n\t\t\targs,\n\t\t\tpromise: void 0,\n\t\t\tresolve: () => {},\n\t\t\treject: () => {},\n\t\t\tisResolving: false,\n\t\t\toptions\n\t\t});\n\t\tinstances.value.push(props);\n\t\tprops.promise = new Promise((_resolve, _reject) => {\n\t\t\tprops.resolve = (v) => {\n\t\t\t\tprops.isResolving = true;\n\t\t\t\treturn _resolve(v);\n\t\t\t};\n\t\t\tprops.reject = _reject;\n\t\t}).finally(() => {\n\t\t\tprops.promise = void 0;\n\t\t\tconst index$1 = instances.value.indexOf(props);\n\t\t\tif (index$1 !== -1) instances.value.splice(index$1, 1);\n\t\t});\n\t\treturn props.promise;\n\t}\n\tfunction start(...args) {\n\t\tif (options.singleton && instances.value.length > 0) return instances.value[0].promise;\n\t\treturn create(...args);\n\t}\n\tconst component = defineComponent((_, { slots }) => {\n\t\tconst renderList = () => instances.value.map((props) => {\n\t\t\tvar _slots$default;\n\t\t\treturn h(Fragment, { key: props.key }, (_slots$default = slots.default) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots, props));\n\t\t});\n\t\tif (options.transition) return () => h(TransitionGroup, options.transition, renderList);\n\t\treturn renderList;\n\t});\n\tcomponent.start = start;\n\treturn component;\n}\n\n//#endregion\n//#region createUnrefFn/index.ts\n/**\n* Make a plain function accepting ref and raw values as arguments.\n* Returns the same value the unconverted function returns, with proper typing.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction createUnrefFn(fn) {\n\treturn function(...args) {\n\t\treturn fn.apply(this, args.map((i) => toValue(i)));\n\t};\n}\n\n//#endregion\n//#region _configurable.ts\nconst defaultWindow = isClient ? window : void 0;\nconst defaultDocument = isClient ? window.document : void 0;\nconst defaultNavigator = isClient ? window.navigator : void 0;\nconst defaultLocation = isClient ? window.location : void 0;\n\n//#endregion\n//#region unrefElement/index.ts\n/**\n* Get the dom element of a ref of element or Vue component instance\n*\n* @param elRef\n*/\nfunction unrefElement(elRef) {\n\tvar _$el;\n\tconst plain = toValue(elRef);\n\treturn (_$el = plain === null || plain === void 0 ? void 0 : plain.$el) !== null && _$el !== void 0 ? _$el : plain;\n}\n\n//#endregion\n//#region useEventListener/index.ts\nfunction useEventListener(...args) {\n\tconst register = (el, event, listener, options) => {\n\t\tel.addEventListener(event, listener, options);\n\t\treturn () => el.removeEventListener(event, listener, options);\n\t};\n\tconst firstParamTargets = computed(() => {\n\t\tconst test = toArray(toValue(args[0])).filter((e) => e != null);\n\t\treturn test.every((e) => typeof e !== \"string\") ? test : void 0;\n\t});\n\treturn watchImmediate(() => {\n\t\tvar _firstParamTargets$va, _firstParamTargets$va2;\n\t\treturn [\n\t\t\t(_firstParamTargets$va = (_firstParamTargets$va2 = firstParamTargets.value) === null || _firstParamTargets$va2 === void 0 ? void 0 : _firstParamTargets$va2.map((e) => unrefElement(e))) !== null && _firstParamTargets$va !== void 0 ? _firstParamTargets$va : [defaultWindow].filter((e) => e != null),\n\t\t\ttoArray(toValue(firstParamTargets.value ? args[1] : args[0])),\n\t\t\ttoArray(unref(firstParamTargets.value ? args[2] : args[1])),\n\t\t\ttoValue(firstParamTargets.value ? args[3] : args[2])\n\t\t];\n\t}, ([raw_targets, raw_events, raw_listeners, raw_options], _, onCleanup) => {\n\t\tif (!(raw_targets === null || raw_targets === void 0 ? void 0 : raw_targets.length) || !(raw_events === null || raw_events === void 0 ? void 0 : raw_events.length) || !(raw_listeners === null || raw_listeners === void 0 ? void 0 : raw_listeners.length)) return;\n\t\tconst optionsClone = isObject(raw_options) ? { ...raw_options } : raw_options;\n\t\tconst cleanups = raw_targets.flatMap((el) => raw_events.flatMap((event) => raw_listeners.map((listener) => register(el, event, listener, optionsClone))));\n\t\tonCleanup(() => {\n\t\t\tcleanups.forEach((fn) => fn());\n\t\t});\n\t}, { flush: \"post\" });\n}\n\n//#endregion\n//#region onClickOutside/index.ts\nlet _iOSWorkaround = false;\nfunction onClickOutside(target, handler, options = {}) {\n\tconst { window: window$1 = defaultWindow, ignore = [], capture = true, detectIframe = false, controls = false } = options;\n\tif (!window$1) return controls ? {\n\t\tstop: noop,\n\t\tcancel: noop,\n\t\ttrigger: noop\n\t} : noop;\n\tif (isIOS && !_iOSWorkaround) {\n\t\t_iOSWorkaround = true;\n\t\tconst listenerOptions = { passive: true };\n\t\tArray.from(window$1.document.body.children).forEach((el) => el.addEventListener(\"click\", noop, listenerOptions));\n\t\twindow$1.document.documentElement.addEventListener(\"click\", noop, listenerOptions);\n\t}\n\tlet shouldListen = true;\n\tconst shouldIgnore = (event) => {\n\t\treturn toValue(ignore).some((target$1) => {\n\t\t\tif (typeof target$1 === \"string\") return Array.from(window$1.document.querySelectorAll(target$1)).some((el) => el === event.target || event.composedPath().includes(el));\n\t\t\telse {\n\t\t\t\tconst el = unrefElement(target$1);\n\t\t\t\treturn el && (event.target === el || event.composedPath().includes(el));\n\t\t\t}\n\t\t});\n\t};\n\t/**\n\t* Determines if the given target has multiple root elements.\n\t* Referenced from: https://github.com/vuejs/test-utils/blob/ccb460be55f9f6be05ab708500a41ec8adf6f4bc/src/vue-wrapper.ts#L21\n\t*/\n\tfunction hasMultipleRoots(target$1) {\n\t\tconst vm = toValue(target$1);\n\t\treturn vm && vm.$.subTree.shapeFlag === 16;\n\t}\n\tfunction checkMultipleRoots(target$1, event) {\n\t\tconst vm = toValue(target$1);\n\t\tconst children = vm.$.subTree && vm.$.subTree.children;\n\t\tif (children == null || !Array.isArray(children)) return false;\n\t\treturn children.some((child) => child.el === event.target || event.composedPath().includes(child.el));\n\t}\n\tconst listener = (event) => {\n\t\tconst el = unrefElement(target);\n\t\tif (event.target == null) return;\n\t\tif (!(el instanceof Element) && hasMultipleRoots(target) && checkMultipleRoots(target, event)) return;\n\t\tif (!el || el === event.target || event.composedPath().includes(el)) return;\n\t\tif (\"detail\" in event && event.detail === 0) shouldListen = !shouldIgnore(event);\n\t\tif (!shouldListen) {\n\t\t\tshouldListen = true;\n\t\t\treturn;\n\t\t}\n\t\thandler(event);\n\t};\n\tlet isProcessingClick = false;\n\tconst cleanup = [\n\t\tuseEventListener(window$1, \"click\", (event) => {\n\t\t\tif (!isProcessingClick) {\n\t\t\t\tisProcessingClick = true;\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tisProcessingClick = false;\n\t\t\t\t}, 0);\n\t\t\t\tlistener(event);\n\t\t\t}\n\t\t}, {\n\t\t\tpassive: true,\n\t\t\tcapture\n\t\t}),\n\t\tuseEventListener(window$1, \"pointerdown\", (e) => {\n\t\t\tconst el = unrefElement(target);\n\t\t\tshouldListen = !shouldIgnore(e) && !!(el && !e.composedPath().includes(el));\n\t\t}, { passive: true }),\n\t\tdetectIframe && useEventListener(window$1, \"blur\", (event) => {\n\t\t\tsetTimeout(() => {\n\t\t\t\tvar _window$document$acti;\n\t\t\t\tconst el = unrefElement(target);\n\t\t\t\tif (((_window$document$acti = window$1.document.activeElement) === null || _window$document$acti === void 0 ? void 0 : _window$document$acti.tagName) === \"IFRAME\" && !(el === null || el === void 0 ? void 0 : el.contains(window$1.document.activeElement))) handler(event);\n\t\t\t}, 0);\n\t\t}, { passive: true })\n\t].filter(Boolean);\n\tconst stop = () => cleanup.forEach((fn) => fn());\n\tif (controls) return {\n\t\tstop,\n\t\tcancel: () => {\n\t\t\tshouldListen = false;\n\t\t},\n\t\ttrigger: (event) => {\n\t\t\tshouldListen = true;\n\t\t\tlistener(event);\n\t\t\tshouldListen = false;\n\t\t}\n\t};\n\treturn stop;\n}\n\n//#endregion\n//#region useMounted/index.ts\n/**\n* Mounted state in ref.\n*\n* @see https://vueuse.org/useMounted\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useMounted() {\n\tconst isMounted = shallowRef(false);\n\tconst instance = getCurrentInstance();\n\tif (instance) onMounted(() => {\n\t\tisMounted.value = true;\n\t}, instance);\n\treturn isMounted;\n}\n\n//#endregion\n//#region useSupported/index.ts\n/* @__NO_SIDE_EFFECTS__ */\nfunction useSupported(callback) {\n\tconst isMounted = useMounted();\n\treturn computed(() => {\n\t\tisMounted.value;\n\t\treturn Boolean(callback());\n\t});\n}\n\n//#endregion\n//#region useMutationObserver/index.ts\n/**\n* Watch for changes being made to the DOM tree.\n*\n* @see https://vueuse.org/useMutationObserver\n* @see https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver MutationObserver MDN\n* @param target\n* @param callback\n* @param options\n*/\nfunction useMutationObserver(target, callback, options = {}) {\n\tconst { window: window$1 = defaultWindow,...mutationOptions } = options;\n\tlet observer;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => window$1 && \"MutationObserver\" in window$1);\n\tconst cleanup = () => {\n\t\tif (observer) {\n\t\t\tobserver.disconnect();\n\t\t\tobserver = void 0;\n\t\t}\n\t};\n\tconst stopWatch = watch(computed(() => {\n\t\tconst items = toArray(toValue(target)).map(unrefElement).filter(notNullish);\n\t\treturn new Set(items);\n\t}), (newTargets) => {\n\t\tcleanup();\n\t\tif (isSupported.value && newTargets.size) {\n\t\t\tobserver = new MutationObserver(callback);\n\t\t\tnewTargets.forEach((el) => observer.observe(el, mutationOptions));\n\t\t}\n\t}, {\n\t\timmediate: true,\n\t\tflush: \"post\"\n\t});\n\tconst takeRecords = () => {\n\t\treturn observer === null || observer === void 0 ? void 0 : observer.takeRecords();\n\t};\n\tconst stop = () => {\n\t\tstopWatch();\n\t\tcleanup();\n\t};\n\ttryOnScopeDispose(stop);\n\treturn {\n\t\tisSupported,\n\t\tstop,\n\t\ttakeRecords\n\t};\n}\n\n//#endregion\n//#region onElementRemoval/index.ts\n/**\n* Fires when the element or any element containing it is removed.\n*\n* @param target\n* @param callback\n* @param options\n*/\nfunction onElementRemoval(target, callback, options = {}) {\n\tconst { window: window$1 = defaultWindow, document: document$1 = window$1 === null || window$1 === void 0 ? void 0 : window$1.document, flush = \"sync\" } = options;\n\tif (!window$1 || !document$1) return noop;\n\tlet stopFn;\n\tconst cleanupAndUpdate = (fn) => {\n\t\tstopFn === null || stopFn === void 0 || stopFn();\n\t\tstopFn = fn;\n\t};\n\tconst stopWatch = watchEffect(() => {\n\t\tconst el = unrefElement(target);\n\t\tif (el) {\n\t\t\tconst { stop } = useMutationObserver(document$1, (mutationsList) => {\n\t\t\t\tif (mutationsList.map((mutation) => [...mutation.removedNodes]).flat().some((node) => node === el || node.contains(el))) callback(mutationsList);\n\t\t\t}, {\n\t\t\t\twindow: window$1,\n\t\t\t\tchildList: true,\n\t\t\t\tsubtree: true\n\t\t\t});\n\t\t\tcleanupAndUpdate(stop);\n\t\t}\n\t}, { flush });\n\tconst stopHandle = () => {\n\t\tstopWatch();\n\t\tcleanupAndUpdate();\n\t};\n\ttryOnScopeDispose(stopHandle);\n\treturn stopHandle;\n}\n\n//#endregion\n//#region onKeyStroke/index.ts\nfunction createKeyPredicate(keyFilter) {\n\tif (typeof keyFilter === \"function\") return keyFilter;\n\telse if (typeof keyFilter === \"string\") return (event) => event.key === keyFilter;\n\telse if (Array.isArray(keyFilter)) return (event) => keyFilter.includes(event.key);\n\treturn () => true;\n}\nfunction onKeyStroke(...args) {\n\tlet key;\n\tlet handler;\n\tlet options = {};\n\tif (args.length === 3) {\n\t\tkey = args[0];\n\t\thandler = args[1];\n\t\toptions = args[2];\n\t} else if (args.length === 2) if (typeof args[1] === \"object\") {\n\t\tkey = true;\n\t\thandler = args[0];\n\t\toptions = args[1];\n\t} else {\n\t\tkey = args[0];\n\t\thandler = args[1];\n\t}\n\telse {\n\t\tkey = true;\n\t\thandler = args[0];\n\t}\n\tconst { target = defaultWindow, eventName = \"keydown\", passive = false, dedupe = false } = options;\n\tconst predicate = createKeyPredicate(key);\n\tconst listener = (e) => {\n\t\tif (e.repeat && toValue(dedupe)) return;\n\t\tif (predicate(e)) handler(e);\n\t};\n\treturn useEventListener(target, eventName, listener, passive);\n}\n/**\n* Listen to the keydown event of the given key.\n*\n* @see https://vueuse.org/onKeyStroke\n* @param key\n* @param handler\n* @param options\n*/\nfunction onKeyDown(key, handler, options = {}) {\n\treturn onKeyStroke(key, handler, {\n\t\t...options,\n\t\teventName: \"keydown\"\n\t});\n}\n/**\n* Listen to the keypress event of the given key.\n*\n* @see https://vueuse.org/onKeyStroke\n* @param key\n* @param handler\n* @param options\n*/\nfunction onKeyPressed(key, handler, options = {}) {\n\treturn onKeyStroke(key, handler, {\n\t\t...options,\n\t\teventName: \"keypress\"\n\t});\n}\n/**\n* Listen to the keyup event of the given key.\n*\n* @see https://vueuse.org/onKeyStroke\n* @param key\n* @param handler\n* @param options\n*/\nfunction onKeyUp(key, handler, options = {}) {\n\treturn onKeyStroke(key, handler, {\n\t\t...options,\n\t\teventName: \"keyup\"\n\t});\n}\n\n//#endregion\n//#region onLongPress/index.ts\nconst DEFAULT_DELAY = 500;\nconst DEFAULT_THRESHOLD = 10;\nfunction onLongPress(target, handler, options) {\n\tvar _options$modifiers10, _options$modifiers11;\n\tconst elementRef = computed(() => unrefElement(target));\n\tlet timeout;\n\tlet posStart;\n\tlet startTimestamp;\n\tlet hasLongPressed = false;\n\tfunction clear() {\n\t\tif (timeout) {\n\t\t\tclearTimeout(timeout);\n\t\t\ttimeout = void 0;\n\t\t}\n\t\tposStart = void 0;\n\t\tstartTimestamp = void 0;\n\t\thasLongPressed = false;\n\t}\n\tfunction getDelay(ev) {\n\t\tconst delay = options === null || options === void 0 ? void 0 : options.delay;\n\t\tif (typeof delay === \"function\") return delay(ev);\n\t\treturn delay !== null && delay !== void 0 ? delay : DEFAULT_DELAY;\n\t}\n\tfunction onRelease(ev) {\n\t\tvar _options$modifiers, _options$modifiers2, _options$modifiers3;\n\t\tconst [_startTimestamp, _posStart, _hasLongPressed] = [\n\t\t\tstartTimestamp,\n\t\t\tposStart,\n\t\t\thasLongPressed\n\t\t];\n\t\tclear();\n\t\tif (!(options === null || options === void 0 ? void 0 : options.onMouseUp) || !_posStart || !_startTimestamp) return;\n\t\tif ((options === null || options === void 0 || (_options$modifiers = options.modifiers) === null || _options$modifiers === void 0 ? void 0 : _options$modifiers.self) && ev.target !== elementRef.value) return;\n\t\tif (options === null || options === void 0 || (_options$modifiers2 = options.modifiers) === null || _options$modifiers2 === void 0 ? void 0 : _options$modifiers2.prevent) ev.preventDefault();\n\t\tif (options === null || options === void 0 || (_options$modifiers3 = options.modifiers) === null || _options$modifiers3 === void 0 ? void 0 : _options$modifiers3.stop) ev.stopPropagation();\n\t\tconst dx = ev.x - _posStart.x;\n\t\tconst dy = ev.y - _posStart.y;\n\t\tconst distance = Math.sqrt(dx * dx + dy * dy);\n\t\toptions.onMouseUp(ev.timeStamp - _startTimestamp, distance, _hasLongPressed);\n\t}\n\tfunction onDown(ev) {\n\t\tvar _options$modifiers4, _options$modifiers5, _options$modifiers6;\n\t\tif ((options === null || options === void 0 || (_options$modifiers4 = options.modifiers) === null || _options$modifiers4 === void 0 ? void 0 : _options$modifiers4.self) && ev.target !== elementRef.value) return;\n\t\tclear();\n\t\tif (options === null || options === void 0 || (_options$modifiers5 = options.modifiers) === null || _options$modifiers5 === void 0 ? void 0 : _options$modifiers5.prevent) ev.preventDefault();\n\t\tif (options === null || options === void 0 || (_options$modifiers6 = options.modifiers) === null || _options$modifiers6 === void 0 ? void 0 : _options$modifiers6.stop) ev.stopPropagation();\n\t\tposStart = {\n\t\t\tx: ev.x,\n\t\t\ty: ev.y\n\t\t};\n\t\tstartTimestamp = ev.timeStamp;\n\t\ttimeout = setTimeout(() => {\n\t\t\thasLongPressed = true;\n\t\t\thandler(ev);\n\t\t}, getDelay(ev));\n\t}\n\tfunction onMove(ev) {\n\t\tvar _options$modifiers7, _options$modifiers8, _options$modifiers9, _options$distanceThre;\n\t\tif ((options === null || options === void 0 || (_options$modifiers7 = options.modifiers) === null || _options$modifiers7 === void 0 ? void 0 : _options$modifiers7.self) && ev.target !== elementRef.value) return;\n\t\tif (!posStart || (options === null || options === void 0 ? void 0 : options.distanceThreshold) === false) return;\n\t\tif (options === null || options === void 0 || (_options$modifiers8 = options.modifiers) === null || _options$modifiers8 === void 0 ? void 0 : _options$modifiers8.prevent) ev.preventDefault();\n\t\tif (options === null || options === void 0 || (_options$modifiers9 = options.modifiers) === null || _options$modifiers9 === void 0 ? void 0 : _options$modifiers9.stop) ev.stopPropagation();\n\t\tconst dx = ev.x - posStart.x;\n\t\tconst dy = ev.y - posStart.y;\n\t\tif (Math.sqrt(dx * dx + dy * dy) >= ((_options$distanceThre = options === null || options === void 0 ? void 0 : options.distanceThreshold) !== null && _options$distanceThre !== void 0 ? _options$distanceThre : DEFAULT_THRESHOLD)) clear();\n\t}\n\tconst listenerOptions = {\n\t\tcapture: options === null || options === void 0 || (_options$modifiers10 = options.modifiers) === null || _options$modifiers10 === void 0 ? void 0 : _options$modifiers10.capture,\n\t\tonce: options === null || options === void 0 || (_options$modifiers11 = options.modifiers) === null || _options$modifiers11 === void 0 ? void 0 : _options$modifiers11.once\n\t};\n\tconst cleanup = [\n\t\tuseEventListener(elementRef, \"pointerdown\", onDown, listenerOptions),\n\t\tuseEventListener(elementRef, \"pointermove\", onMove, listenerOptions),\n\t\tuseEventListener(elementRef, [\"pointerup\", \"pointerleave\"], onRelease, listenerOptions)\n\t];\n\tconst stop = () => cleanup.forEach((fn) => fn());\n\treturn stop;\n}\n\n//#endregion\n//#region onStartTyping/index.ts\nfunction isFocusedElementEditable() {\n\tconst { activeElement, body } = document;\n\tif (!activeElement) return false;\n\tif (activeElement === body) return false;\n\tswitch (activeElement.tagName) {\n\t\tcase \"INPUT\":\n\t\tcase \"TEXTAREA\": return true;\n\t}\n\treturn activeElement.hasAttribute(\"contenteditable\");\n}\nfunction isTypedCharValid({ keyCode, metaKey, ctrlKey, altKey }) {\n\tif (metaKey || ctrlKey || altKey) return false;\n\tif (keyCode >= 48 && keyCode <= 57 || keyCode >= 96 && keyCode <= 105) return true;\n\tif (keyCode >= 65 && keyCode <= 90) return true;\n\treturn false;\n}\n/**\n* Fires when users start typing on non-editable elements.\n*\n* @see https://vueuse.org/onStartTyping\n* @param callback\n* @param options\n*/\nfunction onStartTyping(callback, options = {}) {\n\tconst { document: document$1 = defaultDocument } = options;\n\tconst keydown = (event) => {\n\t\tif (!isFocusedElementEditable() && isTypedCharValid(event)) callback(event);\n\t};\n\tif (document$1) useEventListener(document$1, \"keydown\", keydown, { passive: true });\n}\n\n//#endregion\n//#region templateRef/index.ts\n/**\n* @deprecated Use Vue's built-in `useTemplateRef` instead.\n*\n* Shorthand for binding ref to template element.\n*\n* @see https://vueuse.org/templateRef\n* @param key\n* @param initialValue\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction templateRef(key, initialValue = null) {\n\tconst instance = getCurrentInstance();\n\tlet _trigger = () => {};\n\tconst element = customRef((track, trigger) => {\n\t\t_trigger = trigger;\n\t\treturn {\n\t\t\tget() {\n\t\t\t\tvar _instance$proxy$$refs, _instance$proxy;\n\t\t\t\ttrack();\n\t\t\t\treturn (_instance$proxy$$refs = instance === null || instance === void 0 || (_instance$proxy = instance.proxy) === null || _instance$proxy === void 0 ? void 0 : _instance$proxy.$refs[key]) !== null && _instance$proxy$$refs !== void 0 ? _instance$proxy$$refs : initialValue;\n\t\t\t},\n\t\t\tset() {}\n\t\t};\n\t});\n\ttryOnMounted(_trigger);\n\tonUpdated(_trigger);\n\treturn element;\n}\n\n//#endregion\n//#region useActiveElement/index.ts\n/**\n* Reactive `document.activeElement`\n*\n* @see https://vueuse.org/useActiveElement\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useActiveElement(options = {}) {\n\tvar _options$document;\n\tconst { window: window$1 = defaultWindow, deep = true, triggerOnRemoval = false } = options;\n\tconst document$1 = (_options$document = options.document) !== null && _options$document !== void 0 ? _options$document : window$1 === null || window$1 === void 0 ? void 0 : window$1.document;\n\tconst getDeepActiveElement = () => {\n\t\tlet element = document$1 === null || document$1 === void 0 ? void 0 : document$1.activeElement;\n\t\tif (deep) {\n\t\t\tvar _element$shadowRoot;\n\t\t\twhile (element === null || element === void 0 ? void 0 : element.shadowRoot) element = element === null || element === void 0 || (_element$shadowRoot = element.shadowRoot) === null || _element$shadowRoot === void 0 ? void 0 : _element$shadowRoot.activeElement;\n\t\t}\n\t\treturn element;\n\t};\n\tconst activeElement = shallowRef();\n\tconst trigger = () => {\n\t\tactiveElement.value = getDeepActiveElement();\n\t};\n\tif (window$1) {\n\t\tconst listenerOptions = {\n\t\t\tcapture: true,\n\t\t\tpassive: true\n\t\t};\n\t\tuseEventListener(window$1, \"blur\", (event) => {\n\t\t\tif (event.relatedTarget !== null) return;\n\t\t\ttrigger();\n\t\t}, listenerOptions);\n\t\tuseEventListener(window$1, \"focus\", trigger, listenerOptions);\n\t}\n\tif (triggerOnRemoval) onElementRemoval(activeElement, trigger, { document: document$1 });\n\ttrigger();\n\treturn activeElement;\n}\n\n//#endregion\n//#region useRafFn/index.ts\n/**\n* Call function on every `requestAnimationFrame`. With controls of pausing and resuming.\n*\n* @see https://vueuse.org/useRafFn\n* @param fn\n* @param options\n*/\nfunction useRafFn(fn, options = {}) {\n\tconst { immediate = true, fpsLimit = void 0, window: window$1 = defaultWindow, once = false } = options;\n\tconst isActive = shallowRef(false);\n\tconst intervalLimit = computed(() => {\n\t\treturn fpsLimit ? 1e3 / toValue(fpsLimit) : null;\n\t});\n\tlet previousFrameTimestamp = 0;\n\tlet rafId = null;\n\tfunction loop(timestamp$1) {\n\t\tif (!isActive.value || !window$1) return;\n\t\tif (!previousFrameTimestamp) previousFrameTimestamp = timestamp$1;\n\t\tconst delta = timestamp$1 - previousFrameTimestamp;\n\t\tif (intervalLimit.value && delta < intervalLimit.value) {\n\t\t\trafId = window$1.requestAnimationFrame(loop);\n\t\t\treturn;\n\t\t}\n\t\tpreviousFrameTimestamp = timestamp$1;\n\t\tfn({\n\t\t\tdelta,\n\t\t\ttimestamp: timestamp$1\n\t\t});\n\t\tif (once) {\n\t\t\tisActive.value = false;\n\t\t\trafId = null;\n\t\t\treturn;\n\t\t}\n\t\trafId = window$1.requestAnimationFrame(loop);\n\t}\n\tfunction resume() {\n\t\tif (!isActive.value && window$1) {\n\t\t\tisActive.value = true;\n\t\t\tpreviousFrameTimestamp = 0;\n\t\t\trafId = window$1.requestAnimationFrame(loop);\n\t\t}\n\t}\n\tfunction pause() {\n\t\tisActive.value = false;\n\t\tif (rafId != null && window$1) {\n\t\t\twindow$1.cancelAnimationFrame(rafId);\n\t\t\trafId = null;\n\t\t}\n\t}\n\tif (immediate) resume();\n\ttryOnScopeDispose(pause);\n\treturn {\n\t\tisActive: readonly(isActive),\n\t\tpause,\n\t\tresume\n\t};\n}\n\n//#endregion\n//#region useAnimate/index.ts\n/**\n* Reactive Web Animations API\n*\n* @see https://vueuse.org/useAnimate\n* @param target\n* @param keyframes\n* @param options\n*/\nfunction useAnimate(target, keyframes, options) {\n\tlet config;\n\tlet animateOptions;\n\tif (isObject(options)) {\n\t\tconfig = options;\n\t\tanimateOptions = objectOmit(options, [\n\t\t\t\"window\",\n\t\t\t\"immediate\",\n\t\t\t\"commitStyles\",\n\t\t\t\"persist\",\n\t\t\t\"onReady\",\n\t\t\t\"onError\"\n\t\t]);\n\t} else {\n\t\tconfig = { duration: options };\n\t\tanimateOptions = options;\n\t}\n\tconst { window: window$1 = defaultWindow, immediate = true, commitStyles, persist, playbackRate: _playbackRate = 1, onReady, onError = (e) => {\n\t\tconsole.error(e);\n\t} } = config;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => window$1 && HTMLElement && \"animate\" in HTMLElement.prototype);\n\tconst animate = shallowRef(void 0);\n\tconst store = shallowReactive({\n\t\tstartTime: null,\n\t\tcurrentTime: null,\n\t\ttimeline: null,\n\t\tplaybackRate: _playbackRate,\n\t\tpending: false,\n\t\tplayState: immediate ? \"idle\" : \"paused\",\n\t\treplaceState: \"active\"\n\t});\n\tconst pending = computed(() => store.pending);\n\tconst playState = computed(() => store.playState);\n\tconst replaceState = computed(() => store.replaceState);\n\tconst startTime = computed({\n\t\tget() {\n\t\t\treturn store.startTime;\n\t\t},\n\t\tset(value) {\n\t\t\tstore.startTime = value;\n\t\t\tif (animate.value) animate.value.startTime = value;\n\t\t}\n\t});\n\tconst currentTime = computed({\n\t\tget() {\n\t\t\treturn store.currentTime;\n\t\t},\n\t\tset(value) {\n\t\t\tstore.currentTime = value;\n\t\t\tif (animate.value) {\n\t\t\t\tanimate.value.currentTime = value;\n\t\t\t\tsyncResume();\n\t\t\t}\n\t\t}\n\t});\n\tconst timeline = computed({\n\t\tget() {\n\t\t\treturn store.timeline;\n\t\t},\n\t\tset(value) {\n\t\t\tstore.timeline = value;\n\t\t\tif (animate.value) animate.value.timeline = value;\n\t\t}\n\t});\n\tconst playbackRate = computed({\n\t\tget() {\n\t\t\treturn store.playbackRate;\n\t\t},\n\t\tset(value) {\n\t\t\tstore.playbackRate = value;\n\t\t\tif (animate.value) animate.value.playbackRate = value;\n\t\t}\n\t});\n\tconst play = () => {\n\t\tif (animate.value) try {\n\t\t\tanimate.value.play();\n\t\t\tsyncResume();\n\t\t} catch (e) {\n\t\t\tsyncPause();\n\t\t\tonError(e);\n\t\t}\n\t\telse update();\n\t};\n\tconst pause = () => {\n\t\ttry {\n\t\t\tvar _animate$value;\n\t\t\t(_animate$value = animate.value) === null || _animate$value === void 0 || _animate$value.pause();\n\t\t\tsyncPause();\n\t\t} catch (e) {\n\t\t\tonError(e);\n\t\t}\n\t};\n\tconst reverse = () => {\n\t\tif (!animate.value) update();\n\t\ttry {\n\t\t\tvar _animate$value2;\n\t\t\t(_animate$value2 = animate.value) === null || _animate$value2 === void 0 || _animate$value2.reverse();\n\t\t\tsyncResume();\n\t\t} catch (e) {\n\t\t\tsyncPause();\n\t\t\tonError(e);\n\t\t}\n\t};\n\tconst finish = () => {\n\t\ttry {\n\t\t\tvar _animate$value3;\n\t\t\t(_animate$value3 = animate.value) === null || _animate$value3 === void 0 || _animate$value3.finish();\n\t\t\tsyncPause();\n\t\t} catch (e) {\n\t\t\tonError(e);\n\t\t}\n\t};\n\tconst cancel = () => {\n\t\ttry {\n\t\t\tvar _animate$value4;\n\t\t\t(_animate$value4 = animate.value) === null || _animate$value4 === void 0 || _animate$value4.cancel();\n\t\t\tsyncPause();\n\t\t} catch (e) {\n\t\t\tonError(e);\n\t\t}\n\t};\n\twatch(() => unrefElement(target), (el) => {\n\t\tif (el) update(true);\n\t\telse animate.value = void 0;\n\t});\n\twatch(() => keyframes, (value) => {\n\t\tif (animate.value) {\n\t\t\tupdate();\n\t\t\tconst targetEl = unrefElement(target);\n\t\t\tif (targetEl) animate.value.effect = new KeyframeEffect(targetEl, toValue(value), animateOptions);\n\t\t}\n\t}, { deep: true });\n\ttryOnMounted(() => update(true), false);\n\ttryOnScopeDispose(cancel);\n\tfunction update(init) {\n\t\tconst el = unrefElement(target);\n\t\tif (!isSupported.value || !el) return;\n\t\tif (!animate.value) animate.value = el.animate(toValue(keyframes), animateOptions);\n\t\tif (persist) animate.value.persist();\n\t\tif (_playbackRate !== 1) animate.value.playbackRate = _playbackRate;\n\t\tif (init && !immediate) animate.value.pause();\n\t\telse syncResume();\n\t\tonReady === null || onReady === void 0 || onReady(animate.value);\n\t}\n\tconst listenerOptions = { passive: true };\n\tuseEventListener(animate, [\n\t\t\"cancel\",\n\t\t\"finish\",\n\t\t\"remove\"\n\t], syncPause, listenerOptions);\n\tuseEventListener(animate, \"finish\", () => {\n\t\tvar _animate$value5;\n\t\tif (commitStyles) (_animate$value5 = animate.value) === null || _animate$value5 === void 0 || _animate$value5.commitStyles();\n\t}, listenerOptions);\n\tconst { resume: resumeRef, pause: pauseRef } = useRafFn(() => {\n\t\tif (!animate.value) return;\n\t\tstore.pending = animate.value.pending;\n\t\tstore.playState = animate.value.playState;\n\t\tstore.replaceState = animate.value.replaceState;\n\t\tstore.startTime = animate.value.startTime;\n\t\tstore.currentTime = animate.value.currentTime;\n\t\tstore.timeline = animate.value.timeline;\n\t\tstore.playbackRate = animate.value.playbackRate;\n\t}, { immediate: false });\n\tfunction syncResume() {\n\t\tif (isSupported.value) resumeRef();\n\t}\n\tfunction syncPause() {\n\t\tif (isSupported.value && window$1) window$1.requestAnimationFrame(pauseRef);\n\t}\n\treturn {\n\t\tisSupported,\n\t\tanimate,\n\t\tplay,\n\t\tpause,\n\t\treverse,\n\t\tfinish,\n\t\tcancel,\n\t\tpending,\n\t\tplayState,\n\t\treplaceState,\n\t\tstartTime,\n\t\tcurrentTime,\n\t\ttimeline,\n\t\tplaybackRate\n\t};\n}\n\n//#endregion\n//#region useAsyncQueue/index.ts\n/**\n* Asynchronous queue task controller.\n*\n* @see https://vueuse.org/useAsyncQueue\n* @param tasks\n* @param options\n*/\nfunction useAsyncQueue(tasks, options) {\n\tconst { interrupt = true, onError = noop, onFinished = noop, signal } = options || {};\n\tconst promiseState = {\n\t\taborted: \"aborted\",\n\t\tfulfilled: \"fulfilled\",\n\t\tpending: \"pending\",\n\t\trejected: \"rejected\"\n\t};\n\tconst result = reactive(Array.from(Array.from({ length: tasks.length }), () => ({\n\t\tstate: promiseState.pending,\n\t\tdata: null\n\t})));\n\tconst activeIndex = shallowRef(-1);\n\tif (!tasks || tasks.length === 0) {\n\t\tonFinished();\n\t\treturn {\n\t\t\tactiveIndex,\n\t\t\tresult\n\t\t};\n\t}\n\tfunction updateResult(state, res) {\n\t\tactiveIndex.value++;\n\t\tresult[activeIndex.value].data = res;\n\t\tresult[activeIndex.value].state = state;\n\t}\n\ttasks.reduce((prev, curr) => {\n\t\treturn prev.then((prevRes) => {\n\t\t\tvar _result$activeIndex$v;\n\t\t\tif (signal === null || signal === void 0 ? void 0 : signal.aborted) {\n\t\t\t\tupdateResult(promiseState.aborted, /* @__PURE__ */ new Error(\"aborted\"));\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (((_result$activeIndex$v = result[activeIndex.value]) === null || _result$activeIndex$v === void 0 ? void 0 : _result$activeIndex$v.state) === promiseState.rejected && interrupt) {\n\t\t\t\tonFinished();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst done = curr(prevRes).then((currentRes) => {\n\t\t\t\tupdateResult(promiseState.fulfilled, currentRes);\n\t\t\t\tif (activeIndex.value === tasks.length - 1) onFinished();\n\t\t\t\treturn currentRes;\n\t\t\t});\n\t\t\tif (!signal) return done;\n\t\t\treturn Promise.race([done, whenAborted(signal)]);\n\t\t}).catch((e) => {\n\t\t\tif (signal === null || signal === void 0 ? void 0 : signal.aborted) {\n\t\t\t\tupdateResult(promiseState.aborted, e);\n\t\t\t\treturn e;\n\t\t\t}\n\t\t\tupdateResult(promiseState.rejected, e);\n\t\t\tonError();\n\t\t\tif (activeIndex.value === tasks.length - 1) onFinished();\n\t\t\treturn e;\n\t\t});\n\t}, Promise.resolve());\n\treturn {\n\t\tactiveIndex,\n\t\tresult\n\t};\n}\nfunction whenAborted(signal) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst error = /* @__PURE__ */ new Error(\"aborted\");\n\t\tif (signal.aborted) reject(error);\n\t\telse signal.addEventListener(\"abort\", () => reject(error), { once: true });\n\t});\n}\n\n//#endregion\n//#region useAsyncState/index.ts\n/**\n* Reactive async state. Will not block your setup function and will trigger changes once\n* the promise is ready.\n*\n* @see https://vueuse.org/useAsyncState\n* @param promise The promise / async function to be resolved\n* @param initialState The initial state, used until the first evaluation finishes\n* @param options\n*/\nfunction useAsyncState(promise, initialState, options) {\n\tvar _globalThis$reportErr;\n\tconst { immediate = true, delay = 0, onError = (_globalThis$reportErr = globalThis.reportError) !== null && _globalThis$reportErr !== void 0 ? _globalThis$reportErr : noop, onSuccess = noop, resetOnExecute = true, shallow = true, throwError } = options !== null && options !== void 0 ? options : {};\n\tconst state = shallow ? shallowRef(initialState) : ref(initialState);\n\tconst isReady = shallowRef(false);\n\tconst isLoading = shallowRef(false);\n\tconst error = shallowRef(void 0);\n\tlet executionsCount = 0;\n\tasync function execute(delay$1 = 0, ...args) {\n\t\tconst executionId = executionsCount += 1;\n\t\tif (resetOnExecute) state.value = toValue(initialState);\n\t\terror.value = void 0;\n\t\tisReady.value = false;\n\t\tisLoading.value = true;\n\t\tif (delay$1 > 0) await promiseTimeout(delay$1);\n\t\tconst _promise = typeof promise === \"function\" ? promise(...args) : promise;\n\t\ttry {\n\t\t\tconst data = await _promise;\n\t\t\tif (executionId === executionsCount) {\n\t\t\t\tstate.value = data;\n\t\t\t\tisReady.value = true;\n\t\t\t}\n\t\t\tonSuccess(data);\n\t\t} catch (e) {\n\t\t\tif (executionId === executionsCount) error.value = e;\n\t\t\tonError(e);\n\t\t\tif (throwError) throw e;\n\t\t} finally {\n\t\t\tif (executionId === executionsCount) isLoading.value = false;\n\t\t}\n\t\treturn state.value;\n\t}\n\tif (immediate) execute(delay);\n\tconst shell = {\n\t\tstate,\n\t\tisReady,\n\t\tisLoading,\n\t\terror,\n\t\texecute,\n\t\texecuteImmediate: (...args) => execute(0, ...args)\n\t};\n\tfunction waitUntilIsLoaded() {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tuntil(isLoading).toBe(false).then(() => resolve(shell)).catch(reject);\n\t\t});\n\t}\n\treturn {\n\t\t...shell,\n\t\tthen(onFulfilled, onRejected) {\n\t\t\treturn waitUntilIsLoaded().then(onFulfilled, onRejected);\n\t\t}\n\t};\n}\n\n//#endregion\n//#region useBase64/serialization.ts\nconst defaults = {\n\tarray: (v) => JSON.stringify(v),\n\tobject: (v) => JSON.stringify(v),\n\tset: (v) => JSON.stringify(Array.from(v)),\n\tmap: (v) => JSON.stringify(Object.fromEntries(v)),\n\tnull: () => \"\"\n};\nfunction getDefaultSerialization(target) {\n\tif (!target) return defaults.null;\n\tif (target instanceof Map) return defaults.map;\n\telse if (target instanceof Set) return defaults.set;\n\telse if (Array.isArray(target)) return defaults.array;\n\telse return defaults.object;\n}\n\n//#endregion\n//#region useBase64/index.ts\nfunction useBase64(target, options) {\n\tconst base64 = shallowRef(\"\");\n\tconst promise = shallowRef();\n\tfunction execute() {\n\t\tif (!isClient) return;\n\t\tpromise.value = new Promise((resolve, reject) => {\n\t\t\ttry {\n\t\t\t\tconst _target = toValue(target);\n\t\t\t\tif (_target == null) resolve(\"\");\n\t\t\t\telse if (typeof _target === \"string\") resolve(blobToBase64(new Blob([_target], { type: \"text/plain\" })));\n\t\t\t\telse if (_target instanceof Blob) resolve(blobToBase64(_target));\n\t\t\t\telse if (_target instanceof ArrayBuffer) resolve(window.btoa(String.fromCharCode(...new Uint8Array(_target))));\n\t\t\t\telse if (_target instanceof HTMLCanvasElement) resolve(_target.toDataURL(options === null || options === void 0 ? void 0 : options.type, options === null || options === void 0 ? void 0 : options.quality));\n\t\t\t\telse if (_target instanceof HTMLImageElement) {\n\t\t\t\t\tconst img = _target.cloneNode(false);\n\t\t\t\t\timg.crossOrigin = \"Anonymous\";\n\t\t\t\t\timgLoaded(img).then(() => {\n\t\t\t\t\t\tconst canvas = document.createElement(\"canvas\");\n\t\t\t\t\t\tconst ctx = canvas.getContext(\"2d\");\n\t\t\t\t\t\tcanvas.width = img.width;\n\t\t\t\t\t\tcanvas.height = img.height;\n\t\t\t\t\t\tctx.drawImage(img, 0, 0, canvas.width, canvas.height);\n\t\t\t\t\t\tresolve(canvas.toDataURL(options === null || options === void 0 ? void 0 : options.type, options === null || options === void 0 ? void 0 : options.quality));\n\t\t\t\t\t}).catch(reject);\n\t\t\t\t} else if (typeof _target === \"object\") {\n\t\t\t\t\tconst serialized = ((options === null || options === void 0 ? void 0 : options.serializer) || getDefaultSerialization(_target))(_target);\n\t\t\t\t\treturn resolve(blobToBase64(new Blob([serialized], { type: \"application/json\" })));\n\t\t\t\t} else reject(/* @__PURE__ */ new Error(\"target is unsupported types\"));\n\t\t\t} catch (error) {\n\t\t\t\treject(error);\n\t\t\t}\n\t\t});\n\t\tpromise.value.then((res) => {\n\t\t\tbase64.value = (options === null || options === void 0 ? void 0 : options.dataUrl) === false ? res.replace(/^data:.*?;base64,/, \"\") : res;\n\t\t});\n\t\treturn promise.value;\n\t}\n\tif (isRef(target) || typeof target === \"function\") watch(target, execute, { immediate: true });\n\telse execute();\n\treturn {\n\t\tbase64,\n\t\tpromise,\n\t\texecute\n\t};\n}\nfunction imgLoaded(img) {\n\treturn new Promise((resolve, reject) => {\n\t\tif (!img.complete) {\n\t\t\timg.onload = () => {\n\t\t\t\tresolve();\n\t\t\t};\n\t\t\timg.onerror = reject;\n\t\t} else resolve();\n\t});\n}\nfunction blobToBase64(blob) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst fr = new FileReader();\n\t\tfr.onload = (e) => {\n\t\t\tresolve(e.target.result);\n\t\t};\n\t\tfr.onerror = reject;\n\t\tfr.readAsDataURL(blob);\n\t});\n}\n\n//#endregion\n//#region useBattery/index.ts\n/**\n* Reactive Battery Status API.\n*\n* @see https://vueuse.org/useBattery\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useBattery(options = {}) {\n\tconst { navigator: navigator$1 = defaultNavigator } = options;\n\tconst events$1 = [\n\t\t\"chargingchange\",\n\t\t\"chargingtimechange\",\n\t\t\"dischargingtimechange\",\n\t\t\"levelchange\"\n\t];\n\tconst isSupported = /* @__PURE__ */ useSupported(() => navigator$1 && \"getBattery\" in navigator$1 && typeof navigator$1.getBattery === \"function\");\n\tconst charging = shallowRef(false);\n\tconst chargingTime = shallowRef(0);\n\tconst dischargingTime = shallowRef(0);\n\tconst level = shallowRef(1);\n\tlet battery;\n\tfunction updateBatteryInfo() {\n\t\tcharging.value = this.charging;\n\t\tchargingTime.value = this.chargingTime || 0;\n\t\tdischargingTime.value = this.dischargingTime || 0;\n\t\tlevel.value = this.level;\n\t}\n\tif (isSupported.value) navigator$1.getBattery().then((_battery) => {\n\t\tbattery = _battery;\n\t\tupdateBatteryInfo.call(battery);\n\t\tuseEventListener(battery, events$1, updateBatteryInfo, { passive: true });\n\t});\n\treturn {\n\t\tisSupported,\n\t\tcharging,\n\t\tchargingTime,\n\t\tdischargingTime,\n\t\tlevel\n\t};\n}\n\n//#endregion\n//#region useBluetooth/index.ts\n/* @__NO_SIDE_EFFECTS__ */\nfunction useBluetooth(options) {\n\tlet { acceptAllDevices = false } = options || {};\n\tconst { filters = void 0, optionalServices = void 0, navigator: navigator$1 = defaultNavigator } = options || {};\n\tconst isSupported = /* @__PURE__ */ useSupported(() => navigator$1 && \"bluetooth\" in navigator$1);\n\tconst device = shallowRef();\n\tconst error = shallowRef(null);\n\twatch(device, () => {\n\t\tconnectToBluetoothGATTServer();\n\t});\n\tasync function requestDevice() {\n\t\tif (!isSupported.value) return;\n\t\terror.value = null;\n\t\tif (filters && filters.length > 0) acceptAllDevices = false;\n\t\ttry {\n\t\t\tdevice.value = await (navigator$1 === null || navigator$1 === void 0 ? void 0 : navigator$1.bluetooth.requestDevice({\n\t\t\t\tacceptAllDevices,\n\t\t\t\tfilters,\n\t\t\t\toptionalServices\n\t\t\t}));\n\t\t} catch (err) {\n\t\t\terror.value = err;\n\t\t}\n\t}\n\tconst server = shallowRef();\n\tconst isConnected = shallowRef(false);\n\tfunction reset() {\n\t\tisConnected.value = false;\n\t\tdevice.value = void 0;\n\t\tserver.value = void 0;\n\t}\n\tasync function connectToBluetoothGATTServer() {\n\t\terror.value = null;\n\t\tif (device.value && device.value.gatt) {\n\t\t\tuseEventListener(device, \"gattserverdisconnected\", reset, { passive: true });\n\t\t\ttry {\n\t\t\t\tserver.value = await device.value.gatt.connect();\n\t\t\t\tisConnected.value = server.value.connected;\n\t\t\t} catch (err) {\n\t\t\t\terror.value = err;\n\t\t\t}\n\t\t}\n\t}\n\ttryOnMounted(() => {\n\t\tvar _device$value$gatt;\n\t\tif (device.value) (_device$value$gatt = device.value.gatt) === null || _device$value$gatt === void 0 || _device$value$gatt.connect();\n\t});\n\ttryOnScopeDispose(() => {\n\t\tvar _device$value$gatt2;\n\t\tif (device.value) (_device$value$gatt2 = device.value.gatt) === null || _device$value$gatt2 === void 0 || _device$value$gatt2.disconnect();\n\t});\n\treturn {\n\t\tisSupported,\n\t\tisConnected: readonly(isConnected),\n\t\tdevice,\n\t\trequestDevice,\n\t\tserver,\n\t\terror\n\t};\n}\n\n//#endregion\n//#region useSSRWidth/index.ts\nconst ssrWidthSymbol = Symbol(\"vueuse-ssr-width\");\n/* @__NO_SIDE_EFFECTS__ */\nfunction useSSRWidth() {\n\tconst ssrWidth = hasInjectionContext() ? injectLocal(ssrWidthSymbol, null) : null;\n\treturn typeof ssrWidth === \"number\" ? ssrWidth : void 0;\n}\nfunction provideSSRWidth(width, app) {\n\tif (app !== void 0) app.provide(ssrWidthSymbol, width);\n\telse provideLocal(ssrWidthSymbol, width);\n}\n\n//#endregion\n//#region useMediaQuery/index.ts\n/**\n* Reactive Media Query.\n*\n* @see https://vueuse.org/useMediaQuery\n* @param query\n* @param options\n*/\nfunction useMediaQuery(query, options = {}) {\n\tconst { window: window$1 = defaultWindow, ssrWidth = /* @__PURE__ */ useSSRWidth() } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => window$1 && \"matchMedia\" in window$1 && typeof window$1.matchMedia === \"function\");\n\tconst ssrSupport = shallowRef(typeof ssrWidth === \"number\");\n\tconst mediaQuery = shallowRef();\n\tconst matches = shallowRef(false);\n\tconst handler = (event) => {\n\t\tmatches.value = event.matches;\n\t};\n\twatchEffect(() => {\n\t\tif (ssrSupport.value) {\n\t\t\tssrSupport.value = !isSupported.value;\n\t\t\tmatches.value = toValue(query).split(\",\").some((queryString) => {\n\t\t\t\tconst not = queryString.includes(\"not all\");\n\t\t\t\tconst minWidth = queryString.match(/\\(\\s*min-width:\\s*(-?\\d+(?:\\.\\d*)?[a-z]+\\s*)\\)/);\n\t\t\t\tconst maxWidth = queryString.match(/\\(\\s*max-width:\\s*(-?\\d+(?:\\.\\d*)?[a-z]+\\s*)\\)/);\n\t\t\t\tlet res = Boolean(minWidth || maxWidth);\n\t\t\t\tif (minWidth && res) res = ssrWidth >= pxValue(minWidth[1]);\n\t\t\t\tif (maxWidth && res) res = ssrWidth <= pxValue(maxWidth[1]);\n\t\t\t\treturn not ? !res : res;\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tif (!isSupported.value) return;\n\t\tmediaQuery.value = window$1.matchMedia(toValue(query));\n\t\tmatches.value = mediaQuery.value.matches;\n\t});\n\tuseEventListener(mediaQuery, \"change\", handler, { passive: true });\n\treturn computed(() => matches.value);\n}\n\n//#endregion\n//#region useBreakpoints/breakpoints.ts\n/**\n* Breakpoints from Tailwind V2\n*\n* @see https://tailwindcss.com/docs/breakpoints\n*/\nconst breakpointsTailwind = {\n\t\"sm\": 640,\n\t\"md\": 768,\n\t\"lg\": 1024,\n\t\"xl\": 1280,\n\t\"2xl\": 1536\n};\n/**\n* Breakpoints from Bootstrap V5\n*\n* @see https://getbootstrap.com/docs/5.0/layout/breakpoints\n*/\nconst breakpointsBootstrapV5 = {\n\txs: 0,\n\tsm: 576,\n\tmd: 768,\n\tlg: 992,\n\txl: 1200,\n\txxl: 1400\n};\n/**\n* Breakpoints from Vuetify V2\n*\n* @see https://v2.vuetifyjs.com/en/features/breakpoints/\n*/\nconst breakpointsVuetifyV2 = {\n\txs: 0,\n\tsm: 600,\n\tmd: 960,\n\tlg: 1264,\n\txl: 1904\n};\n/**\n* Breakpoints from Vuetify V3\n*\n* @see https://vuetifyjs.com/en/styles/float/#overview\n*/\nconst breakpointsVuetifyV3 = {\n\txs: 0,\n\tsm: 600,\n\tmd: 960,\n\tlg: 1280,\n\txl: 1920,\n\txxl: 2560\n};\n/**\n* Alias to `breakpointsVuetifyV2`\n*\n* @deprecated explictly use `breakpointsVuetifyV2` or `breakpointsVuetifyV3` instead\n*/\nconst breakpointsVuetify = breakpointsVuetifyV2;\n/**\n* Breakpoints from Ant Design\n*\n* @see https://ant.design/components/layout/#breakpoint-width\n*/\nconst breakpointsAntDesign = {\n\txs: 480,\n\tsm: 576,\n\tmd: 768,\n\tlg: 992,\n\txl: 1200,\n\txxl: 1600\n};\n/**\n* Breakpoints from Quasar V2\n*\n* @see https://quasar.dev/style/breakpoints\n*/\nconst breakpointsQuasar = {\n\txs: 0,\n\tsm: 600,\n\tmd: 1024,\n\tlg: 1440,\n\txl: 1920\n};\n/**\n* Sematic Breakpoints\n*/\nconst breakpointsSematic = {\n\tmobileS: 320,\n\tmobileM: 375,\n\tmobileL: 425,\n\ttablet: 768,\n\tlaptop: 1024,\n\tlaptopL: 1440,\n\tdesktop4K: 2560\n};\n/**\n* Breakpoints from Master CSS\n*\n* @see https://docs.master.co/css/breakpoints\n*/\nconst breakpointsMasterCss = {\n\t\"3xs\": 360,\n\t\"2xs\": 480,\n\t\"xs\": 600,\n\t\"sm\": 768,\n\t\"md\": 1024,\n\t\"lg\": 1280,\n\t\"xl\": 1440,\n\t\"2xl\": 1600,\n\t\"3xl\": 1920,\n\t\"4xl\": 2560\n};\n/**\n* Breakpoints from PrimeFlex\n*\n* @see https://primeflex.org/installation\n*/\nconst breakpointsPrimeFlex = {\n\tsm: 576,\n\tmd: 768,\n\tlg: 992,\n\txl: 1200\n};\n/**\n* Breakpoints from ElementUI/ElementPlus\n*\n* @see https://element.eleme.io/#/en-US/component/layout\n* @see https://element-plus.org/en-US/component/layout.html\n*/\nconst breakpointsElement = {\n\txs: 0,\n\tsm: 768,\n\tmd: 992,\n\tlg: 1200,\n\txl: 1920\n};\n\n//#endregion\n//#region useBreakpoints/index.ts\n/**\n* Reactively viewport breakpoints\n*\n* @see https://vueuse.org/useBreakpoints\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useBreakpoints(breakpoints, options = {}) {\n\tfunction getValue$1(k, delta) {\n\t\tlet v = toValue(breakpoints[toValue(k)]);\n\t\tif (delta != null) v = increaseWithUnit(v, delta);\n\t\tif (typeof v === \"number\") v = `${v}px`;\n\t\treturn v;\n\t}\n\tconst { window: window$1 = defaultWindow, strategy = \"min-width\", ssrWidth = /* @__PURE__ */ useSSRWidth() } = options;\n\tconst ssrSupport = typeof ssrWidth === \"number\";\n\tconst mounted = ssrSupport ? shallowRef(false) : { value: true };\n\tif (ssrSupport) tryOnMounted(() => mounted.value = !!window$1);\n\tfunction match(query, size) {\n\t\tif (!mounted.value && ssrSupport) return query === \"min\" ? ssrWidth >= pxValue(size) : ssrWidth <= pxValue(size);\n\t\tif (!window$1) return false;\n\t\treturn window$1.matchMedia(`(${query}-width: ${size})`).matches;\n\t}\n\tconst greaterOrEqual = (k) => {\n\t\treturn useMediaQuery(() => `(min-width: ${getValue$1(k)})`, options);\n\t};\n\tconst smallerOrEqual = (k) => {\n\t\treturn useMediaQuery(() => `(max-width: ${getValue$1(k)})`, options);\n\t};\n\tconst shortcutMethods = Object.keys(breakpoints).reduce((shortcuts, k) => {\n\t\tObject.defineProperty(shortcuts, k, {\n\t\t\tget: () => strategy === \"min-width\" ? greaterOrEqual(k) : smallerOrEqual(k),\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true\n\t\t});\n\t\treturn shortcuts;\n\t}, {});\n\tfunction current() {\n\t\tconst points = Object.keys(breakpoints).map((k) => [\n\t\t\tk,\n\t\t\tshortcutMethods[k],\n\t\t\tpxValue(getValue$1(k))\n\t\t]).sort((a, b) => a[2] - b[2]);\n\t\treturn computed(() => points.filter(([, v]) => v.value).map(([k]) => k));\n\t}\n\treturn Object.assign(shortcutMethods, {\n\t\tgreaterOrEqual,\n\t\tsmallerOrEqual,\n\t\tgreater(k) {\n\t\t\treturn useMediaQuery(() => `(min-width: ${getValue$1(k, .1)})`, options);\n\t\t},\n\t\tsmaller(k) {\n\t\t\treturn useMediaQuery(() => `(max-width: ${getValue$1(k, -.1)})`, options);\n\t\t},\n\t\tbetween(a, b) {\n\t\t\treturn useMediaQuery(() => `(min-width: ${getValue$1(a)}) and (max-width: ${getValue$1(b, -.1)})`, options);\n\t\t},\n\t\tisGreater(k) {\n\t\t\treturn match(\"min\", getValue$1(k, .1));\n\t\t},\n\t\tisGreaterOrEqual(k) {\n\t\t\treturn match(\"min\", getValue$1(k));\n\t\t},\n\t\tisSmaller(k) {\n\t\t\treturn match(\"max\", getValue$1(k, -.1));\n\t\t},\n\t\tisSmallerOrEqual(k) {\n\t\t\treturn match(\"max\", getValue$1(k));\n\t\t},\n\t\tisInBetween(a, b) {\n\t\t\treturn match(\"min\", getValue$1(a)) && match(\"max\", getValue$1(b, -.1));\n\t\t},\n\t\tcurrent,\n\t\tactive() {\n\t\t\tconst bps = current();\n\t\t\treturn computed(() => bps.value.length === 0 ? \"\" : bps.value.at(strategy === \"min-width\" ? -1 : 0));\n\t\t}\n\t});\n}\n\n//#endregion\n//#region useBroadcastChannel/index.ts\n/**\n* Reactive BroadcastChannel\n*\n* @see https://vueuse.org/useBroadcastChannel\n* @see https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel\n* @param options\n*\n*/\nfunction useBroadcastChannel(options) {\n\tconst { name, window: window$1 = defaultWindow } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => window$1 && \"BroadcastChannel\" in window$1);\n\tconst isClosed = shallowRef(false);\n\tconst channel = ref();\n\tconst data = ref();\n\tconst error = shallowRef(null);\n\tconst post = (data$1) => {\n\t\tif (channel.value) channel.value.postMessage(data$1);\n\t};\n\tconst close = () => {\n\t\tif (channel.value) channel.value.close();\n\t\tisClosed.value = true;\n\t};\n\tif (isSupported.value) tryOnMounted(() => {\n\t\terror.value = null;\n\t\tchannel.value = new BroadcastChannel(name);\n\t\tconst listenerOptions = { passive: true };\n\t\tuseEventListener(channel, \"message\", (e) => {\n\t\t\tdata.value = e.data;\n\t\t}, listenerOptions);\n\t\tuseEventListener(channel, \"messageerror\", (e) => {\n\t\t\terror.value = e;\n\t\t}, listenerOptions);\n\t\tuseEventListener(channel, \"close\", () => {\n\t\t\tisClosed.value = true;\n\t\t}, listenerOptions);\n\t});\n\ttryOnScopeDispose(() => {\n\t\tclose();\n\t});\n\treturn {\n\t\tisSupported,\n\t\tchannel,\n\t\tdata,\n\t\tpost,\n\t\tclose,\n\t\terror,\n\t\tisClosed\n\t};\n}\n\n//#endregion\n//#region useBrowserLocation/index.ts\nconst WRITABLE_PROPERTIES = [\n\t\"hash\",\n\t\"host\",\n\t\"hostname\",\n\t\"href\",\n\t\"pathname\",\n\t\"port\",\n\t\"protocol\",\n\t\"search\"\n];\n/**\n* Reactive browser location.\n*\n* @see https://vueuse.org/useBrowserLocation\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useBrowserLocation(options = {}) {\n\tconst { window: window$1 = defaultWindow } = options;\n\tconst refs = Object.fromEntries(WRITABLE_PROPERTIES.map((key) => [key, ref()]));\n\tfor (const [key, ref$1] of objectEntries(refs)) watch(ref$1, (value) => {\n\t\tif (!(window$1 === null || window$1 === void 0 ? void 0 : window$1.location) || window$1.location[key] === value) return;\n\t\twindow$1.location[key] = value;\n\t});\n\tconst buildState = (trigger) => {\n\t\tvar _window$location;\n\t\tconst { state: state$1, length } = (window$1 === null || window$1 === void 0 ? void 0 : window$1.history) || {};\n\t\tconst { origin } = (window$1 === null || window$1 === void 0 ? void 0 : window$1.location) || {};\n\t\tfor (const key of WRITABLE_PROPERTIES) refs[key].value = window$1 === null || window$1 === void 0 || (_window$location = window$1.location) === null || _window$location === void 0 ? void 0 : _window$location[key];\n\t\treturn reactive({\n\t\t\ttrigger,\n\t\t\tstate: state$1,\n\t\t\tlength,\n\t\t\torigin,\n\t\t\t...refs\n\t\t});\n\t};\n\tconst state = ref(buildState(\"load\"));\n\tif (window$1) {\n\t\tconst listenerOptions = { passive: true };\n\t\tuseEventListener(window$1, \"popstate\", () => state.value = buildState(\"popstate\"), listenerOptions);\n\t\tuseEventListener(window$1, \"hashchange\", () => state.value = buildState(\"hashchange\"), listenerOptions);\n\t}\n\treturn state;\n}\n\n//#endregion\n//#region useCached/index.ts\nfunction useCached(refValue, comparator = (a, b) => a === b, options) {\n\tconst { deepRefs = true,...watchOptions } = options || {};\n\tconst cachedValue = createRef(refValue.value, deepRefs);\n\twatch(() => refValue.value, (value) => {\n\t\tif (!comparator(value, cachedValue.value)) cachedValue.value = value;\n\t}, watchOptions);\n\treturn cachedValue;\n}\n\n//#endregion\n//#region usePermission/index.ts\n/**\n* Reactive Permissions API.\n*\n* @see https://vueuse.org/usePermission\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction usePermission(permissionDesc, options = {}) {\n\tconst { controls = false, navigator: navigator$1 = defaultNavigator } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => navigator$1 && \"permissions\" in navigator$1);\n\tconst permissionStatus = shallowRef();\n\tconst desc = typeof permissionDesc === \"string\" ? { name: permissionDesc } : permissionDesc;\n\tconst state = shallowRef();\n\tconst update = () => {\n\t\tvar _permissionStatus$val, _permissionStatus$val2;\n\t\tstate.value = (_permissionStatus$val = (_permissionStatus$val2 = permissionStatus.value) === null || _permissionStatus$val2 === void 0 ? void 0 : _permissionStatus$val2.state) !== null && _permissionStatus$val !== void 0 ? _permissionStatus$val : \"prompt\";\n\t};\n\tuseEventListener(permissionStatus, \"change\", update, { passive: true });\n\tconst query = createSingletonPromise(async () => {\n\t\tif (!isSupported.value) return;\n\t\tif (!permissionStatus.value) try {\n\t\t\tpermissionStatus.value = await navigator$1.permissions.query(desc);\n\t\t} catch (_unused) {\n\t\t\tpermissionStatus.value = void 0;\n\t\t} finally {\n\t\t\tupdate();\n\t\t}\n\t\tif (controls) return toRaw(permissionStatus.value);\n\t});\n\tquery();\n\tif (controls) return {\n\t\tstate,\n\t\tisSupported,\n\t\tquery\n\t};\n\telse return state;\n}\n\n//#endregion\n//#region useClipboard/index.ts\nfunction useClipboard(options = {}) {\n\tconst { navigator: navigator$1 = defaultNavigator, read = false, source, copiedDuring = 1500, legacy = false } = options;\n\tconst isClipboardApiSupported = /* @__PURE__ */ useSupported(() => navigator$1 && \"clipboard\" in navigator$1);\n\tconst permissionRead = usePermission(\"clipboard-read\");\n\tconst permissionWrite = usePermission(\"clipboard-write\");\n\tconst isSupported = computed(() => isClipboardApiSupported.value || legacy);\n\tconst text = shallowRef(\"\");\n\tconst copied = shallowRef(false);\n\tconst timeout = useTimeoutFn(() => copied.value = false, copiedDuring, { immediate: false });\n\tasync function updateText() {\n\t\tlet useLegacy = !(isClipboardApiSupported.value && isAllowed(permissionRead.value));\n\t\tif (!useLegacy) try {\n\t\t\ttext.value = await navigator$1.clipboard.readText();\n\t\t} catch (_unused) {\n\t\t\tuseLegacy = true;\n\t\t}\n\t\tif (useLegacy) text.value = legacyRead();\n\t}\n\tif (isSupported.value && read) useEventListener([\"copy\", \"cut\"], updateText, { passive: true });\n\tasync function copy(value = toValue(source)) {\n\t\tif (isSupported.value && value != null) {\n\t\t\tlet useLegacy = !(isClipboardApiSupported.value && isAllowed(permissionWrite.value));\n\t\t\tif (!useLegacy) try {\n\t\t\t\tawait navigator$1.clipboard.writeText(value);\n\t\t\t} catch (_unused2) {\n\t\t\t\tuseLegacy = true;\n\t\t\t}\n\t\t\tif (useLegacy) legacyCopy(value);\n\t\t\ttext.value = value;\n\t\t\tcopied.value = true;\n\t\t\ttimeout.start();\n\t\t}\n\t}\n\tfunction legacyCopy(value) {\n\t\tconst ta = document.createElement(\"textarea\");\n\t\tta.value = value;\n\t\tta.style.position = \"absolute\";\n\t\tta.style.opacity = \"0\";\n\t\tta.setAttribute(\"readonly\", \"\");\n\t\tdocument.body.appendChild(ta);\n\t\tta.select();\n\t\tdocument.execCommand(\"copy\");\n\t\tta.remove();\n\t}\n\tfunction legacyRead() {\n\t\tvar _document$getSelectio, _document, _document$getSelectio2;\n\t\treturn (_document$getSelectio = (_document = document) === null || _document === void 0 || (_document$getSelectio2 = _document.getSelection) === null || _document$getSelectio2 === void 0 || (_document$getSelectio2 = _document$getSelectio2.call(_document)) === null || _document$getSelectio2 === void 0 ? void 0 : _document$getSelectio2.toString()) !== null && _document$getSelectio !== void 0 ? _document$getSelectio : \"\";\n\t}\n\tfunction isAllowed(status) {\n\t\treturn status === \"granted\" || status === \"prompt\";\n\t}\n\treturn {\n\t\tisSupported,\n\t\ttext: readonly(text),\n\t\tcopied: readonly(copied),\n\t\tcopy\n\t};\n}\n\n//#endregion\n//#region useClipboardItems/index.ts\nfunction useClipboardItems(options = {}) {\n\tconst { navigator: navigator$1 = defaultNavigator, read = false, source, copiedDuring = 1500 } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => navigator$1 && \"clipboard\" in navigator$1);\n\tconst content = ref([]);\n\tconst copied = shallowRef(false);\n\tconst timeout = useTimeoutFn(() => copied.value = false, copiedDuring, { immediate: false });\n\tfunction updateContent() {\n\t\tif (isSupported.value) navigator$1.clipboard.read().then((items) => {\n\t\t\tcontent.value = items;\n\t\t});\n\t}\n\tif (isSupported.value && read) useEventListener([\"copy\", \"cut\"], updateContent, { passive: true });\n\tasync function copy(value = toValue(source)) {\n\t\tif (isSupported.value && value != null) {\n\t\t\tawait navigator$1.clipboard.write(value);\n\t\t\tcontent.value = value;\n\t\t\tcopied.value = true;\n\t\t\ttimeout.start();\n\t\t}\n\t}\n\treturn {\n\t\tisSupported,\n\t\tcontent: shallowReadonly(content),\n\t\tcopied: readonly(copied),\n\t\tcopy,\n\t\tread: updateContent\n\t};\n}\n\n//#endregion\n//#region useCloned/index.ts\nfunction cloneFnJSON(source) {\n\treturn JSON.parse(JSON.stringify(source));\n}\nfunction useCloned(source, options = {}) {\n\tconst cloned = ref({});\n\tconst isModified = shallowRef(false);\n\tlet _lastSync = false;\n\tconst { manual, clone = cloneFnJSON, deep = true, immediate = true } = options;\n\twatch(cloned, () => {\n\t\tif (_lastSync) {\n\t\t\t_lastSync = false;\n\t\t\treturn;\n\t\t}\n\t\tisModified.value = true;\n\t}, {\n\t\tdeep: true,\n\t\tflush: \"sync\"\n\t});\n\tfunction sync() {\n\t\t_lastSync = true;\n\t\tisModified.value = false;\n\t\tcloned.value = clone(toValue(source));\n\t}\n\tif (!manual && (isRef(source) || typeof source === \"function\")) watch(source, sync, {\n\t\t...options,\n\t\tdeep,\n\t\timmediate\n\t});\n\telse sync();\n\treturn {\n\t\tcloned,\n\t\tisModified,\n\t\tsync\n\t};\n}\n\n//#endregion\n//#region ssr-handlers.ts\nconst _global = typeof globalThis !== \"undefined\" ? globalThis : typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : {};\nconst globalKey = \"__vueuse_ssr_handlers__\";\nconst handlers = /* @__PURE__ */ getHandlers();\nfunction getHandlers() {\n\tif (!(globalKey in _global)) _global[globalKey] = _global[globalKey] || {};\n\treturn _global[globalKey];\n}\nfunction getSSRHandler(key, fallback) {\n\treturn handlers[key] || fallback;\n}\nfunction setSSRHandler(key, fn) {\n\thandlers[key] = fn;\n}\n\n//#endregion\n//#region usePreferredDark/index.ts\n/**\n* Reactive dark theme preference.\n*\n* @see https://vueuse.org/usePreferredDark\n* @param [options]\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction usePreferredDark(options) {\n\treturn useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n}\n\n//#endregion\n//#region useStorage/guess.ts\nfunction guessSerializerType(rawInit) {\n\treturn rawInit == null ? \"any\" : rawInit instanceof Set ? \"set\" : rawInit instanceof Map ? \"map\" : rawInit instanceof Date ? \"date\" : typeof rawInit === \"boolean\" ? \"boolean\" : typeof rawInit === \"string\" ? \"string\" : typeof rawInit === \"object\" ? \"object\" : !Number.isNaN(rawInit) ? \"number\" : \"any\";\n}\n\n//#endregion\n//#region useStorage/index.ts\nconst StorageSerializers = {\n\tboolean: {\n\t\tread: (v) => v === \"true\",\n\t\twrite: (v) => String(v)\n\t},\n\tobject: {\n\t\tread: (v) => JSON.parse(v),\n\t\twrite: (v) => JSON.stringify(v)\n\t},\n\tnumber: {\n\t\tread: (v) => Number.parseFloat(v),\n\t\twrite: (v) => String(v)\n\t},\n\tany: {\n\t\tread: (v) => v,\n\t\twrite: (v) => String(v)\n\t},\n\tstring: {\n\t\tread: (v) => v,\n\t\twrite: (v) => String(v)\n\t},\n\tmap: {\n\t\tread: (v) => new Map(JSON.parse(v)),\n\t\twrite: (v) => JSON.stringify(Array.from(v.entries()))\n\t},\n\tset: {\n\t\tread: (v) => new Set(JSON.parse(v)),\n\t\twrite: (v) => JSON.stringify(Array.from(v))\n\t},\n\tdate: {\n\t\tread: (v) => new Date(v),\n\t\twrite: (v) => v.toISOString()\n\t}\n};\nconst customStorageEventName = \"vueuse-storage\";\n/**\n* Reactive LocalStorage/SessionStorage.\n*\n* @see https://vueuse.org/useStorage\n*/\nfunction useStorage(key, defaults$1, storage, options = {}) {\n\tvar _options$serializer;\n\tconst { flush = \"pre\", deep = true, listenToStorageChanges = true, writeDefaults = true, mergeDefaults = false, shallow, window: window$1 = defaultWindow, eventFilter, onError = (e) => {\n\t\tconsole.error(e);\n\t}, initOnMounted } = options;\n\tconst data = (shallow ? shallowRef : ref)(typeof defaults$1 === \"function\" ? defaults$1() : defaults$1);\n\tconst keyComputed = computed(() => toValue(key));\n\tif (!storage) try {\n\t\tstorage = getSSRHandler(\"getDefaultStorage\", () => defaultWindow === null || defaultWindow === void 0 ? void 0 : defaultWindow.localStorage)();\n\t} catch (e) {\n\t\tonError(e);\n\t}\n\tif (!storage) return data;\n\tconst rawInit = toValue(defaults$1);\n\tconst type = guessSerializerType(rawInit);\n\tconst serializer = (_options$serializer = options.serializer) !== null && _options$serializer !== void 0 ? _options$serializer : StorageSerializers[type];\n\tconst { pause: pauseWatch, resume: resumeWatch } = pausableWatch(data, (newValue) => write(newValue), {\n\t\tflush,\n\t\tdeep,\n\t\teventFilter\n\t});\n\twatch(keyComputed, () => update(), { flush });\n\tlet firstMounted = false;\n\tconst onStorageEvent = (ev) => {\n\t\tif (initOnMounted && !firstMounted) return;\n\t\tupdate(ev);\n\t};\n\tconst onStorageCustomEvent = (ev) => {\n\t\tif (initOnMounted && !firstMounted) return;\n\t\tupdateFromCustomEvent(ev);\n\t};\n\t/**\n\t* The custom event is needed for same-document syncing when using custom\n\t* storage backends, but it doesn't work across different documents.\n\t*\n\t* TODO: Consider implementing a BroadcastChannel-based solution that fixes this.\n\t*/\n\tif (window$1 && listenToStorageChanges) if (storage instanceof Storage) useEventListener(window$1, \"storage\", onStorageEvent, { passive: true });\n\telse useEventListener(window$1, customStorageEventName, onStorageCustomEvent);\n\tif (initOnMounted) tryOnMounted(() => {\n\t\tfirstMounted = true;\n\t\tupdate();\n\t});\n\telse update();\n\tfunction dispatchWriteEvent(oldValue, newValue) {\n\t\tif (window$1) {\n\t\t\tconst payload = {\n\t\t\t\tkey: keyComputed.value,\n\t\t\t\toldValue,\n\t\t\t\tnewValue,\n\t\t\t\tstorageArea: storage\n\t\t\t};\n\t\t\twindow$1.dispatchEvent(storage instanceof Storage ? new StorageEvent(\"storage\", payload) : new CustomEvent(customStorageEventName, { detail: payload }));\n\t\t}\n\t}\n\tfunction write(v) {\n\t\ttry {\n\t\t\tconst oldValue = storage.getItem(keyComputed.value);\n\t\t\tif (v == null) {\n\t\t\t\tdispatchWriteEvent(oldValue, null);\n\t\t\t\tstorage.removeItem(keyComputed.value);\n\t\t\t} else {\n\t\t\t\tconst serialized = serializer.write(v);\n\t\t\t\tif (oldValue !== serialized) {\n\t\t\t\t\tstorage.setItem(keyComputed.value, serialized);\n\t\t\t\t\tdispatchWriteEvent(oldValue, serialized);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tonError(e);\n\t\t}\n\t}\n\tfunction read(event) {\n\t\tconst rawValue = event ? event.newValue : storage.getItem(keyComputed.value);\n\t\tif (rawValue == null) {\n\t\t\tif (writeDefaults && rawInit != null) storage.setItem(keyComputed.value, serializer.write(rawInit));\n\t\t\treturn rawInit;\n\t\t} else if (!event && mergeDefaults) {\n\t\t\tconst value = serializer.read(rawValue);\n\t\t\tif (typeof mergeDefaults === \"function\") return mergeDefaults(value, rawInit);\n\t\t\telse if (type === \"object\" && !Array.isArray(value)) return {\n\t\t\t\t...rawInit,\n\t\t\t\t...value\n\t\t\t};\n\t\t\treturn value;\n\t\t} else if (typeof rawValue !== \"string\") return rawValue;\n\t\telse return serializer.read(rawValue);\n\t}\n\tfunction update(event) {\n\t\tif (event && event.storageArea !== storage) return;\n\t\tif (event && event.key == null) {\n\t\t\tdata.value = rawInit;\n\t\t\treturn;\n\t\t}\n\t\tif (event && event.key !== keyComputed.value) return;\n\t\tpauseWatch();\n\t\ttry {\n\t\t\tconst serializedData = serializer.write(data.value);\n\t\t\tif (event === void 0 || (event === null || event === void 0 ? void 0 : event.newValue) !== serializedData) data.value = read(event);\n\t\t} catch (e) {\n\t\t\tonError(e);\n\t\t} finally {\n\t\t\tif (event) nextTick(resumeWatch);\n\t\t\telse resumeWatch();\n\t\t}\n\t}\n\tfunction updateFromCustomEvent(event) {\n\t\tupdate(event.detail);\n\t}\n\treturn data;\n}\n\n//#endregion\n//#region useColorMode/index.ts\nconst CSS_DISABLE_TRANS = \"*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}\";\n/**\n* Reactive color mode with auto data persistence.\n*\n* @see https://vueuse.org/useColorMode\n* @param options\n*/\nfunction useColorMode(options = {}) {\n\tconst { selector = \"html\", attribute = \"class\", initialValue = \"auto\", window: window$1 = defaultWindow, storage, storageKey = \"vueuse-color-scheme\", listenToStorageChanges = true, storageRef, emitAuto, disableTransition = true } = options;\n\tconst modes = {\n\t\tauto: \"\",\n\t\tlight: \"light\",\n\t\tdark: \"dark\",\n\t\t...options.modes || {}\n\t};\n\tconst preferredDark = usePreferredDark({ window: window$1 });\n\tconst system = computed(() => preferredDark.value ? \"dark\" : \"light\");\n\tconst store = storageRef || (storageKey == null ? toRef(initialValue) : useStorage(storageKey, initialValue, storage, {\n\t\twindow: window$1,\n\t\tlistenToStorageChanges\n\t}));\n\tconst state = computed(() => store.value === \"auto\" ? system.value : store.value);\n\tconst updateHTMLAttrs = getSSRHandler(\"updateHTMLAttrs\", (selector$1, attribute$1, value) => {\n\t\tconst el = typeof selector$1 === \"string\" ? window$1 === null || window$1 === void 0 ? void 0 : window$1.document.querySelector(selector$1) : unrefElement(selector$1);\n\t\tif (!el) return;\n\t\tconst classesToAdd = /* @__PURE__ */ new Set();\n\t\tconst classesToRemove = /* @__PURE__ */ new Set();\n\t\tlet attributeToChange = null;\n\t\tif (attribute$1 === \"class\") {\n\t\t\tconst current = value.split(/\\s/g);\n\t\t\tObject.values(modes).flatMap((i) => (i || \"\").split(/\\s/g)).filter(Boolean).forEach((v) => {\n\t\t\t\tif (current.includes(v)) classesToAdd.add(v);\n\t\t\t\telse classesToRemove.add(v);\n\t\t\t});\n\t\t} else attributeToChange = {\n\t\t\tkey: attribute$1,\n\t\t\tvalue\n\t\t};\n\t\tif (classesToAdd.size === 0 && classesToRemove.size === 0 && attributeToChange === null) return;\n\t\tlet style;\n\t\tif (disableTransition) {\n\t\t\tstyle = window$1.document.createElement(\"style\");\n\t\t\tstyle.appendChild(document.createTextNode(CSS_DISABLE_TRANS));\n\t\t\twindow$1.document.head.appendChild(style);\n\t\t}\n\t\tfor (const c of classesToAdd) el.classList.add(c);\n\t\tfor (const c of classesToRemove) el.classList.remove(c);\n\t\tif (attributeToChange) el.setAttribute(attributeToChange.key, attributeToChange.value);\n\t\tif (disableTransition) {\n\t\t\twindow$1.getComputedStyle(style).opacity;\n\t\t\tdocument.head.removeChild(style);\n\t\t}\n\t});\n\tfunction defaultOnChanged(mode) {\n\t\tvar _modes$mode;\n\t\tupdateHTMLAttrs(selector, attribute, (_modes$mode = modes[mode]) !== null && _modes$mode !== void 0 ? _modes$mode : mode);\n\t}\n\tfunction onChanged(mode) {\n\t\tif (options.onChanged) options.onChanged(mode, defaultOnChanged);\n\t\telse defaultOnChanged(mode);\n\t}\n\twatch(state, onChanged, {\n\t\tflush: \"post\",\n\t\timmediate: true\n\t});\n\ttryOnMounted(() => onChanged(state.value));\n\tconst auto = computed({\n\t\tget() {\n\t\t\treturn emitAuto ? store.value : state.value;\n\t\t},\n\t\tset(v) {\n\t\t\tstore.value = v;\n\t\t}\n\t});\n\treturn Object.assign(auto, {\n\t\tstore,\n\t\tsystem,\n\t\tstate\n\t});\n}\n\n//#endregion\n//#region useConfirmDialog/index.ts\n/**\n* Hooks for creating confirm dialogs. Useful for modal windows, popups and logins.\n*\n* @see https://vueuse.org/useConfirmDialog/\n* @param revealed `boolean` `ref` that handles a modal window\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useConfirmDialog(revealed = shallowRef(false)) {\n\tconst confirmHook = createEventHook();\n\tconst cancelHook = createEventHook();\n\tconst revealHook = createEventHook();\n\tlet _resolve = noop;\n\tconst reveal = (data) => {\n\t\trevealHook.trigger(data);\n\t\trevealed.value = true;\n\t\treturn new Promise((resolve) => {\n\t\t\t_resolve = resolve;\n\t\t});\n\t};\n\tconst confirm = (data) => {\n\t\trevealed.value = false;\n\t\tconfirmHook.trigger(data);\n\t\t_resolve({\n\t\t\tdata,\n\t\t\tisCanceled: false\n\t\t});\n\t};\n\tconst cancel = (data) => {\n\t\trevealed.value = false;\n\t\tcancelHook.trigger(data);\n\t\t_resolve({\n\t\t\tdata,\n\t\t\tisCanceled: true\n\t\t});\n\t};\n\treturn {\n\t\tisRevealed: computed(() => revealed.value),\n\t\treveal,\n\t\tconfirm,\n\t\tcancel,\n\t\tonReveal: revealHook.on,\n\t\tonConfirm: confirmHook.on,\n\t\tonCancel: cancelHook.on\n\t};\n}\n\n//#endregion\n//#region useCountdown/index.ts\n/**\n* Wrapper for `useIntervalFn` that provides a countdown timer in seconds.\n*\n* @param initialCountdown\n* @param options\n*\n* @see https://vueuse.org/useCountdown\n*/\nfunction useCountdown(initialCountdown, options) {\n\tvar _options$interval, _options$immediate;\n\tconst remaining = shallowRef(toValue(initialCountdown));\n\tconst intervalController = useIntervalFn(() => {\n\t\tvar _options$onTick;\n\t\tconst value = remaining.value - 1;\n\t\tremaining.value = value < 0 ? 0 : value;\n\t\toptions === null || options === void 0 || (_options$onTick = options.onTick) === null || _options$onTick === void 0 || _options$onTick.call(options);\n\t\tif (remaining.value <= 0) {\n\t\t\tvar _options$onComplete;\n\t\t\tintervalController.pause();\n\t\t\toptions === null || options === void 0 || (_options$onComplete = options.onComplete) === null || _options$onComplete === void 0 || _options$onComplete.call(options);\n\t\t}\n\t}, (_options$interval = options === null || options === void 0 ? void 0 : options.interval) !== null && _options$interval !== void 0 ? _options$interval : 1e3, { immediate: (_options$immediate = options === null || options === void 0 ? void 0 : options.immediate) !== null && _options$immediate !== void 0 ? _options$immediate : false });\n\tconst reset = (countdown) => {\n\t\tvar _toValue;\n\t\tremaining.value = (_toValue = toValue(countdown)) !== null && _toValue !== void 0 ? _toValue : toValue(initialCountdown);\n\t};\n\tconst stop = () => {\n\t\tintervalController.pause();\n\t\treset();\n\t};\n\tconst resume = () => {\n\t\tif (!intervalController.isActive.value) {\n\t\t\tif (remaining.value > 0) intervalController.resume();\n\t\t}\n\t};\n\tconst start = (countdown) => {\n\t\treset(countdown);\n\t\tintervalController.resume();\n\t};\n\treturn {\n\t\tremaining,\n\t\treset,\n\t\tstop,\n\t\tstart,\n\t\tpause: intervalController.pause,\n\t\tresume,\n\t\tisActive: intervalController.isActive\n\t};\n}\n\n//#endregion\n//#region useCssVar/index.ts\n/**\n* Manipulate CSS variables.\n*\n* @see https://vueuse.org/useCssVar\n* @param prop\n* @param target\n* @param options\n*/\nfunction useCssVar(prop, target, options = {}) {\n\tconst { window: window$1 = defaultWindow, initialValue, observe = false } = options;\n\tconst variable = shallowRef(initialValue);\n\tconst elRef = computed(() => {\n\t\tvar _window$document;\n\t\treturn unrefElement(target) || (window$1 === null || window$1 === void 0 || (_window$document = window$1.document) === null || _window$document === void 0 ? void 0 : _window$document.documentElement);\n\t});\n\tfunction updateCssVar() {\n\t\tconst key = toValue(prop);\n\t\tconst el = toValue(elRef);\n\t\tif (el && window$1 && key) {\n\t\t\tvar _window$getComputedSt;\n\t\t\tvariable.value = ((_window$getComputedSt = window$1.getComputedStyle(el).getPropertyValue(key)) === null || _window$getComputedSt === void 0 ? void 0 : _window$getComputedSt.trim()) || variable.value || initialValue;\n\t\t}\n\t}\n\tif (observe) useMutationObserver(elRef, updateCssVar, {\n\t\tattributeFilter: [\"style\", \"class\"],\n\t\twindow: window$1\n\t});\n\twatch([elRef, () => toValue(prop)], (_, old) => {\n\t\tif (old[0] && old[1]) old[0].style.removeProperty(old[1]);\n\t\tupdateCssVar();\n\t}, { immediate: true });\n\twatch([variable, elRef], ([val, el]) => {\n\t\tconst raw_prop = toValue(prop);\n\t\tif ((el === null || el === void 0 ? void 0 : el.style) && raw_prop) if (val == null) el.style.removeProperty(raw_prop);\n\t\telse el.style.setProperty(raw_prop, val);\n\t}, { immediate: true });\n\treturn variable;\n}\n\n//#endregion\n//#region useCurrentElement/index.ts\nfunction useCurrentElement(rootComponent) {\n\tconst vm = getCurrentInstance();\n\tconst currentElement = computedWithControl(() => null, () => rootComponent ? unrefElement(rootComponent) : vm.proxy.$el);\n\tonUpdated(currentElement.trigger);\n\tonMounted(currentElement.trigger);\n\treturn currentElement;\n}\n\n//#endregion\n//#region useCycleList/index.ts\n/**\n* Cycle through a list of items\n*\n* @see https://vueuse.org/useCycleList\n*/\nfunction useCycleList(list, options) {\n\tconst state = shallowRef(getInitialValue());\n\tconst listRef = toRef(list);\n\tconst index = computed({\n\t\tget() {\n\t\t\tvar _options$fallbackInde;\n\t\t\tconst targetList = listRef.value;\n\t\t\tlet index$1 = (options === null || options === void 0 ? void 0 : options.getIndexOf) ? options.getIndexOf(state.value, targetList) : targetList.indexOf(state.value);\n\t\t\tif (index$1 < 0) index$1 = (_options$fallbackInde = options === null || options === void 0 ? void 0 : options.fallbackIndex) !== null && _options$fallbackInde !== void 0 ? _options$fallbackInde : 0;\n\t\t\treturn index$1;\n\t\t},\n\t\tset(v) {\n\t\t\tset(v);\n\t\t}\n\t});\n\tfunction set(i) {\n\t\tconst targetList = listRef.value;\n\t\tconst length = targetList.length;\n\t\tconst value = targetList[(i % length + length) % length];\n\t\tstate.value = value;\n\t\treturn value;\n\t}\n\tfunction shift(delta = 1) {\n\t\treturn set(index.value + delta);\n\t}\n\tfunction next(n = 1) {\n\t\treturn shift(n);\n\t}\n\tfunction prev(n = 1) {\n\t\treturn shift(-n);\n\t}\n\tfunction getInitialValue() {\n\t\tvar _toValue, _options$initialValue;\n\t\treturn (_toValue = toValue((_options$initialValue = options === null || options === void 0 ? void 0 : options.initialValue) !== null && _options$initialValue !== void 0 ? _options$initialValue : toValue(list)[0])) !== null && _toValue !== void 0 ? _toValue : void 0;\n\t}\n\twatch(listRef, () => set(index.value));\n\treturn {\n\t\tstate,\n\t\tindex,\n\t\tnext,\n\t\tprev,\n\t\tgo: set\n\t};\n}\n\n//#endregion\n//#region useDark/index.ts\n/**\n* Reactive dark mode with auto data persistence.\n*\n* @see https://vueuse.org/useDark\n* @param options\n*/\nfunction useDark(options = {}) {\n\tconst { valueDark = \"dark\", valueLight = \"\" } = options;\n\tconst mode = useColorMode({\n\t\t...options,\n\t\tonChanged: (mode$1, defaultHandler) => {\n\t\t\tvar _options$onChanged;\n\t\t\tif (options.onChanged) (_options$onChanged = options.onChanged) === null || _options$onChanged === void 0 || _options$onChanged.call(options, mode$1 === \"dark\", defaultHandler, mode$1);\n\t\t\telse defaultHandler(mode$1);\n\t\t},\n\t\tmodes: {\n\t\t\tdark: valueDark,\n\t\t\tlight: valueLight\n\t\t}\n\t});\n\tconst system = computed(() => mode.system.value);\n\treturn computed({\n\t\tget() {\n\t\t\treturn mode.value === \"dark\";\n\t\t},\n\t\tset(v) {\n\t\t\tconst modeVal = v ? \"dark\" : \"light\";\n\t\t\tif (system.value === modeVal) mode.value = \"auto\";\n\t\t\telse mode.value = modeVal;\n\t\t}\n\t});\n}\n\n//#endregion\n//#region useManualRefHistory/index.ts\nfunction fnBypass(v) {\n\treturn v;\n}\nfunction fnSetSource(source, value) {\n\treturn source.value = value;\n}\nfunction defaultDump(clone) {\n\treturn clone ? typeof clone === \"function\" ? clone : cloneFnJSON : fnBypass;\n}\nfunction defaultParse(clone) {\n\treturn clone ? typeof clone === \"function\" ? clone : cloneFnJSON : fnBypass;\n}\n/**\n* Track the change history of a ref, also provides undo and redo functionality.\n*\n* @see https://vueuse.org/useManualRefHistory\n* @param source\n* @param options\n*/\nfunction useManualRefHistory(source, options = {}) {\n\tconst { clone = false, dump = defaultDump(clone), parse = defaultParse(clone), setSource = fnSetSource } = options;\n\tfunction _createHistoryRecord() {\n\t\treturn markRaw({\n\t\t\tsnapshot: dump(source.value),\n\t\t\ttimestamp: timestamp()\n\t\t});\n\t}\n\tconst last = ref(_createHistoryRecord());\n\tconst undoStack = ref([]);\n\tconst redoStack = ref([]);\n\tconst _setSource = (record) => {\n\t\tsetSource(source, parse(record.snapshot));\n\t\tlast.value = record;\n\t};\n\tconst commit = () => {\n\t\tundoStack.value.unshift(last.value);\n\t\tlast.value = _createHistoryRecord();\n\t\tif (options.capacity && undoStack.value.length > options.capacity) undoStack.value.splice(options.capacity, Number.POSITIVE_INFINITY);\n\t\tif (redoStack.value.length) redoStack.value.splice(0, redoStack.value.length);\n\t};\n\tconst clear = () => {\n\t\tundoStack.value.splice(0, undoStack.value.length);\n\t\tredoStack.value.splice(0, redoStack.value.length);\n\t};\n\tconst undo = () => {\n\t\tconst state = undoStack.value.shift();\n\t\tif (state) {\n\t\t\tredoStack.value.unshift(last.value);\n\t\t\t_setSource(state);\n\t\t}\n\t};\n\tconst redo = () => {\n\t\tconst state = redoStack.value.shift();\n\t\tif (state) {\n\t\t\tundoStack.value.unshift(last.value);\n\t\t\t_setSource(state);\n\t\t}\n\t};\n\tconst reset = () => {\n\t\t_setSource(last.value);\n\t};\n\treturn {\n\t\tsource,\n\t\tundoStack,\n\t\tredoStack,\n\t\tlast,\n\t\thistory: computed(() => [last.value, ...undoStack.value]),\n\t\tcanUndo: computed(() => undoStack.value.length > 0),\n\t\tcanRedo: computed(() => redoStack.value.length > 0),\n\t\tclear,\n\t\tcommit,\n\t\treset,\n\t\tundo,\n\t\tredo\n\t};\n}\n\n//#endregion\n//#region useRefHistory/index.ts\n/**\n* Track the change history of a ref, also provides undo and redo functionality.\n*\n* @see https://vueuse.org/useRefHistory\n* @param source\n* @param options\n*/\nfunction useRefHistory(source, options = {}) {\n\tconst { deep = false, flush = \"pre\", eventFilter, shouldCommit = () => true } = options;\n\tconst { eventFilter: composedFilter, pause, resume: resumeTracking, isActive: isTracking } = pausableFilter(eventFilter);\n\tlet lastRawValue = source.value;\n\tconst { ignoreUpdates, ignorePrevAsyncUpdates, stop } = watchIgnorable(source, commit, {\n\t\tdeep,\n\t\tflush,\n\t\teventFilter: composedFilter\n\t});\n\tfunction setSource(source$1, value) {\n\t\tignorePrevAsyncUpdates();\n\t\tignoreUpdates(() => {\n\t\t\tsource$1.value = value;\n\t\t\tlastRawValue = value;\n\t\t});\n\t}\n\tconst manualHistory = useManualRefHistory(source, {\n\t\t...options,\n\t\tclone: options.clone || deep,\n\t\tsetSource\n\t});\n\tconst { clear, commit: manualCommit } = manualHistory;\n\tfunction commit() {\n\t\tignorePrevAsyncUpdates();\n\t\tif (!shouldCommit(lastRawValue, source.value)) return;\n\t\tlastRawValue = source.value;\n\t\tmanualCommit();\n\t}\n\tfunction resume(commitNow) {\n\t\tresumeTracking();\n\t\tif (commitNow) commit();\n\t}\n\tfunction batch(fn) {\n\t\tlet canceled = false;\n\t\tconst cancel = () => canceled = true;\n\t\tignoreUpdates(() => {\n\t\t\tfn(cancel);\n\t\t});\n\t\tif (!canceled) commit();\n\t}\n\tfunction dispose() {\n\t\tstop();\n\t\tclear();\n\t}\n\treturn {\n\t\t...manualHistory,\n\t\tisTracking,\n\t\tpause,\n\t\tresume,\n\t\tcommit,\n\t\tbatch,\n\t\tdispose\n\t};\n}\n\n//#endregion\n//#region useDebouncedRefHistory/index.ts\n/**\n* Shorthand for [useRefHistory](https://vueuse.org/useRefHistory) with debounce filter.\n*\n* @see https://vueuse.org/useDebouncedRefHistory\n* @param source\n* @param options\n*/\nfunction useDebouncedRefHistory(source, options = {}) {\n\tconst filter = options.debounce ? debounceFilter(options.debounce) : void 0;\n\treturn { ...useRefHistory(source, {\n\t\t...options,\n\t\teventFilter: filter\n\t}) };\n}\n\n//#endregion\n//#region useDeviceMotion/index.ts\n/**\n* Reactive DeviceMotionEvent.\n*\n* @see https://vueuse.org/useDeviceMotion\n* @param options\n*/\nfunction useDeviceMotion(options = {}) {\n\tconst { window: window$1 = defaultWindow, requestPermissions = false, eventFilter = bypassFilter } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => typeof DeviceMotionEvent !== \"undefined\");\n\tconst requirePermissions = /* @__PURE__ */ useSupported(() => isSupported.value && \"requestPermission\" in DeviceMotionEvent && typeof DeviceMotionEvent.requestPermission === \"function\");\n\tconst permissionGranted = shallowRef(false);\n\tconst acceleration = ref({\n\t\tx: null,\n\t\ty: null,\n\t\tz: null\n\t});\n\tconst rotationRate = ref({\n\t\talpha: null,\n\t\tbeta: null,\n\t\tgamma: null\n\t});\n\tconst interval = shallowRef(0);\n\tconst accelerationIncludingGravity = ref({\n\t\tx: null,\n\t\ty: null,\n\t\tz: null\n\t});\n\tfunction init() {\n\t\tif (window$1) useEventListener(window$1, \"devicemotion\", createFilterWrapper(eventFilter, (event) => {\n\t\t\tvar _event$acceleration, _event$acceleration2, _event$acceleration3, _event$accelerationIn, _event$accelerationIn2, _event$accelerationIn3, _event$rotationRate, _event$rotationRate2, _event$rotationRate3;\n\t\t\tacceleration.value = {\n\t\t\t\tx: ((_event$acceleration = event.acceleration) === null || _event$acceleration === void 0 ? void 0 : _event$acceleration.x) || null,\n\t\t\t\ty: ((_event$acceleration2 = event.acceleration) === null || _event$acceleration2 === void 0 ? void 0 : _event$acceleration2.y) || null,\n\t\t\t\tz: ((_event$acceleration3 = event.acceleration) === null || _event$acceleration3 === void 0 ? void 0 : _event$acceleration3.z) || null\n\t\t\t};\n\t\t\taccelerationIncludingGravity.value = {\n\t\t\t\tx: ((_event$accelerationIn = event.accelerationIncludingGravity) === null || _event$accelerationIn === void 0 ? void 0 : _event$accelerationIn.x) || null,\n\t\t\t\ty: ((_event$accelerationIn2 = event.accelerationIncludingGravity) === null || _event$accelerationIn2 === void 0 ? void 0 : _event$accelerationIn2.y) || null,\n\t\t\t\tz: ((_event$accelerationIn3 = event.accelerationIncludingGravity) === null || _event$accelerationIn3 === void 0 ? void 0 : _event$accelerationIn3.z) || null\n\t\t\t};\n\t\t\trotationRate.value = {\n\t\t\t\talpha: ((_event$rotationRate = event.rotationRate) === null || _event$rotationRate === void 0 ? void 0 : _event$rotationRate.alpha) || null,\n\t\t\t\tbeta: ((_event$rotationRate2 = event.rotationRate) === null || _event$rotationRate2 === void 0 ? void 0 : _event$rotationRate2.beta) || null,\n\t\t\t\tgamma: ((_event$rotationRate3 = event.rotationRate) === null || _event$rotationRate3 === void 0 ? void 0 : _event$rotationRate3.gamma) || null\n\t\t\t};\n\t\t\tinterval.value = event.interval;\n\t\t}), { passive: true });\n\t}\n\tconst ensurePermissions = async () => {\n\t\tif (!requirePermissions.value) permissionGranted.value = true;\n\t\tif (permissionGranted.value) return;\n\t\tif (requirePermissions.value) {\n\t\t\tconst requestPermission = DeviceMotionEvent.requestPermission;\n\t\t\ttry {\n\t\t\t\tif (await requestPermission() === \"granted\") {\n\t\t\t\t\tpermissionGranted.value = true;\n\t\t\t\t\tinit();\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(error);\n\t\t\t}\n\t\t}\n\t};\n\tif (isSupported.value) if (requestPermissions && requirePermissions.value) ensurePermissions().then(() => init());\n\telse init();\n\treturn {\n\t\tacceleration,\n\t\taccelerationIncludingGravity,\n\t\trotationRate,\n\t\tinterval,\n\t\tisSupported,\n\t\trequirePermissions,\n\t\tensurePermissions,\n\t\tpermissionGranted\n\t};\n}\n\n//#endregion\n//#region useDeviceOrientation/index.ts\n/**\n* Reactive DeviceOrientationEvent.\n*\n* @see https://vueuse.org/useDeviceOrientation\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useDeviceOrientation(options = {}) {\n\tconst { window: window$1 = defaultWindow } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => window$1 && \"DeviceOrientationEvent\" in window$1);\n\tconst isAbsolute = shallowRef(false);\n\tconst alpha = shallowRef(null);\n\tconst beta = shallowRef(null);\n\tconst gamma = shallowRef(null);\n\tif (window$1 && isSupported.value) useEventListener(window$1, \"deviceorientation\", (event) => {\n\t\tisAbsolute.value = event.absolute;\n\t\talpha.value = event.alpha;\n\t\tbeta.value = event.beta;\n\t\tgamma.value = event.gamma;\n\t}, { passive: true });\n\treturn {\n\t\tisSupported,\n\t\tisAbsolute,\n\t\talpha,\n\t\tbeta,\n\t\tgamma\n\t};\n}\n\n//#endregion\n//#region useDevicePixelRatio/index.ts\n/**\n* Reactively track `window.devicePixelRatio`.\n*\n* @see https://vueuse.org/useDevicePixelRatio\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useDevicePixelRatio(options = {}) {\n\tconst { window: window$1 = defaultWindow } = options;\n\tconst pixelRatio = shallowRef(1);\n\tconst query = useMediaQuery(() => `(resolution: ${pixelRatio.value}dppx)`, options);\n\tlet stop = noop;\n\tif (window$1) stop = watchImmediate(query, () => pixelRatio.value = window$1.devicePixelRatio);\n\treturn {\n\t\tpixelRatio: readonly(pixelRatio),\n\t\tstop\n\t};\n}\n\n//#endregion\n//#region useDevicesList/index.ts\n/**\n* Reactive `enumerateDevices` listing available input/output devices\n*\n* @see https://vueuse.org/useDevicesList\n* @param options\n*/\nfunction useDevicesList(options = {}) {\n\tconst { navigator: navigator$1 = defaultNavigator, requestPermissions = false, constraints = {\n\t\taudio: true,\n\t\tvideo: true\n\t}, onUpdated: onUpdated$1 } = options;\n\tconst devices = ref([]);\n\tconst videoInputs = computed(() => devices.value.filter((i) => i.kind === \"videoinput\"));\n\tconst audioInputs = computed(() => devices.value.filter((i) => i.kind === \"audioinput\"));\n\tconst audioOutputs = computed(() => devices.value.filter((i) => i.kind === \"audiooutput\"));\n\tconst isSupported = /* @__PURE__ */ useSupported(() => navigator$1 && navigator$1.mediaDevices && navigator$1.mediaDevices.enumerateDevices);\n\tconst permissionGranted = shallowRef(false);\n\tlet stream;\n\tasync function update() {\n\t\tif (!isSupported.value) return;\n\t\tdevices.value = await navigator$1.mediaDevices.enumerateDevices();\n\t\tonUpdated$1 === null || onUpdated$1 === void 0 || onUpdated$1(devices.value);\n\t\tif (stream) {\n\t\t\tstream.getTracks().forEach((t) => t.stop());\n\t\t\tstream = null;\n\t\t}\n\t}\n\tasync function ensurePermissions() {\n\t\tconst deviceName = constraints.video ? \"camera\" : \"microphone\";\n\t\tif (!isSupported.value) return false;\n\t\tif (permissionGranted.value) return true;\n\t\tconst { state, query } = usePermission(deviceName, { controls: true });\n\t\tawait query();\n\t\tif (state.value !== \"granted\") {\n\t\t\tlet granted = true;\n\t\t\ttry {\n\t\t\t\tconst allDevices = await navigator$1.mediaDevices.enumerateDevices();\n\t\t\t\tconst hasCamera = allDevices.some((device) => device.kind === \"videoinput\");\n\t\t\t\tconst hasMicrophone = allDevices.some((device) => device.kind === \"audioinput\" || device.kind === \"audiooutput\");\n\t\t\t\tconstraints.video = hasCamera ? constraints.video : false;\n\t\t\t\tconstraints.audio = hasMicrophone ? constraints.audio : false;\n\t\t\t\tstream = await navigator$1.mediaDevices.getUserMedia(constraints);\n\t\t\t} catch (_unused) {\n\t\t\t\tstream = null;\n\t\t\t\tgranted = false;\n\t\t\t}\n\t\t\tupdate();\n\t\t\tpermissionGranted.value = granted;\n\t\t} else permissionGranted.value = true;\n\t\treturn permissionGranted.value;\n\t}\n\tif (isSupported.value) {\n\t\tif (requestPermissions) ensurePermissions();\n\t\tuseEventListener(navigator$1.mediaDevices, \"devicechange\", update, { passive: true });\n\t\tupdate();\n\t}\n\treturn {\n\t\tdevices,\n\t\tensurePermissions,\n\t\tpermissionGranted,\n\t\tvideoInputs,\n\t\taudioInputs,\n\t\taudioOutputs,\n\t\tisSupported\n\t};\n}\n\n//#endregion\n//#region useDisplayMedia/index.ts\n/**\n* Reactive `mediaDevices.getDisplayMedia` streaming\n*\n* @see https://vueuse.org/useDisplayMedia\n* @param options\n*/\nfunction useDisplayMedia(options = {}) {\n\tvar _options$enabled;\n\tconst enabled = shallowRef((_options$enabled = options.enabled) !== null && _options$enabled !== void 0 ? _options$enabled : false);\n\tconst video = options.video;\n\tconst audio = options.audio;\n\tconst { navigator: navigator$1 = defaultNavigator } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => {\n\t\tvar _navigator$mediaDevic;\n\t\treturn navigator$1 === null || navigator$1 === void 0 || (_navigator$mediaDevic = navigator$1.mediaDevices) === null || _navigator$mediaDevic === void 0 ? void 0 : _navigator$mediaDevic.getDisplayMedia;\n\t});\n\tconst constraint = {\n\t\taudio,\n\t\tvideo\n\t};\n\tconst stream = shallowRef();\n\tasync function _start() {\n\t\tvar _stream$value;\n\t\tif (!isSupported.value || stream.value) return;\n\t\tstream.value = await navigator$1.mediaDevices.getDisplayMedia(constraint);\n\t\t(_stream$value = stream.value) === null || _stream$value === void 0 || _stream$value.getTracks().forEach((t) => useEventListener(t, \"ended\", stop, { passive: true }));\n\t\treturn stream.value;\n\t}\n\tasync function _stop() {\n\t\tvar _stream$value2;\n\t\t(_stream$value2 = stream.value) === null || _stream$value2 === void 0 || _stream$value2.getTracks().forEach((t) => t.stop());\n\t\tstream.value = void 0;\n\t}\n\tfunction stop() {\n\t\t_stop();\n\t\tenabled.value = false;\n\t}\n\tasync function start() {\n\t\tawait _start();\n\t\tif (stream.value) enabled.value = true;\n\t\treturn stream.value;\n\t}\n\twatch(enabled, (v) => {\n\t\tif (v) _start();\n\t\telse _stop();\n\t}, { immediate: true });\n\treturn {\n\t\tisSupported,\n\t\tstream,\n\t\tstart,\n\t\tstop,\n\t\tenabled\n\t};\n}\n\n//#endregion\n//#region useDocumentVisibility/index.ts\n/**\n* Reactively track `document.visibilityState`.\n*\n* @see https://vueuse.org/useDocumentVisibility\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useDocumentVisibility(options = {}) {\n\tconst { document: document$1 = defaultDocument } = options;\n\tif (!document$1) return shallowRef(\"visible\");\n\tconst visibility = shallowRef(document$1.visibilityState);\n\tuseEventListener(document$1, \"visibilitychange\", () => {\n\t\tvisibility.value = document$1.visibilityState;\n\t}, { passive: true });\n\treturn visibility;\n}\n\n//#endregion\n//#region useDraggable/index.ts\n/**\n* Make elements draggable.\n*\n* @see https://vueuse.org/useDraggable\n* @param target\n* @param options\n*/\nfunction useDraggable(target, options = {}) {\n\tvar _toValue;\n\tconst { pointerTypes, preventDefault: preventDefault$1, stopPropagation, exact, onMove, onEnd, onStart, initialValue, axis = \"both\", draggingElement = defaultWindow, containerElement, handle: draggingHandle = target, buttons = [0] } = options;\n\tconst position = ref((_toValue = toValue(initialValue)) !== null && _toValue !== void 0 ? _toValue : {\n\t\tx: 0,\n\t\ty: 0\n\t});\n\tconst pressedDelta = ref();\n\tconst filterEvent = (e) => {\n\t\tif (pointerTypes) return pointerTypes.includes(e.pointerType);\n\t\treturn true;\n\t};\n\tconst handleEvent = (e) => {\n\t\tif (toValue(preventDefault$1)) e.preventDefault();\n\t\tif (toValue(stopPropagation)) e.stopPropagation();\n\t};\n\tconst start = (e) => {\n\t\tvar _container$getBoundin;\n\t\tif (!toValue(buttons).includes(e.button)) return;\n\t\tif (toValue(options.disabled) || !filterEvent(e)) return;\n\t\tif (toValue(exact) && e.target !== toValue(target)) return;\n\t\tconst container = toValue(containerElement);\n\t\tconst containerRect = container === null || container === void 0 || (_container$getBoundin = container.getBoundingClientRect) === null || _container$getBoundin === void 0 ? void 0 : _container$getBoundin.call(container);\n\t\tconst targetRect = toValue(target).getBoundingClientRect();\n\t\tconst pos = {\n\t\t\tx: e.clientX - (container ? targetRect.left - containerRect.left + container.scrollLeft : targetRect.left),\n\t\t\ty: e.clientY - (container ? targetRect.top - containerRect.top + container.scrollTop : targetRect.top)\n\t\t};\n\t\tif ((onStart === null || onStart === void 0 ? void 0 : onStart(pos, e)) === false) return;\n\t\tpressedDelta.value = pos;\n\t\thandleEvent(e);\n\t};\n\tconst move = (e) => {\n\t\tif (toValue(options.disabled) || !filterEvent(e)) return;\n\t\tif (!pressedDelta.value) return;\n\t\tconst container = toValue(containerElement);\n\t\tconst targetRect = toValue(target).getBoundingClientRect();\n\t\tlet { x, y } = position.value;\n\t\tif (axis === \"x\" || axis === \"both\") {\n\t\t\tx = e.clientX - pressedDelta.value.x;\n\t\t\tif (container) x = Math.min(Math.max(0, x), container.scrollWidth - targetRect.width);\n\t\t}\n\t\tif (axis === \"y\" || axis === \"both\") {\n\t\t\ty = e.clientY - pressedDelta.value.y;\n\t\t\tif (container) y = Math.min(Math.max(0, y), container.scrollHeight - targetRect.height);\n\t\t}\n\t\tposition.value = {\n\t\t\tx,\n\t\t\ty\n\t\t};\n\t\tonMove === null || onMove === void 0 || onMove(position.value, e);\n\t\thandleEvent(e);\n\t};\n\tconst end = (e) => {\n\t\tif (toValue(options.disabled) || !filterEvent(e)) return;\n\t\tif (!pressedDelta.value) return;\n\t\tpressedDelta.value = void 0;\n\t\tonEnd === null || onEnd === void 0 || onEnd(position.value, e);\n\t\thandleEvent(e);\n\t};\n\tif (isClient) {\n\t\tconst config = () => {\n\t\t\tvar _options$capture;\n\t\t\treturn {\n\t\t\t\tcapture: (_options$capture = options.capture) !== null && _options$capture !== void 0 ? _options$capture : true,\n\t\t\t\tpassive: !toValue(preventDefault$1)\n\t\t\t};\n\t\t};\n\t\tuseEventListener(draggingHandle, \"pointerdown\", start, config);\n\t\tuseEventListener(draggingElement, \"pointermove\", move, config);\n\t\tuseEventListener(draggingElement, \"pointerup\", end, config);\n\t}\n\treturn {\n\t\t...toRefs(position),\n\t\tposition,\n\t\tisDragging: computed(() => !!pressedDelta.value),\n\t\tstyle: computed(() => `left:${position.value.x}px;top:${position.value.y}px;`)\n\t};\n}\n\n//#endregion\n//#region useDropZone/index.ts\nfunction useDropZone(target, options = {}) {\n\tconst isOverDropZone = shallowRef(false);\n\tconst files = shallowRef(null);\n\tlet counter = 0;\n\tlet isValid = true;\n\tif (isClient) {\n\t\tvar _options$multiple, _options$preventDefau;\n\t\tconst _options = typeof options === \"function\" ? { onDrop: options } : options;\n\t\tconst multiple = (_options$multiple = _options.multiple) !== null && _options$multiple !== void 0 ? _options$multiple : true;\n\t\tconst preventDefaultForUnhandled = (_options$preventDefau = _options.preventDefaultForUnhandled) !== null && _options$preventDefau !== void 0 ? _options$preventDefau : false;\n\t\tconst getFiles = (event) => {\n\t\t\tvar _event$dataTransfer$f, _event$dataTransfer;\n\t\t\tconst list = Array.from((_event$dataTransfer$f = (_event$dataTransfer = event.dataTransfer) === null || _event$dataTransfer === void 0 ? void 0 : _event$dataTransfer.files) !== null && _event$dataTransfer$f !== void 0 ? _event$dataTransfer$f : []);\n\t\t\treturn list.length === 0 ? null : multiple ? list : [list[0]];\n\t\t};\n\t\tconst checkDataTypes = (types) => {\n\t\t\tconst dataTypes = unref(_options.dataTypes);\n\t\t\tif (typeof dataTypes === \"function\") return dataTypes(types);\n\t\t\tif (!(dataTypes === null || dataTypes === void 0 ? void 0 : dataTypes.length)) return true;\n\t\t\tif (types.length === 0) return false;\n\t\t\treturn types.every((type) => dataTypes.some((allowedType) => type.includes(allowedType)));\n\t\t};\n\t\tconst checkValidity = (items) => {\n\t\t\tif (_options.checkValidity) return _options.checkValidity(items);\n\t\t\tconst dataTypesValid = checkDataTypes(Array.from(items !== null && items !== void 0 ? items : []).map((item) => item.type));\n\t\t\tconst multipleFilesValid = multiple || items.length <= 1;\n\t\t\treturn dataTypesValid && multipleFilesValid;\n\t\t};\n\t\tconst isSafari = () => /^(?:(?!chrome|android).)*safari/i.test(navigator.userAgent) && !(\"chrome\" in window);\n\t\tconst handleDragEvent = (event, eventType) => {\n\t\t\tvar _event$dataTransfer2, _ref;\n\t\t\tconst dataTransferItemList = (_event$dataTransfer2 = event.dataTransfer) === null || _event$dataTransfer2 === void 0 ? void 0 : _event$dataTransfer2.items;\n\t\t\tisValid = (_ref = dataTransferItemList && checkValidity(dataTransferItemList)) !== null && _ref !== void 0 ? _ref : false;\n\t\t\tif (preventDefaultForUnhandled) event.preventDefault();\n\t\t\tif (!isSafari() && !isValid) {\n\t\t\t\tif (event.dataTransfer) event.dataTransfer.dropEffect = \"none\";\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tevent.preventDefault();\n\t\t\tif (event.dataTransfer) event.dataTransfer.dropEffect = \"copy\";\n\t\t\tconst currentFiles = getFiles(event);\n\t\t\tswitch (eventType) {\n\t\t\t\tcase \"enter\":\n\t\t\t\t\tvar _options$onEnter;\n\t\t\t\t\tcounter += 1;\n\t\t\t\t\tisOverDropZone.value = true;\n\t\t\t\t\t(_options$onEnter = _options.onEnter) === null || _options$onEnter === void 0 || _options$onEnter.call(_options, null, event);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"over\":\n\t\t\t\t\tvar _options$onOver;\n\t\t\t\t\t(_options$onOver = _options.onOver) === null || _options$onOver === void 0 || _options$onOver.call(_options, null, event);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"leave\":\n\t\t\t\t\tvar _options$onLeave;\n\t\t\t\t\tcounter -= 1;\n\t\t\t\t\tif (counter === 0) isOverDropZone.value = false;\n\t\t\t\t\t(_options$onLeave = _options.onLeave) === null || _options$onLeave === void 0 || _options$onLeave.call(_options, null, event);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"drop\":\n\t\t\t\t\tcounter = 0;\n\t\t\t\t\tisOverDropZone.value = false;\n\t\t\t\t\tif (isValid) {\n\t\t\t\t\t\tvar _options$onDrop;\n\t\t\t\t\t\tfiles.value = currentFiles;\n\t\t\t\t\t\t(_options$onDrop = _options.onDrop) === null || _options$onDrop === void 0 || _options$onDrop.call(_options, currentFiles, event);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t};\n\t\tuseEventListener(target, \"dragenter\", (event) => handleDragEvent(event, \"enter\"));\n\t\tuseEventListener(target, \"dragover\", (event) => handleDragEvent(event, \"over\"));\n\t\tuseEventListener(target, \"dragleave\", (event) => handleDragEvent(event, \"leave\"));\n\t\tuseEventListener(target, \"drop\", (event) => handleDragEvent(event, \"drop\"));\n\t}\n\treturn {\n\t\tfiles,\n\t\tisOverDropZone\n\t};\n}\n\n//#endregion\n//#region useResizeObserver/index.ts\n/**\n* Reports changes to the dimensions of an Element's content or the border-box\n*\n* @see https://vueuse.org/useResizeObserver\n* @param target\n* @param callback\n* @param options\n*/\nfunction useResizeObserver(target, callback, options = {}) {\n\tconst { window: window$1 = defaultWindow,...observerOptions } = options;\n\tlet observer;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => window$1 && \"ResizeObserver\" in window$1);\n\tconst cleanup = () => {\n\t\tif (observer) {\n\t\t\tobserver.disconnect();\n\t\t\tobserver = void 0;\n\t\t}\n\t};\n\tconst stopWatch = watch(computed(() => {\n\t\tconst _targets = toValue(target);\n\t\treturn Array.isArray(_targets) ? _targets.map((el) => unrefElement(el)) : [unrefElement(_targets)];\n\t}), (els) => {\n\t\tcleanup();\n\t\tif (isSupported.value && window$1) {\n\t\t\tobserver = new ResizeObserver(callback);\n\t\t\tfor (const _el of els) if (_el) observer.observe(_el, observerOptions);\n\t\t}\n\t}, {\n\t\timmediate: true,\n\t\tflush: \"post\"\n\t});\n\tconst stop = () => {\n\t\tcleanup();\n\t\tstopWatch();\n\t};\n\ttryOnScopeDispose(stop);\n\treturn {\n\t\tisSupported,\n\t\tstop\n\t};\n}\n\n//#endregion\n//#region useElementBounding/index.ts\n/**\n* Reactive bounding box of an HTML element.\n*\n* @see https://vueuse.org/useElementBounding\n* @param target\n*/\nfunction useElementBounding(target, options = {}) {\n\tconst { reset = true, windowResize = true, windowScroll = true, immediate = true, updateTiming = \"sync\" } = options;\n\tconst height = shallowRef(0);\n\tconst bottom = shallowRef(0);\n\tconst left = shallowRef(0);\n\tconst right = shallowRef(0);\n\tconst top = shallowRef(0);\n\tconst width = shallowRef(0);\n\tconst x = shallowRef(0);\n\tconst y = shallowRef(0);\n\tfunction recalculate() {\n\t\tconst el = unrefElement(target);\n\t\tif (!el) {\n\t\t\tif (reset) {\n\t\t\t\theight.value = 0;\n\t\t\t\tbottom.value = 0;\n\t\t\t\tleft.value = 0;\n\t\t\t\tright.value = 0;\n\t\t\t\ttop.value = 0;\n\t\t\t\twidth.value = 0;\n\t\t\t\tx.value = 0;\n\t\t\t\ty.value = 0;\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tconst rect = el.getBoundingClientRect();\n\t\theight.value = rect.height;\n\t\tbottom.value = rect.bottom;\n\t\tleft.value = rect.left;\n\t\tright.value = rect.right;\n\t\ttop.value = rect.top;\n\t\twidth.value = rect.width;\n\t\tx.value = rect.x;\n\t\ty.value = rect.y;\n\t}\n\tfunction update() {\n\t\tif (updateTiming === \"sync\") recalculate();\n\t\telse if (updateTiming === \"next-frame\") requestAnimationFrame(() => recalculate());\n\t}\n\tuseResizeObserver(target, update);\n\twatch(() => unrefElement(target), (ele) => !ele && update());\n\tuseMutationObserver(target, update, { attributeFilter: [\"style\", \"class\"] });\n\tif (windowScroll) useEventListener(\"scroll\", update, {\n\t\tcapture: true,\n\t\tpassive: true\n\t});\n\tif (windowResize) useEventListener(\"resize\", update, { passive: true });\n\ttryOnMounted(() => {\n\t\tif (immediate) update();\n\t});\n\treturn {\n\t\theight,\n\t\tbottom,\n\t\tleft,\n\t\tright,\n\t\ttop,\n\t\twidth,\n\t\tx,\n\t\ty,\n\t\tupdate\n\t};\n}\n\n//#endregion\n//#region useElementByPoint/index.ts\n/**\n* Reactive element by point.\n*\n* @see https://vueuse.org/useElementByPoint\n* @param options - UseElementByPointOptions\n*/\nfunction useElementByPoint(options) {\n\tconst { x, y, document: document$1 = defaultDocument, multiple, interval = \"requestAnimationFrame\", immediate = true } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => {\n\t\tif (toValue(multiple)) return document$1 && \"elementsFromPoint\" in document$1;\n\t\treturn document$1 && \"elementFromPoint\" in document$1;\n\t});\n\tconst element = shallowRef(null);\n\tconst cb = () => {\n\t\tvar _document$elementsFro, _document$elementFrom;\n\t\telement.value = toValue(multiple) ? (_document$elementsFro = document$1 === null || document$1 === void 0 ? void 0 : document$1.elementsFromPoint(toValue(x), toValue(y))) !== null && _document$elementsFro !== void 0 ? _document$elementsFro : [] : (_document$elementFrom = document$1 === null || document$1 === void 0 ? void 0 : document$1.elementFromPoint(toValue(x), toValue(y))) !== null && _document$elementFrom !== void 0 ? _document$elementFrom : null;\n\t};\n\treturn {\n\t\tisSupported,\n\t\telement,\n\t\t...interval === \"requestAnimationFrame\" ? useRafFn(cb, { immediate }) : useIntervalFn(cb, interval, { immediate })\n\t};\n}\n\n//#endregion\n//#region useElementHover/index.ts\nfunction useElementHover(el, options = {}) {\n\tconst { delayEnter = 0, delayLeave = 0, triggerOnRemoval = false, window: window$1 = defaultWindow } = options;\n\tconst isHovered = shallowRef(false);\n\tlet timer;\n\tconst toggle = (entering) => {\n\t\tconst delay = entering ? delayEnter : delayLeave;\n\t\tif (timer) {\n\t\t\tclearTimeout(timer);\n\t\t\ttimer = void 0;\n\t\t}\n\t\tif (delay) timer = setTimeout(() => isHovered.value = entering, delay);\n\t\telse isHovered.value = entering;\n\t};\n\tif (!window$1) return isHovered;\n\tuseEventListener(el, \"mouseenter\", () => toggle(true), { passive: true });\n\tuseEventListener(el, \"mouseleave\", () => toggle(false), { passive: true });\n\tif (triggerOnRemoval) onElementRemoval(computed(() => unrefElement(el)), () => toggle(false));\n\treturn isHovered;\n}\n\n//#endregion\n//#region useElementSize/index.ts\n/**\n* Reactive size of an HTML element.\n*\n* @see https://vueuse.org/useElementSize\n*/\nfunction useElementSize(target, initialSize = {\n\twidth: 0,\n\theight: 0\n}, options = {}) {\n\tconst { window: window$1 = defaultWindow, box = \"content-box\" } = options;\n\tconst isSVG = computed(() => {\n\t\tvar _unrefElement;\n\t\treturn (_unrefElement = unrefElement(target)) === null || _unrefElement === void 0 || (_unrefElement = _unrefElement.namespaceURI) === null || _unrefElement === void 0 ? void 0 : _unrefElement.includes(\"svg\");\n\t});\n\tconst width = shallowRef(initialSize.width);\n\tconst height = shallowRef(initialSize.height);\n\tconst { stop: stop1 } = useResizeObserver(target, ([entry]) => {\n\t\tconst boxSize = box === \"border-box\" ? entry.borderBoxSize : box === \"content-box\" ? entry.contentBoxSize : entry.devicePixelContentBoxSize;\n\t\tif (window$1 && isSVG.value) {\n\t\t\tconst $elem = unrefElement(target);\n\t\t\tif ($elem) {\n\t\t\t\tconst rect = $elem.getBoundingClientRect();\n\t\t\t\twidth.value = rect.width;\n\t\t\t\theight.value = rect.height;\n\t\t\t}\n\t\t} else if (boxSize) {\n\t\t\tconst formatBoxSize = toArray(boxSize);\n\t\t\twidth.value = formatBoxSize.reduce((acc, { inlineSize }) => acc + inlineSize, 0);\n\t\t\theight.value = formatBoxSize.reduce((acc, { blockSize }) => acc + blockSize, 0);\n\t\t} else {\n\t\t\twidth.value = entry.contentRect.width;\n\t\t\theight.value = entry.contentRect.height;\n\t\t}\n\t}, options);\n\ttryOnMounted(() => {\n\t\tconst ele = unrefElement(target);\n\t\tif (ele) {\n\t\t\twidth.value = \"offsetWidth\" in ele ? ele.offsetWidth : initialSize.width;\n\t\t\theight.value = \"offsetHeight\" in ele ? ele.offsetHeight : initialSize.height;\n\t\t}\n\t});\n\tconst stop2 = watch(() => unrefElement(target), (ele) => {\n\t\twidth.value = ele ? initialSize.width : 0;\n\t\theight.value = ele ? initialSize.height : 0;\n\t});\n\tfunction stop() {\n\t\tstop1();\n\t\tstop2();\n\t}\n\treturn {\n\t\twidth,\n\t\theight,\n\t\tstop\n\t};\n}\n\n//#endregion\n//#region useIntersectionObserver/index.ts\n/**\n* Detects that a target element's visibility.\n*\n* @see https://vueuse.org/useIntersectionObserver\n* @param target\n* @param callback\n* @param options\n*/\nfunction useIntersectionObserver(target, callback, options = {}) {\n\tconst { root, rootMargin = \"0px\", threshold = 0, window: window$1 = defaultWindow, immediate = true } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => window$1 && \"IntersectionObserver\" in window$1);\n\tconst targets = computed(() => {\n\t\treturn toArray(toValue(target)).map(unrefElement).filter(notNullish);\n\t});\n\tlet cleanup = noop;\n\tconst isActive = shallowRef(immediate);\n\tconst stopWatch = isSupported.value ? watch(() => [\n\t\ttargets.value,\n\t\tunrefElement(root),\n\t\tisActive.value\n\t], ([targets$1, root$1]) => {\n\t\tcleanup();\n\t\tif (!isActive.value) return;\n\t\tif (!targets$1.length) return;\n\t\tconst observer = new IntersectionObserver(callback, {\n\t\t\troot: unrefElement(root$1),\n\t\t\trootMargin,\n\t\t\tthreshold\n\t\t});\n\t\ttargets$1.forEach((el) => el && observer.observe(el));\n\t\tcleanup = () => {\n\t\t\tobserver.disconnect();\n\t\t\tcleanup = noop;\n\t\t};\n\t}, {\n\t\timmediate,\n\t\tflush: \"post\"\n\t}) : noop;\n\tconst stop = () => {\n\t\tcleanup();\n\t\tstopWatch();\n\t\tisActive.value = false;\n\t};\n\ttryOnScopeDispose(stop);\n\treturn {\n\t\tisSupported,\n\t\tisActive,\n\t\tpause() {\n\t\t\tcleanup();\n\t\t\tisActive.value = false;\n\t\t},\n\t\tresume() {\n\t\t\tisActive.value = true;\n\t\t},\n\t\tstop\n\t};\n}\n\n//#endregion\n//#region useElementVisibility/index.ts\n/**\n* Tracks the visibility of an element within the viewport.\n*\n* @see https://vueuse.org/useElementVisibility\n*/\nfunction useElementVisibility(element, options = {}) {\n\tconst { window: window$1 = defaultWindow, scrollTarget, threshold = 0, rootMargin, once = false, initialValue = false } = options;\n\tconst elementIsVisible = shallowRef(initialValue);\n\tconst { stop } = useIntersectionObserver(element, (intersectionObserverEntries) => {\n\t\tlet isIntersecting = elementIsVisible.value;\n\t\tlet latestTime = 0;\n\t\tfor (const entry of intersectionObserverEntries) if (entry.time >= latestTime) {\n\t\t\tlatestTime = entry.time;\n\t\t\tisIntersecting = entry.isIntersecting;\n\t\t}\n\t\telementIsVisible.value = isIntersecting;\n\t\tif (once) watchOnce(elementIsVisible, () => {\n\t\t\tstop();\n\t\t});\n\t}, {\n\t\troot: scrollTarget,\n\t\twindow: window$1,\n\t\tthreshold,\n\t\trootMargin: toValue(rootMargin)\n\t});\n\treturn elementIsVisible;\n}\n\n//#endregion\n//#region useEventBus/internal.ts\nconst events = /* @__PURE__ */ new Map();\n\n//#endregion\n//#region useEventBus/index.ts\n/* @__NO_SIDE_EFFECTS__ */\nfunction useEventBus(key) {\n\tconst scope = getCurrentScope();\n\tfunction on(listener) {\n\t\tvar _scope$cleanups;\n\t\tconst listeners = events.get(key) || /* @__PURE__ */ new Set();\n\t\tlisteners.add(listener);\n\t\tevents.set(key, listeners);\n\t\tconst _off = () => off(listener);\n\t\tscope === null || scope === void 0 || (_scope$cleanups = scope.cleanups) === null || _scope$cleanups === void 0 || _scope$cleanups.push(_off);\n\t\treturn _off;\n\t}\n\tfunction once(listener) {\n\t\tfunction _listener(...args) {\n\t\t\toff(_listener);\n\t\t\tlistener(...args);\n\t\t}\n\t\treturn on(_listener);\n\t}\n\tfunction off(listener) {\n\t\tconst listeners = events.get(key);\n\t\tif (!listeners) return;\n\t\tlisteners.delete(listener);\n\t\tif (!listeners.size) reset();\n\t}\n\tfunction reset() {\n\t\tevents.delete(key);\n\t}\n\tfunction emit(event, payload) {\n\t\tvar _events$get;\n\t\t(_events$get = events.get(key)) === null || _events$get === void 0 || _events$get.forEach((v) => v(event, payload));\n\t}\n\treturn {\n\t\ton,\n\t\tonce,\n\t\toff,\n\t\temit,\n\t\treset\n\t};\n}\n\n//#endregion\n//#region useEventSource/index.ts\nfunction resolveNestedOptions$1(options) {\n\tif (options === true) return {};\n\treturn options;\n}\n/**\n* Reactive wrapper for EventSource.\n*\n* @see https://vueuse.org/useEventSource\n* @see https://developer.mozilla.org/en-US/docs/Web/API/EventSource/EventSource EventSource\n* @param url\n* @param events\n* @param options\n*/\nfunction useEventSource(url, events$1 = [], options = {}) {\n\tconst event = shallowRef(null);\n\tconst data = shallowRef(null);\n\tconst status = shallowRef(\"CONNECTING\");\n\tconst eventSource = ref(null);\n\tconst error = shallowRef(null);\n\tconst urlRef = toRef(url);\n\tconst lastEventId = shallowRef(null);\n\tlet explicitlyClosed = false;\n\tlet retried = 0;\n\tconst { withCredentials = false, immediate = true, autoConnect = true, autoReconnect, serializer = { read: (v) => v } } = options;\n\tconst close = () => {\n\t\tif (isClient && eventSource.value) {\n\t\t\teventSource.value.close();\n\t\t\teventSource.value = null;\n\t\t\tstatus.value = \"CLOSED\";\n\t\t\texplicitlyClosed = true;\n\t\t}\n\t};\n\tconst _init = () => {\n\t\tif (explicitlyClosed || typeof urlRef.value === \"undefined\") return;\n\t\tconst es = new EventSource(urlRef.value, { withCredentials });\n\t\tstatus.value = \"CONNECTING\";\n\t\teventSource.value = es;\n\t\tes.onopen = () => {\n\t\t\tstatus.value = \"OPEN\";\n\t\t\terror.value = null;\n\t\t};\n\t\tes.onerror = (e) => {\n\t\t\tstatus.value = \"CLOSED\";\n\t\t\terror.value = e;\n\t\t\tif (es.readyState === 2 && !explicitlyClosed && autoReconnect) {\n\t\t\t\tes.close();\n\t\t\t\tconst { retries = -1, delay = 1e3, onFailed } = resolveNestedOptions$1(autoReconnect);\n\t\t\t\tretried += 1;\n\t\t\t\tif (typeof retries === \"number\" && (retries < 0 || retried < retries)) setTimeout(_init, delay);\n\t\t\t\telse if (typeof retries === \"function\" && retries()) setTimeout(_init, delay);\n\t\t\t\telse onFailed === null || onFailed === void 0 || onFailed();\n\t\t\t}\n\t\t};\n\t\tes.onmessage = (e) => {\n\t\t\tvar _serializer$read;\n\t\t\tevent.value = null;\n\t\t\tdata.value = (_serializer$read = serializer.read(e.data)) !== null && _serializer$read !== void 0 ? _serializer$read : null;\n\t\t\tlastEventId.value = e.lastEventId;\n\t\t};\n\t\tfor (const event_name of events$1) useEventListener(es, event_name, (e) => {\n\t\t\tvar _serializer$read2, _e$lastEventId;\n\t\t\tevent.value = event_name;\n\t\t\tdata.value = (_serializer$read2 = serializer.read(e.data)) !== null && _serializer$read2 !== void 0 ? _serializer$read2 : null;\n\t\t\tlastEventId.value = (_e$lastEventId = e.lastEventId) !== null && _e$lastEventId !== void 0 ? _e$lastEventId : null;\n\t\t}, { passive: true });\n\t};\n\tconst open = () => {\n\t\tif (!isClient) return;\n\t\tclose();\n\t\texplicitlyClosed = false;\n\t\tretried = 0;\n\t\t_init();\n\t};\n\tif (immediate) open();\n\tif (autoConnect) watch(urlRef, open);\n\ttryOnScopeDispose(close);\n\treturn {\n\t\teventSource,\n\t\tevent,\n\t\tdata,\n\t\tstatus,\n\t\terror,\n\t\topen,\n\t\tclose,\n\t\tlastEventId\n\t};\n}\n\n//#endregion\n//#region useEyeDropper/index.ts\n/**\n* Reactive [EyeDropper API](https://developer.mozilla.org/en-US/docs/Web/API/EyeDropper_API)\n*\n* @see https://vueuse.org/useEyeDropper\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useEyeDropper(options = {}) {\n\tconst { initialValue = \"\" } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => typeof window !== \"undefined\" && \"EyeDropper\" in window);\n\tconst sRGBHex = shallowRef(initialValue);\n\tasync function open(openOptions) {\n\t\tif (!isSupported.value) return;\n\t\tconst result = await new window.EyeDropper().open(openOptions);\n\t\tsRGBHex.value = result.sRGBHex;\n\t\treturn result;\n\t}\n\treturn {\n\t\tisSupported,\n\t\tsRGBHex,\n\t\topen\n\t};\n}\n\n//#endregion\n//#region useFavicon/index.ts\nfunction useFavicon(newIcon = null, options = {}) {\n\tconst { baseUrl = \"\", rel = \"icon\", document: document$1 = defaultDocument } = options;\n\tconst favicon = toRef(newIcon);\n\tconst applyIcon = (icon) => {\n\t\tconst elements = document$1 === null || document$1 === void 0 ? void 0 : document$1.head.querySelectorAll(`link[rel*=\"${rel}\"]`);\n\t\tif (!elements || elements.length === 0) {\n\t\t\tconst link = document$1 === null || document$1 === void 0 ? void 0 : document$1.createElement(\"link\");\n\t\t\tif (link) {\n\t\t\t\tlink.rel = rel;\n\t\t\t\tlink.href = `${baseUrl}${icon}`;\n\t\t\t\tlink.type = `image/${icon.split(\".\").pop()}`;\n\t\t\t\tdocument$1 === null || document$1 === void 0 || document$1.head.append(link);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\telements === null || elements === void 0 || elements.forEach((el) => el.href = `${baseUrl}${icon}`);\n\t};\n\twatch(favicon, (i, o) => {\n\t\tif (typeof i === \"string\" && i !== o) applyIcon(i);\n\t}, { immediate: true });\n\treturn favicon;\n}\n\n//#endregion\n//#region useFetch/index.ts\nconst payloadMapping = {\n\tjson: \"application/json\",\n\ttext: \"text/plain\"\n};\n/**\n* !!!IMPORTANT!!!\n*\n* If you update the UseFetchOptions interface, be sure to update this object\n* to include the new options\n*/\nfunction isFetchOptions(obj) {\n\treturn obj && containsProp(obj, \"immediate\", \"refetch\", \"initialData\", \"timeout\", \"beforeFetch\", \"afterFetch\", \"onFetchError\", \"fetch\", \"updateDataOnError\");\n}\nconst reAbsolute = /^(?:[a-z][a-z\\d+\\-.]*:)?\\/\\//i;\nfunction isAbsoluteURL(url) {\n\treturn reAbsolute.test(url);\n}\nfunction headersToObject(headers) {\n\tif (typeof Headers !== \"undefined\" && headers instanceof Headers) return Object.fromEntries(headers.entries());\n\treturn headers;\n}\nfunction combineCallbacks(combination, ...callbacks) {\n\tif (combination === \"overwrite\") return async (ctx) => {\n\t\tlet callback;\n\t\tfor (let i = callbacks.length - 1; i >= 0; i--) if (callbacks[i] != null) {\n\t\t\tcallback = callbacks[i];\n\t\t\tbreak;\n\t\t}\n\t\tif (callback) return {\n\t\t\t...ctx,\n\t\t\t...await callback(ctx)\n\t\t};\n\t\treturn ctx;\n\t};\n\telse return async (ctx) => {\n\t\tfor (const callback of callbacks) if (callback) ctx = {\n\t\t\t...ctx,\n\t\t\t...await callback(ctx)\n\t\t};\n\t\treturn ctx;\n\t};\n}\nfunction createFetch(config = {}) {\n\tconst _combination = config.combination || \"chain\";\n\tconst _options = config.options || {};\n\tconst _fetchOptions = config.fetchOptions || {};\n\tfunction useFactoryFetch(url, ...args) {\n\t\tconst computedUrl = computed(() => {\n\t\t\tconst baseUrl = toValue(config.baseUrl);\n\t\t\tconst targetUrl = toValue(url);\n\t\t\treturn baseUrl && !isAbsoluteURL(targetUrl) ? joinPaths(baseUrl, targetUrl) : targetUrl;\n\t\t});\n\t\tlet options = _options;\n\t\tlet fetchOptions = _fetchOptions;\n\t\tif (args.length > 0) if (isFetchOptions(args[0])) options = {\n\t\t\t...options,\n\t\t\t...args[0],\n\t\t\tbeforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[0].beforeFetch),\n\t\t\tafterFetch: combineCallbacks(_combination, _options.afterFetch, args[0].afterFetch),\n\t\t\tonFetchError: combineCallbacks(_combination, _options.onFetchError, args[0].onFetchError)\n\t\t};\n\t\telse fetchOptions = {\n\t\t\t...fetchOptions,\n\t\t\t...args[0],\n\t\t\theaders: {\n\t\t\t\t...headersToObject(fetchOptions.headers) || {},\n\t\t\t\t...headersToObject(args[0].headers) || {}\n\t\t\t}\n\t\t};\n\t\tif (args.length > 1 && isFetchOptions(args[1])) options = {\n\t\t\t...options,\n\t\t\t...args[1],\n\t\t\tbeforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[1].beforeFetch),\n\t\t\tafterFetch: combineCallbacks(_combination, _options.afterFetch, args[1].afterFetch),\n\t\t\tonFetchError: combineCallbacks(_combination, _options.onFetchError, args[1].onFetchError)\n\t\t};\n\t\treturn useFetch(computedUrl, fetchOptions, options);\n\t}\n\treturn useFactoryFetch;\n}\nfunction useFetch(url, ...args) {\n\tvar _defaultWindow$fetch, _globalThis;\n\tconst supportsAbort = typeof AbortController === \"function\";\n\tlet fetchOptions = {};\n\tlet options = {\n\t\timmediate: true,\n\t\trefetch: false,\n\t\ttimeout: 0,\n\t\tupdateDataOnError: false\n\t};\n\tconst config = {\n\t\tmethod: \"GET\",\n\t\ttype: \"text\",\n\t\tpayload: void 0\n\t};\n\tif (args.length > 0) if (isFetchOptions(args[0])) options = {\n\t\t...options,\n\t\t...args[0]\n\t};\n\telse fetchOptions = args[0];\n\tif (args.length > 1) {\n\t\tif (isFetchOptions(args[1])) options = {\n\t\t\t...options,\n\t\t\t...args[1]\n\t\t};\n\t}\n\tconst { fetch = (_defaultWindow$fetch = defaultWindow === null || defaultWindow === void 0 ? void 0 : defaultWindow.fetch) !== null && _defaultWindow$fetch !== void 0 ? _defaultWindow$fetch : (_globalThis = globalThis) === null || _globalThis === void 0 ? void 0 : _globalThis.fetch, initialData, timeout } = options;\n\tconst responseEvent = createEventHook();\n\tconst errorEvent = createEventHook();\n\tconst finallyEvent = createEventHook();\n\tconst isFinished = shallowRef(false);\n\tconst isFetching = shallowRef(false);\n\tconst aborted = shallowRef(false);\n\tconst statusCode = shallowRef(null);\n\tconst response = shallowRef(null);\n\tconst error = shallowRef(null);\n\tconst data = shallowRef(initialData || null);\n\tconst canAbort = computed(() => supportsAbort && isFetching.value);\n\tlet controller;\n\tlet timer;\n\tconst abort = (reason) => {\n\t\tif (supportsAbort) {\n\t\t\tcontroller === null || controller === void 0 || controller.abort(reason);\n\t\t\tcontroller = new AbortController();\n\t\t\tcontroller.signal.onabort = () => aborted.value = true;\n\t\t\tfetchOptions = {\n\t\t\t\t...fetchOptions,\n\t\t\t\tsignal: controller.signal\n\t\t\t};\n\t\t}\n\t};\n\tconst loading = (isLoading) => {\n\t\tisFetching.value = isLoading;\n\t\tisFinished.value = !isLoading;\n\t};\n\tif (timeout) timer = useTimeoutFn(abort, timeout, { immediate: false });\n\tlet executeCounter = 0;\n\tconst execute = async (throwOnFailed = false) => {\n\t\tvar _context$options;\n\t\tabort();\n\t\tloading(true);\n\t\terror.value = null;\n\t\tstatusCode.value = null;\n\t\taborted.value = false;\n\t\texecuteCounter += 1;\n\t\tconst currentExecuteCounter = executeCounter;\n\t\tconst defaultFetchOptions = {\n\t\t\tmethod: config.method,\n\t\t\theaders: {}\n\t\t};\n\t\tconst payload = toValue(config.payload);\n\t\tif (payload) {\n\t\t\tvar _payloadMapping$confi;\n\t\t\tconst headers = headersToObject(defaultFetchOptions.headers);\n\t\t\tconst proto = Object.getPrototypeOf(payload);\n\t\t\tif (!config.payloadType && payload && (proto === Object.prototype || Array.isArray(proto)) && !(payload instanceof FormData)) config.payloadType = \"json\";\n\t\t\tif (config.payloadType) headers[\"Content-Type\"] = (_payloadMapping$confi = payloadMapping[config.payloadType]) !== null && _payloadMapping$confi !== void 0 ? _payloadMapping$confi : config.payloadType;\n\t\t\tdefaultFetchOptions.body = config.payloadType === \"json\" ? JSON.stringify(payload) : payload;\n\t\t}\n\t\tlet isCanceled = false;\n\t\tconst context = {\n\t\t\turl: toValue(url),\n\t\t\toptions: {\n\t\t\t\t...defaultFetchOptions,\n\t\t\t\t...fetchOptions\n\t\t\t},\n\t\t\tcancel: () => {\n\t\t\t\tisCanceled = true;\n\t\t\t}\n\t\t};\n\t\tif (options.beforeFetch) Object.assign(context, await options.beforeFetch(context));\n\t\tif (isCanceled || !fetch) {\n\t\t\tloading(false);\n\t\t\treturn Promise.resolve(null);\n\t\t}\n\t\tlet responseData = null;\n\t\tif (timer) timer.start();\n\t\treturn fetch(context.url, {\n\t\t\t...defaultFetchOptions,\n\t\t\t...context.options,\n\t\t\theaders: {\n\t\t\t\t...headersToObject(defaultFetchOptions.headers),\n\t\t\t\t...headersToObject((_context$options = context.options) === null || _context$options === void 0 ? void 0 : _context$options.headers)\n\t\t\t}\n\t\t}).then(async (fetchResponse) => {\n\t\t\tresponse.value = fetchResponse;\n\t\t\tstatusCode.value = fetchResponse.status;\n\t\t\tresponseData = await fetchResponse.clone()[config.type]();\n\t\t\tif (!fetchResponse.ok) {\n\t\t\t\tdata.value = initialData || null;\n\t\t\t\tthrow new Error(fetchResponse.statusText);\n\t\t\t}\n\t\t\tif (options.afterFetch) ({data: responseData} = await options.afterFetch({\n\t\t\t\tdata: responseData,\n\t\t\t\tresponse: fetchResponse,\n\t\t\t\tcontext,\n\t\t\t\texecute\n\t\t\t}));\n\t\t\tdata.value = responseData;\n\t\t\tresponseEvent.trigger(fetchResponse);\n\t\t\treturn fetchResponse;\n\t\t}).catch(async (fetchError) => {\n\t\t\tlet errorData = fetchError.message || fetchError.name;\n\t\t\tif (options.onFetchError) ({error: errorData, data: responseData} = await options.onFetchError({\n\t\t\t\tdata: responseData,\n\t\t\t\terror: fetchError,\n\t\t\t\tresponse: response.value,\n\t\t\t\tcontext,\n\t\t\t\texecute\n\t\t\t}));\n\t\t\terror.value = errorData;\n\t\t\tif (options.updateDataOnError) data.value = responseData;\n\t\t\terrorEvent.trigger(fetchError);\n\t\t\tif (throwOnFailed) throw fetchError;\n\t\t\treturn null;\n\t\t}).finally(() => {\n\t\t\tif (currentExecuteCounter === executeCounter) loading(false);\n\t\t\tif (timer) timer.stop();\n\t\t\tfinallyEvent.trigger(null);\n\t\t});\n\t};\n\tconst refetch = toRef(options.refetch);\n\twatch([refetch, toRef(url)], ([refetch$1]) => refetch$1 && execute(), { deep: true });\n\tconst shell = {\n\t\tisFinished: readonly(isFinished),\n\t\tisFetching: readonly(isFetching),\n\t\tstatusCode,\n\t\tresponse,\n\t\terror,\n\t\tdata,\n\t\tcanAbort,\n\t\taborted,\n\t\tabort,\n\t\texecute,\n\t\tonFetchResponse: responseEvent.on,\n\t\tonFetchError: errorEvent.on,\n\t\tonFetchFinally: finallyEvent.on,\n\t\tget: setMethod(\"GET\"),\n\t\tput: setMethod(\"PUT\"),\n\t\tpost: setMethod(\"POST\"),\n\t\tdelete: setMethod(\"DELETE\"),\n\t\tpatch: setMethod(\"PATCH\"),\n\t\thead: setMethod(\"HEAD\"),\n\t\toptions: setMethod(\"OPTIONS\"),\n\t\tjson: setType(\"json\"),\n\t\ttext: setType(\"text\"),\n\t\tblob: setType(\"blob\"),\n\t\tarrayBuffer: setType(\"arrayBuffer\"),\n\t\tformData: setType(\"formData\")\n\t};\n\tfunction setMethod(method) {\n\t\treturn (payload, payloadType) => {\n\t\t\tif (!isFetching.value) {\n\t\t\t\tconfig.method = method;\n\t\t\t\tconfig.payload = payload;\n\t\t\t\tconfig.payloadType = payloadType;\n\t\t\t\tif (isRef(config.payload)) watch([refetch, toRef(config.payload)], ([refetch$1]) => refetch$1 && execute(), { deep: true });\n\t\t\t\treturn {\n\t\t\t\t\t...shell,\n\t\t\t\t\tthen(onFulfilled, onRejected) {\n\t\t\t\t\t\treturn waitUntilFinished().then(onFulfilled, onRejected);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\t}\n\tfunction waitUntilFinished() {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tuntil(isFinished).toBe(true).then(() => resolve(shell)).catch(reject);\n\t\t});\n\t}\n\tfunction setType(type) {\n\t\treturn () => {\n\t\t\tif (!isFetching.value) {\n\t\t\t\tconfig.type = type;\n\t\t\t\treturn {\n\t\t\t\t\t...shell,\n\t\t\t\t\tthen(onFulfilled, onRejected) {\n\t\t\t\t\t\treturn waitUntilFinished().then(onFulfilled, onRejected);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\t}\n\tif (options.immediate) Promise.resolve().then(() => execute());\n\treturn {\n\t\t...shell,\n\t\tthen(onFulfilled, onRejected) {\n\t\t\treturn waitUntilFinished().then(onFulfilled, onRejected);\n\t\t}\n\t};\n}\nfunction joinPaths(start, end) {\n\tif (!start.endsWith(\"/\") && !end.startsWith(\"/\")) return `${start}/${end}`;\n\tif (start.endsWith(\"/\") && end.startsWith(\"/\")) return `${start.slice(0, -1)}${end}`;\n\treturn `${start}${end}`;\n}\n\n//#endregion\n//#region useFileDialog/index.ts\nconst DEFAULT_OPTIONS = {\n\tmultiple: true,\n\taccept: \"*\",\n\treset: false,\n\tdirectory: false\n};\nfunction prepareInitialFiles(files) {\n\tif (!files) return null;\n\tif (files instanceof FileList) return files;\n\tconst dt = new DataTransfer();\n\tfor (const file of files) dt.items.add(file);\n\treturn dt.files;\n}\n/**\n* Open file dialog with ease.\n*\n* @see https://vueuse.org/useFileDialog\n* @param options\n*/\nfunction useFileDialog(options = {}) {\n\tconst { document: document$1 = defaultDocument } = options;\n\tconst files = ref(prepareInitialFiles(options.initialFiles));\n\tconst { on: onChange, trigger: changeTrigger } = createEventHook();\n\tconst { on: onCancel, trigger: cancelTrigger } = createEventHook();\n\tconst inputRef = computed(() => {\n\t\tvar _unrefElement;\n\t\tconst input = (_unrefElement = unrefElement(options.input)) !== null && _unrefElement !== void 0 ? _unrefElement : document$1 ? document$1.createElement(\"input\") : void 0;\n\t\tif (input) {\n\t\t\tinput.type = \"file\";\n\t\t\tinput.onchange = (event) => {\n\t\t\t\tfiles.value = event.target.files;\n\t\t\t\tchangeTrigger(files.value);\n\t\t\t};\n\t\t\tinput.oncancel = () => {\n\t\t\t\tcancelTrigger();\n\t\t\t};\n\t\t}\n\t\treturn input;\n\t});\n\tconst reset = () => {\n\t\tfiles.value = null;\n\t\tif (inputRef.value && inputRef.value.value) {\n\t\t\tinputRef.value.value = \"\";\n\t\t\tchangeTrigger(null);\n\t\t}\n\t};\n\tconst applyOptions = (options$1) => {\n\t\tconst el = inputRef.value;\n\t\tif (!el) return;\n\t\tel.multiple = toValue(options$1.multiple);\n\t\tel.accept = toValue(options$1.accept);\n\t\tel.webkitdirectory = toValue(options$1.directory);\n\t\tif (hasOwn(options$1, \"capture\")) el.capture = toValue(options$1.capture);\n\t};\n\tconst open = (localOptions) => {\n\t\tconst el = inputRef.value;\n\t\tif (!el) return;\n\t\tconst mergedOptions = {\n\t\t\t...DEFAULT_OPTIONS,\n\t\t\t...options,\n\t\t\t...localOptions\n\t\t};\n\t\tapplyOptions(mergedOptions);\n\t\tif (toValue(mergedOptions.reset)) reset();\n\t\tel.click();\n\t};\n\twatchEffect(() => {\n\t\tapplyOptions(options);\n\t});\n\treturn {\n\t\tfiles: readonly(files),\n\t\topen,\n\t\treset,\n\t\tonCancel,\n\t\tonChange\n\t};\n}\n\n//#endregion\n//#region useFileSystemAccess/index.ts\nfunction useFileSystemAccess(options = {}) {\n\tconst { window: _window = defaultWindow, dataType = \"Text\" } = options;\n\tconst window$1 = _window;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => window$1 && \"showSaveFilePicker\" in window$1 && \"showOpenFilePicker\" in window$1);\n\tconst fileHandle = shallowRef();\n\tconst data = shallowRef();\n\tconst file = shallowRef();\n\tconst fileName = computed(() => {\n\t\tvar _file$value$name, _file$value;\n\t\treturn (_file$value$name = (_file$value = file.value) === null || _file$value === void 0 ? void 0 : _file$value.name) !== null && _file$value$name !== void 0 ? _file$value$name : \"\";\n\t});\n\tconst fileMIME = computed(() => {\n\t\tvar _file$value$type, _file$value2;\n\t\treturn (_file$value$type = (_file$value2 = file.value) === null || _file$value2 === void 0 ? void 0 : _file$value2.type) !== null && _file$value$type !== void 0 ? _file$value$type : \"\";\n\t});\n\tconst fileSize = computed(() => {\n\t\tvar _file$value$size, _file$value3;\n\t\treturn (_file$value$size = (_file$value3 = file.value) === null || _file$value3 === void 0 ? void 0 : _file$value3.size) !== null && _file$value$size !== void 0 ? _file$value$size : 0;\n\t});\n\tconst fileLastModified = computed(() => {\n\t\tvar _file$value$lastModif, _file$value4;\n\t\treturn (_file$value$lastModif = (_file$value4 = file.value) === null || _file$value4 === void 0 ? void 0 : _file$value4.lastModified) !== null && _file$value$lastModif !== void 0 ? _file$value$lastModif : 0;\n\t});\n\tasync function open(_options = {}) {\n\t\tif (!isSupported.value) return;\n\t\tconst [handle] = await window$1.showOpenFilePicker({\n\t\t\t...toValue(options),\n\t\t\t..._options\n\t\t});\n\t\tfileHandle.value = handle;\n\t\tawait updateData();\n\t}\n\tasync function create(_options = {}) {\n\t\tif (!isSupported.value) return;\n\t\tfileHandle.value = await window$1.showSaveFilePicker({\n\t\t\t...options,\n\t\t\t..._options\n\t\t});\n\t\tdata.value = void 0;\n\t\tawait updateData();\n\t}\n\tasync function save(_options = {}) {\n\t\tif (!isSupported.value) return;\n\t\tif (!fileHandle.value) return saveAs(_options);\n\t\tif (data.value) {\n\t\t\tconst writableStream = await fileHandle.value.createWritable();\n\t\t\tawait writableStream.write(data.value);\n\t\t\tawait writableStream.close();\n\t\t}\n\t\tawait updateFile();\n\t}\n\tasync function saveAs(_options = {}) {\n\t\tif (!isSupported.value) return;\n\t\tfileHandle.value = await window$1.showSaveFilePicker({\n\t\t\t...options,\n\t\t\t..._options\n\t\t});\n\t\tif (data.value) {\n\t\t\tconst writableStream = await fileHandle.value.createWritable();\n\t\t\tawait writableStream.write(data.value);\n\t\t\tawait writableStream.close();\n\t\t}\n\t\tawait updateFile();\n\t}\n\tasync function updateFile() {\n\t\tvar _fileHandle$value;\n\t\tfile.value = await ((_fileHandle$value = fileHandle.value) === null || _fileHandle$value === void 0 ? void 0 : _fileHandle$value.getFile());\n\t}\n\tasync function updateData() {\n\t\tvar _file$value5, _file$value6;\n\t\tawait updateFile();\n\t\tconst type = toValue(dataType);\n\t\tif (type === \"Text\") data.value = await ((_file$value5 = file.value) === null || _file$value5 === void 0 ? void 0 : _file$value5.text());\n\t\telse if (type === \"ArrayBuffer\") data.value = await ((_file$value6 = file.value) === null || _file$value6 === void 0 ? void 0 : _file$value6.arrayBuffer());\n\t\telse if (type === \"Blob\") data.value = file.value;\n\t}\n\twatch(() => toValue(dataType), updateData);\n\treturn {\n\t\tisSupported,\n\t\tdata,\n\t\tfile,\n\t\tfileName,\n\t\tfileMIME,\n\t\tfileSize,\n\t\tfileLastModified,\n\t\topen,\n\t\tcreate,\n\t\tsave,\n\t\tsaveAs,\n\t\tupdateData\n\t};\n}\n\n//#endregion\n//#region useFocus/index.ts\n/**\n* Track or set the focus state of a DOM element.\n*\n* @see https://vueuse.org/useFocus\n* @param target The target element for the focus and blur events.\n* @param options\n*/\nfunction useFocus(target, options = {}) {\n\tconst { initialValue = false, focusVisible = false, preventScroll = false } = options;\n\tconst innerFocused = shallowRef(false);\n\tconst targetElement = computed(() => unrefElement(target));\n\tconst listenerOptions = { passive: true };\n\tuseEventListener(targetElement, \"focus\", (event) => {\n\t\tvar _matches, _ref;\n\t\tif (!focusVisible || ((_matches = (_ref = event.target).matches) === null || _matches === void 0 ? void 0 : _matches.call(_ref, \":focus-visible\"))) innerFocused.value = true;\n\t}, listenerOptions);\n\tuseEventListener(targetElement, \"blur\", () => innerFocused.value = false, listenerOptions);\n\tconst focused = computed({\n\t\tget: () => innerFocused.value,\n\t\tset(value) {\n\t\t\tvar _targetElement$value, _targetElement$value2;\n\t\t\tif (!value && innerFocused.value) (_targetElement$value = targetElement.value) === null || _targetElement$value === void 0 || _targetElement$value.blur();\n\t\t\telse if (value && !innerFocused.value) (_targetElement$value2 = targetElement.value) === null || _targetElement$value2 === void 0 || _targetElement$value2.focus({ preventScroll });\n\t\t}\n\t});\n\twatch(targetElement, () => {\n\t\tfocused.value = initialValue;\n\t}, {\n\t\timmediate: true,\n\t\tflush: \"post\"\n\t});\n\treturn { focused };\n}\n\n//#endregion\n//#region useFocusWithin/index.ts\nconst EVENT_FOCUS_IN = \"focusin\";\nconst EVENT_FOCUS_OUT = \"focusout\";\nconst PSEUDO_CLASS_FOCUS_WITHIN = \":focus-within\";\n/**\n* Track if focus is contained within the target element\n*\n* @see https://vueuse.org/useFocusWithin\n* @param target The target element to track\n* @param options Focus within options\n*/\nfunction useFocusWithin(target, options = {}) {\n\tconst { window: window$1 = defaultWindow } = options;\n\tconst targetElement = computed(() => unrefElement(target));\n\tconst _focused = shallowRef(false);\n\tconst focused = computed(() => _focused.value);\n\tconst activeElement = useActiveElement(options);\n\tif (!window$1 || !activeElement.value) return { focused };\n\tconst listenerOptions = { passive: true };\n\tuseEventListener(targetElement, EVENT_FOCUS_IN, () => _focused.value = true, listenerOptions);\n\tuseEventListener(targetElement, EVENT_FOCUS_OUT, () => {\n\t\tvar _targetElement$value$, _targetElement$value, _targetElement$value$2;\n\t\treturn _focused.value = (_targetElement$value$ = (_targetElement$value = targetElement.value) === null || _targetElement$value === void 0 || (_targetElement$value$2 = _targetElement$value.matches) === null || _targetElement$value$2 === void 0 ? void 0 : _targetElement$value$2.call(_targetElement$value, PSEUDO_CLASS_FOCUS_WITHIN)) !== null && _targetElement$value$ !== void 0 ? _targetElement$value$ : false;\n\t}, listenerOptions);\n\treturn { focused };\n}\n\n//#endregion\n//#region useFps/index.ts\n/* @__NO_SIDE_EFFECTS__ */\nfunction useFps(options) {\n\tvar _options$every;\n\tconst fps = shallowRef(0);\n\tif (typeof performance === \"undefined\") return fps;\n\tconst every = (_options$every = options === null || options === void 0 ? void 0 : options.every) !== null && _options$every !== void 0 ? _options$every : 10;\n\tlet last = performance.now();\n\tlet ticks = 0;\n\tuseRafFn(() => {\n\t\tticks += 1;\n\t\tif (ticks >= every) {\n\t\t\tconst now = performance.now();\n\t\t\tconst diff = now - last;\n\t\t\tfps.value = Math.round(1e3 / (diff / ticks));\n\t\t\tlast = now;\n\t\t\tticks = 0;\n\t\t}\n\t});\n\treturn fps;\n}\n\n//#endregion\n//#region useFullscreen/index.ts\nconst eventHandlers = [\n\t\"fullscreenchange\",\n\t\"webkitfullscreenchange\",\n\t\"webkitendfullscreen\",\n\t\"mozfullscreenchange\",\n\t\"MSFullscreenChange\"\n];\n/**\n* Reactive Fullscreen API.\n*\n* @see https://vueuse.org/useFullscreen\n* @param target\n* @param options\n*/\nfunction useFullscreen(target, options = {}) {\n\tconst { document: document$1 = defaultDocument, autoExit = false } = options;\n\tconst targetRef = computed(() => {\n\t\tvar _unrefElement;\n\t\treturn (_unrefElement = unrefElement(target)) !== null && _unrefElement !== void 0 ? _unrefElement : document$1 === null || document$1 === void 0 ? void 0 : document$1.documentElement;\n\t});\n\tconst isFullscreen = shallowRef(false);\n\tconst requestMethod = computed(() => {\n\t\treturn [\n\t\t\t\"requestFullscreen\",\n\t\t\t\"webkitRequestFullscreen\",\n\t\t\t\"webkitEnterFullscreen\",\n\t\t\t\"webkitEnterFullScreen\",\n\t\t\t\"webkitRequestFullScreen\",\n\t\t\t\"mozRequestFullScreen\",\n\t\t\t\"msRequestFullscreen\"\n\t\t].find((m) => document$1 && m in document$1 || targetRef.value && m in targetRef.value);\n\t});\n\tconst exitMethod = computed(() => {\n\t\treturn [\n\t\t\t\"exitFullscreen\",\n\t\t\t\"webkitExitFullscreen\",\n\t\t\t\"webkitExitFullScreen\",\n\t\t\t\"webkitCancelFullScreen\",\n\t\t\t\"mozCancelFullScreen\",\n\t\t\t\"msExitFullscreen\"\n\t\t].find((m) => document$1 && m in document$1 || targetRef.value && m in targetRef.value);\n\t});\n\tconst fullscreenEnabled = computed(() => {\n\t\treturn [\n\t\t\t\"fullScreen\",\n\t\t\t\"webkitIsFullScreen\",\n\t\t\t\"webkitDisplayingFullscreen\",\n\t\t\t\"mozFullScreen\",\n\t\t\t\"msFullscreenElement\"\n\t\t].find((m) => document$1 && m in document$1 || targetRef.value && m in targetRef.value);\n\t});\n\tconst fullscreenElementMethod = [\n\t\t\"fullscreenElement\",\n\t\t\"webkitFullscreenElement\",\n\t\t\"mozFullScreenElement\",\n\t\t\"msFullscreenElement\"\n\t].find((m) => document$1 && m in document$1);\n\tconst isSupported = /* @__PURE__ */ useSupported(() => targetRef.value && document$1 && requestMethod.value !== void 0 && exitMethod.value !== void 0 && fullscreenEnabled.value !== void 0);\n\tconst isCurrentElementFullScreen = () => {\n\t\tif (fullscreenElementMethod) return (document$1 === null || document$1 === void 0 ? void 0 : document$1[fullscreenElementMethod]) === targetRef.value;\n\t\treturn false;\n\t};\n\tconst isElementFullScreen = () => {\n\t\tif (fullscreenEnabled.value) if (document$1 && document$1[fullscreenEnabled.value] != null) return document$1[fullscreenEnabled.value];\n\t\telse {\n\t\t\tconst target$1 = targetRef.value;\n\t\t\tif ((target$1 === null || target$1 === void 0 ? void 0 : target$1[fullscreenEnabled.value]) != null) return Boolean(target$1[fullscreenEnabled.value]);\n\t\t}\n\t\treturn false;\n\t};\n\tasync function exit() {\n\t\tif (!isSupported.value || !isFullscreen.value) return;\n\t\tif (exitMethod.value) if ((document$1 === null || document$1 === void 0 ? void 0 : document$1[exitMethod.value]) != null) await document$1[exitMethod.value]();\n\t\telse {\n\t\t\tconst target$1 = targetRef.value;\n\t\t\tif ((target$1 === null || target$1 === void 0 ? void 0 : target$1[exitMethod.value]) != null) await target$1[exitMethod.value]();\n\t\t}\n\t\tisFullscreen.value = false;\n\t}\n\tasync function enter() {\n\t\tif (!isSupported.value || isFullscreen.value) return;\n\t\tif (isElementFullScreen()) await exit();\n\t\tconst target$1 = targetRef.value;\n\t\tif (requestMethod.value && (target$1 === null || target$1 === void 0 ? void 0 : target$1[requestMethod.value]) != null) {\n\t\t\tawait target$1[requestMethod.value]();\n\t\t\tisFullscreen.value = true;\n\t\t}\n\t}\n\tasync function toggle() {\n\t\tawait (isFullscreen.value ? exit() : enter());\n\t}\n\tconst handlerCallback = () => {\n\t\tconst isElementFullScreenValue = isElementFullScreen();\n\t\tif (!isElementFullScreenValue || isElementFullScreenValue && isCurrentElementFullScreen()) isFullscreen.value = isElementFullScreenValue;\n\t};\n\tconst listenerOptions = {\n\t\tcapture: false,\n\t\tpassive: true\n\t};\n\tuseEventListener(document$1, eventHandlers, handlerCallback, listenerOptions);\n\tuseEventListener(() => unrefElement(targetRef), eventHandlers, handlerCallback, listenerOptions);\n\ttryOnMounted(handlerCallback, false);\n\tif (autoExit) tryOnScopeDispose(exit);\n\treturn {\n\t\tisSupported,\n\t\tisFullscreen,\n\t\tenter,\n\t\texit,\n\t\ttoggle\n\t};\n}\n\n//#endregion\n//#region useGamepad/index.ts\n/**\n* Maps a standard standard gamepad to an Xbox 360 Controller.\n*/\nfunction mapGamepadToXbox360Controller(gamepad) {\n\treturn computed(() => {\n\t\tif (gamepad.value) return {\n\t\t\tbuttons: {\n\t\t\t\ta: gamepad.value.buttons[0],\n\t\t\t\tb: gamepad.value.buttons[1],\n\t\t\t\tx: gamepad.value.buttons[2],\n\t\t\t\ty: gamepad.value.buttons[3]\n\t\t\t},\n\t\t\tbumper: {\n\t\t\t\tleft: gamepad.value.buttons[4],\n\t\t\t\tright: gamepad.value.buttons[5]\n\t\t\t},\n\t\t\ttriggers: {\n\t\t\t\tleft: gamepad.value.buttons[6],\n\t\t\t\tright: gamepad.value.buttons[7]\n\t\t\t},\n\t\t\tstick: {\n\t\t\t\tleft: {\n\t\t\t\t\thorizontal: gamepad.value.axes[0],\n\t\t\t\t\tvertical: gamepad.value.axes[1],\n\t\t\t\t\tbutton: gamepad.value.buttons[10]\n\t\t\t\t},\n\t\t\t\tright: {\n\t\t\t\t\thorizontal: gamepad.value.axes[2],\n\t\t\t\t\tvertical: gamepad.value.axes[3],\n\t\t\t\t\tbutton: gamepad.value.buttons[11]\n\t\t\t\t}\n\t\t\t},\n\t\t\tdpad: {\n\t\t\t\tup: gamepad.value.buttons[12],\n\t\t\t\tdown: gamepad.value.buttons[13],\n\t\t\t\tleft: gamepad.value.buttons[14],\n\t\t\t\tright: gamepad.value.buttons[15]\n\t\t\t},\n\t\t\tback: gamepad.value.buttons[8],\n\t\t\tstart: gamepad.value.buttons[9]\n\t\t};\n\t\treturn null;\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction useGamepad(options = {}) {\n\tconst { navigator: navigator$1 = defaultNavigator } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => navigator$1 && \"getGamepads\" in navigator$1);\n\tconst gamepads = ref([]);\n\tconst onConnectedHook = createEventHook();\n\tconst onDisconnectedHook = createEventHook();\n\tconst stateFromGamepad = (gamepad) => {\n\t\tconst hapticActuators = [];\n\t\tconst vibrationActuator = \"vibrationActuator\" in gamepad ? gamepad.vibrationActuator : null;\n\t\tif (vibrationActuator) hapticActuators.push(vibrationActuator);\n\t\tif (gamepad.hapticActuators) hapticActuators.push(...gamepad.hapticActuators);\n\t\treturn {\n\t\t\tid: gamepad.id,\n\t\t\tindex: gamepad.index,\n\t\t\tconnected: gamepad.connected,\n\t\t\tmapping: gamepad.mapping,\n\t\t\ttimestamp: gamepad.timestamp,\n\t\t\tvibrationActuator: gamepad.vibrationActuator,\n\t\t\thapticActuators,\n\t\t\taxes: gamepad.axes.map((axes) => axes),\n\t\t\tbuttons: gamepad.buttons.map((button) => ({\n\t\t\t\tpressed: button.pressed,\n\t\t\t\ttouched: button.touched,\n\t\t\t\tvalue: button.value\n\t\t\t}))\n\t\t};\n\t};\n\tconst updateGamepadState = () => {\n\t\tconst _gamepads = (navigator$1 === null || navigator$1 === void 0 ? void 0 : navigator$1.getGamepads()) || [];\n\t\tfor (const gamepad of _gamepads) if (gamepad && gamepads.value[gamepad.index]) gamepads.value[gamepad.index] = stateFromGamepad(gamepad);\n\t};\n\tconst { isActive, pause, resume } = useRafFn(updateGamepadState);\n\tconst onGamepadConnected = (gamepad) => {\n\t\tif (!gamepads.value.some(({ index }) => index === gamepad.index)) {\n\t\t\tgamepads.value.push(stateFromGamepad(gamepad));\n\t\t\tonConnectedHook.trigger(gamepad.index);\n\t\t}\n\t\tresume();\n\t};\n\tconst onGamepadDisconnected = (gamepad) => {\n\t\tgamepads.value = gamepads.value.filter((x) => x.index !== gamepad.index);\n\t\tonDisconnectedHook.trigger(gamepad.index);\n\t};\n\tconst listenerOptions = { passive: true };\n\tuseEventListener(\"gamepadconnected\", (e) => onGamepadConnected(e.gamepad), listenerOptions);\n\tuseEventListener(\"gamepaddisconnected\", (e) => onGamepadDisconnected(e.gamepad), listenerOptions);\n\ttryOnMounted(() => {\n\t\tconst _gamepads = (navigator$1 === null || navigator$1 === void 0 ? void 0 : navigator$1.getGamepads()) || [];\n\t\tfor (const gamepad of _gamepads) if (gamepad && gamepads.value[gamepad.index]) onGamepadConnected(gamepad);\n\t});\n\tpause();\n\treturn {\n\t\tisSupported,\n\t\tonConnected: onConnectedHook.on,\n\t\tonDisconnected: onDisconnectedHook.on,\n\t\tgamepads,\n\t\tpause,\n\t\tresume,\n\t\tisActive\n\t};\n}\n\n//#endregion\n//#region useGeolocation/index.ts\n/**\n* Reactive Geolocation API.\n*\n* @see https://vueuse.org/useGeolocation\n* @param options\n*/\nfunction useGeolocation(options = {}) {\n\tconst { enableHighAccuracy = true, maximumAge = 3e4, timeout = 27e3, navigator: navigator$1 = defaultNavigator, immediate = true } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => navigator$1 && \"geolocation\" in navigator$1);\n\tconst locatedAt = shallowRef(null);\n\tconst error = shallowRef(null);\n\tconst coords = ref({\n\t\taccuracy: 0,\n\t\tlatitude: Number.POSITIVE_INFINITY,\n\t\tlongitude: Number.POSITIVE_INFINITY,\n\t\taltitude: null,\n\t\taltitudeAccuracy: null,\n\t\theading: null,\n\t\tspeed: null\n\t});\n\tfunction updatePosition(position) {\n\t\tlocatedAt.value = position.timestamp;\n\t\tcoords.value = position.coords;\n\t\terror.value = null;\n\t}\n\tlet watcher;\n\tfunction resume() {\n\t\tif (isSupported.value) watcher = navigator$1.geolocation.watchPosition(updatePosition, (err) => error.value = err, {\n\t\t\tenableHighAccuracy,\n\t\t\tmaximumAge,\n\t\t\ttimeout\n\t\t});\n\t}\n\tif (immediate) resume();\n\tfunction pause() {\n\t\tif (watcher && navigator$1) navigator$1.geolocation.clearWatch(watcher);\n\t}\n\ttryOnScopeDispose(() => {\n\t\tpause();\n\t});\n\treturn {\n\t\tisSupported,\n\t\tcoords,\n\t\tlocatedAt,\n\t\terror,\n\t\tresume,\n\t\tpause\n\t};\n}\n\n//#endregion\n//#region useIdle/index.ts\nconst defaultEvents$1 = [\n\t\"mousemove\",\n\t\"mousedown\",\n\t\"resize\",\n\t\"keydown\",\n\t\"touchstart\",\n\t\"wheel\"\n];\nconst oneMinute = 6e4;\n/**\n* Tracks whether the user is being inactive.\n*\n* @see https://vueuse.org/useIdle\n* @param timeout default to 1 minute\n* @param options IdleOptions\n*/\nfunction useIdle(timeout = oneMinute, options = {}) {\n\tconst { initialState = false, listenForVisibilityChange = true, events: events$1 = defaultEvents$1, window: window$1 = defaultWindow, eventFilter = throttleFilter(50) } = options;\n\tconst idle = shallowRef(initialState);\n\tconst lastActive = shallowRef(timestamp());\n\tconst isPending = shallowRef(false);\n\tlet timer;\n\tconst reset = () => {\n\t\tidle.value = false;\n\t\tclearTimeout(timer);\n\t\ttimer = setTimeout(() => idle.value = true, timeout);\n\t};\n\tconst onEvent = createFilterWrapper(eventFilter, () => {\n\t\tlastActive.value = timestamp();\n\t\treset();\n\t});\n\tif (window$1) {\n\t\tconst document$1 = window$1.document;\n\t\tconst listenerOptions = { passive: true };\n\t\tfor (const event of events$1) useEventListener(window$1, event, () => {\n\t\t\tif (!isPending.value) return;\n\t\t\tonEvent();\n\t\t}, listenerOptions);\n\t\tif (listenForVisibilityChange) useEventListener(document$1, \"visibilitychange\", () => {\n\t\t\tif (document$1.hidden || !isPending.value) return;\n\t\t\tonEvent();\n\t\t}, listenerOptions);\n\t\tstart();\n\t}\n\tfunction start() {\n\t\tif (isPending.value) return;\n\t\tisPending.value = true;\n\t\tif (!initialState) reset();\n\t}\n\tfunction stop() {\n\t\tidle.value = initialState;\n\t\tclearTimeout(timer);\n\t\tisPending.value = false;\n\t}\n\treturn {\n\t\tidle,\n\t\tlastActive,\n\t\treset,\n\t\tstop,\n\t\tstart,\n\t\tisPending: shallowReadonly(isPending)\n\t};\n}\n\n//#endregion\n//#region useImage/index.ts\nasync function loadImage(options) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst img = new Image();\n\t\tconst { src, srcset, sizes, class: clazz, loading, crossorigin, referrerPolicy, width, height, decoding, fetchPriority, ismap, usemap } = options;\n\t\timg.src = src;\n\t\tif (srcset != null) img.srcset = srcset;\n\t\tif (sizes != null) img.sizes = sizes;\n\t\tif (clazz != null) img.className = clazz;\n\t\tif (loading != null) img.loading = loading;\n\t\tif (crossorigin != null) img.crossOrigin = crossorigin;\n\t\tif (referrerPolicy != null) img.referrerPolicy = referrerPolicy;\n\t\tif (width != null) img.width = width;\n\t\tif (height != null) img.height = height;\n\t\tif (decoding != null) img.decoding = decoding;\n\t\tif (fetchPriority != null) img.fetchPriority = fetchPriority;\n\t\tif (ismap != null) img.isMap = ismap;\n\t\tif (usemap != null) img.useMap = usemap;\n\t\timg.onload = () => resolve(img);\n\t\timg.onerror = reject;\n\t});\n}\n/**\n* Reactive load an image in the browser, you can wait the result to display it or show a fallback.\n*\n* @see https://vueuse.org/useImage\n* @param options Image attributes, as used in the <img> tag\n* @param asyncStateOptions\n*/\nfunction useImage(options, asyncStateOptions = {}) {\n\tconst state = useAsyncState(() => loadImage(toValue(options)), void 0, {\n\t\tresetOnExecute: true,\n\t\t...asyncStateOptions\n\t});\n\twatch(() => toValue(options), () => state.execute(asyncStateOptions.delay), { deep: true });\n\treturn state;\n}\n\n//#endregion\n//#region _resolve-element.ts\n/**\n* Resolves an element from a given element, window, or document.\n*\n* @internal\n*/\nfunction resolveElement(el) {\n\tif (typeof Window !== \"undefined\" && el instanceof Window) return el.document.documentElement;\n\tif (typeof Document !== \"undefined\" && el instanceof Document) return el.documentElement;\n\treturn el;\n}\n\n//#endregion\n//#region useScroll/index.ts\n/**\n* We have to check if the scroll amount is close enough to some threshold in order to\n* more accurately calculate arrivedState. This is because scrollTop/scrollLeft are non-rounded\n* numbers, while scrollHeight/scrollWidth and clientHeight/clientWidth are rounded.\n* https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollHeight#determine_if_an_element_has_been_totally_scrolled\n*/\nconst ARRIVED_STATE_THRESHOLD_PIXELS = 1;\n/**\n* Reactive scroll.\n*\n* @see https://vueuse.org/useScroll\n* @param element\n* @param options\n*/\nfunction useScroll(element, options = {}) {\n\tconst { throttle = 0, idle = 200, onStop = noop, onScroll = noop, offset = {\n\t\tleft: 0,\n\t\tright: 0,\n\t\ttop: 0,\n\t\tbottom: 0\n\t}, observe: _observe = { mutation: false }, eventListenerOptions = {\n\t\tcapture: false,\n\t\tpassive: true\n\t}, behavior = \"auto\", window: window$1 = defaultWindow, onError = (e) => {\n\t\tconsole.error(e);\n\t} } = options;\n\tconst observe = typeof _observe === \"boolean\" ? { mutation: _observe } : _observe;\n\tconst internalX = shallowRef(0);\n\tconst internalY = shallowRef(0);\n\tconst x = computed({\n\t\tget() {\n\t\t\treturn internalX.value;\n\t\t},\n\t\tset(x$1) {\n\t\t\tscrollTo(x$1, void 0);\n\t\t}\n\t});\n\tconst y = computed({\n\t\tget() {\n\t\t\treturn internalY.value;\n\t\t},\n\t\tset(y$1) {\n\t\t\tscrollTo(void 0, y$1);\n\t\t}\n\t});\n\tfunction scrollTo(_x, _y) {\n\t\tvar _ref, _toValue, _toValue2, _document;\n\t\tif (!window$1) return;\n\t\tconst _element = toValue(element);\n\t\tif (!_element) return;\n\t\t(_ref = _element instanceof Document ? window$1.document.body : _element) === null || _ref === void 0 || _ref.scrollTo({\n\t\t\ttop: (_toValue = toValue(_y)) !== null && _toValue !== void 0 ? _toValue : y.value,\n\t\t\tleft: (_toValue2 = toValue(_x)) !== null && _toValue2 !== void 0 ? _toValue2 : x.value,\n\t\t\tbehavior: toValue(behavior)\n\t\t});\n\t\tconst scrollContainer = (_element === null || _element === void 0 || (_document = _element.document) === null || _document === void 0 ? void 0 : _document.documentElement) || (_element === null || _element === void 0 ? void 0 : _element.documentElement) || _element;\n\t\tif (x != null) internalX.value = scrollContainer.scrollLeft;\n\t\tif (y != null) internalY.value = scrollContainer.scrollTop;\n\t}\n\tconst isScrolling = shallowRef(false);\n\tconst arrivedState = reactive({\n\t\tleft: true,\n\t\tright: false,\n\t\ttop: true,\n\t\tbottom: false\n\t});\n\tconst directions = reactive({\n\t\tleft: false,\n\t\tright: false,\n\t\ttop: false,\n\t\tbottom: false\n\t});\n\tconst onScrollEnd = (e) => {\n\t\tif (!isScrolling.value) return;\n\t\tisScrolling.value = false;\n\t\tdirections.left = false;\n\t\tdirections.right = false;\n\t\tdirections.top = false;\n\t\tdirections.bottom = false;\n\t\tonStop(e);\n\t};\n\tconst onScrollEndDebounced = useDebounceFn(onScrollEnd, throttle + idle);\n\tconst setArrivedState = (target) => {\n\t\tvar _document2;\n\t\tif (!window$1) return;\n\t\tconst el = (target === null || target === void 0 || (_document2 = target.document) === null || _document2 === void 0 ? void 0 : _document2.documentElement) || (target === null || target === void 0 ? void 0 : target.documentElement) || unrefElement(target);\n\t\tconst { display, flexDirection, direction } = window$1.getComputedStyle(el);\n\t\tconst directionMultipler = direction === \"rtl\" ? -1 : 1;\n\t\tconst scrollLeft = el.scrollLeft;\n\t\tdirections.left = scrollLeft < internalX.value;\n\t\tdirections.right = scrollLeft > internalX.value;\n\t\tconst left = Math.abs(scrollLeft * directionMultipler) <= (offset.left || 0);\n\t\tconst right = Math.abs(scrollLeft * directionMultipler) + el.clientWidth >= el.scrollWidth - (offset.right || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;\n\t\tif (display === \"flex\" && flexDirection === \"row-reverse\") {\n\t\t\tarrivedState.left = right;\n\t\t\tarrivedState.right = left;\n\t\t} else {\n\t\t\tarrivedState.left = left;\n\t\t\tarrivedState.right = right;\n\t\t}\n\t\tinternalX.value = scrollLeft;\n\t\tlet scrollTop = el.scrollTop;\n\t\tif (target === window$1.document && !scrollTop) scrollTop = window$1.document.body.scrollTop;\n\t\tdirections.top = scrollTop < internalY.value;\n\t\tdirections.bottom = scrollTop > internalY.value;\n\t\tconst top = Math.abs(scrollTop) <= (offset.top || 0);\n\t\tconst bottom = Math.abs(scrollTop) + el.clientHeight >= el.scrollHeight - (offset.bottom || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;\n\t\t/**\n\t\t* reverse columns and rows behave exactly the other way around,\n\t\t* bottom is treated as top and top is treated as the negative version of bottom\n\t\t*/\n\t\tif (display === \"flex\" && flexDirection === \"column-reverse\") {\n\t\t\tarrivedState.top = bottom;\n\t\t\tarrivedState.bottom = top;\n\t\t} else {\n\t\t\tarrivedState.top = top;\n\t\t\tarrivedState.bottom = bottom;\n\t\t}\n\t\tinternalY.value = scrollTop;\n\t};\n\tconst onScrollHandler = (e) => {\n\t\tvar _documentElement;\n\t\tif (!window$1) return;\n\t\tsetArrivedState((_documentElement = e.target.documentElement) !== null && _documentElement !== void 0 ? _documentElement : e.target);\n\t\tisScrolling.value = true;\n\t\tonScrollEndDebounced(e);\n\t\tonScroll(e);\n\t};\n\tuseEventListener(element, \"scroll\", throttle ? useThrottleFn(onScrollHandler, throttle, true, false) : onScrollHandler, eventListenerOptions);\n\ttryOnMounted(() => {\n\t\ttry {\n\t\t\tconst _element = toValue(element);\n\t\t\tif (!_element) return;\n\t\t\tsetArrivedState(_element);\n\t\t} catch (e) {\n\t\t\tonError(e);\n\t\t}\n\t});\n\tif ((observe === null || observe === void 0 ? void 0 : observe.mutation) && element != null && element !== window$1 && element !== document) useMutationObserver(element, () => {\n\t\tconst _element = toValue(element);\n\t\tif (!_element) return;\n\t\tsetArrivedState(_element);\n\t}, {\n\t\tattributes: true,\n\t\tchildList: true,\n\t\tsubtree: true\n\t});\n\tuseEventListener(element, \"scrollend\", onScrollEnd, eventListenerOptions);\n\treturn {\n\t\tx,\n\t\ty,\n\t\tisScrolling,\n\t\tarrivedState,\n\t\tdirections,\n\t\tmeasure() {\n\t\t\tconst _element = toValue(element);\n\t\t\tif (window$1 && _element) setArrivedState(_element);\n\t\t}\n\t};\n}\n\n//#endregion\n//#region useInfiniteScroll/index.ts\n/**\n* Reactive infinite scroll.\n*\n* @see https://vueuse.org/useInfiniteScroll\n*/\nfunction useInfiniteScroll(element, onLoadMore, options = {}) {\n\tvar _options$distance;\n\tconst { direction = \"bottom\", interval = 100, canLoadMore = () => true } = options;\n\tconst state = reactive(useScroll(element, {\n\t\t...options,\n\t\toffset: {\n\t\t\t[direction]: (_options$distance = options.distance) !== null && _options$distance !== void 0 ? _options$distance : 0,\n\t\t\t...options.offset\n\t\t}\n\t}));\n\tconst promise = ref();\n\tconst isLoading = computed(() => !!promise.value);\n\tconst observedElement = computed(() => {\n\t\treturn resolveElement(toValue(element));\n\t});\n\tconst isElementVisible = useElementVisibility(observedElement);\n\tconst canLoad = computed(() => {\n\t\tif (!observedElement.value) return false;\n\t\treturn canLoadMore(observedElement.value);\n\t});\n\tfunction checkAndLoad() {\n\t\tstate.measure();\n\t\tif (!observedElement.value || !isElementVisible.value || !canLoad.value) return;\n\t\tconst { scrollHeight, clientHeight, scrollWidth, clientWidth } = observedElement.value;\n\t\tconst isNarrower = direction === \"bottom\" || direction === \"top\" ? scrollHeight <= clientHeight : scrollWidth <= clientWidth;\n\t\tif (state.arrivedState[direction] || isNarrower) {\n\t\t\tif (!promise.value) promise.value = Promise.all([onLoadMore(state), new Promise((resolve) => setTimeout(resolve, interval))]).finally(() => {\n\t\t\t\tpromise.value = null;\n\t\t\t\tnextTick(() => checkAndLoad());\n\t\t\t});\n\t\t}\n\t}\n\ttryOnUnmounted(watch(() => [\n\t\tstate.arrivedState[direction],\n\t\tisElementVisible.value,\n\t\tcanLoad.value\n\t], checkAndLoad, { immediate: true }));\n\treturn {\n\t\tisLoading,\n\t\treset() {\n\t\t\tnextTick(() => checkAndLoad());\n\t\t}\n\t};\n}\n\n//#endregion\n//#region useKeyModifier/index.ts\nconst defaultEvents = [\n\t\"mousedown\",\n\t\"mouseup\",\n\t\"keydown\",\n\t\"keyup\"\n];\n/* @__NO_SIDE_EFFECTS__ */\nfunction useKeyModifier(modifier, options = {}) {\n\tconst { events: events$1 = defaultEvents, document: document$1 = defaultDocument, initial = null } = options;\n\tconst state = shallowRef(initial);\n\tif (document$1) events$1.forEach((listenerEvent) => {\n\t\tuseEventListener(document$1, listenerEvent, (evt) => {\n\t\t\tif (typeof evt.getModifierState === \"function\") state.value = evt.getModifierState(modifier);\n\t\t}, { passive: true });\n\t});\n\treturn state;\n}\n\n//#endregion\n//#region useLocalStorage/index.ts\n/**\n* Reactive LocalStorage.\n*\n* @see https://vueuse.org/useLocalStorage\n* @param key\n* @param initialValue\n* @param options\n*/\nfunction useLocalStorage(key, initialValue, options = {}) {\n\tconst { window: window$1 = defaultWindow } = options;\n\treturn useStorage(key, initialValue, window$1 === null || window$1 === void 0 ? void 0 : window$1.localStorage, options);\n}\n\n//#endregion\n//#region useMagicKeys/aliasMap.ts\nconst DefaultMagicKeysAliasMap = {\n\tctrl: \"control\",\n\tcommand: \"meta\",\n\tcmd: \"meta\",\n\toption: \"alt\",\n\tup: \"arrowup\",\n\tdown: \"arrowdown\",\n\tleft: \"arrowleft\",\n\tright: \"arrowright\"\n};\n\n//#endregion\n//#region useMagicKeys/index.ts\n/**\n* Reactive keys pressed state, with magical keys combination support.\n*\n* @see https://vueuse.org/useMagicKeys\n*/\nfunction useMagicKeys(options = {}) {\n\tconst { reactive: useReactive = false, target = defaultWindow, aliasMap = DefaultMagicKeysAliasMap, passive = true, onEventFired = noop } = options;\n\tconst current = reactive(/* @__PURE__ */ new Set());\n\tconst obj = {\n\t\ttoJSON() {\n\t\t\treturn {};\n\t\t},\n\t\tcurrent\n\t};\n\tconst refs = useReactive ? reactive(obj) : obj;\n\tconst metaDeps = /* @__PURE__ */ new Set();\n\tconst depsMap = new Map([\n\t\t[\"Meta\", metaDeps],\n\t\t[\"Shift\", /* @__PURE__ */ new Set()],\n\t\t[\"Alt\", /* @__PURE__ */ new Set()]\n\t]);\n\tconst usedKeys = /* @__PURE__ */ new Set();\n\tfunction setRefs(key, value) {\n\t\tif (key in refs) if (useReactive) refs[key] = value;\n\t\telse refs[key].value = value;\n\t}\n\tfunction reset() {\n\t\tcurrent.clear();\n\t\tfor (const key of usedKeys) setRefs(key, false);\n\t}\n\tfunction updateDeps(value, e, keys$1) {\n\t\tif (!value || typeof e.getModifierState !== \"function\") return;\n\t\tfor (const [modifier, depsSet] of depsMap) if (e.getModifierState(modifier)) {\n\t\t\tkeys$1.forEach((key) => depsSet.add(key));\n\t\t\tbreak;\n\t\t}\n\t}\n\tfunction clearDeps(value, key) {\n\t\tif (value) return;\n\t\tconst depsMapKey = `${key[0].toUpperCase()}${key.slice(1)}`;\n\t\tconst deps = depsMap.get(depsMapKey);\n\t\tif (![\"shift\", \"alt\"].includes(key) || !deps) return;\n\t\tconst depsArray = Array.from(deps);\n\t\tconst depsIndex = depsArray.indexOf(key);\n\t\tdepsArray.forEach((key$1, index) => {\n\t\t\tif (index >= depsIndex) {\n\t\t\t\tcurrent.delete(key$1);\n\t\t\t\tsetRefs(key$1, false);\n\t\t\t}\n\t\t});\n\t\tdeps.clear();\n\t}\n\tfunction updateRefs(e, value) {\n\t\tvar _e$key, _e$code;\n\t\tconst key = (_e$key = e.key) === null || _e$key === void 0 ? void 0 : _e$key.toLowerCase();\n\t\tconst values = [(_e$code = e.code) === null || _e$code === void 0 ? void 0 : _e$code.toLowerCase(), key].filter(Boolean);\n\t\tif (key === \"\") return;\n\t\tif (key) if (value) current.add(key);\n\t\telse current.delete(key);\n\t\tfor (const key$1 of values) {\n\t\t\tusedKeys.add(key$1);\n\t\t\tsetRefs(key$1, value);\n\t\t}\n\t\tupdateDeps(value, e, [...current, ...values]);\n\t\tclearDeps(value, key);\n\t\tif (key === \"meta\" && !value) {\n\t\t\tmetaDeps.forEach((key$1) => {\n\t\t\t\tcurrent.delete(key$1);\n\t\t\t\tsetRefs(key$1, false);\n\t\t\t});\n\t\t\tmetaDeps.clear();\n\t\t}\n\t}\n\tuseEventListener(target, \"keydown\", (e) => {\n\t\tupdateRefs(e, true);\n\t\treturn onEventFired(e);\n\t}, { passive });\n\tuseEventListener(target, \"keyup\", (e) => {\n\t\tupdateRefs(e, false);\n\t\treturn onEventFired(e);\n\t}, { passive });\n\tuseEventListener(\"blur\", reset, { passive });\n\tuseEventListener(\"focus\", reset, { passive });\n\tconst proxy = new Proxy(refs, { get(target$1, prop, rec) {\n\t\tif (typeof prop !== \"string\") return Reflect.get(target$1, prop, rec);\n\t\tprop = prop.toLowerCase();\n\t\tif (prop in aliasMap) prop = aliasMap[prop];\n\t\tif (!(prop in refs)) if (/[+_-]/.test(prop)) {\n\t\t\tconst keys$1 = prop.split(/[+_-]/g).map((i) => i.trim());\n\t\t\trefs[prop] = computed(() => keys$1.map((key) => toValue(proxy[key])).every(Boolean));\n\t\t} else refs[prop] = shallowRef(false);\n\t\tconst r = Reflect.get(target$1, prop, rec);\n\t\treturn useReactive ? toValue(r) : r;\n\t} });\n\treturn proxy;\n}\n\n//#endregion\n//#region useMediaControls/index.ts\n/**\n* Automatically check if the ref exists and if it does run the cb fn\n*/\nfunction usingElRef(source, cb) {\n\tif (toValue(source)) cb(toValue(source));\n}\n/**\n* Converts a TimeRange object to an array\n*/\nfunction timeRangeToArray(timeRanges) {\n\tlet ranges = [];\n\tfor (let i = 0; i < timeRanges.length; ++i) ranges = [...ranges, [timeRanges.start(i), timeRanges.end(i)]];\n\treturn ranges;\n}\n/**\n* Converts a TextTrackList object to an array of `UseMediaTextTrack`\n*/\nfunction tracksToArray(tracks) {\n\treturn Array.from(tracks).map(({ label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType }, id) => ({\n\t\tid,\n\t\tlabel,\n\t\tkind,\n\t\tlanguage,\n\t\tmode,\n\t\tactiveCues,\n\t\tcues,\n\t\tinBandMetadataTrackDispatchType\n\t}));\n}\nconst defaultOptions = {\n\tsrc: \"\",\n\ttracks: []\n};\nfunction useMediaControls(target, options = {}) {\n\ttarget = toRef(target);\n\toptions = {\n\t\t...defaultOptions,\n\t\t...options\n\t};\n\tconst { document: document$1 = defaultDocument } = options;\n\tconst listenerOptions = { passive: true };\n\tconst currentTime = shallowRef(0);\n\tconst duration = shallowRef(0);\n\tconst seeking = shallowRef(false);\n\tconst volume = shallowRef(1);\n\tconst waiting = shallowRef(false);\n\tconst ended = shallowRef(false);\n\tconst playing = shallowRef(false);\n\tconst rate = shallowRef(1);\n\tconst stalled = shallowRef(false);\n\tconst buffered = ref([]);\n\tconst tracks = ref([]);\n\tconst selectedTrack = shallowRef(-1);\n\tconst isPictureInPicture = shallowRef(false);\n\tconst muted = shallowRef(false);\n\tconst supportsPictureInPicture = document$1 && \"pictureInPictureEnabled\" in document$1;\n\tconst sourceErrorEvent = createEventHook();\n\tconst playbackErrorEvent = createEventHook();\n\t/**\n\t* Disables the specified track. If no track is specified then\n\t* all tracks will be disabled\n\t*\n\t* @param track The id of the track to disable\n\t*/\n\tconst disableTrack = (track) => {\n\t\tusingElRef(target, (el) => {\n\t\t\tif (track) {\n\t\t\t\tconst id = typeof track === \"number\" ? track : track.id;\n\t\t\t\tel.textTracks[id].mode = \"disabled\";\n\t\t\t} else for (let i = 0; i < el.textTracks.length; ++i) el.textTracks[i].mode = \"disabled\";\n\t\t\tselectedTrack.value = -1;\n\t\t});\n\t};\n\t/**\n\t* Enables the specified track and disables the\n\t* other tracks unless otherwise specified\n\t*\n\t* @param track The track of the id of the track to enable\n\t* @param disableTracks Disable all other tracks\n\t*/\n\tconst enableTrack = (track, disableTracks = true) => {\n\t\tusingElRef(target, (el) => {\n\t\t\tconst id = typeof track === \"number\" ? track : track.id;\n\t\t\tif (disableTracks) disableTrack();\n\t\t\tel.textTracks[id].mode = \"showing\";\n\t\t\tselectedTrack.value = id;\n\t\t});\n\t};\n\t/**\n\t* Toggle picture in picture mode for the player.\n\t*/\n\tconst togglePictureInPicture = () => {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tusingElRef(target, async (el) => {\n\t\t\t\tif (supportsPictureInPicture) if (!isPictureInPicture.value) el.requestPictureInPicture().then(resolve).catch(reject);\n\t\t\t\telse document$1.exitPictureInPicture().then(resolve).catch(reject);\n\t\t\t});\n\t\t});\n\t};\n\t/**\n\t* This will automatically inject sources to the media element. The sources will be\n\t* appended as children to the media element as `<source>` elements.\n\t*/\n\twatchEffect(() => {\n\t\tif (!document$1) return;\n\t\tconst el = toValue(target);\n\t\tif (!el) return;\n\t\tconst src = toValue(options.src);\n\t\tlet sources = [];\n\t\tif (!src) return;\n\t\tif (typeof src === \"string\") sources = [{ src }];\n\t\telse if (Array.isArray(src)) sources = src;\n\t\telse if (isObject(src)) sources = [src];\n\t\tel.querySelectorAll(\"source\").forEach((e) => {\n\t\t\te.remove();\n\t\t});\n\t\tsources.forEach(({ src: src$1, type, media }) => {\n\t\t\tconst source = document$1.createElement(\"source\");\n\t\t\tsource.setAttribute(\"src\", src$1);\n\t\t\tsource.setAttribute(\"type\", type || \"\");\n\t\t\tsource.setAttribute(\"media\", media || \"\");\n\t\t\tuseEventListener(source, \"error\", sourceErrorEvent.trigger, listenerOptions);\n\t\t\tel.appendChild(source);\n\t\t});\n\t\tel.load();\n\t});\n\t/**\n\t* Apply composable state to the element, also when element is changed\n\t*/\n\twatch([target, volume], () => {\n\t\tconst el = toValue(target);\n\t\tif (!el) return;\n\t\tel.volume = volume.value;\n\t});\n\twatch([target, muted], () => {\n\t\tconst el = toValue(target);\n\t\tif (!el) return;\n\t\tel.muted = muted.value;\n\t});\n\twatch([target, rate], () => {\n\t\tconst el = toValue(target);\n\t\tif (!el) return;\n\t\tel.playbackRate = rate.value;\n\t});\n\t/**\n\t* Load Tracks\n\t*/\n\twatchEffect(() => {\n\t\tif (!document$1) return;\n\t\tconst textTracks = toValue(options.tracks);\n\t\tconst el = toValue(target);\n\t\tif (!textTracks || !textTracks.length || !el) return;\n\t\t/**\n\t\t* The MediaAPI provides an API for adding text tracks, but they don't currently\n\t\t* have an API for removing text tracks, so instead we will just create and remove\n\t\t* the tracks manually using the HTML api.\n\t\t*/\n\t\tel.querySelectorAll(\"track\").forEach((e) => e.remove());\n\t\ttextTracks.forEach(({ default: isDefault, kind, label, src, srcLang }, i) => {\n\t\t\tconst track = document$1.createElement(\"track\");\n\t\t\ttrack.default = isDefault || false;\n\t\t\ttrack.kind = kind;\n\t\t\ttrack.label = label;\n\t\t\ttrack.src = src;\n\t\t\ttrack.srclang = srcLang;\n\t\t\tif (track.default) selectedTrack.value = i;\n\t\t\tel.appendChild(track);\n\t\t});\n\t});\n\t/**\n\t* This will allow us to update the current time from the timeupdate event\n\t* without setting the medias current position, but if the user changes the\n\t* current time via the ref, then the media will seek.\n\t*\n\t* If we did not use an ignorable watch, then the current time update from\n\t* the timeupdate event would cause the media to stutter.\n\t*/\n\tconst { ignoreUpdates: ignoreCurrentTimeUpdates } = watchIgnorable(currentTime, (time) => {\n\t\tconst el = toValue(target);\n\t\tif (!el) return;\n\t\tel.currentTime = time;\n\t});\n\t/**\n\t* Using an ignorable watch so we can control the play state using a ref and not\n\t* a function\n\t*/\n\tconst { ignoreUpdates: ignorePlayingUpdates } = watchIgnorable(playing, (isPlaying) => {\n\t\tconst el = toValue(target);\n\t\tif (!el) return;\n\t\tif (isPlaying) el.play().catch((e) => {\n\t\t\tplaybackErrorEvent.trigger(e);\n\t\t\tthrow e;\n\t\t});\n\t\telse el.pause();\n\t});\n\tuseEventListener(target, \"timeupdate\", () => ignoreCurrentTimeUpdates(() => currentTime.value = toValue(target).currentTime), listenerOptions);\n\tuseEventListener(target, \"durationchange\", () => duration.value = toValue(target).duration, listenerOptions);\n\tuseEventListener(target, \"progress\", () => buffered.value = timeRangeToArray(toValue(target).buffered), listenerOptions);\n\tuseEventListener(target, \"seeking\", () => seeking.value = true, listenerOptions);\n\tuseEventListener(target, \"seeked\", () => seeking.value = false, listenerOptions);\n\tuseEventListener(target, [\"waiting\", \"loadstart\"], () => {\n\t\twaiting.value = true;\n\t\tignorePlayingUpdates(() => playing.value = false);\n\t}, listenerOptions);\n\tuseEventListener(target, \"loadeddata\", () => waiting.value = false, listenerOptions);\n\tuseEventListener(target, \"playing\", () => {\n\t\twaiting.value = false;\n\t\tended.value = false;\n\t\tignorePlayingUpdates(() => playing.value = true);\n\t}, listenerOptions);\n\tuseEventListener(target, \"ratechange\", () => rate.value = toValue(target).playbackRate, listenerOptions);\n\tuseEventListener(target, \"stalled\", () => stalled.value = true, listenerOptions);\n\tuseEventListener(target, \"ended\", () => ended.value = true, listenerOptions);\n\tuseEventListener(target, \"pause\", () => ignorePlayingUpdates(() => playing.value = false), listenerOptions);\n\tuseEventListener(target, \"play\", () => ignorePlayingUpdates(() => playing.value = true), listenerOptions);\n\tuseEventListener(target, \"enterpictureinpicture\", () => isPictureInPicture.value = true, listenerOptions);\n\tuseEventListener(target, \"leavepictureinpicture\", () => isPictureInPicture.value = false, listenerOptions);\n\tuseEventListener(target, \"volumechange\", () => {\n\t\tconst el = toValue(target);\n\t\tif (!el) return;\n\t\tvolume.value = el.volume;\n\t\tmuted.value = el.muted;\n\t}, listenerOptions);\n\t/**\n\t* The following listeners need to listen to a nested\n\t* object on the target, so we will have to use a nested\n\t* watch and manually remove the listeners\n\t*/\n\tconst listeners = [];\n\tconst stop = watch([target], () => {\n\t\tconst el = toValue(target);\n\t\tif (!el) return;\n\t\tstop();\n\t\tlisteners[0] = useEventListener(el.textTracks, \"addtrack\", () => tracks.value = tracksToArray(el.textTracks), listenerOptions);\n\t\tlisteners[1] = useEventListener(el.textTracks, \"removetrack\", () => tracks.value = tracksToArray(el.textTracks), listenerOptions);\n\t\tlisteners[2] = useEventListener(el.textTracks, \"change\", () => tracks.value = tracksToArray(el.textTracks), listenerOptions);\n\t});\n\ttryOnScopeDispose(() => listeners.forEach((listener) => listener()));\n\treturn {\n\t\tcurrentTime,\n\t\tduration,\n\t\twaiting,\n\t\tseeking,\n\t\tended,\n\t\tstalled,\n\t\tbuffered,\n\t\tplaying,\n\t\trate,\n\t\tvolume,\n\t\tmuted,\n\t\ttracks,\n\t\tselectedTrack,\n\t\tenableTrack,\n\t\tdisableTrack,\n\t\tsupportsPictureInPicture,\n\t\ttogglePictureInPicture,\n\t\tisPictureInPicture,\n\t\tonSourceError: sourceErrorEvent.on,\n\t\tonPlaybackError: playbackErrorEvent.on\n\t};\n}\n\n//#endregion\n//#region useMemoize/index.ts\n/**\n* Reactive function result cache based on arguments\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useMemoize(resolver, options) {\n\tconst initCache = () => {\n\t\tif (options === null || options === void 0 ? void 0 : options.cache) return shallowReactive(options.cache);\n\t\treturn shallowReactive(/* @__PURE__ */ new Map());\n\t};\n\tconst cache = initCache();\n\t/**\n\t* Generate key from args\n\t*/\n\tconst generateKey = (...args) => (options === null || options === void 0 ? void 0 : options.getKey) ? options.getKey(...args) : JSON.stringify(args);\n\t/**\n\t* Load data and save in cache\n\t*/\n\tconst _loadData = (key, ...args) => {\n\t\tcache.set(key, resolver(...args));\n\t\treturn cache.get(key);\n\t};\n\tconst loadData = (...args) => _loadData(generateKey(...args), ...args);\n\t/**\n\t* Delete key from cache\n\t*/\n\tconst deleteData = (...args) => {\n\t\tcache.delete(generateKey(...args));\n\t};\n\t/**\n\t* Clear cached data\n\t*/\n\tconst clearData = () => {\n\t\tcache.clear();\n\t};\n\tconst memoized = (...args) => {\n\t\tconst key = generateKey(...args);\n\t\tif (cache.has(key)) return cache.get(key);\n\t\treturn _loadData(key, ...args);\n\t};\n\tmemoized.load = loadData;\n\tmemoized.delete = deleteData;\n\tmemoized.clear = clearData;\n\tmemoized.generateKey = generateKey;\n\tmemoized.cache = cache;\n\treturn memoized;\n}\n\n//#endregion\n//#region useMemory/index.ts\n/**\n* Reactive Memory Info.\n*\n* @see https://vueuse.org/useMemory\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useMemory(options = {}) {\n\tconst memory = ref();\n\tconst isSupported = /* @__PURE__ */ useSupported(() => typeof performance !== \"undefined\" && \"memory\" in performance);\n\tif (isSupported.value) {\n\t\tconst { interval = 1e3 } = options;\n\t\tuseIntervalFn(() => {\n\t\t\tmemory.value = performance.memory;\n\t\t}, interval, {\n\t\t\timmediate: options.immediate,\n\t\t\timmediateCallback: options.immediateCallback\n\t\t});\n\t}\n\treturn {\n\t\tisSupported,\n\t\tmemory\n\t};\n}\n\n//#endregion\n//#region useMouse/index.ts\nconst UseMouseBuiltinExtractors = {\n\tpage: (event) => [event.pageX, event.pageY],\n\tclient: (event) => [event.clientX, event.clientY],\n\tscreen: (event) => [event.screenX, event.screenY],\n\tmovement: (event) => event instanceof MouseEvent ? [event.movementX, event.movementY] : null\n};\n/**\n* Reactive mouse position.\n*\n* @see https://vueuse.org/useMouse\n* @param options\n*/\nfunction useMouse(options = {}) {\n\tconst { type = \"page\", touch = true, resetOnTouchEnds = false, initialValue = {\n\t\tx: 0,\n\t\ty: 0\n\t}, window: window$1 = defaultWindow, target = window$1, scroll = true, eventFilter } = options;\n\tlet _prevMouseEvent = null;\n\tlet _prevScrollX = 0;\n\tlet _prevScrollY = 0;\n\tconst x = shallowRef(initialValue.x);\n\tconst y = shallowRef(initialValue.y);\n\tconst sourceType = shallowRef(null);\n\tconst extractor = typeof type === \"function\" ? type : UseMouseBuiltinExtractors[type];\n\tconst mouseHandler = (event) => {\n\t\tconst result = extractor(event);\n\t\t_prevMouseEvent = event;\n\t\tif (result) {\n\t\t\t[x.value, y.value] = result;\n\t\t\tsourceType.value = \"mouse\";\n\t\t}\n\t\tif (window$1) {\n\t\t\t_prevScrollX = window$1.scrollX;\n\t\t\t_prevScrollY = window$1.scrollY;\n\t\t}\n\t};\n\tconst touchHandler = (event) => {\n\t\tif (event.touches.length > 0) {\n\t\t\tconst result = extractor(event.touches[0]);\n\t\t\tif (result) {\n\t\t\t\t[x.value, y.value] = result;\n\t\t\t\tsourceType.value = \"touch\";\n\t\t\t}\n\t\t}\n\t};\n\tconst scrollHandler = () => {\n\t\tif (!_prevMouseEvent || !window$1) return;\n\t\tconst pos = extractor(_prevMouseEvent);\n\t\tif (_prevMouseEvent instanceof MouseEvent && pos) {\n\t\t\tx.value = pos[0] + window$1.scrollX - _prevScrollX;\n\t\t\ty.value = pos[1] + window$1.scrollY - _prevScrollY;\n\t\t}\n\t};\n\tconst reset = () => {\n\t\tx.value = initialValue.x;\n\t\ty.value = initialValue.y;\n\t};\n\tconst mouseHandlerWrapper = eventFilter ? (event) => eventFilter(() => mouseHandler(event), {}) : (event) => mouseHandler(event);\n\tconst touchHandlerWrapper = eventFilter ? (event) => eventFilter(() => touchHandler(event), {}) : (event) => touchHandler(event);\n\tconst scrollHandlerWrapper = eventFilter ? () => eventFilter(() => scrollHandler(), {}) : () => scrollHandler();\n\tif (target) {\n\t\tconst listenerOptions = { passive: true };\n\t\tuseEventListener(target, [\"mousemove\", \"dragover\"], mouseHandlerWrapper, listenerOptions);\n\t\tif (touch && type !== \"movement\") {\n\t\t\tuseEventListener(target, [\"touchstart\", \"touchmove\"], touchHandlerWrapper, listenerOptions);\n\t\t\tif (resetOnTouchEnds) useEventListener(target, \"touchend\", reset, listenerOptions);\n\t\t}\n\t\tif (scroll && type === \"page\") useEventListener(window$1, \"scroll\", scrollHandlerWrapper, listenerOptions);\n\t}\n\treturn {\n\t\tx,\n\t\ty,\n\t\tsourceType\n\t};\n}\n\n//#endregion\n//#region useMouseInElement/index.ts\n/**\n* Reactive mouse position related to an element.\n*\n* @see https://vueuse.org/useMouseInElement\n* @param target\n* @param options\n*/\nfunction useMouseInElement(target, options = {}) {\n\tconst { windowResize = true, windowScroll = true, handleOutside = true, window: window$1 = defaultWindow } = options;\n\tconst type = options.type || \"page\";\n\tconst { x, y, sourceType } = useMouse(options);\n\tconst targetRef = shallowRef(target !== null && target !== void 0 ? target : window$1 === null || window$1 === void 0 ? void 0 : window$1.document.body);\n\tconst elementX = shallowRef(0);\n\tconst elementY = shallowRef(0);\n\tconst elementPositionX = shallowRef(0);\n\tconst elementPositionY = shallowRef(0);\n\tconst elementHeight = shallowRef(0);\n\tconst elementWidth = shallowRef(0);\n\tconst isOutside = shallowRef(true);\n\tfunction update() {\n\t\tif (!window$1) return;\n\t\tconst el = unrefElement(targetRef);\n\t\tif (!el || !(el instanceof Element)) return;\n\t\tfor (const rect of el.getClientRects()) {\n\t\t\tconst { left, top, width, height } = rect;\n\t\t\telementPositionX.value = left + (type === \"page\" ? window$1.pageXOffset : 0);\n\t\t\telementPositionY.value = top + (type === \"page\" ? window$1.pageYOffset : 0);\n\t\t\telementHeight.value = height;\n\t\t\telementWidth.value = width;\n\t\t\tconst elX = x.value - elementPositionX.value;\n\t\t\tconst elY = y.value - elementPositionY.value;\n\t\t\tisOutside.value = width === 0 || height === 0 || elX < 0 || elY < 0 || elX > width || elY > height;\n\t\t\tif (handleOutside || !isOutside.value) {\n\t\t\t\telementX.value = elX;\n\t\t\t\telementY.value = elY;\n\t\t\t}\n\t\t\tif (!isOutside.value) break;\n\t\t}\n\t}\n\tconst stopFnList = [];\n\tfunction stop() {\n\t\tstopFnList.forEach((fn) => fn());\n\t\tstopFnList.length = 0;\n\t}\n\ttryOnMounted(() => {\n\t\tupdate();\n\t});\n\tif (window$1) {\n\t\tconst { stop: stopResizeObserver } = useResizeObserver(targetRef, update);\n\t\tconst { stop: stopMutationObserver } = useMutationObserver(targetRef, update, { attributeFilter: [\"style\", \"class\"] });\n\t\tconst stopWatch = watch([\n\t\t\ttargetRef,\n\t\t\tx,\n\t\t\ty\n\t\t], update);\n\t\tstopFnList.push(stopResizeObserver, stopMutationObserver, stopWatch);\n\t\tuseEventListener(document, \"mouseleave\", () => isOutside.value = true, { passive: true });\n\t\tif (windowScroll) stopFnList.push(useEventListener(\"scroll\", update, {\n\t\t\tcapture: true,\n\t\t\tpassive: true\n\t\t}));\n\t\tif (windowResize) stopFnList.push(useEventListener(\"resize\", update, { passive: true }));\n\t}\n\treturn {\n\t\tx,\n\t\ty,\n\t\tsourceType,\n\t\telementX,\n\t\telementY,\n\t\telementPositionX,\n\t\telementPositionY,\n\t\telementHeight,\n\t\telementWidth,\n\t\tisOutside,\n\t\tstop\n\t};\n}\n\n//#endregion\n//#region useMousePressed/index.ts\n/**\n* Reactive mouse pressing state.\n*\n* @see https://vueuse.org/useMousePressed\n* @param options\n*/\nfunction useMousePressed(options = {}) {\n\tconst { touch = true, drag = true, capture = false, initialValue = false, window: window$1 = defaultWindow } = options;\n\tconst pressed = shallowRef(initialValue);\n\tconst sourceType = shallowRef(null);\n\tif (!window$1) return {\n\t\tpressed,\n\t\tsourceType\n\t};\n\tconst onPressed = (srcType) => (event) => {\n\t\tvar _options$onPressed;\n\t\tpressed.value = true;\n\t\tsourceType.value = srcType;\n\t\t(_options$onPressed = options.onPressed) === null || _options$onPressed === void 0 || _options$onPressed.call(options, event);\n\t};\n\tconst onReleased = (event) => {\n\t\tvar _options$onReleased;\n\t\tpressed.value = false;\n\t\tsourceType.value = null;\n\t\t(_options$onReleased = options.onReleased) === null || _options$onReleased === void 0 || _options$onReleased.call(options, event);\n\t};\n\tconst target = computed(() => unrefElement(options.target) || window$1);\n\tconst listenerOptions = {\n\t\tpassive: true,\n\t\tcapture\n\t};\n\tuseEventListener(target, \"mousedown\", onPressed(\"mouse\"), listenerOptions);\n\tuseEventListener(window$1, \"mouseleave\", onReleased, listenerOptions);\n\tuseEventListener(window$1, \"mouseup\", onReleased, listenerOptions);\n\tif (drag) {\n\t\tuseEventListener(target, \"dragstart\", onPressed(\"mouse\"), listenerOptions);\n\t\tuseEventListener(window$1, \"drop\", onReleased, listenerOptions);\n\t\tuseEventListener(window$1, \"dragend\", onReleased, listenerOptions);\n\t}\n\tif (touch) {\n\t\tuseEventListener(target, \"touchstart\", onPressed(\"touch\"), listenerOptions);\n\t\tuseEventListener(window$1, \"touchend\", onReleased, listenerOptions);\n\t\tuseEventListener(window$1, \"touchcancel\", onReleased, listenerOptions);\n\t}\n\treturn {\n\t\tpressed,\n\t\tsourceType\n\t};\n}\n\n//#endregion\n//#region useNavigatorLanguage/index.ts\n/**\n*\n* Reactive useNavigatorLanguage\n*\n* Detects the currently selected user language and returns a reactive language\n* @see https://vueuse.org/useNavigatorLanguage\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useNavigatorLanguage(options = {}) {\n\tconst { window: window$1 = defaultWindow } = options;\n\tconst navigator$1 = window$1 === null || window$1 === void 0 ? void 0 : window$1.navigator;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => navigator$1 && \"language\" in navigator$1);\n\tconst language = shallowRef(navigator$1 === null || navigator$1 === void 0 ? void 0 : navigator$1.language);\n\tuseEventListener(window$1, \"languagechange\", () => {\n\t\tif (navigator$1) language.value = navigator$1.language;\n\t}, { passive: true });\n\treturn {\n\t\tisSupported,\n\t\tlanguage\n\t};\n}\n\n//#endregion\n//#region useNetwork/index.ts\n/**\n* Reactive Network status.\n*\n* @see https://vueuse.org/useNetwork\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useNetwork(options = {}) {\n\tconst { window: window$1 = defaultWindow } = options;\n\tconst navigator$1 = window$1 === null || window$1 === void 0 ? void 0 : window$1.navigator;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => navigator$1 && \"connection\" in navigator$1);\n\tconst isOnline = shallowRef(true);\n\tconst saveData = shallowRef(false);\n\tconst offlineAt = shallowRef(void 0);\n\tconst onlineAt = shallowRef(void 0);\n\tconst downlink = shallowRef(void 0);\n\tconst downlinkMax = shallowRef(void 0);\n\tconst rtt = shallowRef(void 0);\n\tconst effectiveType = shallowRef(void 0);\n\tconst type = shallowRef(\"unknown\");\n\tconst connection = isSupported.value && navigator$1.connection;\n\tfunction updateNetworkInformation() {\n\t\tif (!navigator$1) return;\n\t\tisOnline.value = navigator$1.onLine;\n\t\tofflineAt.value = isOnline.value ? void 0 : Date.now();\n\t\tonlineAt.value = isOnline.value ? Date.now() : void 0;\n\t\tif (connection) {\n\t\t\tdownlink.value = connection.downlink;\n\t\t\tdownlinkMax.value = connection.downlinkMax;\n\t\t\teffectiveType.value = connection.effectiveType;\n\t\t\trtt.value = connection.rtt;\n\t\t\tsaveData.value = connection.saveData;\n\t\t\ttype.value = connection.type;\n\t\t}\n\t}\n\tconst listenerOptions = { passive: true };\n\tif (window$1) {\n\t\tuseEventListener(window$1, \"offline\", () => {\n\t\t\tisOnline.value = false;\n\t\t\tofflineAt.value = Date.now();\n\t\t}, listenerOptions);\n\t\tuseEventListener(window$1, \"online\", () => {\n\t\t\tisOnline.value = true;\n\t\t\tonlineAt.value = Date.now();\n\t\t}, listenerOptions);\n\t}\n\tif (connection) useEventListener(connection, \"change\", updateNetworkInformation, listenerOptions);\n\tupdateNetworkInformation();\n\treturn {\n\t\tisSupported,\n\t\tisOnline: readonly(isOnline),\n\t\tsaveData: readonly(saveData),\n\t\tofflineAt: readonly(offlineAt),\n\t\tonlineAt: readonly(onlineAt),\n\t\tdownlink: readonly(downlink),\n\t\tdownlinkMax: readonly(downlinkMax),\n\t\teffectiveType: readonly(effectiveType),\n\t\trtt: readonly(rtt),\n\t\ttype: readonly(type)\n\t};\n}\n\n//#endregion\n//#region useNow/index.ts\n/**\n* Reactive current Date instance.\n*\n* @see https://vueuse.org/useNow\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useNow(options = {}) {\n\tconst { controls: exposeControls = false, interval = \"requestAnimationFrame\", immediate = true } = options;\n\tconst now = ref(/* @__PURE__ */ new Date());\n\tconst update = () => now.value = /* @__PURE__ */ new Date();\n\tconst controls = interval === \"requestAnimationFrame\" ? useRafFn(update, { immediate }) : useIntervalFn(update, interval, { immediate });\n\tif (exposeControls) return {\n\t\tnow,\n\t\t...controls\n\t};\n\telse return now;\n}\n\n//#endregion\n//#region useObjectUrl/index.ts\n/**\n* Reactive URL representing an object.\n*\n* @see https://vueuse.org/useObjectUrl\n* @param object\n*/\nfunction useObjectUrl(object) {\n\tconst url = shallowRef();\n\tconst release = () => {\n\t\tif (url.value) URL.revokeObjectURL(url.value);\n\t\turl.value = void 0;\n\t};\n\twatch(() => toValue(object), (newObject) => {\n\t\trelease();\n\t\tif (newObject) url.value = URL.createObjectURL(newObject);\n\t}, { immediate: true });\n\ttryOnScopeDispose(release);\n\treturn readonly(url);\n}\n\n//#endregion\n//#region ../math/useClamp/index.ts\n/**\n* Reactively clamp a value between two other values.\n*\n* @see https://vueuse.org/useClamp\n* @param value number\n* @param min\n* @param max\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useClamp(value, min, max) {\n\tif (typeof value === \"function\" || isReadonly(value)) return computed(() => clamp(toValue(value), toValue(min), toValue(max)));\n\tconst _value = ref(value);\n\treturn computed({\n\t\tget() {\n\t\t\treturn _value.value = clamp(_value.value, toValue(min), toValue(max));\n\t\t},\n\t\tset(value$1) {\n\t\t\t_value.value = clamp(value$1, toValue(min), toValue(max));\n\t\t}\n\t});\n}\n\n//#endregion\n//#region useOffsetPagination/index.ts\nfunction useOffsetPagination(options) {\n\tconst { total = Number.POSITIVE_INFINITY, pageSize = 10, page = 1, onPageChange = noop, onPageSizeChange = noop, onPageCountChange = noop } = options;\n\tconst currentPageSize = useClamp(pageSize, 1, Number.POSITIVE_INFINITY);\n\tconst pageCount = computed(() => Math.max(1, Math.ceil(toValue(total) / toValue(currentPageSize))));\n\tconst currentPage = useClamp(page, 1, pageCount);\n\tconst isFirstPage = computed(() => currentPage.value === 1);\n\tconst isLastPage = computed(() => currentPage.value === pageCount.value);\n\tif (isRef(page)) syncRef(page, currentPage, { direction: isReadonly(page) ? \"ltr\" : \"both\" });\n\tif (isRef(pageSize)) syncRef(pageSize, currentPageSize, { direction: isReadonly(pageSize) ? \"ltr\" : \"both\" });\n\tfunction prev() {\n\t\tcurrentPage.value--;\n\t}\n\tfunction next() {\n\t\tcurrentPage.value++;\n\t}\n\tconst returnValue = {\n\t\tcurrentPage,\n\t\tcurrentPageSize,\n\t\tpageCount,\n\t\tisFirstPage,\n\t\tisLastPage,\n\t\tprev,\n\t\tnext\n\t};\n\twatch(currentPage, () => {\n\t\tonPageChange(reactive(returnValue));\n\t});\n\twatch(currentPageSize, () => {\n\t\tonPageSizeChange(reactive(returnValue));\n\t});\n\twatch(pageCount, () => {\n\t\tonPageCountChange(reactive(returnValue));\n\t});\n\treturn returnValue;\n}\n\n//#endregion\n//#region useOnline/index.ts\n/**\n* Reactive online state.\n*\n* @see https://vueuse.org/useOnline\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useOnline(options = {}) {\n\tconst { isOnline } = useNetwork(options);\n\treturn isOnline;\n}\n\n//#endregion\n//#region usePageLeave/index.ts\n/**\n* Reactive state to show whether mouse leaves the page.\n*\n* @see https://vueuse.org/usePageLeave\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction usePageLeave(options = {}) {\n\tconst { window: window$1 = defaultWindow } = options;\n\tconst isLeft = shallowRef(false);\n\tconst handler = (event) => {\n\t\tif (!window$1) return;\n\t\tevent = event || window$1.event;\n\t\tisLeft.value = !(event.relatedTarget || event.toElement);\n\t};\n\tif (window$1) {\n\t\tconst listenerOptions = { passive: true };\n\t\tuseEventListener(window$1, \"mouseout\", handler, listenerOptions);\n\t\tuseEventListener(window$1.document, \"mouseleave\", handler, listenerOptions);\n\t\tuseEventListener(window$1.document, \"mouseenter\", handler, listenerOptions);\n\t}\n\treturn isLeft;\n}\n\n//#endregion\n//#region useScreenOrientation/index.ts\n/**\n* Reactive screen orientation\n*\n* @see https://vueuse.org/useScreenOrientation\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useScreenOrientation(options = {}) {\n\tconst { window: window$1 = defaultWindow } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => window$1 && \"screen\" in window$1 && \"orientation\" in window$1.screen);\n\tconst screenOrientation = isSupported.value ? window$1.screen.orientation : {};\n\tconst orientation = ref(screenOrientation.type);\n\tconst angle = shallowRef(screenOrientation.angle || 0);\n\tif (isSupported.value) useEventListener(window$1, \"orientationchange\", () => {\n\t\torientation.value = screenOrientation.type;\n\t\tangle.value = screenOrientation.angle;\n\t}, { passive: true });\n\tconst lockOrientation = (type) => {\n\t\tif (isSupported.value && typeof screenOrientation.lock === \"function\") return screenOrientation.lock(type);\n\t\treturn Promise.reject(/* @__PURE__ */ new Error(\"Not supported\"));\n\t};\n\tconst unlockOrientation = () => {\n\t\tif (isSupported.value && typeof screenOrientation.unlock === \"function\") screenOrientation.unlock();\n\t};\n\treturn {\n\t\tisSupported,\n\t\torientation,\n\t\tangle,\n\t\tlockOrientation,\n\t\tunlockOrientation\n\t};\n}\n\n//#endregion\n//#region useParallax/index.ts\n/**\n* Create parallax effect easily. It uses `useDeviceOrientation` and fallback to `useMouse`\n* if orientation is not supported.\n*\n* @param target\n* @param options\n*/\nfunction useParallax(target, options = {}) {\n\tconst { deviceOrientationTiltAdjust = (i) => i, deviceOrientationRollAdjust = (i) => i, mouseTiltAdjust = (i) => i, mouseRollAdjust = (i) => i, window: window$1 = defaultWindow } = options;\n\tconst orientation = reactive(useDeviceOrientation({ window: window$1 }));\n\tconst screenOrientation = reactive(useScreenOrientation({ window: window$1 }));\n\tconst { elementX: x, elementY: y, elementWidth: width, elementHeight: height } = useMouseInElement(target, {\n\t\thandleOutside: false,\n\t\twindow: window$1\n\t});\n\tconst source = computed(() => {\n\t\tif (orientation.isSupported && (orientation.alpha != null && orientation.alpha !== 0 || orientation.gamma != null && orientation.gamma !== 0)) return \"deviceOrientation\";\n\t\treturn \"mouse\";\n\t});\n\treturn {\n\t\troll: computed(() => {\n\t\t\tif (source.value === \"deviceOrientation\") {\n\t\t\t\tlet value;\n\t\t\t\tswitch (screenOrientation.orientation) {\n\t\t\t\t\tcase \"landscape-primary\":\n\t\t\t\t\t\tvalue = orientation.gamma / 90;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"landscape-secondary\":\n\t\t\t\t\t\tvalue = -orientation.gamma / 90;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"portrait-primary\":\n\t\t\t\t\t\tvalue = -orientation.beta / 90;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"portrait-secondary\":\n\t\t\t\t\t\tvalue = orientation.beta / 90;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault: value = -orientation.beta / 90;\n\t\t\t\t}\n\t\t\t\treturn deviceOrientationRollAdjust(value);\n\t\t\t} else return mouseRollAdjust(-(y.value - height.value / 2) / height.value);\n\t\t}),\n\t\ttilt: computed(() => {\n\t\t\tif (source.value === \"deviceOrientation\") {\n\t\t\t\tlet value;\n\t\t\t\tswitch (screenOrientation.orientation) {\n\t\t\t\t\tcase \"landscape-primary\":\n\t\t\t\t\t\tvalue = orientation.beta / 90;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"landscape-secondary\":\n\t\t\t\t\t\tvalue = -orientation.beta / 90;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"portrait-primary\":\n\t\t\t\t\t\tvalue = orientation.gamma / 90;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"portrait-secondary\":\n\t\t\t\t\t\tvalue = -orientation.gamma / 90;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault: value = orientation.gamma / 90;\n\t\t\t\t}\n\t\t\t\treturn deviceOrientationTiltAdjust(value);\n\t\t\t} else return mouseTiltAdjust((x.value - width.value / 2) / width.value);\n\t\t}),\n\t\tsource\n\t};\n}\n\n//#endregion\n//#region useParentElement/index.ts\nfunction useParentElement(element = useCurrentElement()) {\n\tconst parentElement = shallowRef();\n\tconst update = () => {\n\t\tconst el = unrefElement(element);\n\t\tif (el) parentElement.value = el.parentElement;\n\t};\n\ttryOnMounted(update);\n\twatch(() => toValue(element), update);\n\treturn parentElement;\n}\n\n//#endregion\n//#region usePerformanceObserver/index.ts\n/**\n* Observe performance metrics.\n*\n* @see https://vueuse.org/usePerformanceObserver\n* @param options\n*/\nfunction usePerformanceObserver(options, callback) {\n\tconst { window: window$1 = defaultWindow, immediate = true,...performanceOptions } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => window$1 && \"PerformanceObserver\" in window$1);\n\tlet observer;\n\tconst stop = () => {\n\t\tobserver === null || observer === void 0 || observer.disconnect();\n\t};\n\tconst start = () => {\n\t\tif (isSupported.value) {\n\t\t\tstop();\n\t\t\tobserver = new PerformanceObserver(callback);\n\t\t\tobserver.observe(performanceOptions);\n\t\t}\n\t};\n\ttryOnScopeDispose(stop);\n\tif (immediate) start();\n\treturn {\n\t\tisSupported,\n\t\tstart,\n\t\tstop\n\t};\n}\n\n//#endregion\n//#region usePointer/index.ts\nconst defaultState = {\n\tx: 0,\n\ty: 0,\n\tpointerId: 0,\n\tpressure: 0,\n\ttiltX: 0,\n\ttiltY: 0,\n\twidth: 0,\n\theight: 0,\n\ttwist: 0,\n\tpointerType: null\n};\nconst keys = /* @__PURE__ */ Object.keys(defaultState);\n/**\n* Reactive pointer state.\n*\n* @see https://vueuse.org/usePointer\n* @param options\n*/\nfunction usePointer(options = {}) {\n\tconst { target = defaultWindow } = options;\n\tconst isInside = shallowRef(false);\n\tconst state = shallowRef(options.initialValue || {});\n\tObject.assign(state.value, defaultState, state.value);\n\tconst handler = (event) => {\n\t\tisInside.value = true;\n\t\tif (options.pointerTypes && !options.pointerTypes.includes(event.pointerType)) return;\n\t\tstate.value = objectPick(event, keys, false);\n\t};\n\tif (target) {\n\t\tconst listenerOptions = { passive: true };\n\t\tuseEventListener(target, [\n\t\t\t\"pointerdown\",\n\t\t\t\"pointermove\",\n\t\t\t\"pointerup\"\n\t\t], handler, listenerOptions);\n\t\tuseEventListener(target, \"pointerleave\", () => isInside.value = false, listenerOptions);\n\t}\n\treturn {\n\t\t...toRefs(state),\n\t\tisInside\n\t};\n}\n\n//#endregion\n//#region usePointerLock/index.ts\n/**\n* Reactive pointer lock.\n*\n* @see https://vueuse.org/usePointerLock\n* @param target\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction usePointerLock(target, options = {}) {\n\tconst { document: document$1 = defaultDocument } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => document$1 && \"pointerLockElement\" in document$1);\n\tconst element = shallowRef();\n\tconst triggerElement = shallowRef();\n\tlet targetElement;\n\tif (isSupported.value) {\n\t\tconst listenerOptions = { passive: true };\n\t\tuseEventListener(document$1, \"pointerlockchange\", () => {\n\t\t\tvar _pointerLockElement;\n\t\t\tconst currentElement = (_pointerLockElement = document$1.pointerLockElement) !== null && _pointerLockElement !== void 0 ? _pointerLockElement : element.value;\n\t\t\tif (targetElement && currentElement === targetElement) {\n\t\t\t\telement.value = document$1.pointerLockElement;\n\t\t\t\tif (!element.value) targetElement = triggerElement.value = null;\n\t\t\t}\n\t\t}, listenerOptions);\n\t\tuseEventListener(document$1, \"pointerlockerror\", () => {\n\t\t\tvar _pointerLockElement2;\n\t\t\tconst currentElement = (_pointerLockElement2 = document$1.pointerLockElement) !== null && _pointerLockElement2 !== void 0 ? _pointerLockElement2 : element.value;\n\t\t\tif (targetElement && currentElement === targetElement) {\n\t\t\t\tconst action = document$1.pointerLockElement ? \"release\" : \"acquire\";\n\t\t\t\tthrow new Error(`Failed to ${action} pointer lock.`);\n\t\t\t}\n\t\t}, listenerOptions);\n\t}\n\tasync function lock(e) {\n\t\tvar _unrefElement;\n\t\tif (!isSupported.value) throw new Error(\"Pointer Lock API is not supported by your browser.\");\n\t\ttriggerElement.value = e instanceof Event ? e.currentTarget : null;\n\t\ttargetElement = e instanceof Event ? (_unrefElement = unrefElement(target)) !== null && _unrefElement !== void 0 ? _unrefElement : triggerElement.value : unrefElement(e);\n\t\tif (!targetElement) throw new Error(\"Target element undefined.\");\n\t\ttargetElement.requestPointerLock();\n\t\treturn await until(element).toBe(targetElement);\n\t}\n\tasync function unlock() {\n\t\tif (!element.value) return false;\n\t\tdocument$1.exitPointerLock();\n\t\tawait until(element).toBeNull();\n\t\treturn true;\n\t}\n\treturn {\n\t\tisSupported,\n\t\telement,\n\t\ttriggerElement,\n\t\tlock,\n\t\tunlock\n\t};\n}\n\n//#endregion\n//#region usePointerSwipe/index.ts\n/**\n* Reactive swipe detection based on PointerEvents.\n*\n* @see https://vueuse.org/usePointerSwipe\n* @param target\n* @param options\n*/\nfunction usePointerSwipe(target, options = {}) {\n\tconst targetRef = toRef(target);\n\tconst { threshold = 50, onSwipe, onSwipeEnd, onSwipeStart, disableTextSelect = false } = options;\n\tconst posStart = reactive({\n\t\tx: 0,\n\t\ty: 0\n\t});\n\tconst updatePosStart = (x, y) => {\n\t\tposStart.x = x;\n\t\tposStart.y = y;\n\t};\n\tconst posEnd = reactive({\n\t\tx: 0,\n\t\ty: 0\n\t});\n\tconst updatePosEnd = (x, y) => {\n\t\tposEnd.x = x;\n\t\tposEnd.y = y;\n\t};\n\tconst distanceX = computed(() => posStart.x - posEnd.x);\n\tconst distanceY = computed(() => posStart.y - posEnd.y);\n\tconst { max, abs } = Math;\n\tconst isThresholdExceeded = computed(() => max(abs(distanceX.value), abs(distanceY.value)) >= threshold);\n\tconst isSwiping = shallowRef(false);\n\tconst isPointerDown = shallowRef(false);\n\tconst direction = computed(() => {\n\t\tif (!isThresholdExceeded.value) return \"none\";\n\t\tif (abs(distanceX.value) > abs(distanceY.value)) return distanceX.value > 0 ? \"left\" : \"right\";\n\t\telse return distanceY.value > 0 ? \"up\" : \"down\";\n\t});\n\tconst eventIsAllowed = (e) => {\n\t\tvar _ref, _options$pointerTypes, _options$pointerTypes2;\n\t\tconst isReleasingButton = e.buttons === 0;\n\t\tconst isPrimaryButton = e.buttons === 1;\n\t\treturn (_ref = (_options$pointerTypes = (_options$pointerTypes2 = options.pointerTypes) === null || _options$pointerTypes2 === void 0 ? void 0 : _options$pointerTypes2.includes(e.pointerType)) !== null && _options$pointerTypes !== void 0 ? _options$pointerTypes : isReleasingButton || isPrimaryButton) !== null && _ref !== void 0 ? _ref : true;\n\t};\n\tconst listenerOptions = { passive: true };\n\tconst stops = [\n\t\tuseEventListener(target, \"pointerdown\", (e) => {\n\t\t\tif (!eventIsAllowed(e)) return;\n\t\t\tisPointerDown.value = true;\n\t\t\tconst eventTarget = e.target;\n\t\t\teventTarget === null || eventTarget === void 0 || eventTarget.setPointerCapture(e.pointerId);\n\t\t\tconst { clientX: x, clientY: y } = e;\n\t\t\tupdatePosStart(x, y);\n\t\t\tupdatePosEnd(x, y);\n\t\t\tonSwipeStart === null || onSwipeStart === void 0 || onSwipeStart(e);\n\t\t}, listenerOptions),\n\t\tuseEventListener(target, \"pointermove\", (e) => {\n\t\t\tif (!eventIsAllowed(e)) return;\n\t\t\tif (!isPointerDown.value) return;\n\t\t\tconst { clientX: x, clientY: y } = e;\n\t\t\tupdatePosEnd(x, y);\n\t\t\tif (!isSwiping.value && isThresholdExceeded.value) isSwiping.value = true;\n\t\t\tif (isSwiping.value) onSwipe === null || onSwipe === void 0 || onSwipe(e);\n\t\t}, listenerOptions),\n\t\tuseEventListener(target, \"pointerup\", (e) => {\n\t\t\tif (!eventIsAllowed(e)) return;\n\t\t\tif (isSwiping.value) onSwipeEnd === null || onSwipeEnd === void 0 || onSwipeEnd(e, direction.value);\n\t\t\tisPointerDown.value = false;\n\t\t\tisSwiping.value = false;\n\t\t}, listenerOptions)\n\t];\n\ttryOnMounted(() => {\n\t\tvar _targetRef$value;\n\t\t(_targetRef$value = targetRef.value) === null || _targetRef$value === void 0 || (_targetRef$value = _targetRef$value.style) === null || _targetRef$value === void 0 || _targetRef$value.setProperty(\"touch-action\", \"pan-y\");\n\t\tif (disableTextSelect) {\n\t\t\tvar _targetRef$value2, _targetRef$value3, _targetRef$value4;\n\t\t\t(_targetRef$value2 = targetRef.value) === null || _targetRef$value2 === void 0 || (_targetRef$value2 = _targetRef$value2.style) === null || _targetRef$value2 === void 0 || _targetRef$value2.setProperty(\"-webkit-user-select\", \"none\");\n\t\t\t(_targetRef$value3 = targetRef.value) === null || _targetRef$value3 === void 0 || (_targetRef$value3 = _targetRef$value3.style) === null || _targetRef$value3 === void 0 || _targetRef$value3.setProperty(\"-ms-user-select\", \"none\");\n\t\t\t(_targetRef$value4 = targetRef.value) === null || _targetRef$value4 === void 0 || (_targetRef$value4 = _targetRef$value4.style) === null || _targetRef$value4 === void 0 || _targetRef$value4.setProperty(\"user-select\", \"none\");\n\t\t}\n\t});\n\tconst stop = () => stops.forEach((s) => s());\n\treturn {\n\t\tisSwiping: readonly(isSwiping),\n\t\tdirection: readonly(direction),\n\t\tposStart: readonly(posStart),\n\t\tposEnd: readonly(posEnd),\n\t\tdistanceX,\n\t\tdistanceY,\n\t\tstop\n\t};\n}\n\n//#endregion\n//#region usePreferredColorScheme/index.ts\n/**\n* Reactive prefers-color-scheme media query.\n*\n* @see https://vueuse.org/usePreferredColorScheme\n* @param [options]\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction usePreferredColorScheme(options) {\n\tconst isLight = useMediaQuery(\"(prefers-color-scheme: light)\", options);\n\tconst isDark = useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n\treturn computed(() => {\n\t\tif (isDark.value) return \"dark\";\n\t\tif (isLight.value) return \"light\";\n\t\treturn \"no-preference\";\n\t});\n}\n\n//#endregion\n//#region usePreferredContrast/index.ts\n/**\n* Reactive prefers-contrast media query.\n*\n* @see https://vueuse.org/usePreferredContrast\n* @param [options]\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction usePreferredContrast(options) {\n\tconst isMore = useMediaQuery(\"(prefers-contrast: more)\", options);\n\tconst isLess = useMediaQuery(\"(prefers-contrast: less)\", options);\n\tconst isCustom = useMediaQuery(\"(prefers-contrast: custom)\", options);\n\treturn computed(() => {\n\t\tif (isMore.value) return \"more\";\n\t\tif (isLess.value) return \"less\";\n\t\tif (isCustom.value) return \"custom\";\n\t\treturn \"no-preference\";\n\t});\n}\n\n//#endregion\n//#region usePreferredLanguages/index.ts\n/**\n* Reactive Navigator Languages.\n*\n* @see https://vueuse.org/usePreferredLanguages\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction usePreferredLanguages(options = {}) {\n\tconst { window: window$1 = defaultWindow } = options;\n\tif (!window$1) return shallowRef([\"en\"]);\n\tconst navigator$1 = window$1.navigator;\n\tconst value = shallowRef(navigator$1.languages);\n\tuseEventListener(window$1, \"languagechange\", () => {\n\t\tvalue.value = navigator$1.languages;\n\t}, { passive: true });\n\treturn value;\n}\n\n//#endregion\n//#region usePreferredReducedMotion/index.ts\n/**\n* Reactive prefers-reduced-motion media query.\n*\n* @see https://vueuse.org/usePreferredReducedMotion\n* @param [options]\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction usePreferredReducedMotion(options) {\n\tconst isReduced = useMediaQuery(\"(prefers-reduced-motion: reduce)\", options);\n\treturn computed(() => {\n\t\tif (isReduced.value) return \"reduce\";\n\t\treturn \"no-preference\";\n\t});\n}\n\n//#endregion\n//#region usePreferredReducedTransparency/index.ts\n/**\n* Reactive prefers-reduced-transparency media query.\n*\n* @see https://vueuse.org/usePreferredReducedTransparency\n* @param [options]\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction usePreferredReducedTransparency(options) {\n\tconst isReduced = useMediaQuery(\"(prefers-reduced-transparency: reduce)\", options);\n\treturn computed(() => {\n\t\tif (isReduced.value) return \"reduce\";\n\t\treturn \"no-preference\";\n\t});\n}\n\n//#endregion\n//#region usePrevious/index.ts\nfunction usePrevious(value, initialValue) {\n\tconst previous = shallowRef(initialValue);\n\twatch(toRef(value), (_, oldValue) => {\n\t\tprevious.value = oldValue;\n\t}, { flush: \"sync\" });\n\treturn readonly(previous);\n}\n\n//#endregion\n//#region useScreenSafeArea/index.ts\nconst topVarName = \"--vueuse-safe-area-top\";\nconst rightVarName = \"--vueuse-safe-area-right\";\nconst bottomVarName = \"--vueuse-safe-area-bottom\";\nconst leftVarName = \"--vueuse-safe-area-left\";\n/**\n* Reactive `env(safe-area-inset-*)`\n*\n* @see https://vueuse.org/useScreenSafeArea\n*/\nfunction useScreenSafeArea() {\n\tconst top = shallowRef(\"\");\n\tconst right = shallowRef(\"\");\n\tconst bottom = shallowRef(\"\");\n\tconst left = shallowRef(\"\");\n\tif (isClient) {\n\t\tconst topCssVar = useCssVar(topVarName);\n\t\tconst rightCssVar = useCssVar(rightVarName);\n\t\tconst bottomCssVar = useCssVar(bottomVarName);\n\t\tconst leftCssVar = useCssVar(leftVarName);\n\t\ttopCssVar.value = \"env(safe-area-inset-top, 0px)\";\n\t\trightCssVar.value = \"env(safe-area-inset-right, 0px)\";\n\t\tbottomCssVar.value = \"env(safe-area-inset-bottom, 0px)\";\n\t\tleftCssVar.value = \"env(safe-area-inset-left, 0px)\";\n\t\ttryOnMounted(update);\n\t\tuseEventListener(\"resize\", useDebounceFn(update), { passive: true });\n\t}\n\tfunction update() {\n\t\ttop.value = getValue(topVarName);\n\t\tright.value = getValue(rightVarName);\n\t\tbottom.value = getValue(bottomVarName);\n\t\tleft.value = getValue(leftVarName);\n\t}\n\treturn {\n\t\ttop,\n\t\tright,\n\t\tbottom,\n\t\tleft,\n\t\tupdate\n\t};\n}\nfunction getValue(position) {\n\treturn getComputedStyle(document.documentElement).getPropertyValue(position);\n}\n\n//#endregion\n//#region useScriptTag/index.ts\n/**\n* Async script tag loading.\n*\n* @see https://vueuse.org/useScriptTag\n* @param src\n* @param onLoaded\n* @param options\n*/\nfunction useScriptTag(src, onLoaded = noop, options = {}) {\n\tconst { immediate = true, manual = false, type = \"text/javascript\", async = true, crossOrigin, referrerPolicy, noModule, defer, document: document$1 = defaultDocument, attrs = {}, nonce = void 0 } = options;\n\tconst scriptTag = shallowRef(null);\n\tlet _promise = null;\n\t/**\n\t* Load the script specified via `src`.\n\t*\n\t* @param waitForScriptLoad Whether if the Promise should resolve once the \"load\" event is emitted by the <script> attribute, or right after appending it to the DOM.\n\t* @returns Promise<HTMLScriptElement>\n\t*/\n\tconst loadScript = (waitForScriptLoad) => new Promise((resolve, reject) => {\n\t\tconst resolveWithElement = (el$1) => {\n\t\t\tscriptTag.value = el$1;\n\t\t\tresolve(el$1);\n\t\t\treturn el$1;\n\t\t};\n\t\tif (!document$1) {\n\t\t\tresolve(false);\n\t\t\treturn;\n\t\t}\n\t\tlet shouldAppend = false;\n\t\tlet el = document$1.querySelector(`script[src=\"${toValue(src)}\"]`);\n\t\tif (!el) {\n\t\t\tel = document$1.createElement(\"script\");\n\t\t\tel.type = type;\n\t\t\tel.async = async;\n\t\t\tel.src = toValue(src);\n\t\t\tif (defer) el.defer = defer;\n\t\t\tif (crossOrigin) el.crossOrigin = crossOrigin;\n\t\t\tif (noModule) el.noModule = noModule;\n\t\t\tif (referrerPolicy) el.referrerPolicy = referrerPolicy;\n\t\t\tif (nonce) el.nonce = nonce;\n\t\t\tObject.entries(attrs).forEach(([name, value]) => el === null || el === void 0 ? void 0 : el.setAttribute(name, value));\n\t\t\tshouldAppend = true;\n\t\t} else if (el.hasAttribute(\"data-loaded\")) resolveWithElement(el);\n\t\tconst listenerOptions = { passive: true };\n\t\tuseEventListener(el, \"error\", (event) => reject(event), listenerOptions);\n\t\tuseEventListener(el, \"abort\", (event) => reject(event), listenerOptions);\n\t\tuseEventListener(el, \"load\", () => {\n\t\t\tel.setAttribute(\"data-loaded\", \"true\");\n\t\t\tonLoaded(el);\n\t\t\tresolveWithElement(el);\n\t\t}, listenerOptions);\n\t\tif (shouldAppend) el = document$1.head.appendChild(el);\n\t\tif (!waitForScriptLoad) resolveWithElement(el);\n\t});\n\t/**\n\t* Exposed singleton wrapper for `loadScript`, avoiding calling it twice.\n\t*\n\t* @param waitForScriptLoad Whether if the Promise should resolve once the \"load\" event is emitted by the <script> attribute, or right after appending it to the DOM.\n\t* @returns Promise<HTMLScriptElement>\n\t*/\n\tconst load = (waitForScriptLoad = true) => {\n\t\tif (!_promise) _promise = loadScript(waitForScriptLoad);\n\t\treturn _promise;\n\t};\n\t/**\n\t* Unload the script specified by `src`.\n\t*/\n\tconst unload = () => {\n\t\tif (!document$1) return;\n\t\t_promise = null;\n\t\tif (scriptTag.value) scriptTag.value = null;\n\t\tconst el = document$1.querySelector(`script[src=\"${toValue(src)}\"]`);\n\t\tif (el) document$1.head.removeChild(el);\n\t};\n\tif (immediate && !manual) tryOnMounted(load);\n\tif (!manual) tryOnUnmounted(unload);\n\treturn {\n\t\tscriptTag,\n\t\tload,\n\t\tunload\n\t};\n}\n\n//#endregion\n//#region useScrollLock/index.ts\nfunction checkOverflowScroll(ele) {\n\tconst style = window.getComputedStyle(ele);\n\tif (style.overflowX === \"scroll\" || style.overflowY === \"scroll\" || style.overflowX === \"auto\" && ele.clientWidth < ele.scrollWidth || style.overflowY === \"auto\" && ele.clientHeight < ele.scrollHeight) return true;\n\telse {\n\t\tconst parent = ele.parentNode;\n\t\tif (!parent || parent.tagName === \"BODY\") return false;\n\t\treturn checkOverflowScroll(parent);\n\t}\n}\nfunction preventDefault(rawEvent) {\n\tconst e = rawEvent || window.event;\n\tconst _target = e.target;\n\tif (checkOverflowScroll(_target)) return false;\n\tif (e.touches.length > 1) return true;\n\tif (e.preventDefault) e.preventDefault();\n\treturn false;\n}\nconst elInitialOverflow = /* @__PURE__ */ new WeakMap();\n/**\n* Lock scrolling of the element.\n*\n* @see https://vueuse.org/useScrollLock\n* @param element\n*/\nfunction useScrollLock(element, initialState = false) {\n\tconst isLocked = shallowRef(initialState);\n\tlet stopTouchMoveListener = null;\n\tlet initialOverflow = \"\";\n\twatch(toRef(element), (el) => {\n\t\tconst target = resolveElement(toValue(el));\n\t\tif (target) {\n\t\t\tconst ele = target;\n\t\t\tif (!elInitialOverflow.get(ele)) elInitialOverflow.set(ele, ele.style.overflow);\n\t\t\tif (ele.style.overflow !== \"hidden\") initialOverflow = ele.style.overflow;\n\t\t\tif (ele.style.overflow === \"hidden\") return isLocked.value = true;\n\t\t\tif (isLocked.value) return ele.style.overflow = \"hidden\";\n\t\t}\n\t}, { immediate: true });\n\tconst lock = () => {\n\t\tconst el = resolveElement(toValue(element));\n\t\tif (!el || isLocked.value) return;\n\t\tif (isIOS) stopTouchMoveListener = useEventListener(el, \"touchmove\", (e) => {\n\t\t\tpreventDefault(e);\n\t\t}, { passive: false });\n\t\tel.style.overflow = \"hidden\";\n\t\tisLocked.value = true;\n\t};\n\tconst unlock = () => {\n\t\tconst el = resolveElement(toValue(element));\n\t\tif (!el || !isLocked.value) return;\n\t\tif (isIOS) stopTouchMoveListener === null || stopTouchMoveListener === void 0 || stopTouchMoveListener();\n\t\tel.style.overflow = initialOverflow;\n\t\telInitialOverflow.delete(el);\n\t\tisLocked.value = false;\n\t};\n\ttryOnScopeDispose(unlock);\n\treturn computed({\n\t\tget() {\n\t\t\treturn isLocked.value;\n\t\t},\n\t\tset(v) {\n\t\t\tif (v) lock();\n\t\t\telse unlock();\n\t\t}\n\t});\n}\n\n//#endregion\n//#region useSessionStorage/index.ts\n/**\n* Reactive SessionStorage.\n*\n* @see https://vueuse.org/useSessionStorage\n* @param key\n* @param initialValue\n* @param options\n*/\nfunction useSessionStorage(key, initialValue, options = {}) {\n\tconst { window: window$1 = defaultWindow } = options;\n\treturn useStorage(key, initialValue, window$1 === null || window$1 === void 0 ? void 0 : window$1.sessionStorage, options);\n}\n\n//#endregion\n//#region useShare/index.ts\n/**\n* Reactive Web Share API.\n*\n* @see https://vueuse.org/useShare\n* @param shareOptions\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useShare(shareOptions = {}, options = {}) {\n\tconst { navigator: navigator$1 = defaultNavigator } = options;\n\tconst _navigator = navigator$1;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => _navigator && \"canShare\" in _navigator);\n\tconst share = async (overrideOptions = {}) => {\n\t\tif (isSupported.value) {\n\t\t\tconst data = {\n\t\t\t\t...toValue(shareOptions),\n\t\t\t\t...toValue(overrideOptions)\n\t\t\t};\n\t\t\tlet granted = false;\n\t\t\tif (_navigator.canShare) granted = _navigator.canShare(data);\n\t\t\tif (granted) return _navigator.share(data);\n\t\t}\n\t};\n\treturn {\n\t\tisSupported,\n\t\tshare\n\t};\n}\n\n//#endregion\n//#region useSorted/index.ts\nconst defaultSortFn = (source, compareFn) => source.sort(compareFn);\nconst defaultCompare = (a, b) => a - b;\nfunction useSorted(...args) {\n\tconst [source] = args;\n\tlet compareFn = defaultCompare;\n\tlet options = {};\n\tif (args.length === 2) if (typeof args[1] === \"object\") {\n\t\tvar _options$compareFn;\n\t\toptions = args[1];\n\t\tcompareFn = (_options$compareFn = options.compareFn) !== null && _options$compareFn !== void 0 ? _options$compareFn : defaultCompare;\n\t} else {\n\t\tvar _args$;\n\t\tcompareFn = (_args$ = args[1]) !== null && _args$ !== void 0 ? _args$ : defaultCompare;\n\t}\n\telse if (args.length > 2) {\n\t\tvar _args$2, _args$3;\n\t\tcompareFn = (_args$2 = args[1]) !== null && _args$2 !== void 0 ? _args$2 : defaultCompare;\n\t\toptions = (_args$3 = args[2]) !== null && _args$3 !== void 0 ? _args$3 : {};\n\t}\n\tconst { dirty = false, sortFn = defaultSortFn } = options;\n\tif (!dirty) return computed(() => sortFn([...toValue(source)], compareFn));\n\twatchEffect(() => {\n\t\tconst result = sortFn(toValue(source), compareFn);\n\t\tif (isRef(source)) source.value = result;\n\t\telse source.splice(0, source.length, ...result);\n\t});\n\treturn source;\n}\n\n//#endregion\n//#region useSpeechRecognition/index.ts\n/**\n* Reactive SpeechRecognition.\n*\n* @see https://vueuse.org/useSpeechRecognition\n* @see https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition SpeechRecognition\n* @param options\n*/\nfunction useSpeechRecognition(options = {}) {\n\tconst { interimResults = true, continuous = true, maxAlternatives = 1, window: window$1 = defaultWindow } = options;\n\tconst lang = toRef(options.lang || \"en-US\");\n\tconst isListening = shallowRef(false);\n\tconst isFinal = shallowRef(false);\n\tconst result = shallowRef(\"\");\n\tconst error = shallowRef(void 0);\n\tlet recognition;\n\tconst start = () => {\n\t\tisListening.value = true;\n\t};\n\tconst stop = () => {\n\t\tisListening.value = false;\n\t};\n\tconst toggle = (value = !isListening.value) => {\n\t\tif (value) start();\n\t\telse stop();\n\t};\n\tconst SpeechRecognition = window$1 && (window$1.SpeechRecognition || window$1.webkitSpeechRecognition);\n\tconst isSupported = /* @__PURE__ */ useSupported(() => SpeechRecognition);\n\tif (isSupported.value) {\n\t\trecognition = new SpeechRecognition();\n\t\trecognition.continuous = continuous;\n\t\trecognition.interimResults = interimResults;\n\t\trecognition.lang = toValue(lang);\n\t\trecognition.maxAlternatives = maxAlternatives;\n\t\trecognition.onstart = () => {\n\t\t\tisListening.value = true;\n\t\t\tisFinal.value = false;\n\t\t};\n\t\twatch(lang, (lang$1) => {\n\t\t\tif (recognition && !isListening.value) recognition.lang = lang$1;\n\t\t});\n\t\trecognition.onresult = (event) => {\n\t\t\tconst currentResult = event.results[event.resultIndex];\n\t\t\tconst { transcript } = currentResult[0];\n\t\t\tisFinal.value = currentResult.isFinal;\n\t\t\tresult.value = transcript;\n\t\t\terror.value = void 0;\n\t\t};\n\t\trecognition.onerror = (event) => {\n\t\t\terror.value = event;\n\t\t};\n\t\trecognition.onend = () => {\n\t\t\tisListening.value = false;\n\t\t\trecognition.lang = toValue(lang);\n\t\t};\n\t\twatch(isListening, (newValue, oldValue) => {\n\t\t\tif (newValue === oldValue) return;\n\t\t\ttry {\n\t\t\t\tif (newValue) recognition.start();\n\t\t\t\telse recognition.stop();\n\t\t\t} catch (err) {\n\t\t\t\terror.value = err;\n\t\t\t}\n\t\t});\n\t}\n\ttryOnScopeDispose(() => {\n\t\tstop();\n\t});\n\treturn {\n\t\tisSupported,\n\t\tisListening,\n\t\tisFinal,\n\t\trecognition,\n\t\tresult,\n\t\terror,\n\t\ttoggle,\n\t\tstart,\n\t\tstop\n\t};\n}\n\n//#endregion\n//#region useSpeechSynthesis/index.ts\n/**\n* Reactive SpeechSynthesis.\n*\n* @see https://vueuse.org/useSpeechSynthesis\n* @see https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis SpeechSynthesis\n*/\nfunction useSpeechSynthesis(text, options = {}) {\n\tconst { pitch = 1, rate = 1, volume = 1, window: window$1 = defaultWindow, onBoundary } = options;\n\tconst synth = window$1 && window$1.speechSynthesis;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => synth);\n\tconst isPlaying = shallowRef(false);\n\tconst status = shallowRef(\"init\");\n\tconst spokenText = toRef(text || \"\");\n\tconst lang = toRef(options.lang || \"en-US\");\n\tconst error = shallowRef(void 0);\n\tconst toggle = (value = !isPlaying.value) => {\n\t\tisPlaying.value = value;\n\t};\n\tconst bindEventsForUtterance = (utterance$1) => {\n\t\tutterance$1.lang = toValue(lang);\n\t\tutterance$1.voice = toValue(options.voice) || null;\n\t\tutterance$1.pitch = toValue(pitch);\n\t\tutterance$1.rate = toValue(rate);\n\t\tutterance$1.volume = toValue(volume);\n\t\tutterance$1.onstart = () => {\n\t\t\tisPlaying.value = true;\n\t\t\tstatus.value = \"play\";\n\t\t};\n\t\tutterance$1.onpause = () => {\n\t\t\tisPlaying.value = false;\n\t\t\tstatus.value = \"pause\";\n\t\t};\n\t\tutterance$1.onresume = () => {\n\t\t\tisPlaying.value = true;\n\t\t\tstatus.value = \"play\";\n\t\t};\n\t\tutterance$1.onend = () => {\n\t\t\tisPlaying.value = false;\n\t\t\tstatus.value = \"end\";\n\t\t};\n\t\tutterance$1.onerror = (event) => {\n\t\t\terror.value = event;\n\t\t};\n\t\tutterance$1.onboundary = (event) => {\n\t\t\tonBoundary === null || onBoundary === void 0 || onBoundary(event);\n\t\t};\n\t};\n\tconst utterance = computed(() => {\n\t\tisPlaying.value = false;\n\t\tstatus.value = \"init\";\n\t\tconst newUtterance = new SpeechSynthesisUtterance(spokenText.value);\n\t\tbindEventsForUtterance(newUtterance);\n\t\treturn newUtterance;\n\t});\n\tconst speak = () => {\n\t\tsynth.cancel();\n\t\tif (utterance) synth.speak(utterance.value);\n\t};\n\tconst stop = () => {\n\t\tsynth.cancel();\n\t\tisPlaying.value = false;\n\t};\n\tif (isSupported.value) {\n\t\tbindEventsForUtterance(utterance.value);\n\t\twatch(lang, (lang$1) => {\n\t\t\tif (utterance.value && !isPlaying.value) utterance.value.lang = lang$1;\n\t\t});\n\t\tif (options.voice) watch(options.voice, () => {\n\t\t\tsynth.cancel();\n\t\t});\n\t\twatch(isPlaying, () => {\n\t\t\tif (isPlaying.value) synth.resume();\n\t\t\telse synth.pause();\n\t\t});\n\t}\n\ttryOnScopeDispose(() => {\n\t\tisPlaying.value = false;\n\t});\n\treturn {\n\t\tisSupported,\n\t\tisPlaying,\n\t\tstatus,\n\t\tutterance,\n\t\terror,\n\t\tstop,\n\t\ttoggle,\n\t\tspeak\n\t};\n}\n\n//#endregion\n//#region useStepper/index.ts\n/* @__NO_SIDE_EFFECTS__ */\nfunction useStepper(steps, initialStep) {\n\tconst stepsRef = ref(steps);\n\tconst stepNames = computed(() => Array.isArray(stepsRef.value) ? stepsRef.value : Object.keys(stepsRef.value));\n\tconst index = ref(stepNames.value.indexOf(initialStep !== null && initialStep !== void 0 ? initialStep : stepNames.value[0]));\n\tconst current = computed(() => at(index.value));\n\tconst isFirst = computed(() => index.value === 0);\n\tconst isLast = computed(() => index.value === stepNames.value.length - 1);\n\tconst next = computed(() => stepNames.value[index.value + 1]);\n\tconst previous = computed(() => stepNames.value[index.value - 1]);\n\tfunction at(index$1) {\n\t\tif (Array.isArray(stepsRef.value)) return stepsRef.value[index$1];\n\t\treturn stepsRef.value[stepNames.value[index$1]];\n\t}\n\tfunction get(step) {\n\t\tif (!stepNames.value.includes(step)) return;\n\t\treturn at(stepNames.value.indexOf(step));\n\t}\n\tfunction goTo(step) {\n\t\tif (stepNames.value.includes(step)) index.value = stepNames.value.indexOf(step);\n\t}\n\tfunction goToNext() {\n\t\tif (isLast.value) return;\n\t\tindex.value++;\n\t}\n\tfunction goToPrevious() {\n\t\tif (isFirst.value) return;\n\t\tindex.value--;\n\t}\n\tfunction goBackTo(step) {\n\t\tif (isAfter(step)) goTo(step);\n\t}\n\tfunction isNext(step) {\n\t\treturn stepNames.value.indexOf(step) === index.value + 1;\n\t}\n\tfunction isPrevious(step) {\n\t\treturn stepNames.value.indexOf(step) === index.value - 1;\n\t}\n\tfunction isCurrent(step) {\n\t\treturn stepNames.value.indexOf(step) === index.value;\n\t}\n\tfunction isBefore(step) {\n\t\treturn index.value < stepNames.value.indexOf(step);\n\t}\n\tfunction isAfter(step) {\n\t\treturn index.value > stepNames.value.indexOf(step);\n\t}\n\treturn {\n\t\tsteps: stepsRef,\n\t\tstepNames,\n\t\tindex,\n\t\tcurrent,\n\t\tnext,\n\t\tprevious,\n\t\tisFirst,\n\t\tisLast,\n\t\tat,\n\t\tget,\n\t\tgoTo,\n\t\tgoToNext,\n\t\tgoToPrevious,\n\t\tgoBackTo,\n\t\tisNext,\n\t\tisPrevious,\n\t\tisCurrent,\n\t\tisBefore,\n\t\tisAfter\n\t};\n}\n\n//#endregion\n//#region useStorageAsync/index.ts\n/**\n* Reactive Storage in with async support.\n*\n* @see https://vueuse.org/useStorageAsync\n* @param key\n* @param initialValue\n* @param storage\n* @param options\n*/\nfunction useStorageAsync(key, initialValue, storage, options = {}) {\n\tvar _options$serializer;\n\tconst { flush = \"pre\", deep = true, listenToStorageChanges = true, writeDefaults = true, mergeDefaults = false, shallow, window: window$1 = defaultWindow, eventFilter, onError = (e) => {\n\t\tconsole.error(e);\n\t}, onReady } = options;\n\tconst rawInit = toValue(initialValue);\n\tconst type = guessSerializerType(rawInit);\n\tconst data = (shallow ? shallowRef : ref)(toValue(initialValue));\n\tconst serializer = (_options$serializer = options.serializer) !== null && _options$serializer !== void 0 ? _options$serializer : StorageSerializers[type];\n\tif (!storage) try {\n\t\tstorage = getSSRHandler(\"getDefaultStorageAsync\", () => defaultWindow === null || defaultWindow === void 0 ? void 0 : defaultWindow.localStorage)();\n\t} catch (e) {\n\t\tonError(e);\n\t}\n\tasync function read(event) {\n\t\tif (!storage || event && event.key !== key) return;\n\t\ttry {\n\t\t\tconst rawValue = event ? event.newValue : await storage.getItem(key);\n\t\t\tif (rawValue == null) {\n\t\t\t\tdata.value = rawInit;\n\t\t\t\tif (writeDefaults && rawInit !== null) await storage.setItem(key, await serializer.write(rawInit));\n\t\t\t} else if (mergeDefaults) {\n\t\t\t\tconst value = await serializer.read(rawValue);\n\t\t\t\tif (typeof mergeDefaults === \"function\") data.value = mergeDefaults(value, rawInit);\n\t\t\t\telse if (type === \"object\" && !Array.isArray(value)) data.value = {\n\t\t\t\t\t...rawInit,\n\t\t\t\t\t...value\n\t\t\t\t};\n\t\t\t\telse data.value = value;\n\t\t\t} else data.value = await serializer.read(rawValue);\n\t\t} catch (e) {\n\t\t\tonError(e);\n\t\t}\n\t}\n\tconst promise = new Promise((resolve) => {\n\t\tread().then(() => {\n\t\t\tonReady === null || onReady === void 0 || onReady(data.value);\n\t\t\tresolve(data);\n\t\t});\n\t});\n\tif (window$1 && listenToStorageChanges) useEventListener(window$1, \"storage\", (e) => Promise.resolve().then(() => read(e)), { passive: true });\n\tif (storage) watchWithFilter(data, async () => {\n\t\ttry {\n\t\t\tif (data.value == null) await storage.removeItem(key);\n\t\t\telse await storage.setItem(key, await serializer.write(data.value));\n\t\t} catch (e) {\n\t\t\tonError(e);\n\t\t}\n\t}, {\n\t\tflush,\n\t\tdeep,\n\t\teventFilter\n\t});\n\tObject.assign(data, {\n\t\tthen: promise.then.bind(promise),\n\t\tcatch: promise.catch.bind(promise)\n\t});\n\treturn data;\n}\n\n//#endregion\n//#region useStyleTag/index.ts\nlet _id = 0;\n/**\n* Inject <style> element in head.\n*\n* Overload: Omitted id\n*\n* @see https://vueuse.org/useStyleTag\n* @param css\n* @param options\n*/\nfunction useStyleTag(css, options = {}) {\n\tconst isLoaded = shallowRef(false);\n\tconst { document: document$1 = defaultDocument, immediate = true, manual = false, id = `vueuse_styletag_${++_id}` } = options;\n\tconst cssRef = shallowRef(css);\n\tlet stop = () => {};\n\tconst load = () => {\n\t\tif (!document$1) return;\n\t\tconst el = document$1.getElementById(id) || document$1.createElement(\"style\");\n\t\tif (!el.isConnected) {\n\t\t\tel.id = id;\n\t\t\tif (options.nonce) el.nonce = options.nonce;\n\t\t\tif (options.media) el.media = options.media;\n\t\t\tdocument$1.head.appendChild(el);\n\t\t}\n\t\tif (isLoaded.value) return;\n\t\tstop = watch(cssRef, (value) => {\n\t\t\tel.textContent = value;\n\t\t}, { immediate: true });\n\t\tisLoaded.value = true;\n\t};\n\tconst unload = () => {\n\t\tif (!document$1 || !isLoaded.value) return;\n\t\tstop();\n\t\tdocument$1.head.removeChild(document$1.getElementById(id));\n\t\tisLoaded.value = false;\n\t};\n\tif (immediate && !manual) tryOnMounted(load);\n\tif (!manual) tryOnScopeDispose(unload);\n\treturn {\n\t\tid,\n\t\tcss: cssRef,\n\t\tunload,\n\t\tload,\n\t\tisLoaded: readonly(isLoaded)\n\t};\n}\n\n//#endregion\n//#region useSwipe/index.ts\n/**\n* Reactive swipe detection.\n*\n* @see https://vueuse.org/useSwipe\n* @param target\n* @param options\n*/\nfunction useSwipe(target, options = {}) {\n\tconst { threshold = 50, onSwipe, onSwipeEnd, onSwipeStart, passive = true } = options;\n\tconst coordsStart = reactive({\n\t\tx: 0,\n\t\ty: 0\n\t});\n\tconst coordsEnd = reactive({\n\t\tx: 0,\n\t\ty: 0\n\t});\n\tconst diffX = computed(() => coordsStart.x - coordsEnd.x);\n\tconst diffY = computed(() => coordsStart.y - coordsEnd.y);\n\tconst { max, abs } = Math;\n\tconst isThresholdExceeded = computed(() => max(abs(diffX.value), abs(diffY.value)) >= threshold);\n\tconst isSwiping = shallowRef(false);\n\tconst direction = computed(() => {\n\t\tif (!isThresholdExceeded.value) return \"none\";\n\t\tif (abs(diffX.value) > abs(diffY.value)) return diffX.value > 0 ? \"left\" : \"right\";\n\t\telse return diffY.value > 0 ? \"up\" : \"down\";\n\t});\n\tconst getTouchEventCoords = (e) => [e.touches[0].clientX, e.touches[0].clientY];\n\tconst updateCoordsStart = (x, y) => {\n\t\tcoordsStart.x = x;\n\t\tcoordsStart.y = y;\n\t};\n\tconst updateCoordsEnd = (x, y) => {\n\t\tcoordsEnd.x = x;\n\t\tcoordsEnd.y = y;\n\t};\n\tconst listenerOptions = {\n\t\tpassive,\n\t\tcapture: !passive\n\t};\n\tconst onTouchEnd = (e) => {\n\t\tif (isSwiping.value) onSwipeEnd === null || onSwipeEnd === void 0 || onSwipeEnd(e, direction.value);\n\t\tisSwiping.value = false;\n\t};\n\tconst stops = [\n\t\tuseEventListener(target, \"touchstart\", (e) => {\n\t\t\tif (e.touches.length !== 1) return;\n\t\t\tconst [x, y] = getTouchEventCoords(e);\n\t\t\tupdateCoordsStart(x, y);\n\t\t\tupdateCoordsEnd(x, y);\n\t\t\tonSwipeStart === null || onSwipeStart === void 0 || onSwipeStart(e);\n\t\t}, listenerOptions),\n\t\tuseEventListener(target, \"touchmove\", (e) => {\n\t\t\tif (e.touches.length !== 1) return;\n\t\t\tconst [x, y] = getTouchEventCoords(e);\n\t\t\tupdateCoordsEnd(x, y);\n\t\t\tif (listenerOptions.capture && !listenerOptions.passive && Math.abs(diffX.value) > Math.abs(diffY.value)) e.preventDefault();\n\t\t\tif (!isSwiping.value && isThresholdExceeded.value) isSwiping.value = true;\n\t\t\tif (isSwiping.value) onSwipe === null || onSwipe === void 0 || onSwipe(e);\n\t\t}, listenerOptions),\n\t\tuseEventListener(target, [\"touchend\", \"touchcancel\"], onTouchEnd, listenerOptions)\n\t];\n\tconst stop = () => stops.forEach((s) => s());\n\treturn {\n\t\tisSwiping,\n\t\tdirection,\n\t\tcoordsStart,\n\t\tcoordsEnd,\n\t\tlengthX: diffX,\n\t\tlengthY: diffY,\n\t\tstop\n\t};\n}\n\n//#endregion\n//#region useTemplateRefsList/index.ts\n/* @__NO_SIDE_EFFECTS__ */\nfunction useTemplateRefsList() {\n\tconst refs = ref([]);\n\trefs.value.set = (el) => {\n\t\tif (el) refs.value.push(el);\n\t};\n\tonBeforeUpdate(() => {\n\t\trefs.value.length = 0;\n\t});\n\treturn refs;\n}\n\n//#endregion\n//#region useTextDirection/index.ts\n/**\n* Reactive dir of the element's text.\n*\n* @see https://vueuse.org/useTextDirection\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useTextDirection(options = {}) {\n\tconst { document: document$1 = defaultDocument, selector = \"html\", observe = false, initialValue = \"ltr\" } = options;\n\tfunction getValue$1() {\n\t\tvar _ref, _document$querySelect;\n\t\treturn (_ref = document$1 === null || document$1 === void 0 || (_document$querySelect = document$1.querySelector(selector)) === null || _document$querySelect === void 0 ? void 0 : _document$querySelect.getAttribute(\"dir\")) !== null && _ref !== void 0 ? _ref : initialValue;\n\t}\n\tconst dir = ref(getValue$1());\n\ttryOnMounted(() => dir.value = getValue$1());\n\tif (observe && document$1) useMutationObserver(document$1.querySelector(selector), () => dir.value = getValue$1(), { attributes: true });\n\treturn computed({\n\t\tget() {\n\t\t\treturn dir.value;\n\t\t},\n\t\tset(v) {\n\t\t\tvar _document$querySelect2, _document$querySelect3;\n\t\t\tdir.value = v;\n\t\t\tif (!document$1) return;\n\t\t\tif (dir.value) (_document$querySelect2 = document$1.querySelector(selector)) === null || _document$querySelect2 === void 0 || _document$querySelect2.setAttribute(\"dir\", dir.value);\n\t\t\telse (_document$querySelect3 = document$1.querySelector(selector)) === null || _document$querySelect3 === void 0 || _document$querySelect3.removeAttribute(\"dir\");\n\t\t}\n\t});\n}\n\n//#endregion\n//#region useTextSelection/index.ts\nfunction getRangesFromSelection(selection) {\n\tvar _selection$rangeCount;\n\tconst rangeCount = (_selection$rangeCount = selection.rangeCount) !== null && _selection$rangeCount !== void 0 ? _selection$rangeCount : 0;\n\treturn Array.from({ length: rangeCount }, (_, i) => selection.getRangeAt(i));\n}\n/**\n* Reactively track user text selection based on [`Window.getSelection`](https://developer.mozilla.org/en-US/docs/Web/API/Window/getSelection).\n*\n* @see https://vueuse.org/useTextSelection\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useTextSelection(options = {}) {\n\tvar _window$getSelection;\n\tconst { window: window$1 = defaultWindow } = options;\n\tconst selection = shallowRef((_window$getSelection = window$1 === null || window$1 === void 0 ? void 0 : window$1.getSelection()) !== null && _window$getSelection !== void 0 ? _window$getSelection : null);\n\tconst text = computed(() => {\n\t\tvar _selection$value$toSt, _selection$value;\n\t\treturn (_selection$value$toSt = (_selection$value = selection.value) === null || _selection$value === void 0 ? void 0 : _selection$value.toString()) !== null && _selection$value$toSt !== void 0 ? _selection$value$toSt : \"\";\n\t});\n\tconst ranges = computed(() => selection.value ? getRangesFromSelection(selection.value) : []);\n\tconst rects = computed(() => ranges.value.map((range) => range.getBoundingClientRect()));\n\tfunction onSelectionChange() {\n\t\tselection.value = null;\n\t\tif (window$1) selection.value = window$1.getSelection();\n\t}\n\tif (window$1) useEventListener(window$1.document, \"selectionchange\", onSelectionChange, { passive: true });\n\treturn {\n\t\ttext,\n\t\trects,\n\t\tranges,\n\t\tselection\n\t};\n}\n\n//#endregion\n//#region useTextareaAutosize/index.ts\n/**\n* Call window.requestAnimationFrame(), if not available, just call the function\n*\n* @param window\n* @param fn\n*/\nfunction tryRequestAnimationFrame(window$1 = defaultWindow, fn) {\n\tif (window$1 && typeof window$1.requestAnimationFrame === \"function\") window$1.requestAnimationFrame(fn);\n\telse fn();\n}\nfunction useTextareaAutosize(options = {}) {\n\tvar _options$input, _options$styleProp;\n\tconst { window: window$1 = defaultWindow } = options;\n\tconst textarea = toRef(options === null || options === void 0 ? void 0 : options.element);\n\tconst input = toRef((_options$input = options === null || options === void 0 ? void 0 : options.input) !== null && _options$input !== void 0 ? _options$input : \"\");\n\tconst styleProp = (_options$styleProp = options === null || options === void 0 ? void 0 : options.styleProp) !== null && _options$styleProp !== void 0 ? _options$styleProp : \"height\";\n\tconst textareaScrollHeight = shallowRef(1);\n\tconst textareaOldWidth = shallowRef(0);\n\tfunction triggerResize() {\n\t\tvar _textarea$value;\n\t\tif (!textarea.value) return;\n\t\tlet height = \"\";\n\t\ttextarea.value.style[styleProp] = \"1px\";\n\t\ttextareaScrollHeight.value = (_textarea$value = textarea.value) === null || _textarea$value === void 0 ? void 0 : _textarea$value.scrollHeight;\n\t\tconst _styleTarget = toValue(options === null || options === void 0 ? void 0 : options.styleTarget);\n\t\tif (_styleTarget) _styleTarget.style[styleProp] = `${textareaScrollHeight.value}px`;\n\t\telse height = `${textareaScrollHeight.value}px`;\n\t\ttextarea.value.style[styleProp] = height;\n\t}\n\twatch([input, textarea], () => nextTick(triggerResize), { immediate: true });\n\twatch(textareaScrollHeight, () => {\n\t\tvar _options$onResize;\n\t\treturn options === null || options === void 0 || (_options$onResize = options.onResize) === null || _options$onResize === void 0 ? void 0 : _options$onResize.call(options);\n\t});\n\tuseResizeObserver(textarea, ([{ contentRect }]) => {\n\t\tif (textareaOldWidth.value === contentRect.width) return;\n\t\ttryRequestAnimationFrame(window$1, () => {\n\t\t\ttextareaOldWidth.value = contentRect.width;\n\t\t\ttriggerResize();\n\t\t});\n\t});\n\tif (options === null || options === void 0 ? void 0 : options.watch) watch(options.watch, triggerResize, {\n\t\timmediate: true,\n\t\tdeep: true\n\t});\n\treturn {\n\t\ttextarea,\n\t\tinput,\n\t\ttriggerResize\n\t};\n}\n\n//#endregion\n//#region useThrottledRefHistory/index.ts\n/**\n* Shorthand for [useRefHistory](https://vueuse.org/useRefHistory) with throttled filter.\n*\n* @see https://vueuse.org/useThrottledRefHistory\n* @param source\n* @param options\n*/\nfunction useThrottledRefHistory(source, options = {}) {\n\tconst { throttle = 200, trailing = true } = options;\n\tconst filter = throttleFilter(throttle, trailing);\n\treturn { ...useRefHistory(source, {\n\t\t...options,\n\t\teventFilter: filter\n\t}) };\n}\n\n//#endregion\n//#region useTimeAgo/index.ts\nconst DEFAULT_UNITS = [\n\t{\n\t\tmax: 6e4,\n\t\tvalue: 1e3,\n\t\tname: \"second\"\n\t},\n\t{\n\t\tmax: 276e4,\n\t\tvalue: 6e4,\n\t\tname: \"minute\"\n\t},\n\t{\n\t\tmax: 72e6,\n\t\tvalue: 36e5,\n\t\tname: \"hour\"\n\t},\n\t{\n\t\tmax: 5184e5,\n\t\tvalue: 864e5,\n\t\tname: \"day\"\n\t},\n\t{\n\t\tmax: 24192e5,\n\t\tvalue: 6048e5,\n\t\tname: \"week\"\n\t},\n\t{\n\t\tmax: 28512e6,\n\t\tvalue: 2592e6,\n\t\tname: \"month\"\n\t},\n\t{\n\t\tmax: Number.POSITIVE_INFINITY,\n\t\tvalue: 31536e6,\n\t\tname: \"year\"\n\t}\n];\nconst DEFAULT_MESSAGES = {\n\tjustNow: \"just now\",\n\tpast: (n) => n.match(/\\d/) ? `${n} ago` : n,\n\tfuture: (n) => n.match(/\\d/) ? `in ${n}` : n,\n\tmonth: (n, past) => n === 1 ? past ? \"last month\" : \"next month\" : `${n} month${n > 1 ? \"s\" : \"\"}`,\n\tyear: (n, past) => n === 1 ? past ? \"last year\" : \"next year\" : `${n} year${n > 1 ? \"s\" : \"\"}`,\n\tday: (n, past) => n === 1 ? past ? \"yesterday\" : \"tomorrow\" : `${n} day${n > 1 ? \"s\" : \"\"}`,\n\tweek: (n, past) => n === 1 ? past ? \"last week\" : \"next week\" : `${n} week${n > 1 ? \"s\" : \"\"}`,\n\thour: (n) => `${n} hour${n > 1 ? \"s\" : \"\"}`,\n\tminute: (n) => `${n} minute${n > 1 ? \"s\" : \"\"}`,\n\tsecond: (n) => `${n} second${n > 1 ? \"s\" : \"\"}`,\n\tinvalid: \"\"\n};\nfunction DEFAULT_FORMATTER(date) {\n\treturn date.toISOString().slice(0, 10);\n}\n/**\n* Reactive time ago formatter.\n*\n* @see https://vueuse.org/useTimeAgo\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useTimeAgo(time, options = {}) {\n\tconst { controls: exposeControls = false, updateInterval = 3e4 } = options;\n\tconst { now,...controls } = useNow({\n\t\tinterval: updateInterval,\n\t\tcontrols: true\n\t});\n\tconst timeAgo = computed(() => formatTimeAgo(new Date(toValue(time)), options, toValue(now)));\n\tif (exposeControls) return {\n\t\ttimeAgo,\n\t\t...controls\n\t};\n\telse return timeAgo;\n}\nfunction formatTimeAgo(from, options = {}, now = Date.now()) {\n\tconst { max, messages = DEFAULT_MESSAGES, fullDateFormatter = DEFAULT_FORMATTER, units = DEFAULT_UNITS, showSecond = false, rounding = \"round\" } = options;\n\tconst roundFn = typeof rounding === \"number\" ? (n) => +n.toFixed(rounding) : Math[rounding];\n\tconst diff = +now - +from;\n\tconst absDiff = Math.abs(diff);\n\tfunction getValue$1(diff$1, unit) {\n\t\treturn roundFn(Math.abs(diff$1) / unit.value);\n\t}\n\tfunction format(diff$1, unit) {\n\t\tconst val = getValue$1(diff$1, unit);\n\t\tconst past = diff$1 > 0;\n\t\tconst str = applyFormat(unit.name, val, past);\n\t\treturn applyFormat(past ? \"past\" : \"future\", str, past);\n\t}\n\tfunction applyFormat(name, val, isPast) {\n\t\tconst formatter = messages[name];\n\t\tif (typeof formatter === \"function\") return formatter(val, isPast);\n\t\treturn formatter.replace(\"{0}\", val.toString());\n\t}\n\tif (absDiff < 6e4 && !showSecond) return messages.justNow;\n\tif (typeof max === \"number\" && absDiff > max) return fullDateFormatter(new Date(from));\n\tif (typeof max === \"string\") {\n\t\tvar _units$find;\n\t\tconst unitMax = (_units$find = units.find((i) => i.name === max)) === null || _units$find === void 0 ? void 0 : _units$find.max;\n\t\tif (unitMax && absDiff > unitMax) return fullDateFormatter(new Date(from));\n\t}\n\tfor (const [idx, unit] of units.entries()) {\n\t\tif (getValue$1(diff, unit) <= 0 && units[idx - 1]) return format(diff, units[idx - 1]);\n\t\tif (absDiff < unit.max) return format(diff, unit);\n\t}\n\treturn messages.invalid;\n}\n\n//#endregion\n//#region useTimeAgoIntl/index.ts\nconst UNITS = [\n\t{\n\t\tname: \"year\",\n\t\tms: 31536e6\n\t},\n\t{\n\t\tname: \"month\",\n\t\tms: 2592e6\n\t},\n\t{\n\t\tname: \"week\",\n\t\tms: 6048e5\n\t},\n\t{\n\t\tname: \"day\",\n\t\tms: 864e5\n\t},\n\t{\n\t\tname: \"hour\",\n\t\tms: 36e5\n\t},\n\t{\n\t\tname: \"minute\",\n\t\tms: 6e4\n\t},\n\t{\n\t\tname: \"second\",\n\t\tms: 1e3\n\t}\n];\nfunction useTimeAgoIntl(time, options = {}) {\n\tconst { controls: exposeControls = false, updateInterval = 3e4 } = options;\n\tconst { now,...controls } = useNow({\n\t\tinterval: updateInterval,\n\t\tcontrols: true\n\t});\n\tconst result = computed(() => getTimeAgoIntlResult(new Date(toValue(time)), options, toValue(now)));\n\tconst parts = computed(() => result.value.parts);\n\tconst timeAgoIntl = computed(() => formatTimeAgoIntlParts(parts.value, {\n\t\t...options,\n\t\tlocale: result.value.resolvedLocale\n\t}));\n\treturn exposeControls ? {\n\t\ttimeAgoIntl,\n\t\tparts,\n\t\t...controls\n\t} : timeAgoIntl;\n}\n/**\n* Non-reactive version of useTimeAgoIntl\n*/\nfunction formatTimeAgoIntl(from, options = {}, now = Date.now()) {\n\tconst { parts, resolvedLocale } = getTimeAgoIntlResult(from, options, now);\n\treturn formatTimeAgoIntlParts(parts, {\n\t\t...options,\n\t\tlocale: resolvedLocale\n\t});\n}\n/**\n* Get parts from `Intl.RelativeTimeFormat.formatToParts`.\n*/\nfunction getTimeAgoIntlResult(from, options = {}, now = Date.now()) {\n\tvar _options$units;\n\tconst { locale, relativeTimeFormatOptions = { numeric: \"auto\" } } = options;\n\tconst rtf = new Intl.RelativeTimeFormat(locale, relativeTimeFormatOptions);\n\tconst { locale: resolvedLocale } = rtf.resolvedOptions();\n\tconst diff = +from - +now;\n\tconst absDiff = Math.abs(diff);\n\tconst units = (_options$units = options.units) !== null && _options$units !== void 0 ? _options$units : UNITS;\n\tfor (const { name, ms } of units) if (absDiff >= ms) return {\n\t\tresolvedLocale,\n\t\tparts: rtf.formatToParts(Math.round(diff / ms), name)\n\t};\n\treturn {\n\t\tresolvedLocale,\n\t\tparts: rtf.formatToParts(0, units[units.length - 1].name)\n\t};\n}\n/**\n* Format parts into a string\n*/\nfunction formatTimeAgoIntlParts(parts, options = {}) {\n\tconst { insertSpace = true, joinParts, locale } = options;\n\tif (typeof joinParts === \"function\") return joinParts(parts, locale);\n\tif (!insertSpace) return parts.map((part) => part.value).join(\"\");\n\treturn parts.map((part) => part.value.trim()).join(\" \");\n}\n\n//#endregion\n//#region useTimeoutPoll/index.ts\nfunction useTimeoutPoll(fn, interval, options = {}) {\n\tconst { immediate = true, immediateCallback = false } = options;\n\tconst { start } = useTimeoutFn(loop, interval, { immediate });\n\tconst isActive = shallowRef(false);\n\tasync function loop() {\n\t\tif (!isActive.value) return;\n\t\tawait fn();\n\t\tstart();\n\t}\n\tfunction resume() {\n\t\tif (!isActive.value) {\n\t\t\tisActive.value = true;\n\t\t\tif (immediateCallback) fn();\n\t\t\tstart();\n\t\t}\n\t}\n\tfunction pause() {\n\t\tisActive.value = false;\n\t}\n\tif (immediate && isClient) resume();\n\ttryOnScopeDispose(pause);\n\treturn {\n\t\tisActive,\n\t\tpause,\n\t\tresume\n\t};\n}\n\n//#endregion\n//#region useTimestamp/index.ts\nfunction useTimestamp(options = {}) {\n\tconst { controls: exposeControls = false, offset = 0, immediate = true, interval = \"requestAnimationFrame\", callback } = options;\n\tconst ts = shallowRef(timestamp() + offset);\n\tconst update = () => ts.value = timestamp() + offset;\n\tconst cb = callback ? () => {\n\t\tupdate();\n\t\tcallback(ts.value);\n\t} : update;\n\tconst controls = interval === \"requestAnimationFrame\" ? useRafFn(cb, { immediate }) : useIntervalFn(cb, interval, { immediate });\n\tif (exposeControls) return {\n\t\ttimestamp: ts,\n\t\t...controls\n\t};\n\telse return ts;\n}\n\n//#endregion\n//#region useTitle/index.ts\nfunction useTitle(newTitle = null, options = {}) {\n\tvar _document$title, _ref;\n\tconst { document: document$1 = defaultDocument, restoreOnUnmount = (t) => t } = options;\n\tconst originalTitle = (_document$title = document$1 === null || document$1 === void 0 ? void 0 : document$1.title) !== null && _document$title !== void 0 ? _document$title : \"\";\n\tconst title = toRef((_ref = newTitle !== null && newTitle !== void 0 ? newTitle : document$1 === null || document$1 === void 0 ? void 0 : document$1.title) !== null && _ref !== void 0 ? _ref : null);\n\tconst isReadonly$1 = !!(newTitle && typeof newTitle === \"function\");\n\tfunction format(t) {\n\t\tif (!(\"titleTemplate\" in options)) return t;\n\t\tconst template = options.titleTemplate || \"%s\";\n\t\treturn typeof template === \"function\" ? template(t) : toValue(template).replace(/%s/g, t);\n\t}\n\twatch(title, (newValue, oldValue) => {\n\t\tif (newValue !== oldValue && document$1) document$1.title = format(newValue !== null && newValue !== void 0 ? newValue : \"\");\n\t}, { immediate: true });\n\tif (options.observe && !options.titleTemplate && document$1 && !isReadonly$1) {\n\t\tvar _document$head;\n\t\tuseMutationObserver((_document$head = document$1.head) === null || _document$head === void 0 ? void 0 : _document$head.querySelector(\"title\"), () => {\n\t\t\tif (document$1 && document$1.title !== title.value) title.value = format(document$1.title);\n\t\t}, { childList: true });\n\t}\n\ttryOnScopeDispose(() => {\n\t\tif (restoreOnUnmount) {\n\t\t\tconst restoredTitle = restoreOnUnmount(originalTitle, title.value || \"\");\n\t\t\tif (restoredTitle != null && document$1) document$1.title = restoredTitle;\n\t\t}\n\t});\n\treturn title;\n}\n\n//#endregion\n//#region useTransition/index.ts\nconst _TransitionPresets = {\n\teaseInSine: [\n\t\t.12,\n\t\t0,\n\t\t.39,\n\t\t0\n\t],\n\teaseOutSine: [\n\t\t.61,\n\t\t1,\n\t\t.88,\n\t\t1\n\t],\n\teaseInOutSine: [\n\t\t.37,\n\t\t0,\n\t\t.63,\n\t\t1\n\t],\n\teaseInQuad: [\n\t\t.11,\n\t\t0,\n\t\t.5,\n\t\t0\n\t],\n\teaseOutQuad: [\n\t\t.5,\n\t\t1,\n\t\t.89,\n\t\t1\n\t],\n\teaseInOutQuad: [\n\t\t.45,\n\t\t0,\n\t\t.55,\n\t\t1\n\t],\n\teaseInCubic: [\n\t\t.32,\n\t\t0,\n\t\t.67,\n\t\t0\n\t],\n\teaseOutCubic: [\n\t\t.33,\n\t\t1,\n\t\t.68,\n\t\t1\n\t],\n\teaseInOutCubic: [\n\t\t.65,\n\t\t0,\n\t\t.35,\n\t\t1\n\t],\n\teaseInQuart: [\n\t\t.5,\n\t\t0,\n\t\t.75,\n\t\t0\n\t],\n\teaseOutQuart: [\n\t\t.25,\n\t\t1,\n\t\t.5,\n\t\t1\n\t],\n\teaseInOutQuart: [\n\t\t.76,\n\t\t0,\n\t\t.24,\n\t\t1\n\t],\n\teaseInQuint: [\n\t\t.64,\n\t\t0,\n\t\t.78,\n\t\t0\n\t],\n\teaseOutQuint: [\n\t\t.22,\n\t\t1,\n\t\t.36,\n\t\t1\n\t],\n\teaseInOutQuint: [\n\t\t.83,\n\t\t0,\n\t\t.17,\n\t\t1\n\t],\n\teaseInExpo: [\n\t\t.7,\n\t\t0,\n\t\t.84,\n\t\t0\n\t],\n\teaseOutExpo: [\n\t\t.16,\n\t\t1,\n\t\t.3,\n\t\t1\n\t],\n\teaseInOutExpo: [\n\t\t.87,\n\t\t0,\n\t\t.13,\n\t\t1\n\t],\n\teaseInCirc: [\n\t\t.55,\n\t\t0,\n\t\t1,\n\t\t.45\n\t],\n\teaseOutCirc: [\n\t\t0,\n\t\t.55,\n\t\t.45,\n\t\t1\n\t],\n\teaseInOutCirc: [\n\t\t.85,\n\t\t0,\n\t\t.15,\n\t\t1\n\t],\n\teaseInBack: [\n\t\t.36,\n\t\t0,\n\t\t.66,\n\t\t-.56\n\t],\n\teaseOutBack: [\n\t\t.34,\n\t\t1.56,\n\t\t.64,\n\t\t1\n\t],\n\teaseInOutBack: [\n\t\t.68,\n\t\t-.6,\n\t\t.32,\n\t\t1.6\n\t]\n};\n/**\n* Common transitions\n*\n* @see https://easings.net\n*/\nconst TransitionPresets = /* @__PURE__ */ Object.assign({}, { linear: identity }, _TransitionPresets);\n/**\n* Create an easing function from cubic bezier points.\n*/\nfunction createEasingFunction([p0, p1, p2, p3]) {\n\tconst a = (a1, a2) => 1 - 3 * a2 + 3 * a1;\n\tconst b = (a1, a2) => 3 * a2 - 6 * a1;\n\tconst c = (a1) => 3 * a1;\n\tconst calcBezier = (t, a1, a2) => ((a(a1, a2) * t + b(a1, a2)) * t + c(a1)) * t;\n\tconst getSlope = (t, a1, a2) => 3 * a(a1, a2) * t * t + 2 * b(a1, a2) * t + c(a1);\n\tconst getTforX = (x) => {\n\t\tlet aGuessT = x;\n\t\tfor (let i = 0; i < 4; ++i) {\n\t\t\tconst currentSlope = getSlope(aGuessT, p0, p2);\n\t\t\tif (currentSlope === 0) return aGuessT;\n\t\t\tconst currentX = calcBezier(aGuessT, p0, p2) - x;\n\t\t\taGuessT -= currentX / currentSlope;\n\t\t}\n\t\treturn aGuessT;\n\t};\n\treturn (x) => p0 === p1 && p2 === p3 ? x : calcBezier(getTforX(x), p1, p3);\n}\nfunction lerp(a, b, alpha) {\n\treturn a + alpha * (b - a);\n}\nfunction defaultInterpolation(a, b, t) {\n\tconst aVal = toValue(a);\n\tconst bVal = toValue(b);\n\tif (typeof aVal === \"number\" && typeof bVal === \"number\") return lerp(aVal, bVal, t);\n\tif (Array.isArray(aVal) && Array.isArray(bVal)) return aVal.map((v, i) => lerp(v, toValue(bVal[i]), t));\n\tthrow new TypeError(\"Unknown transition type, specify an interpolation function.\");\n}\nfunction normalizeEasing(easing) {\n\tvar _toValue;\n\treturn typeof easing === \"function\" ? easing : (_toValue = toValue(easing)) !== null && _toValue !== void 0 ? _toValue : identity;\n}\n/**\n* Transition from one value to another.\n*\n* @param source\n* @param from\n* @param to\n* @param options\n*/\nfunction transition(source, from, to, options = {}) {\n\tvar _toValue2;\n\tconst { window: window$1 = defaultWindow } = options;\n\tconst fromVal = toValue(from);\n\tconst toVal = toValue(to);\n\tconst duration = (_toValue2 = toValue(options.duration)) !== null && _toValue2 !== void 0 ? _toValue2 : 1e3;\n\tconst startedAt = Date.now();\n\tconst endAt = Date.now() + duration;\n\tconst interpolation = typeof options.interpolation === \"function\" ? options.interpolation : defaultInterpolation;\n\tconst trans = typeof options.easing !== \"undefined\" ? normalizeEasing(options.easing) : normalizeEasing(options.transition);\n\tconst ease = typeof trans === \"function\" ? trans : createEasingFunction(trans);\n\treturn new Promise((resolve) => {\n\t\tsource.value = fromVal;\n\t\tconst tick = () => {\n\t\t\tvar _options$abort;\n\t\t\tif ((_options$abort = options.abort) === null || _options$abort === void 0 ? void 0 : _options$abort.call(options)) {\n\t\t\t\tresolve();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst now = Date.now();\n\t\t\tsource.value = interpolation(fromVal, toVal, ease((now - startedAt) / duration));\n\t\t\tif (now < endAt) window$1 === null || window$1 === void 0 || window$1.requestAnimationFrame(tick);\n\t\t\telse {\n\t\t\t\tsource.value = toVal;\n\t\t\t\tresolve();\n\t\t\t}\n\t\t};\n\t\ttick();\n\t});\n}\n/**\n* Transition from one value to another.\n* @deprecated The `executeTransition` function is deprecated, use `transition` instead.\n*\n* @param source\n* @param from\n* @param to\n* @param options\n*/\nfunction executeTransition(source, from, to, options = {}) {\n\treturn transition(source, from, to, options);\n}\n/**\n* Follow value with a transition.\n*\n* @see https://vueuse.org/useTransition\n* @param source\n* @param options\n*/\nfunction useTransition(source, options = {}) {\n\tlet currentId = 0;\n\tconst sourceVal = () => {\n\t\tconst v = toValue(source);\n\t\treturn typeof options.interpolation === \"undefined\" && Array.isArray(v) ? v.map(toValue) : v;\n\t};\n\tconst outputRef = shallowRef(sourceVal());\n\twatch(sourceVal, async (to) => {\n\t\tvar _options$onStarted, _options$onFinished;\n\t\tif (toValue(options.disabled)) return;\n\t\tconst id = ++currentId;\n\t\tif (options.delay) await promiseTimeout(toValue(options.delay));\n\t\tif (id !== currentId) return;\n\t\t(_options$onStarted = options.onStarted) === null || _options$onStarted === void 0 || _options$onStarted.call(options);\n\t\tawait transition(outputRef, outputRef.value, to, {\n\t\t\t...options,\n\t\t\tabort: () => {\n\t\t\t\tvar _options$abort2;\n\t\t\t\treturn id !== currentId || ((_options$abort2 = options.abort) === null || _options$abort2 === void 0 ? void 0 : _options$abort2.call(options));\n\t\t\t}\n\t\t});\n\t\t(_options$onFinished = options.onFinished) === null || _options$onFinished === void 0 || _options$onFinished.call(options);\n\t}, { deep: true });\n\twatch(() => toValue(options.disabled), (disabled) => {\n\t\tif (disabled) {\n\t\t\tcurrentId++;\n\t\t\toutputRef.value = sourceVal();\n\t\t}\n\t});\n\ttryOnScopeDispose(() => {\n\t\tcurrentId++;\n\t});\n\treturn computed(() => toValue(options.disabled) ? sourceVal() : outputRef.value);\n}\n\n//#endregion\n//#region useUrlSearchParams/index.ts\n/**\n* Reactive URLSearchParams\n*\n* @see https://vueuse.org/useUrlSearchParams\n* @param mode\n* @param options\n*/\nfunction useUrlSearchParams(mode = \"history\", options = {}) {\n\tconst { initialValue = {}, removeNullishValues = true, removeFalsyValues = false, write: enableWrite = true, writeMode = \"replace\", window: window$1 = defaultWindow, stringify = (params) => params.toString() } = options;\n\tif (!window$1) return reactive(initialValue);\n\tconst state = reactive({});\n\tfunction getRawParams() {\n\t\tif (mode === \"history\") return window$1.location.search || \"\";\n\t\telse if (mode === \"hash\") {\n\t\t\tconst hash = window$1.location.hash || \"\";\n\t\t\tconst index = hash.indexOf(\"?\");\n\t\t\treturn index > 0 ? hash.slice(index) : \"\";\n\t\t} else return (window$1.location.hash || \"\").replace(/^#/, \"\");\n\t}\n\tfunction constructQuery(params) {\n\t\tconst stringified = stringify(params);\n\t\tif (mode === \"history\") return `${stringified ? `?${stringified}` : \"\"}${window$1.location.hash || \"\"}`;\n\t\tif (mode === \"hash-params\") return `${window$1.location.search || \"\"}${stringified ? `#${stringified}` : \"\"}`;\n\t\tconst hash = window$1.location.hash || \"#\";\n\t\tconst index = hash.indexOf(\"?\");\n\t\tif (index > 0) return `${window$1.location.search || \"\"}${hash.slice(0, index)}${stringified ? `?${stringified}` : \"\"}`;\n\t\treturn `${window$1.location.search || \"\"}${hash}${stringified ? `?${stringified}` : \"\"}`;\n\t}\n\tfunction read() {\n\t\treturn new URLSearchParams(getRawParams());\n\t}\n\tfunction updateState(params) {\n\t\tconst unusedKeys = new Set(Object.keys(state));\n\t\tfor (const key of params.keys()) {\n\t\t\tconst paramsForKey = params.getAll(key);\n\t\t\tstate[key] = paramsForKey.length > 1 ? paramsForKey : params.get(key) || \"\";\n\t\t\tunusedKeys.delete(key);\n\t\t}\n\t\tArray.from(unusedKeys).forEach((key) => delete state[key]);\n\t}\n\tconst { pause, resume } = pausableWatch(state, () => {\n\t\tconst params = new URLSearchParams(\"\");\n\t\tObject.keys(state).forEach((key) => {\n\t\t\tconst mapEntry = state[key];\n\t\t\tif (Array.isArray(mapEntry)) mapEntry.forEach((value) => params.append(key, value));\n\t\t\telse if (removeNullishValues && mapEntry == null) params.delete(key);\n\t\t\telse if (removeFalsyValues && !mapEntry) params.delete(key);\n\t\t\telse params.set(key, mapEntry);\n\t\t});\n\t\twrite(params, false);\n\t}, { deep: true });\n\tfunction write(params, shouldUpdate, shouldWriteHistory = true) {\n\t\tpause();\n\t\tif (shouldUpdate) updateState(params);\n\t\tif (writeMode === \"replace\") window$1.history.replaceState(window$1.history.state, window$1.document.title, window$1.location.pathname + constructQuery(params));\n\t\telse if (shouldWriteHistory) window$1.history.pushState(window$1.history.state, window$1.document.title, window$1.location.pathname + constructQuery(params));\n\t\tnextTick(() => resume());\n\t}\n\tfunction onChanged() {\n\t\tif (!enableWrite) return;\n\t\twrite(read(), true, false);\n\t}\n\tconst listenerOptions = { passive: true };\n\tuseEventListener(window$1, \"popstate\", onChanged, listenerOptions);\n\tif (mode !== \"history\") useEventListener(window$1, \"hashchange\", onChanged, listenerOptions);\n\tconst initial = read();\n\tif (initial.keys().next().value) updateState(initial);\n\telse Object.assign(state, initialValue);\n\treturn state;\n}\n\n//#endregion\n//#region useUserMedia/index.ts\n/**\n* Reactive `mediaDevices.getUserMedia` streaming\n*\n* @see https://vueuse.org/useUserMedia\n* @param options\n*/\nfunction useUserMedia(options = {}) {\n\tvar _options$enabled, _options$autoSwitch;\n\tconst enabled = shallowRef((_options$enabled = options.enabled) !== null && _options$enabled !== void 0 ? _options$enabled : false);\n\tconst autoSwitch = shallowRef((_options$autoSwitch = options.autoSwitch) !== null && _options$autoSwitch !== void 0 ? _options$autoSwitch : true);\n\tconst constraints = ref(options.constraints);\n\tconst { navigator: navigator$1 = defaultNavigator } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => {\n\t\tvar _navigator$mediaDevic;\n\t\treturn navigator$1 === null || navigator$1 === void 0 || (_navigator$mediaDevic = navigator$1.mediaDevices) === null || _navigator$mediaDevic === void 0 ? void 0 : _navigator$mediaDevic.getUserMedia;\n\t});\n\tconst stream = shallowRef();\n\tfunction getDeviceOptions(type) {\n\t\tswitch (type) {\n\t\t\tcase \"video\":\n\t\t\t\tif (constraints.value) return constraints.value.video || false;\n\t\t\t\tbreak;\n\t\t\tcase \"audio\":\n\t\t\t\tif (constraints.value) return constraints.value.audio || false;\n\t\t\t\tbreak;\n\t\t}\n\t}\n\tasync function _start() {\n\t\tif (!isSupported.value || stream.value) return;\n\t\tstream.value = await navigator$1.mediaDevices.getUserMedia({\n\t\t\tvideo: getDeviceOptions(\"video\"),\n\t\t\taudio: getDeviceOptions(\"audio\")\n\t\t});\n\t\treturn stream.value;\n\t}\n\tfunction _stop() {\n\t\tvar _stream$value;\n\t\t(_stream$value = stream.value) === null || _stream$value === void 0 || _stream$value.getTracks().forEach((t) => t.stop());\n\t\tstream.value = void 0;\n\t}\n\tfunction stop() {\n\t\t_stop();\n\t\tenabled.value = false;\n\t}\n\tasync function start() {\n\t\tawait _start();\n\t\tif (stream.value) enabled.value = true;\n\t\treturn stream.value;\n\t}\n\tasync function restart() {\n\t\t_stop();\n\t\treturn await start();\n\t}\n\twatch(enabled, (v) => {\n\t\tif (v) _start();\n\t\telse _stop();\n\t}, { immediate: true });\n\twatch(constraints, () => {\n\t\tif (autoSwitch.value && stream.value) restart();\n\t}, {\n\t\timmediate: true,\n\t\tdeep: true\n\t});\n\ttryOnScopeDispose(() => {\n\t\tstop();\n\t});\n\treturn {\n\t\tisSupported,\n\t\tstream,\n\t\tstart,\n\t\tstop,\n\t\trestart,\n\t\tconstraints,\n\t\tenabled,\n\t\tautoSwitch\n\t};\n}\n\n//#endregion\n//#region useVModel/index.ts\n/**\n* Shorthand for v-model binding, props + emit -> ref\n*\n* @see https://vueuse.org/useVModel\n* @param props\n* @param key (default 'modelValue')\n* @param emit\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useVModel(props, key, emit, options = {}) {\n\tvar _vm$$emit, _vm$proxy;\n\tconst { clone = false, passive = false, eventName, deep = false, defaultValue, shouldEmit } = options;\n\tconst vm = getCurrentInstance();\n\tconst _emit = emit || (vm === null || vm === void 0 ? void 0 : vm.emit) || (vm === null || vm === void 0 || (_vm$$emit = vm.$emit) === null || _vm$$emit === void 0 ? void 0 : _vm$$emit.bind(vm)) || (vm === null || vm === void 0 || (_vm$proxy = vm.proxy) === null || _vm$proxy === void 0 || (_vm$proxy = _vm$proxy.$emit) === null || _vm$proxy === void 0 ? void 0 : _vm$proxy.bind(vm === null || vm === void 0 ? void 0 : vm.proxy));\n\tlet event = eventName;\n\tif (!key) key = \"modelValue\";\n\tevent = event || `update:${key.toString()}`;\n\tconst cloneFn = (val) => !clone ? val : typeof clone === \"function\" ? clone(val) : cloneFnJSON(val);\n\tconst getValue$1 = () => isDef(props[key]) ? cloneFn(props[key]) : defaultValue;\n\tconst triggerEmit = (value) => {\n\t\tif (shouldEmit) {\n\t\t\tif (shouldEmit(value)) _emit(event, value);\n\t\t} else _emit(event, value);\n\t};\n\tif (passive) {\n\t\tconst proxy = ref(getValue$1());\n\t\tlet isUpdating = false;\n\t\twatch(() => props[key], (v) => {\n\t\t\tif (!isUpdating) {\n\t\t\t\tisUpdating = true;\n\t\t\t\tproxy.value = cloneFn(v);\n\t\t\t\tnextTick(() => isUpdating = false);\n\t\t\t}\n\t\t});\n\t\twatch(proxy, (v) => {\n\t\t\tif (!isUpdating && (v !== props[key] || deep)) triggerEmit(v);\n\t\t}, { deep });\n\t\treturn proxy;\n\t} else return computed({\n\t\tget() {\n\t\t\treturn getValue$1();\n\t\t},\n\t\tset(value) {\n\t\t\ttriggerEmit(value);\n\t\t}\n\t});\n}\n\n//#endregion\n//#region useVModels/index.ts\n/**\n* Shorthand for props v-model binding. Think like `toRefs(props)` but changes will also emit out.\n*\n* @see https://vueuse.org/useVModels\n* @param props\n* @param emit\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useVModels(props, emit, options = {}) {\n\tconst ret = {};\n\tfor (const key in props) ret[key] = useVModel(props, key, emit, options);\n\treturn ret;\n}\n\n//#endregion\n//#region useVibrate/index.ts\n/**\n* Reactive vibrate\n*\n* @see https://vueuse.org/useVibrate\n* @see https://developer.mozilla.org/en-US/docs/Web/API/Vibration_API\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useVibrate(options) {\n\tconst { pattern = [], interval = 0, navigator: navigator$1 = defaultNavigator } = options || {};\n\tconst isSupported = /* @__PURE__ */ useSupported(() => typeof navigator$1 !== \"undefined\" && \"vibrate\" in navigator$1);\n\tconst patternRef = toRef(pattern);\n\tlet intervalControls;\n\tconst vibrate = (pattern$1 = patternRef.value) => {\n\t\tif (isSupported.value) navigator$1.vibrate(pattern$1);\n\t};\n\tconst stop = () => {\n\t\tif (isSupported.value) navigator$1.vibrate(0);\n\t\tintervalControls === null || intervalControls === void 0 || intervalControls.pause();\n\t};\n\tif (interval > 0) intervalControls = useIntervalFn(vibrate, interval, {\n\t\timmediate: false,\n\t\timmediateCallback: false\n\t});\n\treturn {\n\t\tisSupported,\n\t\tpattern,\n\t\tintervalControls,\n\t\tvibrate,\n\t\tstop\n\t};\n}\n\n//#endregion\n//#region useVirtualList/index.ts\n/**\n* Please consider using [`vue-virtual-scroller`](https://github.com/Akryum/vue-virtual-scroller) if you are looking for more features.\n*/\nfunction useVirtualList(list, options) {\n\tconst { containerStyle, wrapperProps, scrollTo, calculateRange, currentList, containerRef } = \"itemHeight\" in options ? useVerticalVirtualList(options, list) : useHorizontalVirtualList(options, list);\n\treturn {\n\t\tlist: currentList,\n\t\tscrollTo,\n\t\tcontainerProps: {\n\t\t\tref: containerRef,\n\t\t\tonScroll: () => {\n\t\t\t\tcalculateRange();\n\t\t\t},\n\t\t\tstyle: containerStyle\n\t\t},\n\t\twrapperProps\n\t};\n}\nfunction useVirtualListResources(list) {\n\tconst containerRef = shallowRef(null);\n\tconst size = useElementSize(containerRef);\n\tconst currentList = ref([]);\n\tconst source = shallowRef(list);\n\treturn {\n\t\tstate: ref({\n\t\t\tstart: 0,\n\t\t\tend: 10\n\t\t}),\n\t\tsource,\n\t\tcurrentList,\n\t\tsize,\n\t\tcontainerRef\n\t};\n}\nfunction createGetViewCapacity(state, source, itemSize) {\n\treturn (containerSize) => {\n\t\tif (typeof itemSize === \"number\") return Math.ceil(containerSize / itemSize);\n\t\tconst { start = 0 } = state.value;\n\t\tlet sum = 0;\n\t\tlet capacity = 0;\n\t\tfor (let i = start; i < source.value.length; i++) {\n\t\t\tconst size = itemSize(i);\n\t\t\tsum += size;\n\t\t\tcapacity = i;\n\t\t\tif (sum > containerSize) break;\n\t\t}\n\t\treturn capacity - start;\n\t};\n}\nfunction createGetOffset(source, itemSize) {\n\treturn (scrollDirection) => {\n\t\tif (typeof itemSize === \"number\") return Math.floor(scrollDirection / itemSize) + 1;\n\t\tlet sum = 0;\n\t\tlet offset = 0;\n\t\tfor (let i = 0; i < source.value.length; i++) {\n\t\t\tconst size = itemSize(i);\n\t\t\tsum += size;\n\t\t\tif (sum >= scrollDirection) {\n\t\t\t\toffset = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn offset + 1;\n\t};\n}\nfunction createCalculateRange(type, overscan, getOffset, getViewCapacity, { containerRef, state, currentList, source }) {\n\treturn () => {\n\t\tconst element = containerRef.value;\n\t\tif (element) {\n\t\t\tconst offset = getOffset(type === \"vertical\" ? element.scrollTop : element.scrollLeft);\n\t\t\tconst viewCapacity = getViewCapacity(type === \"vertical\" ? element.clientHeight : element.clientWidth);\n\t\t\tconst from = offset - overscan;\n\t\t\tconst to = offset + viewCapacity + overscan;\n\t\t\tstate.value = {\n\t\t\t\tstart: from < 0 ? 0 : from,\n\t\t\t\tend: to > source.value.length ? source.value.length : to\n\t\t\t};\n\t\t\tcurrentList.value = source.value.slice(state.value.start, state.value.end).map((ele, index) => ({\n\t\t\t\tdata: ele,\n\t\t\t\tindex: index + state.value.start\n\t\t\t}));\n\t\t}\n\t};\n}\nfunction createGetDistance(itemSize, source) {\n\treturn (index) => {\n\t\tif (typeof itemSize === \"number\") return index * itemSize;\n\t\treturn source.value.slice(0, index).reduce((sum, _, i) => sum + itemSize(i), 0);\n\t};\n}\nfunction useWatchForSizes(size, list, containerRef, calculateRange) {\n\twatch([\n\t\tsize.width,\n\t\tsize.height,\n\t\t() => toValue(list),\n\t\tcontainerRef\n\t], () => {\n\t\tcalculateRange();\n\t});\n}\nfunction createComputedTotalSize(itemSize, source) {\n\treturn computed(() => {\n\t\tif (typeof itemSize === \"number\") return source.value.length * itemSize;\n\t\treturn source.value.reduce((sum, _, index) => sum + itemSize(index), 0);\n\t});\n}\nconst scrollToDictionaryForElementScrollKey = {\n\thorizontal: \"scrollLeft\",\n\tvertical: \"scrollTop\"\n};\nfunction createScrollTo(type, calculateRange, getDistance, containerRef) {\n\treturn (index) => {\n\t\tif (containerRef.value) {\n\t\t\tcontainerRef.value[scrollToDictionaryForElementScrollKey[type]] = getDistance(index);\n\t\t\tcalculateRange();\n\t\t}\n\t};\n}\nfunction useHorizontalVirtualList(options, list) {\n\tconst resources = useVirtualListResources(list);\n\tconst { state, source, currentList, size, containerRef } = resources;\n\tconst containerStyle = { overflowX: \"auto\" };\n\tconst { itemWidth, overscan = 5 } = options;\n\tconst getViewCapacity = createGetViewCapacity(state, source, itemWidth);\n\tconst calculateRange = createCalculateRange(\"horizontal\", overscan, createGetOffset(source, itemWidth), getViewCapacity, resources);\n\tconst getDistanceLeft = createGetDistance(itemWidth, source);\n\tconst offsetLeft = computed(() => getDistanceLeft(state.value.start));\n\tconst totalWidth = createComputedTotalSize(itemWidth, source);\n\tuseWatchForSizes(size, list, containerRef, calculateRange);\n\treturn {\n\t\tscrollTo: createScrollTo(\"horizontal\", calculateRange, getDistanceLeft, containerRef),\n\t\tcalculateRange,\n\t\twrapperProps: computed(() => {\n\t\t\treturn { style: {\n\t\t\t\theight: \"100%\",\n\t\t\t\twidth: `${totalWidth.value - offsetLeft.value}px`,\n\t\t\t\tmarginLeft: `${offsetLeft.value}px`,\n\t\t\t\tdisplay: \"flex\"\n\t\t\t} };\n\t\t}),\n\t\tcontainerStyle,\n\t\tcurrentList,\n\t\tcontainerRef\n\t};\n}\nfunction useVerticalVirtualList(options, list) {\n\tconst resources = useVirtualListResources(list);\n\tconst { state, source, currentList, size, containerRef } = resources;\n\tconst containerStyle = { overflowY: \"auto\" };\n\tconst { itemHeight, overscan = 5 } = options;\n\tconst getViewCapacity = createGetViewCapacity(state, source, itemHeight);\n\tconst calculateRange = createCalculateRange(\"vertical\", overscan, createGetOffset(source, itemHeight), getViewCapacity, resources);\n\tconst getDistanceTop = createGetDistance(itemHeight, source);\n\tconst offsetTop = computed(() => getDistanceTop(state.value.start));\n\tconst totalHeight = createComputedTotalSize(itemHeight, source);\n\tuseWatchForSizes(size, list, containerRef, calculateRange);\n\treturn {\n\t\tcalculateRange,\n\t\tscrollTo: createScrollTo(\"vertical\", calculateRange, getDistanceTop, containerRef),\n\t\tcontainerStyle,\n\t\twrapperProps: computed(() => {\n\t\t\treturn { style: {\n\t\t\t\twidth: \"100%\",\n\t\t\t\theight: `${totalHeight.value - offsetTop.value}px`,\n\t\t\t\tmarginTop: `${offsetTop.value}px`\n\t\t\t} };\n\t\t}),\n\t\tcurrentList,\n\t\tcontainerRef\n\t};\n}\n\n//#endregion\n//#region useWakeLock/index.ts\n/**\n* Reactive Screen Wake Lock API.\n*\n* @see https://vueuse.org/useWakeLock\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useWakeLock(options = {}) {\n\tconst { navigator: navigator$1 = defaultNavigator, document: document$1 = defaultDocument } = options;\n\tconst requestedType = shallowRef(false);\n\tconst sentinel = shallowRef(null);\n\tconst documentVisibility = useDocumentVisibility({ document: document$1 });\n\tconst isSupported = /* @__PURE__ */ useSupported(() => navigator$1 && \"wakeLock\" in navigator$1);\n\tconst isActive = computed(() => !!sentinel.value && documentVisibility.value === \"visible\");\n\tif (isSupported.value) {\n\t\tuseEventListener(sentinel, \"release\", () => {\n\t\t\tvar _sentinel$value$type, _sentinel$value;\n\t\t\trequestedType.value = (_sentinel$value$type = (_sentinel$value = sentinel.value) === null || _sentinel$value === void 0 ? void 0 : _sentinel$value.type) !== null && _sentinel$value$type !== void 0 ? _sentinel$value$type : false;\n\t\t}, { passive: true });\n\t\twhenever(() => documentVisibility.value === \"visible\" && (document$1 === null || document$1 === void 0 ? void 0 : document$1.visibilityState) === \"visible\" && requestedType.value, (type) => {\n\t\t\trequestedType.value = false;\n\t\t\tforceRequest(type);\n\t\t});\n\t}\n\tasync function forceRequest(type) {\n\t\tvar _sentinel$value2;\n\t\tawait ((_sentinel$value2 = sentinel.value) === null || _sentinel$value2 === void 0 ? void 0 : _sentinel$value2.release());\n\t\tsentinel.value = isSupported.value ? await navigator$1.wakeLock.request(type) : null;\n\t}\n\tasync function request(type) {\n\t\tif (documentVisibility.value === \"visible\") await forceRequest(type);\n\t\telse requestedType.value = type;\n\t}\n\tasync function release() {\n\t\trequestedType.value = false;\n\t\tconst s = sentinel.value;\n\t\tsentinel.value = null;\n\t\tawait (s === null || s === void 0 ? void 0 : s.release());\n\t}\n\treturn {\n\t\tsentinel,\n\t\tisSupported,\n\t\tisActive,\n\t\trequest,\n\t\tforceRequest,\n\t\trelease\n\t};\n}\n\n//#endregion\n//#region useWebNotification/index.ts\n/**\n* Reactive useWebNotification\n*\n* @see https://vueuse.org/useWebNotification\n* @see https://developer.mozilla.org/en-US/docs/Web/API/notification\n*/\nfunction useWebNotification(options = {}) {\n\tconst { window: window$1 = defaultWindow, requestPermissions: _requestForPermissions = true } = options;\n\tconst defaultWebNotificationOptions = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => {\n\t\tif (!window$1 || !(\"Notification\" in window$1)) return false;\n\t\tif (Notification.permission === \"granted\") return true;\n\t\ttry {\n\t\t\tconst notification$1 = new Notification(\"\");\n\t\t\tnotification$1.onshow = () => {\n\t\t\t\tnotification$1.close();\n\t\t\t};\n\t\t} catch (e) {\n\t\t\tif (e.name === \"TypeError\") return false;\n\t\t}\n\t\treturn true;\n\t});\n\tconst permissionGranted = shallowRef(isSupported.value && \"permission\" in Notification && Notification.permission === \"granted\");\n\tconst notification = ref(null);\n\tconst ensurePermissions = async () => {\n\t\tif (!isSupported.value) return;\n\t\tif (!permissionGranted.value && Notification.permission !== \"denied\") {\n\t\t\tif (await Notification.requestPermission() === \"granted\") permissionGranted.value = true;\n\t\t}\n\t\treturn permissionGranted.value;\n\t};\n\tconst { on: onClick, trigger: clickTrigger } = createEventHook();\n\tconst { on: onShow, trigger: showTrigger } = createEventHook();\n\tconst { on: onError, trigger: errorTrigger } = createEventHook();\n\tconst { on: onClose, trigger: closeTrigger } = createEventHook();\n\tconst show = async (overrides) => {\n\t\tif (!isSupported.value || !permissionGranted.value) return;\n\t\tconst options$1 = Object.assign({}, defaultWebNotificationOptions, overrides);\n\t\tnotification.value = new Notification(options$1.title || \"\", options$1);\n\t\tnotification.value.onclick = clickTrigger;\n\t\tnotification.value.onshow = showTrigger;\n\t\tnotification.value.onerror = errorTrigger;\n\t\tnotification.value.onclose = closeTrigger;\n\t\treturn notification.value;\n\t};\n\tconst close = () => {\n\t\tif (notification.value) notification.value.close();\n\t\tnotification.value = null;\n\t};\n\tif (_requestForPermissions) tryOnMounted(ensurePermissions);\n\ttryOnScopeDispose(close);\n\tif (isSupported.value && window$1) {\n\t\tconst document$1 = window$1.document;\n\t\tuseEventListener(document$1, \"visibilitychange\", (e) => {\n\t\t\te.preventDefault();\n\t\t\tif (document$1.visibilityState === \"visible\") close();\n\t\t});\n\t}\n\treturn {\n\t\tisSupported,\n\t\tnotification,\n\t\tensurePermissions,\n\t\tpermissionGranted,\n\t\tshow,\n\t\tclose,\n\t\tonClick,\n\t\tonShow,\n\t\tonError,\n\t\tonClose\n\t};\n}\n\n//#endregion\n//#region useWebSocket/index.ts\nconst DEFAULT_PING_MESSAGE = \"ping\";\nfunction resolveNestedOptions(options) {\n\tif (options === true) return {};\n\treturn options;\n}\n/**\n* Reactive WebSocket client.\n*\n* @see https://vueuse.org/useWebSocket\n* @param url\n*/\nfunction useWebSocket(url, options = {}) {\n\tconst { onConnected, onDisconnected, onError, onMessage, immediate = true, autoConnect = true, autoClose = true, protocols = [] } = options;\n\tconst data = ref(null);\n\tconst status = shallowRef(\"CLOSED\");\n\tconst wsRef = ref();\n\tconst urlRef = toRef(url);\n\tlet heartbeatPause;\n\tlet heartbeatResume;\n\tlet explicitlyClosed = false;\n\tlet retried = 0;\n\tlet bufferedData = [];\n\tlet retryTimeout;\n\tlet pongTimeoutWait;\n\tconst _sendBuffer = () => {\n\t\tif (bufferedData.length && wsRef.value && status.value === \"OPEN\") {\n\t\t\tfor (const buffer of bufferedData) wsRef.value.send(buffer);\n\t\t\tbufferedData = [];\n\t\t}\n\t};\n\tconst resetRetry = () => {\n\t\tif (retryTimeout != null) {\n\t\t\tclearTimeout(retryTimeout);\n\t\t\tretryTimeout = void 0;\n\t\t}\n\t};\n\tconst resetHeartbeat = () => {\n\t\tclearTimeout(pongTimeoutWait);\n\t\tpongTimeoutWait = void 0;\n\t};\n\tconst close = (code = 1e3, reason) => {\n\t\tresetRetry();\n\t\tif (!isClient && !isWorker || !wsRef.value) return;\n\t\texplicitlyClosed = true;\n\t\tresetHeartbeat();\n\t\theartbeatPause === null || heartbeatPause === void 0 || heartbeatPause();\n\t\twsRef.value.close(code, reason);\n\t\twsRef.value = void 0;\n\t};\n\tconst send = (data$1, useBuffer = true) => {\n\t\tif (!wsRef.value || status.value !== \"OPEN\") {\n\t\t\tif (useBuffer) bufferedData.push(data$1);\n\t\t\treturn false;\n\t\t}\n\t\t_sendBuffer();\n\t\twsRef.value.send(data$1);\n\t\treturn true;\n\t};\n\tconst _init = () => {\n\t\tif (explicitlyClosed || typeof urlRef.value === \"undefined\") return;\n\t\tconst ws = new WebSocket(urlRef.value, protocols);\n\t\twsRef.value = ws;\n\t\tstatus.value = \"CONNECTING\";\n\t\tws.onopen = () => {\n\t\t\tstatus.value = \"OPEN\";\n\t\t\tretried = 0;\n\t\t\tonConnected === null || onConnected === void 0 || onConnected(ws);\n\t\t\theartbeatResume === null || heartbeatResume === void 0 || heartbeatResume();\n\t\t\t_sendBuffer();\n\t\t};\n\t\tws.onclose = (ev) => {\n\t\t\tstatus.value = \"CLOSED\";\n\t\t\tresetHeartbeat();\n\t\t\theartbeatPause === null || heartbeatPause === void 0 || heartbeatPause();\n\t\t\tonDisconnected === null || onDisconnected === void 0 || onDisconnected(ws, ev);\n\t\t\tif (!explicitlyClosed && options.autoReconnect && (wsRef.value == null || ws === wsRef.value)) {\n\t\t\t\tconst { retries = -1, delay = 1e3, onFailed } = resolveNestedOptions(options.autoReconnect);\n\t\t\t\tif ((typeof retries === \"function\" ? retries : () => typeof retries === \"number\" && (retries < 0 || retried < retries))(retried)) {\n\t\t\t\t\tretried += 1;\n\t\t\t\t\tconst delayTime = typeof delay === \"function\" ? delay(retried) : delay;\n\t\t\t\t\tretryTimeout = setTimeout(_init, delayTime);\n\t\t\t\t} else onFailed === null || onFailed === void 0 || onFailed();\n\t\t\t}\n\t\t};\n\t\tws.onerror = (e) => {\n\t\t\tonError === null || onError === void 0 || onError(ws, e);\n\t\t};\n\t\tws.onmessage = (e) => {\n\t\t\tif (options.heartbeat) {\n\t\t\t\tresetHeartbeat();\n\t\t\t\tconst { message = DEFAULT_PING_MESSAGE, responseMessage = message } = resolveNestedOptions(options.heartbeat);\n\t\t\t\tif (e.data === toValue(responseMessage)) return;\n\t\t\t}\n\t\t\tdata.value = e.data;\n\t\t\tonMessage === null || onMessage === void 0 || onMessage(ws, e);\n\t\t};\n\t};\n\tif (options.heartbeat) {\n\t\tconst { message = DEFAULT_PING_MESSAGE, interval = 1e3, pongTimeout = 1e3 } = resolveNestedOptions(options.heartbeat);\n\t\tconst { pause, resume } = useIntervalFn(() => {\n\t\t\tsend(toValue(message), false);\n\t\t\tif (pongTimeoutWait != null) return;\n\t\t\tpongTimeoutWait = setTimeout(() => {\n\t\t\t\tclose();\n\t\t\t\texplicitlyClosed = false;\n\t\t\t}, pongTimeout);\n\t\t}, interval, { immediate: false });\n\t\theartbeatPause = pause;\n\t\theartbeatResume = resume;\n\t}\n\tif (autoClose) {\n\t\tif (isClient) useEventListener(\"beforeunload\", () => close(), { passive: true });\n\t\ttryOnScopeDispose(close);\n\t}\n\tconst open = () => {\n\t\tif (!isClient && !isWorker) return;\n\t\tclose();\n\t\texplicitlyClosed = false;\n\t\tretried = 0;\n\t\t_init();\n\t};\n\tif (immediate) open();\n\tif (autoConnect) watch(urlRef, open);\n\treturn {\n\t\tdata,\n\t\tstatus,\n\t\tclose,\n\t\tsend,\n\t\topen,\n\t\tws: wsRef\n\t};\n}\n\n//#endregion\n//#region useWebWorker/index.ts\nfunction useWebWorker(arg0, workerOptions, options) {\n\tconst { window: window$1 = defaultWindow } = options !== null && options !== void 0 ? options : {};\n\tconst data = ref(null);\n\tconst worker = shallowRef();\n\tconst post = (...args) => {\n\t\tif (!worker.value) return;\n\t\tworker.value.postMessage(...args);\n\t};\n\tconst terminate = function terminate$1() {\n\t\tif (!worker.value) return;\n\t\tworker.value.terminate();\n\t};\n\tif (window$1) {\n\t\tif (typeof arg0 === \"string\") worker.value = new Worker(arg0, workerOptions);\n\t\telse if (typeof arg0 === \"function\") worker.value = arg0();\n\t\telse worker.value = arg0;\n\t\tworker.value.onmessage = (e) => {\n\t\t\tdata.value = e.data;\n\t\t};\n\t\ttryOnScopeDispose(() => {\n\t\t\tif (worker.value) worker.value.terminate();\n\t\t});\n\t}\n\treturn {\n\t\tdata,\n\t\tpost,\n\t\tterminate,\n\t\tworker\n\t};\n}\n\n//#endregion\n//#region useWebWorkerFn/lib/depsParser.ts\n/**\n*\n* Concatenates the dependencies into a comma separated string.\n* this string will then be passed as an argument to the \"importScripts\" function\n*\n* @param deps array of string\n* @param localDeps array of function\n* @returns a string composed by the concatenation of the array\n* elements \"deps\" and \"importScripts\".\n*\n* @example\n* depsParser(['demo1', 'demo2']) // return importScripts('demo1', 'demo2')\n*/\nfunction depsParser(deps, localDeps) {\n\tif (deps.length === 0 && localDeps.length === 0) return \"\";\n\tconst depsString = deps.map((dep) => `'${dep}'`).toString();\n\tconst depsFunctionString = localDeps.filter((dep) => typeof dep === \"function\").map((fn) => {\n\t\tconst str = fn.toString();\n\t\tif (str.trim().startsWith(\"function\")) return str;\n\t\telse return `const ${fn.name} = ${str}`;\n\t}).join(\";\");\n\tconst importString = `importScripts(${depsString});`;\n\treturn `${depsString.trim() === \"\" ? \"\" : importString} ${depsFunctionString}`;\n}\nvar depsParser_default = depsParser;\n\n//#endregion\n//#region useWebWorkerFn/lib/jobRunner.ts\n/**\n* This function accepts as a parameter a function \"userFunc\"\n* And as a result returns an anonymous function.\n* This anonymous function, accepts as arguments,\n* the parameters to pass to the function \"useArgs\" and returns a Promise\n* This function can be used as a wrapper, only inside a Worker\n* because it depends by \"postMessage\".\n*\n* @param userFunc {Function} fn the function to run with web worker\n*\n* @returns returns a function that accepts the parameters\n* to be passed to the \"userFunc\" function\n*/\nfunction jobRunner(userFunc) {\n\treturn (e) => {\n\t\tconst userFuncArgs = e.data[0];\n\t\treturn Promise.resolve(userFunc.apply(void 0, userFuncArgs)).then((result) => {\n\t\t\tpostMessage([\"SUCCESS\", result]);\n\t\t}).catch((error) => {\n\t\t\tpostMessage([\"ERROR\", error]);\n\t\t});\n\t};\n}\nvar jobRunner_default = jobRunner;\n\n//#endregion\n//#region useWebWorkerFn/lib/createWorkerBlobUrl.ts\n/**\n* Converts the \"fn\" function into the syntax needed to be executed within a web worker\n*\n* @param fn the function to run with web worker\n* @param deps array of strings, imported into the worker through \"importScripts\"\n* @param localDeps array of function, local dependencies\n*\n* @returns a blob url, containing the code of \"fn\" as a string\n*\n* @example\n* createWorkerBlobUrl((a,b) => a+b, [])\n* // return \"onmessage=return Promise.resolve((a,b) => a + b)\n* .then(postMessage(['SUCCESS', result]))\n* .catch(postMessage(['ERROR', error])\"\n*/\nfunction createWorkerBlobUrl(fn, deps, localDeps) {\n\tconst blobCode = `${depsParser_default(deps, localDeps)}; onmessage=(${jobRunner_default})(${fn})`;\n\tconst blob = new Blob([blobCode], { type: \"text/javascript\" });\n\treturn URL.createObjectURL(blob);\n}\nvar createWorkerBlobUrl_default = createWorkerBlobUrl;\n\n//#endregion\n//#region useWebWorkerFn/index.ts\n/**\n* Run expensive function without blocking the UI, using a simple syntax that makes use of Promise.\n*\n* @see https://vueuse.org/useWebWorkerFn\n* @param fn\n* @param options\n*/\nfunction useWebWorkerFn(fn, options = {}) {\n\tconst { dependencies = [], localDependencies = [], timeout, window: window$1 = defaultWindow } = options;\n\tconst worker = ref();\n\tconst workerStatus = shallowRef(\"PENDING\");\n\tconst promise = ref({});\n\tconst timeoutId = shallowRef();\n\tconst workerTerminate = (status = \"PENDING\") => {\n\t\tif (worker.value && worker.value._url && window$1) {\n\t\t\tworker.value.terminate();\n\t\t\tURL.revokeObjectURL(worker.value._url);\n\t\t\tpromise.value = {};\n\t\t\tworker.value = void 0;\n\t\t\twindow$1.clearTimeout(timeoutId.value);\n\t\t\tworkerStatus.value = status;\n\t\t}\n\t};\n\tworkerTerminate();\n\ttryOnScopeDispose(workerTerminate);\n\tconst generateWorker = () => {\n\t\tconst blobUrl = createWorkerBlobUrl_default(fn, dependencies, localDependencies);\n\t\tconst newWorker = new Worker(blobUrl);\n\t\tnewWorker._url = blobUrl;\n\t\tnewWorker.onmessage = (e) => {\n\t\t\tconst { resolve = () => {}, reject = () => {} } = promise.value;\n\t\t\tconst [status, result] = e.data;\n\t\t\tswitch (status) {\n\t\t\t\tcase \"SUCCESS\":\n\t\t\t\t\tresolve(result);\n\t\t\t\t\tworkerTerminate(status);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\treject(result);\n\t\t\t\t\tworkerTerminate(\"ERROR\");\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t};\n\t\tnewWorker.onerror = (e) => {\n\t\t\tconst { reject = () => {} } = promise.value;\n\t\t\te.preventDefault();\n\t\t\treject(e);\n\t\t\tworkerTerminate(\"ERROR\");\n\t\t};\n\t\tif (timeout) timeoutId.value = setTimeout(() => workerTerminate(\"TIMEOUT_EXPIRED\"), timeout);\n\t\treturn newWorker;\n\t};\n\tconst callWorker = (...fnArgs) => new Promise((resolve, reject) => {\n\t\tvar _worker$value;\n\t\tpromise.value = {\n\t\t\tresolve,\n\t\t\treject\n\t\t};\n\t\t(_worker$value = worker.value) === null || _worker$value === void 0 || _worker$value.postMessage([[...fnArgs]]);\n\t\tworkerStatus.value = \"RUNNING\";\n\t});\n\tconst workerFn = (...fnArgs) => {\n\t\tif (workerStatus.value === \"RUNNING\") {\n\t\t\tconsole.error(\"[useWebWorkerFn] You can only run one instance of the worker at a time.\");\n\t\t\treturn Promise.reject();\n\t\t}\n\t\tworker.value = generateWorker();\n\t\treturn callWorker(...fnArgs);\n\t};\n\treturn {\n\t\tworkerFn,\n\t\tworkerStatus,\n\t\tworkerTerminate\n\t};\n}\n\n//#endregion\n//#region useWindowFocus/index.ts\n/**\n* Reactively track window focus with `window.onfocus` and `window.onblur`.\n*\n* @see https://vueuse.org/useWindowFocus\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useWindowFocus(options = {}) {\n\tconst { window: window$1 = defaultWindow } = options;\n\tif (!window$1) return shallowRef(false);\n\tconst focused = shallowRef(window$1.document.hasFocus());\n\tconst listenerOptions = { passive: true };\n\tuseEventListener(window$1, \"blur\", () => {\n\t\tfocused.value = false;\n\t}, listenerOptions);\n\tuseEventListener(window$1, \"focus\", () => {\n\t\tfocused.value = true;\n\t}, listenerOptions);\n\treturn focused;\n}\n\n//#endregion\n//#region useWindowScroll/index.ts\n/**\n* Reactive window scroll.\n*\n* @see https://vueuse.org/useWindowScroll\n* @param options\n*/\nfunction useWindowScroll(options = {}) {\n\tconst { window: window$1 = defaultWindow,...rest } = options;\n\treturn useScroll(window$1, rest);\n}\n\n//#endregion\n//#region useWindowSize/index.ts\n/**\n* Reactive window size.\n*\n* @see https://vueuse.org/useWindowSize\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useWindowSize(options = {}) {\n\tconst { window: window$1 = defaultWindow, initialWidth = Number.POSITIVE_INFINITY, initialHeight = Number.POSITIVE_INFINITY, listenOrientation = true, includeScrollbar = true, type = \"inner\" } = options;\n\tconst width = shallowRef(initialWidth);\n\tconst height = shallowRef(initialHeight);\n\tconst update = () => {\n\t\tif (window$1) if (type === \"outer\") {\n\t\t\twidth.value = window$1.outerWidth;\n\t\t\theight.value = window$1.outerHeight;\n\t\t} else if (type === \"visual\" && window$1.visualViewport) {\n\t\t\tconst { width: visualViewportWidth, height: visualViewportHeight, scale } = window$1.visualViewport;\n\t\t\twidth.value = Math.round(visualViewportWidth * scale);\n\t\t\theight.value = Math.round(visualViewportHeight * scale);\n\t\t} else if (includeScrollbar) {\n\t\t\twidth.value = window$1.innerWidth;\n\t\t\theight.value = window$1.innerHeight;\n\t\t} else {\n\t\t\twidth.value = window$1.document.documentElement.clientWidth;\n\t\t\theight.value = window$1.document.documentElement.clientHeight;\n\t\t}\n\t};\n\tupdate();\n\ttryOnMounted(update);\n\tconst listenerOptions = { passive: true };\n\tuseEventListener(\"resize\", update, listenerOptions);\n\tif (window$1 && type === \"visual\" && window$1.visualViewport) useEventListener(window$1.visualViewport, \"resize\", update, listenerOptions);\n\tif (listenOrientation) watch(useMediaQuery(\"(orientation: portrait)\"), () => update());\n\treturn {\n\t\twidth,\n\t\theight\n\t};\n}\n\n//#endregion\nexport { DefaultMagicKeysAliasMap, StorageSerializers, TransitionPresets, asyncComputed, breakpointsAntDesign, breakpointsBootstrapV5, breakpointsElement, breakpointsMasterCss, breakpointsPrimeFlex, breakpointsQuasar, breakpointsSematic, breakpointsTailwind, breakpointsVuetify, breakpointsVuetifyV2, breakpointsVuetifyV3, cloneFnJSON, computedAsync, computedInject, createFetch, createReusableTemplate, createTemplatePromise, createUnrefFn, customStorageEventName, defaultDocument, defaultLocation, defaultNavigator, defaultWindow, executeTransition, formatTimeAgo, formatTimeAgoIntl, formatTimeAgoIntlParts, getSSRHandler, mapGamepadToXbox360Controller, onClickOutside, onElementRemoval, onKeyDown, onKeyPressed, onKeyStroke, onKeyUp, onLongPress, onStartTyping, provideSSRWidth, setSSRHandler, templateRef, transition, unrefElement, useActiveElement, useAnimate, useAsyncQueue, useAsyncState, useBase64, useBattery, useBluetooth, useBreakpoints, useBroadcastChannel, useBrowserLocation, useCached, useClipboard, useClipboardItems, useCloned, useColorMode, useConfirmDialog, useCountdown, useCssVar, useCurrentElement, useCycleList, useDark, useDebouncedRefHistory, useDeviceMotion, useDeviceOrientation, useDevicePixelRatio, useDevicesList, useDisplayMedia, useDocumentVisibility, useDraggable, useDropZone, useElementBounding, useElementByPoint, useElementHover, useElementSize, useElementVisibility, useEventBus, useEventListener, useEventSource, useEyeDropper, useFavicon, useFetch, useFileDialog, useFileSystemAccess, useFocus, useFocusWithin, useFps, useFullscreen, useGamepad, useGeolocation, useIdle, useImage, useInfiniteScroll, useIntersectionObserver, useKeyModifier, useLocalStorage, useMagicKeys, useManualRefHistory, useMediaControls, useMediaQuery, useMemoize, useMemory, useMounted, useMouse, useMouseInElement, useMousePressed, useMutationObserver, useNavigatorLanguage, useNetwork, useNow, useObjectUrl, useOffsetPagination, useOnline, usePageLeave, useParallax, useParentElement, usePerformanceObserver, usePermission, usePointer, usePointerLock, usePointerSwipe, usePreferredColorScheme, usePreferredContrast, usePreferredDark, usePreferredLanguages, usePreferredReducedMotion, usePreferredReducedTransparency, usePrevious, useRafFn, useRefHistory, useResizeObserver, useSSRWidth, useScreenOrientation, useScreenSafeArea, useScriptTag, useScroll, useScrollLock, useSessionStorage, useShare, useSorted, useSpeechRecognition, useSpeechSynthesis, useStepper, useStorage, useStorageAsync, useStyleTag, useSupported, useSwipe, useTemplateRefsList, useTextDirection, useTextSelection, useTextareaAutosize, useThrottledRefHistory, useTimeAgo, useTimeAgoIntl, useTimeoutPoll, useTimestamp, useTitle, useTransition, useUrlSearchParams, useUserMedia, useVModel, useVModels, useVibrate, useVirtualList, useWakeLock, useWebNotification, useWebSocket, useWebWorker, useWebWorkerFn, useWindowFocus, useWindowScroll, useWindowSize };","import { defineStore } from 'pinia'\nimport { ref, computed, watch } from 'vue'\nimport { useLocalStorage } from '@vueuse/core'\nimport type {\n\tHSTOperation,\n\tHSTOperationInput,\n\tOperationLogConfig,\n\tUndoRedoState,\n\tOperationLogSnapshot,\n\tCrossTabMessage,\n\tOperationSource,\n} from '../types/operation-log'\nimport type { HSTNode } from './hst'\n\n/**\n * Generate a UUID using crypto API or fallback\n */\nfunction generateId(): string {\n\tif (typeof crypto !== 'undefined' && crypto.randomUUID) {\n\t\treturn crypto.randomUUID()\n\t}\n\t// Fallback for environments without crypto.randomUUID\n\treturn `${Date.now()}-${Math.random().toString(36).substring(2, 9)}`\n}\n\n/**\n * Serialize a message for BroadcastChannel\n * Converts Date objects to ISO strings for structured clone compatibility\n */\ntype SerializedOperation = Omit<HSTOperation, 'timestamp'> & { timestamp: string }\ntype SerializedCrossTabMessage = Omit<CrossTabMessage, 'timestamp' | 'operation' | 'operations'> & {\n\ttimestamp: string\n\toperation?: SerializedOperation\n\toperations?: SerializedOperation[]\n}\n\nfunction serializeForBroadcast(message: CrossTabMessage): SerializedCrossTabMessage {\n\tconst serialized: SerializedCrossTabMessage = {\n\t\ttype: message.type,\n\t\tclientId: message.clientId,\n\t\ttimestamp: message.timestamp.toISOString(),\n\t}\n\n\tif (message.operation) {\n\t\tserialized.operation = {\n\t\t\t...message.operation,\n\t\t\ttimestamp: message.operation.timestamp.toISOString(),\n\t\t}\n\t}\n\n\tif (message.operations) {\n\t\tserialized.operations = message.operations.map(op => ({\n\t\t\t...op,\n\t\t\ttimestamp: op.timestamp.toISOString(),\n\t\t}))\n\t}\n\n\treturn serialized\n}\n\n/**\n * Deserialize a message from BroadcastChannel\n * Converts ISO strings back to Date objects\n */\nfunction deserializeFromBroadcast(serialized: SerializedCrossTabMessage): CrossTabMessage {\n\tconst message: CrossTabMessage = {\n\t\ttype: serialized.type,\n\t\tclientId: serialized.clientId,\n\t\ttimestamp: new Date(serialized.timestamp),\n\t}\n\n\tif (serialized.operation) {\n\t\tmessage.operation = {\n\t\t\t...serialized.operation,\n\t\t\ttimestamp: new Date(serialized.operation.timestamp),\n\t\t}\n\t}\n\n\tif (serialized.operations) {\n\t\tmessage.operations = serialized.operations.map(op => ({\n\t\t\t...op,\n\t\t\ttimestamp: new Date(op.timestamp),\n\t\t}))\n\t}\n\n\treturn message\n}\n\n/**\n * Global HST Operation Log Store\n * Tracks all mutations with full metadata for undo/redo, sync, and audit\n *\n * @public\n */\nexport const useOperationLogStore = defineStore('hst-operation-log', () => {\n\t// Configuration\n\tconst config = ref<OperationLogConfig>({\n\t\tmaxOperations: 100,\n\t\tenableCrossTabSync: true,\n\t\tautoSyncInterval: 30000,\n\t\tenablePersistence: false,\n\t\tpersistenceKeyPrefix: 'stonecrop-ops',\n\t})\n\n\t// State\n\tconst operations = ref<HSTOperation[]>([])\n\tconst currentIndex = ref(-1) // Points to the last applied operation\n\tconst clientId = ref(generateId())\n\tconst batchMode = ref(false)\n\tconst currentBatch = ref<HSTOperation[]>([])\n\tconst currentBatchId = ref<string | null>(null)\n\n\t// Computed\n\tconst canUndo = computed(() => {\n\t\t// Can undo if there are operations and we're not at the beginning\n\t\tif (currentIndex.value < 0) return false\n\n\t\t// Check if the operation at currentIndex is reversible\n\t\tconst operation = operations.value[currentIndex.value]\n\t\treturn operation?.reversible ?? false\n\t})\n\n\tconst canRedo = computed(() => {\n\t\t// Can redo if there are operations ahead of current index\n\t\treturn currentIndex.value < operations.value.length - 1\n\t})\n\n\tconst undoCount = computed(() => {\n\t\tlet count = 0\n\t\tfor (let i = currentIndex.value; i >= 0; i--) {\n\t\t\tif (operations.value[i]?.reversible) count++\n\t\t\telse break\n\t\t}\n\t\treturn count\n\t})\n\n\tconst redoCount = computed(() => {\n\t\treturn operations.value.length - 1 - currentIndex.value\n\t})\n\n\tconst undoRedoState = computed<UndoRedoState>(() => ({\n\t\tcanUndo: canUndo.value,\n\t\tcanRedo: canRedo.value,\n\t\tundoCount: undoCount.value,\n\t\tredoCount: redoCount.value,\n\t\tcurrentIndex: currentIndex.value,\n\t}))\n\n\t// Core Methods\n\n\t/**\n\t * Configure the operation log\n\t */\n\tfunction configure(options: Partial<OperationLogConfig>) {\n\t\tconfig.value = { ...config.value, ...options }\n\n\t\t// Set up persistence if enabled\n\t\tif (config.value.enablePersistence) {\n\t\t\tloadFromPersistence()\n\t\t\tsetupPersistenceWatcher()\n\t\t}\n\n\t\t// Set up cross-tab sync if enabled\n\t\tif (config.value.enableCrossTabSync) {\n\t\t\tsetupCrossTabSync()\n\t\t}\n\t}\n\n\t/**\n\t * Add an operation to the log\n\t */\n\tfunction addOperation(operation: HSTOperationInput, source: OperationSource = 'user') {\n\t\tconst fullOperation: HSTOperation = {\n\t\t\t...operation,\n\t\t\tid: generateId(),\n\t\t\ttimestamp: new Date(),\n\t\t\tsource: source,\n\t\t\tuserId: config.value.userId,\n\t\t}\n\n\t\t// Apply filter if configured\n\t\tif (config.value.operationFilter && !config.value.operationFilter(fullOperation)) {\n\t\t\treturn fullOperation.id\n\t\t}\n\n\t\t// If in batch mode, collect operations\n\t\tif (batchMode.value) {\n\t\t\tcurrentBatch.value.push(fullOperation)\n\t\t\treturn fullOperation.id\n\t\t}\n\n\t\t// Remove any operations after current index (they become invalid after new operation)\n\t\tif (currentIndex.value < operations.value.length - 1) {\n\t\t\toperations.value = operations.value.slice(0, currentIndex.value + 1)\n\t\t}\n\n\t\t// Add new operation\n\t\toperations.value.push(fullOperation)\n\t\tcurrentIndex.value++\n\n\t\t// Enforce max operations limit\n\t\tif (config.value.maxOperations && operations.value.length > config.value.maxOperations) {\n\t\t\tconst overflow = operations.value.length - config.value.maxOperations\n\t\t\toperations.value = operations.value.slice(overflow)\n\t\t\tcurrentIndex.value -= overflow\n\t\t}\n\n\t\t// Broadcast to other tabs\n\t\tif (config.value.enableCrossTabSync) {\n\t\t\tbroadcastOperation(fullOperation)\n\t\t}\n\n\t\treturn fullOperation.id\n\t}\n\n\t/**\n\t * Start batch mode - collect multiple operations\n\t */\n\tfunction startBatch() {\n\t\tbatchMode.value = true\n\t\tcurrentBatch.value = []\n\t\tcurrentBatchId.value = generateId()\n\t}\n\n\t/**\n\t * Commit batch - create a single batch operation\n\t */\n\tfunction commitBatch(description?: string): string | null {\n\t\tif (!batchMode.value || currentBatch.value.length === 0) {\n\t\t\tbatchMode.value = false\n\t\t\tcurrentBatch.value = []\n\t\t\tcurrentBatchId.value = null\n\t\t\treturn null\n\t\t}\n\n\t\tconst batchId = currentBatchId.value!\n\t\tconst allReversible = currentBatch.value.every(op => op.reversible)\n\n\t\t// Create parent batch operation\n\t\tconst batchOperation: HSTOperation = {\n\t\t\tid: batchId,\n\t\t\ttype: 'batch',\n\t\t\tpath: '', // Batch doesn't have a single path\n\t\t\tfieldname: '',\n\t\t\tbeforeValue: null,\n\t\t\tafterValue: null,\n\t\t\tdoctype: currentBatch.value[0]?.doctype || '',\n\t\t\ttimestamp: new Date(),\n\t\t\tsource: 'user',\n\t\t\treversible: allReversible,\n\t\t\tirreversibleReason: allReversible ? undefined : 'Contains irreversible operations',\n\t\t\tchildOperationIds: currentBatch.value.map(op => op.id),\n\t\t\tmetadata: { description },\n\t\t}\n\n\t\t// Add parent operation ID to all children\n\t\tcurrentBatch.value.forEach(op => {\n\t\t\top.parentOperationId = batchId\n\t\t})\n\n\t\t// Add all operations to the log\n\t\toperations.value.push(...currentBatch.value, batchOperation)\n\t\tcurrentIndex.value = operations.value.length - 1\n\n\t\t// Broadcast batch\n\t\tif (config.value.enableCrossTabSync) {\n\t\t\tbroadcastBatch(currentBatch.value, batchOperation)\n\t\t}\n\n\t\t// Reset batch state\n\t\tconst result = batchId\n\t\tbatchMode.value = false\n\t\tcurrentBatch.value = []\n\t\tcurrentBatchId.value = null\n\n\t\treturn result\n\t}\n\n\t/**\n\t * Cancel batch mode without committing\n\t */\n\tfunction cancelBatch() {\n\t\tbatchMode.value = false\n\t\tcurrentBatch.value = []\n\t\tcurrentBatchId.value = null\n\t}\n\n\t/**\n\t * Undo the last operation\n\t */\n\tfunction undo(store: HSTNode): boolean {\n\t\tif (!canUndo.value) return false\n\n\t\tconst operation = operations.value[currentIndex.value]\n\n\t\tif (!operation.reversible) {\n\t\t\t// Warn about irreversible operation\n\t\t\tif (typeof console !== 'undefined' && operation.irreversibleReason) {\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.warn('Cannot undo irreversible operation:', operation.irreversibleReason)\n\t\t\t}\n\t\t\treturn false\n\t\t}\n\n\t\ttry {\n\t\t\t// Handle batch operations\n\t\t\tif (operation.type === 'batch' && operation.childOperationIds) {\n\t\t\t\t// Undo all child operations in reverse order\n\t\t\t\tfor (let i = operation.childOperationIds.length - 1; i >= 0; i--) {\n\t\t\t\t\tconst childId = operation.childOperationIds[i]\n\t\t\t\t\tconst childOp = operations.value.find(op => op.id === childId)\n\t\t\t\t\tif (childOp) {\n\t\t\t\t\t\trevertOperation(childOp, store)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Undo single operation\n\t\t\t\trevertOperation(operation, store)\n\t\t\t}\n\n\t\t\tcurrentIndex.value--\n\n\t\t\t// Broadcast undo to other tabs\n\t\t\tif (config.value.enableCrossTabSync) {\n\t\t\t\tbroadcastUndo(operation)\n\t\t\t}\n\n\t\t\treturn true\n\t\t} catch (error) {\n\t\t\t// Log error in development\n\t\t\tif (typeof console !== 'undefined') {\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.error('Undo failed:', error)\n\t\t\t}\n\t\t\treturn false\n\t\t}\n\t}\n\n\t/**\n\t * Redo the next operation\n\t */\n\tfunction redo(store: HSTNode): boolean {\n\t\tif (!canRedo.value) return false\n\n\t\tconst operation = operations.value[currentIndex.value + 1]\n\n\t\ttry {\n\t\t\t// Handle batch operations\n\t\t\tif (operation.type === 'batch' && operation.childOperationIds) {\n\t\t\t\t// Redo all child operations in order\n\t\t\t\tfor (const childId of operation.childOperationIds) {\n\t\t\t\t\tconst childOp = operations.value.find(op => op.id === childId)\n\t\t\t\t\tif (childOp) {\n\t\t\t\t\t\tapplyOperation(childOp, store)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Redo single operation\n\t\t\t\tapplyOperation(operation, store)\n\t\t\t}\n\n\t\t\tcurrentIndex.value++\n\n\t\t\t// Broadcast redo to other tabs\n\t\t\tif (config.value.enableCrossTabSync) {\n\t\t\t\tbroadcastRedo(operation)\n\t\t\t}\n\n\t\t\treturn true\n\t\t} catch (error) {\n\t\t\t// Log error in development\n\t\t\tif (typeof console !== 'undefined') {\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.error('Redo failed:', error)\n\t\t\t}\n\t\t\treturn false\n\t\t}\n\t}\n\n\t/**\n\t * Revert an operation (apply beforeValue)\n\t */\n\tfunction revertOperation(operation: HSTOperation, store: HSTNode) {\n\t\t// Both 'set' and 'delete' operations can be reverted by setting to beforeValue\n\t\tif ((operation.type === 'set' || operation.type === 'delete') && store && typeof store.set === 'function') {\n\t\t\tstore.set(operation.path, operation.beforeValue, 'undo')\n\t\t}\n\t\t// Note: 'transition' operations are marked as non-reversible, so they won't reach here\n\t\t// Note: 'batch' operations are handled separately in the undo function\n\t}\n\n\t/**\n\t * Apply an operation (apply afterValue)\n\t */\n\tfunction applyOperation(operation: HSTOperation, store: HSTNode) {\n\t\t// Both 'set' and 'delete' operations can be applied by setting to afterValue\n\t\tif ((operation.type === 'set' || operation.type === 'delete') && store && typeof store.set === 'function') {\n\t\t\tstore.set(operation.path, operation.afterValue, 'redo')\n\t\t}\n\t\t// Note: 'transition' operations are marked as non-reversible, so they won't reach here\n\t\t// Note: 'batch' operations are handled separately in the redo function\n\t}\n\n\t/**\n\t * Get operation log snapshot for debugging\n\t */\n\tfunction getSnapshot(): OperationLogSnapshot {\n\t\tconst reversibleOps = operations.value.filter(op => op.reversible).length\n\t\tconst timestamps = operations.value.map(op => op.timestamp)\n\n\t\treturn {\n\t\t\toperations: [...operations.value],\n\t\t\tcurrentIndex: currentIndex.value,\n\t\t\ttotalOperations: operations.value.length,\n\t\t\treversibleOperations: reversibleOps,\n\t\t\tirreversibleOperations: operations.value.length - reversibleOps,\n\t\t\toldestOperation: timestamps.length > 0 ? new Date(Math.min(...timestamps.map(t => t.getTime()))) : undefined,\n\t\t\tnewestOperation: timestamps.length > 0 ? new Date(Math.max(...timestamps.map(t => t.getTime()))) : undefined,\n\t\t}\n\t}\n\n\t/**\n\t * Clear all operations\n\t */\n\tfunction clear() {\n\t\toperations.value = []\n\t\tcurrentIndex.value = -1\n\t}\n\n\t/**\n\t * Get operations for a specific doctype and recordId\n\t */\n\tfunction getOperationsFor(doctype: string, recordId?: string): HSTOperation[] {\n\t\treturn operations.value.filter(op => op.doctype === doctype && (recordId === undefined || op.recordId === recordId))\n\t}\n\n\t/**\n\t * Mark an operation as irreversible\n\t * @param operationId - The ID of the operation to mark\n\t * @param reason - The reason why the operation is irreversible\n\t */\n\tfunction markIrreversible(operationId: string, reason: string) {\n\t\tconst operation = operations.value.find(op => op.id === operationId)\n\t\tif (operation) {\n\t\t\toperation.reversible = false\n\t\t\toperation.irreversibleReason = reason\n\t\t}\n\t}\n\n\t/**\n\t * Log an action execution (stateless actions like print, email, etc.)\n\t * These operations are tracked but typically not reversible\n\t * @param doctype - The doctype the action was executed on\n\t * @param actionName - The name of the action that was executed\n\t * @param recordIds - Optional array of record IDs the action was executed on\n\t * @param result - The result of the action execution\n\t * @param error - Optional error message if action failed\n\t * @returns The operation ID\n\t */\n\tfunction logAction(\n\t\tdoctype: string,\n\t\tactionName: string,\n\t\trecordIds?: string[],\n\t\tresult: 'success' | 'failure' | 'pending' = 'success',\n\t\terror?: string\n\t): string {\n\t\tconst operation: HSTOperationInput = {\n\t\t\ttype: 'action',\n\t\t\tpath: recordIds && recordIds.length > 0 ? `${doctype}.${recordIds[0]}` : doctype,\n\t\t\tfieldname: '',\n\t\t\tbeforeValue: null,\n\t\t\tafterValue: null,\n\t\t\tdoctype,\n\t\t\trecordId: recordIds && recordIds.length > 0 ? recordIds[0] : undefined,\n\t\t\treversible: false, // Actions are typically not reversible\n\t\t\tactionName,\n\t\t\tactionRecordIds: recordIds,\n\t\t\tactionResult: result,\n\t\t\tactionError: error,\n\t\t}\n\n\t\treturn addOperation(operation)\n\t}\n\n\t// Cross-tab synchronization\n\tlet broadcastChannel: BroadcastChannel | null = null\n\n\tfunction setupCrossTabSync() {\n\t\tif (typeof window === 'undefined' || !window.BroadcastChannel) return\n\n\t\tbroadcastChannel = new BroadcastChannel('stonecrop-operation-log')\n\n\t\tbroadcastChannel.addEventListener('message', (event: MessageEvent) => {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n\t\t\tconst rawMessage = event.data\n\n\t\t\tif (!rawMessage || typeof rawMessage !== 'object') return\n\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n\t\t\tconst message = deserializeFromBroadcast(rawMessage)\n\n\t\t\t// Ignore messages from this tab\n\t\t\tif (message.clientId === clientId.value) return\n\n\t\t\tif (message.type === 'operation' && message.operation) {\n\t\t\t\t// Add operation from another tab\n\t\t\t\toperations.value.push({ ...message.operation, source: 'sync' as OperationSource })\n\t\t\t\tcurrentIndex.value = operations.value.length - 1\n\t\t\t} else if (message.type === 'operation' && message.operations) {\n\t\t\t\t// Add batch operations from another tab\n\t\t\t\toperations.value.push(...message.operations.map(op => ({ ...op, source: 'sync' as OperationSource })))\n\t\t\t\tcurrentIndex.value = operations.value.length - 1\n\t\t\t}\n\t\t})\n\t}\n\n\tfunction broadcastOperation(operation: HSTOperation) {\n\t\tif (!broadcastChannel) return\n\n\t\tconst message: CrossTabMessage = {\n\t\t\ttype: 'operation',\n\t\t\toperation,\n\t\t\tclientId: clientId.value,\n\t\t\ttimestamp: new Date(),\n\t\t}\n\t\tbroadcastChannel.postMessage(serializeForBroadcast(message))\n\t}\n\n\tfunction broadcastBatch(childOps: HSTOperation[], batchOp: HSTOperation) {\n\t\tif (!broadcastChannel) return\n\n\t\tconst message: CrossTabMessage = {\n\t\t\ttype: 'operation',\n\t\t\toperations: [...childOps, batchOp],\n\t\t\tclientId: clientId.value,\n\t\t\ttimestamp: new Date(),\n\t\t}\n\t\tbroadcastChannel.postMessage(serializeForBroadcast(message))\n\t}\n\n\tfunction broadcastUndo(operation: HSTOperation) {\n\t\tif (!broadcastChannel) return\n\n\t\tconst message: CrossTabMessage = {\n\t\t\ttype: 'undo',\n\t\t\toperation,\n\t\t\tclientId: clientId.value,\n\t\t\ttimestamp: new Date(),\n\t\t}\n\t\tbroadcastChannel.postMessage(serializeForBroadcast(message))\n\t}\n\n\tfunction broadcastRedo(operation: HSTOperation) {\n\t\tif (!broadcastChannel) return\n\n\t\tconst message: CrossTabMessage = {\n\t\t\ttype: 'redo',\n\t\t\toperation,\n\t\t\tclientId: clientId.value,\n\t\t\ttimestamp: new Date(),\n\t\t}\n\t\tbroadcastChannel.postMessage(serializeForBroadcast(message))\n\t}\n\n\t// Persistence using VueUse\n\ttype PersistedData = {\n\t\toperations: Array<Omit<HSTOperation, 'timestamp'> & { timestamp: string }>\n\t\tcurrentIndex: number\n\t}\n\n\tconst persistedData = useLocalStorage<PersistedData | null>('stonecrop-ops-operations', null, {\n\t\tserializer: {\n\t\t\tread: (v: string) => {\n\t\t\t\ttry {\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n\t\t\t\t\tconst data = JSON.parse(v)\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-return\n\t\t\t\t\treturn data\n\t\t\t\t} catch {\n\t\t\t\t\treturn null\n\t\t\t\t}\n\t\t\t},\n\t\t\twrite: (v: PersistedData | null) => {\n\t\t\t\tif (!v) return ''\n\t\t\t\treturn JSON.stringify(v)\n\t\t\t},\n\t\t},\n\t})\n\n\tfunction loadFromPersistence() {\n\t\tif (typeof window === 'undefined') return\n\n\t\ttry {\n\t\t\tconst data = persistedData.value\n\t\t\tif (data && Array.isArray(data.operations)) {\n\t\t\t\toperations.value = data.operations.map(op => ({\n\t\t\t\t\t...op,\n\t\t\t\t\ttimestamp: new Date(op.timestamp),\n\t\t\t\t}))\n\t\t\t\tcurrentIndex.value = data.currentIndex ?? -1\n\t\t\t}\n\t\t} catch (error) {\n\t\t\t// Log error in development\n\t\t\tif (typeof console !== 'undefined') {\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.error('Failed to load operations from persistence:', error)\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction saveToPersistence() {\n\t\tif (typeof window === 'undefined') return\n\n\t\ttry {\n\t\t\tpersistedData.value = {\n\t\t\t\toperations: operations.value.map(op => ({\n\t\t\t\t\t...op,\n\t\t\t\t\ttimestamp: op.timestamp.toISOString(),\n\t\t\t\t})),\n\t\t\t\tcurrentIndex: currentIndex.value,\n\t\t\t}\n\t\t} catch (error) {\n\t\t\t// Log error in development\n\t\t\tif (typeof console !== 'undefined') {\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.error('Failed to save operations to persistence:', error)\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction setupPersistenceWatcher() {\n\t\twatch(\n\t\t\t[operations, currentIndex],\n\t\t\t() => {\n\t\t\t\tif (config.value.enablePersistence) {\n\t\t\t\t\tsaveToPersistence()\n\t\t\t\t}\n\t\t\t},\n\t\t\t{ deep: true }\n\t\t)\n\t}\n\n\treturn {\n\t\t// State\n\t\toperations,\n\t\tcurrentIndex,\n\t\tconfig,\n\t\tclientId,\n\t\tundoRedoState,\n\n\t\t// Computed\n\t\tcanUndo,\n\t\tcanRedo,\n\t\tundoCount,\n\t\tredoCount,\n\n\t\t// Methods\n\t\tconfigure,\n\t\taddOperation,\n\t\tstartBatch,\n\t\tcommitBatch,\n\t\tcancelBatch,\n\t\tundo,\n\t\tredo,\n\t\tclear,\n\t\tgetOperationsFor,\n\t\tgetSnapshot,\n\t\tmarkIrreversible,\n\t\tlogAction,\n\t}\n})\n","/* eslint-disable no-new-func, no-eval */\nimport type { Map as ImmutableMap } from 'immutable'\nimport { useOperationLogStore } from './stores/operation-log'\nimport type {\n\tFieldActionFunction,\n\tFieldChangeContext,\n\tFieldTriggerExecutionResult,\n\tFieldTriggerOptions,\n\tActionExecutionResult,\n\tTransitionChangeContext,\n\tTransitionActionFunction,\n\tTransitionExecutionResult,\n} from './types/field-triggers'\n\n/**\n * Field trigger execution engine integrated with Registry\n * Singleton pattern following Registry implementation\n * @public\n */\nexport class FieldTriggerEngine {\n\t/**\n\t * The root FieldTriggerEngine instance\n\t */\n\tstatic _root: FieldTriggerEngine\n\n\tprivate options: FieldTriggerOptions & { defaultTimeout: number; debug: boolean; enableRollback: boolean }\n\tprivate doctypeActions = new Map<string, Map<string, string[]>>() // doctype -> action/field -> functions\n\tprivate doctypeTransitions = new Map<string, Map<string, string[]>>() // doctype -> transition -> functions\n\tprivate fieldRollbackConfig = new Map<string, Map<string, boolean>>() // doctype -> field -> rollback enabled\n\tprivate globalActions = new Map<string, FieldActionFunction>() // action name -> function\n\tprivate globalTransitionActions = new Map<string, TransitionActionFunction>() // transition action name -> function\n\n\t/**\n\t * Creates a new FieldTriggerEngine instance (singleton pattern)\n\t * @param options - Configuration options for the field trigger engine\n\t */\n\tconstructor(options: FieldTriggerOptions = {}) {\n\t\tif (FieldTriggerEngine._root) {\n\t\t\treturn FieldTriggerEngine._root\n\t\t}\n\t\tFieldTriggerEngine._root = this\n\t\tthis.options = {\n\t\t\tdefaultTimeout: options.defaultTimeout ?? 5000,\n\t\t\tdebug: options.debug ?? false,\n\t\t\tenableRollback: options.enableRollback ?? true,\n\t\t\terrorHandler: options.errorHandler,\n\t\t}\n\t}\n\n\t/**\n\t * Register a global action function\n\t * @param name - The name of the action\n\t * @param fn - The action function\n\t */\n\tregisterAction(name: string, fn: FieldActionFunction): void {\n\t\tthis.globalActions.set(name, fn)\n\t}\n\n\t/**\n\t * Register a global XState transition action function\n\t * @param name - The name of the transition action\n\t * @param fn - The transition action function\n\t */\n\tregisterTransitionAction(name: string, fn: TransitionActionFunction): void {\n\t\tthis.globalTransitionActions.set(name, fn)\n\t}\n\n\t/**\n\t * Configure rollback behavior for a specific field trigger\n\t * @param doctype - The doctype name\n\t * @param fieldname - The field name\n\t * @param enableRollback - Whether to enable rollback\n\t */\n\tsetFieldRollback(doctype: string, fieldname: string, enableRollback: boolean): void {\n\t\tif (!this.fieldRollbackConfig.has(doctype)) {\n\t\t\tthis.fieldRollbackConfig.set(doctype, new Map())\n\t\t}\n\t\tthis.fieldRollbackConfig.get(doctype)!.set(fieldname, enableRollback)\n\t}\n\n\t/**\n\t * Get rollback configuration for a specific field trigger\n\t */\n\tprivate getFieldRollback(doctype: string, fieldname: string): boolean | undefined {\n\t\treturn this.fieldRollbackConfig.get(doctype)?.get(fieldname)\n\t}\n\n\t/**\n\t * Register actions from a doctype - both regular actions and field triggers\n\t * Separates XState transitions (uppercase) from field triggers (lowercase)\n\t * @param doctype - The doctype name\n\t * @param actions - The actions to register (supports Immutable Map, Map, or plain object)\n\t */\n\tregisterDoctypeActions(\n\t\tdoctype: string,\n\t\tactions: ImmutableMap<string, string[]> | Map<string, string[]> | Record<string, string[]> | undefined\n\t): void {\n\t\tif (!actions) return\n\n\t\tconst actionMap = new Map<string, string[]>()\n\t\tconst transitionMap = new Map<string, string[]>()\n\n\t\t// Convert from different Map types to regular Map\n\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\tif (typeof (actions as any).entrySeq === 'function') {\n\t\t\t// Immutable Map\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t\t;(actions as any).entrySeq().forEach(([key, value]: [string, string[]]) => {\n\t\t\t\tthis.categorizeAction(key, value, actionMap, transitionMap)\n\t\t\t})\n\t\t} else if (actions instanceof Map) {\n\t\t\t// Regular Map\n\t\t\tfor (const [key, value] of actions) {\n\t\t\t\tthis.categorizeAction(key, value, actionMap, transitionMap)\n\t\t\t}\n\t\t} else if (actions && typeof actions === 'object') {\n\t\t\t// Plain object\n\t\t\tObject.entries(actions).forEach(([key, value]) => {\n\t\t\t\tthis.categorizeAction(key, value as string[], actionMap, transitionMap)\n\t\t\t})\n\t\t}\n\n\t\t// Always set the maps, even if empty\n\t\tthis.doctypeActions.set(doctype, actionMap)\n\t\tthis.doctypeTransitions.set(doctype, transitionMap)\n\t}\n\n\t/**\n\t * Categorize an action as either a field trigger or XState transition\n\t * Uses uppercase convention: UPPERCASE = transition, lowercase/mixed = field trigger\n\t */\n\tprivate categorizeAction(\n\t\tkey: string,\n\t\tvalue: string[],\n\t\tactionMap: Map<string, string[]>,\n\t\ttransitionMap: Map<string, string[]>\n\t): void {\n\t\t// Check if the key is all uppercase (XState transition convention)\n\t\tif (this.isTransitionKey(key)) {\n\t\t\ttransitionMap.set(key, value)\n\t\t} else {\n\t\t\tactionMap.set(key, value)\n\t\t}\n\t}\n\n\t/**\n\t * Determine if a key represents an XState transition\n\t * Transitions are identified by being all uppercase\n\t */\n\tprivate isTransitionKey(key: string): boolean {\n\t\t// Must be all uppercase letters/numbers/underscores\n\t\treturn /^[A-Z0-9_]+$/.test(key) && key.length > 0\n\t}\n\n\t/**\n\t * Execute field triggers for a changed field\n\t * @param context - The field change context\n\t * @param options - Execution options (timeout and enableRollback)\n\t */\n\tasync executeFieldTriggers(\n\t\tcontext: FieldChangeContext,\n\t\toptions: { timeout?: number; enableRollback?: boolean } = {}\n\t): Promise<FieldTriggerExecutionResult> {\n\t\tconst { doctype, fieldname } = context\n\t\tconst triggers = this.findFieldTriggers(doctype, fieldname)\n\n\t\tif (triggers.length === 0) {\n\t\t\treturn {\n\t\t\t\tpath: context.path,\n\t\t\t\tactionResults: [],\n\t\t\t\ttotalExecutionTime: 0,\n\t\t\t\tallSucceeded: true,\n\t\t\t\tstoppedOnError: false,\n\t\t\t\trolledBack: false,\n\t\t\t}\n\t\t}\n\n\t\tconst startTime = performance.now()\n\t\tconst actionResults: ActionExecutionResult[] = []\n\t\tlet stoppedOnError = false\n\t\tlet rolledBack = false\n\t\tlet snapshot: any = undefined\n\n\t\t// Determine if rollback is enabled (priority: execution option > field config > global setting)\n\t\tconst fieldRollbackConfig = this.getFieldRollback(doctype, fieldname)\n\t\tconst rollbackEnabled = options.enableRollback ?? fieldRollbackConfig ?? this.options.enableRollback\n\n\t\t// Capture snapshot before executing actions if rollback is enabled\n\t\tif (rollbackEnabled && context.store) {\n\t\t\tsnapshot = this.captureSnapshot(context)\n\t\t}\n\n\t\t// Execute actions sequentially\n\t\tfor (const actionName of triggers) {\n\t\t\ttry {\n\t\t\t\tconst actionResult = await this.executeAction(actionName, context, options.timeout)\n\t\t\t\tactionResults.push(actionResult)\n\n\t\t\t\tif (!actionResult.success) {\n\t\t\t\t\tstoppedOnError = true\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tconst actionError = error instanceof Error ? error : new Error(String(error))\n\t\t\t\tconst errorResult: ActionExecutionResult = {\n\t\t\t\t\tsuccess: false,\n\t\t\t\t\terror: actionError,\n\t\t\t\t\texecutionTime: 0,\n\t\t\t\t\taction: actionName,\n\t\t\t\t}\n\t\t\t\tactionResults.push(errorResult)\n\t\t\t\tstoppedOnError = true\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\n\t\t// Perform rollback if enabled, errors occurred, and we have a snapshot\n\t\tif (rollbackEnabled && stoppedOnError && snapshot && context.store) {\n\t\t\ttry {\n\t\t\t\tthis.restoreSnapshot(context, snapshot)\n\t\t\t\trolledBack = true\n\t\t\t} catch (rollbackError) {\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.error('[FieldTriggers] Rollback failed:', rollbackError)\n\t\t\t}\n\t\t}\n\n\t\tconst totalExecutionTime = performance.now() - startTime\n\n\t\t// Call global error handler if configured and errors occurred\n\t\tconst failedResults = actionResults.filter(r => !r.success)\n\t\tif (failedResults.length > 0 && this.options.errorHandler) {\n\t\t\tfor (const failedResult of failedResults) {\n\t\t\t\ttry {\n\t\t\t\t\tthis.options.errorHandler(failedResult.error!, context, failedResult.action)\n\t\t\t\t} catch (handlerError) {\n\t\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\t\tconsole.error('[FieldTriggers] Error in global error handler:', handlerError)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst result: FieldTriggerExecutionResult = {\n\t\t\tpath: context.path,\n\t\t\tactionResults,\n\t\t\ttotalExecutionTime,\n\t\t\tallSucceeded: actionResults.every(r => r.success),\n\t\t\tstoppedOnError,\n\t\t\trolledBack,\n\t\t\tsnapshot: this.options.debug && rollbackEnabled ? snapshot : undefined, // Only include snapshot in debug mode if rollback is enabled\n\t\t}\n\n\t\treturn result\n\t}\n\n\t/**\n\t * Execute XState transition actions\n\t * Similar to field triggers but specifically for FSM state transitions\n\t * @param context - The transition change context\n\t * @param options - Execution options (timeout)\n\t */\n\tasync executeTransitionActions(\n\t\tcontext: TransitionChangeContext,\n\t\toptions: { timeout?: number } = {}\n\t): Promise<TransitionExecutionResult[]> {\n\t\tconst { doctype, transition } = context\n\t\tconst transitionActions = this.findTransitionActions(doctype, transition)\n\n\t\tif (transitionActions.length === 0) {\n\t\t\treturn []\n\t\t}\n\n\t\tconst results: TransitionExecutionResult[] = []\n\n\t\t// Execute transition actions sequentially\n\t\tfor (const actionName of transitionActions) {\n\t\t\ttry {\n\t\t\t\tconst actionResult = await this.executeTransitionAction(actionName, context, options.timeout)\n\t\t\t\tresults.push(actionResult)\n\n\t\t\t\tif (!actionResult.success) {\n\t\t\t\t\t// Stop on first error for transitions\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tconst actionError = error instanceof Error ? error : new Error(String(error))\n\t\t\t\tconst errorResult: TransitionExecutionResult = {\n\t\t\t\t\tsuccess: false,\n\t\t\t\t\terror: actionError,\n\t\t\t\t\texecutionTime: 0,\n\t\t\t\t\taction: actionName,\n\t\t\t\t\ttransition,\n\t\t\t\t}\n\t\t\t\tresults.push(errorResult)\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\n\t\t// Call global error handler if configured and errors occurred\n\t\tconst failedResults = results.filter(r => !r.success)\n\t\tif (failedResults.length > 0 && this.options.errorHandler) {\n\t\t\tfor (const failedResult of failedResults) {\n\t\t\t\ttry {\n\t\t\t\t\t// Call with FieldChangeContext (base context type)\n\t\t\t\t\tthis.options.errorHandler(failedResult.error!, context, failedResult.action)\n\t\t\t\t} catch (handlerError) {\n\t\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\t\tconsole.error('[FieldTriggers] Error in global error handler:', handlerError)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn results\n\t}\n\n\t/**\n\t * Find transition actions for a specific doctype and transition\n\t */\n\tprivate findTransitionActions(doctype: string, transition: string): string[] {\n\t\tconst doctypeTransitions = this.doctypeTransitions.get(doctype)\n\t\tif (!doctypeTransitions) return []\n\n\t\treturn doctypeTransitions.get(transition) || []\n\t}\n\n\t/**\n\t * Execute a single transition action by name\n\t */\n\tprivate async executeTransitionAction(\n\t\tactionName: string,\n\t\tcontext: TransitionChangeContext,\n\t\ttimeout?: number\n\t): Promise<TransitionExecutionResult> {\n\t\tconst startTime = performance.now()\n\t\tconst actionTimeout = timeout ?? this.options.defaultTimeout\n\n\t\ttry {\n\t\t\t// Look up action in transition-specific registry first, then fall back to global\n\t\t\tlet actionFn = this.globalTransitionActions.get(actionName)\n\n\t\t\t// If not found in transition registry, try regular action registry\n\t\t\t// This allows sharing actions between field triggers and transitions\n\t\t\tif (!actionFn) {\n\t\t\t\tconst regularActionFn = this.globalActions.get(actionName)\n\t\t\t\tif (regularActionFn) {\n\t\t\t\t\t// Wrap regular action to accept TransitionChangeContext\n\t\t\t\t\tactionFn = regularActionFn as unknown as TransitionActionFunction\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!actionFn) {\n\t\t\t\tthrow new Error(`Transition action \"${actionName}\" not found in registry`)\n\t\t\t}\n\n\t\t\tawait this.executeWithTimeout(actionFn as FieldActionFunction, context, actionTimeout)\n\t\t\tconst executionTime = performance.now() - startTime\n\n\t\t\treturn {\n\t\t\t\tsuccess: true,\n\t\t\t\texecutionTime,\n\t\t\t\taction: actionName,\n\t\t\t\ttransition: context.transition,\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tconst executionTime = performance.now() - startTime\n\t\t\tconst actionError = error instanceof Error ? error : new Error(String(error))\n\n\t\t\treturn {\n\t\t\t\tsuccess: false,\n\t\t\t\terror: actionError,\n\t\t\t\texecutionTime,\n\t\t\t\taction: actionName,\n\t\t\t\ttransition: context.transition,\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Find field triggers for a specific doctype and field\n\t * Field triggers are identified by keys that look like field paths (contain dots or match field names)\n\t */\n\tprivate findFieldTriggers(doctype: string, fieldname: string): string[] {\n\t\tconst doctypeActions = this.doctypeActions.get(doctype)\n\t\tif (!doctypeActions) return []\n\n\t\tconst triggers: string[] = []\n\n\t\tfor (const [key, actionNames] of doctypeActions) {\n\t\t\t// Check if this key is a field trigger pattern\n\t\t\tif (this.isFieldTriggerKey(key, fieldname)) {\n\t\t\t\ttriggers.push(...actionNames)\n\t\t\t}\n\t\t}\n\n\t\treturn triggers\n\t}\n\n\t/**\n\t * Determine if an action key represents a field trigger\n\t * Field triggers can be:\n\t * - Exact field name match: \"emailAddress\"\n\t * - Wildcard patterns: \"emailAddress.*\", \"*.is_primary\"\n\t * - Nested field paths: \"address.street\", \"contact.email\"\n\t */\n\tprivate isFieldTriggerKey(key: string, fieldname: string): boolean {\n\t\t// Exact match\n\t\tif (key === fieldname) return true\n\n\t\t// Contains dots - likely a field path pattern\n\t\tif (key.includes('.')) {\n\t\t\treturn this.matchFieldPattern(key, fieldname)\n\t\t}\n\n\t\t// Contains wildcards\n\t\tif (key.includes('*')) {\n\t\t\treturn this.matchFieldPattern(key, fieldname)\n\t\t}\n\n\t\treturn false\n\t}\n\n\t/**\n\t * Match a field pattern against a field name\n\t * Supports wildcards (*) for dynamic segments\n\t */\n\tprivate matchFieldPattern(pattern: string, fieldname: string): boolean {\n\t\tconst patternParts = pattern.split('.')\n\t\tconst fieldParts = fieldname.split('.')\n\n\t\tif (patternParts.length !== fieldParts.length) {\n\t\t\treturn false\n\t\t}\n\n\t\tfor (let i = 0; i < patternParts.length; i++) {\n\t\t\tconst patternPart = patternParts[i]\n\t\t\tconst fieldPart = fieldParts[i]\n\n\t\t\tif (patternPart === '*') {\n\t\t\t\t// Wildcard matches any segment\n\t\t\t\tcontinue\n\t\t\t} else if (patternPart !== fieldPart) {\n\t\t\t\t// Exact match required\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\n\t\treturn true\n\t}\n\n\t/**\n\t * Execute a single action by name\n\t */\n\tprivate async executeAction(\n\t\tactionName: string,\n\t\tcontext: FieldChangeContext,\n\t\ttimeout?: number\n\t): Promise<ActionExecutionResult> {\n\t\tconst startTime = performance.now()\n\t\tconst actionTimeout = timeout ?? this.options.defaultTimeout\n\n\t\ttry {\n\t\t\t// Look up action in global registry\n\t\t\tconst actionFn = this.globalActions.get(actionName)\n\t\t\tif (!actionFn) {\n\t\t\t\tthrow new Error(`Action \"${actionName}\" not found in registry`)\n\t\t\t}\n\n\t\t\tawait this.executeWithTimeout(actionFn, context, actionTimeout)\n\t\t\tconst executionTime = performance.now() - startTime\n\n\t\t\treturn {\n\t\t\t\tsuccess: true,\n\t\t\t\texecutionTime,\n\t\t\t\taction: actionName,\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tconst executionTime = performance.now() - startTime\n\t\t\tconst actionError = error instanceof Error ? error : new Error(String(error))\n\n\t\t\treturn {\n\t\t\t\tsuccess: false,\n\t\t\t\terror: actionError,\n\t\t\t\texecutionTime,\n\t\t\t\taction: actionName,\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Execute a function with timeout\n\t */\n\tprivate async executeWithTimeout(\n\t\tfn: FieldActionFunction,\n\t\tcontext: FieldChangeContext,\n\t\ttimeout: number\n\t): Promise<unknown> {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tconst timeoutId = setTimeout(() => {\n\t\t\t\treject(new Error(`Action timeout after ${timeout}ms`))\n\t\t\t}, timeout)\n\n\t\t\tPromise.resolve(fn(context))\n\t\t\t\t.then(result => {\n\t\t\t\t\tclearTimeout(timeoutId)\n\t\t\t\t\tresolve(result)\n\t\t\t\t})\n\t\t\t\t.catch(error => {\n\t\t\t\t\tclearTimeout(timeoutId)\n\t\t\t\t\treject(error)\n\t\t\t\t})\n\t\t})\n\t}\n\n\t/**\n\t * Capture a snapshot of the record state before executing actions\n\t * This creates a deep copy of the record data for potential rollback\n\t */\n\tprivate captureSnapshot(context: FieldChangeContext): any {\n\t\tif (!context.store || !context.doctype || !context.recordId) {\n\t\t\treturn undefined\n\t\t}\n\n\t\ttry {\n\t\t\t// Get the record path (doctype.recordId)\n\t\t\tconst recordPath = `${context.doctype}.${context.recordId}`\n\n\t\t\t// Get the current record data\n\t\t\tconst recordData = context.store.get(recordPath)\n\n\t\t\tif (!recordData || typeof recordData !== 'object') {\n\t\t\t\treturn undefined\n\t\t\t}\n\n\t\t\t// Create a deep copy to avoid reference issues\n\t\t\treturn JSON.parse(JSON.stringify(recordData))\n\t\t} catch (error) {\n\t\t\tif (this.options.debug) {\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.warn('[FieldTriggers] Failed to capture snapshot:', error)\n\t\t\t}\n\t\t\treturn undefined\n\t\t}\n\t}\n\n\t/**\n\t * Restore a previously captured snapshot\n\t * This reverts the record to its state before actions were executed\n\t */\n\tprivate restoreSnapshot(context: FieldChangeContext, snapshot: any): void {\n\t\tif (!context.store || !context.doctype || !context.recordId || !snapshot) {\n\t\t\treturn\n\t\t}\n\n\t\ttry {\n\t\t\t// Get the record path (doctype.recordId)\n\t\t\tconst recordPath = `${context.doctype}.${context.recordId}`\n\n\t\t\t// Restore the entire record from snapshot\n\t\t\tcontext.store.set(recordPath, snapshot)\n\n\t\t\tif (this.options.debug) {\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.log(`[FieldTriggers] Rolled back ${recordPath} to previous state`)\n\t\t\t}\n\t\t} catch (error) {\n\t\t\t// eslint-disable-next-line no-console\n\t\t\tconsole.error('[FieldTriggers] Failed to restore snapshot:', error)\n\t\t\tthrow error\n\t\t}\n\t}\n}\n\n/**\n * Get or create the global field trigger engine singleton\n * @param options - Optional configuration for the field trigger engine\n * @public\n */\nexport function getGlobalTriggerEngine(options?: FieldTriggerOptions): FieldTriggerEngine {\n\treturn new FieldTriggerEngine(options)\n}\n\n/**\n * Register a global action function that can be used in field triggers\n * @param name - The name of the action to register\n * @param fn - The action function to execute when the trigger fires\n * @public\n */\nexport function registerGlobalAction(name: string, fn: FieldActionFunction): void {\n\tconst engine = getGlobalTriggerEngine()\n\tengine.registerAction(name, fn)\n}\n\n/**\n * Register a global XState transition action function\n * @param name - The name of the transition action to register\n * @param fn - The transition action function to execute\n * @public\n */\nexport function registerTransitionAction(name: string, fn: TransitionActionFunction): void {\n\tconst engine = getGlobalTriggerEngine()\n\tengine.registerTransitionAction(name, fn)\n}\n\n/**\n * Configure rollback behavior for a specific field trigger\n * @param doctype - The doctype name\n * @param fieldname - The field name\n * @param enableRollback - Whether to enable automatic rollback for this field\n * @public\n */\nexport function setFieldRollback(doctype: string, fieldname: string, enableRollback: boolean): void {\n\tconst engine = getGlobalTriggerEngine()\n\tengine.setFieldRollback(doctype, fieldname, enableRollback)\n}\n\n/**\n * Manually trigger an XState transition for a specific doctype/record\n * This can be called directly when you need to execute transition actions programmatically\n * @param doctype - The doctype name\n * @param transition - The XState transition name to trigger\n * @param options - Optional configuration for the transition\n * @public\n */\nexport async function triggerTransition(\n\tdoctype: string,\n\ttransition: string,\n\toptions?: {\n\t\trecordId?: string\n\t\tcurrentState?: string\n\t\ttargetState?: string\n\t\tfsmContext?: Record<string, any>\n\t\tpath?: string\n\t}\n): Promise<any> {\n\tconst engine = getGlobalTriggerEngine()\n\n\tconst context: TransitionChangeContext = {\n\t\tpath: options?.path || (options?.recordId ? `${doctype}.${options.recordId}` : doctype),\n\t\tfieldname: '',\n\t\tbeforeValue: undefined,\n\t\tafterValue: undefined,\n\t\toperation: 'set',\n\t\tdoctype,\n\t\trecordId: options?.recordId,\n\t\ttimestamp: new Date(),\n\t\ttransition,\n\t\tcurrentState: options?.currentState,\n\t\ttargetState: options?.targetState,\n\t\tfsmContext: options?.fsmContext,\n\t}\n\n\treturn await engine.executeTransitionActions(context)\n}\n\n/**\n * Mark a specific operation as irreversible.\n * Used to prevent undo of critical operations like publishing or deletion.\n * @param operationId - The ID of the operation to mark as irreversible\n * @param reason - Human-readable reason why the operation cannot be undone\n * @public\n */\nexport function markOperationIrreversible(operationId: string | undefined, reason: string): void {\n\tif (!operationId) return\n\n\ttry {\n\t\tconst store = useOperationLogStore()\n\t\tstore.markIrreversible(operationId, reason)\n\t} catch {\n\t\t// Operation log is optional\n\t}\n}\n","import { getGlobalTriggerEngine } from '../field-triggers'\nimport type { FieldChangeContext, TransitionChangeContext } from '../types/field-triggers'\nimport { useOperationLogStore } from './operation-log'\n\n/**\n * Get the operation log store if available\n */\nfunction getOperationLogStore() {\n\ttry {\n\t\treturn useOperationLogStore()\n\t} catch {\n\t\t// Operation log is optional\n\t\treturn null\n\t}\n}\n\n/**\n * Core HST Interface - enhanced with tree navigation\n * Provides a hierarchical state tree interface for navigating and manipulating nested data structures.\n *\n * @public\n */\ninterface HSTNode {\n\t/**\n\t * Gets a value at the specified path\n\t * @param path - The dot-separated path to the value\n\t * @returns The value at the specified path\n\t */\n\tget(path: string): any\n\n\t/**\n\t * Sets a value at the specified path\n\t * @param path - The dot-separated path where to set the value\n\t * @param value - The value to set\n\t * @param source - Optional source of the operation (user, system, sync, undo, redo)\n\t */\n\tset(path: string, value: any, source?: 'user' | 'system' | 'sync' | 'undo' | 'redo'): void\n\n\t/**\n\t * Checks if a value exists at the specified path\n\t * @param path - The dot-separated path to check\n\t * @returns True if the path exists, false otherwise\n\t */\n\thas(path: string): boolean\n\n\t/**\n\t * Gets the parent node in the tree hierarchy\n\t * @returns The parent HSTNode or null if this is the root\n\t */\n\tgetParent(): HSTNode | null\n\n\t/**\n\t * Gets the root node of the tree\n\t * @returns The root HSTNode\n\t */\n\tgetRoot(): HSTNode\n\n\t/**\n\t * Gets the full path from root to this node\n\t * @returns The dot-separated path string\n\t */\n\tgetPath(): string\n\n\t/**\n\t * Gets the depth level of this node in the tree\n\t * @returns The depth as a number (0 for root)\n\t */\n\tgetDepth(): number\n\n\t/**\n\t * Gets an array of path segments from root to this node\n\t * @returns Array of path segments representing breadcrumbs\n\t */\n\tgetBreadcrumbs(): string[]\n\n\t/**\n\t * Gets a child node at the specified relative path\n\t * @param path - The relative path to the child node\n\t * @returns The child HSTNode\n\t */\n\tgetNode(path: string): HSTNode\n\n\t/**\n\t * Trigger an XState transition with optional context data\n\t * @param transition - The transition name (should be uppercase per convention)\n\t * @param context - Optional additional FSM context data\n\t * @returns Promise resolving to the transition execution results\n\t */\n\ttriggerTransition(\n\t\ttransition: string,\n\t\tcontext?: { currentState?: string; targetState?: string; fsmContext?: Record<string, any> }\n\t): Promise<any>\n}\n\n// Type definitions for global Registry\ninterface RegistryGlobal {\n\tRegistry?: {\n\t\t_root?: {\n\t\t\tregistry: Record<string, any>\n\t\t}\n\t}\n}\n\n// Interface for Immutable-like objects\ninterface ImmutableLike {\n\tget(key: string): any\n\tset(key: string, value: any): ImmutableLike\n\thas(key: string): boolean\n\tsize?: number\n\t__ownerID?: any\n\t_map?: any\n\t_list?: any\n\t_origin?: any\n\t_capacity?: any\n\t_defaultValues?: any\n\t_tail?: any\n\t_root?: any\n}\n\n// Interface for Vue reactive objects\ninterface VueReactive {\n\t__v_isReactive: boolean\n\t[key: string]: any\n}\n\n// Interface for Pinia stores\ninterface PiniaStore {\n\t$state?: Record<string, any>\n\t$patch?: (partial: Record<string, any>) => void\n\t$id?: string\n\t[key: string]: any\n}\n\n// Interface for objects with property access\ninterface PropertyAccessible {\n\t[key: string]: any\n}\n\n// Extend global interfaces\ndeclare global {\n\tinterface Window extends RegistryGlobal {}\n\tconst global: RegistryGlobal | undefined\n}\n\n/**\n * Global HST Manager (Singleton)\n * Manages hierarchical state trees and provides access to the global registry.\n *\n * @public\n */\nclass HST {\n\tprivate static instance: HST\n\n\t/**\n\t * Gets the singleton instance of HST\n\t * @returns The HST singleton instance\n\t */\n\tstatic getInstance(): HST {\n\t\tif (!HST.instance) {\n\t\t\tHST.instance = new HST()\n\t\t}\n\t\treturn HST.instance\n\t}\n\n\t/**\n\t * Gets the global registry instance\n\t * @returns The global registry object or undefined if not found\n\t */\n\tgetRegistry(): any {\n\t\t// In test environment, try different ways to access Registry\n\t\t// First, try the global Registry if it exists\n\t\tif (typeof globalThis !== 'undefined') {\n\t\t\tconst globalRegistry = (globalThis as RegistryGlobal).Registry?._root\n\t\t\tif (globalRegistry) {\n\t\t\t\treturn globalRegistry\n\t\t\t}\n\t\t}\n\n\t\t// Try to access through window (browser environment)\n\t\tif (typeof window !== 'undefined') {\n\t\t\tconst windowRegistry = window.Registry?._root\n\t\t\tif (windowRegistry) {\n\t\t\t\treturn windowRegistry\n\t\t\t}\n\t\t}\n\n\t\t// Try to access through global (Node environment)\n\t\tif (typeof global !== 'undefined' && global) {\n\t\t\tconst nodeRegistry = global.Registry?._root\n\t\t\tif (nodeRegistry) {\n\t\t\t\treturn nodeRegistry\n\t\t\t}\n\t\t}\n\n\t\t// If we can't find it globally, it might not be set up\n\t\t// This is expected in test environments where Registry is created locally\n\t\treturn undefined\n\t}\n\n\t/**\n\t * Helper method to get doctype metadata from the registry\n\t * @param doctype - The name of the doctype to retrieve metadata for\n\t * @returns The doctype metadata object or undefined if not found\n\t */\n\tgetDoctypeMeta(doctype: string) {\n\t\tconst registry = this.getRegistry()\n\t\tif (registry && typeof registry === 'object' && 'registry' in registry) {\n\t\t\treturn (registry as { registry: Record<string, any> }).registry[doctype]\n\t\t}\n\t\treturn undefined\n\t}\n}\n\n// Enhanced HST Proxy with tree navigation\nclass HSTProxy implements HSTNode {\n\tprivate target: any\n\tprivate parentPath: string\n\tprivate rootNode: HSTNode | null\n\tprivate doctype: string\n\tprivate parentDoctype?: string\n\tprivate hst: HST\n\n\tconstructor(target: any, doctype: string, parentPath = '', rootNode: HSTNode | null = null, parentDoctype?: string) {\n\t\tthis.target = target\n\t\tthis.parentPath = parentPath\n\t\tthis.rootNode = rootNode || this\n\t\tthis.doctype = doctype\n\t\tthis.parentDoctype = parentDoctype\n\t\tthis.hst = HST.getInstance()\n\n\t\treturn new Proxy(this, {\n\t\t\tget(hst, prop) {\n\t\t\t\t// Return HST methods directly\n\t\t\t\tif (prop in hst) return hst[prop]\n\n\t\t\t\t// Handle property access - return tree nodes for navigation\n\t\t\t\tconst path = String(prop)\n\t\t\t\treturn hst.getNode(path)\n\t\t\t},\n\n\t\t\tset(hst, prop, value) {\n\t\t\t\tconst path = String(prop)\n\t\t\t\thst.set(path, value)\n\t\t\t\treturn true\n\t\t\t},\n\t\t})\n\t}\n\n\tget(path: string): any {\n\t\treturn this.resolveValue(path)\n\t}\n\n\t// Method to get a tree-wrapped node for navigation\n\tgetNode(path: string): HSTNode {\n\t\tconst fullPath = this.resolvePath(path)\n\t\tconst value = this.resolveValue(path)\n\n\t\t// Determine the correct doctype for this node based on the path\n\t\tconst pathSegments = fullPath.split('.')\n\t\tlet nodeDoctype = this.doctype\n\n\t\t// If we're at the root level and this is a StonecropStore, use the first path segment as the doctype\n\t\tif (this.doctype === 'StonecropStore' && pathSegments.length >= 1) {\n\t\t\tnodeDoctype = pathSegments[0]\n\t\t}\n\n\t\t// Always wrap in HSTProxy for tree navigation\n\t\tif (typeof value === 'object' && value !== null && !this.isPrimitive(value)) {\n\t\t\treturn new HSTProxy(value, nodeDoctype, fullPath, this.rootNode, this.parentDoctype)\n\t\t}\n\n\t\t// For primitives, return a minimal wrapper that throws on tree operations\n\t\treturn new HSTProxy(value, nodeDoctype, fullPath, this.rootNode, this.parentDoctype)\n\t}\n\n\tset(path: string, value: any, source: 'user' | 'system' | 'sync' | 'undo' | 'redo' = 'user'): void {\n\t\t// Get current value for change context\n\t\tconst fullPath = this.resolvePath(path)\n\t\tconst beforeValue = this.has(path) ? this.get(path) : undefined\n\n\t\t// Log operation if not from undo/redo and store is available\n\t\tif (source !== 'undo' && source !== 'redo') {\n\t\t\tconst logStore = getOperationLogStore()\n\t\t\tif (logStore && typeof logStore.addOperation === 'function') {\n\t\t\t\tconst pathSegments = fullPath.split('.')\n\t\t\t\tconst doctype = this.doctype === 'StonecropStore' && pathSegments.length >= 1 ? pathSegments[0] : this.doctype\n\t\t\t\tconst recordId = pathSegments.length >= 2 ? pathSegments[1] : undefined\n\t\t\t\tconst fieldname = pathSegments.slice(2).join('.') || pathSegments[pathSegments.length - 1]\n\n\t\t\t\t// Detect if this is a DELETE operation (setting to undefined when a value existed)\n\t\t\t\tconst isDelete = value === undefined && beforeValue !== undefined\n\t\t\t\tconst operationType: 'set' | 'delete' = isDelete ? 'delete' : 'set'\n\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-call\n\t\t\t\tlogStore.addOperation(\n\t\t\t\t\t{\n\t\t\t\t\t\ttype: operationType,\n\t\t\t\t\t\tpath: fullPath,\n\t\t\t\t\t\tfieldname,\n\t\t\t\t\t\tbeforeValue,\n\t\t\t\t\t\tafterValue: value,\n\t\t\t\t\t\tdoctype,\n\t\t\t\t\t\trecordId,\n\t\t\t\t\t\treversible: true, // Default to reversible, can be changed by field triggers\n\t\t\t\t\t},\n\t\t\t\t\tsource\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\n\t\t// Update the value\n\t\tthis.updateValue(path, value)\n\n\t\t// Trigger field actions asynchronously (don't block the set operation)\n\t\tvoid this.triggerFieldActions(fullPath, beforeValue, value)\n\t}\n\n\thas(path: string): boolean {\n\t\ttry {\n\t\t\t// Handle empty path case\n\t\t\tif (path === '') {\n\t\t\t\treturn true // empty path refers to the root object\n\t\t\t}\n\n\t\t\tconst segments = this.parsePath(path)\n\t\t\tlet current = this.target\n\n\t\t\tfor (let i = 0; i < segments.length; i++) {\n\t\t\t\tconst segment = segments[i]\n\n\t\t\t\tif (current === null || current === undefined) {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\n\t\t\t\t// Check if this is the last segment\n\t\t\t\tif (i === segments.length - 1) {\n\t\t\t\t\t// For the final property, check if it exists\n\t\t\t\t\tif (this.isImmutable(current)) {\n\t\t\t\t\t\treturn current.has(segment)\n\t\t\t\t\t} else if (this.isPiniaStore(current)) {\n\t\t\t\t\t\treturn (current.$state && segment in current.$state) || segment in current\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn segment in current\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Navigate to the next level\n\t\t\t\tcurrent = this.getProperty(current, segment)\n\t\t\t}\n\n\t\t\treturn false\n\t\t} catch {\n\t\t\treturn false\n\t\t}\n\t}\n\n\t// Tree navigation methods\n\tgetParent(): HSTNode | null {\n\t\tif (!this.parentPath) return null\n\n\t\tconst parentSegments = this.parentPath.split('.').slice(0, -1)\n\t\tconst parentPath = parentSegments.join('.')\n\n\t\tif (parentPath === '') {\n\t\t\treturn this.rootNode\n\t\t}\n\n\t\t// Return a wrapped node, not raw data\n\t\treturn this.rootNode!.getNode(parentPath)\n\t}\n\n\tgetRoot(): HSTNode {\n\t\treturn this.rootNode!\n\t}\n\n\tgetPath(): string {\n\t\treturn this.parentPath\n\t}\n\n\tgetDepth(): number {\n\t\treturn this.parentPath ? this.parentPath.split('.').length : 0\n\t}\n\n\tgetBreadcrumbs(): string[] {\n\t\treturn this.parentPath ? this.parentPath.split('.') : []\n\t}\n\n\t/**\n\t * Trigger an XState transition with optional context data\n\t */\n\tasync triggerTransition(\n\t\ttransition: string,\n\t\tcontext?: { currentState?: string; targetState?: string; fsmContext?: Record<string, any> }\n\t): Promise<any> {\n\t\tconst triggerEngine = getGlobalTriggerEngine()\n\n\t\t// Determine doctype and recordId from the current path\n\t\tconst pathSegments = this.parentPath.split('.')\n\t\tlet doctype = this.doctype\n\t\tlet recordId: string | undefined\n\n\t\t// If we're at the root level and this is a StonecropStore, use the first path segment as the doctype\n\t\tif (this.doctype === 'StonecropStore' && pathSegments.length >= 1) {\n\t\t\tdoctype = pathSegments[0]\n\t\t}\n\n\t\t// Extract recordId from path if it follows the expected pattern\n\t\tif (pathSegments.length >= 2) {\n\t\t\trecordId = pathSegments[1]\n\t\t}\n\n\t\t// Build transition context\n\t\tconst transitionContext: TransitionChangeContext = {\n\t\t\tpath: this.parentPath,\n\t\t\tfieldname: '', // No specific field for transitions\n\t\t\tbeforeValue: undefined,\n\t\t\tafterValue: undefined,\n\t\t\toperation: 'set',\n\t\t\tdoctype,\n\t\t\trecordId,\n\t\t\ttimestamp: new Date(),\n\t\t\tstore: this.rootNode || undefined,\n\t\t\ttransition,\n\t\t\tcurrentState: context?.currentState,\n\t\t\ttargetState: context?.targetState,\n\t\t\tfsmContext: context?.fsmContext,\n\t\t}\n\n\t\t// Log FSM transition operation\n\t\tconst logStore = getOperationLogStore()\n\t\tif (logStore && typeof logStore.addOperation === 'function') {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-call\n\t\t\tlogStore.addOperation(\n\t\t\t\t{\n\t\t\t\t\ttype: 'transition' as const,\n\t\t\t\t\tpath: this.parentPath,\n\t\t\t\t\tfieldname: transition,\n\t\t\t\t\tbeforeValue: context?.currentState,\n\t\t\t\t\tafterValue: context?.targetState,\n\t\t\t\t\tdoctype,\n\t\t\t\t\trecordId,\n\t\t\t\t\treversible: false, // FSM transitions are generally not reversible\n\t\t\t\t\tmetadata: {\n\t\t\t\t\t\ttransition,\n\t\t\t\t\t\tcurrentState: context?.currentState,\n\t\t\t\t\t\ttargetState: context?.targetState,\n\t\t\t\t\t\tfsmContext: context?.fsmContext,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t'user'\n\t\t\t)\n\t\t}\n\n\t\t// Execute transition actions\n\t\treturn await triggerEngine.executeTransitionActions(transitionContext)\n\t}\n\n\t// Private helper methods\n\tprivate resolvePath(path: string): string {\n\t\tif (path === '') return this.parentPath\n\t\treturn this.parentPath ? `${this.parentPath}.${path}` : path\n\t}\n\n\tprivate resolveValue(path: string): any {\n\t\t// Handle empty path - return the target object\n\t\tif (path === '') {\n\t\t\treturn this.target\n\t\t}\n\n\t\tconst segments = this.parsePath(path)\n\t\tlet current = this.target\n\n\t\tfor (const segment of segments) {\n\t\t\tif (current === null || current === undefined) {\n\t\t\t\treturn undefined\n\t\t\t}\n\n\t\t\tcurrent = this.getProperty(current, segment)\n\t\t}\n\n\t\treturn current\n\t}\n\n\tprivate updateValue(path: string, value: any): void {\n\t\t// Handle empty path case - should throw error\n\t\tif (path === '') {\n\t\t\tthrow new Error('Cannot set value on empty path')\n\t\t}\n\n\t\tconst segments = this.parsePath(path)\n\t\tconst lastSegment = segments.pop()!\n\t\tlet current = this.target\n\n\t\t// Navigate to parent object\n\t\tfor (const segment of segments) {\n\t\t\tcurrent = this.getProperty(current, segment)\n\t\t\tif (current === null || current === undefined) {\n\t\t\t\tthrow new Error(`Cannot set property on null/undefined path: ${path}`)\n\t\t\t}\n\t\t}\n\n\t\t// Set the final property\n\t\tthis.setProperty(current, lastSegment, value)\n\t}\n\n\tprivate getProperty(obj: any, key: string): any {\n\t\t// Immutable objects\n\t\tif (this.isImmutable(obj)) {\n\t\t\treturn obj.get(key)\n\t\t}\n\n\t\t// Vue reactive object\n\t\tif (this.isVueReactive(obj)) {\n\t\t\treturn obj[key]\n\t\t}\n\n\t\t// Pinia store\n\t\tif (this.isPiniaStore(obj)) {\n\t\t\treturn obj.$state?.[key] ?? obj[key]\n\t\t}\n\n\t\t// Plain object\n\t\treturn (obj as PropertyAccessible)[key]\n\t}\n\n\tprivate setProperty(obj: any, key: string, value: any): void {\n\t\t// Immutable objects\n\t\tif (this.isImmutable(obj)) {\n\t\t\tthrow new Error('Cannot directly mutate immutable objects. Use immutable update methods instead.')\n\t\t}\n\n\t\t// Pinia store\n\t\tif (this.isPiniaStore(obj)) {\n\t\t\tif (obj.$patch) {\n\t\t\t\tobj.$patch({ [key]: value })\n\t\t\t} else {\n\t\t\t\t;(obj as PropertyAccessible)[key] = value\n\t\t\t}\n\t\t\treturn\n\t\t}\n\n\t\t// Vue reactive or plain object\n\t\t;(obj as PropertyAccessible)[key] = value\n\t}\n\n\tprivate async triggerFieldActions(fullPath: string, beforeValue: any, afterValue: any): Promise<void> {\n\t\ttry {\n\t\t\t// Guard against undefined or null fullPath\n\t\t\tif (!fullPath || typeof fullPath !== 'string') {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst pathSegments = fullPath.split('.')\n\n\t\t\t// Only trigger field actions for actual field changes (at least 3 levels deep: doctype.recordId.fieldname)\n\t\t\t// Skip triggering for doctype-level or record-level changes\n\t\t\tif (pathSegments.length < 3) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst triggerEngine = getGlobalTriggerEngine()\n\t\t\tconst fieldname = pathSegments.slice(2).join('.') || pathSegments[pathSegments.length - 1]\n\n\t\t\t// Determine the correct doctype for this path using the same logic as getNode()\n\t\t\t// The path should be in format: \"doctype.recordId.fieldname\"\n\t\t\tlet doctype = this.doctype\n\n\t\t\t// If we're at the root level and this is a StonecropStore, use the first path segment as the doctype\n\t\t\tif (this.doctype === 'StonecropStore' && pathSegments.length >= 1) {\n\t\t\t\tdoctype = pathSegments[0]\n\t\t\t}\n\n\t\t\tlet recordId: string | undefined\n\n\t\t\t// Extract recordId from path if it follows the expected pattern\n\t\t\tif (pathSegments.length >= 2) {\n\t\t\t\trecordId = pathSegments[1]\n\t\t\t}\n\n\t\t\tconst context: FieldChangeContext = {\n\t\t\t\tpath: fullPath,\n\t\t\t\tfieldname,\n\t\t\t\tbeforeValue,\n\t\t\t\tafterValue,\n\t\t\t\toperation: 'set',\n\t\t\t\tdoctype,\n\t\t\t\trecordId,\n\t\t\t\ttimestamp: new Date(),\n\t\t\t\tstore: this.rootNode || undefined, // Pass the root store for snapshot/rollback capabilities\n\t\t\t}\n\n\t\t\tawait triggerEngine.executeFieldTriggers(context)\n\t\t} catch (error) {\n\t\t\t// Silently handle trigger errors to not break the main flow\n\t\t\t// In production, you might want to log this error\n\t\t\tif (error instanceof Error) {\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.warn('Field trigger error:', error.message)\n\t\t\t\t// Optional: emit an event or call error handler\n\t\t\t}\n\t\t}\n\t}\n\tprivate isVueReactive(obj: any): obj is VueReactive {\n\t\treturn (\n\t\t\tobj &&\n\t\t\ttypeof obj === 'object' &&\n\t\t\t'__v_isReactive' in obj &&\n\t\t\t(obj as { __v_isReactive: boolean }).__v_isReactive === true\n\t\t)\n\t}\n\n\tprivate isPiniaStore(obj: any): obj is PiniaStore {\n\t\treturn obj && typeof obj === 'object' && ('$state' in obj || '$patch' in obj || '$id' in obj)\n\t}\n\n\tprivate isImmutable(obj: any): obj is ImmutableLike {\n\t\tif (!obj || typeof obj !== 'object') {\n\t\t\treturn false\n\t\t}\n\n\t\tconst hasGetMethod = 'get' in obj && typeof (obj as Record<string, unknown>).get === 'function'\n\t\tconst hasSetMethod = 'set' in obj && typeof (obj as Record<string, unknown>).set === 'function'\n\t\tconst hasHasMethod = 'has' in obj && typeof (obj as Record<string, unknown>).has === 'function'\n\n\t\tconst hasImmutableMarkers =\n\t\t\t'__ownerID' in obj ||\n\t\t\t'_map' in obj ||\n\t\t\t'_list' in obj ||\n\t\t\t'_origin' in obj ||\n\t\t\t'_capacity' in obj ||\n\t\t\t'_defaultValues' in obj ||\n\t\t\t'_tail' in obj ||\n\t\t\t'_root' in obj ||\n\t\t\t('size' in obj && hasGetMethod && hasSetMethod)\n\n\t\tlet constructorName: string | undefined\n\t\ttry {\n\t\t\tconst objWithConstructor = obj as Record<string, unknown>\n\t\t\tif (\n\t\t\t\t'constructor' in objWithConstructor &&\n\t\t\t\tobjWithConstructor.constructor &&\n\t\t\t\ttypeof objWithConstructor.constructor === 'object' &&\n\t\t\t\t'name' in objWithConstructor.constructor\n\t\t\t) {\n\t\t\t\tconst nameValue = (objWithConstructor.constructor as { name: unknown }).name\n\t\t\t\tconstructorName = typeof nameValue === 'string' ? nameValue : undefined\n\t\t\t}\n\t\t} catch {\n\t\t\tconstructorName = undefined\n\t\t}\n\n\t\tconst isImmutableConstructor =\n\t\t\tconstructorName &&\n\t\t\t(constructorName.includes('Map') ||\n\t\t\t\tconstructorName.includes('List') ||\n\t\t\t\tconstructorName.includes('Set') ||\n\t\t\t\tconstructorName.includes('Stack') ||\n\t\t\t\tconstructorName.includes('Seq')) &&\n\t\t\t(hasGetMethod || hasSetMethod)\n\n\t\treturn Boolean(\n\t\t\t(hasGetMethod && hasSetMethod && hasHasMethod && hasImmutableMarkers) ||\n\t\t\t\t(hasGetMethod && hasSetMethod && isImmutableConstructor)\n\t\t)\n\t}\n\n\tprivate isPrimitive(value: any): boolean {\n\t\t// Don't wrap primitive values, functions, or null/undefined\n\t\treturn (\n\t\t\tvalue === null ||\n\t\t\tvalue === undefined ||\n\t\t\ttypeof value === 'string' ||\n\t\t\ttypeof value === 'number' ||\n\t\t\ttypeof value === 'boolean' ||\n\t\t\ttypeof value === 'function' ||\n\t\t\ttypeof value === 'symbol' ||\n\t\t\ttypeof value === 'bigint'\n\t\t)\n\t}\n\n\tprivate parsePath(path: string): string[] {\n\t\tif (!path) return []\n\t\treturn path.split('.').filter(segment => segment.length > 0)\n\t}\n}\n\n/**\n * Factory function for HST creation\n * Creates a new HSTNode proxy for hierarchical state tree navigation.\n *\n * @param target - The target object to wrap with HST functionality\n * @param doctype - The document type identifier\n * @param parentDoctype - Optional parent document type identifier\n * @returns A new HSTNode proxy instance\n *\n * @public\n */\nfunction createHST(target: any, doctype: string, parentDoctype?: string): HSTNode {\n\treturn new HSTProxy(target, doctype, '', null, parentDoctype)\n}\n\n// Export everything\nexport { HSTProxy, HST, createHST, type HSTNode }\n","import DoctypeMeta from './doctype'\nimport Registry from './registry'\nimport { createHST, type HSTNode } from './stores/hst'\nimport { useOperationLogStore } from './stores/operation-log'\nimport type { OperationLogConfig } from './types/operation-log'\nimport type { RouteContext } from './types/registry'\n\n/**\n * Main Stonecrop class with HST integration and built-in Operation Log\n * @public\n */\nexport class Stonecrop {\n\tprivate hstStore: HSTNode\n\tprivate _operationLogStore?: ReturnType<typeof useOperationLogStore>\n\tprivate _operationLogConfig?: Partial<OperationLogConfig>\n\n\t/** The registry instance containing all doctype definitions */\n\treadonly registry: Registry\n\n\t/**\n\t * Creates a new Stonecrop instance with HST integration\n\t * @param registry - The Registry instance containing doctype definitions\n\t * @param operationLogConfig - Optional configuration for the operation log\n\t */\n\tconstructor(registry: Registry, operationLogConfig?: Partial<OperationLogConfig>) {\n\t\tthis.registry = registry\n\n\t\t// Store config for lazy initialization\n\t\tthis._operationLogConfig = operationLogConfig\n\n\t\t// Initialize HST store with auto-sync to Registry\n\t\tthis.initializeHSTStore()\n\t\tthis.setupRegistrySync()\n\t}\n\n\t/**\n\t * Get the operation log store (lazy initialization)\n\t * @internal\n\t */\n\tgetOperationLogStore() {\n\t\tif (!this._operationLogStore) {\n\t\t\tthis._operationLogStore = useOperationLogStore()\n\t\t\tif (this._operationLogConfig) {\n\t\t\t\tthis._operationLogStore.configure(this._operationLogConfig)\n\t\t\t}\n\t\t}\n\t\treturn this._operationLogStore\n\t}\n\n\t/**\n\t * Initialize the HST store structure\n\t */\n\tprivate initializeHSTStore(): void {\n\t\tconst initialStoreStructure: Record<string, any> = {}\n\n\t\t// Auto-populate from existing Registry doctypes\n\t\tObject.keys(this.registry.registry).forEach(doctypeSlug => {\n\t\t\tinitialStoreStructure[doctypeSlug] = {}\n\t\t})\n\n\t\tthis.hstStore = createHST(initialStoreStructure, 'StonecropStore')\n\t}\n\n\t/**\n\t * Setup automatic sync with Registry when doctypes are added\n\t */\n\tprivate setupRegistrySync(): void {\n\t\t// Extend Registry.addDoctype to auto-create HST store sections\n\t\tconst originalAddDoctype = this.registry.addDoctype.bind(this.registry)\n\n\t\tthis.registry.addDoctype = (doctype: DoctypeMeta) => {\n\t\t\t// Call original method\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-call\n\t\t\toriginalAddDoctype(doctype)\n\n\t\t\t// Auto-create HST store section for new doctype\n\t\t\tif (!this.hstStore.has(doctype.slug)) {\n\t\t\t\tthis.hstStore.set(doctype.slug, {})\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Get records hash for a doctype\n\t * @param doctype - The doctype to get records for\n\t * @returns HST node containing records hash\n\t */\n\trecords(doctype: string | DoctypeMeta): HSTNode {\n\t\tconst slug = typeof doctype === 'string' ? doctype : doctype.slug\n\t\tthis.ensureDoctypeExists(slug)\n\t\treturn this.hstStore.getNode(slug)\n\t}\n\n\t/**\n\t * Add a record to the store\n\t * @param doctype - The doctype\n\t * @param recordId - The record ID\n\t * @param recordData - The record data\n\t */\n\taddRecord(doctype: string | DoctypeMeta, recordId: string, recordData: any): void {\n\t\tconst slug = typeof doctype === 'string' ? doctype : doctype.slug\n\n\t\tthis.ensureDoctypeExists(slug)\n\n\t\t// Store raw record data - let HST handle wrapping with proper hierarchy\n\t\tthis.hstStore.set(`${slug}.${recordId}`, recordData)\n\t}\n\n\t/**\n\t * Get a specific record\n\t * @param doctype - The doctype\n\t * @param recordId - The record ID\n\t * @returns HST node for the record or undefined\n\t */\n\tgetRecordById(doctype: string | DoctypeMeta, recordId: string): HSTNode | undefined {\n\t\tconst slug = typeof doctype === 'string' ? doctype : doctype.slug\n\t\tthis.ensureDoctypeExists(slug)\n\n\t\t// First check if the record exists\n\t\tconst recordExists = this.hstStore.has(`${slug}.${recordId}`)\n\t\tif (!recordExists) {\n\t\t\treturn undefined\n\t\t}\n\n\t\t// Check if the actual value is undefined (i.e., record was removed)\n\t\tconst recordValue = this.hstStore.get(`${slug}.${recordId}`)\n\t\tif (recordValue === undefined) {\n\t\t\treturn undefined\n\t\t}\n\n\t\t// Use getNode to get the properly wrapped HST node with correct parent relationships\n\t\treturn this.hstStore.getNode(`${slug}.${recordId}`)\n\t}\n\n\t/**\n\t * Remove a record from the store\n\t * @param doctype - The doctype\n\t * @param recordId - The record ID\n\t */\n\tremoveRecord(doctype: string | DoctypeMeta, recordId: string): void {\n\t\tconst slug = typeof doctype === 'string' ? doctype : doctype.slug\n\t\tthis.ensureDoctypeExists(slug)\n\n\t\t// Remove the specific record directly by setting to undefined\n\t\tif (this.hstStore.has(`${slug}.${recordId}`)) {\n\t\t\tthis.hstStore.set(`${slug}.${recordId}`, undefined)\n\t\t}\n\t}\n\n\t/**\n\t * Get all record IDs for a doctype\n\t * @param doctype - The doctype\n\t * @returns Array of record IDs\n\t */\n\tgetRecordIds(doctype: string | DoctypeMeta): string[] {\n\t\tconst slug = typeof doctype === 'string' ? doctype : doctype.slug\n\t\tthis.ensureDoctypeExists(slug)\n\n\t\tconst doctypeNode = this.hstStore.get(slug) as Record<string, any>\n\t\tif (!doctypeNode || typeof doctypeNode !== 'object') {\n\t\t\treturn []\n\t\t}\n\n\t\treturn Object.keys(doctypeNode).filter(key => doctypeNode[key] !== undefined)\n\t}\n\n\t/**\n\t * Clear all records for a doctype\n\t * @param doctype - The doctype\n\t */\n\tclearRecords(doctype: string | DoctypeMeta): void {\n\t\tconst slug = typeof doctype === 'string' ? doctype : doctype.slug\n\t\tthis.ensureDoctypeExists(slug)\n\n\t\t// Get all record IDs and remove them\n\t\tconst recordIds = this.getRecordIds(slug)\n\t\trecordIds.forEach(recordId => {\n\t\t\tthis.hstStore.set(`${slug}.${recordId}`, undefined)\n\t\t})\n\t}\n\n\t/**\n\t * Setup method for doctype initialization\n\t * @param doctype - The doctype to setup\n\t */\n\tsetup(doctype: DoctypeMeta): void {\n\t\t// Ensure doctype exists in store\n\t\tthis.ensureDoctypeExists(doctype.slug)\n\t}\n\n\t/**\n\t * Run action on doctype\n\t * Executes the action and logs it to the operation log for audit tracking\n\t * @param doctype - The doctype\n\t * @param action - The action to run\n\t * @param args - Action arguments (typically record IDs)\n\t */\n\trunAction(doctype: DoctypeMeta, action: string, args?: any[]): void {\n\t\tconst registry = this.registry.registry[doctype.slug]\n\t\tconst actions = registry?.actions?.get(action)\n\t\tconst recordIds = Array.isArray(args) ? args.filter((arg): arg is string => typeof arg === 'string') : undefined\n\n\t\t// Log action execution start\n\t\tconst opLogStore = this.getOperationLogStore()\n\t\tlet actionResult: 'success' | 'failure' | 'pending' = 'success'\n\t\tlet actionError: string | undefined\n\n\t\ttry {\n\t\t\t// Execute action functions\n\t\t\tif (actions && actions.length > 0) {\n\t\t\t\tactions.forEach(actionStr => {\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-implied-eval\n\t\t\t\t\t\tconst actionFn = new Function('args', actionStr)\n\t\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-call\n\t\t\t\t\t\tactionFn(args)\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tactionResult = 'failure'\n\t\t\t\t\t\tactionError = error instanceof Error ? error.message : 'Unknown error'\n\t\t\t\t\t\tthrow error\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t} catch {\n\t\t\t// Error already set in inner catch\n\t\t} finally {\n\t\t\t// Log the action execution to operation log\n\t\t\topLogStore.logAction(doctype.doctype, action, recordIds, actionResult, actionError)\n\t\t}\n\t}\n\n\t/**\n\t * Get records from server (maintains compatibility)\n\t * @param doctype - The doctype\n\t */\n\tasync getRecords(doctype: DoctypeMeta): Promise<void> {\n\t\tconst response = await fetch(`/${doctype.slug}`)\n\t\tconst records = await response.json()\n\n\t\t// Store each record in HST\n\t\trecords.forEach((record: any) => {\n\t\t\tif (record.id) {\n\t\t\t\tthis.addRecord(doctype, record.id, record)\n\t\t\t}\n\t\t})\n\t}\n\n\t/**\n\t * Get single record from server (maintains compatibility)\n\t * @param doctype - The doctype\n\t * @param recordId - The record ID\n\t */\n\tasync getRecord(doctype: DoctypeMeta, recordId: string): Promise<void> {\n\t\tconst response = await fetch(`/${doctype.slug}/${recordId}`)\n\t\tconst record = await response.json()\n\n\t\t// Store record\n\t\tthis.addRecord(doctype, recordId, record)\n\t}\n\n\t/**\n\t * Ensure doctype section exists in HST store\n\t * @param slug - The doctype slug\n\t */\n\tprivate ensureDoctypeExists(slug: string): void {\n\t\tif (!this.hstStore.has(slug)) {\n\t\t\tthis.hstStore.set(slug, {})\n\t\t}\n\t}\n\n\t/**\n\t * Get doctype metadata from the registry\n\t * @param context - The route context\n\t * @returns The doctype metadata\n\t */\n\tasync getMeta(context: RouteContext): Promise<any> {\n\t\tif (!this.registry.getMeta) {\n\t\t\tthrow new Error('No getMeta function provided to Registry')\n\t\t}\n\t\treturn await this.registry.getMeta(context)\n\t}\n\n\t/**\n\t * Get the root HST store node for advanced usage\n\t * @returns Root HST node\n\t */\n\tgetStore(): HSTNode {\n\t\treturn this.hstStore\n\t}\n}\n","// src/composable.ts\nimport { inject, onMounted, Ref, ref, watch, provide, computed, ComputedRef } from 'vue'\n\nimport Registry from './registry'\nimport { Stonecrop } from './stonecrop'\nimport DoctypeMeta from './doctype'\nimport type { HSTNode } from './stores/hst'\nimport { RouteContext } from './types/registry'\nimport { storeToRefs } from 'pinia'\nimport type { HSTOperation, OperationLogConfig, OperationLogSnapshot } from './types/operation-log'\n\n/**\n * Operation Log API - nested object containing all operation log functionality\n * @public\n */\nexport type OperationLogAPI = {\n\toperations: Ref<HSTOperation[]>\n\tcurrentIndex: Ref<number>\n\tundoRedoState: ComputedRef<{\n\t\tcanUndo: boolean\n\t\tcanRedo: boolean\n\t\tundoCount: number\n\t\tredoCount: number\n\t\tcurrentIndex: number\n\t}>\n\tcanUndo: ComputedRef<boolean>\n\tcanRedo: ComputedRef<boolean>\n\tundoCount: ComputedRef<number>\n\tredoCount: ComputedRef<number>\n\tundo: (hstStore: HSTNode) => boolean\n\tredo: (hstStore: HSTNode) => boolean\n\tstartBatch: () => void\n\tcommitBatch: (description?: string) => string | null\n\tcancelBatch: () => void\n\tclear: () => void\n\tgetOperationsFor: (doctype: string, recordId?: string) => HSTOperation[]\n\tgetSnapshot: () => OperationLogSnapshot\n\tmarkIrreversible: (operationId: string, reason: string) => void\n\tlogAction: (\n\t\tdoctype: string,\n\t\tactionName: string,\n\t\trecordIds?: string[],\n\t\tresult?: 'success' | 'failure' | 'pending',\n\t\terror?: string\n\t) => string\n\tconfigure: (options: Partial<OperationLogConfig>) => void\n}\n\n/**\n * Base Stonecrop composable return type - includes operation log functionality\n * @public\n */\nexport type BaseStonecropReturn = {\n\tstonecrop: Ref<Stonecrop | undefined>\n\toperationLog: OperationLogAPI\n}\n\n/**\n * HST-enabled Stonecrop composable return type\n * @public\n */\nexport type HSTStonecropReturn = BaseStonecropReturn & {\n\tprovideHSTPath: (fieldname: string, recordId?: string) => string\n\thandleHSTChange: (changeData: HSTChangeData) => void\n\thstStore: Ref<HSTNode | undefined>\n\tformData: Ref<Record<string, any>>\n}\n\n/**\n * HST Change data structure\n * @public\n */\nexport type HSTChangeData = {\n\tpath: string\n\tvalue: any\n\tfieldname: string\n\trecordId?: string\n}\n\n/**\n * Unified Stonecrop composable - handles both general operations and HST reactive integration\n *\n * @param options - Configuration options for the composable\n * @returns Stonecrop instance and optional HST integration utilities\n * @public\n */\nexport function useStonecrop(): BaseStonecropReturn | HSTStonecropReturn\n/**\n * Unified Stonecrop composable with HST integration for a specific doctype and record\n *\n * @param options - Configuration with doctype and optional recordId\n * @returns Stonecrop instance with full HST integration utilities\n * @public\n */\nexport function useStonecrop(options: {\n\tregistry?: Registry\n\tdoctype: DoctypeMeta\n\trecordId?: string\n}): HSTStonecropReturn\n/**\n * @public\n */\nexport function useStonecrop(options?: {\n\tregistry?: Registry\n\tdoctype?: DoctypeMeta\n\trecordId?: string\n}): BaseStonecropReturn | HSTStonecropReturn {\n\tif (!options) options = {}\n\n\tconst registry = options.registry || inject<Registry>('$registry')\n\tconst providedStonecrop = inject<Stonecrop>('$stonecrop')\n\tconst stonecrop = ref<Stonecrop>()\n\tconst hstStore = ref<HSTNode>()\n\tconst formData = ref<Record<string, any>>({})\n\n\t// Use refs for router-loaded doctype to maintain reactivity\n\tconst routerDoctype = ref<DoctypeMeta | undefined>()\n\tconst routerRecordId = ref<string | undefined>()\n\n\t// Operation log state and methods - will be populated after stonecrop instance is created\n\tconst operations = ref<HSTOperation[]>([])\n\tconst currentIndex = ref(-1)\n\tconst canUndo = computed(() => stonecrop.value?.getOperationLogStore().canUndo ?? false)\n\tconst canRedo = computed(() => stonecrop.value?.getOperationLogStore().canRedo ?? false)\n\tconst undoCount = computed(() => stonecrop.value?.getOperationLogStore().undoCount ?? 0)\n\tconst redoCount = computed(() => stonecrop.value?.getOperationLogStore().redoCount ?? 0)\n\tconst undoRedoState = computed(\n\t\t() =>\n\t\t\tstonecrop.value?.getOperationLogStore().undoRedoState ?? {\n\t\t\t\tcanUndo: false,\n\t\t\t\tcanRedo: false,\n\t\t\t\tundoCount: 0,\n\t\t\t\tredoCount: 0,\n\t\t\t\tcurrentIndex: -1,\n\t\t\t}\n\t)\n\n\t// Operation log methods\n\tconst undo = (hstStore: HSTNode): boolean => {\n\t\treturn stonecrop.value?.getOperationLogStore().undo(hstStore) ?? false\n\t}\n\n\tconst redo = (hstStore: HSTNode): boolean => {\n\t\treturn stonecrop.value?.getOperationLogStore().redo(hstStore) ?? false\n\t}\n\n\tconst startBatch = () => {\n\t\tstonecrop.value?.getOperationLogStore().startBatch()\n\t}\n\n\tconst commitBatch = (description?: string): string | null => {\n\t\treturn stonecrop.value?.getOperationLogStore().commitBatch(description) ?? null\n\t}\n\n\tconst cancelBatch = () => {\n\t\tstonecrop.value?.getOperationLogStore().cancelBatch()\n\t}\n\n\tconst clear = () => {\n\t\tstonecrop.value?.getOperationLogStore().clear()\n\t}\n\n\tconst getOperationsFor = (doctype: string, recordId?: string) => {\n\t\treturn stonecrop.value?.getOperationLogStore().getOperationsFor(doctype, recordId) ?? []\n\t}\n\n\tconst getSnapshot = () => {\n\t\treturn (\n\t\t\tstonecrop.value?.getOperationLogStore().getSnapshot() ?? {\n\t\t\t\toperations: [],\n\t\t\t\tcurrentIndex: -1,\n\t\t\t\ttotalOperations: 0,\n\t\t\t\treversibleOperations: 0,\n\t\t\t\tirreversibleOperations: 0,\n\t\t\t}\n\t\t)\n\t}\n\n\tconst markIrreversible = (operationId: string, reason: string) => {\n\t\tstonecrop.value?.getOperationLogStore().markIrreversible(operationId, reason)\n\t}\n\n\tconst logAction = (\n\t\tdoctype: string,\n\t\tactionName: string,\n\t\trecordIds?: string[],\n\t\tresult: 'success' | 'failure' | 'pending' = 'success',\n\t\terror?: string\n\t): string => {\n\t\treturn stonecrop.value?.getOperationLogStore().logAction(doctype, actionName, recordIds, result, error) ?? ''\n\t}\n\n\tconst configure = (config: Partial<OperationLogConfig>) => {\n\t\tstonecrop.value?.getOperationLogStore().configure(config)\n\t}\n\n\t// Initialize Stonecrop instance\n\tonMounted(async () => {\n\t\tif (!registry) {\n\t\t\treturn\n\t\t}\n\n\t\tstonecrop.value = providedStonecrop || new Stonecrop(registry)\n\n\t\t// Set up reactive refs from operation log store - only if Pinia is available\n\t\ttry {\n\t\t\tconst opLogStore = stonecrop.value.getOperationLogStore()\n\t\t\tconst opLogRefs = storeToRefs(opLogStore)\n\t\t\toperations.value = opLogRefs.operations.value\n\t\t\tcurrentIndex.value = opLogRefs.currentIndex.value\n\n\t\t\t// Watch for changes in operation log state\n\t\t\twatch(\n\t\t\t\t() => opLogRefs.operations.value,\n\t\t\t\tnewOps => {\n\t\t\t\t\toperations.value = newOps\n\t\t\t\t}\n\t\t\t)\n\t\t\twatch(\n\t\t\t\t() => opLogRefs.currentIndex.value,\n\t\t\t\tnewIndex => {\n\t\t\t\t\tcurrentIndex.value = newIndex\n\t\t\t\t}\n\t\t\t)\n\t\t} catch {\n\t\t\t// Pinia not available (e.g., in tests) - operation log features will not be available\n\t\t\t// Silently fail - operation log is optional\n\t\t}\n\n\t\t// Handle router-based setup if no specific doctype provided\n\t\tif (!options.doctype && registry.router) {\n\t\t\tconst route = registry.router.currentRoute.value\n\n\t\t\t// Parse route path - let the application determine the doctype from the route\n\t\t\tif (!route.path) return // Early return if no path available\n\n\t\t\tconst pathSegments = route.path.split('/').filter(segment => segment.length > 0)\n\t\t\tconst recordId = pathSegments[1]?.toLowerCase()\n\n\t\t\tif (pathSegments.length > 0) {\n\t\t\t\t// Create route context for getMeta function\n\t\t\t\tconst routeContext: RouteContext = {\n\t\t\t\t\tpath: route.path,\n\t\t\t\t\tsegments: pathSegments,\n\t\t\t\t}\n\n\t\t\t\tconst doctype = await registry.getMeta?.(routeContext)\n\t\t\t\tif (doctype) {\n\t\t\t\t\tregistry.addDoctype(doctype)\n\t\t\t\t\tstonecrop.value.setup(doctype)\n\n\t\t\t\t\t// Set reactive refs for router-based doctype\n\t\t\t\t\trouterDoctype.value = doctype\n\t\t\t\t\trouterRecordId.value = recordId\n\t\t\t\t\thstStore.value = stonecrop.value.getStore()\n\n\t\t\t\t\tif (recordId && recordId !== 'new') {\n\t\t\t\t\t\tconst existingRecord = stonecrop.value.getRecordById(doctype, recordId)\n\t\t\t\t\t\tif (existingRecord) {\n\t\t\t\t\t\t\tformData.value = existingRecord.get('') || {}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tawait stonecrop.value.getRecord(doctype, recordId)\n\t\t\t\t\t\t\t\tconst loadedRecord = stonecrop.value.getRecordById(doctype, recordId)\n\t\t\t\t\t\t\t\tif (loadedRecord) {\n\t\t\t\t\t\t\t\t\tformData.value = loadedRecord.get('') || {}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} catch {\n\t\t\t\t\t\t\t\tformData.value = initializeNewRecord(doctype)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tformData.value = initializeNewRecord(doctype)\n\t\t\t\t\t}\n\n\t\t\t\t\tif (hstStore.value) {\n\t\t\t\t\t\tsetupDeepReactivity(doctype, recordId || 'new', formData, hstStore.value)\n\t\t\t\t\t}\n\n\t\t\t\t\tstonecrop.value.runAction(doctype, 'load', recordId ? [recordId] : undefined)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Handle HST integration if doctype is provided explicitly\n\t\tif (options.doctype) {\n\t\t\thstStore.value = stonecrop.value.getStore()\n\t\t\tconst doctype = options.doctype\n\t\t\tconst recordId = options.recordId\n\n\t\t\tif (recordId && recordId !== 'new') {\n\t\t\t\tconst existingRecord = stonecrop.value.getRecordById(doctype, recordId)\n\t\t\t\tif (existingRecord) {\n\t\t\t\t\tformData.value = existingRecord.get('') || {}\n\t\t\t\t} else {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tawait stonecrop.value.getRecord(doctype, recordId)\n\t\t\t\t\t\tconst loadedRecord = stonecrop.value.getRecordById(doctype, recordId)\n\t\t\t\t\t\tif (loadedRecord) {\n\t\t\t\t\t\t\tformData.value = loadedRecord.get('') || {}\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch {\n\t\t\t\t\t\tformData.value = initializeNewRecord(doctype)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tformData.value = initializeNewRecord(doctype)\n\t\t\t}\n\n\t\t\tif (hstStore.value) {\n\t\t\t\tsetupDeepReactivity(doctype, recordId || 'new', formData, hstStore.value)\n\t\t\t}\n\t\t}\n\t})\n\n\t// HST integration functions - always created but only populated when HST is available\n\tconst provideHSTPath = (fieldname: string, customRecordId?: string): string => {\n\t\tconst doctype = options.doctype || routerDoctype.value\n\t\tif (!doctype) return ''\n\n\t\tconst actualRecordId = customRecordId || options.recordId || routerRecordId.value || 'new'\n\t\treturn `${doctype.slug}.${actualRecordId}.${fieldname}`\n\t}\n\n\tconst handleHSTChange = (changeData: HSTChangeData): void => {\n\t\tconst doctype = options.doctype || routerDoctype.value\n\t\tif (!hstStore.value || !stonecrop.value || !doctype) {\n\t\t\treturn\n\t\t}\n\n\t\ttry {\n\t\t\tconst pathParts = changeData.path.split('.')\n\t\t\tif (pathParts.length >= 2) {\n\t\t\t\tconst doctypeSlug = pathParts[0]\n\t\t\t\tconst recordId = pathParts[1]\n\n\t\t\t\tif (!hstStore.value.has(`${doctypeSlug}.${recordId}`)) {\n\t\t\t\t\tstonecrop.value.addRecord(doctype, recordId, { ...formData.value })\n\t\t\t\t}\n\n\t\t\t\tif (pathParts.length > 3) {\n\t\t\t\t\tconst recordPath = `${doctypeSlug}.${recordId}`\n\t\t\t\t\tconst nestedParts = pathParts.slice(2)\n\n\t\t\t\t\tlet currentPath = recordPath\n\t\t\t\t\tfor (let i = 0; i < nestedParts.length - 1; i++) {\n\t\t\t\t\t\tcurrentPath += `.${nestedParts[i]}`\n\n\t\t\t\t\t\tif (!hstStore.value.has(currentPath)) {\n\t\t\t\t\t\t\tconst nextPart = nestedParts[i + 1]\n\t\t\t\t\t\t\tconst isArray = !isNaN(Number(nextPart))\n\t\t\t\t\t\t\thstStore.value.set(currentPath, isArray ? [] : {})\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\thstStore.value.set(changeData.path, changeData.value)\n\n\t\t\tconst fieldParts = changeData.fieldname.split('.')\n\t\t\tconst newFormData = { ...formData.value }\n\n\t\t\tif (fieldParts.length === 1) {\n\t\t\t\tnewFormData[fieldParts[0]] = changeData.value\n\t\t\t} else {\n\t\t\t\tupdateNestedObject(newFormData, fieldParts, changeData.value)\n\t\t\t}\n\n\t\t\tformData.value = newFormData\n\t\t} catch {\n\t\t\t// Silently handle errors\n\t\t}\n\t}\n\n\t// Provide injection tokens if HST will be available\n\tif (options.doctype || registry?.router) {\n\t\tprovide('hstPathProvider', provideHSTPath)\n\t\tprovide('hstChangeHandler', handleHSTChange)\n\t}\n\n\t// Create operation log API object\n\tconst operationLog: OperationLogAPI = {\n\t\toperations,\n\t\tcurrentIndex,\n\t\tundoRedoState,\n\t\tcanUndo,\n\t\tcanRedo,\n\t\tundoCount,\n\t\tredoCount,\n\t\tundo,\n\t\tredo,\n\t\tstartBatch,\n\t\tcommitBatch,\n\t\tcancelBatch,\n\t\tclear,\n\t\tgetOperationsFor,\n\t\tgetSnapshot,\n\t\tmarkIrreversible,\n\t\tlogAction,\n\t\tconfigure,\n\t}\n\t// Always return HST functions if doctype is provided or will be loaded from router\n\tif (options.doctype) {\n\t\t// Explicit doctype - return HST immediately\n\t\treturn {\n\t\t\tstonecrop,\n\t\t\toperationLog,\n\t\t\tprovideHSTPath,\n\t\t\thandleHSTChange,\n\t\t\thstStore,\n\t\t\tformData,\n\t\t} as HSTStonecropReturn\n\t} else if (!options.doctype && registry?.router) {\n\t\t// Router-based - return HST (will be populated after mount)\n\t\treturn {\n\t\t\tstonecrop,\n\t\t\toperationLog,\n\t\t\tprovideHSTPath,\n\t\t\thandleHSTChange,\n\t\t\thstStore,\n\t\t\tformData,\n\t\t} as HSTStonecropReturn\n\t}\n\n\t// No doctype and no router - basic mode\n\treturn {\n\t\tstonecrop,\n\t\toperationLog,\n\t} as BaseStonecropReturn\n}\n\n/**\n * Initialize new record structure based on doctype schema\n */\nfunction initializeNewRecord(doctype: DoctypeMeta): Record<string, any> {\n\tconst initialData: Record<string, any> = {}\n\n\tif (!doctype.schema) {\n\t\treturn initialData\n\t}\n\n\tdoctype.schema.forEach(field => {\n\t\tconst fieldtype = 'fieldtype' in field ? field.fieldtype : 'Data'\n\n\t\tswitch (fieldtype) {\n\t\t\tcase 'Data':\n\t\t\tcase 'Text':\n\t\t\t\tinitialData[field.fieldname] = ''\n\t\t\t\tbreak\n\t\t\tcase 'Check':\n\t\t\t\tinitialData[field.fieldname] = false\n\t\t\t\tbreak\n\t\t\tcase 'Int':\n\t\t\tcase 'Float':\n\t\t\t\tinitialData[field.fieldname] = 0\n\t\t\t\tbreak\n\t\t\tcase 'Table':\n\t\t\t\tinitialData[field.fieldname] = []\n\t\t\t\tbreak\n\t\t\tcase 'JSON':\n\t\t\t\tinitialData[field.fieldname] = {}\n\t\t\t\tbreak\n\t\t\tdefault:\n\t\t\t\tinitialData[field.fieldname] = null\n\t\t}\n\t})\n\n\treturn initialData\n}\n\n/**\n * Setup deep reactivity between form data and HST store\n */\nfunction setupDeepReactivity(\n\tdoctype: DoctypeMeta,\n\trecordId: string,\n\tformData: Ref<Record<string, any>>,\n\thstStore: HSTNode\n): void {\n\twatch(\n\t\tformData,\n\t\tnewData => {\n\t\t\tconst recordPath = `${doctype.slug}.${recordId}`\n\n\t\t\tObject.keys(newData).forEach(fieldname => {\n\t\t\t\tconst path = `${recordPath}.${fieldname}`\n\t\t\t\ttry {\n\t\t\t\t\thstStore.set(path, newData[fieldname])\n\t\t\t\t} catch {\n\t\t\t\t\t// Silently handle errors\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\t\t{ deep: true }\n\t)\n}\n\n/**\n * Update nested object with dot-notation path\n */\nfunction updateNestedObject(obj: any, path: string[], value: any): void {\n\tlet current = obj as Record<string, any>\n\n\tfor (let i = 0; i < path.length - 1; i++) {\n\t\tconst key = path[i]\n\n\t\tif (!(key in current) || typeof current[key] !== 'object') {\n\t\t\tcurrent[key] = isNaN(Number(path[i + 1])) ? {} : []\n\t\t}\n\n\t\tcurrent = current[key] as Record<string, any>\n\t}\n\n\tconst finalKey = path[path.length - 1]\n\tcurrent[finalKey] = value\n}\n","import { useMagicKeys, whenever } from '@vueuse/core'\nimport { storeToRefs } from 'pinia'\nimport { inject } from 'vue'\n\nimport type { HSTNode } from '../stores/hst'\nimport { useOperationLogStore } from '../stores/operation-log'\nimport type { OperationLogConfig } from '../types/operation-log'\n\n/**\n * Composable for operation log management\n * Provides easy access to undo/redo functionality and operation history\n *\n * @param config - Optional configuration for the operation log\n * @returns Operation log interface\n *\n * @example\n * ```typescript\n * const { undo, redo, canUndo, canRedo, operations, configure } = useOperationLog()\n *\n * // Configure the log\n * configure({\n * maxOperations: 50,\n * enableCrossTabSync: true,\n * enablePersistence: true\n * })\n *\n * // Undo/redo\n * await undo(hstStore)\n * await redo(hstStore)\n * ```\n *\n * @public\n */\nexport function useOperationLog(config?: Partial<OperationLogConfig>) {\n\t// Try to use the injected store from the Stonecrop plugin first\n\t// This ensures we use the same Pinia instance as the app\n\tconst injectedStore = inject<ReturnType<typeof useOperationLogStore> | undefined>('$operationLogStore', undefined)\n\tconst store = injectedStore || useOperationLogStore()\n\n\t// Apply configuration if provided\n\tif (config) {\n\t\tstore.configure(config)\n\t}\n\n\t// Extract reactive state\n\tconst { operations, currentIndex, undoRedoState, canUndo, canRedo, undoCount, redoCount } = storeToRefs(store)\n\n\t/**\n\t * Undo the last operation\n\t */\n\tfunction undo(hstStore: HSTNode): boolean {\n\t\treturn store.undo(hstStore)\n\t}\n\n\t/**\n\t * Redo the next operation\n\t */\n\tfunction redo(hstStore: HSTNode): boolean {\n\t\treturn store.redo(hstStore)\n\t}\n\n\t/**\n\t * Start a batch operation\n\t */\n\tfunction startBatch() {\n\t\tstore.startBatch()\n\t}\n\n\t/**\n\t * Commit the current batch\n\t */\n\tfunction commitBatch(description?: string): string | null {\n\t\treturn store.commitBatch(description)\n\t}\n\n\t/**\n\t * Cancel the current batch\n\t */\n\tfunction cancelBatch() {\n\t\tstore.cancelBatch()\n\t}\n\n\t/**\n\t * Clear all operations\n\t */\n\tfunction clear() {\n\t\tstore.clear()\n\t}\n\n\t/**\n\t * Get operations for a specific doctype/record\n\t */\n\tfunction getOperationsFor(doctype: string, recordId?: string) {\n\t\treturn store.getOperationsFor(doctype, recordId)\n\t}\n\n\t/**\n\t * Get a snapshot of the operation log\n\t */\n\tfunction getSnapshot() {\n\t\treturn store.getSnapshot()\n\t}\n\n\t/**\n\t * Mark an operation as irreversible\n\t * @param operationId - The ID of the operation to mark\n\t * @param reason - The reason why the operation is irreversible\n\t */\n\tfunction markIrreversible(operationId: string, reason: string) {\n\t\tstore.markIrreversible(operationId, reason)\n\t}\n\n\t/**\n\t * Log an action execution (stateless actions like print, email, etc.)\n\t * @param doctype - The doctype the action was executed on\n\t * @param actionName - The name of the action that was executed\n\t * @param recordIds - Optional array of record IDs the action was executed on\n\t * @param result - The result of the action execution\n\t * @param error - Optional error message if action failed\n\t * @returns The operation ID\n\t */\n\tfunction logAction(\n\t\tdoctype: string,\n\t\tactionName: string,\n\t\trecordIds?: string[],\n\t\tresult: 'success' | 'failure' | 'pending' = 'success',\n\t\terror?: string\n\t): string {\n\t\treturn store.logAction(doctype, actionName, recordIds, result, error)\n\t}\n\n\t/**\n\t * Update configuration\n\t * @param options - Configuration options to update\n\t */\n\tfunction configure(options: Partial<OperationLogConfig>) {\n\t\tstore.configure(options)\n\t}\n\n\treturn {\n\t\t// State\n\t\toperations,\n\t\tcurrentIndex,\n\t\tundoRedoState,\n\t\tcanUndo,\n\t\tcanRedo,\n\t\tundoCount,\n\t\tredoCount,\n\n\t\t// Methods\n\t\tundo,\n\t\tredo,\n\t\tstartBatch,\n\t\tcommitBatch,\n\t\tcancelBatch,\n\t\tclear,\n\t\tgetOperationsFor,\n\t\tgetSnapshot,\n\t\tmarkIrreversible,\n\t\tlogAction,\n\t\tconfigure,\n\t}\n}\n\n/**\n * Keyboard shortcut handler for undo/redo\n * Automatically binds Ctrl+Z (undo) and Ctrl+Shift+Z/Ctrl+Y (redo) using VueUse\n *\n * @param hstStore - The HST store to operate on\n * @param enabled - Whether shortcuts are enabled (default: true)\n *\n * @example\n * ```typescript\n * import { onMounted } from 'vue'\n *\n * const stonecrop = useStonecrop({ doctype, recordId })\n * useUndoRedoShortcuts(stonecrop.hstStore)\n * ```\n *\n * @public\n */\nexport function useUndoRedoShortcuts(hstStore: HSTNode, enabled = true) {\n\tif (!enabled) return\n\n\tconst { undo, redo, canUndo, canRedo } = useOperationLog()\n\tconst keys = useMagicKeys()\n\n\t// Undo shortcuts: Ctrl+Z or Cmd+Z (Mac)\n\twhenever(keys['Ctrl+Z'], () => {\n\t\tif (canUndo.value) {\n\t\t\tundo(hstStore)\n\t\t}\n\t})\n\n\twhenever(keys['Meta+Z'], () => {\n\t\tif (canUndo.value) {\n\t\t\tundo(hstStore)\n\t\t}\n\t})\n\n\t// Redo shortcuts: Ctrl+Shift+Z, Cmd+Shift+Z (Mac), or Ctrl+Y\n\twhenever(keys['Ctrl+Shift+Z'], () => {\n\t\tif (canRedo.value) {\n\t\t\tredo(hstStore)\n\t\t}\n\t})\n\n\twhenever(keys['Meta+Shift+Z'], () => {\n\t\tif (canRedo.value) {\n\t\t\tredo(hstStore)\n\t\t}\n\t})\n\n\twhenever(keys['Ctrl+Y'], () => {\n\t\tif (canRedo.value) {\n\t\t\tredo(hstStore)\n\t\t}\n\t})\n}\n\n/**\n * Batch operation helper\n * Wraps a function execution in a batch operation\n *\n * @param fn - The function to execute within a batch\n * @param description - Optional description for the batch\n * @returns The batch operation ID\n *\n * @example\n * ```typescript\n * const { withBatch } = useOperationLog()\n *\n * const batchId = await withBatch(() => {\n * hstStore.set('task.123.title', 'New Title')\n * hstStore.set('task.123.status', 'active')\n * hstStore.set('task.123.priority', 'high')\n * }, 'Update task details')\n * ```\n *\n * @public\n */\nexport async function withBatch<T>(fn: () => T | Promise<T>, description?: string): Promise<string | null> {\n\tconst { startBatch, commitBatch, cancelBatch } = useOperationLog()\n\n\tstartBatch()\n\n\ttry {\n\t\tawait fn()\n\t\treturn commitBatch(description)\n\t} catch (error) {\n\t\tcancelBatch()\n\t\tthrow error\n\t}\n}\n","import { Component } from 'vue'\n\nimport type { ImmutableDoctype } from './types'\n\n/**\n * Doctype Meta class\n * @public\n */\nexport default class DoctypeMeta {\n\t/**\n\t * The doctype name\n\t * @public\n\t * @readonly\n\t */\n\treadonly doctype: string\n\n\t/**\n\t * The doctype schema\n\t * @public\n\t * @readonly\n\t */\n\treadonly schema: ImmutableDoctype['schema']\n\n\t/**\n\t * The doctype workflow\n\t * @public\n\t * @readonly\n\t */\n\treadonly workflow: ImmutableDoctype['workflow']\n\n\t/**\n\t * The doctype actions and field triggers\n\t * @public\n\t * @readonly\n\t */\n\treadonly actions: ImmutableDoctype['actions']\n\n\t/**\n\t * The doctype component\n\t * @public\n\t * @readonly\n\t */\n\treadonly component?: Component\n\n\t/**\n\t * Creates a new DoctypeMeta instance\n\t * @param doctype - The doctype name\n\t * @param schema - The doctype schema definition\n\t * @param workflow - The doctype workflow configuration (XState machine)\n\t * @param actions - The doctype actions and field triggers\n\t * @param component - Optional Vue component for rendering the doctype\n\t */\n\tconstructor(\n\t\tdoctype: string,\n\t\tschema: ImmutableDoctype['schema'],\n\t\tworkflow: ImmutableDoctype['workflow'],\n\t\tactions: ImmutableDoctype['actions'],\n\t\tcomponent?: Component\n\t) {\n\t\tthis.doctype = doctype\n\t\tthis.schema = schema\n\t\tthis.workflow = workflow\n\t\tthis.actions = actions\n\t\tthis.component = component\n\t}\n\n\t/**\n\t * Converts the registered doctype string to a slug (kebab-case). The following conversions are made:\n\t * - It replaces camelCase and PascalCase with kebab-case strings\n\t * - It replaces spaces and underscores with hyphens\n\t * - It converts the string to lowercase\n\t *\n\t * @returns The slugified doctype string\n\t *\n\t * @example\n\t * ```ts\n\t * const doctype = new DoctypeMeta('TaskItem', schema, workflow, actions\n\t * console.log(doctype.slug) // 'task-item'\n\t * ```\n\t *\n\t * @public\n\t */\n\tget slug() {\n\t\treturn this.doctype\n\t\t\t.replace(/([a-z])([A-Z])/g, '$1-$2')\n\t\t\t.replace(/[\\s_]+/g, '-')\n\t\t\t.toLowerCase()\n\t}\n}\n","import { Router } from 'vue-router'\n\nimport DoctypeMeta from './doctype'\nimport { getGlobalTriggerEngine } from './field-triggers'\nimport { RouteContext } from './types/registry'\n\n/**\n * Stonecrop Registry class\n * @public\n */\nexport default class Registry {\n\t/**\n\t * The root Registry instance\n\t */\n\tstatic _root: Registry\n\n\t/**\n\t * The name of the Registry instance\n\t *\n\t * @defaultValue 'Registry'\n\t */\n\treadonly name: string\n\n\t/**\n\t * The registry property contains a collection of doctypes\n\t * @see {@link DoctypeMeta}\n\t */\n\treadonly registry: Record<string, DoctypeMeta>\n\n\t/**\n\t * The Vue router instance\n\t * @see {@link https://router.vuejs.org/}\n\t */\n\treadonly router?: Router\n\n\t/**\n\t * Creates a new Registry instance (singleton pattern)\n\t * @param router - Optional Vue router instance for route management\n\t * @param getMeta - Optional function to fetch doctype metadata from an API\n\t */\n\tconstructor(router?: Router, getMeta?: (routeContext: RouteContext) => DoctypeMeta | Promise<DoctypeMeta>) {\n\t\tif (Registry._root) {\n\t\t\treturn Registry._root\n\t\t}\n\t\tRegistry._root = this\n\t\tthis.name = 'Registry'\n\t\tthis.registry = {}\n\t\tthis.router = router\n\t\tthis.getMeta = getMeta\n\t}\n\n\t/**\n\t * The getMeta function fetches doctype metadata from an API based on route context\n\t * @see {@link DoctypeMeta}\n\t */\n\tgetMeta?: (routeContext: RouteContext) => DoctypeMeta | Promise<DoctypeMeta>\n\n\t/**\n\t * Get doctype metadata\n\t * @param doctype - The doctype to fetch metadata for\n\t * @returns The doctype metadata\n\t * @see {@link DoctypeMeta}\n\t */\n\taddDoctype(doctype: DoctypeMeta) {\n\t\tif (!(doctype.doctype in Object.keys(this.registry))) {\n\t\t\tthis.registry[doctype.slug] = doctype\n\t\t}\n\n\t\t// Register actions (including field triggers) with the field trigger engine\n\t\tconst triggerEngine = getGlobalTriggerEngine()\n\t\t// Register under both doctype name and slug to handle different lookup patterns\n\t\ttriggerEngine.registerDoctypeActions(doctype.doctype, doctype.actions)\n\t\tif (doctype.slug !== doctype.doctype) {\n\t\t\ttriggerEngine.registerDoctypeActions(doctype.slug, doctype.actions)\n\t\t}\n\n\t\tif (doctype.component && this.router && !this.router.hasRoute(doctype.doctype)) {\n\t\t\tthis.router.addRoute({\n\t\t\t\tpath: `/${doctype.slug}`,\n\t\t\t\tname: doctype.slug,\n\t\t\t\tcomponent: doctype.component,\n\t\t\t})\n\t\t}\n\t}\n\n\t// TODO: should we allow clearing the registry at all?\n\t// clear() {\n\t// \tthis.registry = {}\n\t// \tif (this.router) {\n\t// \t\tconst routes = this.router.getRoutes()\n\t// \t\tfor (const route of routes) {\n\t// \t\t\tif (route.name) {\n\t// \t\t\t\tthis.router.removeRoute(route.name)\n\t// \t\t\t}\n\t// \t\t}\n\t// \t}\n\t// }\n}\n","import { App, type Plugin, nextTick } from 'vue'\nimport type { Pinia } from 'pinia'\n\nimport Registry from '../registry'\nimport { Stonecrop } from '../stonecrop'\nimport type { InstallOptions } from '../types'\nimport { useOperationLogStore } from '../stores/operation-log'\n\n/**\n * Setup auto-initialization for user-defined initialization logic\n * This function handles the post-mount initialization automatically\n */\nasync function setupAutoInitialization(\n\tregistry: Registry,\n\tstonecrop: Stonecrop,\n\tonRouterInitialized: (registry: Registry, stonecrop: Stonecrop) => void | Promise<void>\n) {\n\t// Wait for the next tick to ensure the app is mounted\n\tawait nextTick()\n\n\ttry {\n\t\tawait onRouterInitialized(registry, stonecrop)\n\t} catch {\n\t\t// Silent error handling - application should handle initialization errors\n\t}\n}\n\n/**\n * Stonecrop Vue plugin\n * @param app - The Vue app instance\n * @param options - The plugin options\n * @example\n * ```ts\n * import { createApp } from 'vue'\n * import Stonecrop from '@stonecrop/stonecrop'\n * import router from './router'\n *\n * const app = createApp(App)\n * app.use(Stonecrop, {\n * router,\n * getMeta: async (routeContext) => {\n * // routeContext contains: { path, segments }\n * // fetch doctype meta from your API using the route context\n * },\n * autoInitializeRouter: true,\n * onRouterInitialized: async (registry, stonecrop) => {\n * // your custom initialization logic here\n * }\n * })\n * app.mount('#app')\n * ```\n * @public\n */\nconst plugin: Plugin = {\n\tinstall: (app: App, options?: InstallOptions) => {\n\t\t// Check for existing router installation\n\t\tconst existingRouter = app.config.globalProperties.$router\n\t\tconst providedRouter = options?.router\n\t\tconst router = existingRouter || providedRouter\n\t\tif (!existingRouter && providedRouter) {\n\t\t\tapp.use(providedRouter)\n\t\t}\n\n\t\t// Create registry with available router\n\t\tconst registry = new Registry(router, options?.getMeta)\n\t\tapp.provide('$registry', registry)\n\t\tapp.config.globalProperties.$registry = registry\n\n\t\t// Create and provide a global Stonecrop instance\n\t\tconst stonecrop = new Stonecrop(registry)\n\t\tapp.provide('$stonecrop', stonecrop)\n\t\tapp.config.globalProperties.$stonecrop = stonecrop\n\n\t\t// Initialize operation log store if Pinia is available\n\t\t// This ensures the store is created with the app's Pinia instance\n\t\ttry {\n\t\t\tconst pinia = app.config.globalProperties.$pinia as Pinia | undefined\n\t\t\tif (pinia) {\n\t\t\t\t// Initialize the operation log store with the app's Pinia instance\n\t\t\t\tconst operationLogStore = useOperationLogStore(pinia)\n\n\t\t\t\t// Provide the store so components can access it\n\t\t\t\tapp.provide('$operationLogStore', operationLogStore)\n\t\t\t\tapp.config.globalProperties.$operationLogStore = operationLogStore\n\t\t\t}\n\t\t} catch (error) {\n\t\t\t// Pinia not available - operation log won't work, but app should still function\n\t\t\tconsole.warn('Pinia not available - operation log features will be disabled:', error)\n\t\t}\n\n\t\t// Register custom components\n\t\tif (options?.components) {\n\t\t\tfor (const [tag, component] of Object.entries(options.components)) {\n\t\t\t\tapp.component(tag, component)\n\t\t\t}\n\t\t}\n\n\t\t// Setup auto-initialization if requested\n\t\tif (options?.autoInitializeRouter && options.onRouterInitialized) {\n\t\t\tvoid setupAutoInitialization(registry, stonecrop, options.onRouterInitialized)\n\t\t}\n\t},\n}\n\nexport default plugin\n","/**\n * Schema Validation Utilities\n * Validates Stonecrop schemas for integrity and consistency\n * @packageDocumentation\n */\n\nimport type { SchemaTypes } from '@stonecrop/aform'\nimport type { List, Map as ImmutableMap } from 'immutable'\nimport type { AnyStateNodeConfig } from 'xstate'\nimport { getGlobalTriggerEngine } from './field-triggers'\nimport type Registry from './registry'\n\n/**\n * Validation severity levels\n * @public\n */\nexport enum ValidationSeverity {\n\t/** Blocking error that prevents save */\n\tERROR = 'error',\n\t/** Advisory warning that allows save */\n\tWARNING = 'warning',\n\t/** Informational message */\n\tINFO = 'info',\n}\n\n/**\n * Validation issue\n * @public\n */\nexport interface ValidationIssue {\n\t/** Severity level */\n\tseverity: ValidationSeverity\n\t/** Validation rule that failed */\n\trule: string\n\t/** Human-readable message */\n\tmessage: string\n\t/** Doctype name */\n\tdoctype?: string\n\t/** Field name if applicable */\n\tfieldname?: string\n\t/** Additional context */\n\tcontext?: Record<string, unknown>\n}\n\n/**\n * Validation result\n * @public\n */\nexport interface ValidationResult {\n\t/** Whether validation passed (no blocking errors) */\n\tvalid: boolean\n\t/** List of validation issues */\n\tissues: ValidationIssue[]\n\t/** Count of errors */\n\terrorCount: number\n\t/** Count of warnings */\n\twarningCount: number\n\t/** Count of info messages */\n\tinfoCount: number\n}\n\n/**\n * Schema validator options\n * @public\n */\nexport interface ValidatorOptions {\n\t/** Registry instance for doctype lookups */\n\tregistry?: Registry\n\t/** Whether to validate Link field targets */\n\tvalidateLinkTargets?: boolean\n\t/** Whether to validate workflow reachability */\n\tvalidateWorkflows?: boolean\n\t/** Whether to validate action registration */\n\tvalidateActions?: boolean\n\t/** Whether to validate required schema properties */\n\tvalidateRequiredProperties?: boolean\n}\n\n/**\n * Schema validator class\n * @public\n */\nexport class SchemaValidator {\n\tprivate options: Required<ValidatorOptions>\n\n\t/**\n\t * Creates a new SchemaValidator instance\n\t * @param options - Validator configuration options\n\t */\n\tconstructor(options: ValidatorOptions = {}) {\n\t\tthis.options = {\n\t\t\tregistry: options.registry || null!,\n\t\t\tvalidateLinkTargets: options.validateLinkTargets ?? true,\n\t\t\tvalidateActions: options.validateActions ?? true,\n\t\t\tvalidateWorkflows: options.validateWorkflows ?? true,\n\t\t\tvalidateRequiredProperties: options.validateRequiredProperties ?? true,\n\t\t}\n\t}\n\n\t/**\n\t * Validates a complete doctype schema\n\t * @param doctype - Doctype name\n\t * @param schema - Schema fields (List or Array)\n\t * @param workflow - Optional workflow configuration\n\t * @param actions - Optional actions map\n\t * @returns Validation result\n\t */\n\tvalidate(\n\t\tdoctype: string,\n\t\tschema: List<SchemaTypes> | SchemaTypes[] | undefined,\n\t\tworkflow?: AnyStateNodeConfig,\n\t\tactions?: ImmutableMap<string, string[]> | Map<string, string[]>\n\t): ValidationResult {\n\t\tconst issues: ValidationIssue[] = []\n\n\t\t// Convert schema to array for easier iteration\n\t\tconst schemaArray = schema ? (Array.isArray(schema) ? schema : schema.toArray()) : []\n\n\t\t// Validate required properties\n\t\tif (this.options.validateRequiredProperties) {\n\t\t\tissues.push(...this.validateRequiredProperties(doctype, schemaArray))\n\t\t}\n\n\t\t// Validate Link field targets\n\t\tif (this.options.validateLinkTargets && this.options.registry) {\n\t\t\tissues.push(...this.validateLinkFields(doctype, schemaArray, this.options.registry))\n\t\t}\n\n\t\t// Validate workflow configuration\n\t\tif (this.options.validateWorkflows && workflow) {\n\t\t\tissues.push(...this.validateWorkflow(doctype, workflow))\n\t\t}\n\n\t\t// Validate action registration\n\t\tif (this.options.validateActions && actions) {\n\t\t\tconst actionsMap = actions instanceof Map ? actions : actions.toObject()\n\t\t\tissues.push(...this.validateActionRegistration(doctype, actionsMap as Record<string, string[]>))\n\t\t}\n\n\t\t// Calculate counts\n\t\tconst errorCount = issues.filter(i => i.severity === ValidationSeverity.ERROR).length\n\t\tconst warningCount = issues.filter(i => i.severity === ValidationSeverity.WARNING).length\n\t\tconst infoCount = issues.filter(i => i.severity === ValidationSeverity.INFO).length\n\n\t\treturn {\n\t\t\tvalid: errorCount === 0,\n\t\t\tissues,\n\t\t\terrorCount,\n\t\t\twarningCount,\n\t\t\tinfoCount,\n\t\t}\n\t}\n\n\t/**\n\t * Validates that required schema properties are present\n\t * @internal\n\t */\n\tprivate validateRequiredProperties(doctype: string, schema: SchemaTypes[]): ValidationIssue[] {\n\t\tconst issues: ValidationIssue[] = []\n\n\t\tfor (const field of schema) {\n\t\t\t// Check for fieldname\n\t\t\tif (!field.fieldname) {\n\t\t\t\tissues.push({\n\t\t\t\t\tseverity: ValidationSeverity.ERROR,\n\t\t\t\t\trule: 'required-fieldname',\n\t\t\t\t\tmessage: 'Field is missing required property: fieldname',\n\t\t\t\t\tdoctype,\n\t\t\t\t\tcontext: { field },\n\t\t\t\t})\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\t// Check for component or fieldtype\n\t\t\tif (!field.component && !('fieldtype' in field)) {\n\t\t\t\tissues.push({\n\t\t\t\t\tseverity: ValidationSeverity.ERROR,\n\t\t\t\t\trule: 'required-component-or-fieldtype',\n\t\t\t\t\tmessage: `Field \"${field.fieldname}\" must have either component or fieldtype property`,\n\t\t\t\t\tdoctype,\n\t\t\t\t\tfieldname: field.fieldname,\n\t\t\t\t})\n\t\t\t}\n\n\t\t\t// Validate nested schemas (recursively)\n\t\t\tif ('schema' in field) {\n\t\t\t\tconst nestedSchema = (field as { schema: unknown }).schema\n\t\t\t\tconst nestedArray = (\n\t\t\t\t\tArray.isArray(nestedSchema) ? nestedSchema : (nestedSchema as { toArray?: () => unknown[] }).toArray?.() || []\n\t\t\t\t) as SchemaTypes[]\n\t\t\t\tissues.push(...this.validateRequiredProperties(doctype, nestedArray))\n\t\t\t}\n\t\t}\n\n\t\treturn issues\n\t}\n\n\t/**\n\t * Validates Link field targets exist in registry\n\t * @internal\n\t */\n\tprivate validateLinkFields(doctype: string, schema: SchemaTypes[], registry: Registry): ValidationIssue[] {\n\t\tconst issues: ValidationIssue[] = []\n\n\t\tfor (const field of schema) {\n\t\t\tconst fieldtype = 'fieldtype' in field ? (field as { fieldtype: unknown }).fieldtype : undefined\n\n\t\t\t// Check Link fields\n\t\t\tif (fieldtype === 'Link') {\n\t\t\t\tconst options = 'options' in field ? (field as { options: unknown }).options : undefined\n\t\t\t\tif (!options) {\n\t\t\t\t\tissues.push({\n\t\t\t\t\t\tseverity: ValidationSeverity.ERROR,\n\t\t\t\t\t\trule: 'link-missing-options',\n\t\t\t\t\t\tmessage: `Link field \"${field.fieldname}\" is missing options property (target doctype)`,\n\t\t\t\t\t\tdoctype,\n\t\t\t\t\t\tfieldname: field.fieldname,\n\t\t\t\t\t})\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\n\t\t\t\t// Check if target doctype exists in registry\n\t\t\t\t// Options should be a string representing the target doctype name\n\t\t\t\tconst targetDoctype = typeof options === 'string' ? options : ''\n\t\t\t\tif (!targetDoctype) {\n\t\t\t\t\tissues.push({\n\t\t\t\t\t\tseverity: ValidationSeverity.ERROR,\n\t\t\t\t\t\trule: 'link-invalid-options',\n\t\t\t\t\t\tmessage: `Link field \"${field.fieldname}\" has invalid options format (expected string doctype name)`,\n\t\t\t\t\t\tdoctype,\n\t\t\t\t\t\tfieldname: field.fieldname,\n\t\t\t\t\t})\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tconst targetMeta = registry.registry[targetDoctype] || registry.registry[targetDoctype.toLowerCase()]\n\n\t\t\t\tif (!targetMeta) {\n\t\t\t\t\tissues.push({\n\t\t\t\t\t\tseverity: ValidationSeverity.ERROR,\n\t\t\t\t\t\trule: 'link-invalid-target',\n\t\t\t\t\t\tmessage: `Link field \"${field.fieldname}\" references non-existent doctype: \"${targetDoctype}\"`,\n\t\t\t\t\t\tdoctype,\n\t\t\t\t\t\tfieldname: field.fieldname,\n\t\t\t\t\t\tcontext: { targetDoctype },\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Recursively check nested schemas\n\t\t\tif ('schema' in field) {\n\t\t\t\tconst nestedSchema = (field as { schema: unknown }).schema\n\t\t\t\tconst nestedArray = (\n\t\t\t\t\tArray.isArray(nestedSchema) ? nestedSchema : (nestedSchema as { toArray?: () => unknown[] }).toArray?.() || []\n\t\t\t\t) as SchemaTypes[]\n\t\t\t\tissues.push(...this.validateLinkFields(doctype, nestedArray, registry))\n\t\t\t}\n\t\t}\n\n\t\treturn issues\n\t}\n\n\t/**\n\t * Validates workflow state machine configuration\n\t * @internal\n\t */\n\tprivate validateWorkflow(doctype: string, workflow: AnyStateNodeConfig): ValidationIssue[] {\n\t\tconst issues: ValidationIssue[] = []\n\n\t\t// Check for initial state\n\t\tif (!workflow.initial && !workflow.type) {\n\t\t\tissues.push({\n\t\t\t\tseverity: ValidationSeverity.WARNING,\n\t\t\t\trule: 'workflow-missing-initial',\n\t\t\t\tmessage: 'Workflow is missing initial state property',\n\t\t\t\tdoctype,\n\t\t\t})\n\t\t}\n\n\t\t// Check for states\n\t\tif (!workflow.states || Object.keys(workflow.states).length === 0) {\n\t\t\tissues.push({\n\t\t\t\tseverity: ValidationSeverity.WARNING,\n\t\t\t\trule: 'workflow-no-states',\n\t\t\t\tmessage: 'Workflow has no states defined',\n\t\t\t\tdoctype,\n\t\t\t})\n\t\t\treturn issues\n\t\t}\n\n\t\t// Validate initial state exists\n\t\tif (workflow.initial && typeof workflow.initial === 'string' && !workflow.states[workflow.initial]) {\n\t\t\tissues.push({\n\t\t\t\tseverity: ValidationSeverity.ERROR,\n\t\t\t\trule: 'workflow-invalid-initial',\n\t\t\t\tmessage: `Workflow initial state \"${workflow.initial}\" does not exist in states`,\n\t\t\t\tdoctype,\n\t\t\t\tcontext: { initialState: workflow.initial },\n\t\t\t})\n\t\t}\n\n\t\t// Check state reachability (simple check - all states should have at least one incoming transition or be initial)\n\t\tconst stateNames = Object.keys(workflow.states)\n\t\tconst reachableStates = new Set<string>()\n\n\t\t// Initial state is always reachable\n\t\tif (workflow.initial && typeof workflow.initial === 'string') {\n\t\t\treachableStates.add(workflow.initial)\n\t\t}\n\n\t\t// Find all target states from transitions\n\t\tfor (const [_stateName, stateConfig] of Object.entries(workflow.states)) {\n\t\t\tconst state = stateConfig as AnyStateNodeConfig\n\t\t\tif (state.on) {\n\t\t\t\tfor (const [_event, transition] of Object.entries(state.on)) {\n\t\t\t\t\tif (typeof transition === 'string') {\n\t\t\t\t\t\treachableStates.add(transition)\n\t\t\t\t\t} else if (transition && typeof transition === 'object') {\n\t\t\t\t\t\tconst target = 'target' in transition ? (transition as { target: unknown }).target : undefined\n\t\t\t\t\t\tif (typeof target === 'string') {\n\t\t\t\t\t\t\treachableStates.add(target)\n\t\t\t\t\t\t} else if (Array.isArray(target)) {\n\t\t\t\t\t\t\ttarget.forEach((t: unknown) => {\n\t\t\t\t\t\t\t\tif (typeof t === 'string') {\n\t\t\t\t\t\t\t\t\treachableStates.add(t)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Check for unreachable states\n\t\tfor (const stateName of stateNames) {\n\t\t\tif (!reachableStates.has(stateName)) {\n\t\t\t\tissues.push({\n\t\t\t\t\tseverity: ValidationSeverity.WARNING,\n\t\t\t\t\trule: 'workflow-unreachable-state',\n\t\t\t\t\tmessage: `Workflow state \"${stateName}\" may not be reachable`,\n\t\t\t\t\tdoctype,\n\t\t\t\t\tcontext: { stateName },\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\n\t\treturn issues\n\t}\n\n\t/**\n\t * Validates that actions are registered in the FieldTriggerEngine\n\t * @internal\n\t */\n\tprivate validateActionRegistration(doctype: string, actions: Record<string, string[]>): ValidationIssue[] {\n\t\tconst issues: ValidationIssue[] = []\n\t\tconst triggerEngine = getGlobalTriggerEngine()\n\n\t\tfor (const [triggerName, actionNames] of Object.entries(actions)) {\n\t\t\tif (!Array.isArray(actionNames)) {\n\t\t\t\tissues.push({\n\t\t\t\t\tseverity: ValidationSeverity.ERROR,\n\t\t\t\t\trule: 'action-invalid-format',\n\t\t\t\t\tmessage: `Action configuration for \"${triggerName}\" must be an array`,\n\t\t\t\t\tdoctype,\n\t\t\t\t\tcontext: { triggerName, actionNames },\n\t\t\t\t})\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\t// Check each action name\n\t\t\tfor (const actionName of actionNames) {\n\t\t\t\t// Check if action is registered globally\n\t\t\t\tconst engine = triggerEngine as unknown as {\n\t\t\t\t\tglobalActions?: Map<string, unknown>\n\t\t\t\t\tglobalTransitionActions?: Map<string, unknown>\n\t\t\t\t}\n\t\t\t\tconst isRegistered = engine.globalActions?.has(actionName) || engine.globalTransitionActions?.has(actionName)\n\n\t\t\t\tif (!isRegistered) {\n\t\t\t\t\tissues.push({\n\t\t\t\t\t\tseverity: ValidationSeverity.WARNING,\n\t\t\t\t\t\trule: 'action-not-registered',\n\t\t\t\t\t\tmessage: `Action \"${actionName}\" referenced in \"${triggerName}\" is not registered in FieldTriggerEngine`,\n\t\t\t\t\t\tdoctype,\n\t\t\t\t\t\tcontext: { triggerName, actionName },\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn issues\n\t}\n}\n\n/**\n * Creates a validator with the given registry\n * @param registry - Registry instance\n * @param options - Additional validator options\n * @returns SchemaValidator instance\n * @public\n */\nexport function createValidator(registry: Registry, options?: Partial<ValidatorOptions>): SchemaValidator {\n\treturn new SchemaValidator({\n\t\tregistry,\n\t\t...options,\n\t})\n}\n\n/**\n * Quick validation helper\n * @param doctype - Doctype name\n * @param schema - Schema fields\n * @param registry - Registry instance\n * @param workflow - Optional workflow configuration\n * @param actions - Optional actions map\n * @returns Validation result\n * @public\n */\nexport function validateSchema(\n\tdoctype: string,\n\tschema: List<SchemaTypes> | SchemaTypes[] | undefined,\n\tregistry: Registry,\n\tworkflow?: AnyStateNodeConfig,\n\tactions?: ImmutableMap<string, string[]> | Map<string, string[]>\n): ValidationResult {\n\tconst validator = createValidator(registry)\n\treturn validator.validate(doctype, schema, workflow, actions)\n}\n"],"names":["IS_CLIENT","activePinia","setActivePinia","pinia","piniaSymbol","isPlainObject","o","MutationType","patchObject","newState","oldState","key","subPatch","targetValue","isRef","isReactive","noop","addSubscription","subscriptions","callback","detached","onCleanup","removeSubscription","getCurrentScope","onScopeDispose","triggerSubscriptions","args","fallbackRunWithContext","fn","ACTION_MARKER","ACTION_NAME","mergeReactiveObjects","target","patchToApply","value","skipHydrateSymbol","shouldHydrate","obj","assign","isComputed","createOptionsStore","id","options","hot","state","actions","getters","initialState","store","setup","localState","toRefs","ref","computedGetters","name","markRaw","computed","createSetupStore","$id","isOptionsStore","scope","optionsForPlugin","$subscribeOptions","event","isListening","debuggerEvents","isSyncListening","actionSubscriptions","hotState","activeListener","$patch","partialStateOrMutator","subscriptionMutation","myListenerId","nextTick","$reset","$state","$dispose","action","wrappedAction","afterCallbackSet","onErrorCallbackSet","after","onError","ret","error","_hmrPayload","partialStore","stopWatcher","watch","reactive","setupStore","effectScope","prop","toRef","actionValue","toRaw","newStore","stateKey","newStateTarget","oldStateSource","actionName","actionFn","getterName","getter","getterValue","nonEnumerable","p","extender","extensions","defineStore","setupOptions","isSetupStore","useStore","hasContext","hasInjectionContext","inject","hotId","currentInstance","getCurrentInstance","vm","cache","storeToRefs","rawStore","refs","isClient","toString","isObject","val","toRef$1","r","readonly","customRef","createFilterWrapper","filter","wrapper","resolve","reject","bypassFilter","invoke$1","pausableFilter","extendFilter","isActive","pause","resume","eventFilter","toArray","getLifeCycleTarget","watchWithFilter","source","cb","watchOptions","watchPausable","pausableWatch","tryOnMounted","sync","onMounted","watchImmediate","whenever","v","ov","onInvalidate","defaultWindow","unrefElement","elRef","_$el","plain","toValue","useEventListener","register","el","listener","firstParamTargets","test","e","_firstParamTargets$va","_firstParamTargets$va2","unref","raw_targets","raw_events","raw_listeners","raw_options","_","optionsClone","cleanups","_global","globalKey","handlers","getHandlers","getSSRHandler","fallback","guessSerializerType","rawInit","StorageSerializers","customStorageEventName","useStorage","defaults$1","storage","_options$serializer","flush","deep","listenToStorageChanges","writeDefaults","mergeDefaults","shallow","window$1","initOnMounted","data","shallowRef","keyComputed","type","serializer","pauseWatch","resumeWatch","newValue","write","update","firstMounted","onStorageEvent","ev","onStorageCustomEvent","updateFromCustomEvent","dispatchWriteEvent","oldValue","payload","serialized","read","rawValue","serializedData","useLocalStorage","initialValue","DefaultMagicKeysAliasMap","useMagicKeys","useReactive","aliasMap","passive","onEventFired","current","metaDeps","depsMap","usedKeys","setRefs","reset","updateDeps","keys$1","modifier","depsSet","clearDeps","depsMapKey","deps","depsArray","depsIndex","key$1","index","updateRefs","_e$key","_e$code","values","proxy","target$1","rec","i","generateId","serializeForBroadcast","message","op","deserializeFromBroadcast","useOperationLogStore","config","operations","currentIndex","clientId","batchMode","currentBatch","currentBatchId","canUndo","canRedo","undoCount","count","redoCount","undoRedoState","configure","loadFromPersistence","setupPersistenceWatcher","setupCrossTabSync","addOperation","operation","fullOperation","overflow","broadcastOperation","startBatch","commitBatch","description","batchId","allReversible","batchOperation","broadcastBatch","result","cancelBatch","undo","childId","childOp","revertOperation","broadcastUndo","redo","applyOperation","broadcastRedo","getSnapshot","reversibleOps","timestamps","t","clear","getOperationsFor","doctype","recordId","markIrreversible","operationId","reason","logAction","recordIds","broadcastChannel","rawMessage","childOps","batchOp","persistedData","saveToPersistence","FieldTriggerEngine","fieldname","enableRollback","actionMap","transitionMap","context","triggers","startTime","actionResults","stoppedOnError","rolledBack","snapshot","fieldRollbackConfig","rollbackEnabled","actionResult","errorResult","rollbackError","totalExecutionTime","failedResults","failedResult","handlerError","transition","transitionActions","results","doctypeTransitions","timeout","actionTimeout","regularActionFn","executionTime","doctypeActions","actionNames","pattern","patternParts","fieldParts","patternPart","fieldPart","timeoutId","recordPath","recordData","getGlobalTriggerEngine","registerGlobalAction","registerTransitionAction","setFieldRollback","triggerTransition","engine","markOperationIrreversible","getOperationLogStore","HST","globalRegistry","windowRegistry","nodeRegistry","registry","HSTProxy","parentPath","rootNode","parentDoctype","hst","path","fullPath","pathSegments","nodeDoctype","beforeValue","logStore","operationType","segments","segment","triggerEngine","transitionContext","lastSegment","afterValue","hasGetMethod","hasSetMethod","hasHasMethod","hasImmutableMarkers","constructorName","objWithConstructor","nameValue","isImmutableConstructor","createHST","Stonecrop","operationLogConfig","initialStoreStructure","doctypeSlug","originalAddDoctype","slug","doctypeNode","arg","opLogStore","actionError","actionStr","record","useStonecrop","providedStonecrop","stonecrop","hstStore","formData","routerDoctype","routerRecordId","opLogRefs","newOps","newIndex","route","routeContext","existingRecord","loadedRecord","initializeNewRecord","setupDeepReactivity","provideHSTPath","customRecordId","actualRecordId","handleHSTChange","changeData","pathParts","nestedParts","currentPath","nextPart","isArray","newFormData","updateNestedObject","provide","operationLog","initialData","field","newData","finalKey","useOperationLog","useUndoRedoShortcuts","enabled","keys","withBatch","DoctypeMeta","schema","workflow","component","Registry","router","getMeta","setupAutoInitialization","onRouterInitialized","plugin","app","existingRouter","providedRouter","operationLogStore","tag","ValidationSeverity","SchemaValidator","issues","schemaArray","actionsMap","errorCount","warningCount","infoCount","nestedSchema","nestedArray","targetDoctype","stateNames","reachableStates","_stateName","stateConfig","_event","stateName","triggerName","createValidator","validateSchema"],"mappings":"6QAQA,MAAMA,EAAY,OAAO,OAAW,IAMpC,IAAIC,EAQJ,MAAMC,GAAkBC,GAAWF,EAAcE,EAIzB,QAAQ,IAAI,SAUpC,MAAMC,GAAgB,QAAQ,IAAI,WAAa,oBAAuB,OAAO,EAA+B,OAAA,EAE5G,SAASC,EAETC,EAAG,CACC,OAAQA,GACJ,OAAOA,GAAM,UACb,OAAO,UAAU,SAAS,KAAKA,CAAC,IAAM,mBACtC,OAAOA,EAAE,QAAW,UAC5B,CAMA,IAAIC,IACH,SAAUA,EAAc,CAQrBA,EAAa,OAAY,SAMzBA,EAAa,YAAiB,eAM9BA,EAAa,cAAmB,gBAEpC,GAAGA,KAAiBA,GAAe,CAAA,EAAG,EAo+BtC,SAASC,GAAYC,EAAUC,EAAU,CAErC,UAAWC,KAAOD,EAAU,CACxB,MAAME,EAAWF,EAASC,CAAG,EAE7B,GAAI,EAAEA,KAAOF,GACT,SAEJ,MAAMI,EAAcJ,EAASE,CAAG,EAC5BN,EAAcQ,CAAW,GACzBR,EAAcO,CAAQ,GACtB,CAACE,EAAAA,MAAMF,CAAQ,GACf,CAACG,EAAAA,WAAWH,CAAQ,EACpBH,EAASE,CAAG,EAAIH,GAAYK,EAAaD,CAAQ,EAKjDH,EAASE,CAAG,EAAIC,CAExB,CACA,OAAOH,CACX,CAmDA,MAAMO,GAAO,IAAM,CAAE,EACrB,SAASC,GAAgBC,EAAeC,EAAUC,EAAUC,EAAYL,GAAM,CAC1EE,EAAc,IAAIC,CAAQ,EAC1B,MAAMG,EAAqB,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