@liuovo/agentation-vue-ui 0.0.8 → 0.0.10

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.
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/injection-keys.ts","../src/i18n/en.ts","../src/i18n/zh-CN.ts","../src/i18n/index.ts","../src/composables/useI18n.ts","../src/annotation-target.ts","../src/composables/useAnnotationsStore.ts","../src/composables/useSelection.ts","../src/composables/useAreaSelection.ts","../src/composables/useOverlay.ts","../src/copy-fields.ts","../src/composables/useSettings.ts","../../core/src/dom/freeze-animations.ts","../src/composables/useFreezeState.ts","../src/composables/useExport.ts","../src/composables/useKeyboard.ts","../src/utils.ts","../src/components/icons.ts","../src/components/AnnotationPopover.vue","../src/components/DragSelectionLayer.vue","../src/components/HighlightLayer.vue","../src/components/MarkerLayer.vue","../../../node_modules/.pnpm/@vueuse+shared@14.2.1_vue@3.5.29_typescript@5.9.3_/node_modules/@vueuse/shared/dist/index.js","../../../node_modules/.pnpm/@vueuse+core@14.2.1_vue@3.5.29_typescript@5.9.3_/node_modules/@vueuse/core/dist/index.js","../src/composables/useToolbarDrag.ts","../src/components/AgTooltip.vue","../src/components/Toolbar.vue","../src/components/OverlayRoot.vue","../src/index.ts"],"sourcesContent":["import type { InjectionKey } from \"vue\"\nimport type { RuntimeBridge } from \"./types.js\"\nimport type { AnnotationsStore } from \"./composables/useAnnotationsStore.js\"\nimport type { AreaSelectionState } from \"./composables/useAreaSelection.js\"\nimport type { SelectionState } from \"./composables/useSelection.js\"\nimport type { OverlayState } from \"./composables/useOverlay.js\"\nimport type { SettingsState } from \"./composables/useSettings.js\"\nimport type { I18nState } from \"./composables/useI18n.js\"\nimport type { FreezeState } from \"./composables/useFreezeState.js\"\n\nexport const RUNTIME_BRIDGE_KEY: InjectionKey<RuntimeBridge> = Symbol(\"agentation-runtime-bridge\")\nexport const ANNOTATIONS_STORE_KEY: InjectionKey<AnnotationsStore> = Symbol(\"agentation-annotations-store\")\nexport const SELECTION_KEY: InjectionKey<SelectionState> = Symbol(\"agentation-selection\")\nexport const AREA_SELECTION_KEY: InjectionKey<AreaSelectionState> = Symbol(\"agentation-area-selection\")\nexport const OVERLAY_KEY: InjectionKey<OverlayState> = Symbol(\"agentation-overlay\")\nexport const SETTINGS_KEY: InjectionKey<SettingsState> = Symbol(\"agentation-settings\")\nexport const I18N_KEY: InjectionKey<I18nState> = Symbol(\"agentation-i18n\")\nexport const FREEZE_KEY: InjectionKey<FreezeState> = Symbol(\"agentation-freeze\")\n","import type { Messages } from \"./types.js\"\n\nexport const en: Messages = {\n toolbar: {\n pause: \"Pause animations (P)\",\n resume: \"Resume animations (P)\",\n pauseAria: \"Pause animations\",\n resumeAria: \"Resume animations\",\n hideMarkers: \"Hide markers (H)\",\n showMarkers: \"Show markers (H)\",\n hideMarkersAria: \"Hide markers\",\n showMarkersAria: \"Show markers\",\n copyMarkdown: \"Copy as Markdown (C)\",\n copyMarkdownAria: \"Copy as Markdown\",\n copyJson: \"Copy as JSON\",\n copyJsonAria: \"Copy as JSON\",\n clearAll: \"Clear all (X)\",\n clearAllAria: \"Clear all annotations\",\n settings: \"Settings\",\n toggleSettingsAria: \"Toggle settings\",\n closeToolbar: \"Close toolbar (Esc)\",\n closeToolbarAria: \"Close toolbar\",\n },\n popover: {\n editPlaceholder: \"Update feedback...\",\n createPlaceholder: \"What should change?\",\n deleteAnnotation: \"Delete annotation\",\n cancel: \"Cancel\",\n save: \"Save\",\n update: \"Update\",\n },\n marker: {\n annotationAria: (n) => `Annotation ${n}`,\n clickToEdit: \"Click to edit\",\n },\n workflow: {\n statusPending: \"Pending\",\n statusAcknowledged: \"Acknowledged\",\n statusResolved: \"Resolved\",\n statusDismissed: \"Dismissed\",\n roleAgent: \"Agent\",\n roleHuman: \"Human\",\n thread: \"Thread\",\n replyCount: (count) => `${count} ${count === 1 ? \"reply\" : \"replies\"}`,\n },\n settings: {\n lightMode: \"Light mode\",\n darkMode: \"Dark mode\",\n switchToLightAria: \"Switch to light mode\",\n switchToDarkAria: \"Switch to dark mode\",\n language: \"Language\",\n outputDetail: \"Output detail\",\n exportFormat: \"Copy format\",\n exportFormatMarkdownAria: \"Use Markdown copy format\",\n exportFormatJsonAria: \"Use JSON copy format\",\n copySettings: \"Copy content settings\",\n copySettingsDescription: \"Only affects clipboard copy. MCP and webhook payloads stay unchanged.\",\n copyPrefix: \"Prefix prompt\",\n copyPrefixDescription: \"Prepended before copied content with a line break.\",\n copyPrefixPlaceholder: \"Hi, help me revise the following\",\n copyExclusions: \"Excluded fields\",\n copyExclusionsDescription: \"Checked fields are removed from copied output when they are present.\",\n copyFieldLabels: {\n projectArea: \"Project area\",\n contextHints: \"Context hints\",\n sourceLocation: \"Source location\",\n component: \"Component\",\n componentHierarchy: \"Component hierarchy\",\n framework: \"Framework / resolver\",\n elementPath: \"Element path\",\n fullDomPath: \"Full DOM path\",\n cssClasses: \"CSS classes\",\n position: \"Position\",\n selectedText: \"Selected text\",\n context: \"Context\",\n computedStyles: \"Computed styles\",\n accessibility: \"Accessibility\",\n nearbyElements: \"Nearby elements\",\n url: \"URL\",\n timestamp: \"Timestamp\",\n viewport: \"Viewport\",\n userAgent: \"User Agent\",\n devicePixelRatio: \"Device pixel ratio\",\n },\n markerColour: \"Marker colour\",\n clearOnCopy: \"Clear on copy\",\n blockPageInteractions: \"Block page interactions\",\n componentSource: \"Component source\",\n manageMcpWebhooks: \"Manage MCP & Webhooks\",\n getStarted: \"Get started\",\n mcpConnection: \"MCP Connection\",\n mcpDescription: \"Connect to an MCP server to let AI agents consume and respond to your annotations in real time.\",\n mcpLearnMore: \"Learn more\",\n mcpStatusConnected: \"Connected\",\n mcpStatusDisconnected: \"Disconnected\",\n webhooks: \"Webhooks\",\n webhooksDescription: \"Automatically send annotations to an external endpoint when created or updated.\",\n webhooksAutoSend: \"Auto-send annotations\",\n webhooksUrlPlaceholder: \"https://example.com/webhook\",\n outputDetailHelp: \"Controls how much metadata is included when exporting annotations.\",\n componentSourceHelp: \"Show the Vue component file path and line number for each selected element.\",\n blockInteractionsHelp: \"Prevent clicks from triggering page navigation or actions while annotating.\",\n getStartedDescription: \"Use one shared Agentation server for all local Vite projects, and scope agent reads with projectFilter when multiple apps share it.\",\n sharedServerTitle: \"Shared server recommendation\",\n sharedServerDescription: \"Point multiple projects at the same API and MCP transport ports. If those ports are already running, the plugin reuses the existing server instead of spawning another copy.\",\n isolationTitle: \"Isolation alternative\",\n isolationDescription: \"If you want strict separation, give each project different API/MCP ports and a distinct projectId. Shared mode is the default and usually simpler.\",\n projectScopeLabel: \"Project scope\",\n apiEndpointLabel: \"Browser sync API\",\n mcpHttpEndpointLabel: \"Streamable HTTP MCP\",\n mcpSseEndpointLabel: \"Legacy SSE MCP\",\n cliCommandLabel: \"CLI server\",\n claudeCommandLabel: \"Claude CLI\",\n cursorEndpointLabel: \"Cursor / HTTP MCP\",\n codexEndpointLabel: \"Codex / generic MCP\",\n webhookEnvLabel: \"Webhook env\",\n webhookDescriptionLong: \"The server reads AGENTATION_WEBHOOK_URL or AGENTATION_WEBHOOKS and forwards annotation events to those endpoints.\",\n copyValueAria: (label) => `Copy ${label}`,\n },\n colors: {\n purple: \"Purple\",\n blue: \"Blue\",\n cyan: \"Cyan\",\n green: \"Green\",\n yellow: \"Yellow\",\n orange: \"Orange\",\n red: \"Red\",\n },\n outputDetail: {\n compact: \"Compact\",\n standard: \"Standard\",\n detailed: \"Detailed\",\n forensic: \"Forensic\",\n },\n selection: {\n areaLabel: (count, names, remaining) =>\n `${count} ${count === 1 ? \"element\" : \"elements\"}: ${names}${remaining > 0 ? ` +${remaining} more` : \"\"}`,\n },\n notifications: {\n sourceUnavailableElement: \"This element could not be mapped to Vue source. Try selecting a nearby component element.\",\n sourceUnavailableArea: \"This selection could not be mapped to Vue source. Try a smaller component area.\",\n remoteSyncUpdated: (count) => `Agent sync updated ${count} annotations`,\n syncFailed: (message) => `Sync failed: ${message}`,\n },\n}\n","import type { Messages } from \"./types.js\"\n\nexport const zhCN: Messages = {\n toolbar: {\n pause: \"暂停动画 (P)\",\n resume: \"恢复动画 (P)\",\n pauseAria: \"暂停动画\",\n resumeAria: \"恢复动画\",\n hideMarkers: \"隐藏标记 (H)\",\n showMarkers: \"显示标记 (H)\",\n hideMarkersAria: \"隐藏标记\",\n showMarkersAria: \"显示标记\",\n copyMarkdown: \"复制为 Markdown (C)\",\n copyMarkdownAria: \"复制为 Markdown\",\n copyJson: \"复制为 JSON\",\n copyJsonAria: \"复制为 JSON\",\n clearAll: \"清除全部 (X)\",\n clearAllAria: \"清除所有批注\",\n settings: \"设置\",\n toggleSettingsAria: \"切换设置面板\",\n closeToolbar: \"关闭工具栏 (Esc)\",\n closeToolbarAria: \"关闭工具栏\",\n },\n popover: {\n editPlaceholder: \"更新反馈...\",\n createPlaceholder: \"需要修改什么?\",\n deleteAnnotation: \"删除批注\",\n cancel: \"取消\",\n save: \"保存\",\n update: \"更新\",\n },\n marker: {\n annotationAria: (n) => `批注 ${n}`,\n clickToEdit: \"点击编辑\",\n },\n workflow: {\n statusPending: \"待处理\",\n statusAcknowledged: \"已接收\",\n statusResolved: \"已解决\",\n statusDismissed: \"已忽略\",\n roleAgent: \"Agent\",\n roleHuman: \"人工\",\n thread: \"线程\",\n replyCount: (count) => `${count} 条回复`,\n },\n settings: {\n lightMode: \"浅色模式\",\n darkMode: \"深色模式\",\n switchToLightAria: \"切换到浅色模式\",\n switchToDarkAria: \"切换到深色模式\",\n language: \"语言\",\n outputDetail: \"输出详情\",\n exportFormat: \"复制格式\",\n exportFormatMarkdownAria: \"使用 Markdown 复制格式\",\n exportFormatJsonAria: \"使用 JSON 复制格式\",\n copySettings: \"复制信息设置\",\n copySettingsDescription: \"仅作用于复制到剪贴板,不影响 MCP / Webhooks 的发送内容。\",\n copyPrefix: \"前缀提示词\",\n copyPrefixDescription: \"复制时会加在最前面,并自动换行。\",\n copyPrefixPlaceholder: \"你好,帮我修改以下\",\n copyExclusions: \"排除项\",\n copyExclusionsDescription: \"勾选后,复制时如果存在这些字段,就自动过滤掉不复制。\",\n copyFieldLabels: {\n projectArea: \"Project area\",\n contextHints: \"Context hints\",\n sourceLocation: \"源码位置\",\n component: \"组件名\",\n componentHierarchy: \"组件层级\",\n framework: \"框架 / 解析器\",\n elementPath: \"元素路径\",\n fullDomPath: \"完整 DOM 路径\",\n cssClasses: \"CSS 类名\",\n position: \"位置信息\",\n selectedText: \"选中文本\",\n context: \"上下文\",\n computedStyles: \"计算样式\",\n accessibility: \"无障碍信息\",\n nearbyElements: \"附近元素\",\n url: \"URL\",\n timestamp: \"时间戳\",\n viewport: \"视口\",\n userAgent: \"User Agent\",\n devicePixelRatio: \"设备像素比\",\n },\n markerColour: \"标记颜色\",\n clearOnCopy: \"复制后清除\",\n blockPageInteractions: \"阻止页面交互\",\n componentSource: \"组件源码\",\n manageMcpWebhooks: \"管理 MCP 与 Webhooks\",\n getStarted: \"快速开始\",\n mcpConnection: \"MCP 连接\",\n mcpDescription: \"连接 MCP 服务器,让 AI 代理实时获取并响应你的批注。\",\n mcpLearnMore: \"了解更多\",\n mcpStatusConnected: \"已连接\",\n mcpStatusDisconnected: \"未连接\",\n webhooks: \"Webhooks\",\n webhooksDescription: \"创建或更新批注时自动发送到外部端点。\",\n webhooksAutoSend: \"自动发送批注\",\n webhooksUrlPlaceholder: \"https://example.com/webhook\",\n outputDetailHelp: \"控制导出批注时包含多少元数据。\",\n componentSourceHelp: \"显示所选元素对应的 Vue 组件文件路径和行号。\",\n blockInteractionsHelp: \"批注期间阻止点击触发页面导航或操作。\",\n getStartedDescription: \"建议让多个本地 Vite 项目共用一个 Agentation 服务,再通过 projectFilter 显式限定 agent 读取范围。\",\n sharedServerTitle: \"共用服务推荐\",\n sharedServerDescription: \"让多个项目指向同一组 API 与 MCP 端口。如果这些端口已经被别的项目启动,插件会直接复用,不再重复拉起一份服务。\",\n isolationTitle: \"隔离方案\",\n isolationDescription: \"如果你需要硬隔离,可以给每个项目配置不同的 API/MCP 端口,并设置独立 projectId。默认仍建议共用服务。\",\n projectScopeLabel: \"项目作用域\",\n apiEndpointLabel: \"浏览器同步 API\",\n mcpHttpEndpointLabel: \"Streamable HTTP MCP\",\n mcpSseEndpointLabel: \"兼容 SSE MCP\",\n cliCommandLabel: \"CLI 启动命令\",\n claudeCommandLabel: \"Claude CLI\",\n cursorEndpointLabel: \"Cursor / HTTP MCP\",\n codexEndpointLabel: \"Codex / 通用 MCP\",\n webhookEnvLabel: \"Webhook 环境变量\",\n webhookDescriptionLong: \"服务端会读取 AGENTATION_WEBHOOK_URL 或 AGENTATION_WEBHOOKS,并把批注事件转发到这些地址。\",\n copyValueAria: (label) => `复制${label}`,\n },\n colors: {\n purple: \"紫色\",\n blue: \"蓝色\",\n cyan: \"青色\",\n green: \"绿色\",\n yellow: \"黄色\",\n orange: \"橙色\",\n red: \"红色\",\n },\n outputDetail: {\n compact: \"精简\",\n standard: \"标准\",\n detailed: \"详细\",\n forensic: \"取证级\",\n },\n selection: {\n areaLabel: (count, names, remaining) =>\n `${count} 个元素:${names}${remaining > 0 ? ` 等另外 ${remaining} 项` : \"\"}`,\n },\n notifications: {\n sourceUnavailableElement: \"无法将此元素映射到 Vue 源码。请尝试选择附近的组件元素。\",\n sourceUnavailableArea: \"无法将此选区映射到 Vue 源码。请尝试缩小选区范围。\",\n remoteSyncUpdated: (count) => `Agent 同步已更新 ${count} 条批注`,\n syncFailed: (message) => `同步失败:${message}`,\n },\n}\n","import { en } from \"./en.js\"\nimport { zhCN } from \"./zh-CN.js\"\nimport type { Locale, Messages } from \"./types.js\"\n\nexport type { Locale, Messages, ColorKey } from \"./types.js\"\n\nexport const SUPPORTED_LOCALES = [\"en\", \"zh-CN\"] as const satisfies readonly Locale[]\nexport const DEFAULT_LOCALE: Locale = \"en\"\n\n/** Self-identifying labels so the user can always find their language. */\nexport const LOCALE_LABELS: Record<Locale, string> = {\n \"en\": \"EN\",\n \"zh-CN\": \"中文\",\n}\n\nconst MESSAGE_CATALOGS: Record<Locale, Messages> = {\n en,\n \"zh-CN\": zhCN,\n}\n\nconst localeSet: ReadonlySet<string> = new Set(SUPPORTED_LOCALES)\n\n/** Type guard: returns `true` when `value` is a supported locale string. */\nexport function isValidLocale(value: unknown): value is Locale {\n return typeof value === \"string\" && localeSet.has(value)\n}\n\n/** Resolve message catalog for a locale; falls back to English silently. */\nexport function resolveMessages(locale?: string): Messages {\n return MESSAGE_CATALOGS[isValidLocale(locale) ? locale : DEFAULT_LOCALE]\n}\n","import { computed, toValue, type MaybeRefOrGetter } from \"vue\"\nimport { DEFAULT_LOCALE, isValidLocale, resolveMessages } from \"../i18n/index.js\"\nimport type { Locale, Messages } from \"../i18n/types.js\"\n\nexport interface I18nState {\n /** Current resolved locale. */\n readonly locale: Locale\n /** Message catalog for the current locale. */\n readonly messages: Messages\n}\n\n/**\n * Creates a reactive i18n state derived from a locale source.\n * Falls back to English when the source value is invalid.\n */\nexport function createI18nState(\n locale: MaybeRefOrGetter<Locale | string | undefined>,\n): I18nState {\n const resolvedLocale = computed<Locale>(() => {\n const value = toValue(locale)\n return isValidLocale(value) ? value : DEFAULT_LOCALE\n })\n\n const messages = computed(() => resolveMessages(resolvedLocale.value))\n\n return {\n get locale() { return resolvedLocale.value },\n get messages() { return messages.value },\n }\n}\n","import type { AnnotationV2 } from \"@liuovo/agentation-vue-core\"\nimport type { BoundingBox } from \"./types.js\"\n\nexport interface ElementLocator {\n selector?: string\n tag?: string\n text?: string\n classes?: string[]\n position?: BoundingBox\n}\n\nexport function buildElementLocator(element: HTMLElement): ElementLocator {\n const rect = element.getBoundingClientRect()\n const classes = Array.from(element.classList)\n .filter(isStableClass)\n .slice(0, 4)\n const text = normalizeText(element.textContent).slice(0, 100)\n\n return {\n selector: generateSelector(element) ?? undefined,\n tag: element.tagName.toLowerCase(),\n text: text || undefined,\n classes: classes.length > 0 ? classes : undefined,\n position: {\n x: rect.left + window.scrollX,\n y: rect.top + window.scrollY,\n width: rect.width,\n height: rect.height,\n },\n }\n}\n\nexport function findAnnotationTarget(annotation: AnnotationV2): HTMLElement | null {\n const metadata = annotation.metadata as {\n isMultiSelect?: boolean\n } | undefined\n\n if (metadata?.isMultiSelect) return null\n\n const locator = getElementLocator(annotation)\n if (!locator) return null\n\n if (locator.selector) {\n const exact = querySelectorDeep(locator.selector)\n if (exact) return exact\n }\n\n const tag = locator.tag\n if (!tag) return null\n\n const candidates = querySelectorAllDeep(tag)\n if (candidates.length === 0) return null\n\n const exactTextMatches = locator.text\n ? candidates.filter((candidate) => normalizeText(candidate.textContent) === locator.text)\n : []\n\n if (exactTextMatches.length === 1) {\n return exactTextMatches[0]\n }\n\n const pool = exactTextMatches.length > 0 ? exactTextMatches : candidates\n const ranked = pool\n .map((candidate) => ({\n candidate,\n score: scoreCandidate(candidate, locator),\n }))\n .sort((a, b) => b.score - a.score)\n\n if (ranked.length === 0 || ranked[0].score <= 0) {\n return null\n }\n\n return ranked[0].candidate\n}\n\nfunction getElementLocator(annotation: AnnotationV2): ElementLocator | null {\n const metadata = annotation.metadata as {\n elementLocator?: unknown\n } | undefined\n\n return parseElementLocator(metadata?.elementLocator)\n}\n\nfunction parseElementLocator(value: unknown): ElementLocator | null {\n if (!value || typeof value !== \"object\") return null\n\n const locator = value as Partial<ElementLocator>\n const parsed: ElementLocator = {}\n\n if (typeof locator.selector === \"string\" && locator.selector.trim()) {\n parsed.selector = locator.selector\n }\n if (typeof locator.tag === \"string\" && locator.tag.trim()) {\n parsed.tag = locator.tag.toLowerCase()\n }\n if (typeof locator.text === \"string\" && locator.text.trim()) {\n parsed.text = normalizeText(locator.text).slice(0, 100)\n }\n if (Array.isArray(locator.classes)) {\n const classes = locator.classes.filter((item): item is string => typeof item === \"string\" && item.trim().length > 0)\n if (classes.length > 0) {\n parsed.classes = classes\n }\n }\n if (isBoundingBox(locator.position)) {\n parsed.position = locator.position\n }\n\n return Object.keys(parsed).length > 0 ? parsed : null\n}\n\nfunction generateSelector(element: HTMLElement): string | null {\n if (element.id) {\n return `#${CSS.escape(element.id)}`\n }\n\n for (const attr of [\"data-testid\", \"data-test\", \"aria-label\", \"title\", \"name\", \"role\"]) {\n const value = element.getAttribute(attr)\n if (!value) continue\n const selector = `${element.tagName.toLowerCase()}[${attr}=\"${CSS.escape(value)}\"]`\n if (isUniqueSelector(selector)) return selector\n }\n\n const stableClasses = Array.from(element.classList)\n .filter(isStableClass)\n .slice(0, 4)\n\n if (stableClasses.length > 0) {\n const selector = `${element.tagName.toLowerCase()}.${stableClasses.map((item) => CSS.escape(item)).join(\".\")}`\n if (isUniqueSelector(selector)) return selector\n }\n\n return buildPathSelector(element)\n}\n\nfunction buildPathSelector(element: HTMLElement): string | null {\n const segments: string[] = []\n let current: HTMLElement | null = element\n let depth = 0\n\n while (current && current.tagName.toLowerCase() !== \"body\" && depth < 5) {\n const tag = current.tagName.toLowerCase()\n let segment = tag\n\n if (current.id) {\n segment = `${tag}#${CSS.escape(current.id)}`\n segments.unshift(segment)\n const selector = segments.join(\" > \")\n return isUniqueSelector(selector) ? selector : null\n }\n\n const stableClasses = Array.from(current.classList)\n .filter(isStableClass)\n .slice(0, 2)\n\n if (stableClasses.length > 0) {\n segment = `${tag}.${stableClasses.map((item) => CSS.escape(item)).join(\".\")}`\n } else if (current.parentElement) {\n const siblings = Array.from(current.parentElement.children)\n .filter((child) => child.tagName.toLowerCase() === tag)\n if (siblings.length > 1) {\n segment = `${tag}:nth-of-type(${siblings.indexOf(current) + 1})`\n }\n }\n\n segments.unshift(segment)\n const selector = segments.join(\" > \")\n if (isUniqueSelector(selector)) return selector\n\n current = current.parentElement\n depth++\n }\n\n const fallback = segments.join(\" > \")\n return fallback && isUniqueSelector(fallback) ? fallback : null\n}\n\nfunction isUniqueSelector(selector: string): boolean {\n try {\n return querySelectorAllDeep(selector).length === 1\n } catch {\n return false\n }\n}\n\nfunction querySelectorDeep(selector: string): HTMLElement | null {\n try {\n for (const root of getSearchRoots()) {\n const found = root.querySelector(selector)\n if (found instanceof HTMLElement && !isOwnElement(found)) return found\n }\n } catch {\n return null\n }\n\n return null\n}\n\nfunction querySelectorAllDeep(selector: string): HTMLElement[] {\n const results: HTMLElement[] = []\n\n for (const root of getSearchRoots()) {\n try {\n root.querySelectorAll(selector).forEach((node) => {\n if (node instanceof HTMLElement && !isOwnElement(node)) {\n results.push(node)\n }\n })\n } catch {\n // Ignore invalid selectors.\n }\n }\n\n return results\n}\n\nfunction getSearchRoots(): Array<Document | ShadowRoot> {\n const roots: Array<Document | ShadowRoot> = [document]\n const queue: Element[] = Array.from(document.children)\n\n while (queue.length > 0) {\n const current = queue.shift()\n if (!current) continue\n\n if (current instanceof HTMLElement && current.shadowRoot) {\n roots.push(current.shadowRoot)\n queue.push(...Array.from(current.shadowRoot.children))\n }\n\n queue.push(...Array.from(current.children))\n }\n\n return roots\n}\n\nfunction scoreCandidate(candidate: HTMLElement, locator: ElementLocator): number {\n let score = 0\n\n if (locator.text) {\n const candidateText = normalizeText(candidate.textContent)\n if (candidateText === locator.text) {\n score += 12\n } else if (candidateText.includes(locator.text) || locator.text.includes(candidateText)) {\n score += 4\n }\n }\n\n if (locator.classes?.length) {\n const classList = new Set(Array.from(candidate.classList))\n for (const cls of locator.classes) {\n if (classList.has(cls)) {\n score += 3\n }\n }\n }\n\n if (locator.position) {\n const rect = candidate.getBoundingClientRect()\n const dx = rect.left + window.scrollX - locator.position.x\n const dy = rect.top + window.scrollY - locator.position.y\n const distance = Math.sqrt(dx * dx + dy * dy)\n\n if (distance <= 24) {\n score += 10\n } else if (distance <= 80) {\n score += 6\n } else if (distance <= 160) {\n score += 2\n } else {\n score -= Math.min(distance / 100, 8)\n }\n }\n\n return score\n}\n\nfunction normalizeText(value: string | null | undefined): string {\n return (value ?? \"\").replace(/\\s+/g, \" \").trim()\n}\n\nfunction isOwnElement(element: HTMLElement): boolean {\n return Boolean(element.closest(\"[data-agentation-root], [data-annotation-marker]\"))\n}\n\nfunction isStableClass(value: string): boolean {\n return ![\n /^hover:/,\n /^focus:/,\n /^active:/,\n /^disabled:/,\n /^transition/,\n /^duration/,\n /^ease/,\n /^[a-z0-9]{8,}$/,\n /--/,\n /\\[.*\\]/,\n ].some((pattern) => pattern.test(value))\n}\n\nfunction isBoundingBox(value: unknown): value is BoundingBox {\n if (!value || typeof value !== \"object\") return false\n\n const box = value as Partial<BoundingBox>\n return isFiniteNumber(box.x)\n && isFiniteNumber(box.y)\n && isFiniteNumber(box.width)\n && isFiniteNumber(box.height)\n}\n\nfunction isFiniteNumber(value: unknown): value is number {\n return typeof value === \"number\" && Number.isFinite(value)\n}\n","import {\n formatToJSON,\n formatToMarkdown,\n getAccessibilityInfo,\n getElementClasses,\n getElementPath,\n getForensicComputedStyles,\n getFullElementPath,\n getNearbyElements,\n getNearbyText,\n identifyElement,\n} from \"@liuovo/agentation-vue-core\"\nimport type {\n AnnotationExportDocument,\n AnnotationV2,\n ExportPageContext,\n} from \"@liuovo/agentation-vue-core\"\nimport { reactive } from \"vue\"\nimport { buildElementLocator } from \"../annotation-target.js\"\nimport type { BoundingBox, RuntimeBridge, SelectionSnapshot } from \"../types.js\"\n\n// ---------------------------------------------------------------------------\n// Store interface\n// ---------------------------------------------------------------------------\n\nexport interface AnnotationsStore {\n /** Reactive annotation list — components can read directly. */\n readonly annotations: readonly AnnotationV2[]\n /** Whether annotation mode is enabled. */\n enabled: boolean\n\n /** Load persisted annotations from storage into state. */\n hydrate(): void\n /** Create & persist a new annotation from a comment + selection snapshot. */\n saveAnnotation(comment: string, snapshot: SelectionSnapshot): AnnotationV2\n /** Update the comment of an existing annotation by ID. */\n updateAnnotation(id: string, comment: string): void\n /** Remove an annotation by ID and persist the change. */\n removeAnnotation(id: string): void\n /** Remove all annotations and clear storage. */\n clearAll(): void\n /** Export all annotations as a structured JSON document. */\n exportJSON(): AnnotationExportDocument\n /** Export all annotations as a Markdown string. */\n exportMarkdown(): string\n}\n\n// ---------------------------------------------------------------------------\n// Factory\n// ---------------------------------------------------------------------------\n\n/**\n * Creates the singleton annotations store.\n *\n * Called once during app bootstrap; OverlayRoot provides it\n * to the component tree via `provide()`.\n */\nexport function createAnnotationsStore(bridge: RuntimeBridge): AnnotationsStore {\n const state = reactive({\n annotations: [] as AnnotationV2[],\n enabled: true,\n })\n\n // -- Hydrate ---------------------------------------------------------------\n\n function hydrate(): void {\n try {\n const loaded = bridge.storage.load()\n state.annotations.splice(0, state.annotations.length, ...loaded)\n } catch {\n console.warn(\"[agentation] Failed to hydrate annotations from storage\")\n }\n }\n\n // -- CRUD ------------------------------------------------------------------\n\n function saveAnnotation(comment: string, snapshot: SelectionSnapshot): AnnotationV2 {\n const trimmed = comment.trim()\n if (!trimmed) {\n throw new Error(\"[agentation] Annotation comment must not be empty\")\n }\n\n const annotation = buildAnnotation(trimmed, snapshot)\n state.annotations.push(annotation)\n persist()\n bridge.sync?.enqueueUpsert(annotation)\n return annotation\n }\n\n function removeAnnotation(id: string): void {\n const idx = state.annotations.findIndex((a) => a.id === id)\n if (idx < 0) return\n const removed = state.annotations[idx]\n state.annotations.splice(idx, 1)\n persist()\n bridge.sync?.enqueueDelete(removed)\n }\n\n function updateAnnotation(id: string, comment: string): void {\n const trimmed = comment.trim()\n if (!trimmed) return\n\n const idx = state.annotations.findIndex((a) => a.id === id)\n if (idx < 0) return\n\n const updated = { ...state.annotations[idx], comment: trimmed }\n state.annotations.splice(idx, 1, updated)\n persist()\n bridge.sync?.enqueueUpdate(updated)\n }\n\n function clearAll(): void {\n const toDelete = [...state.annotations]\n state.annotations.splice(0, state.annotations.length)\n bridge.storage.clear()\n for (const annotation of toDelete) {\n bridge.sync?.enqueueDelete(annotation)\n }\n }\n\n // -- Export ----------------------------------------------------------------\n\n function exportJSON(): AnnotationExportDocument {\n return formatToJSON([...state.annotations], {\n detailLevel: bridge.options.outputDetail,\n page: buildPageContext(),\n })\n }\n\n function exportMarkdown(): string {\n return formatToMarkdown([...state.annotations], {\n detailLevel: bridge.options.outputDetail,\n page: buildPageContext(),\n })\n }\n\n // -- Persistence -----------------------------------------------------------\n\n function persist(): void {\n try {\n if (state.annotations.length === 0) {\n bridge.storage.clear()\n } else {\n bridge.storage.save([...state.annotations])\n }\n } catch {\n console.warn(\"[agentation] Failed to persist annotations\")\n }\n }\n\n // -- Public store object ---------------------------------------------------\n\n return {\n get annotations() {\n return state.annotations\n },\n get enabled() {\n return state.enabled\n },\n set enabled(value: boolean) {\n state.enabled = value\n },\n hydrate,\n saveAnnotation,\n updateAnnotation,\n removeAnnotation,\n clearAll,\n exportJSON,\n exportMarkdown,\n }\n}\n\n// ---------------------------------------------------------------------------\n// Annotation builder\n// ---------------------------------------------------------------------------\n\nfunction buildAnnotation(comment: string, snapshot: SelectionSnapshot): AnnotationV2 {\n const { element, source, elementName, selectedText, isMultiSelect } = snapshot\n const identified = identifyElement(element)\n\n return {\n id: generateId(),\n schemaVersion: 1,\n timestamp: new Date().toISOString(),\n url: window.location.href,\n elementSelector: isMultiSelect ? elementName : (identified.name || elementName),\n elementText: selectedText,\n comment,\n source: { ...source },\n metadata: buildMetadata(snapshot),\n }\n}\n\nfunction buildMetadata(snapshot: SelectionSnapshot): Record<string, unknown> {\n const {\n element,\n rect,\n elementPath,\n source,\n selectedText,\n isMultiSelect = false,\n multiSelectElements,\n elementBoundingBoxes,\n } = snapshot\n\n const fixed = !isMultiSelect && isFixedPosition(element)\n\n // For multi-select, try to get live bounding boxes from the DOM elements\n const liveBoxes = multiSelectElements\n ?.filter((el) => document.contains(el))\n .map((el) => {\n const elRect = el.getBoundingClientRect()\n return elRect.width > 0 && elRect.height > 0\n ? toDocumentBox(elRect, isFixedPosition(el))\n : null\n })\n .filter((box): box is BoundingBox => box !== null)\n\n const selectionBoxes = liveBoxes?.length ? liveBoxes : elementBoundingBoxes\n const boundingBox = toDocumentBox(rect, isMultiSelect ? false : fixed)\n\n const raw: Record<string, unknown> = {\n elementPath: elementPath || getElementPath(element) || undefined,\n fullPath: getFullElementPath(element) || undefined,\n cssClasses: getElementClasses(element) || undefined,\n boundingBox,\n elementLocator: isMultiSelect ? undefined : buildElementLocator(element),\n nearbyText: getNearbyText(element) || undefined,\n nearbyElements: getNearbyElements(element) || undefined,\n computedStyles: getForensicComputedStyles(element) || undefined,\n accessibility: getAccessibilityInfo(element) || undefined,\n isMultiSelect: isMultiSelect || undefined,\n elementBoundingBoxes: selectionBoxes?.length ? selectionBoxes : undefined,\n isFixed: isMultiSelect ? undefined : fixed,\n project_area: buildProjectArea(snapshot),\n context_hints: buildContextHints({\n element,\n source,\n selectedText,\n nearbyText: getNearbyText(element) || undefined,\n isMultiSelect,\n }),\n }\n\n // Strip undefined entries for clean JSON\n return Object.fromEntries(\n Object.entries(raw).filter(([, v]) => v !== undefined),\n )\n}\n\nfunction buildProjectArea(snapshot: SelectionSnapshot): string | undefined {\n const route = window.location.pathname || \"/\"\n const hierarchy = snapshot.source.componentHierarchy || snapshot.source.componentName\n const landmark = getLandmarkLabel(snapshot.element)\n\n const parts = [route, hierarchy, landmark].filter(Boolean)\n return parts.length > 0 ? parts.join(\" :: \") : undefined\n}\n\nfunction buildContextHints(input: {\n element: HTMLElement\n source: SelectionSnapshot[\"source\"]\n selectedText?: string\n nearbyText?: string\n isMultiSelect?: boolean\n}): string[] | undefined {\n const hints = new Set<string>()\n const { element, source, selectedText, nearbyText, isMultiSelect } = input\n\n const pushHint = (label: string, value: string | null | undefined) => {\n const trimmed = value?.trim()\n if (!trimmed) return\n hints.add(`${label}: ${trimmed.slice(0, 120)}`)\n }\n\n pushHint(\"route\", window.location.pathname || \"/\")\n pushHint(\"component\", source.componentName)\n pushHint(\"componentHierarchy\", source.componentHierarchy)\n pushHint(\"framework\", source.framework)\n pushHint(\"selectedText\", selectedText)\n pushHint(\"nearbyText\", nearbyText)\n pushHint(\"heading\", findClosestHeadingText(element))\n pushHint(\"landmark\", getLandmarkLabel(element))\n pushHint(\"role\", element.getAttribute(\"role\"))\n pushHint(\"ariaLabel\", element.getAttribute(\"aria-label\"))\n pushHint(\"name\", element.getAttribute(\"name\"))\n pushHint(\"placeholder\", element.getAttribute(\"placeholder\"))\n pushHint(\"title\", element.getAttribute(\"title\"))\n pushHint(\"testId\", element.getAttribute(\"data-testid\") || element.getAttribute(\"data-test\"))\n pushHint(\"id\", element.id || undefined)\n pushHint(\"multiSelect\", isMultiSelect ? \"true\" : undefined)\n\n return hints.size > 0 ? [...hints].slice(0, 8) : undefined\n}\n\nfunction toDocumentBox(rect: DOMRectReadOnly, isFixed: boolean): BoundingBox {\n return {\n x: isFixed ? rect.left : rect.left + window.scrollX,\n y: isFixed ? rect.top : rect.top + window.scrollY,\n width: rect.width,\n height: rect.height,\n }\n}\n\n// ---------------------------------------------------------------------------\n// Helpers\n// ---------------------------------------------------------------------------\n\nfunction buildPageContext(): ExportPageContext {\n return {\n pathname: window.location.pathname,\n viewport: { width: window.innerWidth, height: window.innerHeight },\n url: window.location.href,\n userAgent: navigator.userAgent,\n timestamp: new Date().toISOString(),\n devicePixelRatio: window.devicePixelRatio,\n }\n}\n\nfunction generateId(): string {\n if (typeof crypto !== \"undefined\" && typeof crypto.randomUUID === \"function\") {\n return crypto.randomUUID()\n }\n return `${Date.now()}-${Math.random().toString(36).slice(2, 8)}`\n}\n\nfunction findClosestHeadingText(element: HTMLElement): string | undefined {\n const heading = element.closest(\"section, article, main, aside, form, dialog\")\n ?.querySelector<HTMLElement>(\"h1, h2, h3, h4, h5, h6\")\n ?? element.closest<HTMLElement>(\"label\")\n\n return heading?.innerText.trim() || undefined\n}\n\nfunction getLandmarkLabel(element: HTMLElement): string | undefined {\n const landmark = element.closest<HTMLElement>(\n \"[role], main, header, nav, aside, footer, section, article, form, dialog\",\n )\n if (!landmark) return undefined\n\n const role = landmark.getAttribute(\"role\") || landmark.tagName.toLowerCase()\n const label = landmark.getAttribute(\"aria-label\")\n || landmark.getAttribute(\"data-testid\")\n || landmark.id\n\n return label ? `${role}:${label}` : role\n}\n\nfunction isFixedPosition(element: HTMLElement): boolean {\n let current: HTMLElement | null = element\n while (current && current !== document.body) {\n const position = window.getComputedStyle(current).position\n if (position === \"fixed\" || position === \"sticky\") return true\n current = current.parentElement\n }\n return false\n}\n","import { reactive } from \"vue\"\nimport type { HoverSnapshot, SelectionSnapshot } from \"../types.js\"\n\n// ---------------------------------------------------------------------------\n// Selection state — tracks hover, click-select, and drag-select interactions\n// ---------------------------------------------------------------------------\n\nexport interface SelectionState {\n readonly hovered: HoverSnapshot | null\n readonly selected: SelectionSnapshot | null\n setHovered(snapshot: HoverSnapshot): void\n clearHovered(): void\n select(snapshot: SelectionSnapshot): void\n clearSelection(): void\n}\n\n/**\n * Creates a singleton selection state manager.\n *\n * Called once by OverlayRoot during setup; runtime event listeners\n * drive state via `setHovered()` / `select()`.\n */\nexport function createSelectionState(): SelectionState {\n const state = reactive({\n hovered: null as HoverSnapshot | null,\n selected: null as SelectionSnapshot | null,\n })\n\n return {\n get hovered() {\n return state.hovered\n },\n get selected() {\n return state.selected\n },\n\n setHovered(snapshot: HoverSnapshot) {\n // Suppress hover updates while an element is selected\n if (state.selected) return\n state.hovered = snapshot\n },\n\n clearHovered() {\n state.hovered = null\n },\n\n select(snapshot: SelectionSnapshot) {\n state.selected = snapshot\n state.hovered = null\n },\n\n clearSelection() {\n state.selected = null\n },\n }\n}\n","import { reactive } from \"vue\"\nimport type { AreaSelectionMatch, AreaSelectionRect } from \"../types.js\"\n\n// ---------------------------------------------------------------------------\n// Area selection state — tracks drag-to-select rectangle + matched elements\n// ---------------------------------------------------------------------------\n\nexport interface AreaSelectionState {\n readonly active: boolean\n readonly rect: AreaSelectionRect | null\n readonly matched: readonly AreaSelectionMatch[]\n start(x: number, y: number): void\n update(x: number, y: number): void\n setMatched(matches: AreaSelectionMatch[]): void\n clear(): void\n}\n\n/**\n * Creates a singleton area-selection state manager.\n *\n * Activated when the user drags on the page (pointerdown → pointermove).\n * The rectangle and matched elements are updated in real time by the\n * runtime bootstrap layer; the Vue DragSelectionLayer reads them reactively.\n */\nexport function createAreaSelectionState(): AreaSelectionState {\n const state = reactive({\n active: false,\n origin: null as { x: number; y: number } | null,\n rect: null as AreaSelectionRect | null,\n matched: [] as AreaSelectionMatch[],\n })\n\n return {\n get active() {\n return state.active\n },\n get rect() {\n return state.rect\n },\n get matched() {\n return state.matched\n },\n\n start(x: number, y: number) {\n state.active = true\n state.origin = { x, y }\n state.rect = normalizeRect(x, y, x, y)\n state.matched.splice(0, state.matched.length)\n },\n\n update(x: number, y: number) {\n if (!state.origin) return\n state.rect = normalizeRect(state.origin.x, state.origin.y, x, y)\n },\n\n setMatched(matches: AreaSelectionMatch[]) {\n state.matched.splice(0, state.matched.length, ...matches)\n },\n\n clear() {\n state.active = false\n state.origin = null\n state.rect = null\n state.matched.splice(0, state.matched.length)\n },\n }\n}\n\n// ---------------------------------------------------------------------------\n// Helpers\n// ---------------------------------------------------------------------------\n\nfunction normalizeRect(\n startX: number,\n startY: number,\n endX: number,\n endY: number,\n): AreaSelectionRect {\n const left = Math.min(startX, endX)\n const top = Math.min(startY, endY)\n const right = Math.max(startX, endX)\n const bottom = Math.max(startY, endY)\n\n return { left, top, right, bottom, width: right - left, height: bottom - top }\n}\n","import { computed, reactive } from \"vue\"\nimport type { AnnotationV2 } from \"@liuovo/agentation-vue-core\"\nimport type { SelectionState } from \"./useSelection.js\"\n\n// ---------------------------------------------------------------------------\n// Overlay state — manages popover visibility & position\n// ---------------------------------------------------------------------------\n\nconst POPOVER_OFFSET = 12\nconst POPOVER_MARGIN = 12\nconst POPOVER_WIDTH = 280\nconst POPOVER_HEIGHT = 260\n\nexport interface OverlayPosition {\n top: number\n left: number\n}\n\nexport interface OverlayState {\n readonly popoverVisible: boolean\n readonly popoverPosition: OverlayPosition | null\n /** The annotation currently being edited, or null for create mode. */\n readonly editingAnnotation: AnnotationV2 | null\n /** Incremented when a visible popover should replay its attention animation. */\n readonly shakeTick?: number\n showPopover(): void\n hidePopover(): void\n /** Open the popover in edit mode, anchored to the given rect. */\n showEditPopover(annotation: AnnotationV2, anchorRect: DOMRectReadOnly): void\n}\n\n/**\n * Creates overlay state driven by the selection state.\n *\n * The popover becomes visible when `showPopover()` is called\n * (typically right after `select()`), and auto-positions itself\n * relative to the selected element's bounding rect.\n */\nexport function createOverlayState(selection: SelectionState): OverlayState {\n const state = reactive({\n visible: false,\n editingAnnotation: null as AnnotationV2 | null,\n editAnchorRect: null as DOMRectReadOnly | null,\n shakeTick: 0,\n })\n\n const popoverVisible = computed(\n () => state.visible && (selection.selected !== null || state.editingAnnotation !== null),\n )\n\n const popoverPosition = computed<OverlayPosition | null>(() => {\n if (!popoverVisible.value) return null\n\n // Edit mode: use the anchor rect from the marker\n if (state.editingAnnotation && state.editAnchorRect) {\n return computePopoverPosition(state.editAnchorRect)\n }\n\n // Create mode: use the selected element's rect\n if (selection.selected) {\n return computePopoverPosition(selection.selected.rect)\n }\n\n return null\n })\n\n return {\n get popoverVisible() {\n return popoverVisible.value\n },\n get popoverPosition() {\n return popoverPosition.value\n },\n get editingAnnotation() {\n return state.editingAnnotation\n },\n get shakeTick() {\n return state.shakeTick\n },\n\n showPopover() {\n if (!selection.selected) return\n if (state.visible) {\n state.shakeTick += 1\n }\n state.editingAnnotation = null\n state.editAnchorRect = null\n state.visible = true\n },\n\n hidePopover() {\n state.visible = false\n state.editingAnnotation = null\n state.editAnchorRect = null\n },\n\n showEditPopover(annotation: AnnotationV2, anchorRect: DOMRectReadOnly) {\n if (state.visible) {\n state.shakeTick += 1\n }\n state.editingAnnotation = annotation\n state.editAnchorRect = anchorRect\n state.visible = true\n },\n }\n}\n\n// ---------------------------------------------------------------------------\n// Position computation\n// ---------------------------------------------------------------------------\n\nfunction computePopoverPosition(rect: DOMRectReadOnly): OverlayPosition {\n const vw = typeof window !== \"undefined\" ? window.innerWidth : 1024\n const vh = typeof window !== \"undefined\" ? window.innerHeight : 768\n\n // Prefer below the element\n const preferredTop = rect.bottom + POPOVER_OFFSET\n const fallbackTop = Math.max(POPOVER_MARGIN, rect.top - POPOVER_HEIGHT - POPOVER_OFFSET)\n const top = preferredTop + POPOVER_HEIGHT <= vh - POPOVER_MARGIN\n ? preferredTop\n : fallbackTop\n\n // Center horizontally, clamped to viewport\n const maxLeft = Math.max(POPOVER_MARGIN, vw - POPOVER_WIDTH - POPOVER_MARGIN)\n const centeredLeft = rect.left + rect.width / 2 - POPOVER_WIDTH / 2\n const left = Math.min(Math.max(centeredLeft, POPOVER_MARGIN), maxLeft)\n\n return { top, left }\n}\n","import type { ExportExcludeField } from \"@liuovo/agentation-vue-core\"\n\nexport const COPY_EXCLUDE_FIELDS = [\n \"projectArea\",\n \"contextHints\",\n \"sourceLocation\",\n \"component\",\n \"componentHierarchy\",\n \"framework\",\n \"elementPath\",\n \"fullDomPath\",\n \"cssClasses\",\n \"position\",\n \"selectedText\",\n \"context\",\n \"computedStyles\",\n \"accessibility\",\n \"nearbyElements\",\n \"url\",\n \"timestamp\",\n \"viewport\",\n \"userAgent\",\n \"devicePixelRatio\",\n] as const satisfies readonly ExportExcludeField[]\n","import { reactive, watch } from \"vue\"\nimport type { ExportExcludeField, OutputDetailLevel } from \"@liuovo/agentation-vue-core\"\nimport { DEFAULT_LOCALE, isValidLocale } from \"../i18n/index.js\"\nimport type { ColorKey, Locale } from \"../i18n/types.js\"\nimport { COPY_EXCLUDE_FIELDS } from \"../copy-fields.js\"\n\n// ---------------------------------------------------------------------------\n// Settings state — persistent user preferences\n// ---------------------------------------------------------------------------\n\nconst STORAGE_KEY = \"agentation-vue-settings\"\n\nexport const COLOR_OPTIONS = [\n { key: \"purple\" as const, value: \"#AF52DE\" },\n { key: \"blue\" as const, value: \"#3c82f7\" },\n { key: \"cyan\" as const, value: \"#5AC8FA\" },\n { key: \"green\" as const, value: \"#34C759\" },\n { key: \"yellow\" as const, value: \"#FFD60A\" },\n { key: \"orange\" as const, value: \"#FF9500\" },\n { key: \"red\" as const, value: \"#FF3B30\" },\n] as const satisfies ReadonlyArray<{ key: ColorKey; value: string }>\n\nexport const DEFAULT_ANNOTATION_COLOR = \"#3c82f7\"\n\nexport type CopyFormat = \"json\" | \"markdown\"\n\nexport interface SettingsState {\n /** Level of detail in export output. */\n outputDetail: OutputDetailLevel\n /** Whether dark mode is active. */\n darkMode: boolean\n /** Whether annotation mode is enabled on load. */\n enabled: boolean\n /** Whether component source resolution is shown. */\n componentSourceEnabled: boolean\n /** Accent colour for annotation markers. */\n annotationColor: string\n /** Whether annotation markers are visible. */\n showMarkers: boolean\n /** Preferred export format for copy actions. */\n copyFormat: CopyFormat\n /** Prompt prefix prepended before clipboard output. */\n copyPrefix: string\n /** Export detail fields to remove from clipboard output. */\n copyExcludeFields: ExportExcludeField[]\n /** Whether to clear annotations after a successful copy. */\n autoClearAfterCopy: boolean\n /** Whether page interactions are blocked while annotating. */\n blockInteractions: boolean\n /** Current UI locale. */\n locale: Locale\n /** Webhook endpoint URL. */\n webhookUrl: string\n /** Whether webhooks auto-send is enabled. */\n webhooksEnabled: boolean\n\n /** Toggle between dark and light mode. */\n toggleDarkMode(): void\n}\n\ninterface PersistedSettings {\n outputDetail?: OutputDetailLevel\n darkMode?: boolean\n enabled?: boolean\n componentSourceEnabled?: boolean\n annotationColor?: string\n showMarkers?: boolean\n copyFormat?: CopyFormat\n copyPrefix?: string\n copyExcludeFields?: ExportExcludeField[]\n autoClearAfterCopy?: boolean\n blockInteractions?: boolean\n locale?: Locale\n webhookUrl?: string\n webhooksEnabled?: boolean\n}\n\n/**\n * Creates the settings state with layered priority:\n * plugin config < localStorage < runtime toggle\n */\nexport function createSettingsState(defaults?: Partial<PersistedSettings>): SettingsState {\n const persisted = loadSettings()\n\n const state = reactive({\n outputDetail: persisted.outputDetail ?? defaults?.outputDetail ?? \"standard\",\n darkMode: persisted.darkMode ?? defaults?.darkMode ?? true,\n enabled: persisted.enabled ?? defaults?.enabled ?? true,\n componentSourceEnabled: persisted.componentSourceEnabled ?? defaults?.componentSourceEnabled ?? true,\n annotationColor: persisted.annotationColor ?? defaults?.annotationColor ?? DEFAULT_ANNOTATION_COLOR,\n showMarkers: persisted.showMarkers ?? defaults?.showMarkers ?? true,\n copyFormat: persisted.copyFormat ?? defaults?.copyFormat ?? \"markdown\",\n copyPrefix: persisted.copyPrefix ?? defaults?.copyPrefix ?? \"\",\n copyExcludeFields: normalizeCopyExcludeFields(persisted.copyExcludeFields)\n ?? normalizeCopyExcludeFields(defaults?.copyExcludeFields)\n ?? [],\n autoClearAfterCopy: persisted.autoClearAfterCopy ?? defaults?.autoClearAfterCopy ?? false,\n blockInteractions: persisted.blockInteractions ?? defaults?.blockInteractions ?? true,\n locale: normalizeLocale(persisted.locale) ?? normalizeLocale(defaults?.locale) ?? DEFAULT_LOCALE,\n webhookUrl: persisted.webhookUrl ?? defaults?.webhookUrl ?? \"\",\n webhooksEnabled: persisted.webhooksEnabled ?? defaults?.webhooksEnabled ?? false,\n })\n\n // Persist on every change\n watch(\n () => ({\n outputDetail: state.outputDetail,\n darkMode: state.darkMode,\n enabled: state.enabled,\n componentSourceEnabled: state.componentSourceEnabled,\n annotationColor: state.annotationColor,\n showMarkers: state.showMarkers,\n copyFormat: state.copyFormat,\n copyPrefix: state.copyPrefix,\n copyExcludeFields: state.copyExcludeFields,\n autoClearAfterCopy: state.autoClearAfterCopy,\n blockInteractions: state.blockInteractions,\n locale: state.locale,\n webhookUrl: state.webhookUrl,\n webhooksEnabled: state.webhooksEnabled,\n }),\n (settings) => saveSettings(settings),\n { deep: true },\n )\n\n return {\n get outputDetail() { return state.outputDetail },\n set outputDetail(v: OutputDetailLevel) { state.outputDetail = v },\n get darkMode() { return state.darkMode },\n set darkMode(v: boolean) { state.darkMode = v },\n get enabled() { return state.enabled },\n set enabled(v: boolean) { state.enabled = v },\n get componentSourceEnabled() { return state.componentSourceEnabled },\n set componentSourceEnabled(v: boolean) { state.componentSourceEnabled = v },\n get annotationColor() { return state.annotationColor },\n set annotationColor(v: string) { state.annotationColor = v },\n get showMarkers() { return state.showMarkers },\n set showMarkers(v: boolean) { state.showMarkers = v },\n get copyFormat() { return state.copyFormat },\n set copyFormat(v: CopyFormat) { state.copyFormat = v },\n get copyPrefix() { return state.copyPrefix },\n set copyPrefix(v: string) { state.copyPrefix = v },\n get copyExcludeFields() { return state.copyExcludeFields },\n set copyExcludeFields(v: ExportExcludeField[]) { state.copyExcludeFields = normalizeCopyExcludeFields(v) ?? [] },\n get autoClearAfterCopy() { return state.autoClearAfterCopy },\n set autoClearAfterCopy(v: boolean) { state.autoClearAfterCopy = v },\n get blockInteractions() { return state.blockInteractions },\n set blockInteractions(v: boolean) { state.blockInteractions = v },\n get locale() { return state.locale },\n set locale(v: Locale) { state.locale = normalizeLocale(v) ?? DEFAULT_LOCALE },\n get webhookUrl() { return state.webhookUrl },\n set webhookUrl(v: string) { state.webhookUrl = v },\n get webhooksEnabled() { return state.webhooksEnabled },\n set webhooksEnabled(v: boolean) { state.webhooksEnabled = v },\n\n toggleDarkMode() {\n state.darkMode = !state.darkMode\n },\n }\n}\n\n// ---------------------------------------------------------------------------\n// localStorage helpers\n// ---------------------------------------------------------------------------\n\nfunction normalizeLocale(value: unknown): Locale | undefined {\n return isValidLocale(value) ? value : undefined\n}\n\nfunction normalizeCopyExcludeFields(value: unknown): ExportExcludeField[] | undefined {\n if (!Array.isArray(value)) return undefined\n\n const allowed = new Set<ExportExcludeField>(COPY_EXCLUDE_FIELDS)\n return [...new Set(\n value.filter((field): field is ExportExcludeField => allowed.has(field as ExportExcludeField)),\n )]\n}\n\nfunction loadSettings(): PersistedSettings {\n if (typeof window === \"undefined\") return {}\n try {\n const raw = window.localStorage.getItem(STORAGE_KEY)\n if (!raw) return {}\n const parsed = JSON.parse(raw) as PersistedSettings & { locale?: unknown }\n return {\n ...parsed,\n locale: normalizeLocale(parsed.locale),\n copyExcludeFields: normalizeCopyExcludeFields(parsed.copyExcludeFields) ?? [],\n }\n } catch {\n return {}\n }\n}\n\nfunction saveSettings(settings: PersistedSettings): void {\n if (typeof window === \"undefined\") return\n try {\n window.localStorage.setItem(STORAGE_KEY, JSON.stringify(settings))\n } catch {\n // silent — localStorage may be full or disabled\n }\n}\n","// =============================================================================\n// Freeze Animations\n// =============================================================================\n//\n// Pauses CSS animations/transitions, WAAPI animations, and videos.\n//\n// We intentionally do NOT monkey-patch timer APIs or requestAnimationFrame.\n// Global timer/rAF patching also freezes framework scheduling and overlay\n// interactions, which breaks marker rendering and panel updates.\n//\n// Import it explicitly only when animation freezing is needed —\n// do NOT re-export from the package barrel (index.ts).\n// =============================================================================\n\n// Exclude selectors — agentation UI elements should never be frozen.\n// Include the runtime containers directly so teleported overlay content is\n// always whitelisted even if a child node misses a marker attribute.\nconst EXCLUDE_SELECTORS = [\n \"#agentation-app\",\n \"#agentation-overlay\",\n \"[data-agentation-root]\",\n \"[data-feedback-toolbar]\",\n \"[data-annotation-popup]\",\n \"[data-annotation-marker]\",\n]\nconst NOT_SELECTORS = EXCLUDE_SELECTORS\n .flatMap((selector) => [`:not(${selector})`, `:not(${selector} *)`])\n .join(\"\")\n\nconst STYLE_ID = \"feedback-freeze-styles\"\nconst STATE_KEY = \"__agentation_freeze\"\n\n// ---------------------------------------------------------------------------\n// Shared mutable state on window (survives HMR module re-execution)\n// ---------------------------------------------------------------------------\ninterface FreezeState {\n frozen: boolean\n origSetTimeout: typeof setTimeout\n origSetInterval: typeof setInterval\n pausedAnimations: Animation[]\n}\n\nfunction getState(): FreezeState {\n if (typeof window === \"undefined\") {\n return {\n frozen: false,\n origSetTimeout: setTimeout,\n origSetInterval: setInterval,\n pausedAnimations: [],\n }\n }\n\n const w = window as Window & { [STATE_KEY]?: FreezeState }\n if (!w[STATE_KEY]) {\n w[STATE_KEY] = {\n frozen: false,\n origSetTimeout: window.setTimeout.bind(window),\n origSetInterval: window.setInterval.bind(window),\n pausedAnimations: [],\n }\n }\n return w[STATE_KEY]\n}\n\nconst _s = getState()\n\n// ---------------------------------------------------------------------------\n// Exports — timing functions kept stable for overlay UI helpers\n// ---------------------------------------------------------------------------\nexport const originalSetTimeout = _s.origSetTimeout\nexport const originalSetInterval = _s.origSetInterval\n\n// ---------------------------------------------------------------------------\n// Freeze / Unfreeze\n// ---------------------------------------------------------------------------\n\nfunction isAgentationElement(el: Element | null): boolean {\n let current: Element | null = el\n\n while (current) {\n if (EXCLUDE_SELECTORS.some((selector) => current?.matches?.(selector) || current?.closest?.(selector))) {\n return true\n }\n\n const root = current.getRootNode()\n current = root instanceof ShadowRoot\n ? root.host\n : current.parentElement\n }\n\n return false\n}\n\nexport function freeze(): void {\n if (typeof document === \"undefined\") return\n if (_s.frozen) return\n _s.frozen = true\n\n // CSS injection — pause CSS animations and kill transitions\n let style = document.getElementById(STYLE_ID)\n if (!style) {\n style = document.createElement(\"style\")\n style.id = STYLE_ID\n }\n style.textContent = `\n *${NOT_SELECTORS},\n *${NOT_SELECTORS}::before,\n *${NOT_SELECTORS}::after {\n animation-play-state: paused !important;\n transition: none !important;\n }\n `\n document.head.appendChild(style)\n\n // WAAPI — pause only RUNNING non-agentation animations and store references\n _s.pausedAnimations = []\n try {\n document.getAnimations().forEach((anim) => {\n if (anim.playState !== \"running\") return\n const target = (anim.effect as KeyframeEffect)?.target as Element | null\n if (!isAgentationElement(target)) {\n anim.pause()\n _s.pausedAnimations.push(anim)\n }\n })\n } catch {\n // getAnimations may not be available in all environments\n }\n\n // Pause videos\n document.querySelectorAll(\"video\").forEach((video) => {\n if (!video.paused) {\n video.dataset.wasPaused = \"false\"\n video.pause()\n }\n })\n}\n\nexport function unfreeze(): void {\n if (typeof document === \"undefined\") return\n if (!_s.frozen) return\n _s.frozen = false\n\n // WAAPI — resume the exact animations we paused BEFORE removing CSS\n for (const anim of _s.pausedAnimations) {\n try {\n anim.play()\n } catch (e) {\n console.warn(\"[agentation] Error resuming animation:\", e)\n }\n }\n _s.pausedAnimations = []\n\n // Now remove CSS injection\n document.getElementById(STYLE_ID)?.remove()\n\n // Resume videos\n document.querySelectorAll(\"video\").forEach((video) => {\n if (video.dataset.wasPaused === \"false\") {\n video.play().catch(() => {})\n delete video.dataset.wasPaused\n }\n })\n}\n","import { readonly, ref } from \"vue\"\nimport {\n freeze,\n unfreeze,\n originalSetTimeout,\n} from \"@liuovo/agentation-vue-core/dom/freeze-animations\"\n\n// ---------------------------------------------------------------------------\n// Freeze state composable — controls page animation freezing\n// ---------------------------------------------------------------------------\n\n/**\n * Reactive wrapper around the core freeze-animations module.\n *\n * Exposes a `isFrozen` ref, a `toggleFreeze()` action, and a `cleanup()`\n * function that should be called on unmount to ensure animations are restored.\n *\n * The `originalSetTimeout` re-export lets components schedule work that\n * must fire even while the page is frozen (toolbar entrance, toast timers, etc.).\n */\nexport interface FreezeState {\n /** Whether page animations are currently frozen. */\n readonly isFrozen: Readonly<ReturnType<typeof ref<boolean>>>\n /** Toggle between frozen and unfrozen. */\n toggleFreeze(): void\n /** Force unfreeze — call on unmount to prevent leaked frozen state. */\n cleanup(): void\n}\n\nexport { originalSetTimeout }\n\nexport function createFreezeState(): FreezeState {\n const isFrozen = ref(false)\n\n function toggleFreeze(): void {\n if (isFrozen.value) {\n unfreeze()\n isFrozen.value = false\n } else {\n freeze()\n isFrozen.value = true\n }\n }\n\n function cleanup(): void {\n if (isFrozen.value) {\n unfreeze()\n isFrozen.value = false\n }\n }\n\n return {\n isFrozen: readonly(isFrozen),\n toggleFreeze,\n cleanup,\n }\n}\n","import { ref } from \"vue\"\nimport { formatToJSON, formatToMarkdown, type ExportPageContext } from \"@liuovo/agentation-vue-core\"\nimport { originalSetTimeout } from \"./useFreezeState.js\"\nimport type { AnnotationsStore } from \"./useAnnotationsStore.js\"\nimport type { SettingsState } from \"./useSettings.js\"\n\n// ---------------------------------------------------------------------------\n// Export composable — clipboard write + download fallback\n// ---------------------------------------------------------------------------\n\nexport type ExportFormat = \"json\" | \"markdown\"\n\nexport interface ExportActions {\n /** Currently active copy feedback, or null. */\n readonly copyFeedback: ExportFormat | null\n /** Export annotations as JSON to clipboard. */\n exportJSON(): Promise<void>\n /** Export annotations as Markdown to clipboard. */\n exportMarkdown(): Promise<void>\n}\n\n/**\n * Creates export actions bound to a store and settings state.\n * Handles clipboard write with \"Copied!\" feedback and download fallback.\n */\nexport function createExportActions(\n store: AnnotationsStore,\n settings: SettingsState,\n): ExportActions {\n const copyFeedback = ref<ExportFormat | null>(null)\n\n async function writeClipboard(text: string): Promise<boolean> {\n try {\n await navigator.clipboard.writeText(text)\n return true\n } catch {\n downloadFallback(text, \"agentation-export.txt\")\n return false\n }\n }\n\n function flash(kind: ExportFormat): void {\n copyFeedback.value = kind\n originalSetTimeout(() => {\n if (copyFeedback.value === kind) copyFeedback.value = null\n }, 1400)\n }\n\n function downloadFallback(content: string, filename: string): void {\n const blob = new Blob([content], { type: \"text/plain\" })\n const url = URL.createObjectURL(blob)\n const a = document.createElement(\"a\")\n a.href = url\n a.download = filename\n a.click()\n URL.revokeObjectURL(url)\n }\n\n async function exportJSON(): Promise<void> {\n const payload = buildClipboardPayload(\"json\")\n if (await writeClipboard(payload)) flash(\"json\")\n }\n\n async function exportMarkdown(): Promise<void> {\n const payload = buildClipboardPayload(\"markdown\")\n if (await writeClipboard(payload)) flash(\"markdown\")\n }\n\n function buildClipboardPayload(format: ExportFormat): string {\n const page = getPageContext()\n\n const payload = format === \"json\"\n ? JSON.stringify(formatToJSON([...store.annotations], {\n detailLevel: settings.outputDetail,\n page,\n excludeFields: settings.copyExcludeFields,\n }), null, 2)\n : formatToMarkdown([...store.annotations], {\n detailLevel: settings.outputDetail,\n page,\n excludeFields: settings.copyExcludeFields,\n })\n\n return prependCopyPrefix(payload)\n }\n\n function getPageContext(): ExportPageContext {\n return store.exportJSON().page\n }\n\n function prependCopyPrefix(payload: string): string {\n const prefix = settings.copyPrefix.replace(/\\r\\n/g, \"\\n\").trim()\n return prefix ? `${prefix}\\n${payload}` : payload\n }\n\n return {\n get copyFeedback() { return copyFeedback.value },\n exportJSON,\n exportMarkdown,\n }\n}\n","import { onMounted, onUnmounted } from \"vue\"\nimport type { AnnotationsStore } from \"./useAnnotationsStore.js\"\nimport type { ExportActions } from \"./useExport.js\"\nimport type { FreezeState } from \"./useFreezeState.js\"\nimport type { OverlayState } from \"./useOverlay.js\"\nimport type { SelectionState } from \"./useSelection.js\"\nimport type { SettingsState } from \"./useSettings.js\"\n\n// ---------------------------------------------------------------------------\n// Keyboard shortcuts composable\n// ---------------------------------------------------------------------------\n\n/**\n * Registers global keyboard shortcuts scoped to the agentation overlay.\n *\n * Global shortcuts (work with modifiers):\n * - `Cmd/Ctrl+Shift+F`: Toggle annotation mode\n *\n * Single-key shortcuts (ignored while typing):\n * - `P`: Toggle animation freeze\n * - `H`: Toggle marker visibility\n * - `C`: Copy the currently selected export format\n * - `X`: Clear all annotations\n * - `Escape`: Dismiss popover → deselect → disable annotation mode\n *\n * Must be called inside a Vue component `setup()`.\n */\nexport function useKeyboardShortcuts(deps: {\n store: AnnotationsStore\n selection: SelectionState\n overlay: OverlayState\n settings: SettingsState\n exportActions?: ExportActions\n freezeState?: FreezeState\n}): void {\n const { store, selection, overlay, settings, exportActions, freezeState } = deps\n\n function isOwnElement(el: Element): boolean {\n return !!el.closest(\"[data-agentation-root]\")\n }\n\n function onKeydown(e: KeyboardEvent): void {\n if (e.isComposing) return\n\n const active = document.activeElement\n\n // Cmd/Ctrl+Shift+F → toggle annotation mode\n if ((e.metaKey || e.ctrlKey) && e.shiftKey && e.code === \"KeyF\") {\n e.preventDefault()\n store.enabled = !store.enabled\n if (!store.enabled) {\n selection.clearHovered()\n selection.clearSelection()\n overlay.hidePopover()\n }\n return\n }\n\n // Escape — priority chain\n if (e.key === \"Escape\") {\n if (isEditableField(active) && !isOwnElement(active)) return\n\n // 1. Dismiss popover if visible\n if (overlay.popoverVisible) {\n e.preventDefault()\n selection.clearSelection()\n overlay.hidePopover()\n return\n }\n\n // 2. Deselect if selected\n if (selection.selected) {\n e.preventDefault()\n selection.clearSelection()\n return\n }\n\n // 3. Disable annotation mode\n if (store.enabled) {\n e.preventDefault()\n store.enabled = false\n selection.clearHovered()\n return\n }\n }\n\n // --- Single-key shortcuts (skip while typing or with modifiers) ------\n if (isEditableField(active) || isEditableField(e.target)) return\n if (e.metaKey || e.ctrlKey || e.altKey) return\n\n const key = e.key.toLowerCase()\n\n // P → toggle animation freeze (works even with 0 annotations)\n if (key === \"p\") {\n e.preventDefault()\n freezeState?.toggleFreeze()\n return\n }\n\n if (store.annotations.length === 0) return\n\n // H → toggle marker visibility\n if (key === \"h\") {\n e.preventDefault()\n settings.showMarkers = !settings.showMarkers\n return\n }\n\n // C → copy current export format\n if (key === \"c\") {\n e.preventDefault()\n if (settings.copyFormat === \"json\") {\n void exportActions?.exportJSON()\n } else {\n void exportActions?.exportMarkdown()\n }\n return\n }\n\n // X → clear all annotations\n if (key === \"x\") {\n e.preventDefault()\n store.clearAll()\n selection.clearHovered()\n selection.clearSelection()\n overlay.hidePopover()\n }\n }\n\n onMounted(() => {\n document.addEventListener(\"keydown\", onKeydown, true)\n })\n\n onUnmounted(() => {\n document.removeEventListener(\"keydown\", onKeydown, true)\n })\n}\n\n// ---------------------------------------------------------------------------\n// Helpers\n// ---------------------------------------------------------------------------\n\nfunction isEditableField(target: EventTarget | null): target is HTMLElement {\n return target instanceof HTMLElement\n && (\n target.tagName === \"INPUT\"\n || target.tagName === \"TEXTAREA\"\n || target.tagName === \"SELECT\"\n || target.isContentEditable\n )\n}\n","import { inject, type InjectionKey } from \"vue\"\n\n/**\n * Type-safe inject that throws if the value is missing.\n * Use in components that require a provided dependency.\n */\nexport function injectStrict<T>(key: InjectionKey<T>, name: string): T {\n const value = inject(key)\n if (value === undefined) {\n throw new Error(`[agentation] Missing required injection: ${name}`)\n }\n return value\n}\n","import { h, type CSSProperties, type FunctionalComponent, type VNodeChild } from \"vue\"\n\n// ---------------------------------------------------------------------------\n// Icon props\n// ---------------------------------------------------------------------------\n\ninterface IconProps {\n size?: number\n style?: CSSProperties\n}\n\ninterface CopyAnimatedProps extends IconProps {\n copied?: boolean\n}\n\ninterface JsonAnimatedProps extends IconProps {\n copied?: boolean\n}\n\n// ---------------------------------------------------------------------------\n// Helpers\n// ---------------------------------------------------------------------------\n\nfunction svg(\n size: number,\n viewBox: string,\n children: VNodeChild[],\n style?: CSSProperties,\n) {\n return h(\n \"svg\",\n {\n width: size,\n height: size,\n viewBox,\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n \"aria-hidden\": \"true\",\n focusable: \"false\",\n style,\n },\n children,\n )\n}\n\n// ---------------------------------------------------------------------------\n// Icons\n// ---------------------------------------------------------------------------\n\n/** List with sparkle — collapsed toolbar icon. */\nexport const IconListSparkle: FunctionalComponent<IconProps> = (props) => {\n const s = props.size ?? 24\n return svg(s, \"0 0 24 24\", [\n h(\"path\", { d: \"M11.5 12L5.5 12\", stroke: \"currentColor\", \"stroke-width\": 1.5, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n h(\"path\", { d: \"M18.5 6.75L5.5 6.75\", stroke: \"currentColor\", \"stroke-width\": 1.5, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n h(\"path\", { d: \"M9.25 17.25L5.5 17.25\", stroke: \"currentColor\", \"stroke-width\": 1.5, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n h(\"path\", {\n d: \"M16 12.75L16.5179 13.9677C16.8078 14.6494 17.3506 15.1922 18.0323 15.4821L19.25 16L18.0323 16.5179C17.3506 16.8078 16.8078 17.3506 16.5179 18.0323L16 19.25L15.4821 18.0323C15.1922 17.3506 14.6494 16.8078 13.9677 16.5179L12.75 16L13.9677 15.4821C14.6494 15.1922 15.1922 14.6494 15.4821 13.9677L16 12.75Z\",\n stroke: \"currentColor\", \"stroke-width\": 1.5, \"stroke-linejoin\": \"round\",\n }),\n ], props.style)\n}\n\n/** Animated copy icon — cross-fades between copy and green checkmark circle. */\nexport const IconCopyAnimated: FunctionalComponent<CopyAnimatedProps> = (props) => {\n const s = props.size ?? 24\n const copied = props.copied ?? false\n const transition = \"opacity 0.2s ease, transform 0.2s ease\"\n\n return svg(s, \"0 0 24 24\", [\n // Copy state\n h(\"g\", { style: { opacity: copied ? 0 : 1, transform: copied ? \"scale(0.8)\" : \"scale(1)\", transformOrigin: \"center\", transition } }, [\n h(\"path\", { d: \"M4.75 11.25C4.75 10.4216 5.42157 9.75 6.25 9.75H12.75C13.5784 9.75 14.25 10.4216 14.25 11.25V17.75C14.25 18.5784 13.5784 19.25 12.75 19.25H6.25C5.42157 19.25 4.75 18.5784 4.75 17.75V11.25Z\", stroke: \"currentColor\", \"stroke-width\": 1.5 }),\n h(\"path\", { d: \"M17.25 14.25H17.75C18.5784 14.25 19.25 13.5784 19.25 12.75V6.25C19.25 5.42157 18.5784 4.75 17.75 4.75H11.25C10.4216 4.75 9.75 5.42157 9.75 6.25V6.75\", stroke: \"currentColor\", \"stroke-width\": 1.5, \"stroke-linecap\": \"round\" }),\n ]),\n // Checkmark state\n h(\"g\", { style: { opacity: copied ? 1 : 0, transform: copied ? \"scale(1)\" : \"scale(0.8)\", transformOrigin: \"center\", transition } }, [\n h(\"path\", { d: \"M12 20C7.58172 20 4 16.4182 4 12C4 7.58172 7.58172 4 12 4C16.4182 4 20 7.58172 20 12C20 16.4182 16.4182 20 12 20Z\", stroke: \"#22c55e\", \"stroke-width\": 1.5, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n h(\"path\", { d: \"M15 10L11 14.25L9.25 12.25\", stroke: \"#22c55e\", \"stroke-width\": 1.5, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n ]),\n ], props.style)\n}\n\n/** Markdown/file-text icon — Lucide-style document outline. */\nexport const IconMarkdown: FunctionalComponent<IconProps> = (props) => {\n const s = props.size ?? 18\n return svg(s, \"0 0 20 20\", [\n h(\"path\", {\n d: \"M7 2.75H10.9393C11.3369 2.75 11.7182 2.90804 12 3.18934L14.8107 6C15.092 6.28181 15.25 6.66304 15.25 7.06066V16.25C15.25 17.0784 14.5784 17.75 13.75 17.75H7C6.17157 17.75 5.5 17.0784 5.5 16.25V4.25C5.5 3.42157 6.17157 2.75 7 2.75Z\",\n stroke: \"currentColor\",\n \"stroke-width\": 1.5,\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n }),\n h(\"path\", {\n d: \"M11 2.75V5.75C11 6.30228 11.4477 6.75 12 6.75H15\",\n stroke: \"currentColor\",\n \"stroke-width\": 1.5,\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n }),\n h(\"path\", {\n d: \"M7.75 10.25H13\",\n stroke: \"currentColor\",\n \"stroke-width\": 1.5,\n \"stroke-linecap\": \"round\",\n }),\n h(\"path\", {\n d: \"M7.75 13H13\",\n stroke: \"currentColor\",\n \"stroke-width\": 1.5,\n \"stroke-linecap\": \"round\",\n }),\n h(\"path\", {\n d: \"M7.75 15.75H11.25\",\n stroke: \"currentColor\",\n \"stroke-width\": 1.5,\n \"stroke-linecap\": \"round\",\n }),\n ], props.style)\n}\n\n/** Animated markdown icon — cross-fades between file-text and green checkmark. */\nexport const IconMarkdownAnimated: FunctionalComponent<CopyAnimatedProps> = (props) => {\n const s = props.size ?? 20\n const copied = props.copied ?? false\n const transition = \"opacity 0.2s ease, transform 0.2s ease\"\n\n return svg(s, \"0 0 20 20\", [\n h(\"g\", { style: { opacity: copied ? 0 : 1, transform: copied ? \"scale(0.82)\" : \"scale(1)\", transformOrigin: \"center\", transition } }, [\n h(\"path\", {\n d: \"M7 2.75H10.9393C11.3369 2.75 11.7182 2.90804 12 3.18934L14.8107 6C15.092 6.28181 15.25 6.66304 15.25 7.06066V16.25C15.25 17.0784 14.5784 17.75 13.75 17.75H7C6.17157 17.75 5.5 17.0784 5.5 16.25V4.25C5.5 3.42157 6.17157 2.75 7 2.75Z\",\n stroke: \"currentColor\",\n \"stroke-width\": 1.5,\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n }),\n h(\"path\", {\n d: \"M11 2.75V5.75C11 6.30228 11.4477 6.75 12 6.75H15\",\n stroke: \"currentColor\",\n \"stroke-width\": 1.5,\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n }),\n h(\"path\", {\n d: \"M7.75 10.25H13\",\n stroke: \"currentColor\",\n \"stroke-width\": 1.5,\n \"stroke-linecap\": \"round\",\n }),\n h(\"path\", {\n d: \"M7.75 13H13\",\n stroke: \"currentColor\",\n \"stroke-width\": 1.5,\n \"stroke-linecap\": \"round\",\n }),\n h(\"path\", {\n d: \"M7.75 15.75H11.25\",\n stroke: \"currentColor\",\n \"stroke-width\": 1.5,\n \"stroke-linecap\": \"round\",\n }),\n ]),\n h(\"g\", { style: { opacity: copied ? 1 : 0, transform: copied ? \"scale(1)\" : \"scale(0.82)\", transformOrigin: \"center\", transition } }, [\n h(\"path\", {\n d: \"M10 17A7 7 0 1 0 10 3a7 7 0 0 0 0 14Z\",\n stroke: \"#22c55e\",\n \"stroke-width\": 1.5,\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n }),\n h(\"path\", {\n d: \"M13 8.5L9.5 12L7.75 10.25\",\n stroke: \"#22c55e\",\n \"stroke-width\": 1.5,\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n }),\n ]),\n ], props.style)\n}\n\n/** Trash icon — filled style. */\nexport const IconTrashAlt: FunctionalComponent<IconProps> = (props) => {\n const s = props.size ?? 16\n return svg(s, \"0 0 24 24\", [\n h(\"path\", {\n d: \"M13.5 4C14.7426 4 15.75 5.00736 15.75 6.25V7H18.5C18.9142 7 19.25 7.33579 19.25 7.75C19.25 8.16421 18.9142 8.5 18.5 8.5H17.9678L17.6328 16.2217C17.61 16.7475 17.5912 17.1861 17.5469 17.543C17.5015 17.9087 17.4225 18.2506 17.2461 18.5723C16.9747 19.0671 16.5579 19.4671 16.0518 19.7168C15.7227 19.8791 15.3772 19.9422 15.0098 19.9717C14.6514 20.0004 14.2126 20 13.6865 20H10.3135C9.78735 20 9.34856 20.0004 8.99023 19.9717C8.62278 19.9422 8.27729 19.8791 7.94824 19.7168C7.44205 19.4671 7.02532 19.0671 6.75391 18.5723C6.57751 18.2506 6.49853 17.9087 6.45312 17.543C6.40883 17.1861 6.39005 16.7475 6.36719 16.2217L6.03223 8.5H5.5C5.08579 8.5 4.75 8.16421 4.75 7.75C4.75 7.33579 5.08579 7 5.5 7H8.25V6.25C8.25 5.00736 9.25736 4 10.5 4H13.5ZM7.86621 16.1562C7.89013 16.7063 7.90624 17.0751 7.94141 17.3584C7.97545 17.6326 8.02151 17.7644 8.06934 17.8516C8.19271 18.0763 8.38239 18.2577 8.6123 18.3711C8.70153 18.4151 8.83504 18.4545 9.11035 18.4766C9.39482 18.4994 9.76335 18.5 10.3135 18.5H13.6865C14.2367 18.5 14.6052 18.4994 14.8896 18.4766C15.165 18.4545 15.2985 18.4151 15.3877 18.3711C15.6176 18.2577 15.8073 18.0763 15.9307 17.8516C15.9785 17.7644 16.0245 17.6326 16.0586 17.3584C16.0938 17.0751 16.1099 16.7063 16.1338 16.1562L16.4668 8.5H7.5332L7.86621 16.1562ZM9.97656 10.75C10.3906 10.7371 10.7371 11.0626 10.75 11.4766L10.875 15.4766C10.8879 15.8906 10.5624 16.2371 10.1484 16.25C9.73443 16.2629 9.38794 15.9374 9.375 15.5234L9.25 11.5234C9.23706 11.1094 9.56255 10.7629 9.97656 10.75ZM14.0244 10.75C14.4384 10.7635 14.7635 11.1105 14.75 11.5244L14.6201 15.5244C14.6066 15.9384 14.2596 16.2634 13.8457 16.25C13.4317 16.2365 13.1067 15.8896 13.1201 15.4756L13.251 11.4756C13.2645 11.0617 13.6105 10.7366 14.0244 10.75ZM10.5 5.5C10.0858 5.5 9.75 5.83579 9.75 6.25V7H14.25V6.25C14.25 5.83579 13.9142 5.5 13.5 5.5H10.5Z\",\n fill: \"currentColor\",\n }),\n ], props.style)\n}\n\n/** Eye icon — Lucide-style visible state. */\nexport const IconEye: FunctionalComponent<IconProps> = (props) => {\n const s = props.size ?? 24\n return svg(s, \"0 0 24 24\", [\n h(\"path\", {\n d: \"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0\",\n stroke: \"currentColor\",\n \"stroke-width\": 2,\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n }),\n h(\"circle\", {\n cx: 12,\n cy: 12,\n r: 3,\n stroke: \"currentColor\",\n \"stroke-width\": 2,\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n }),\n ], props.style)\n}\n\n/** Eye-off icon — Lucide-style hidden state. */\nexport const IconEyeOff: FunctionalComponent<IconProps> = (props) => {\n const s = props.size ?? 24\n return svg(s, \"0 0 24 24\", [\n h(\"path\", {\n d: \"M10.733 5.076A10.744 10.744 0 0 1 21.938 12 10.75 10.75 0 0 1 18.084 16.268\",\n stroke: \"currentColor\",\n \"stroke-width\": 2,\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n }),\n h(\"path\", {\n d: \"M14.084 14.158a3 3 0 0 1-4.242-4.242\",\n stroke: \"currentColor\",\n \"stroke-width\": 2,\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n }),\n h(\"path\", {\n d: \"M17.479 17.499A10.75 10.75 0 0 1 2.062 12 10.75 10.75 0 0 1 6.17 7.412\",\n stroke: \"currentColor\",\n \"stroke-width\": 2,\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n }),\n h(\"path\", {\n d: \"m2 2 20 20\",\n stroke: \"currentColor\",\n \"stroke-width\": 2,\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n }),\n ], props.style)\n}\n\n/** Animated eye icon — cross-fades between open and closed (with slash). */\nexport const IconEyeAnimated: FunctionalComponent<{ isOpen?: boolean } & IconProps> = (props) => {\n const s = props.size ?? 24\n const isOpen = props.isOpen ?? true\n\n return svg(s, \"0 0 24 24\", [\n // Open state\n h(\"g\", { style: { opacity: isOpen ? 1 : 0, transition: \"opacity 0.2s ease\" } }, [\n h(\"path\", { d: \"M3.91752 12.7539C3.65127 12.2996 3.65037 11.7515 3.9149 11.2962C4.9042 9.59346 7.72688 5.49994 12 5.49994C16.2731 5.49994 19.0958 9.59346 20.0851 11.2962C20.3496 11.7515 20.3487 12.2996 20.0825 12.7539C19.0908 14.4459 16.2694 18.4999 12 18.4999C7.73064 18.4999 4.90918 14.4459 3.91752 12.7539Z\", stroke: \"currentColor\", \"stroke-width\": 1.5, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n h(\"path\", { d: \"M12 14.8261C13.5608 14.8261 14.8261 13.5608 14.8261 12C14.8261 10.4392 13.5608 9.17392 12 9.17392C10.4392 9.17392 9.17391 10.4392 9.17391 12C9.17391 13.5608 10.4392 14.8261 12 14.8261Z\", stroke: \"currentColor\", \"stroke-width\": 1.5, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n ]),\n // Closed state (with slash)\n h(\"g\", { style: { opacity: isOpen ? 0 : 1, transition: \"opacity 0.2s ease\" } }, [\n h(\"path\", { d: \"M18.6025 9.28503C18.9174 8.9701 19.4364 8.99481 19.7015 9.35271C20.1484 9.95606 20.4943 10.507 20.7342 10.9199C21.134 11.6086 21.1329 12.4454 20.7303 13.1328C20.2144 14.013 19.2151 15.5225 17.7723 16.8193C16.3293 18.1162 14.3852 19.2497 12.0008 19.25C11.4192 19.25 10.8638 19.1823 10.3355 19.0613C9.77966 18.934 9.63498 18.2525 10.0382 17.8493C10.2412 17.6463 10.5374 17.573 10.8188 17.6302C11.1993 17.7076 11.5935 17.75 12.0008 17.75C13.8848 17.7497 15.4867 16.8568 16.7693 15.7041C18.0522 14.5511 18.9606 13.1867 19.4363 12.375C19.5656 12.1543 19.5659 11.8943 19.4373 11.6729C19.2235 11.3049 18.921 10.8242 18.5364 10.3003C18.3085 9.98991 18.3302 9.5573 18.6025 9.28503ZM12.0008 4.75C12.5814 4.75006 13.1358 4.81803 13.6632 4.93953C14.2182 5.06741 14.362 5.74812 13.9593 6.15091C13.7558 6.35435 13.4589 6.42748 13.1771 6.36984C12.7983 6.29239 12.4061 6.25006 12.0008 6.25C10.1167 6.25 8.51415 7.15145 7.23028 8.31543C5.94678 9.47919 5.03918 10.8555 4.56426 11.6729C4.43551 11.8945 4.43582 12.1542 4.56524 12.375C4.77587 12.7343 5.07189 13.2012 5.44718 13.7105C5.67623 14.0213 5.65493 14.4552 5.38193 14.7282C5.0671 15.0431 4.54833 15.0189 4.28292 14.6614C3.84652 14.0736 3.50813 13.5369 3.27129 13.1328C2.86831 12.4451 2.86717 11.6088 3.26739 10.9199C3.78185 10.0345 4.77959 8.51239 6.22247 7.2041C7.66547 5.89584 9.61202 4.75 12.0008 4.75Z\", fill: \"currentColor\" }),\n h(\"path\", { d: \"M5 19L19 5\", stroke: \"currentColor\", \"stroke-width\": 1.5, \"stroke-linecap\": \"round\" }),\n ]),\n ], props.style)\n}\n\n/** Pause icon — Lucide-style paused state. */\nexport const IconPause: FunctionalComponent<IconProps> = (props) => {\n const s = props.size ?? 24\n return svg(s, \"0 0 24 24\", [\n h(\"rect\", {\n x: 6,\n y: 4,\n width: 4,\n height: 16,\n rx: 1,\n fill: \"currentColor\",\n }),\n h(\"rect\", {\n x: 14,\n y: 4,\n width: 4,\n height: 16,\n rx: 1,\n fill: \"currentColor\",\n }),\n ], props.style)\n}\n\n/** Play icon — Lucide-style resume state. */\nexport const IconPlay: FunctionalComponent<IconProps> = (props) => {\n const s = props.size ?? 24\n return svg(s, \"0 0 24 24\", [\n h(\"path\", {\n d: \"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z\",\n fill: \"currentColor\",\n }),\n ], props.style)\n}\n\n/** Gear / settings icon. */\nexport const IconGear: FunctionalComponent<IconProps> = (props) => {\n const s = props.size ?? 16\n return svg(s, \"0 0 24 24\", [\n h(\"path\", { d: \"M10.6504 5.81117C10.9939 4.39628 13.0061 4.39628 13.3496 5.81117C13.5715 6.72517 14.6187 7.15891 15.4219 6.66952C16.6652 5.91193 18.0881 7.33479 17.3305 8.57815C16.8411 9.38134 17.2748 10.4285 18.1888 10.6504C19.6037 10.9939 19.6037 13.0061 18.1888 13.3496C17.2748 13.5715 16.8411 14.6187 17.3305 15.4219C18.0881 16.6652 16.6652 18.0881 15.4219 17.3305C14.6187 16.8411 13.5715 17.2748 13.3496 18.1888C13.0061 19.6037 10.9939 19.6037 10.6504 18.1888C10.4285 17.2748 9.38135 16.8411 8.57815 17.3305C7.33479 18.0881 5.91193 16.6652 6.66952 15.4219C7.15891 14.6187 6.72517 13.5715 5.81117 13.3496C4.39628 13.0061 4.39628 10.9939 5.81117 10.6504C6.72517 10.4285 7.15891 9.38134 6.66952 8.57815C5.91193 7.33479 7.33479 5.91192 8.57815 6.66952C9.38135 7.15891 10.4285 6.72517 10.6504 5.81117Z\", stroke: \"currentColor\", \"stroke-width\": 1.5, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n h(\"circle\", { cx: 12, cy: 12, r: 2.5, stroke: \"currentColor\", \"stroke-width\": 1.5 }),\n ], props.style)\n}\n\n/** Connected nodes icon — used for MCP & webhooks controls. */\nexport const IconConnectedNodes: FunctionalComponent<IconProps> = (props) => {\n const s = props.size ?? 18\n return svg(s, \"0 0 24 24\", [\n h(\"path\", { d: \"M9.25 7H14.75\", stroke: \"currentColor\", \"stroke-width\": 1.5, \"stroke-linecap\": \"round\" }),\n h(\"path\", { d: \"M8.89062 8.54688L11.25 14\", stroke: \"currentColor\", \"stroke-width\": 1.5, \"stroke-linecap\": \"round\" }),\n h(\"path\", { d: \"M15.1094 8.54688L12.75 14\", stroke: \"currentColor\", \"stroke-width\": 1.5, \"stroke-linecap\": \"round\" }),\n h(\"circle\", { cx: 7, cy: 7, r: 2.25, stroke: \"currentColor\", \"stroke-width\": 1.5 }),\n h(\"circle\", { cx: 17, cy: 7, r: 2.25, stroke: \"currentColor\", \"stroke-width\": 1.5 }),\n h(\"circle\", { cx: 12, cy: 17, r: 2.25, stroke: \"currentColor\", \"stroke-width\": 1.5 }),\n ], props.style)\n}\n\n/** Large X mark — close/exit icon (filled). */\nexport const IconXmarkLarge: FunctionalComponent<IconProps> = (props) => {\n const s = props.size ?? 24\n return svg(s, \"0 0 24 24\", [\n h(\"path\", { d: \"M16.7198 6.21973C17.0127 5.92683 17.4874 5.92683 17.7803 6.21973C18.0732 6.51262 18.0732 6.9874 17.7803 7.28027L13.0606 12L17.7803 16.7197C18.0732 17.0126 18.0732 17.4874 17.7803 17.7803C17.4875 18.0731 17.0127 18.0731 16.7198 17.7803L12.0001 13.0605L7.28033 17.7803C6.98746 18.0731 6.51268 18.0731 6.21979 17.7803C5.92689 17.4874 5.92689 17.0126 6.21979 16.7197L10.9395 12L6.21979 7.28027C5.92689 6.98738 5.92689 6.51262 6.21979 6.21973C6.51268 5.92683 6.98744 5.92683 7.28033 6.21973L12.0001 10.9395L16.7198 6.21973Z\", fill: \"currentColor\" }),\n ], props.style)\n}\n\n/** Sun icon — light mode indicator. */\nexport const IconSun: FunctionalComponent<IconProps> = (props) => {\n const s = props.size ?? 16\n return svg(s, \"0 0 20 20\", [\n h(\"path\", { d: \"M9.99999 12.7082C11.4958 12.7082 12.7083 11.4956 12.7083 9.99984C12.7083 8.50407 11.4958 7.2915 9.99999 7.2915C8.50422 7.2915 7.29166 8.50407 7.29166 9.99984C7.29166 11.4956 8.50422 12.7082 9.99999 12.7082Z\", stroke: \"currentColor\", \"stroke-width\": 1.25, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n h(\"path\", { d: \"M10 3.9585V5.05698\", stroke: \"currentColor\", \"stroke-width\": 1.25, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n h(\"path\", { d: \"M10 14.9429V16.0414\", stroke: \"currentColor\", \"stroke-width\": 1.25, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n h(\"path\", { d: \"M5.7269 5.72656L6.50682 6.50649\", stroke: \"currentColor\", \"stroke-width\": 1.25, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n h(\"path\", { d: \"M13.4932 13.4932L14.2731 14.2731\", stroke: \"currentColor\", \"stroke-width\": 1.25, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n h(\"path\", { d: \"M3.95834 10H5.05683\", stroke: \"currentColor\", \"stroke-width\": 1.25, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n h(\"path\", { d: \"M14.9432 10H16.0417\", stroke: \"currentColor\", \"stroke-width\": 1.25, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n h(\"path\", { d: \"M5.7269 14.2731L6.50682 13.4932\", stroke: \"currentColor\", \"stroke-width\": 1.25, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n h(\"path\", { d: \"M13.4932 6.50649L14.2731 5.72656\", stroke: \"currentColor\", \"stroke-width\": 1.25, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n ], props.style)\n}\n\n/** Moon icon — dark mode indicator. */\nexport const IconMoon: FunctionalComponent<IconProps> = (props) => {\n const s = props.size ?? 16\n return svg(s, \"0 0 20 20\", [\n h(\"path\", { d: \"M15.5 10.4955C15.4037 11.5379 15.0124 12.5314 14.3721 13.3596C13.7317 14.1878 12.8688 14.8165 11.8841 15.1722C10.8995 15.5278 9.83397 15.5957 8.81217 15.3679C7.79038 15.1401 6.8546 14.6259 6.11434 13.8857C5.37408 13.1454 4.85995 12.2096 4.63211 11.1878C4.40427 10.166 4.47215 9.10048 4.82781 8.11585C5.18346 7.13123 5.81218 6.26825 6.64039 5.62791C7.4686 4.98756 8.46206 4.59634 9.5045 4.5C8.89418 5.32569 8.60049 6.34302 8.67685 7.36695C8.75321 8.39087 9.19454 9.35339 9.92058 10.0794C10.6466 10.8055 11.6091 11.2468 12.6331 11.3231C13.657 11.3995 14.6743 11.1058 15.5 10.4955Z\", stroke: \"currentColor\", \"stroke-width\": 1.13793, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n ], props.style)\n}\n\n/** Animated pause/play — cross-fades between pause bars and play triangle. */\nexport const IconPausePlayAnimated: FunctionalComponent<{ isPaused?: boolean } & IconProps> = (props) => {\n const s = props.size ?? 24\n const isPaused = props.isPaused ?? false\n\n return svg(s, \"0 0 24 24\", [\n // Pause bars\n h(\"path\", { d: \"M8 6L8 18\", stroke: \"currentColor\", \"stroke-width\": 1.5, \"stroke-linecap\": \"round\", style: { opacity: isPaused ? 0 : 1, transition: \"opacity 0.15s ease\" } }),\n h(\"path\", { d: \"M16 18L16 6\", stroke: \"currentColor\", \"stroke-width\": 1.5, \"stroke-linecap\": \"round\", style: { opacity: isPaused ? 0 : 1, transition: \"opacity 0.15s ease\" } }),\n // Play triangle\n h(\"path\", { d: \"M17.75 10.701C18.75 11.2783 18.75 12.7217 17.75 13.299L8.75 18.4952C7.75 19.0725 6.5 18.3509 6.5 17.1962L6.5 6.80384C6.5 5.64914 7.75 4.92746 8.75 5.50481L17.75 10.701Z\", stroke: \"currentColor\", \"stroke-width\": 1.5, style: { opacity: isPaused ? 1 : 0, transition: \"opacity 0.15s ease\" } }),\n ], props.style)\n}\n\n/** Small animated checkmark — draw + bounce effect. */\nexport const IconCheckSmallAnimated: FunctionalComponent<IconProps> = (props) => {\n const s = props.size ?? 14\n return svg(s, \"0 0 14 14\", [\n h(\"style\", \"@keyframes ag-check-draw{0%{stroke-dashoffset:12}to{stroke-dashoffset:0}}@keyframes ag-check-bounce{0%{transform:scale(.5);opacity:0}50%{transform:scale(1.12);opacity:1}75%{transform:scale(.95)}to{transform:scale(1)}}\"),\n h(\"path\", {\n d: \"M3.9375 7L6.125 9.1875L10.5 4.8125\",\n stroke: \"currentColor\", \"stroke-width\": 1.5, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\",\n style: {\n strokeDasharray: 12,\n strokeDashoffset: 0,\n transformOrigin: \"center\",\n animation: \"ag-check-draw 0.18s ease-out, ag-check-bounce 0.3s cubic-bezier(0.34, 1.56, 0.64, 1)\",\n },\n }),\n ], props.style)\n}\n\n/** Small X for close actions. */\nexport const IconClose: FunctionalComponent<IconProps> = (props) => {\n const s = props.size ?? 16\n return svg(s, \"0 0 16 16\", [\n h(\"path\", { d: \"M4 4l8 8M12 4l-8 8\", stroke: \"currentColor\", \"stroke-width\": 1.5, \"stroke-linecap\": \"round\" }),\n ], props.style)\n}\n\n/** JSON bracket icon — for JSON export. */\nexport const IconJson: FunctionalComponent<IconProps> = (props) => {\n const s = props.size ?? 16\n return svg(s, \"0 0 16 16\", [\n h(\"path\", { d: \"M4.5 3C3.67 3 3 3.67 3 4.5v2c0 .55-.45 1-1 1v1c.55 0 1 .45 1 1v2c0 .83.67 1.5 1.5 1.5\", stroke: \"currentColor\", \"stroke-width\": 1.25, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n h(\"path\", { d: \"M11.5 3c.83 0 1.5.67 1.5 1.5v2c0 .55.45 1 1 1v1c-.55 0-1 .45-1 1v2c0 .83-.67 1.5-1.5 1.5\", stroke: \"currentColor\", \"stroke-width\": 1.25, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n ], props.style)\n}\n\n/** Help icon — circle with question mark. */\nexport const IconHelp: FunctionalComponent<IconProps> = (props) => {\n const s = props.size ?? 20\n return svg(s, \"0 0 20 20\", [\n h(\"circle\", { cx: 10, cy: 10.5, r: 5.25, stroke: \"currentColor\", \"stroke-width\": 1.25 }),\n h(\"path\", { d: \"M8.5 8.75C8.5 7.92 9.17 7.25 10 7.25C10.83 7.25 11.5 7.92 11.5 8.75C11.5 9.58 10.83 10.25 10 10.25V11\", stroke: \"currentColor\", \"stroke-width\": 1.25, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n h(\"circle\", { cx: 10, cy: 13, r: 0.75, fill: \"currentColor\" }),\n ], props.style)\n}\n\n/** Left chevron — back navigation. */\nexport const IconChevronLeft: FunctionalComponent<IconProps> = (props) => {\n const s = props.size ?? 16\n return svg(s, \"0 0 16 16\", [\n h(\"path\", { d: \"M8.5 3.5L4 8L8.5 12.5\", stroke: \"currentColor\", \"stroke-width\": 1.5, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n ], props.style)\n}\n\n/** Right chevron — forward navigation. */\nexport const IconChevronRight: FunctionalComponent<IconProps> = (props) => {\n const s = props.size ?? 16\n return svg(s, \"0 0 16 16\", [\n h(\"path\", { d: \"M8.5 11.5L12 8L8.5 4.5\", stroke: \"currentColor\", \"stroke-width\": 1.5, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n ], props.style)\n}\n\n/** Animated JSON icon — cross-fades between JSON brackets and green checkmark. */\nexport const IconJsonAnimated: FunctionalComponent<JsonAnimatedProps> = (props) => {\n const s = props.size ?? 16\n const copied = props.copied ?? false\n const transition = \"opacity 0.2s ease, transform 0.2s ease\"\n\n return svg(s, \"0 0 16 16\", [\n // JSON brackets state\n h(\"g\", { style: { opacity: copied ? 0 : 1, transform: copied ? \"scale(0.8)\" : \"scale(1)\", transformOrigin: \"center\", transition } }, [\n h(\"path\", { d: \"M4.5 3C3.67 3 3 3.67 3 4.5v2c0 .55-.45 1-1 1v1c.55 0 1 .45 1 1v2c0 .83.67 1.5 1.5 1.5\", stroke: \"currentColor\", \"stroke-width\": 1.25, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n h(\"path\", { d: \"M11.5 3c.83 0 1.5.67 1.5 1.5v2c0 .55.45 1 1 1v1c-.55 0-1 .45-1 1v2c0 .83-.67 1.5-1.5 1.5\", stroke: \"currentColor\", \"stroke-width\": 1.25, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n ]),\n // Green checkmark state\n h(\"g\", { style: { opacity: copied ? 1 : 0, transform: copied ? \"scale(1)\" : \"scale(0.8)\", transformOrigin: \"center\", transition } }, [\n h(\"path\", { d: \"M8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12Z\", stroke: \"#22c55e\", \"stroke-width\": 1.25, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n h(\"path\", { d: \"M10.5 6.5L7.5 10L5.75 8.25\", stroke: \"#22c55e\", \"stroke-width\": 1.25, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n ]),\n ], props.style)\n}\n","<script setup lang=\"ts\">\nimport {\n computed,\n nextTick,\n onBeforeUnmount,\n ref,\n watch,\n} from \"vue\"\nimport {\n getForensicComputedStyles,\n parseComputedStylesString,\n type AnnotationV2,\n type AnnotationStatus,\n} from \"@liuovo/agentation-vue-core\"\nimport {\n ANNOTATIONS_STORE_KEY,\n I18N_KEY,\n OVERLAY_KEY,\n SELECTION_KEY,\n SETTINGS_KEY,\n} from \"../injection-keys.js\"\nimport { injectStrict } from \"../utils.js\"\nimport { originalSetTimeout } from \"../composables/useFreezeState.js\"\nimport { IconTrashAlt } from \"./icons.js\"\n\nconst store = injectStrict(ANNOTATIONS_STORE_KEY, \"annotations store\")\nconst selection = injectStrict(SELECTION_KEY, \"selection state\")\nconst overlay = injectStrict(OVERLAY_KEY, \"overlay state\")\nconst settings = injectStrict(SETTINGS_KEY, \"settings state\")\nconst i18n = injectStrict(I18N_KEY, \"i18n state\")\n\nconst comment = ref(\"\")\nconst stylesExpanded = ref(false)\nconst shaking = ref(false)\nconst textareaRef = ref<HTMLTextAreaElement | null>(null)\n\nconst messages = computed(() => i18n.messages)\n\nconst snapshot = computed(() => selection.selected)\nconst position = computed(() => overlay.popoverPosition)\nconst editingAnnotation = computed(() => overlay.editingAnnotation)\n\nconst isCreateMode = computed(\n () => overlay.popoverVisible && snapshot.value !== null && position.value !== null && !editingAnnotation.value,\n)\n\nconst isEditMode = computed(\n () => overlay.popoverVisible && editingAnnotation.value !== null && position.value !== null,\n)\n\nconst isOpen = computed(() => isCreateMode.value || isEditMode.value)\n\nconst accentColor = computed(() => {\n return isMultiSelect(editingAnnotation.value)\n || snapshot.value?.isMultiSelect\n ? \"#34C759\"\n : settings.annotationColor\n})\n\nconst popoverStyle = computed(() => {\n const pos = position.value\n if (!pos) return undefined\n\n return {\n top: `${pos.top}px`,\n left: `${pos.left}px`,\n \"--ag-popover-accent\": accentColor.value,\n }\n})\n\nconst displayName = computed(() => {\n if (editingAnnotation.value) return editingAnnotation.value.elementSelector\n return snapshot.value?.elementName ?? \"\"\n})\n\nconst displaySource = computed(() => {\n if (!settings.componentSourceEnabled) return \"\"\n\n if (editingAnnotation.value) {\n const src = editingAnnotation.value.source\n return src.file\n ? (src.line ? `${src.file}:${src.line}` : src.file)\n : \"\"\n }\n\n return snapshot.value?.source.file\n ? (snapshot.value.source.line\n ? `${snapshot.value.source.file}:${snapshot.value.source.line}`\n : snapshot.value.source.file)\n : \"\"\n})\n\nconst selectedText = computed(() => {\n return editingAnnotation.value?.elementText ?? snapshot.value?.selectedText ?? \"\"\n})\nconst threadMessages = computed(() => editingAnnotation.value?.thread ?? [])\nconst workflowStatus = computed<AnnotationStatus>(\n () => editingAnnotation.value?.status ?? \"pending\",\n)\nconst workflowStatusLabel = computed(() => getStatusLabel(workflowStatus.value))\nconst workflowStatusTone = computed(() => getStatusTone(workflowStatus.value))\n\nconst computedStyles = computed(() => {\n if (editingAnnotation.value) {\n return getAnnotationComputedStyles(editingAnnotation.value)\n }\n\n const selectedElement = snapshot.value?.element\n if (!selectedElement) return undefined\n\n return parseComputedStylesString(getForensicComputedStyles(selectedElement))\n})\n\nconst styleEntries = computed(() => Object.entries(computedStyles.value ?? {}))\nconst hasComputedStyles = computed(() => styleEntries.value.length > 0)\n\nlet shakeTimer: ReturnType<typeof setTimeout> | null = null\n\nwatch(\n [isOpen, () => editingAnnotation.value?.id, () => snapshot.value?.element],\n async ([open]) => {\n if (!open) {\n comment.value = \"\"\n stylesExpanded.value = false\n return\n }\n\n comment.value = editingAnnotation.value?.comment ?? \"\"\n stylesExpanded.value = false\n\n await nextTick()\n focusTextarea()\n },\n { immediate: true },\n)\n\nwatch(\n () => overlay.shakeTick ?? 0,\n (tick, previousTick) => {\n if (!isOpen.value) return\n if (tick === previousTick) return\n shake()\n },\n)\n\nonBeforeUnmount(() => {\n if (shakeTimer) {\n window.clearTimeout(shakeTimer)\n }\n})\n\nfunction save(): void {\n const trimmed = comment.value.trim()\n if (!trimmed) return\n\n if (editingAnnotation.value) {\n try {\n store.updateAnnotation(editingAnnotation.value.id, trimmed)\n } catch (err) {\n console.warn(\"[agentation] Failed to update annotation:\", err)\n return\n }\n } else {\n const snap = snapshot.value\n if (!snap) return\n\n try {\n store.saveAnnotation(trimmed, snap)\n } catch (err) {\n console.warn(\"[agentation] Failed to save annotation:\", err)\n return\n }\n }\n\n dismiss()\n}\n\nfunction deleteAnnotation(): void {\n if (!editingAnnotation.value) return\n store.removeAnnotation(editingAnnotation.value.id)\n dismiss()\n}\n\nfunction dismiss(): void {\n comment.value = \"\"\n stylesExpanded.value = false\n selection.clearSelection()\n overlay.hidePopover()\n}\n\nfunction focusTextarea(): void {\n const textarea = textareaRef.value\n if (!textarea) return\n textarea.focus()\n textarea.selectionStart = textarea.selectionEnd = textarea.value.length\n textarea.scrollTop = textarea.scrollHeight\n}\n\nfunction shake(): void {\n if (shakeTimer) {\n window.clearTimeout(shakeTimer)\n }\n\n shaking.value = false\n\n void nextTick(() => {\n shaking.value = true\n shakeTimer = originalSetTimeout(() => {\n shaking.value = false\n focusTextarea()\n shakeTimer = null\n }, 250)\n })\n}\n\nfunction onKeydown(event: KeyboardEvent): void {\n if (event.isComposing) return\n\n if (event.key === \"Enter\" && !event.shiftKey) {\n event.preventDefault()\n save()\n }\n\n if (event.key === \"Escape\") {\n event.preventDefault()\n dismiss()\n }\n}\n\nfunction getStatusLabel(status: AnnotationStatus): string {\n switch (status) {\n case \"acknowledged\":\n return messages.value.workflow.statusAcknowledged\n case \"resolved\":\n return messages.value.workflow.statusResolved\n case \"dismissed\":\n return messages.value.workflow.statusDismissed\n default:\n return messages.value.workflow.statusPending\n }\n}\n\nfunction getStatusTone(status: AnnotationStatus): \"pending\" | \"acknowledged\" | \"resolved\" | \"dismissed\" {\n switch (status) {\n case \"acknowledged\":\n case \"resolved\":\n case \"dismissed\":\n return status\n default:\n return \"pending\"\n }\n}\n\nfunction getRoleLabel(role: \"human\" | \"agent\"): string {\n return role === \"agent\"\n ? messages.value.workflow.roleAgent\n : messages.value.workflow.roleHuman\n}\n\nfunction formatTimestamp(timestamp: string | number): string {\n const date = typeof timestamp === \"number\"\n ? new Date(timestamp)\n : new Date(timestamp)\n\n if (Number.isNaN(date.getTime())) {\n return \"\"\n }\n\n return new Intl.DateTimeFormat(undefined, {\n month: \"short\",\n day: \"numeric\",\n hour: \"2-digit\",\n minute: \"2-digit\",\n }).format(date)\n}\n\nfunction isMultiSelect(annotation: AnnotationV2 | null): boolean {\n const metadata = annotation?.metadata as { isMultiSelect?: unknown } | undefined\n return metadata?.isMultiSelect === true\n}\n\nfunction getAnnotationComputedStyles(annotation: AnnotationV2): Record<string, string> | undefined {\n const metadata = annotation.metadata as { computedStyles?: unknown } | undefined\n const raw = metadata?.computedStyles\n\n if (typeof raw === \"string\") {\n return parseComputedStylesString(raw)\n }\n\n if (raw && typeof raw === \"object\") {\n return Object.fromEntries(\n Object.entries(raw).filter((entry): entry is [string, string] => typeof entry[1] === \"string\"),\n )\n }\n\n return undefined\n}\n</script>\n\n<template>\n <Transition name=\"popover\">\n <div\n v-if=\"isOpen\"\n class=\"popover\"\n :class=\"{ light: !settings.darkMode, shaking }\"\n :style=\"popoverStyle\"\n data-annotation-popup\n @click.stop\n >\n <div class=\"header\">\n <button\n v-if=\"hasComputedStyles\"\n class=\"header-toggle\"\n type=\"button\"\n :aria-expanded=\"stylesExpanded\"\n @click=\"stylesExpanded = !stylesExpanded\"\n >\n <svg\n class=\"chevron\"\n :class=\"{ expanded: stylesExpanded }\"\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 14 14\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M5.5 10.25L9 7.25L5.75 4\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n <span class=\"element-name\">{{ displayName }}</span>\n </button>\n\n <span v-else class=\"element-name\">{{ displayName }}</span>\n </div>\n\n <div v-if=\"displaySource\" class=\"source-file\">\n {{ displaySource }}\n </div>\n\n <div v-if=\"editingAnnotation\" class=\"workflow-summary\">\n <div class=\"status-row\">\n <span class=\"status-pill\" :data-status=\"workflowStatusTone\">\n {{ workflowStatusLabel }}\n </span>\n <span v-if=\"threadMessages.length\" class=\"thread-count\">\n {{ messages.workflow.replyCount(threadMessages.length) }}\n </span>\n </div>\n\n <div v-if=\"threadMessages.length\" class=\"thread-block\">\n <div class=\"thread-title\">{{ messages.workflow.thread }}</div>\n <div class=\"thread-list\">\n <div\n v-for=\"message in threadMessages.slice(-4)\"\n :key=\"message.id\"\n class=\"thread-item\"\n :data-role=\"message.role\"\n >\n <div class=\"thread-meta\">\n <span>{{ getRoleLabel(message.role) }}</span>\n <span>{{ formatTimestamp(message.timestamp) }}</span>\n </div>\n <div class=\"thread-content\">{{ message.content }}</div>\n </div>\n </div>\n </div>\n </div>\n\n <div\n v-if=\"hasComputedStyles\"\n class=\"styles-wrapper\"\n :class=\"{ expanded: stylesExpanded }\"\n >\n <div class=\"styles-inner\">\n <div class=\"styles-block\">\n <div\n v-for=\"[property, value] in styleEntries\"\n :key=\"property\"\n class=\"style-line\"\n >\n <span class=\"style-property\">{{ property }}</span>\n :\n <span class=\"style-value\">{{ value }}</span>;\n </div>\n </div>\n </div>\n </div>\n\n <div v-if=\"selectedText\" class=\"quote\">\n &ldquo;{{ selectedText.slice(0, 80) }}{{ selectedText.length > 80 ? \"...\" : \"\" }}&rdquo;\n </div>\n\n <textarea\n ref=\"textareaRef\"\n v-model=\"comment\"\n class=\"textarea\"\n rows=\"2\"\n :placeholder=\"editingAnnotation ? messages.popover.editPlaceholder : messages.popover.createPlaceholder\"\n @keydown=\"onKeydown\"\n />\n\n <div class=\"actions\">\n <div class=\"delete-wrapper\">\n <button\n v-if=\"editingAnnotation\"\n class=\"delete-button\"\n type=\"button\"\n :title=\"messages.popover.deleteAnnotation\"\n :aria-label=\"messages.popover.deleteAnnotation\"\n @click=\"deleteAnnotation\"\n >\n <IconTrashAlt :size=\"22\" />\n </button>\n </div>\n\n <button class=\"btn-ghost\" type=\"button\" @click=\"dismiss\">\n {{ messages.popover.cancel }}\n </button>\n\n <button\n class=\"btn-primary\"\n type=\"button\"\n :disabled=\"!comment.trim()\"\n :style=\"{ backgroundColor: accentColor }\"\n @click=\"save\"\n >\n {{ editingAnnotation ? messages.popover.update : messages.popover.save }}\n </button>\n </div>\n </div>\n </Transition>\n</template>\n\n<style scoped>\n:deep(svg[fill=\"none\"]) { fill: none !important; }\n\n@keyframes popoverShake {\n 0%, 100% { transform: scale(1) translateX(0); }\n 20% { transform: scale(1) translateX(-3px); }\n 40% { transform: scale(1) translateX(3px); }\n 60% { transform: scale(1) translateX(-2px); }\n 80% { transform: scale(1) translateX(2px); }\n}\n\n.popover {\n position: fixed;\n z-index: 100001;\n width: 280px;\n padding: 12px 16px 14px;\n border-radius: 16px;\n background: #1a1a1a;\n box-shadow:\n 0 4px 24px rgba(0, 0, 0, 0.3),\n 0 0 0 1px rgba(255, 255, 255, 0.08);\n color: rgba(255, 255, 255, 0.92);\n pointer-events: auto;\n cursor: default;\n will-change: transform, opacity;\n}\n\n.popover.light {\n background: #ffffff;\n box-shadow:\n 0 4px 24px rgba(15, 23, 42, 0.12),\n 0 0 0 1px rgba(15, 23, 42, 0.06);\n color: rgba(15, 23, 42, 0.92);\n}\n\n.popover.shaking {\n animation: popoverShake 0.25s ease-out;\n}\n\n.popover-enter-active {\n transition:\n opacity 0.2s ease,\n transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),\n filter 0.2s ease;\n}\n\n.popover-leave-active {\n transition:\n opacity 0.15s ease-in,\n transform 0.15s ease-in,\n filter 0.15s ease-in;\n}\n\n.popover-enter-from,\n.popover-leave-to {\n opacity: 0;\n transform: scale(0.95) translateY(4px);\n filter: blur(4px);\n}\n\n.header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 4px;\n}\n\n.header-toggle {\n display: flex;\n align-items: center;\n gap: 4px;\n width: 100%;\n min-width: 0;\n padding: 0;\n border: none;\n background: transparent;\n color: inherit;\n cursor: pointer;\n text-align: left;\n}\n\n.element-name {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 12px;\n font-weight: 400;\n color: rgba(255, 255, 255, 0.56);\n}\n\n.light .element-name {\n color: rgba(15, 23, 42, 0.62);\n}\n\n.chevron {\n flex-shrink: 0;\n color: rgba(255, 255, 255, 0.48);\n transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);\n}\n\n.chevron.expanded {\n transform: rotate(90deg);\n}\n\n.light .chevron {\n color: rgba(15, 23, 42, 0.4);\n}\n\n.source-file {\n margin-bottom: 8px;\n font-size: 11px;\n line-height: 1.4;\n color: rgba(255, 255, 255, 0.38);\n font-family: ui-monospace, SFMono-Regular, \"SF Mono\", Menlo, Consolas, monospace;\n word-break: break-all;\n}\n\n.light .source-file {\n color: rgba(15, 23, 42, 0.42);\n}\n\n.workflow-summary {\n margin-bottom: 8px;\n}\n\n.status-row {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.status-pill {\n display: inline-flex;\n align-items: center;\n height: 22px;\n padding: 0 8px;\n border-radius: 999px;\n font-size: 11px;\n font-weight: 600;\n letter-spacing: 0.01em;\n}\n\n.status-pill[data-status=\"pending\"] {\n background: rgba(59, 130, 246, 0.16);\n color: #93c5fd;\n}\n\n.status-pill[data-status=\"acknowledged\"] {\n background: rgba(14, 165, 233, 0.16);\n color: #67e8f9;\n}\n\n.status-pill[data-status=\"resolved\"] {\n background: rgba(34, 197, 94, 0.16);\n color: #86efac;\n}\n\n.status-pill[data-status=\"dismissed\"] {\n background: rgba(148, 163, 184, 0.18);\n color: #cbd5e1;\n}\n\n.light .status-pill[data-status=\"pending\"] {\n background: rgba(59, 130, 246, 0.1);\n color: #1d4ed8;\n}\n\n.light .status-pill[data-status=\"acknowledged\"] {\n background: rgba(14, 165, 233, 0.1);\n color: #0f766e;\n}\n\n.light .status-pill[data-status=\"resolved\"] {\n background: rgba(34, 197, 94, 0.1);\n color: #15803d;\n}\n\n.light .status-pill[data-status=\"dismissed\"] {\n background: rgba(148, 163, 184, 0.14);\n color: #475569;\n}\n\n.thread-count {\n font-size: 11px;\n color: rgba(255, 255, 255, 0.46);\n}\n\n.light .thread-count {\n color: rgba(15, 23, 42, 0.44);\n}\n\n.thread-block {\n margin-top: 8px;\n padding: 8px;\n border-radius: 10px;\n background: rgba(255, 255, 255, 0.04);\n}\n\n.light .thread-block {\n background: rgba(15, 23, 42, 0.04);\n}\n\n.thread-title {\n margin-bottom: 6px;\n font-size: 11px;\n font-weight: 600;\n color: rgba(255, 255, 255, 0.62);\n}\n\n.light .thread-title {\n color: rgba(15, 23, 42, 0.58);\n}\n\n.thread-list {\n display: flex;\n flex-direction: column;\n gap: 6px;\n max-height: 144px;\n overflow: auto;\n}\n\n.thread-item {\n padding: 7px 8px;\n border-radius: 8px;\n background: rgba(15, 23, 42, 0.24);\n}\n\n.thread-item[data-role=\"human\"] {\n background: rgba(59, 130, 246, 0.1);\n}\n\n.light .thread-item {\n background: rgba(15, 23, 42, 0.06);\n}\n\n.light .thread-item[data-role=\"human\"] {\n background: rgba(59, 130, 246, 0.08);\n}\n\n.thread-meta {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n margin-bottom: 4px;\n font-size: 10px;\n color: rgba(255, 255, 255, 0.48);\n}\n\n.light .thread-meta {\n color: rgba(15, 23, 42, 0.46);\n}\n\n.thread-content {\n font-size: 12px;\n line-height: 1.45;\n color: rgba(255, 255, 255, 0.86);\n white-space: pre-wrap;\n word-break: break-word;\n}\n\n.light .thread-content {\n color: rgba(15, 23, 42, 0.8);\n}\n\n.styles-wrapper {\n display: grid;\n grid-template-rows: 0fr;\n transition: grid-template-rows 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n}\n\n.styles-wrapper.expanded {\n grid-template-rows: 1fr;\n}\n\n.styles-inner {\n overflow: hidden;\n}\n\n.styles-block {\n margin-bottom: 8px;\n padding: 8px 10px;\n border-radius: 6px;\n background: rgba(255, 255, 255, 0.05);\n font-size: 11px;\n line-height: 1.5;\n font-family: ui-monospace, SFMono-Regular, \"SF Mono\", Menlo, Consolas, monospace;\n}\n\n.light .styles-block {\n background: rgba(15, 23, 42, 0.03);\n}\n\n.style-line {\n color: rgba(255, 255, 255, 0.85);\n word-break: break-word;\n}\n\n.light .style-line {\n color: rgba(15, 23, 42, 0.76);\n}\n\n.style-property {\n color: #c792ea;\n}\n\n.light .style-property {\n color: #7c3aed;\n}\n\n.style-value {\n color: inherit;\n margin-left: 2px;\n}\n\n.quote {\n margin-bottom: 8px;\n padding: 6px 8px;\n border-radius: 4px;\n background: rgba(255, 255, 255, 0.05);\n color: rgba(255, 255, 255, 0.6);\n font-size: 12px;\n font-style: italic;\n line-height: 1.45;\n}\n\n.light .quote {\n background: rgba(15, 23, 42, 0.04);\n color: rgba(15, 23, 42, 0.58);\n}\n\n.textarea {\n width: 100%;\n padding: 8px 10px;\n border: 1px solid rgba(255, 255, 255, 0.15);\n border-radius: 8px;\n background: rgba(255, 255, 255, 0.05);\n color: #ffffff;\n resize: none;\n outline: none;\n font: inherit;\n font-size: 13px;\n line-height: 1.45;\n transition: border-color 0.15s ease, box-shadow 0.15s ease;\n}\n\n.textarea::placeholder {\n color: rgba(255, 255, 255, 0.35);\n}\n\n.textarea:focus {\n border-color: var(--ag-popover-accent, #3c82f7);\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--ag-popover-accent, #3c82f7) 18%, transparent);\n}\n\n.light .textarea {\n background: rgba(15, 23, 42, 0.03);\n color: #1a1a1a;\n border-color: rgba(15, 23, 42, 0.12);\n}\n\n.light .textarea::placeholder {\n color: rgba(15, 23, 42, 0.38);\n}\n\n.textarea::-webkit-scrollbar {\n width: 6px;\n}\n\n.textarea::-webkit-scrollbar-track {\n background: transparent;\n}\n\n.textarea::-webkit-scrollbar-thumb {\n background: rgba(255, 255, 255, 0.2);\n border-radius: 3px;\n}\n\n.light .textarea::-webkit-scrollbar-thumb {\n background: rgba(15, 23, 42, 0.15);\n}\n\n.actions {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: 6px;\n margin-top: 8px;\n}\n\n.delete-wrapper {\n margin-right: auto;\n}\n\n.delete-button {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n padding: 0;\n border: none;\n border-radius: 50%;\n background: transparent;\n color: rgba(255, 255, 255, 0.42);\n cursor: pointer;\n transition:\n background-color 0.15s ease,\n color 0.15s ease,\n transform 0.1s ease;\n}\n\n.delete-button:hover {\n background: rgba(255, 59, 48, 0.25);\n color: #ff3b30;\n}\n\n.delete-button:active {\n transform: scale(0.92);\n}\n\n.light .delete-button {\n color: rgba(15, 23, 42, 0.42);\n}\n\n.light .delete-button:hover {\n background: rgba(255, 59, 48, 0.14);\n}\n\n.btn-ghost,\n.btn-primary {\n border: none;\n border-radius: 999px;\n padding: 6px 14px;\n font: inherit;\n font-size: 12px;\n font-weight: 500;\n cursor: pointer;\n transition:\n background-color 0.15s ease,\n color 0.15s ease,\n opacity 0.15s ease,\n transform 0.1s ease,\n filter 0.15s ease;\n}\n\n.btn-ghost {\n background: transparent;\n color: rgba(255, 255, 255, 0.52);\n}\n\n.btn-ghost:hover {\n background: rgba(255, 255, 255, 0.1);\n color: rgba(255, 255, 255, 0.82);\n}\n\n.light .btn-ghost {\n color: rgba(15, 23, 42, 0.5);\n}\n\n.light .btn-ghost:hover {\n background: rgba(15, 23, 42, 0.06);\n color: rgba(15, 23, 42, 0.76);\n}\n\n.btn-primary {\n color: #ffffff;\n}\n\n.btn-primary:hover:not(:disabled) {\n filter: brightness(0.94);\n}\n\n.btn-primary:active:not(:disabled) {\n transform: scale(0.97);\n}\n\n.btn-primary:disabled {\n opacity: 0.45;\n cursor: not-allowed;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { computed } from \"vue\"\nimport { AREA_SELECTION_KEY } from \"../injection-keys.js\"\nimport { injectStrict } from \"../utils.js\"\n\nconst areaSelection = injectStrict(AREA_SELECTION_KEY, \"area selection state\")\n\nconst selectionRectStyle = computed(() => {\n const rect = areaSelection.rect\n if (!rect) return null\n return {\n top: `${rect.top}px`,\n left: `${rect.left}px`,\n width: `${rect.width}px`,\n height: `${rect.height}px`,\n }\n})\n\nconst matchedBoxes = computed(() => {\n if (!areaSelection.active) return []\n return areaSelection.matched\n .filter((item) => document.contains(item.element))\n .map((item, index) => {\n const rect = item.element.getBoundingClientRect()\n return { key: `match-${index}`, top: rect.top, left: rect.left, width: rect.width, height: rect.height }\n })\n .filter((box) => box.width > 0 && box.height > 0)\n})\n</script>\n\n<template>\n <div v-if=\"areaSelection.active && selectionRectStyle\" class=\"drag-selection-layer\" aria-hidden=\"true\">\n <div\n v-for=\"box in matchedBoxes\"\n :key=\"box.key\"\n class=\"matched-box\"\n :style=\"{ top: `${box.top}px`, left: `${box.left}px`, width: `${box.width}px`, height: `${box.height}px` }\"\n />\n <div class=\"selection-rect\" :style=\"selectionRectStyle\" />\n </div>\n</template>\n\n<style scoped>\n.drag-selection-layer {\n position: fixed;\n inset: 0;\n z-index: 99997;\n pointer-events: none;\n}\n\n.matched-box {\n position: fixed;\n border: 2px solid var(--ag-selected, #f59e0b);\n border-radius: 4px;\n background: color-mix(in srgb, var(--ag-selected, #f59e0b) 10%, transparent);\n}\n\n.selection-rect {\n position: fixed;\n border: 1.5px dashed var(--ag-accent, #3b82f6);\n border-radius: 6px;\n background: color-mix(in srgb, var(--ag-accent, #3b82f6) 8%, transparent);\n box-shadow: 0 0 0 1px color-mix(in srgb, var(--ag-accent, #3b82f6) 20%, transparent);\n}\n\n@media (prefers-reduced-motion: reduce) {\n .matched-box,\n .selection-rect {\n transition: none;\n }\n}\n</style>\n","<script setup lang=\"ts\">\nimport { computed, onMounted, onUnmounted, reactive, watch } from \"vue\"\nimport { AREA_SELECTION_KEY, SELECTION_KEY } from \"../injection-keys.js\"\nimport { injectStrict } from \"../utils.js\"\n\ninterface HighlightBox {\n key: string\n isSelected: boolean\n top: number\n left: number\n width: number\n height: number\n}\n\nconst selection = injectStrict(SELECTION_KEY, \"selection state\")\nconst areaSelection = injectStrict(AREA_SELECTION_KEY, \"area selection state\")\n\nconst state = reactive({\n boxes: [] as HighlightBox[],\n})\n\nconst boxes = computed(() =>\n state.boxes.map((box) => ({\n ...box,\n style: {\n top: `${box.top}px`,\n left: `${box.left}px`,\n width: `${box.width}px`,\n height: `${box.height}px`,\n },\n })),\n)\n\nwatch(\n () => [selection.hovered, selection.selected, areaSelection.active] as const,\n () => syncBoxes(),\n { immediate: true },\n)\n\nonMounted(() => {\n window.addEventListener(\"scroll\", syncBoxes, true)\n window.addEventListener(\"resize\", syncBoxes)\n})\n\nonUnmounted(() => {\n window.removeEventListener(\"scroll\", syncBoxes, true)\n window.removeEventListener(\"resize\", syncBoxes)\n})\n\nfunction syncBoxes(): void {\n // Hide highlights during area drag (DragSelectionLayer handles visuals)\n if (areaSelection.active) {\n state.boxes = []\n return\n }\n\n const selected = selection.selected\n\n // Multi-select: show highlight per selected element\n if (selected?.multiSelectElements?.length) {\n const next = selected.multiSelectElements\n .filter((el) => document.contains(el))\n .map((el, index) => {\n const rect = el.getBoundingClientRect()\n return rect.width > 0 && rect.height > 0\n ? { key: `selected-${index}`, isSelected: true, top: rect.top, left: rect.left, width: rect.width, height: rect.height }\n : null\n })\n .filter((box): box is HighlightBox => box !== null)\n\n if (next.length > 0) {\n state.boxes = next\n return\n }\n }\n\n // Fallback for persisted multi-select (no live DOM refs)\n if (selected?.isMultiSelect && selected.elementBoundingBoxes?.length) {\n state.boxes = selected.elementBoundingBoxes\n .map((bb, index) => ({\n key: `selected-${index}`,\n isSelected: true,\n top: bb.y - window.scrollY,\n left: bb.x - window.scrollX,\n width: bb.width,\n height: bb.height,\n }))\n .filter((box) => box.width > 0 && box.height > 0)\n return\n }\n\n // Single-element: hover or selected\n const snapshot = selected ?? selection.hovered\n if (!snapshot) {\n state.boxes = []\n return\n }\n\n const rect = snapshot.element.getBoundingClientRect()\n if (rect.width <= 0 && rect.height <= 0) {\n state.boxes = []\n return\n }\n\n state.boxes = [{\n key: selected ? \"selected\" : \"hovered\",\n isSelected: selected !== null,\n top: rect.top,\n left: rect.left,\n width: rect.width,\n height: rect.height,\n }]\n}\n</script>\n\n<template>\n <div class=\"highlight-layer\" aria-hidden=\"true\">\n <TransitionGroup name=\"highlight\">\n <div\n v-for=\"box in boxes\"\n :key=\"box.key\"\n class=\"highlight-box\"\n :class=\"{ selected: box.isSelected }\"\n :style=\"box.style\"\n />\n </TransitionGroup>\n </div>\n</template>\n\n<style scoped>\n.highlight-layer {\n position: fixed;\n inset: 0;\n z-index: 99999;\n pointer-events: none;\n}\n\n.highlight-box {\n position: fixed;\n border: 2px solid var(--ag-accent, #3b82f6);\n border-radius: 4px;\n background: color-mix(in srgb, var(--ag-accent, #3b82f6) 8%, transparent);\n transition:\n top 0.06s ease-out,\n left 0.06s ease-out,\n width 0.06s ease-out,\n height 0.06s ease-out,\n border-color 0.12s ease,\n background-color 0.12s ease;\n}\n\n.highlight-box.selected {\n border-color: var(--ag-selected, #f59e0b);\n background: color-mix(in srgb, var(--ag-selected, #f59e0b) 10%, transparent);\n}\n\n.highlight-enter-active,\n.highlight-leave-active {\n transition: opacity 0.15s ease;\n}\n\n.highlight-enter-from,\n.highlight-leave-to {\n opacity: 0;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .highlight-box {\n transition: none;\n }\n\n .highlight-enter-active,\n .highlight-leave-active {\n transition: none;\n }\n}\n</style>\n","<script setup lang=\"ts\">\nimport { computed, onMounted, onUnmounted, reactive, ref } from \"vue\"\nimport type { AnnotationStatus, AnnotationV2 } from \"@liuovo/agentation-vue-core\"\nimport { findAnnotationTarget } from \"../annotation-target.js\"\nimport { ANNOTATIONS_STORE_KEY, I18N_KEY, OVERLAY_KEY, SETTINGS_KEY } from \"../injection-keys.js\"\nimport { injectStrict } from \"../utils.js\"\n\ninterface BoundingBox {\n x: number\n y: number\n width: number\n height: number\n}\n\ninterface MarkerPosition {\n id: string\n number: number\n top: number\n left: number\n annotation: AnnotationV2\n}\n\nconst store = injectStrict(ANNOTATIONS_STORE_KEY, \"annotations store\")\nconst overlay = injectStrict(OVERLAY_KEY, \"overlay state\")\nconst settings = injectStrict(SETTINGS_KEY, \"settings state\")\nconst i18n = injectStrict(I18N_KEY, \"i18n state\")\n\nconst hoveredId = ref<string | null>(null)\nconst messages = computed(() => i18n.messages)\nconst syncVersion = ref(0)\n\nconst scroll = reactive({\n x: window.scrollX,\n y: window.scrollY,\n})\n\nconst showMarkers = computed(() => settings.showMarkers)\nconst annotationColor = computed(() => settings.annotationColor || \"#3c82f7\")\n\nconst markers = computed<MarkerPosition[]>(() => {\n syncVersion.value\n\n return store.annotations\n .map((annotation, index) => {\n const metadata = annotation.metadata as { isMultiSelect?: boolean } | undefined\n\n if (metadata?.isMultiSelect) {\n const bb = getBoundingBox(annotation)\n if (!bb) return null\n\n return {\n id: annotation.id,\n number: index + 1,\n top: bb.y - scroll.y,\n left: bb.x + bb.width / 2 - scroll.x,\n annotation,\n }\n }\n\n const liveTarget = findAnnotationTarget(annotation)\n if (!liveTarget) return null\n\n const liveRect = liveTarget.getBoundingClientRect()\n\n return {\n id: annotation.id,\n number: index + 1,\n top: liveRect.top,\n left: liveRect.left + liveRect.width / 2,\n annotation,\n }\n })\n .filter((m): m is MarkerPosition => m !== null)\n})\n\nlet syncFrame: number | null = null\nlet resizeObserver: ResizeObserver | null = null\nlet mutationObserver: MutationObserver | null = null\n\nonMounted(() => {\n window.addEventListener(\"scroll\", scheduleLayoutSync, true)\n window.addEventListener(\"resize\", scheduleLayoutSync)\n document.addEventListener(\"load\", scheduleLayoutSync, true)\n document.addEventListener(\"transitionend\", scheduleLayoutSync, true)\n document.addEventListener(\"animationend\", scheduleLayoutSync, true)\n\n if (typeof ResizeObserver !== \"undefined\") {\n resizeObserver = new ResizeObserver(() => scheduleLayoutSync())\n resizeObserver.observe(document.documentElement)\n if (document.body) {\n resizeObserver.observe(document.body)\n }\n }\n\n mutationObserver = new MutationObserver(() => scheduleLayoutSync())\n mutationObserver.observe(document.documentElement, {\n subtree: true,\n childList: true,\n characterData: true,\n })\n mutationObserver.observe(document.documentElement, {\n attributes: true,\n attributeFilter: [\"class\", \"style\"],\n })\n if (document.body) {\n mutationObserver.observe(document.body, {\n attributes: true,\n attributeFilter: [\"class\", \"style\"],\n })\n }\n\n scheduleLayoutSync()\n})\n\nonUnmounted(() => {\n window.removeEventListener(\"scroll\", scheduleLayoutSync, true)\n window.removeEventListener(\"resize\", scheduleLayoutSync)\n document.removeEventListener(\"load\", scheduleLayoutSync, true)\n document.removeEventListener(\"transitionend\", scheduleLayoutSync, true)\n document.removeEventListener(\"animationend\", scheduleLayoutSync, true)\n resizeObserver?.disconnect()\n mutationObserver?.disconnect()\n if (syncFrame !== null) {\n window.cancelAnimationFrame(syncFrame)\n }\n})\n\nfunction scheduleLayoutSync(): void {\n if (syncFrame !== null) return\n\n syncFrame = window.requestAnimationFrame(() => {\n syncFrame = null\n syncLayout()\n })\n}\n\nfunction syncLayout(): void {\n scroll.x = window.scrollX\n scroll.y = window.scrollY\n syncVersion.value += 1\n}\n\nfunction onMarkerHover(id: string): void {\n hoveredId.value = id\n}\n\nfunction onMarkerLeave(): void {\n hoveredId.value = null\n}\n\nfunction onMarkerClick(marker: MarkerPosition, event: MouseEvent): void {\n event.stopPropagation()\n hoveredId.value = null\n\n const btn = event.currentTarget as HTMLElement\n const rect = btn.getBoundingClientRect()\n overlay.showEditPopover(marker.annotation, rect)\n}\n\nfunction truncate(text: string, max = 72): string {\n return text.length > max ? `${text.slice(0, max)}…` : text\n}\n\nfunction getStatus(annotation: AnnotationV2): AnnotationStatus {\n return annotation.status ?? \"pending\"\n}\n\nfunction getStatusLabel(annotation: AnnotationV2): string {\n switch (getStatus(annotation)) {\n case \"acknowledged\":\n return messages.value.workflow.statusAcknowledged\n case \"resolved\":\n return messages.value.workflow.statusResolved\n case \"dismissed\":\n return messages.value.workflow.statusDismissed\n default:\n return messages.value.workflow.statusPending\n }\n}\n\nfunction getMarkerColor(annotation: AnnotationV2): string {\n switch (getStatus(annotation)) {\n case \"acknowledged\":\n return \"#0ea5e9\"\n case \"resolved\":\n return \"#22c55e\"\n case \"dismissed\":\n return \"#94a3b8\"\n default:\n return annotationColor.value\n }\n}\n\nfunction getBoundingBox(annotation: AnnotationV2): BoundingBox | undefined {\n return (annotation.metadata as { boundingBox?: BoundingBox } | undefined)?.boundingBox\n}\n</script>\n\n<template>\n <div v-if=\"showMarkers\" class=\"marker-layer\" aria-hidden=\"true\" data-annotation-marker>\n <TransitionGroup name=\"marker\">\n <div\n v-for=\"marker in markers\"\n :key=\"marker.id\"\n class=\"marker-wrapper\"\n :style=\"{ top: `${marker.top}px`, left: `${marker.left}px` }\"\n >\n <button\n class=\"marker-dot\"\n :class=\"[{ hovered: hoveredId === marker.id }, `status-${getStatus(marker.annotation)}`]\"\n :style=\"{ backgroundColor: hoveredId === marker.id ? '#ff3b30' : getMarkerColor(marker.annotation) }\"\n type=\"button\"\n :aria-label=\"messages.marker.annotationAria(marker.number)\"\n @click.stop=\"onMarkerClick(marker, $event)\"\n @mouseenter=\"onMarkerHover(marker.id)\"\n @mouseleave=\"onMarkerLeave\"\n >\n {{ marker.number }}\n </button>\n\n <!-- Tooltip (below marker) -->\n <Transition name=\"tooltip\">\n <div\n v-if=\"hoveredId === marker.id\"\n class=\"tooltip\"\n >\n <div class=\"tooltip-element\">{{ marker.annotation.elementSelector }}</div>\n <div class=\"tooltip-meta\">\n <span class=\"tooltip-status\" :data-status=\"getStatus(marker.annotation)\">\n {{ getStatusLabel(marker.annotation) }}\n </span>\n <span v-if=\"marker.annotation.thread?.length\" class=\"tooltip-thread\">\n {{ messages.workflow.replyCount(marker.annotation.thread.length) }}\n </span>\n </div>\n <div class=\"tooltip-comment\">{{ truncate(marker.annotation.comment) }}</div>\n <div class=\"tooltip-hint\">{{ messages.marker.clickToEdit }}</div>\n </div>\n </Transition>\n </div>\n </TransitionGroup>\n </div>\n</template>\n\n<style scoped>\n@keyframes markerIn {\n 0% { opacity: 0; transform: translate(-50%, -50%) scale(0.3); }\n 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }\n}\n\n@keyframes markerOut {\n 0% { opacity: 1; transform: translate(-50%, -50%) scale(1); }\n 100% { opacity: 0; transform: translate(-50%, -50%) scale(0.3); }\n}\n\n.marker-layer {\n position: fixed;\n inset: 0;\n z-index: 99998;\n pointer-events: none;\n}\n\n.marker-wrapper {\n position: fixed;\n pointer-events: none;\n}\n\n.marker-dot {\n position: absolute;\n transform: translate(-50%, -50%) scale(1);\n width: 22px;\n height: 22px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border: none;\n border-radius: 50%;\n color: white;\n font-size: 11px;\n font-weight: 600;\n line-height: 1;\n box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2), inset 0 0 0 1px rgba(0, 0, 0, 0.04);\n cursor: pointer;\n pointer-events: auto;\n user-select: none;\n will-change: transform, background-color;\n z-index: 1;\n transition: background-color 0.15s ease, transform 0.1s ease;\n}\n\n.marker-dot:hover {\n transform: translate(-50%, -50%) scale(1.1);\n z-index: 2;\n}\n\n.marker-dot.hovered {\n background-color: #ff3b30;\n}\n\n/* Marker enter/exit animations */\n.marker-enter-active {\n animation: markerIn 0.25s cubic-bezier(0.22, 1, 0.36, 1) both;\n}\n.marker-leave-active {\n animation: markerOut 0.2s ease-out both;\n pointer-events: none;\n}\n\n/* Tooltip — positioned below marker */\n.tooltip {\n position: absolute;\n top: calc(50% + 18px);\n left: 50%;\n /* Counter-scale: 1/1.1 ≈ 0.909 to offset parent hover scale */\n transform: translateX(-50%) scale(0.909);\n z-index: 100002;\n background: #1a1a1a;\n padding: 8px 12px;\n border-radius: 12px;\n font-family: system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif;\n font-weight: 400;\n color: #fff;\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.08);\n min-width: 120px;\n max-width: 200px;\n pointer-events: none;\n cursor: default;\n white-space: nowrap;\n overflow: hidden;\n}\n\n.tooltip-enter-active {\n transition: opacity 0.1s ease-out, transform 0.1s ease-out;\n}\n.tooltip-leave-active {\n transition: opacity 0.08s ease-in;\n}\n.tooltip-enter-from {\n opacity: 0;\n transform: translateX(-50%) translateY(2px) scale(0.891);\n}\n.tooltip-leave-to {\n opacity: 0;\n}\n\n.tooltip-element {\n font-size: 12px;\n font-style: italic;\n color: rgba(255, 255, 255, 0.6);\n margin-bottom: 4px;\n line-height: 1.4;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.tooltip-comment {\n font-size: 13px;\n line-height: 1.4;\n color: #fff;\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 2px;\n}\n\n.tooltip-meta {\n display: flex;\n align-items: center;\n gap: 6px;\n margin-bottom: 4px;\n font-size: 10px;\n}\n\n.tooltip-status {\n display: inline-flex;\n align-items: center;\n padding: 2px 6px;\n border-radius: 999px;\n font-weight: 600;\n background: rgba(148, 163, 184, 0.18);\n color: #cbd5e1;\n}\n\n.tooltip-status[data-status=\"pending\"] {\n background: rgba(59, 130, 246, 0.16);\n color: #93c5fd;\n}\n\n.tooltip-status[data-status=\"acknowledged\"] {\n background: rgba(14, 165, 233, 0.16);\n color: #67e8f9;\n}\n\n.tooltip-status[data-status=\"resolved\"] {\n background: rgba(34, 197, 94, 0.16);\n color: #86efac;\n}\n\n.tooltip-thread {\n color: rgba(255, 255, 255, 0.48);\n}\n\n.tooltip-hint {\n font-size: 10px;\n color: rgba(255, 255, 255, 0.5);\n margin-top: 6px;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .marker-dot { transition: none; }\n .marker-enter-active,\n .marker-leave-active { animation: none; }\n .tooltip-enter-active,\n .tooltip-leave-active { transition: none; }\n}\n</style>\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\n/** @deprecated Use Vue's built-in `watch` instead. This function will be removed in future version. */\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 Vue's built-in `watch` instead. This function will be removed in future version. */\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(watchPausable(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(watchPausable(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, promiseTimeout, provideLocal, pxValue, syncRef, throttleFilter, timestamp, toArray, toRef, toRefs, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useDebounceFn, useIntervalFn, useThrottleFn, useTimeoutFn, watchIgnorable, watchImmediate, watchOnce, watchPausable, 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 = null, window: window$1 = defaultWindow, once = false } = options;\n\tconst isActive = shallowRef(false);\n\tconst intervalLimit = computed(() => {\n\t\tconst limit = toValue(fpsLimit);\n\t\treturn limit ? 1e3 / limit : 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\treturn 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}\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 } = watchPausable(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\nfunction getDefaultScheduler$8(options) {\n\tif (\"interval\" in options || \"immediate\" in options) {\n\t\tconst { interval = 1e3, immediate = false } = options;\n\t\treturn (cb) => useIntervalFn(cb, interval, { immediate });\n\t}\n\treturn (cb) => useIntervalFn(cb, 1e3, { immediate: false });\n}\n/**\n* Reactive countdown timer in seconds.\n*\n* @param initialCountdown\n* @param options\n*\n* @see https://vueuse.org/useCountdown\n*/\nfunction useCountdown(initialCountdown, options = {}) {\n\tconst remaining = shallowRef(toValue(initialCountdown));\n\tconst { scheduler = getDefaultScheduler$8(options), onTick, onComplete } = options;\n\tconst controls = scheduler(() => {\n\t\tconst value = remaining.value - 1;\n\t\tremaining.value = value < 0 ? 0 : value;\n\t\tonTick === null || onTick === void 0 || onTick();\n\t\tif (remaining.value <= 0) {\n\t\t\tcontrols.pause();\n\t\t\tonComplete === null || onComplete === void 0 || onComplete();\n\t\t}\n\t});\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\tcontrols.pause();\n\t\treset();\n\t};\n\tconst resume = () => {\n\t\tif (!controls.isActive.value) {\n\t\t\tif (remaining.value > 0) controls.resume();\n\t\t}\n\t};\n\tconst start = (countdown) => {\n\t\treset(countdown);\n\t\tcontrols.resume();\n\t};\n\treturn {\n\t\tremaining,\n\t\treset,\n\t\tstop,\n\t\tstart,\n\t\tpause: controls.pause,\n\t\tresume,\n\t\tisActive: controls.isActive\n\t};\n}\n\n//#endregion\n//#region useCssSupports/index.ts\nfunction useCssSupports(...args) {\n\tlet options = {};\n\tif (typeof toValue(args.at(-1)) === \"object\") options = args.pop();\n\tconst [prop, value] = args;\n\tconst { window: window$1 = defaultWindow, ssrValue = false } = options;\n\tconst isMounted = useMounted();\n\treturn { isSupported: computed(() => {\n\t\tisMounted.value;\n\t\tif (!isClient) return ssrValue;\n\t\treturn args.length === 2 ? window$1 === null || window$1 === void 0 ? void 0 : window$1.CSS.supports(toValue(prop), toValue(value)) : window$1 === null || window$1 === void 0 ? void 0 : window$1.CSS.supports(toValue(prop));\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\nconst defaultScrollConfig = {\n\tspeed: 2,\n\tmargin: 30,\n\tdirection: \"both\"\n};\nfunction clampContainerScroll(container) {\n\tif (container.scrollLeft > container.scrollWidth - container.clientWidth) container.scrollLeft = Math.max(0, container.scrollWidth - container.clientWidth);\n\tif (container.scrollTop > container.scrollHeight - container.clientHeight) container.scrollTop = Math.max(0, container.scrollHeight - container.clientHeight);\n}\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, _toValue2, _toValue3, _scrollConfig$directi;\n\tconst { pointerTypes, preventDefault: preventDefault$1, stopPropagation, exact, onMove, onEnd, onStart, initialValue, axis = \"both\", draggingElement = defaultWindow, containerElement, handle: draggingHandle = target, buttons = [0], restrictInView, autoScroll = false } = 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 scrollConfig = toValue(autoScroll);\n\tconst scrollSettings = typeof scrollConfig === \"object\" ? {\n\t\tspeed: (_toValue2 = toValue(scrollConfig.speed)) !== null && _toValue2 !== void 0 ? _toValue2 : defaultScrollConfig.speed,\n\t\tmargin: (_toValue3 = toValue(scrollConfig.margin)) !== null && _toValue3 !== void 0 ? _toValue3 : defaultScrollConfig.margin,\n\t\tdirection: (_scrollConfig$directi = scrollConfig.direction) !== null && _scrollConfig$directi !== void 0 ? _scrollConfig$directi : defaultScrollConfig.direction\n\t} : defaultScrollConfig;\n\tconst getScrollAxisValues = (value) => typeof value === \"number\" ? [value, value] : [value.x, value.y];\n\tconst handleAutoScroll = (container, targetRect, position$1) => {\n\t\tconst { clientWidth, clientHeight, scrollLeft, scrollTop, scrollWidth, scrollHeight } = container;\n\t\tconst [marginX, marginY] = getScrollAxisValues(scrollSettings.margin);\n\t\tconst [speedX, speedY] = getScrollAxisValues(scrollSettings.speed);\n\t\tlet deltaX = 0;\n\t\tlet deltaY = 0;\n\t\tif (scrollSettings.direction === \"x\" || scrollSettings.direction === \"both\") {\n\t\t\tif (position$1.x < marginX && scrollLeft > 0) deltaX = -speedX;\n\t\t\telse if (position$1.x + targetRect.width > clientWidth - marginX && scrollLeft < scrollWidth - clientWidth) deltaX = speedX;\n\t\t}\n\t\tif (scrollSettings.direction === \"y\" || scrollSettings.direction === \"both\") {\n\t\t\tif (position$1.y < marginY && scrollTop > 0) deltaY = -speedY;\n\t\t\telse if (position$1.y + targetRect.height > clientHeight - marginY && scrollTop < scrollHeight - clientHeight) deltaY = speedY;\n\t\t}\n\t\tif (deltaX || deltaY) container.scrollBy({\n\t\t\tleft: deltaX,\n\t\t\ttop: deltaY,\n\t\t\tbehavior: \"auto\"\n\t\t});\n\t};\n\tlet autoScrollInterval = null;\n\tconst startAutoScroll = () => {\n\t\tconst container = toValue(containerElement);\n\t\tif (container && !autoScrollInterval) autoScrollInterval = setInterval(() => {\n\t\t\tconst targetRect = toValue(target).getBoundingClientRect();\n\t\t\tconst { x, y } = position.value;\n\t\t\tconst relativePosition = {\n\t\t\t\tx: x - container.scrollLeft,\n\t\t\t\ty: y - container.scrollTop\n\t\t\t};\n\t\t\tif (relativePosition.x >= 0 && relativePosition.y >= 0) {\n\t\t\t\thandleAutoScroll(container, targetRect, relativePosition);\n\t\t\t\trelativePosition.x += container.scrollLeft;\n\t\t\t\trelativePosition.y += container.scrollTop;\n\t\t\t\tposition.value = relativePosition;\n\t\t\t}\n\t\t}, 1e3 / 60);\n\t};\n\tconst stopAutoScroll = () => {\n\t\tif (autoScrollInterval) {\n\t\t\tclearInterval(autoScrollInterval);\n\t\t\tautoScrollInterval = null;\n\t\t}\n\t};\n\tconst isPointerNearEdge = (pointer, container, margin, targetRect) => {\n\t\tconst [marginX, marginY] = typeof margin === \"number\" ? [margin, margin] : [margin.x, margin.y];\n\t\tconst { clientWidth, clientHeight } = container;\n\t\treturn pointer.x < marginX || pointer.x + targetRect.width > clientWidth - marginX || pointer.y < marginY || pointer.y + targetRect.height > clientHeight - marginY;\n\t};\n\tconst checkAutoScroll = () => {\n\t\tif (toValue(options.disabled) || !pressedDelta.value) return;\n\t\tconst container = toValue(containerElement);\n\t\tif (!container) return;\n\t\tconst targetRect = toValue(target).getBoundingClientRect();\n\t\tconst { x, y } = position.value;\n\t\tif (isPointerNearEdge({\n\t\t\tx: x - container.scrollLeft,\n\t\t\ty: y - container.scrollTop\n\t\t}, container, scrollSettings.margin, targetRect)) startAutoScroll();\n\t\telse stopAutoScroll();\n\t};\n\tif (toValue(autoScroll)) watch(position, checkAutoScroll);\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 + (autoScroll ? 0 : container.scrollLeft) : targetRect.left),\n\t\t\ty: e.clientY - (container ? targetRect.top - containerRect.top + (autoScroll ? 0 : 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\tif (container instanceof HTMLElement) clampContainerScroll(container);\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\tif (toValue(autoScroll) && container) {\n\t\t\tif (autoScrollInterval === null) handleAutoScroll(container, targetRect, {\n\t\t\t\tx,\n\t\t\t\ty\n\t\t\t});\n\t\t\tx += container.scrollLeft;\n\t\t\ty += container.scrollTop;\n\t\t}\n\t\tif (container && (restrictInView || autoScroll)) {\n\t\t\tif (axis !== \"y\") {\n\t\t\t\tconst relativeX = x - container.scrollLeft;\n\t\t\t\tif (relativeX < 0) x = container.scrollLeft;\n\t\t\t\telse if (relativeX > container.clientWidth - targetRect.width) x = container.clientWidth - targetRect.width + container.scrollLeft;\n\t\t\t}\n\t\t\tif (axis !== \"x\") {\n\t\t\t\tconst relativeY = y - container.scrollTop;\n\t\t\t\tif (relativeY < 0) y = container.scrollTop;\n\t\t\t\telse if (relativeY > container.clientHeight - targetRect.height) y = container.clientHeight - targetRect.height + container.scrollTop;\n\t\t\t}\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\tif (autoScroll) stopAutoScroll();\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(() => `\n left: ${position.value.x}px;\n top: ${position.value.y}px;\n ${autoScroll ? \"text-wrap: nowrap;\" : \"\"}\n `)\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\nfunction getDefaultScheduler$7(options) {\n\tif (\"interval\" in options || \"immediate\" in options) {\n\t\tconst { interval = \"requestAnimationFrame\", immediate = true } = options;\n\t\treturn interval === \"requestAnimationFrame\" ? (cb) => useRafFn(cb, { immediate }) : (cb) => useIntervalFn(cb, interval, { immediate });\n\t}\n\treturn useRafFn;\n}\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, scheduler = getDefaultScheduler$7(options) } = 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\treturn {\n\t\tisSupported,\n\t\telement,\n\t\t...scheduler(() => {\n\t\t\tvar _document$elementsFro, _document$elementFrom;\n\t\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\t})\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, 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\ttoValue(rootMargin),\n\t\tisActive.value\n\t], ([targets$1, root$1, rootMargin$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: rootMargin$1,\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\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 || promise.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) promise.value = Promise.all([onLoadMore(state), new Promise((resolve) => setTimeout(resolve, interval))]).finally(() => {\n\t\t\tpromise.value = null;\n\t\t\tnextTick(() => checkAndLoad());\n\t\t});\n\t}\n\ttryOnUnmounted(watch(() => [\n\t\tstate.arrivedState[direction],\n\t\tisElementVisible.value,\n\t\tcanLoad.value\n\t], checkAndLoad, {\n\t\timmediate: true,\n\t\tflush: \"post\"\n\t}));\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 = Boolean(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\nfunction getDefaultScheduler$6(options) {\n\tif (\"interval\" in options || \"immediate\" in options || \"immediateCallback\" in options) {\n\t\tconst { interval = 1e3, immediate, immediateCallback } = options;\n\t\treturn (cb) => useIntervalFn(cb, interval, {\n\t\t\timmediate,\n\t\t\timmediateCallback\n\t\t});\n\t}\n\treturn useIntervalFn;\n}\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 { scheduler = getDefaultScheduler$6 } = options;\n\t\tscheduler(() => {\n\t\t\tmemory.value = performance.memory;\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\nfunction getDefaultScheduler$5(options) {\n\tif (\"interval\" in options || \"immediate\" in options) {\n\t\tconst { interval = \"requestAnimationFrame\", immediate = true } = options;\n\t\treturn interval === \"requestAnimationFrame\" ? (fn) => useRafFn(fn, { immediate }) : (fn) => useIntervalFn(fn, interval, options);\n\t}\n\treturn useRafFn;\n}\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, scheduler = getDefaultScheduler$5(options) } = options;\n\tconst now = ref(/* @__PURE__ */ new Date());\n\tconst update = () => now.value = /* @__PURE__ */ new Date();\n\tconst controls = scheduler(update);\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}\nfunction getDefaultScheduler$4(options) {\n\tif (\"updateInterval\" in options) {\n\t\tconst { updateInterval = 3e4 } = options;\n\t\treturn (cb) => useIntervalFn(cb, updateInterval);\n\t}\n\treturn (cb) => useIntervalFn(cb, 3e4);\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, scheduler = getDefaultScheduler$4(options) } = options;\n\tconst { now,...controls } = useNow({\n\t\tscheduler,\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 getDefaultScheduler$3(options) {\n\tif (\"updateInterval\" in options) {\n\t\tconst { updateInterval = 3e4 } = options;\n\t\treturn (cb) => useIntervalFn(cb, updateInterval);\n\t}\n\treturn (cb) => useIntervalFn(cb, 3e4);\n}\nfunction useTimeAgoIntl(time, options = {}) {\n\tconst { controls: exposeControls = false, scheduler = getDefaultScheduler$3(options) } = options;\n\tconst { now,...controls } = useNow({\n\t\tscheduler,\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 getDefaultScheduler$2(options) {\n\tif (\"interval\" in options || \"immediate\" in options) {\n\t\tconst { interval = \"requestAnimationFrame\", immediate = true } = options;\n\t\treturn interval === \"requestAnimationFrame\" ? (cb) => useRafFn(cb, { immediate }) : (cb) => useIntervalFn(cb, interval, { immediate });\n\t}\n\treturn useRafFn;\n}\nfunction useTimestamp(options = {}) {\n\tconst { controls: exposeControls = false, offset = 0, scheduler = getDefaultScheduler$2(options), callback } = options;\n\tconst ts = shallowRef(timestamp() + offset);\n\tconst update = () => ts.value = timestamp() + offset;\n\tconst controls = scheduler(callback ? () => {\n\t\tupdate();\n\t\tcallback(ts.value);\n\t} : update);\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 } = watchPausable(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\nfunction getDefaultScheduler$1(options = { interval: 0 }) {\n\tconst { interval } = options;\n\tif (interval === 0) return;\n\treturn (fn) => useIntervalFn(fn, interval, {\n\t\timmediate: false,\n\t\timmediateCallback: false\n\t});\n}\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 = [], scheduler = getDefaultScheduler$1(options), navigator: navigator$1 = defaultNavigator } = options || {};\n\tconst isSupported = /* @__PURE__ */ useSupported(() => typeof navigator$1 !== \"undefined\" && \"vibrate\" in navigator$1);\n\tconst patternRef = toRef(pattern);\n\tconst vibrate = (pattern$1 = patternRef.value) => {\n\t\tif (isSupported.value) navigator$1.vibrate(pattern$1);\n\t};\n\tconst intervalControls = scheduler === null || scheduler === void 0 ? void 0 : scheduler(vibrate);\n\tconst stop = () => {\n\t\tif (isSupported.value) navigator$1.vibrate(0);\n\t\tintervalControls === null || intervalControls === void 0 || intervalControls.pause();\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}\nfunction getDefaultScheduler(options) {\n\tif (\"interval\" in options) {\n\t\tconst { interval = 1e3 } = options;\n\t\treturn (cb) => useIntervalFn(cb, interval, { immediate: false });\n\t}\n\treturn (cb) => useIntervalFn(cb, 1e3, { immediate: false });\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, scheduler = getDefaultScheduler(resolveNestedOptions(options.heartbeat)), pongTimeout = 1e3 } = resolveNestedOptions(options.heartbeat);\n\t\tconst { pause, resume } = scheduler(() => {\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});\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, useCssSupports, 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 { useDraggable } from \"@vueuse/core\"\nimport {\n computed,\n onMounted,\n onUnmounted,\n ref,\n shallowRef,\n type ComputedRef,\n type CSSProperties,\n type Ref,\n} from \"vue\"\n\n// ---------------------------------------------------------------------------\n// Types\n// ---------------------------------------------------------------------------\n\nconst STORAGE_KEY = \"agentation-vue-toolbar-position\"\nconst POSITION_SANITY_MULTIPLIER = 3\nconst POSITION_SANITY_MIN_LIMIT = 5000\n\nexport interface ToolbarPosition {\n x: number\n y: number\n}\n\nexport interface ToolbarDragState {\n readonly position: Readonly<Ref<ToolbarPosition | null>>\n readonly isDragging: Readonly<Ref<boolean>>\n readonly justFinishedDrag: Readonly<Ref<boolean>>\n readonly toolbarStyle: ComputedRef<CSSProperties | undefined>\n bindToolbarRef(element: HTMLElement | null): void\n onMouseDown(event: MouseEvent): void\n consumeJustFinishedDrag(): boolean\n syncConstraints(): void\n}\n\n// ---------------------------------------------------------------------------\n// Composable\n// ---------------------------------------------------------------------------\n\n/**\n * Drag composable for the toolbar, powered by @vueuse/core `useDraggable`.\n *\n * Fully reactive — VueUse's `x`/`y` refs are the single source of truth\n * for position. `toolbarStyle` derives from them so Vue's `:style` binding\n * and the drag position are always in sync. No direct DOM writes needed.\n */\nexport function useToolbarDrag(options: {\n padding?: number\n toolbarHeight?: number\n dragThreshold?: number\n} = {}): ToolbarDragState {\n const padding = options.padding ?? 20\n const toolbarHeight = options.toolbarHeight ?? 44\n const dragThreshold = options.dragThreshold ?? 5\n\n // --- Element ref for useDraggable ----------------------------------------\n const toolbarEl = shallowRef<HTMLElement | null>(null)\n\n // --- Whether a position has been set (saved or dragged) ------------------\n // When false, toolbar uses its default CSS position (right/bottom).\n const hasPosition = ref(false)\n\n // --- Drag state ----------------------------------------------------------\n const isDragging = ref(false)\n const justFinishedDrag = ref(false)\n\n interface DragSession {\n pointerX: number\n pointerY: number\n startX: number\n startY: number\n }\n let session: DragSession | null = null\n let cachedWrapperWidth = 297\n let cachedContentWidth = 44\n\n function updateMeasurements(): void {\n const el = toolbarEl.value\n if (!el) return\n\n cachedWrapperWidth = el.offsetWidth || cachedWrapperWidth\n\n const content = el.querySelector<HTMLElement>(\".toolbar-container\")\n if (content) {\n cachedContentWidth = content.offsetWidth || cachedContentWidth\n }\n }\n\n // --- Viewport constraint -------------------------------------------------\n function constrain(pos: ToolbarPosition): ToolbarPosition {\n if (typeof window === \"undefined\") return pos\n const rawOffset = cachedWrapperWidth - cachedContentWidth\n const maxReasonableOffset = window.innerWidth + padding\n const contentOffset = Math.max(0, Math.min(rawOffset, maxReasonableOffset))\n const minX = padding - contentOffset\n const maxX = window.innerWidth - cachedWrapperWidth - padding\n const maxY = window.innerHeight - toolbarHeight - padding\n return {\n x: Math.max(minX, Math.min(Math.max(minX, maxX), pos.x)),\n y: Math.max(padding, Math.min(Math.max(padding, maxY), pos.y)),\n }\n }\n\n // --- Interaction locking -------------------------------------------------\n const DRAG_CLASS = \"agentation-dragging\"\n\n function lockInteraction(): void {\n document.documentElement.classList.add(DRAG_CLASS)\n }\n\n function unlockInteraction(): void {\n document.documentElement.classList.remove(DRAG_CLASS)\n }\n\n // --- Hit-test filter (ignore interactive children) -----------------------\n function isIgnoredTarget(target: EventTarget | null): boolean {\n return target instanceof Element\n && Boolean(target.closest(\"button, input, textarea, select, [data-no-drag]\"))\n }\n\n // --- Load saved position for initialValue --------------------------------\n const saved = loadPosition()\n if (saved) hasPosition.value = true\n const initialPos = saved\n ? (typeof window !== \"undefined\" ? constrain(saved) : saved)\n : { x: 0, y: 0 }\n\n // --- useDraggable (pointer event lifecycle) ------------------------------\n const { x, y } = useDraggable(toolbarEl, {\n initialValue: initialPos,\n preventDefault: true,\n\n onStart(_pos, event) {\n if (event.pointerType === \"mouse\" && event.button !== 0) return false\n if (isIgnoredTarget(event.target)) return false\n\n const el = toolbarEl.value\n if (!el) return false\n\n updateMeasurements()\n justFinishedDrag.value = false\n\n // First drag with no saved position: adopt current CSS position\n if (!hasPosition.value) {\n const rect = el.getBoundingClientRect()\n x.value = rect.left\n y.value = rect.top\n hasPosition.value = true\n }\n\n session = {\n pointerX: event.clientX,\n pointerY: event.clientY,\n startX: x.value,\n startY: y.value,\n }\n },\n\n onMove(dragPos, event) {\n if (!session) return\n\n // Enforce drag threshold before committing to drag mode\n if (!isDragging.value) {\n const dx = event.clientX - session.pointerX\n const dy = event.clientY - session.pointerY\n if (dx * dx + dy * dy <= dragThreshold * dragThreshold) {\n // Snap back to start (undo VueUse's premature position update)\n x.value = session.startX\n y.value = session.startY\n return\n }\n isDragging.value = true\n lockInteraction()\n }\n\n // Apply viewport constraint\n const constrained = constrain(dragPos)\n x.value = constrained.x\n y.value = constrained.y\n },\n\n onEnd() {\n if (session && isDragging.value) {\n savePosition({ x: x.value, y: y.value })\n justFinishedDrag.value = true\n unlockInteraction()\n }\n isDragging.value = false\n session = null\n },\n })\n\n // --- Derived state -------------------------------------------------------\n\n const position = computed<ToolbarPosition | null>(() => {\n if (!hasPosition.value) return null\n return { x: x.value, y: y.value }\n })\n\n const toolbarStyle = computed<CSSProperties | undefined>(() => {\n if (!hasPosition.value) return undefined\n return {\n left: `${x.value}px`,\n top: `${y.value}px`,\n right: \"auto\",\n bottom: \"auto\",\n }\n })\n\n // --- Window blur handler (abort drag cleanly) ----------------------------\n function onWindowBlur(): void {\n if (session && isDragging.value) {\n savePosition({ x: x.value, y: y.value })\n justFinishedDrag.value = true\n unlockInteraction()\n }\n isDragging.value = false\n session = null\n }\n\n // --- Resize handler (re-constrain saved position) ------------------------\n function onResize(): void {\n updateMeasurements()\n if (isDragging.value || !hasPosition.value) return\n const constrained = constrain({ x: x.value, y: y.value })\n x.value = constrained.x\n y.value = constrained.y\n savePosition(constrained)\n }\n\n function syncConstraints(): void {\n updateMeasurements()\n if (!hasPosition.value) return\n const constrained = constrain({ x: x.value, y: y.value })\n x.value = constrained.x\n y.value = constrained.y\n savePosition(constrained)\n }\n\n let postMountTimer: number | null = null\n let postMountRaf: number | null = null\n\n function schedulePostMountSync(): void {\n if (typeof window === \"undefined\") return\n postMountRaf = window.requestAnimationFrame(() => {\n syncConstraints()\n postMountTimer = window.setTimeout(() => {\n syncConstraints()\n postMountTimer = null\n }, 120)\n postMountRaf = null\n })\n }\n\n // --- Public API ----------------------------------------------------------\n\n function bindToolbarRef(element: HTMLElement | null): void {\n if (toolbarEl.value === element) return\n toolbarEl.value = element\n updateMeasurements()\n }\n\n /** Noop — retained for API compatibility. Drag is now handled by useDraggable. */\n function onMouseDown(_event: MouseEvent): void {}\n\n function consumeJustFinishedDrag(): boolean {\n const v = justFinishedDrag.value\n justFinishedDrag.value = false\n return v\n }\n\n // --- Lifecycle -----------------------------------------------------------\n\n onMounted(() => {\n // Re-constrain on mount (window size may differ from when position was saved)\n updateMeasurements()\n if (hasPosition.value) {\n const constrained = constrain({ x: x.value, y: y.value })\n x.value = constrained.x\n y.value = constrained.y\n savePosition(constrained)\n }\n\n schedulePostMountSync()\n\n window.addEventListener(\"resize\", onResize)\n window.addEventListener(\"blur\", onWindowBlur)\n })\n\n onUnmounted(() => {\n if (isDragging.value) unlockInteraction()\n isDragging.value = false\n session = null\n if (postMountTimer != null) {\n window.clearTimeout(postMountTimer)\n postMountTimer = null\n }\n if (postMountRaf != null) {\n window.cancelAnimationFrame(postMountRaf)\n postMountRaf = null\n }\n window.removeEventListener(\"resize\", onResize)\n window.removeEventListener(\"blur\", onWindowBlur)\n })\n\n return {\n position,\n isDragging,\n justFinishedDrag,\n toolbarStyle,\n bindToolbarRef,\n onMouseDown,\n consumeJustFinishedDrag,\n syncConstraints,\n }\n}\n\n// ---------------------------------------------------------------------------\n// localStorage helpers\n// ---------------------------------------------------------------------------\n\nfunction loadPosition(): ToolbarPosition | null {\n if (typeof window === \"undefined\") return null\n try {\n const raw = window.localStorage.getItem(STORAGE_KEY)\n if (!raw) return null\n const parsed = JSON.parse(raw) as Partial<ToolbarPosition>\n if (typeof parsed.x !== \"number\" || typeof parsed.y !== \"number\") return null\n if (!Number.isFinite(parsed.x) || !Number.isFinite(parsed.y)) return null\n\n const limitX = Math.max(window.innerWidth * POSITION_SANITY_MULTIPLIER, POSITION_SANITY_MIN_LIMIT)\n const limitY = Math.max(window.innerHeight * POSITION_SANITY_MULTIPLIER, POSITION_SANITY_MIN_LIMIT)\n if (Math.abs(parsed.x) > limitX || Math.abs(parsed.y) > limitY) {\n window.localStorage.removeItem(STORAGE_KEY)\n return null\n }\n\n return { x: parsed.x, y: parsed.y }\n } catch {\n return null\n }\n}\n\nfunction savePosition(pos: ToolbarPosition): void {\n if (typeof window === \"undefined\") return\n try {\n window.localStorage.setItem(STORAGE_KEY, JSON.stringify(pos))\n } catch {\n // silent\n }\n}\n","<script setup lang=\"ts\">\nimport { ref, onBeforeUnmount } from \"vue\"\nimport { originalSetTimeout } from \"../composables/useFreezeState.js\"\n\ndefineProps<{\n content: string\n}>()\n\nconst visible = ref(false)\nconst position = ref({ top: 0, left: 0 })\nconst triggerRef = ref<HTMLElement | null>(null)\n\nlet hoverTimer: ReturnType<typeof setTimeout> | null = null\n\nfunction onMouseEnter(e: MouseEvent): void {\n const trigger = (e.currentTarget as HTMLElement)?.firstElementChild as HTMLElement | null\n triggerRef.value = trigger\n hoverTimer = originalSetTimeout(() => {\n if (!triggerRef.value) return\n const rect = triggerRef.value.getBoundingClientRect()\n position.value = {\n top: rect.top + rect.height / 2,\n left: rect.left - 8,\n }\n visible.value = true\n }, 500)\n}\n\nfunction onMouseLeave(): void {\n if (hoverTimer) {\n clearTimeout(hoverTimer)\n hoverTimer = null\n }\n visible.value = false\n triggerRef.value = null\n}\n\nonBeforeUnmount(() => {\n if (hoverTimer) {\n clearTimeout(hoverTimer)\n }\n})\n</script>\n\n<template>\n <span\n class=\"ag-tooltip-trigger\"\n @mouseenter=\"onMouseEnter\"\n @mouseleave=\"onMouseLeave\"\n >\n <slot />\n <Teleport to=\"body\">\n <Transition name=\"ag-tooltip\">\n <div\n v-if=\"visible\"\n data-feedback-toolbar\n :style=\"{\n position: 'fixed',\n top: `${position.top}px`,\n left: `${position.left}px`,\n transform: 'translate(-100%, -50%)',\n zIndex: 100010,\n maxWidth: '180px',\n padding: '6px 10px',\n borderRadius: '8px',\n background: '#383838',\n color: 'rgba(255, 255, 255, 0.9)',\n fontSize: '11px',\n lineHeight: '1.4',\n fontFamily: 'system-ui, -apple-system, sans-serif',\n fontWeight: '400',\n letterSpacing: '-0.01em',\n boxShadow: '0 4px 12px rgba(0, 0, 0, 0.3)',\n pointerEvents: 'none',\n whiteSpace: 'normal',\n }\"\n >\n {{ content }}\n </div>\n </Transition>\n </Teleport>\n </span>\n</template>\n\n<style scoped>\n.ag-tooltip-trigger {\n display: inline-flex;\n align-items: center;\n}\n\n.ag-tooltip-enter-active {\n transition: opacity 0.15s ease;\n}\n\n.ag-tooltip-leave-active {\n transition: opacity 0.1s ease;\n}\n\n.ag-tooltip-enter-from,\n.ag-tooltip-leave-to {\n opacity: 0;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { computed, nextTick, onMounted, onUnmounted, ref, watch, type ComponentPublicInstance, type CSSProperties } from \"vue\"\nimport { ANNOTATIONS_STORE_KEY, FREEZE_KEY, I18N_KEY, OVERLAY_KEY, RUNTIME_BRIDGE_KEY, SELECTION_KEY, SETTINGS_KEY } from \"../injection-keys.js\"\nimport { COPY_EXCLUDE_FIELDS } from \"../copy-fields.js\"\nimport { COLOR_OPTIONS } from \"../composables/useSettings.js\"\nimport { originalSetTimeout } from \"../composables/useFreezeState.js\"\nimport { useToolbarDrag } from \"../composables/useToolbarDrag.js\"\nimport { SUPPORTED_LOCALES, LOCALE_LABELS } from \"../i18n/index.js\"\nimport { injectStrict } from \"../utils.js\"\nimport type { ExportActions } from \"../composables/useExport.js\"\nimport {\n IconChevronLeft,\n IconChevronRight,\n IconCheckSmallAnimated,\n IconConnectedNodes,\n IconCopyAnimated,\n IconEye,\n IconEyeOff,\n IconGear,\n IconHelp,\n IconJson,\n IconListSparkle,\n IconMarkdown,\n IconMoon,\n IconPause,\n IconPlay,\n IconSun,\n IconTrashAlt,\n IconXmarkLarge,\n} from \"./icons.js\"\nimport AgTooltip from \"./AgTooltip.vue\"\n\nconst OUTPUT_DETAIL_KEYS = [\"compact\", \"standard\", \"detailed\", \"forensic\"] as const\nconst SETTINGS_PAGE_KEYS = [\"main\", \"copy\", \"automations\"] as const\nconst HELP_ICON_SIZE = 16\nconst SETTINGS_PANEL_MAX_HEIGHT = 520\n\ntype SettingsPage = typeof SETTINGS_PAGE_KEYS[number]\n\nconst props = defineProps<{\n exportActions: ExportActions\n}>()\n\nconst store = injectStrict(ANNOTATIONS_STORE_KEY, \"annotations store\")\nconst selection = injectStrict(SELECTION_KEY, \"selection state\")\nconst overlay = injectStrict(OVERLAY_KEY, \"overlay state\")\nconst settings = injectStrict(SETTINGS_KEY, \"settings state\")\nconst i18n = injectStrict(I18N_KEY, \"i18n state\")\nconst freezeState = injectStrict(FREEZE_KEY, \"freeze state\")\nconst bridge = injectStrict(RUNTIME_BRIDGE_KEY, \"runtime bridge\")\n\nconst toolbarRef = ref<HTMLElement | null>(null)\nconst mainSettingsPageRef = ref<HTMLElement | null>(null)\nconst copySettingsPageRef = ref<HTMLElement | null>(null)\nconst automationsSettingsPageRef = ref<HTMLElement | null>(null)\nconst expanded = ref(false)\nconst settingsOpen = ref(false)\nconst settingsPage = ref<SettingsPage>(\"main\")\nconst settingsPagesHeight = ref<number | null>(null)\nconst guideCopyFeedback = ref<string | null>(null)\nconst showEntranceAnimation = ref(false)\nconst drag = useToolbarDrag({})\n\nconst count = computed(() => store.annotations.length)\nconst hasAnnotations = computed(() => count.value > 0)\nconst isLight = computed(() => !settings.darkMode)\nconst isFrozen = computed(() => freezeState.isFrozen.value)\nconst copyFormat = computed(() => settings.copyFormat)\nconst isMarkdownFormat = computed(() => copyFormat.value === \"markdown\")\nconst copyFeedbackActive = computed(() => props.exportActions.copyFeedback === copyFormat.value)\nconst showMarkers = computed(() => settings.showMarkers)\nconst panelOpen = computed(() => settingsOpen.value)\nconst messages = computed(() => i18n.messages)\nconst settingsPageIndex = computed(() => SETTINGS_PAGE_KEYS.indexOf(settingsPage.value))\nconst settingsPagesStyle = computed<CSSProperties>(() => {\n const pageCount = SETTINGS_PAGE_KEYS.length\n return {\n \"--ag-settings-page-count\": String(pageCount),\n width: `${pageCount * 100}%`,\n transform: `translateX(-${(settingsPageIndex.value * 100) / pageCount}%)`,\n ...(settingsPagesHeight.value === null ? {} : { height: `${settingsPagesHeight.value}px` }),\n } as CSSProperties\n})\nconst currentOutputDetailLabel = computed(() => messages.value.outputDetail[settings.outputDetail])\nconst settingsPanelPlacement = computed(\n () => (drag.position.value?.y ?? Number.POSITIVE_INFINITY) < 230 ? \"below\" : \"above\",\n)\nconst mcpConnected = computed(() => !!bridge.sync)\nconst syncInfo = computed(() => bridge.sync?.info)\nconst apiEndpoint = computed(() => syncInfo.value?.endpoint ?? \"http://localhost:4747\")\nconst mcpHttpEndpoint = computed(() => syncInfo.value?.mcpHttpUrl ?? \"http://localhost:4748/mcp\")\nconst mcpSseEndpoint = computed(() => syncInfo.value?.mcpSseUrl ?? \"http://localhost:4748/sse\")\nconst cliCommand = computed(() => {\n const apiPort = extractPort(apiEndpoint.value) ?? 4747\n const mcpPort = extractPort(syncInfo.value?.mcpEndpoint ?? \"\") ?? 4748\n return `npx agentation-vue-mcp server --port ${apiPort} --mcp-port ${mcpPort}`\n})\nconst claudeCommand = computed(() => {\n const apiPort = extractPort(apiEndpoint.value) ?? 4747\n const mcpPort = extractPort(syncInfo.value?.mcpEndpoint ?? \"\") ?? 4748\n return `claude mcp add agentation -- npx agentation-vue-mcp server --port ${apiPort} --mcp-port ${mcpPort}`\n})\nconst webhookTargets = computed(() => (\n settings.webhooksEnabled\n ? settings.webhookUrl\n .split(/[\\n,]/)\n .map((item) => item.trim())\n .filter(Boolean)\n : []\n))\nconst webhookEnv = computed(() => {\n if (webhookTargets.value.length === 1) {\n return `AGENTATION_WEBHOOK_URL=${webhookTargets.value[0]}`\n }\n\n if (webhookTargets.value.length > 1) {\n return `AGENTATION_WEBHOOKS=${webhookTargets.value.join(\",\")}`\n }\n\n return \"AGENTATION_WEBHOOK_URL=https://example.com/webhook\\nAGENTATION_WEBHOOKS=https://a.example/webhook,https://b.example/webhook\"\n})\nconst connectionCards = computed(() => [\n { key: \"mcp-http\", label: messages.value.settings.mcpHttpEndpointLabel, value: mcpHttpEndpoint.value },\n { key: \"mcp-sse\", label: messages.value.settings.mcpSseEndpointLabel, value: mcpSseEndpoint.value },\n])\nconst integrationCards = computed(() => [\n { key: \"cli-command\", label: messages.value.settings.cliCommandLabel, value: cliCommand.value },\n { key: \"claude-command\", label: messages.value.settings.claudeCommandLabel, value: claudeCommand.value },\n { key: \"cursor-endpoint\", label: messages.value.settings.cursorEndpointLabel, value: mcpHttpEndpoint.value },\n { key: \"codex-endpoint\", label: messages.value.settings.codexEndpointLabel, value: mcpSseEndpoint.value },\n])\n\n// Sync toolbar expanded state → annotation mode.\n// Collapsing disables selection; expanding re-enables it.\n// `immediate` ensures store.enabled = false on startup (expanded starts false).\nwatch(expanded, async (isExpanded) => {\n if (!isExpanded) {\n closeSettingsPanel()\n selection.clearHovered()\n selection.clearSelection()\n overlay.hidePopover()\n }\n store.enabled = isExpanded\n await nextTick()\n drag.syncConstraints()\n}, { immediate: true })\n\nlet entranceTimer: ReturnType<typeof setTimeout> | null = null\nlet guideCopyTimer: ReturnType<typeof setTimeout> | null = null\n\nonMounted(() => {\n document.addEventListener(\"pointerdown\", onOutsideClick, true)\n window.addEventListener(\"resize\", syncSettingsPanelHeight)\n showEntranceAnimation.value = true\n entranceTimer = originalSetTimeout(() => {\n showEntranceAnimation.value = false\n entranceTimer = null\n }, 760)\n})\n\nonUnmounted(() => {\n document.removeEventListener(\"pointerdown\", onOutsideClick, true)\n window.removeEventListener(\"resize\", syncSettingsPanelHeight)\n if (entranceTimer) window.clearTimeout(entranceTimer)\n if (guideCopyTimer) window.clearTimeout(guideCopyTimer)\n})\n\nfunction onOutsideClick(e: PointerEvent): void {\n if (!panelOpen.value) return\n if (isEventInsideToolbar(e)) return\n closeSettingsPanel()\n}\n\nfunction setToolbarRef(element: Element | ComponentPublicInstance | null): void {\n const el = element instanceof HTMLElement ? element : null\n toolbarRef.value = el\n drag.bindToolbarRef(el)\n}\n\nfunction isEventInsideToolbar(event: Event): boolean {\n const toolbar = toolbarRef.value\n if (!toolbar) return false\n\n const path = typeof event.composedPath === \"function\" ? event.composedPath() : []\n if (path.length > 0) {\n return path.some((entry) => entry instanceof Node && toolbar.contains(entry))\n }\n\n return event.target instanceof Node && toolbar.contains(event.target)\n}\n\n// --- Actions ---\n\nfunction handleClick(): void {\n if (expanded.value) return\n if (drag.consumeJustFinishedDrag()) return\n expanded.value = true\n}\n\nfunction close(): void {\n closeSettingsPanel()\n expanded.value = false\n if (isFrozen.value) {\n freezeState.toggleFreeze()\n }\n}\n\nfunction toggleFreeze(): void {\n freezeState.toggleFreeze()\n}\n\nfunction toggleMarkers(): void {\n settings.showMarkers = !showMarkers.value\n}\n\nfunction closeSettingsPanel(): void {\n settingsOpen.value = false\n settingsPage.value = \"main\"\n}\n\nfunction toggleSettingsPanel(): void {\n if (settingsOpen.value) {\n closeSettingsPanel()\n return\n }\n settingsPage.value = \"main\"\n settingsOpen.value = true\n}\n\nfunction openAutomationsPanel(): void {\n settingsOpen.value = true\n settingsPage.value = \"automations\"\n}\n\nfunction openCopySettingsPanel(): void {\n settingsOpen.value = true\n settingsPage.value = \"copy\"\n}\n\nfunction showMainSettings(): void {\n settingsPage.value = \"main\"\n}\n\nfunction toggleCopyExcludedField(field: typeof COPY_EXCLUDE_FIELDS[number]): void {\n settings.copyExcludeFields = settings.copyExcludeFields.includes(field)\n ? settings.copyExcludeFields.filter((item) => item !== field)\n : [...settings.copyExcludeFields, field]\n}\n\nwatch(\n [panelOpen, settingsPage, messages, mcpHttpEndpoint, mcpSseEndpoint, cliCommand, claudeCommand, webhookEnv, () => settings.copyExcludeFields.length],\n async ([isOpen]) => {\n if (!isOpen) {\n settingsPagesHeight.value = null\n return\n }\n await nextTick()\n syncSettingsPanelHeight()\n },\n { flush: \"post\" },\n)\n\nfunction clearAll(): void {\n store.clearAll()\n selection.clearHovered()\n selection.clearSelection()\n overlay.hidePopover()\n}\n\nfunction cycleOutputDetail(): void {\n const idx = OUTPUT_DETAIL_KEYS.findIndex((k) => k === settings.outputDetail)\n settings.outputDetail = OUTPUT_DETAIL_KEYS[(idx + 1) % OUTPUT_DETAIL_KEYS.length]\n}\n\nfunction exportCurrentFormat(): Promise<void> {\n return isMarkdownFormat.value\n ? props.exportActions.exportMarkdown()\n : props.exportActions.exportJSON()\n}\n\nfunction extractPort(input: string): number | null {\n try {\n const url = new URL(input)\n const fallback = url.protocol === \"https:\" ? 443 : 80\n const port = parseInt(url.port || String(fallback), 10)\n return Number.isFinite(port) ? port : null\n } catch {\n return null\n }\n}\n\nasync function copyGuideValue(key: string, value: string): Promise<void> {\n const copied = await writeTextToClipboard(value)\n if (!copied) return\n\n guideCopyFeedback.value = key\n if (guideCopyTimer) {\n window.clearTimeout(guideCopyTimer)\n }\n\n guideCopyTimer = originalSetTimeout(() => {\n if (guideCopyFeedback.value === key) {\n guideCopyFeedback.value = null\n }\n guideCopyTimer = null\n }, 1400)\n}\n\nasync function writeTextToClipboard(text: string): Promise<boolean> {\n if (typeof navigator !== \"undefined\" && navigator.clipboard?.writeText) {\n try {\n await navigator.clipboard.writeText(text)\n return true\n } catch {\n // Fall through to legacy copy.\n }\n }\n\n if (typeof document === \"undefined\") return false\n\n const textarea = document.createElement(\"textarea\")\n textarea.value = text\n textarea.setAttribute(\"readonly\", \"true\")\n textarea.style.position = \"fixed\"\n textarea.style.opacity = \"0\"\n textarea.style.pointerEvents = \"none\"\n document.body.appendChild(textarea)\n textarea.select()\n\n try {\n return document.execCommand(\"copy\")\n } catch {\n return false\n } finally {\n textarea.remove()\n }\n}\n\nfunction syncSettingsPanelHeight(): void {\n if (!panelOpen.value) {\n settingsPagesHeight.value = null\n return\n }\n\n const activePage = settingsPage.value === \"copy\"\n ? copySettingsPageRef.value\n : settingsPage.value === \"automations\"\n ? automationsSettingsPageRef.value\n : mainSettingsPageRef.value\n\n if (!activePage) return\n\n settingsPagesHeight.value = Math.min(activePage.scrollHeight, getMaxSettingsPanelHeight())\n}\n\nfunction getMaxSettingsPanelHeight(): number {\n if (typeof window === \"undefined\") return SETTINGS_PANEL_MAX_HEIGHT\n return Math.min(SETTINGS_PANEL_MAX_HEIGHT, Math.round(window.innerHeight * 0.72))\n}\n</script>\n\n<template>\n <div :ref=\"setToolbarRef\" class=\"toolbar\" :class=\"{ dragging: drag.isDragging.value }\"\n :style=\"drag.toolbarStyle.value\" data-feedback-toolbar>\n <div class=\"toolbar-container\" :class=\"{\n collapsed: !expanded,\n expanded,\n light: isLight,\n dragging: drag.isDragging.value,\n entrance: showEntranceAnimation,\n }\" :role=\"expanded ? undefined : 'button'\" :tabindex=\"expanded ? -1 : 0\" @click=\"handleClick\"\n @keydown.enter.prevent=\"expanded = true\" @keydown.space.prevent=\"expanded = true\">\n <!-- Collapsed: icon + badge -->\n <div class=\"toggle-content\" :class=\"expanded ? 'hidden' : 'visible'\">\n <IconListSparkle :size=\"24\" />\n <span v-if=\"hasAnnotations\" class=\"badge\" :class=\"{ entrance: showEntranceAnimation }\"\n :style=\"{ backgroundColor: settings.annotationColor }\">\n {{ count }}\n </span>\n </div>\n\n <!-- Expanded: controls row -->\n <div class=\"controls-content\" :class=\"expanded ? 'visible' : 'hidden'\">\n <button class=\"control-btn\" :class=\"{ light: isLight }\" type=\"button\"\n :title=\"isFrozen ? messages.toolbar.resume : messages.toolbar.pause\"\n :aria-label=\"isFrozen ? messages.toolbar.resumeAria : messages.toolbar.pauseAria\"\n :data-state=\"isFrozen ? 'paused' : undefined\" @click.stop=\"toggleFreeze\">\n <IconPlay v-if=\"isFrozen\" :size=\"24\" />\n <IconPause v-else :size=\"24\" />\n </button>\n\n <button class=\"control-btn\" :class=\"{ light: isLight }\" type=\"button\"\n :title=\"showMarkers ? messages.toolbar.hideMarkers : messages.toolbar.showMarkers\"\n :aria-label=\"showMarkers ? messages.toolbar.hideMarkersAria : messages.toolbar.showMarkersAria\"\n :data-state=\"showMarkers ? undefined : 'hidden'\" :disabled=\"!hasAnnotations\" @click.stop=\"toggleMarkers\">\n <IconEye v-if=\"showMarkers\" :size=\"24\" />\n <IconEyeOff v-else :size=\"24\" />\n </button>\n\n <button class=\"control-btn\" :class=\"{ light: isLight }\" type=\"button\"\n :title=\"isMarkdownFormat ? messages.toolbar.copyMarkdown : messages.toolbar.copyJson\"\n :aria-label=\"isMarkdownFormat ? messages.toolbar.copyMarkdownAria : messages.toolbar.copyJsonAria\"\n :disabled=\"!hasAnnotations\" :data-active=\"copyFeedbackActive || undefined\"\n @click.stop=\"void exportCurrentFormat()\">\n <IconCopyAnimated :size=\"24\" :copied=\"copyFeedbackActive\" />\n </button>\n\n <button class=\"control-btn\" :class=\"{ light: isLight }\" type=\"button\" :title=\"messages.toolbar.clearAll\"\n :aria-label=\"messages.toolbar.clearAllAria\" :disabled=\"!hasAnnotations\" data-danger @click.stop=\"clearAll\">\n <IconTrashAlt :size=\"18\" />\n </button>\n\n <div class=\"divider\" :class=\"{ light: isLight }\" />\n\n <button class=\"control-btn\" :class=\"{ light: isLight }\" type=\"button\" :title=\"messages.toolbar.settings\"\n :aria-label=\"messages.toolbar.toggleSettingsAria\" :data-active=\"panelOpen || undefined\"\n @click.stop=\"toggleSettingsPanel\">\n <IconGear :size=\"20\" />\n </button>\n\n <button class=\"control-btn\" :class=\"{ light: isLight }\" type=\"button\" :title=\"messages.toolbar.closeToolbar\"\n :aria-label=\"messages.toolbar.closeToolbarAria\" @click.stop=\"close\">\n <IconXmarkLarge :size=\"20\" />\n </button>\n </div>\n\n <!-- Settings / automations panel -->\n <Transition name=\"settings-panel\">\n <div v-if=\"expanded && panelOpen\" class=\"settings-panel\" :class=\"{\n light: isLight,\n below: settingsPanelPlacement === 'below',\n }\" data-no-drag @click.stop>\n <div class=\"settings-pages\" :style=\"settingsPagesStyle\">\n <div ref=\"mainSettingsPageRef\" class=\"settings-page\">\n <div class=\"settings-header\" :class=\"{ light: isLight }\">\n <span class=\"settings-brand\" :class=\"{ light: isLight }\">\n <span class=\"settings-slash\" :style=\"{ color: settings.annotationColor }\">/</span>agentation\n </span>\n <button class=\"theme-toggle\" :class=\"{ light: isLight }\" type=\"button\"\n :title=\"settings.darkMode ? messages.settings.lightMode : messages.settings.darkMode\"\n :aria-label=\"settings.darkMode ? messages.settings.switchToLightAria : messages.settings.switchToDarkAria\"\n @click=\"settings.toggleDarkMode()\">\n <span class=\"theme-icon-wrapper\">\n <Transition name=\"theme-icon\" mode=\"out-in\">\n <span :key=\"settings.darkMode ? 'sun' : 'moon'\" class=\"theme-icon\">\n <IconSun v-if=\"settings.darkMode\" :size=\"16\" />\n <IconMoon v-else :size=\"16\" />\n </span>\n </Transition>\n </span>\n </button>\n </div>\n\n <div class=\"settings-section\">\n <div class=\"settings-row\">\n <span class=\"settings-label\" :class=\"{ light: isLight }\">{{ messages.settings.language }}</span>\n <div class=\"locale-switch\" :class=\"{ light: isLight }\" role=\"group\"\n :aria-label=\"messages.settings.language\">\n <button v-for=\"loc in SUPPORTED_LOCALES\" :key=\"loc\" class=\"locale-btn\"\n :class=\"{ active: settings.locale === loc, light: isLight }\" type=\"button\" :lang=\"loc\"\n :aria-pressed=\"settings.locale === loc\" @click=\"settings.locale = loc\">\n {{ LOCALE_LABELS[loc] }}\n </button>\n </div>\n </div>\n </div>\n\n <div class=\"settings-section\">\n <div class=\"settings-row\">\n <span class=\"settings-label-with-help\">\n <span class=\"settings-label\" :class=\"{ light: isLight }\">{{ messages.settings.outputDetail }}</span>\n <AgTooltip :content=\"messages.settings.outputDetailHelp\">\n <IconHelp :size=\"HELP_ICON_SIZE\"\n :style=\"{ color: isLight ? 'rgba(0,0,0,0.3)' : 'rgba(255,255,255,0.3)', cursor: 'help' }\" />\n </AgTooltip>\n </span>\n <button class=\"cycle-btn\" :class=\"{ light: isLight }\" type=\"button\" @click=\"cycleOutputDetail\">\n <Transition name=\"cycle-text\" mode=\"out-in\">\n <span :key=\"settings.outputDetail\" class=\"cycle-text\">{{ currentOutputDetailLabel }}</span>\n </Transition>\n <span class=\"cycle-dots\">\n <span v-for=\"k in OUTPUT_DETAIL_KEYS\" :key=\"k\" class=\"cycle-dot\"\n :class=\"{ active: k === settings.outputDetail, light: isLight }\" />\n </span>\n </button>\n </div>\n </div>\n\n <div class=\"settings-section\">\n <div class=\"settings-row\">\n <span class=\"settings-label\" :class=\"{ light: isLight }\">{{ messages.settings.exportFormat }}</span>\n <div class=\"format-switch\" :class=\"{ light: isLight }\"\n :style=\"{ '--ag-format-accent': settings.annotationColor }\" role=\"group\"\n :aria-label=\"messages.settings.exportFormat\">\n <button class=\"format-btn\" :class=\"{ light: isLight, active: settings.copyFormat === 'markdown' }\"\n type=\"button\" :title=\"messages.toolbar.copyMarkdown\"\n :aria-label=\"messages.settings.exportFormatMarkdownAria\"\n :aria-pressed=\"settings.copyFormat === 'markdown'\" @click=\"settings.copyFormat = 'markdown'\">\n <IconMarkdown :size=\"18\" />\n </button>\n <button class=\"format-btn\" :class=\"{ light: isLight, active: settings.copyFormat === 'json' }\"\n type=\"button\" :title=\"messages.toolbar.copyJson\"\n :aria-label=\"messages.settings.exportFormatJsonAria\"\n :aria-pressed=\"settings.copyFormat === 'json'\" @click=\"settings.copyFormat = 'json'\">\n <IconJson :size=\"16\" />\n </button>\n </div>\n </div>\n </div>\n\n <div class=\"settings-section\">\n <button class=\"nav-btn\" :class=\"{ light: isLight }\" type=\"button\" @click=\"openCopySettingsPanel\">\n <span class=\"nav-btn-left\">\n <IconCopyAnimated :size=\"18\" />\n <span>{{ messages.settings.copySettings }}</span>\n </span>\n <span class=\"nav-btn-right\">\n <IconChevronRight :size=\"16\" />\n </span>\n </button>\n </div>\n\n <div class=\"settings-section\">\n <span class=\"settings-label\" :class=\"{ light: isLight }\">{{ messages.settings.markerColour }}</span>\n <div class=\"color-row\">\n <button v-for=\"c in COLOR_OPTIONS\" :key=\"c.key\" class=\"color-ring\"\n :class=\"{ selected: settings.annotationColor === c.value }\"\n :style=\"{ borderColor: settings.annotationColor === c.value ? c.value : 'transparent' }\"\n type=\"button\" :title=\"messages.colors[c.key]\" @click=\"settings.annotationColor = c.value\">\n <span class=\"color-dot\" :class=\"{ selected: settings.annotationColor === c.value }\"\n :style=\"{ backgroundColor: c.value }\" />\n </button>\n </div>\n </div>\n\n <div class=\"settings-section\">\n <label class=\"toggle-row\">\n <input class=\"sr-only\" type=\"checkbox\" :checked=\"settings.autoClearAfterCopy\"\n @change=\"settings.autoClearAfterCopy = ($event.target as HTMLInputElement).checked\">\n <span class=\"checkbox\" :class=\"{ checked: settings.autoClearAfterCopy, light: isLight }\">\n <IconCheckSmallAnimated v-if=\"settings.autoClearAfterCopy\" :size=\"14\" />\n </span>\n <span class=\"toggle-label\" :class=\"{ light: isLight }\">{{ messages.settings.clearOnCopy }}</span>\n </label>\n\n <label class=\"toggle-row\">\n <input class=\"sr-only\" type=\"checkbox\" :checked=\"settings.blockInteractions\"\n @change=\"settings.blockInteractions = ($event.target as HTMLInputElement).checked\">\n <span class=\"checkbox\" :class=\"{ checked: settings.blockInteractions, light: isLight }\">\n <IconCheckSmallAnimated v-if=\"settings.blockInteractions\" :size=\"14\" />\n </span>\n <span class=\"toggle-label\" :class=\"{ light: isLight }\">{{ messages.settings.blockPageInteractions\n }}</span>\n <AgTooltip :content=\"messages.settings.blockInteractionsHelp\">\n <IconHelp :size=\"HELP_ICON_SIZE\"\n :style=\"{ color: isLight ? 'rgba(0,0,0,0.3)' : 'rgba(255,255,255,0.3)', cursor: 'help', marginLeft: '2px' }\" />\n </AgTooltip>\n </label>\n\n <label class=\"toggle-row\">\n <input class=\"sr-only\" type=\"checkbox\" :checked=\"settings.componentSourceEnabled\"\n @change=\"settings.componentSourceEnabled = ($event.target as HTMLInputElement).checked\">\n <span class=\"checkbox\" :class=\"{ checked: settings.componentSourceEnabled, light: isLight }\">\n <IconCheckSmallAnimated v-if=\"settings.componentSourceEnabled\" :size=\"14\" />\n </span>\n <span class=\"toggle-label\" :class=\"{ light: isLight }\">{{ messages.settings.componentSource }}</span>\n <AgTooltip :content=\"messages.settings.componentSourceHelp\">\n <IconHelp :size=\"HELP_ICON_SIZE\"\n :style=\"{ color: isLight ? 'rgba(0,0,0,0.3)' : 'rgba(255,255,255,0.3)', cursor: 'help', marginLeft: '2px' }\" />\n </AgTooltip>\n </label>\n </div>\n\n <div class=\"settings-section\">\n <button class=\"nav-btn\" :class=\"{ light: isLight }\" type=\"button\" @click=\"openAutomationsPanel\">\n <span class=\"nav-btn-left\">\n <IconConnectedNodes :size=\"18\" />\n <span>{{ messages.settings.manageMcpWebhooks }}</span>\n </span>\n <span class=\"nav-btn-right\">\n <span class=\"nav-status-indicator\"\n :title=\"mcpConnected ? messages.settings.mcpStatusConnected : messages.settings.mcpStatusDisconnected\"\n :aria-label=\"mcpConnected ? messages.settings.mcpStatusConnected : messages.settings.mcpStatusDisconnected\">\n <span class=\"status-dot\" :class=\"mcpConnected ? 'connected' : 'disconnected'\" />\n </span>\n <IconChevronRight :size=\"16\" />\n </span>\n </button>\n </div>\n </div>\n\n <div ref=\"copySettingsPageRef\" class=\"settings-page\">\n <div class=\"settings-header automations-header\" :class=\"{ light: isLight }\">\n <button class=\"back-btn\" :class=\"{ light: isLight }\" type=\"button\" @click=\"showMainSettings\">\n <IconChevronLeft :size=\"16\" />\n <span>{{ messages.settings.copySettings }}</span>\n </button>\n </div>\n\n <div class=\"settings-section\">\n <p class=\"settings-description\" :class=\"{ light: isLight }\">\n {{ messages.settings.copySettingsDescription }}\n </p>\n </div>\n\n <div class=\"settings-section\">\n <div class=\"settings-row\">\n <span class=\"settings-label\" :class=\"{ light: isLight }\">{{ messages.settings.copyPrefix }}</span>\n </div>\n <p class=\"settings-description\" :class=\"{ light: isLight }\">\n {{ messages.settings.copyPrefixDescription }}\n </p>\n <textarea class=\"copy-prefix-input\" :class=\"{ light: isLight }\" :value=\"settings.copyPrefix\"\n :placeholder=\"messages.settings.copyPrefixPlaceholder\"\n :style=\"{ borderColor: settings.annotationColor }\" rows=\"3\" spellcheck=\"false\"\n @input=\"settings.copyPrefix = ($event.target as HTMLTextAreaElement).value\" />\n </div>\n\n <div class=\"settings-section\">\n <div class=\"settings-row\">\n <span class=\"settings-label\" :class=\"{ light: isLight }\">{{ messages.settings.copyExclusions }}</span>\n </div>\n <p class=\"settings-description\" :class=\"{ light: isLight }\">\n {{ messages.settings.copyExclusionsDescription }}\n </p>\n\n <div class=\"copy-field-list\">\n <label v-for=\"field in COPY_EXCLUDE_FIELDS\" :key=\"field\" class=\"toggle-row copy-field-row\">\n <input class=\"sr-only\" type=\"checkbox\" :checked=\"settings.copyExcludeFields.includes(field)\"\n @change=\"toggleCopyExcludedField(field)\">\n <span class=\"checkbox\"\n :class=\"{ checked: settings.copyExcludeFields.includes(field), light: isLight }\">\n <IconCheckSmallAnimated v-if=\"settings.copyExcludeFields.includes(field)\" :size=\"14\" />\n </span>\n <span class=\"toggle-label\" :class=\"{ light: isLight }\">\n {{ messages.settings.copyFieldLabels[field] }}\n </span>\n </label>\n </div>\n </div>\n </div>\n\n <div ref=\"automationsSettingsPageRef\" class=\"settings-page\">\n <div class=\"settings-header automations-header\" :class=\"{ light: isLight }\">\n <button class=\"back-btn\" :class=\"{ light: isLight }\" type=\"button\" @click=\"showMainSettings\">\n <IconChevronLeft :size=\"16\" />\n <span>{{ messages.settings.manageMcpWebhooks }}</span>\n </button>\n </div>\n\n <div class=\"settings-section\">\n <div class=\"settings-row\">\n <span class=\"settings-label\" :class=\"{ light: isLight }\">{{ messages.settings.mcpConnection }}</span>\n <span class=\"mcp-status\" :class=\"{ light: isLight }\">\n <span class=\"status-dot\" :class=\"mcpConnected ? 'connected' : 'disconnected'\" />\n {{ mcpConnected ? messages.settings.mcpStatusConnected : messages.settings.mcpStatusDisconnected }}\n </span>\n </div>\n </div>\n\n <div class=\"settings-section\">\n <div class=\"settings-row\">\n <span class=\"settings-label-with-help\">\n <span class=\"settings-label\" :class=\"{ light: isLight }\">{{ messages.settings.webhooks }}</span>\n <AgTooltip :content=\"messages.settings.webhooksDescription\">\n <IconHelp :size=\"HELP_ICON_SIZE\"\n :style=\"{ color: isLight ? 'rgba(0,0,0,0.3)' : 'rgba(255,255,255,0.3)', cursor: 'help' }\" />\n </AgTooltip>\n </span>\n </div>\n\n <label class=\"toggle-row webhook-toggle\">\n <input class=\"sr-only\" type=\"checkbox\" :checked=\"settings.webhooksEnabled\"\n @change=\"settings.webhooksEnabled = ($event.target as HTMLInputElement).checked\">\n <span class=\"checkbox\" :class=\"{ checked: settings.webhooksEnabled, light: isLight }\">\n <IconCheckSmallAnimated v-if=\"settings.webhooksEnabled\" :size=\"14\" />\n </span>\n <span class=\"toggle-label\" :class=\"{ light: isLight }\">{{ messages.settings.webhooksAutoSend }}</span>\n </label>\n\n <p class=\"settings-description\" :class=\"{ light: isLight }\">\n {{ messages.settings.webhooksDescription }}\n </p>\n\n <textarea class=\"webhook-url\" :class=\"{ light: isLight }\" :value=\"settings.webhookUrl\"\n :placeholder=\"messages.settings.webhooksUrlPlaceholder\"\n :style=\"{ borderColor: settings.annotationColor }\" rows=\"2\" spellcheck=\"false\"\n @input=\"settings.webhookUrl = ($event.target as HTMLTextAreaElement).value\" />\n </div>\n\n <div class=\"settings-section\">\n <div class=\"guide-card\" :class=\"{ light: isLight }\">\n <div class=\"guide-card-title\">{{ messages.settings.mcpConnection }}</div>\n <p class=\"settings-description\" :class=\"{ light: isLight }\">\n {{ messages.settings.mcpDescription }}\n </p>\n </div>\n </div>\n\n <div class=\"settings-section\">\n <div class=\"guide-grid\">\n <div v-for=\"item in connectionCards\" :key=\"item.key\" class=\"guide-card\" :class=\"{ light: isLight }\">\n <div class=\"guide-card-header\">\n <div class=\"guide-card-title\">{{ item.label }}</div>\n <button class=\"guide-copy-btn\" :class=\"{ light: isLight }\" type=\"button\"\n :title=\"messages.settings.copyValueAria(item.label)\"\n :aria-label=\"messages.settings.copyValueAria(item.label)\"\n :data-copied=\"guideCopyFeedback === item.key || undefined\"\n @click=\"void copyGuideValue(item.key, item.value)\">\n <IconCopyAnimated :size=\"16\" :copied=\"guideCopyFeedback === item.key\" />\n </button>\n </div>\n <pre class=\"guide-code\" :class=\"{ light: isLight }\">{{ item.value }}</pre>\n </div>\n </div>\n </div>\n\n <div class=\"settings-section\">\n <div class=\"guide-grid\">\n <div v-for=\"item in integrationCards\" :key=\"item.key\" class=\"guide-card\" :class=\"{ light: isLight }\">\n <div class=\"guide-card-header\">\n <div class=\"guide-card-title\">{{ item.label }}</div>\n <button class=\"guide-copy-btn\" :class=\"{ light: isLight }\" type=\"button\"\n :title=\"messages.settings.copyValueAria(item.label)\"\n :aria-label=\"messages.settings.copyValueAria(item.label)\"\n :data-copied=\"guideCopyFeedback === item.key || undefined\"\n @click=\"void copyGuideValue(item.key, item.value)\">\n <IconCopyAnimated :size=\"16\" :copied=\"guideCopyFeedback === item.key\" />\n </button>\n </div>\n <pre class=\"guide-code\" :class=\"{ light: isLight }\">{{ item.value }}</pre>\n </div>\n </div>\n </div>\n\n <div class=\"settings-section\">\n <div class=\"guide-card\" :class=\"{ light: isLight }\">\n <div class=\"guide-card-header\">\n <div class=\"guide-card-title\">{{ messages.settings.webhookEnvLabel }}</div>\n <button class=\"guide-copy-btn\" :class=\"{ light: isLight }\" type=\"button\"\n :title=\"messages.settings.copyValueAria(messages.settings.webhookEnvLabel)\"\n :aria-label=\"messages.settings.copyValueAria(messages.settings.webhookEnvLabel)\"\n :data-copied=\"guideCopyFeedback === 'webhook-env' || undefined\"\n @click=\"void copyGuideValue('webhook-env', webhookEnv)\">\n <IconCopyAnimated :size=\"16\" :copied=\"guideCopyFeedback === 'webhook-env'\" />\n </button>\n </div>\n <p class=\"settings-description\" :class=\"{ light: isLight }\">\n {{ messages.settings.webhookDescriptionLong }}\n </p>\n <pre class=\"guide-code\" :class=\"{ light: isLight }\">{{ webhookEnv }}</pre>\n </div>\n </div>\n </div>\n </div>\n </div>\n </Transition>\n </div>\n </div>\n</template>\n\n<style scoped>\n/* Protect stroke-based SVG icons */\n:deep(svg[fill=\"none\"]) {\n fill: none !important;\n}\n\n@keyframes toolbarEnter {\n from {\n opacity: 0;\n transform: scale(0.5) rotate(90deg);\n }\n\n to {\n opacity: 1;\n transform: scale(1) rotate(0deg);\n }\n}\n\n@keyframes badgeEnter {\n from {\n opacity: 0;\n transform: scale(0);\n }\n\n to {\n opacity: 1;\n transform: scale(1);\n }\n}\n\n@keyframes themeIconIn {\n 0% {\n opacity: 0;\n transform: scale(0.8) rotate(-30deg);\n }\n\n 100% {\n opacity: 1;\n transform: scale(1) rotate(0deg);\n }\n}\n\n@keyframes cycleTextIn {\n 0% {\n opacity: 0;\n transform: translateY(-6px);\n }\n\n 100% {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n/* --- Toolbar wrapper ------------------------------------------------- */\n\n.toolbar {\n --ag-toolbar-expanded-width: 280px;\n position: fixed;\n right: 20px;\n bottom: 20px;\n width: var(--ag-toolbar-expanded-width);\n z-index: 100000;\n pointer-events: none;\n font-family: system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif;\n}\n\n.toolbar.dragging {\n cursor: grabbing;\n will-change: left, top;\n}\n\n/* --- Toolbar container ------------------------------------------------ */\n\n.toolbar-container {\n position: relative;\n margin-left: auto;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 44px;\n background: #1a1a1a;\n color: #fff;\n border: none;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), 0 4px 16px rgba(0, 0, 0, 0.1);\n pointer-events: auto;\n user-select: none;\n cursor: grab;\n touch-action: none;\n will-change: width, transform;\n transition:\n width 0.4s cubic-bezier(0.19, 1, 0.22, 1),\n border-radius 0.4s cubic-bezier(0.19, 1, 0.22, 1),\n transform 0.4s cubic-bezier(0.19, 1, 0.22, 1),\n background-color 0.25s ease,\n box-shadow 0.25s ease;\n}\n\n.toolbar-container.dragging {\n transition:\n width 0.4s cubic-bezier(0.19, 1, 0.22, 1),\n border-radius 0.4s cubic-bezier(0.19, 1, 0.22, 1),\n background-color 0.25s ease,\n box-shadow 0.25s ease;\n}\n\n.toolbar-container.entrance {\n animation: toolbarEnter 0.5s cubic-bezier(0.34, 1.2, 0.64, 1) both;\n}\n\n/* Collapsed circle */\n.toolbar-container.collapsed {\n width: 44px;\n border-radius: 22px;\n padding: 0;\n cursor: pointer;\n}\n\n.toolbar-container.collapsed:hover {\n background: #2a2a2a;\n}\n\n.toolbar-container.collapsed:active {\n transform: scale(0.95);\n}\n\n/* Expanded pill */\n.toolbar-container.expanded {\n width: var(--ag-toolbar-expanded-width);\n border-radius: 24px;\n padding: 6px;\n}\n\n/* Light mode */\n.toolbar-container.light {\n background: #fff;\n color: rgba(0, 0, 0, 0.85);\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 4px 16px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.04);\n}\n\n.toolbar-container.light.collapsed:hover {\n background: #f5f5f5;\n}\n\n/* --- Toggle content (collapsed icon) --------------------------------- */\n\n.toggle-content {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n transform-origin: center;\n transition:\n opacity 0.12s cubic-bezier(0.19, 1, 0.22, 1),\n transform 0.2s cubic-bezier(0.19, 1, 0.22, 1);\n}\n\n.toggle-content.visible {\n opacity: 1;\n visibility: visible;\n pointer-events: auto;\n transform: scale(1);\n}\n\n.toggle-content.hidden {\n opacity: 0;\n visibility: hidden;\n pointer-events: none;\n transform: scale(0.72);\n}\n\n/* --- Controls row (expanded) ----------------------------------------- */\n\n.controls-content {\n display: flex;\n align-items: center;\n gap: 6px;\n transform-origin: center;\n will-change: opacity, transform, filter;\n transition:\n filter 0.45s cubic-bezier(0.19, 1, 0.22, 1),\n opacity 0.35s cubic-bezier(0.19, 1, 0.22, 1),\n transform 0.35s cubic-bezier(0.19, 1, 0.22, 1);\n}\n\n.controls-content.visible {\n opacity: 1;\n visibility: visible;\n pointer-events: auto;\n filter: blur(0);\n transform: scale(1);\n}\n\n.controls-content.hidden {\n opacity: 0;\n visibility: hidden;\n pointer-events: none;\n filter: blur(10px);\n transform: scale(0.4);\n}\n\n/* --- Badge ----------------------------------------------------------- */\n\n.badge {\n position: absolute;\n top: -13px;\n right: -13px;\n min-width: 18px;\n height: 18px;\n padding: 0 5px;\n border-radius: 9px;\n background: #3c82f7;\n color: #fff;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 10px;\n font-weight: 600;\n line-height: 1;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15), inset 0 0 0 1px rgba(255, 255, 255, 0.04);\n will-change: transform, opacity;\n transition:\n transform 0.3s ease,\n opacity 0.2s ease;\n transform: scale(1);\n}\n\n.badge.entrance {\n animation: badgeEnter 0.3s cubic-bezier(0.34, 1.2, 0.64, 1) 0.32s both;\n}\n\n/* --- Control buttons ------------------------------------------------- */\n\n.control-btn {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 34px;\n height: 34px;\n border: none;\n border-radius: 50%;\n background: transparent;\n color: rgba(255, 255, 255, 0.85);\n cursor: pointer;\n transition:\n background-color 0.15s ease,\n color 0.15s ease,\n transform 0.1s ease,\n opacity 0.2s ease;\n}\n\n.control-btn:hover:not(:disabled):not([data-active]):not([data-state]) {\n background: rgba(255, 255, 255, 0.12);\n color: #fff;\n}\n\n.control-btn:active:not(:disabled) {\n transform: scale(0.92);\n}\n\n.control-btn:disabled {\n opacity: 0.35;\n cursor: not-allowed;\n}\n\n.control-btn[data-active] {\n color: #3c82f7;\n background: rgba(60, 130, 247, 0.25);\n}\n\n.control-btn[data-state=\"paused\"] {\n color: #f59e0b;\n background: rgba(245, 158, 11, 0.18);\n}\n\n.control-btn[data-state=\"hidden\"] {\n color: rgba(255, 255, 255, 0.45);\n background: rgba(255, 255, 255, 0.06);\n}\n\n.control-btn[data-danger]:hover:not(:disabled):not([data-active]) {\n background: rgba(255, 59, 48, 0.25);\n color: #ff3b30;\n}\n\n/* Light variants */\n.control-btn.light {\n color: rgba(0, 0, 0, 0.5);\n}\n\n.control-btn.light:hover:not(:disabled):not([data-active]):not([data-state]) {\n background: rgba(0, 0, 0, 0.06);\n color: rgba(0, 0, 0, 0.85);\n}\n\n.control-btn.light[data-active] {\n color: #3c82f7;\n background: rgba(60, 130, 247, 0.15);\n}\n\n.control-btn.light[data-state=\"paused\"] {\n color: #b45309;\n background: rgba(245, 158, 11, 0.14);\n}\n\n.control-btn.light[data-state=\"hidden\"] {\n color: rgba(0, 0, 0, 0.35);\n background: rgba(0, 0, 0, 0.04);\n}\n\n.control-btn.light[data-danger]:hover:not(:disabled):not([data-active]) {\n background: rgba(255, 59, 48, 0.15);\n color: #ff3b30;\n}\n\n/* --- Divider --------------------------------------------------------- */\n\n.divider {\n width: 1px;\n height: 12px;\n margin: 0 2px;\n background: rgba(255, 255, 255, 0.15);\n}\n\n.divider.light {\n background: rgba(0, 0, 0, 0.1);\n}\n\n/* --- Settings panel -------------------------------------------------- */\n\n.settings-panel {\n position: absolute;\n right: 5px;\n bottom: calc(100% + 8px);\n width: min(344px, calc(100vw - 24px));\n z-index: 1;\n background: #1a1a1a;\n border-radius: 16px;\n padding: 0;\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.08);\n cursor: default;\n --ag-settings-shift: 8px;\n transform-origin: bottom right;\n will-change: opacity, transform, filter;\n overflow: hidden;\n}\n\n.settings-panel.below {\n top: calc(100% + 8px);\n bottom: auto;\n --ag-settings-shift: -8px;\n transform-origin: top right;\n}\n\n.settings-panel.light {\n background: #fff;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 4px 16px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.04);\n}\n\n.settings-panel-enter-active {\n transition:\n opacity 0.2s ease,\n transform 0.2s ease,\n filter 0.2s ease;\n}\n\n.settings-panel-leave-active {\n pointer-events: none;\n transition:\n opacity 0.1s ease,\n transform 0.1s ease,\n filter 0.1s ease;\n}\n\n.settings-panel-enter-from,\n.settings-panel-leave-to {\n opacity: 0;\n transform: translateY(var(--ag-settings-shift)) scale(0.95);\n filter: blur(5px);\n}\n\n.settings-panel-enter-to,\n.settings-panel-leave-from {\n opacity: 1;\n transform: translateY(0) scale(1);\n filter: blur(0);\n}\n\n/* --- Settings header ------------------------------------------------- */\n\n.settings-header {\n position: sticky;\n top: -13px;\n z-index: 2;\n display: flex;\n align-items: center;\n min-height: 24px;\n margin: -13px -16px 8px;\n background: #1a1a1a;\n padding: 13px 16px 9px;\n border-bottom: 1px solid rgba(255, 255, 255, 0.07);\n box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);\n}\n\n.settings-header.light {\n background: #fff;\n border-bottom-color: rgba(0, 0, 0, 0.08);\n box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);\n}\n\n.automations-header {\n padding-top: 20px;\n padding-bottom: 20px;\n}\n\n.settings-brand {\n font-size: 13px;\n font-weight: 600;\n letter-spacing: -0.01em;\n color: #fff;\n}\n\n.settings-brand.light {\n color: rgba(0, 0, 0, 0.85);\n}\n\n.theme-toggle {\n margin-left: auto;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 22px;\n height: 22px;\n border: none;\n border-radius: 6px;\n background: transparent;\n color: rgba(255, 255, 255, 0.4);\n cursor: pointer;\n}\n\n.theme-toggle:hover {\n background: rgba(255, 255, 255, 0.1);\n color: rgba(255, 255, 255, 0.8);\n}\n\n.theme-toggle.light {\n color: rgba(0, 0, 0, 0.4);\n}\n\n.theme-toggle.light:hover {\n background: rgba(0, 0, 0, 0.06);\n color: rgba(0, 0, 0, 0.7);\n}\n\n.theme-icon-wrapper {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 16px;\n height: 16px;\n}\n\n.theme-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.theme-icon-enter-active {\n animation: themeIconIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);\n}\n\n.theme-icon-leave-active {\n position: absolute;\n inset: 0;\n transition:\n opacity 0.15s ease,\n transform 0.15s ease;\n}\n\n.theme-icon-leave-to {\n opacity: 0;\n transform: scale(0.82) rotate(18deg);\n}\n\n/* --- Settings sections ----------------------------------------------- */\n\n.settings-section+.settings-section {\n margin-top: 8px;\n padding-top: 8px;\n border-top: 1px solid rgba(255, 255, 255, 0.07);\n}\n\n.settings-panel.light .settings-section+.settings-section {\n border-top-color: rgba(0, 0, 0, 0.08);\n}\n\n.settings-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n min-height: 24px;\n}\n\n.settings-label {\n font-size: 13px;\n font-weight: 400;\n letter-spacing: -0.01em;\n color: rgba(255, 255, 255, 0.5);\n}\n\n.settings-label.light {\n color: rgba(0, 0, 0, 0.5);\n}\n\n/* --- Locale switch --------------------------------------------------- */\n\n.locale-switch {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n padding: 2px;\n border-radius: 999px;\n background: rgba(255, 255, 255, 0.06);\n}\n\n.locale-switch.light {\n background: rgba(0, 0, 0, 0.04);\n}\n\n.locale-btn {\n appearance: none;\n border: none;\n border-radius: 999px;\n background: transparent;\n color: rgba(255, 255, 255, 0.65);\n padding: 4px 9px;\n font-size: 12px;\n font-weight: 500;\n line-height: 1.2;\n cursor: pointer;\n white-space: nowrap;\n transition:\n background-color 0.15s ease,\n color 0.15s ease,\n transform 0.1s ease;\n}\n\n.locale-btn:hover {\n background: rgba(255, 255, 255, 0.08);\n color: #fff;\n}\n\n.locale-btn:active {\n transform: scale(0.97);\n}\n\n.locale-btn.active {\n background: rgba(255, 255, 255, 0.12);\n color: #fff;\n}\n\n.locale-btn.light {\n color: rgba(0, 0, 0, 0.55);\n}\n\n.locale-btn.light:hover {\n background: rgba(0, 0, 0, 0.04);\n color: rgba(0, 0, 0, 0.85);\n}\n\n.locale-btn.light.active {\n background: rgba(0, 0, 0, 0.06);\n color: rgba(0, 0, 0, 0.85);\n}\n\n/* --- Export format switch -------------------------------------------- */\n\n.format-switch {\n display: inline-flex;\n align-items: center;\n gap: 12px;\n padding: 0;\n}\n\n.format-btn {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 22px;\n height: 22px;\n padding: 0;\n border: none;\n background: transparent;\n color: rgba(255, 255, 255, 0.36);\n cursor: pointer;\n transition:\n color 0.15s ease,\n transform 0.15s ease,\n opacity 0.15s ease;\n}\n\n.format-btn::after {\n content: \"\";\n position: absolute;\n left: 50%;\n bottom: -5px;\n width: 0;\n height: 2px;\n border-radius: 999px;\n background: currentColor;\n opacity: 0;\n transform: translateX(-50%);\n transition:\n width 0.15s ease,\n opacity 0.15s ease;\n}\n\n.format-btn:hover {\n color: #fff;\n}\n\n.format-btn:active {\n transform: scale(0.96);\n}\n\n.format-btn.active {\n color: var(--ag-format-accent, #3c82f7);\n transform: scale(1.08);\n}\n\n.format-btn.active::after {\n width: 14px;\n opacity: 1;\n}\n\n.format-btn.light {\n color: rgba(0, 0, 0, 0.32);\n}\n\n.format-btn.light:hover {\n color: rgba(0, 0, 0, 0.8);\n}\n\n.format-btn.light.active {\n color: var(--ag-format-accent, #3c82f7);\n}\n\n/* --- Cycle button ---------------------------------------------------- */\n\n.cycle-btn {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 0;\n border: none;\n background: transparent;\n color: #fff;\n cursor: pointer;\n font-size: 13px;\n font-weight: 500;\n letter-spacing: -0.01em;\n}\n\n.cycle-btn.light {\n color: rgba(0, 0, 0, 0.85);\n}\n\n.cycle-text {\n display: inline-block;\n}\n\n.cycle-text-enter-active {\n animation: cycleTextIn 0.2s ease-out;\n}\n\n.cycle-dots {\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n\n.cycle-dot {\n width: 3px;\n height: 3px;\n border-radius: 50%;\n background: rgba(255, 255, 255, 0.3);\n transform: scale(0.667);\n transition:\n background-color 0.25s ease-out,\n transform 0.25s ease-out;\n}\n\n.cycle-dot.active {\n background: #fff;\n transform: scale(1);\n}\n\n.cycle-dot.light {\n background: rgba(0, 0, 0, 0.2);\n}\n\n.cycle-dot.light.active {\n background: rgba(0, 0, 0, 0.7);\n}\n\n/* --- Colour picker --------------------------------------------------- */\n\n.color-row {\n display: flex;\n gap: 8px;\n margin-top: 8px;\n}\n\n.color-ring {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n padding: 0;\n border: 2px solid transparent;\n border-radius: 50%;\n background: transparent;\n cursor: pointer;\n transition:\n border-color 0.18s ease,\n transform 0.15s ease;\n}\n\n.color-ring:hover {\n transform: scale(1.08);\n}\n\n.color-ring:active {\n transform: scale(0.95);\n}\n\n.color-dot {\n display: block;\n width: 16px;\n height: 16px;\n border-radius: 50%;\n transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1);\n}\n\n.color-dot.selected {\n transform: scale(0.83);\n}\n\n/* --- Toggle rows (checkboxes) ---------------------------------------- */\n\n.toggle-row {\n display: flex;\n align-items: center;\n gap: 8px;\n cursor: pointer;\n}\n\n.toggle-row+.toggle-row {\n margin-top: 12px;\n}\n\n.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0 0 0 0);\n white-space: nowrap;\n border: 0;\n}\n\n.checkbox {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 14px;\n height: 14px;\n flex-shrink: 0;\n border: 1px solid rgba(255, 255, 255, 0.2);\n border-radius: 4px;\n background: rgba(255, 255, 255, 0.05);\n transition:\n background-color 0.15s ease,\n border-color 0.15s ease,\n transform 0.1s ease;\n}\n\n.checkbox :deep(svg) {\n color: #1a1a1a;\n}\n\n.checkbox.checked {\n border-color: rgba(255, 255, 255, 0.3);\n background: #fff;\n}\n\n.checkbox.light {\n border-color: rgba(0, 0, 0, 0.15);\n background: #fff;\n}\n\n.checkbox.light.checked {\n border-color: #1a1a1a;\n background: #1a1a1a;\n}\n\n.checkbox.light.checked :deep(svg) {\n color: #fff;\n}\n\n.toggle-label {\n font-size: 13px;\n font-weight: 400;\n letter-spacing: -0.01em;\n color: rgba(255, 255, 255, 0.85);\n}\n\n.toggle-label.light {\n color: rgba(0, 0, 0, 0.5);\n}\n\n.copy-field-list {\n display: grid;\n gap: 10px;\n margin-top: 10px;\n}\n\n.copy-field-row+.copy-field-row {\n margin-top: 0;\n}\n\n.webhook-toggle {\n margin-top: 8px;\n}\n\n.copy-prefix-input,\n.webhook-url {\n display: block;\n width: 100%;\n margin-top: 8px;\n padding: 8px 10px;\n border: 1px solid rgba(255, 255, 255, 0.15);\n border-radius: 8px;\n background: rgba(255, 255, 255, 0.04);\n color: #fff;\n font-size: 12px;\n line-height: 1.45;\n outline: none;\n transition: border-color 0.15s ease;\n}\n\n.copy-prefix-input {\n resize: none;\n font-family: inherit;\n}\n\n.webhook-url {\n font-family: ui-monospace, SFMono-Regular, Menlo, monospace;\n resize: vertical;\n}\n\n.copy-prefix-input:focus,\n.webhook-url:focus {\n border-color: inherit;\n}\n\n.copy-prefix-input::placeholder,\n.webhook-url::placeholder {\n color: rgba(255, 255, 255, 0.25);\n}\n\n.copy-prefix-input.light,\n.webhook-url.light {\n border-color: rgba(0, 0, 0, 0.12);\n background: rgba(0, 0, 0, 0.02);\n color: rgba(0, 0, 0, 0.85);\n}\n\n.copy-prefix-input.light::placeholder,\n.webhook-url.light::placeholder {\n color: rgba(0, 0, 0, 0.3);\n}\n\n/* --- Settings page slider -------------------------------------------- */\n\n.settings-pages {\n display: flex;\n align-items: flex-start;\n transition:\n transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),\n height 0.2s ease;\n}\n\n.settings-page {\n flex: 0 0 calc(100% / var(--ag-settings-page-count, 2));\n width: calc(100% / var(--ag-settings-page-count, 2));\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n min-width: 0;\n max-height: min(72vh, 520px);\n overflow-y: auto;\n overscroll-behavior: contain;\n padding: 13px 16px 16px;\n}\n\n/* --- Label with help icon -------------------------------------------- */\n\n.settings-label-with-help {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n}\n\n/* --- Nav button (MCP/Webhooks) --------------------------------------- */\n\n.nav-btn {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n padding: 8px 6px;\n border: none;\n border-radius: 8px;\n background: transparent;\n color: rgba(255, 255, 255, 0.85);\n font-size: 12px;\n font-weight: 500;\n letter-spacing: -0.01em;\n cursor: pointer;\n transition: background-color 0.15s ease;\n}\n\n.nav-btn:hover {\n background: rgba(255, 255, 255, 0.06);\n}\n\n.nav-btn.light {\n color: rgba(0, 0, 0, 0.7);\n}\n\n.nav-btn.light:hover {\n background: rgba(0, 0, 0, 0.04);\n}\n\n.nav-btn-left {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.nav-btn-right {\n display: flex;\n align-items: center;\n gap: 8px;\n margin-left: 12px;\n}\n\n.nav-status-indicator {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 12px;\n height: 12px;\n}\n\n/* --- Status dot ------------------------------------------------------ */\n\n.status-dot {\n display: inline-block;\n width: 7px;\n height: 7px;\n border-radius: 50%;\n flex-shrink: 0;\n}\n\n.status-dot.connected {\n background: #22c55e;\n box-shadow: 0 0 4px rgba(34, 197, 94, 0.4);\n}\n\n.status-dot.disconnected {\n background: rgba(255, 255, 255, 0.25);\n}\n\n.settings-panel.light .status-dot.disconnected {\n background: rgba(0, 0, 0, 0.2);\n}\n\n/* --- Back button ----------------------------------------------------- */\n\n.back-btn {\n display: flex;\n align-items: center;\n gap: 4px;\n padding: 0;\n border: none;\n background: transparent;\n color: rgba(255, 255, 255, 0.85);\n font-size: 13px;\n font-weight: 600;\n letter-spacing: -0.01em;\n cursor: pointer;\n transition: color 0.15s ease;\n}\n\n.back-btn:hover {\n color: #fff;\n}\n\n.back-btn.light {\n color: rgba(0, 0, 0, 0.7);\n}\n\n.back-btn.light:hover {\n color: rgba(0, 0, 0, 0.95);\n}\n\n/* --- MCP status label ------------------------------------------------ */\n\n.mcp-status {\n display: flex;\n align-items: center;\n gap: 6px;\n font-size: 12px;\n font-weight: 500;\n color: rgba(255, 255, 255, 0.6);\n}\n\n.mcp-status.light {\n color: rgba(0, 0, 0, 0.5);\n}\n\n.settings-header .mcp-status {\n margin-left: auto;\n justify-content: flex-end;\n text-align: right;\n}\n\n/* --- Settings description -------------------------------------------- */\n\n.settings-description {\n margin: 6px 0 0;\n font-size: 11px;\n line-height: 1.45;\n color: rgba(255, 255, 255, 0.4);\n}\n\n.settings-description.light {\n color: rgba(0, 0, 0, 0.4);\n}\n\n/* --- Get started guide ----------------------------------------------- */\n\n.guide-grid {\n display: grid;\n grid-template-columns: 1fr;\n gap: 8px;\n}\n\n.guide-card {\n padding: 10px 12px;\n border: 1px solid rgba(255, 255, 255, 0.08);\n border-radius: 10px;\n background: rgba(255, 255, 255, 0.035);\n}\n\n.guide-card.light {\n border-color: rgba(0, 0, 0, 0.08);\n background: rgba(0, 0, 0, 0.02);\n}\n\n.guide-card+.guide-card {\n margin-top: 8px;\n}\n\n.guide-card-header {\n display: flex;\n align-items: center;\n gap: 12px;\n}\n\n.guide-card-title {\n font-size: 11px;\n font-weight: 700;\n letter-spacing: 0.01em;\n color: rgba(255, 255, 255, 0.82);\n}\n\n.guide-copy-btn {\n margin-left: auto;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n padding: 0;\n border: none;\n border-radius: 6px;\n background: transparent;\n color: rgba(255, 255, 255, 0.42);\n cursor: pointer;\n flex-shrink: 0;\n transition:\n background-color 0.15s ease,\n color 0.15s ease,\n transform 0.1s ease;\n}\n\n.guide-copy-btn:hover {\n background: rgba(255, 255, 255, 0.08);\n color: rgba(255, 255, 255, 0.88);\n}\n\n.guide-copy-btn:active {\n transform: scale(0.94);\n}\n\n.guide-copy-btn[data-copied] {\n color: #22c55e;\n}\n\n.guide-copy-btn.light {\n color: rgba(0, 0, 0, 0.38);\n}\n\n.guide-copy-btn.light:hover {\n background: rgba(0, 0, 0, 0.05);\n color: rgba(0, 0, 0, 0.74);\n}\n\n.settings-panel.light .guide-card-title {\n color: rgba(0, 0, 0, 0.74);\n}\n\n.guide-code {\n margin: 8px 0 0;\n padding: 8px 10px;\n border-radius: 8px;\n background: rgba(15, 23, 42, 0.68);\n color: #e2e8f0;\n font-size: 11px;\n line-height: 1.45;\n white-space: pre-wrap;\n word-break: break-word;\n font-family: ui-monospace, SFMono-Regular, Menlo, monospace;\n}\n\n.guide-code.light {\n background: rgba(241, 245, 249, 0.95);\n color: rgba(15, 23, 42, 0.9);\n}\n\n/* Global: applied to <html> during toolbar drag */\n:global(html.agentation-dragging) {\n cursor: grabbing !important;\n user-select: none !important;\n -webkit-user-select: none !important;\n}\n\n@media (prefers-reduced-motion: reduce) {\n\n .toolbar-container,\n .toggle-content,\n .controls-content,\n .badge,\n .control-btn,\n .settings-panel,\n .theme-icon,\n .cycle-text,\n .cycle-dot,\n .locale-btn,\n .format-btn,\n .color-ring,\n .color-dot,\n .checkbox {\n animation: none !important;\n transition: none !important;\n filter: none !important;\n }\n}\n</style>\n","<script setup lang=\"ts\">\nimport { markRaw, onMounted, onUnmounted, provide, ref, watch } from \"vue\"\nimport {\n AREA_SELECTION_KEY,\n ANNOTATIONS_STORE_KEY,\n FREEZE_KEY,\n I18N_KEY,\n OVERLAY_KEY,\n RUNTIME_BRIDGE_KEY,\n SELECTION_KEY,\n SETTINGS_KEY,\n} from \"../injection-keys.js\"\nimport { createOverlayState } from \"../composables/useOverlay.js\"\nimport { createExportActions } from \"../composables/useExport.js\"\nimport { createI18nState } from \"../composables/useI18n.js\"\nimport { createFreezeState, originalSetTimeout } from \"../composables/useFreezeState.js\"\nimport { useKeyboardShortcuts } from \"../composables/useKeyboard.js\"\nimport type { AnnotationsStore } from \"../composables/useAnnotationsStore.js\"\nimport type { AreaSelectionState } from \"../composables/useAreaSelection.js\"\nimport type { SelectionState } from \"../composables/useSelection.js\"\nimport type { SettingsState } from \"../composables/useSettings.js\"\nimport type { RuntimeBridge, UiNotification } from \"../types.js\"\nimport AnnotationPopover from \"./AnnotationPopover.vue\"\nimport DragSelectionLayer from \"./DragSelectionLayer.vue\"\nimport HighlightLayer from \"./HighlightLayer.vue\"\nimport MarkerLayer from \"./MarkerLayer.vue\"\nimport Toolbar from \"./Toolbar.vue\"\n\nconst props = defineProps<{\n bridge: RuntimeBridge\n store: AnnotationsStore\n selection: SelectionState\n settings: SettingsState\n areaSelection: AreaSelectionState\n}>()\n\nconst overlay = createOverlayState(props.selection)\nconst settings = props.settings\nconst i18n = createI18nState(() => settings.locale)\nconst freezeState = createFreezeState()\nconst exportActions = createExportActions(props.store, settings)\nconst toast = ref<(UiNotification & { id: number }) | null>(null)\n\n// Provide all dependencies to the component tree.\n// markRaw the bridge because it contains DOM nodes and functions\n// that must not be made reactive.\nprovide(RUNTIME_BRIDGE_KEY, markRaw(props.bridge))\nprovide(ANNOTATIONS_STORE_KEY, props.store)\nprovide(SELECTION_KEY, props.selection)\nprovide(AREA_SELECTION_KEY, props.areaSelection)\nprovide(OVERLAY_KEY, overlay)\nprovide(SETTINGS_KEY, settings)\nprovide(I18N_KEY, i18n)\nprovide(FREEZE_KEY, freezeState)\n\n// Register keyboard shortcuts\nuseKeyboardShortcuts({\n store: props.store,\n selection: props.selection,\n overlay,\n settings,\n exportActions,\n freezeState,\n})\n\nonMounted(() => {\n props.bridge.overlayRoot.dataset.agentationRoot = \"\"\n props.store.hydrate()\n // Kick off initial sync (flushes any unsynced annotations to the server).\n void props.bridge.sync?.init()\n})\n\nlet toastTimer: ReturnType<typeof setTimeout> | null = null\nlet unsubscribeNotifications: (() => void) | null = null\nlet unsubscribeSync: (() => void) | null = null\n\nonMounted(() => {\n unsubscribeNotifications = props.bridge.subscribeNotifications?.((notification) => {\n if (toastTimer) {\n clearTimeout(toastTimer)\n }\n\n toast.value = {\n ...notification,\n id: Date.now(),\n }\n\n toastTimer = originalSetTimeout(() => {\n toast.value = null\n toastTimer = null\n }, notification.duration ?? 2600)\n }) ?? null\n\n unsubscribeSync = props.bridge.sync?.subscribe((event) => {\n if (event.type === \"reconciled\") {\n props.store.hydrate()\n if (event.source === \"remote\" && event.annotationCount !== undefined) {\n props.bridge.notify?.({\n kind: \"info\",\n duration: 2200,\n message: i18n.messages.notifications.remoteSyncUpdated(event.annotationCount),\n })\n }\n return\n }\n\n if (event.type === \"error\" && event.message) {\n props.bridge.notify?.({\n kind: \"warning\",\n duration: 2600,\n message: i18n.messages.notifications.syncFailed(event.message),\n })\n }\n }) ?? null\n})\n\nonUnmounted(() => {\n unsubscribeNotifications?.()\n unsubscribeSync?.()\n if (toastTimer) {\n clearTimeout(toastTimer)\n }\n delete props.bridge.overlayRoot.dataset.agentationRoot\n freezeState.cleanup()\n})\n\n// Auto-show popover when an element is selected;\n// auto-hide when selection is cleared.\nwatch(\n () => props.selection.selected,\n (selected) => {\n if (selected) {\n overlay.showPopover()\n } else {\n overlay.hidePopover()\n }\n },\n)\n\n// Sync dark mode CSS vars to overlayRoot so Teleported layers inherit them.\nwatch(\n () => settings.darkMode,\n (isDark) => {\n props.bridge.overlayRoot.dataset.agTheme = isDark ? \"dark\" : \"light\"\n },\n { immediate: true },\n)\n\n// Sync outputDetail from settings back to bridge so export uses current setting.\nwatch(\n () => settings.outputDetail,\n (outputDetail) => {\n props.bridge.options.outputDetail = outputDetail\n },\n { immediate: true },\n)\n\n// Sync locale to the Teleport target so marker labels inherit the right language.\nwatch(\n () => i18n.locale,\n (locale) => {\n props.bridge.overlayRoot.lang = locale\n },\n { immediate: true },\n)\n</script>\n\n<template>\n <div\n class=\"agentation-root\"\n :class=\"{ dark: settings.darkMode, light: !settings.darkMode }\"\n :lang=\"i18n.locale\"\n data-agentation-root\n >\n <Toolbar :export-actions=\"exportActions\" />\n <AnnotationPopover />\n\n <Transition name=\"toast\">\n <div\n v-if=\"toast\"\n class=\"toast\"\n :data-kind=\"toast.kind ?? 'info'\"\n role=\"status\"\n aria-live=\"polite\"\n >\n {{ toast.message }}\n </div>\n </Transition>\n\n <Teleport :to=\"bridge.overlayRoot\">\n <HighlightLayer />\n <DragSelectionLayer />\n <MarkerLayer />\n </Teleport>\n </div>\n</template>\n\n<style scoped>\n.agentation-root {\n position: fixed;\n inset: 0;\n z-index: 99999;\n pointer-events: none;\n font-size: 16px;\n line-height: 1.5;\n font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;\n}\n\n/* Dark theme (default) */\n.agentation-root.dark {\n --ag-bg: #1e293b;\n --ag-bg-surface: rgba(30, 41, 59, 0.96);\n --ag-bg-elevated: rgba(15, 23, 42, 0.72);\n --ag-text: #e2e8f0;\n --ag-muted: #94a3b8;\n --ag-border: rgba(148, 163, 184, 0.24);\n --ag-accent: #3b82f6;\n --ag-selected: #f59e0b;\n --ag-shadow: 0 16px 48px rgba(15, 23, 42, 0.35);\n color: var(--ag-text);\n}\n\n/* Light theme */\n.agentation-root.light {\n --ag-bg: #ffffff;\n --ag-bg-surface: rgba(255, 255, 255, 0.96);\n --ag-bg-elevated: rgba(241, 245, 249, 0.72);\n --ag-text: #1e293b;\n --ag-muted: #64748b;\n --ag-border: rgba(148, 163, 184, 0.3);\n --ag-accent: #3b82f6;\n --ag-selected: #f59e0b;\n --ag-shadow: 0 16px 48px rgba(148, 163, 184, 0.2);\n color: var(--ag-text);\n}\n\n/*\n * Teleported layers (HighlightLayer, MarkerLayer) render inside\n * bridge.overlayRoot which is outside .agentation-root in the DOM.\n * We use :global selectors keyed by data-ag-theme to propagate\n * CSS variables into the Teleport target.\n */\n:global([data-ag-theme=\"dark\"]) {\n --ag-bg: #1e293b;\n --ag-bg-surface: rgba(30, 41, 59, 0.96);\n --ag-bg-elevated: rgba(15, 23, 42, 0.72);\n --ag-text: #e2e8f0;\n --ag-muted: #94a3b8;\n --ag-border: rgba(148, 163, 184, 0.24);\n --ag-accent: #3b82f6;\n --ag-selected: #f59e0b;\n --ag-shadow: 0 16px 48px rgba(15, 23, 42, 0.35);\n color: var(--ag-text);\n font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;\n}\n\n:global([data-ag-theme=\"light\"]) {\n --ag-bg: #ffffff;\n --ag-bg-surface: rgba(255, 255, 255, 0.96);\n --ag-bg-elevated: rgba(241, 245, 249, 0.72);\n --ag-text: #1e293b;\n --ag-muted: #64748b;\n --ag-border: rgba(148, 163, 184, 0.3);\n --ag-accent: #3b82f6;\n --ag-selected: #f59e0b;\n --ag-shadow: 0 16px 48px rgba(148, 163, 184, 0.2);\n color: var(--ag-text);\n font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;\n}\n\n:global([data-ag-theme]) {\n font-size: 16px;\n line-height: 1.5;\n}\n\n.agentation-root,\n.agentation-root :deep(*),\n:global([data-ag-theme]),\n:global([data-ag-theme] *) {\n box-sizing: border-box;\n}\n\n.agentation-root :deep(button),\n.agentation-root :deep(textarea),\n:global([data-ag-theme] button),\n:global([data-ag-theme] textarea) {\n font: inherit;\n}\n\n.toast {\n position: fixed;\n left: 50%;\n bottom: 32px;\n transform: translateX(-50%);\n max-width: min(420px, calc(100vw - 32px));\n padding: 10px 14px;\n border-radius: 12px;\n background: rgba(15, 23, 42, 0.92);\n color: rgba(255, 255, 255, 0.92);\n box-shadow: 0 12px 32px rgba(15, 23, 42, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.06);\n font-size: 12px;\n line-height: 1.45;\n letter-spacing: -0.01em;\n pointer-events: none;\n z-index: 100010;\n}\n\n.toast[data-kind=\"warning\"] {\n background: rgba(35, 25, 6, 0.94);\n color: rgba(255, 244, 214, 0.96);\n box-shadow: 0 12px 32px rgba(146, 64, 14, 0.22), 0 0 0 1px rgba(245, 158, 11, 0.18);\n}\n\n.light .toast {\n background: rgba(255, 255, 255, 0.96);\n color: rgba(15, 23, 42, 0.9);\n box-shadow: 0 12px 32px rgba(148, 163, 184, 0.24), 0 0 0 1px rgba(15, 23, 42, 0.08);\n}\n\n.light .toast[data-kind=\"warning\"] {\n background: rgba(255, 251, 235, 0.98);\n color: #92400e;\n box-shadow: 0 12px 32px rgba(251, 191, 36, 0.18), 0 0 0 1px rgba(245, 158, 11, 0.2);\n}\n\n.toast-enter-active,\n.toast-leave-active {\n transition:\n opacity 0.18s ease,\n transform 0.18s cubic-bezier(0.22, 1, 0.36, 1),\n filter 0.18s ease;\n}\n\n.toast-enter-from,\n.toast-leave-to {\n opacity: 0;\n transform: translateX(-50%) translateY(8px) scale(0.96);\n filter: blur(4px);\n}\n</style>\n","// Types\nexport type {\n RuntimeBridge,\n RuntimeStorageBridge,\n RuntimeSyncBridge,\n RuntimeSyncEvent,\n RuntimeSyncInfo,\n UiNotification,\n BoundingBox,\n AreaSelectionRect,\n AreaSelectionMatch,\n HoverSnapshot,\n SelectionSnapshot,\n} from \"./types.js\"\n\n// Injection keys\nexport {\n AREA_SELECTION_KEY,\n ANNOTATIONS_STORE_KEY,\n I18N_KEY,\n OVERLAY_KEY,\n RUNTIME_BRIDGE_KEY,\n SELECTION_KEY,\n SETTINGS_KEY,\n} from \"./injection-keys.js\"\n\n// I18n\nexport type { Locale, Messages, ColorKey } from \"./i18n/types.js\"\nexport {\n DEFAULT_LOCALE,\n SUPPORTED_LOCALES,\n LOCALE_LABELS,\n isValidLocale,\n resolveMessages,\n} from \"./i18n/index.js\"\nexport type { I18nState } from \"./composables/useI18n.js\"\nexport { createI18nState } from \"./composables/useI18n.js\"\n\n// Composables\nexport type { AnnotationsStore } from \"./composables/useAnnotationsStore.js\"\nexport { createAnnotationsStore } from \"./composables/useAnnotationsStore.js\"\nexport type { SelectionState } from \"./composables/useSelection.js\"\nexport { createSelectionState } from \"./composables/useSelection.js\"\nexport type { AreaSelectionState } from \"./composables/useAreaSelection.js\"\nexport { createAreaSelectionState } from \"./composables/useAreaSelection.js\"\nexport type { OverlayState, OverlayPosition } from \"./composables/useOverlay.js\"\nexport { createOverlayState } from \"./composables/useOverlay.js\"\nexport type { SettingsState } from \"./composables/useSettings.js\"\nexport { createSettingsState } from \"./composables/useSettings.js\"\nexport type { ExportActions, ExportFormat } from \"./composables/useExport.js\"\nexport { createExportActions } from \"./composables/useExport.js\"\nexport { useKeyboardShortcuts } from \"./composables/useKeyboard.js\"\n\nexport const AGENTATION_UI_STYLE_HREF = \"\"\n\n// Components\nimport OverlayRoot from \"./components/OverlayRoot.vue\"\n\nexport { OverlayRoot }\n"],"names":["RUNTIME_BRIDGE_KEY","ANNOTATIONS_STORE_KEY","SELECTION_KEY","AREA_SELECTION_KEY","OVERLAY_KEY","SETTINGS_KEY","I18N_KEY","FREEZE_KEY","en","n","count","label","names","remaining","message","zhCN","SUPPORTED_LOCALES","DEFAULT_LOCALE","LOCALE_LABELS","MESSAGE_CATALOGS","localeSet","isValidLocale","value","resolveMessages","locale","createI18nState","resolvedLocale","computed","toValue","messages","buildElementLocator","element","rect","classes","isStableClass","text","normalizeText","generateSelector","findAnnotationTarget","annotation","metadata","locator","getElementLocator","exact","querySelectorDeep","tag","candidates","querySelectorAllDeep","exactTextMatches","candidate","ranked","scoreCandidate","a","b","parseElementLocator","parsed","item","isBoundingBox","attr","selector","isUniqueSelector","stableClasses","buildPathSelector","segments","current","depth","segment","siblings","child","fallback","root","getSearchRoots","found","isOwnElement","results","node","roots","queue","score","candidateText","_a","classList","cls","dx","dy","distance","pattern","box","isFiniteNumber","createAnnotationsStore","bridge","state","reactive","hydrate","loaded","saveAnnotation","comment","snapshot","trimmed","buildAnnotation","persist","removeAnnotation","id","idx","removed","updateAnnotation","updated","clearAll","toDelete","exportJSON","formatToJSON","buildPageContext","exportMarkdown","formatToMarkdown","source","elementName","selectedText","isMultiSelect","identified","identifyElement","generateId","buildMetadata","elementPath","multiSelectElements","elementBoundingBoxes","fixed","isFixedPosition","liveBoxes","el","elRect","toDocumentBox","selectionBoxes","boundingBox","raw","getElementPath","getFullElementPath","getElementClasses","getNearbyText","getNearbyElements","getForensicComputedStyles","getAccessibilityInfo","buildProjectArea","buildContextHints","v","route","hierarchy","landmark","getLandmarkLabel","parts","input","hints","nearbyText","pushHint","findClosestHeadingText","isFixed","heading","role","position","createSelectionState","createAreaSelectionState","x","y","normalizeRect","matches","startX","startY","endX","endY","left","top","right","bottom","POPOVER_OFFSET","POPOVER_MARGIN","POPOVER_WIDTH","POPOVER_HEIGHT","createOverlayState","selection","popoverVisible","popoverPosition","computePopoverPosition","anchorRect","vw","vh","preferredTop","fallbackTop","maxLeft","centeredLeft","COPY_EXCLUDE_FIELDS","STORAGE_KEY","COLOR_OPTIONS","DEFAULT_ANNOTATION_COLOR","createSettingsState","defaults","persisted","loadSettings","normalizeCopyExcludeFields","normalizeLocale","watch","settings","saveSettings","allowed","field","EXCLUDE_SELECTORS","NOT_SELECTORS","STYLE_ID","STATE_KEY","getState","w","_s","originalSetTimeout","isAgentationElement","_b","freeze","style","anim","target","video","unfreeze","e","createFreezeState","isFrozen","ref","toggleFreeze","cleanup","readonly","createExportActions","store","copyFeedback","writeClipboard","downloadFallback","flash","kind","content","filename","blob","url","payload","buildClipboardPayload","format","page","getPageContext","prependCopyPrefix","prefix","useKeyboardShortcuts","deps","overlay","exportActions","freezeState","onKeydown","active","isEditableField","key","onMounted","onUnmounted","injectStrict","name","inject","svg","size","viewBox","children","h","IconListSparkle","props","s","IconCopyAnimated","copied","transition","IconMarkdown","IconTrashAlt","IconEye","IconEyeOff","IconPause","IconPlay","IconGear","IconConnectedNodes","IconXmarkLarge","IconSun","IconMoon","IconCheckSmallAnimated","IconJson","IconHelp","IconChevronLeft","IconChevronRight","i18n","stylesExpanded","shaking","textareaRef","editingAnnotation","isCreateMode","isEditMode","isOpen","accentColor","popoverStyle","pos","displayName","displaySource","src","threadMessages","workflowStatus","workflowStatusLabel","getStatusLabel","workflowStatusTone","getStatusTone","computedStyles","getAnnotationComputedStyles","selectedElement","parseComputedStylesString","styleEntries","hasComputedStyles","shakeTimer","open","nextTick","focusTextarea","tick","previousTick","shake","onBeforeUnmount","save","err","snap","dismiss","deleteAnnotation","textarea","event","status","getRoleLabel","formatTimestamp","timestamp","date","entry","_createBlock","_Transition","_createElementBlock","_unref","_createElementVNode","_hoisted_1","_cache","$event","_normalizeClass","_hoisted_3","_toDisplayString","_hoisted_4","_hoisted_5","_openBlock","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_Fragment","_renderList","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","property","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_22","_hoisted_23","_createVNode","_hoisted_25","areaSelection","selectionRectStyle","matchedBoxes","index","_normalizeStyle","boxes","syncBoxes","selected","next","bb","_TransitionGroup","hoveredId","syncVersion","scroll","showMarkers","annotationColor","markers","getBoundingBox","liveTarget","liveRect","m","syncFrame","resizeObserver","mutationObserver","scheduleLayoutSync","syncLayout","onMarkerHover","onMarkerLeave","onMarkerClick","marker","truncate","max","getStatus","getMarkerColor","_withModifiers","_hoisted_2","isClient","toString","isObject","val","toArray","toRefs","objectRef","options","isRef","toRefs$1","result","customRef","_toValue","copy","newObject","watchImmediate","cb","defaultWindow","unrefElement","elRef","_$el","plain","useEventListener","args","register","listener","firstParamTargets","test","_firstParamTargets$va","_firstParamTargets$va2","unref","raw_targets","raw_events","raw_listeners","raw_options","_","onCleanup","optionsClone","cleanups","fn","defaultScrollConfig","clampContainerScroll","container","useDraggable","_toValue2","_toValue3","_scrollConfig$directi","pointerTypes","preventDefault$1","stopPropagation","onMove","onEnd","onStart","initialValue","axis","draggingElement","containerElement","draggingHandle","buttons","restrictInView","autoScroll","pressedDelta","filterEvent","handleEvent","scrollConfig","scrollSettings","getScrollAxisValues","handleAutoScroll","targetRect","position$1","clientWidth","clientHeight","scrollLeft","scrollTop","scrollWidth","scrollHeight","marginX","marginY","speedX","speedY","deltaX","deltaY","autoScrollInterval","startAutoScroll","relativePosition","stopAutoScroll","isPointerNearEdge","pointer","margin","checkAutoScroll","start","_container$getBoundin","containerRect","move","relativeX","relativeY","end","config","_options$capture","POSITION_SANITY_MULTIPLIER","POSITION_SANITY_MIN_LIMIT","useToolbarDrag","padding","toolbarHeight","dragThreshold","toolbarEl","shallowRef","hasPosition","isDragging","justFinishedDrag","session","cachedWrapperWidth","cachedContentWidth","updateMeasurements","constrain","rawOffset","maxReasonableOffset","contentOffset","minX","maxX","maxY","DRAG_CLASS","lockInteraction","unlockInteraction","isIgnoredTarget","saved","loadPosition","initialPos","_pos","dragPos","constrained","savePosition","toolbarStyle","onWindowBlur","onResize","syncConstraints","postMountTimer","postMountRaf","schedulePostMountSync","bindToolbarRef","onMouseDown","_event","consumeJustFinishedDrag","limitX","limitY","visible","triggerRef","hoverTimer","onMouseEnter","trigger","onMouseLeave","_renderSlot","_ctx","_Teleport","__props","HELP_ICON_SIZE","SETTINGS_PANEL_MAX_HEIGHT","OUTPUT_DETAIL_KEYS","SETTINGS_PAGE_KEYS","toolbarRef","mainSettingsPageRef","copySettingsPageRef","automationsSettingsPageRef","expanded","settingsOpen","settingsPage","settingsPagesHeight","guideCopyFeedback","showEntranceAnimation","drag","hasAnnotations","isLight","copyFormat","isMarkdownFormat","copyFeedbackActive","panelOpen","settingsPageIndex","settingsPagesStyle","pageCount","currentOutputDetailLabel","settingsPanelPlacement","mcpConnected","syncInfo","apiEndpoint","mcpHttpEndpoint","mcpSseEndpoint","cliCommand","apiPort","extractPort","mcpPort","claudeCommand","webhookTargets","webhookEnv","connectionCards","integrationCards","isExpanded","closeSettingsPanel","entranceTimer","guideCopyTimer","onOutsideClick","syncSettingsPanelHeight","isEventInsideToolbar","setToolbarRef","toolbar","path","handleClick","close","toggleMarkers","toggleSettingsPanel","openAutomationsPanel","openCopySettingsPanel","showMainSettings","toggleCopyExcludedField","cycleOutputDetail","k","exportCurrentFormat","port","copyGuideValue","writeTextToClipboard","activePage","getMaxSettingsPanelHeight","loc","_hoisted_13","AgTooltip","_hoisted_24","_hoisted_26","_hoisted_27","c","_hoisted_29","_hoisted_30","_hoisted_32","_hoisted_34","_hoisted_36","_hoisted_37","_hoisted_38","_hoisted_40","_hoisted_41","_hoisted_42","_hoisted_44","_hoisted_45","_hoisted_46","_hoisted_48","_hoisted_49","_createTextVNode","_hoisted_50","_hoisted_51","_hoisted_52","_hoisted_53","_hoisted_56","_hoisted_57","_hoisted_58","_hoisted_59","_hoisted_60","_hoisted_61","_hoisted_63","_hoisted_64","_hoisted_65","_hoisted_66","_hoisted_68","_hoisted_69","_hoisted_70","toast","provide","markRaw","toastTimer","unsubscribeNotifications","unsubscribeSync","notification","_c","_d","isDark","outputDetail","Toolbar","AnnotationPopover","HighlightLayer","DragSelectionLayer","MarkerLayer","AGENTATION_UI_STYLE_HREF"],"mappings":";;AAUO,MAAMA,KAAkD,OAAO,2BAA2B,GACpFC,KAAwD,OAAO,8BAA8B,GAC7FC,KAA8C,OAAO,sBAAsB,GAC3EC,KAAuD,OAAO,2BAA2B,GACzFC,KAA0C,OAAO,oBAAoB,GACrEC,KAA4C,OAAO,qBAAqB,GACxEC,KAAoC,OAAO,iBAAiB,GAC5DC,KAAwC,OAAO,mBAAmB,GCflEC,KAAe;AAAA,EAC1B,SAAS;AAAA,IACP,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,aAAa;AAAA,IACb,aAAa;AAAA,IACb,iBAAiB;AAAA,IACjB,iBAAiB;AAAA,IACjB,cAAc;AAAA,IACd,kBAAkB;AAAA,IAClB,UAAU;AAAA,IACV,cAAc;AAAA,IACd,UAAU;AAAA,IACV,cAA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kBAAgBpV,EAAAxF,CAAA,EAAA,GAAa,MAAA,GAAA,CAAA,gBAAA,CAAA;AAAA,MACvCsH,EAAqBuT,EAAA;AAAA,MAErBvT,EAUahC,IAAA,EAVD,MAAK,WAAO;AAAA,oBACtB,MAQM;AAAA,UAPE2U,EAAA,cADR1U,EAQM,OAAA;AAAA;YANJ,OAAM;AAAA,YACL,aAAW0U,EAAA,MAAM,QAAI;AAAA,YACtB,MAAK;AAAA,YACL,aAAU;AAAA,UAAA,GAEPlU,EAAAkU,EAAA,MAAM,OAAO,GAAA,GAAAtQ,EAAA;;;;YAIpBtE,GAIWgO,IAAA;AAAA,QAJA,IAAIC,EAAA,OAAO;AAAA,MAAA;QACpBhM,EAAkBwT,EAAA;AAAA,QAClBxT,EAAsByT,EAAA;AAAA,QACtBzT,EAAe0T,EAAA;AAAA,MAAA;;;qEC3IRC,KAA2B;","x_google_ignoreList":[22,23]}
1
+ {"version":3,"file":"index.js","sources":["../src/injection-keys.ts","../src/i18n/en.ts","../src/i18n/zh-CN.ts","../src/i18n/index.ts","../src/composables/useI18n.ts","../src/annotation-target.ts","../src/composables/useAnnotationsStore.ts","../src/composables/useSelection.ts","../src/composables/useAreaSelection.ts","../src/composables/useOverlay.ts","../src/copy-fields.ts","../src/composables/useSettings.ts","../../core/src/dom/freeze-animations.ts","../src/composables/useFreezeState.ts","../src/composables/useExport.ts","../src/composables/useKeyboard.ts","../src/utils.ts","../src/components/icons.ts","../src/components/AnnotationPopover.vue","../src/components/DragSelectionLayer.vue","../src/components/HighlightLayer.vue","../src/components/MarkerLayer.vue","../../../node_modules/.pnpm/@vueuse+shared@14.2.1_vue@3.5.29_typescript@5.9.3_/node_modules/@vueuse/shared/dist/index.js","../../../node_modules/.pnpm/@vueuse+core@14.2.1_vue@3.5.29_typescript@5.9.3_/node_modules/@vueuse/core/dist/index.js","../src/composables/useToolbarDrag.ts","../src/components/AgTooltip.vue","../src/components/Toolbar.vue","../src/components/OverlayRoot.vue","../src/index.ts"],"sourcesContent":["import type { InjectionKey } from \"vue\"\nimport type { RuntimeBridge } from \"./types.js\"\nimport type { AnnotationsStore } from \"./composables/useAnnotationsStore.js\"\nimport type { AreaSelectionState } from \"./composables/useAreaSelection.js\"\nimport type { SelectionState } from \"./composables/useSelection.js\"\nimport type { OverlayState } from \"./composables/useOverlay.js\"\nimport type { SettingsState } from \"./composables/useSettings.js\"\nimport type { I18nState } from \"./composables/useI18n.js\"\nimport type { FreezeState } from \"./composables/useFreezeState.js\"\n\nexport const RUNTIME_BRIDGE_KEY: InjectionKey<RuntimeBridge> = Symbol(\"agentation-runtime-bridge\")\nexport const ANNOTATIONS_STORE_KEY: InjectionKey<AnnotationsStore> = Symbol(\"agentation-annotations-store\")\nexport const SELECTION_KEY: InjectionKey<SelectionState> = Symbol(\"agentation-selection\")\nexport const AREA_SELECTION_KEY: InjectionKey<AreaSelectionState> = Symbol(\"agentation-area-selection\")\nexport const OVERLAY_KEY: InjectionKey<OverlayState> = Symbol(\"agentation-overlay\")\nexport const SETTINGS_KEY: InjectionKey<SettingsState> = Symbol(\"agentation-settings\")\nexport const I18N_KEY: InjectionKey<I18nState> = Symbol(\"agentation-i18n\")\nexport const FREEZE_KEY: InjectionKey<FreezeState> = Symbol(\"agentation-freeze\")\n","import type { Messages } from \"./types.js\"\n\nexport const en: Messages = {\n toolbar: {\n pause: \"Pause animations (P)\",\n resume: \"Resume animations (P)\",\n pauseAria: \"Pause animations\",\n resumeAria: \"Resume animations\",\n hideMarkers: \"Hide markers (H)\",\n showMarkers: \"Show markers (H)\",\n hideMarkersAria: \"Hide markers\",\n showMarkersAria: \"Show markers\",\n copyMarkdown: \"Copy as Markdown (C)\",\n copyMarkdownAria: \"Copy as Markdown\",\n copyJson: \"Copy as JSON\",\n copyJsonAria: \"Copy as JSON\",\n clearAll: \"Clear all (X)\",\n clearAllAria: \"Clear all annotations\",\n settings: \"Settings\",\n toggleSettingsAria: \"Toggle settings\",\n closeToolbar: \"Close toolbar (Esc)\",\n closeToolbarAria: \"Close toolbar\",\n },\n popover: {\n editPlaceholder: \"Update feedback...\",\n createPlaceholder: \"What should change?\",\n deleteAnnotation: \"Delete annotation\",\n cancel: \"Cancel\",\n save: \"Save\",\n update: \"Update\",\n },\n marker: {\n annotationAria: (n) => `Annotation ${n}`,\n clickToEdit: \"Click to edit\",\n },\n workflow: {\n statusPending: \"Pending\",\n statusAcknowledged: \"Acknowledged\",\n statusResolved: \"Resolved\",\n statusDismissed: \"Dismissed\",\n roleAgent: \"Agent\",\n roleHuman: \"Human\",\n thread: \"Thread\",\n replyCount: (count) => `${count} ${count === 1 ? \"reply\" : \"replies\"}`,\n },\n settings: {\n lightMode: \"Light mode\",\n darkMode: \"Dark mode\",\n switchToLightAria: \"Switch to light mode\",\n switchToDarkAria: \"Switch to dark mode\",\n language: \"Language\",\n outputDetail: \"Output detail\",\n exportFormat: \"Copy format\",\n exportFormatMarkdownAria: \"Use Markdown copy format\",\n exportFormatJsonAria: \"Use JSON copy format\",\n copySettings: \"Copy content settings\",\n copySettingsDescription: \"Only affects clipboard copy. MCP and webhook payloads stay unchanged.\",\n copyPrefix: \"Prefix prompt\",\n copyPrefixDescription: \"Prepended before copied content with a line break.\",\n copyPrefixPlaceholder: \"\",\n copyExclusions: \"Excluded fields\",\n copyExclusionsDescription: \"Checked fields are removed from copied output when they are present.\",\n copyFieldLabels: {\n projectArea: \"Project area\",\n contextHints: \"Context hints\",\n sourceLocation: \"Source location\",\n component: \"Component\",\n componentHierarchy: \"Component hierarchy\",\n framework: \"Framework / resolver\",\n elementPath: \"Element path\",\n fullDomPath: \"Full DOM path\",\n cssClasses: \"CSS classes\",\n position: \"Position\",\n selectedText: \"Selected text\",\n context: \"Context\",\n computedStyles: \"Computed styles\",\n accessibility: \"Accessibility\",\n nearbyElements: \"Nearby elements\",\n url: \"URL\",\n timestamp: \"Timestamp\",\n viewport: \"Viewport\",\n userAgent: \"User Agent\",\n devicePixelRatio: \"Device pixel ratio\",\n },\n markerColour: \"Marker colour\",\n clearOnCopy: \"Clear on copy\",\n blockPageInteractions: \"Block page interactions\",\n componentSource: \"Component source\",\n manageMcpWebhooks: \"Manage MCP & Webhooks\",\n getStarted: \"Get started\",\n mcpConnection: \"MCP Connection\",\n mcpDescription: \"Connect to an MCP server to let AI agents consume and respond to your annotations in real time.\",\n mcpLearnMore: \"Learn more\",\n mcpStatusConnected: \"Connected\",\n mcpStatusDisconnected: \"Disconnected\",\n webhooks: \"Webhooks\",\n webhooksDescription: \"Automatically send annotations to an external endpoint when created or updated.\",\n webhooksAutoSend: \"Auto-send annotations\",\n webhooksUrlPlaceholder: \"https://example.com/webhook\",\n outputDetailHelp: \"Controls how much metadata is included when exporting annotations.\",\n componentSourceHelp: \"Show the Vue component file path and line number for each selected element.\",\n blockInteractionsHelp: \"Prevent clicks from triggering page navigation or actions while annotating.\",\n getStartedDescription: \"Use one shared Agentation server for all local Vite projects, and scope agent reads with projectFilter when multiple apps share it.\",\n sharedServerTitle: \"Shared server recommendation\",\n sharedServerDescription: \"Point multiple projects at the same API and MCP transport ports. If those ports are already running, the plugin reuses the existing server instead of spawning another copy.\",\n isolationTitle: \"Isolation alternative\",\n isolationDescription: \"If you want strict separation, give each project different API/MCP ports and a distinct projectId. Shared mode is the default and usually simpler.\",\n projectScopeLabel: \"Project scope\",\n apiEndpointLabel: \"Browser sync API\",\n mcpHttpEndpointLabel: \"Streamable HTTP MCP\",\n mcpSseEndpointLabel: \"Legacy SSE MCP\",\n cliCommandLabel: \"CLI server\",\n claudeCommandLabel: \"Claude CLI\",\n cursorEndpointLabel: \"Cursor / HTTP MCP\",\n codexEndpointLabel: \"Codex / generic MCP\",\n webhookEnvLabel: \"Webhook env\",\n webhookDescriptionLong: \"The server reads AGENTATION_WEBHOOK_URL or AGENTATION_WEBHOOKS and forwards annotation events to those endpoints.\",\n copyValueAria: (label) => `Copy ${label}`,\n },\n colors: {\n purple: \"Purple\",\n blue: \"Blue\",\n cyan: \"Cyan\",\n green: \"Green\",\n yellow: \"Yellow\",\n orange: \"Orange\",\n red: \"Red\",\n },\n outputDetail: {\n compact: \"Compact\",\n standard: \"Standard\",\n detailed: \"Detailed\",\n forensic: \"Forensic\",\n },\n selection: {\n areaLabel: (count, names, remaining) =>\n `${count} ${count === 1 ? \"element\" : \"elements\"}: ${names}${remaining > 0 ? ` +${remaining} more` : \"\"}`,\n },\n notifications: {\n sourceUnavailableElement: \"This element could not be mapped to Vue source. Try selecting a nearby component element.\",\n sourceUnavailableArea: \"This selection could not be mapped to Vue source. Try a smaller component area.\",\n remoteSyncUpdated: (count) => `Agent sync updated ${count} annotations`,\n syncFailed: (message) => `Sync failed: ${message}`,\n },\n}\n","import type { Messages } from \"./types.js\"\n\nexport const zhCN: Messages = {\n toolbar: {\n pause: \"暂停动画 (P)\",\n resume: \"恢复动画 (P)\",\n pauseAria: \"暂停动画\",\n resumeAria: \"恢复动画\",\n hideMarkers: \"隐藏标记 (H)\",\n showMarkers: \"显示标记 (H)\",\n hideMarkersAria: \"隐藏标记\",\n showMarkersAria: \"显示标记\",\n copyMarkdown: \"复制为 Markdown (C)\",\n copyMarkdownAria: \"复制为 Markdown\",\n copyJson: \"复制为 JSON\",\n copyJsonAria: \"复制为 JSON\",\n clearAll: \"清除全部 (X)\",\n clearAllAria: \"清除所有批注\",\n settings: \"设置\",\n toggleSettingsAria: \"切换设置面板\",\n closeToolbar: \"关闭工具栏 (Esc)\",\n closeToolbarAria: \"关闭工具栏\",\n },\n popover: {\n editPlaceholder: \"更新反馈...\",\n createPlaceholder: \"需要修改什么?\",\n deleteAnnotation: \"删除批注\",\n cancel: \"取消\",\n save: \"保存\",\n update: \"更新\",\n },\n marker: {\n annotationAria: (n) => `批注 ${n}`,\n clickToEdit: \"点击编辑\",\n },\n workflow: {\n statusPending: \"待处理\",\n statusAcknowledged: \"已接收\",\n statusResolved: \"已解决\",\n statusDismissed: \"已忽略\",\n roleAgent: \"Agent\",\n roleHuman: \"人工\",\n thread: \"线程\",\n replyCount: (count) => `${count} 条回复`,\n },\n settings: {\n lightMode: \"浅色模式\",\n darkMode: \"深色模式\",\n switchToLightAria: \"切换到浅色模式\",\n switchToDarkAria: \"切换到深色模式\",\n language: \"语言\",\n outputDetail: \"输出详情\",\n exportFormat: \"复制格式\",\n exportFormatMarkdownAria: \"使用 Markdown 复制格式\",\n exportFormatJsonAria: \"使用 JSON 复制格式\",\n copySettings: \"复制信息设置\",\n copySettingsDescription: \"仅作用于复制到剪贴板,不影响 MCP / Webhooks 的发送内容。\",\n copyPrefix: \"前缀提示词\",\n copyPrefixDescription: \"复制时会加在最前面,并自动换行。\",\n copyPrefixPlaceholder: \"例如:你好,请帮我修改以下内容:\",\n copyExclusions: \"排除项\",\n copyExclusionsDescription: \"勾选后,复制时如果存在这些字段,就自动过滤掉不复制。\",\n copyFieldLabels: {\n projectArea: \"Project area\",\n contextHints: \"Context hints\",\n sourceLocation: \"源码位置\",\n component: \"组件名\",\n componentHierarchy: \"组件层级\",\n framework: \"框架 / 解析器\",\n elementPath: \"元素路径\",\n fullDomPath: \"完整 DOM 路径\",\n cssClasses: \"CSS 类名\",\n position: \"位置信息\",\n selectedText: \"选中文本\",\n context: \"上下文\",\n computedStyles: \"计算样式\",\n accessibility: \"无障碍信息\",\n nearbyElements: \"附近元素\",\n url: \"URL\",\n timestamp: \"时间戳\",\n viewport: \"视口\",\n userAgent: \"User Agent\",\n devicePixelRatio: \"设备像素比\",\n },\n markerColour: \"标记颜色\",\n clearOnCopy: \"复制后清除\",\n blockPageInteractions: \"阻止页面交互\",\n componentSource: \"组件源码\",\n manageMcpWebhooks: \"管理 MCP 与 Webhooks\",\n getStarted: \"快速开始\",\n mcpConnection: \"MCP 连接\",\n mcpDescription: \"连接 MCP 服务器,让 AI 代理实时获取并响应你的批注。\",\n mcpLearnMore: \"了解更多\",\n mcpStatusConnected: \"已连接\",\n mcpStatusDisconnected: \"未连接\",\n webhooks: \"Webhooks\",\n webhooksDescription: \"创建或更新批注时自动发送到外部端点。\",\n webhooksAutoSend: \"自动发送批注\",\n webhooksUrlPlaceholder: \"https://example.com/webhook\",\n outputDetailHelp: \"控制导出批注时包含多少元数据。\",\n componentSourceHelp: \"显示所选元素对应的 Vue 组件文件路径和行号。\",\n blockInteractionsHelp: \"批注期间阻止点击触发页面导航或操作。\",\n getStartedDescription: \"建议让多个本地 Vite 项目共用一个 Agentation 服务,再通过 projectFilter 显式限定 agent 读取范围。\",\n sharedServerTitle: \"共用服务推荐\",\n sharedServerDescription: \"让多个项目指向同一组 API 与 MCP 端口。如果这些端口已经被别的项目启动,插件会直接复用,不再重复拉起一份服务。\",\n isolationTitle: \"隔离方案\",\n isolationDescription: \"如果你需要硬隔离,可以给每个项目配置不同的 API/MCP 端口,并设置独立 projectId。默认仍建议共用服务。\",\n projectScopeLabel: \"项目作用域\",\n apiEndpointLabel: \"浏览器同步 API\",\n mcpHttpEndpointLabel: \"Streamable HTTP MCP\",\n mcpSseEndpointLabel: \"兼容 SSE MCP\",\n cliCommandLabel: \"CLI 启动命令\",\n claudeCommandLabel: \"Claude CLI\",\n cursorEndpointLabel: \"Cursor / HTTP MCP\",\n codexEndpointLabel: \"Codex / 通用 MCP\",\n webhookEnvLabel: \"Webhook 环境变量\",\n webhookDescriptionLong: \"服务端会读取 AGENTATION_WEBHOOK_URL 或 AGENTATION_WEBHOOKS,并把批注事件转发到这些地址。\",\n copyValueAria: (label) => `复制${label}`,\n },\n colors: {\n purple: \"紫色\",\n blue: \"蓝色\",\n cyan: \"青色\",\n green: \"绿色\",\n yellow: \"黄色\",\n orange: \"橙色\",\n red: \"红色\",\n },\n outputDetail: {\n compact: \"精简\",\n standard: \"标准\",\n detailed: \"详细\",\n forensic: \"取证级\",\n },\n selection: {\n areaLabel: (count, names, remaining) =>\n `${count} 个元素:${names}${remaining > 0 ? ` 等另外 ${remaining} 项` : \"\"}`,\n },\n notifications: {\n sourceUnavailableElement: \"无法将此元素映射到 Vue 源码。请尝试选择附近的组件元素。\",\n sourceUnavailableArea: \"无法将此选区映射到 Vue 源码。请尝试缩小选区范围。\",\n remoteSyncUpdated: (count) => `Agent 同步已更新 ${count} 条批注`,\n syncFailed: (message) => `同步失败:${message}`,\n },\n}\n","import { en } from \"./en.js\"\nimport { zhCN } from \"./zh-CN.js\"\nimport type { Locale, Messages } from \"./types.js\"\n\nexport type { Locale, Messages, ColorKey } from \"./types.js\"\n\nexport const SUPPORTED_LOCALES = [\"en\", \"zh-CN\"] as const satisfies readonly Locale[]\nexport const DEFAULT_LOCALE: Locale = \"en\"\n\n/** Self-identifying labels so the user can always find their language. */\nexport const LOCALE_LABELS: Record<Locale, string> = {\n \"en\": \"EN\",\n \"zh-CN\": \"中文\",\n}\n\nconst MESSAGE_CATALOGS: Record<Locale, Messages> = {\n en,\n \"zh-CN\": zhCN,\n}\n\nconst localeSet: ReadonlySet<string> = new Set(SUPPORTED_LOCALES)\n\n/** Type guard: returns `true` when `value` is a supported locale string. */\nexport function isValidLocale(value: unknown): value is Locale {\n return typeof value === \"string\" && localeSet.has(value)\n}\n\n/** Resolve message catalog for a locale; falls back to English silently. */\nexport function resolveMessages(locale?: string): Messages {\n return MESSAGE_CATALOGS[isValidLocale(locale) ? locale : DEFAULT_LOCALE]\n}\n","import { computed, toValue, type MaybeRefOrGetter } from \"vue\"\nimport { DEFAULT_LOCALE, isValidLocale, resolveMessages } from \"../i18n/index.js\"\nimport type { Locale, Messages } from \"../i18n/types.js\"\n\nexport interface I18nState {\n /** Current resolved locale. */\n readonly locale: Locale\n /** Message catalog for the current locale. */\n readonly messages: Messages\n}\n\n/**\n * Creates a reactive i18n state derived from a locale source.\n * Falls back to English when the source value is invalid.\n */\nexport function createI18nState(\n locale: MaybeRefOrGetter<Locale | string | undefined>,\n): I18nState {\n const resolvedLocale = computed<Locale>(() => {\n const value = toValue(locale)\n return isValidLocale(value) ? value : DEFAULT_LOCALE\n })\n\n const messages = computed(() => resolveMessages(resolvedLocale.value))\n\n return {\n get locale() { return resolvedLocale.value },\n get messages() { return messages.value },\n }\n}\n","import type { AnnotationV2 } from \"@liuovo/agentation-vue-core\"\nimport type { BoundingBox } from \"./types.js\"\n\nexport interface ElementLocator {\n selector?: string\n tag?: string\n text?: string\n classes?: string[]\n position?: BoundingBox\n}\n\nexport function buildElementLocator(element: HTMLElement): ElementLocator {\n const rect = element.getBoundingClientRect()\n const classes = Array.from(element.classList)\n .filter(isStableClass)\n .slice(0, 4)\n const text = normalizeText(element.textContent).slice(0, 100)\n\n return {\n selector: generateSelector(element) ?? undefined,\n tag: element.tagName.toLowerCase(),\n text: text || undefined,\n classes: classes.length > 0 ? classes : undefined,\n position: {\n x: rect.left + window.scrollX,\n y: rect.top + window.scrollY,\n width: rect.width,\n height: rect.height,\n },\n }\n}\n\nexport function findAnnotationTarget(annotation: AnnotationV2): HTMLElement | null {\n const metadata = annotation.metadata as {\n isMultiSelect?: boolean\n } | undefined\n\n if (metadata?.isMultiSelect) return null\n\n const locator = getElementLocator(annotation)\n if (!locator) return null\n\n if (locator.selector) {\n const exact = querySelectorDeep(locator.selector)\n if (exact) return exact\n }\n\n const tag = locator.tag\n if (!tag) return null\n\n const candidates = querySelectorAllDeep(tag)\n if (candidates.length === 0) return null\n\n const exactTextMatches = locator.text\n ? candidates.filter((candidate) => normalizeText(candidate.textContent) === locator.text)\n : []\n\n if (exactTextMatches.length === 1) {\n return exactTextMatches[0]\n }\n\n const pool = exactTextMatches.length > 0 ? exactTextMatches : candidates\n const ranked = pool\n .map((candidate) => ({\n candidate,\n score: scoreCandidate(candidate, locator),\n }))\n .sort((a, b) => b.score - a.score)\n\n if (ranked.length === 0 || ranked[0].score <= 0) {\n return null\n }\n\n return ranked[0].candidate\n}\n\nfunction getElementLocator(annotation: AnnotationV2): ElementLocator | null {\n const metadata = annotation.metadata as {\n elementLocator?: unknown\n } | undefined\n\n return parseElementLocator(metadata?.elementLocator)\n}\n\nfunction parseElementLocator(value: unknown): ElementLocator | null {\n if (!value || typeof value !== \"object\") return null\n\n const locator = value as Partial<ElementLocator>\n const parsed: ElementLocator = {}\n\n if (typeof locator.selector === \"string\" && locator.selector.trim()) {\n parsed.selector = locator.selector\n }\n if (typeof locator.tag === \"string\" && locator.tag.trim()) {\n parsed.tag = locator.tag.toLowerCase()\n }\n if (typeof locator.text === \"string\" && locator.text.trim()) {\n parsed.text = normalizeText(locator.text).slice(0, 100)\n }\n if (Array.isArray(locator.classes)) {\n const classes = locator.classes.filter((item): item is string => typeof item === \"string\" && item.trim().length > 0)\n if (classes.length > 0) {\n parsed.classes = classes\n }\n }\n if (isBoundingBox(locator.position)) {\n parsed.position = locator.position\n }\n\n return Object.keys(parsed).length > 0 ? parsed : null\n}\n\nfunction generateSelector(element: HTMLElement): string | null {\n if (element.id) {\n return `#${CSS.escape(element.id)}`\n }\n\n for (const attr of [\"data-testid\", \"data-test\", \"aria-label\", \"title\", \"name\", \"role\"]) {\n const value = element.getAttribute(attr)\n if (!value) continue\n const selector = `${element.tagName.toLowerCase()}[${attr}=\"${CSS.escape(value)}\"]`\n if (isUniqueSelector(selector)) return selector\n }\n\n const stableClasses = Array.from(element.classList)\n .filter(isStableClass)\n .slice(0, 4)\n\n if (stableClasses.length > 0) {\n const selector = `${element.tagName.toLowerCase()}.${stableClasses.map((item) => CSS.escape(item)).join(\".\")}`\n if (isUniqueSelector(selector)) return selector\n }\n\n return buildPathSelector(element)\n}\n\nfunction buildPathSelector(element: HTMLElement): string | null {\n const segments: string[] = []\n let current: HTMLElement | null = element\n let depth = 0\n\n while (current && current.tagName.toLowerCase() !== \"body\" && depth < 5) {\n const tag = current.tagName.toLowerCase()\n let segment = tag\n\n if (current.id) {\n segment = `${tag}#${CSS.escape(current.id)}`\n segments.unshift(segment)\n const selector = segments.join(\" > \")\n return isUniqueSelector(selector) ? selector : null\n }\n\n const stableClasses = Array.from(current.classList)\n .filter(isStableClass)\n .slice(0, 2)\n\n if (stableClasses.length > 0) {\n segment = `${tag}.${stableClasses.map((item) => CSS.escape(item)).join(\".\")}`\n } else if (current.parentElement) {\n const siblings = Array.from(current.parentElement.children)\n .filter((child) => child.tagName.toLowerCase() === tag)\n if (siblings.length > 1) {\n segment = `${tag}:nth-of-type(${siblings.indexOf(current) + 1})`\n }\n }\n\n segments.unshift(segment)\n const selector = segments.join(\" > \")\n if (isUniqueSelector(selector)) return selector\n\n current = current.parentElement\n depth++\n }\n\n const fallback = segments.join(\" > \")\n return fallback && isUniqueSelector(fallback) ? fallback : null\n}\n\nfunction isUniqueSelector(selector: string): boolean {\n try {\n return querySelectorAllDeep(selector).length === 1\n } catch {\n return false\n }\n}\n\nfunction querySelectorDeep(selector: string): HTMLElement | null {\n try {\n for (const root of getSearchRoots()) {\n const found = root.querySelector(selector)\n if (found instanceof HTMLElement && !isOwnElement(found)) return found\n }\n } catch {\n return null\n }\n\n return null\n}\n\nfunction querySelectorAllDeep(selector: string): HTMLElement[] {\n const results: HTMLElement[] = []\n\n for (const root of getSearchRoots()) {\n try {\n root.querySelectorAll(selector).forEach((node) => {\n if (node instanceof HTMLElement && !isOwnElement(node)) {\n results.push(node)\n }\n })\n } catch {\n // Ignore invalid selectors.\n }\n }\n\n return results\n}\n\nfunction getSearchRoots(): Array<Document | ShadowRoot> {\n const roots: Array<Document | ShadowRoot> = [document]\n const queue: Element[] = Array.from(document.children)\n\n while (queue.length > 0) {\n const current = queue.shift()\n if (!current) continue\n\n if (current instanceof HTMLElement && current.shadowRoot) {\n roots.push(current.shadowRoot)\n queue.push(...Array.from(current.shadowRoot.children))\n }\n\n queue.push(...Array.from(current.children))\n }\n\n return roots\n}\n\nfunction scoreCandidate(candidate: HTMLElement, locator: ElementLocator): number {\n let score = 0\n\n if (locator.text) {\n const candidateText = normalizeText(candidate.textContent)\n if (candidateText === locator.text) {\n score += 12\n } else if (candidateText.includes(locator.text) || locator.text.includes(candidateText)) {\n score += 4\n }\n }\n\n if (locator.classes?.length) {\n const classList = new Set(Array.from(candidate.classList))\n for (const cls of locator.classes) {\n if (classList.has(cls)) {\n score += 3\n }\n }\n }\n\n if (locator.position) {\n const rect = candidate.getBoundingClientRect()\n const dx = rect.left + window.scrollX - locator.position.x\n const dy = rect.top + window.scrollY - locator.position.y\n const distance = Math.sqrt(dx * dx + dy * dy)\n\n if (distance <= 24) {\n score += 10\n } else if (distance <= 80) {\n score += 6\n } else if (distance <= 160) {\n score += 2\n } else {\n score -= Math.min(distance / 100, 8)\n }\n }\n\n return score\n}\n\nfunction normalizeText(value: string | null | undefined): string {\n return (value ?? \"\").replace(/\\s+/g, \" \").trim()\n}\n\nfunction isOwnElement(element: HTMLElement): boolean {\n return Boolean(element.closest(\"[data-agentation-root], [data-annotation-marker]\"))\n}\n\nfunction isStableClass(value: string): boolean {\n return ![\n /^hover:/,\n /^focus:/,\n /^active:/,\n /^disabled:/,\n /^transition/,\n /^duration/,\n /^ease/,\n /^[a-z0-9]{8,}$/,\n /--/,\n /\\[.*\\]/,\n ].some((pattern) => pattern.test(value))\n}\n\nfunction isBoundingBox(value: unknown): value is BoundingBox {\n if (!value || typeof value !== \"object\") return false\n\n const box = value as Partial<BoundingBox>\n return isFiniteNumber(box.x)\n && isFiniteNumber(box.y)\n && isFiniteNumber(box.width)\n && isFiniteNumber(box.height)\n}\n\nfunction isFiniteNumber(value: unknown): value is number {\n return typeof value === \"number\" && Number.isFinite(value)\n}\n","import {\n formatToJSON,\n formatToMarkdown,\n getAccessibilityInfo,\n getElementClasses,\n getElementPath,\n getForensicComputedStyles,\n getFullElementPath,\n getNearbyElements,\n getNearbyText,\n identifyElement,\n} from \"@liuovo/agentation-vue-core\"\nimport type {\n AnnotationExportDocument,\n AnnotationV2,\n ExportPageContext,\n} from \"@liuovo/agentation-vue-core\"\nimport { reactive } from \"vue\"\nimport { buildElementLocator } from \"../annotation-target.js\"\nimport type { BoundingBox, RuntimeBridge, SelectionSnapshot } from \"../types.js\"\n\n// ---------------------------------------------------------------------------\n// Store interface\n// ---------------------------------------------------------------------------\n\nexport interface AnnotationsStore {\n /** Reactive annotation list — components can read directly. */\n readonly annotations: readonly AnnotationV2[]\n /** Whether annotation mode is enabled. */\n enabled: boolean\n\n /** Load persisted annotations from storage into state. */\n hydrate(): void\n /** Create & persist a new annotation from a comment + selection snapshot. */\n saveAnnotation(comment: string, snapshot: SelectionSnapshot): AnnotationV2\n /** Update the comment of an existing annotation by ID. */\n updateAnnotation(id: string, comment: string): void\n /** Remove an annotation by ID and persist the change. */\n removeAnnotation(id: string): void\n /** Remove all annotations and clear storage. */\n clearAll(): void\n /** Export all annotations as a structured JSON document. */\n exportJSON(): AnnotationExportDocument\n /** Export all annotations as a Markdown string. */\n exportMarkdown(): string\n}\n\n// ---------------------------------------------------------------------------\n// Factory\n// ---------------------------------------------------------------------------\n\n/**\n * Creates the singleton annotations store.\n *\n * Called once during app bootstrap; OverlayRoot provides it\n * to the component tree via `provide()`.\n */\nexport function createAnnotationsStore(bridge: RuntimeBridge): AnnotationsStore {\n const state = reactive({\n annotations: [] as AnnotationV2[],\n enabled: true,\n })\n\n // -- Hydrate ---------------------------------------------------------------\n\n function hydrate(): void {\n try {\n const loaded = bridge.storage.load()\n state.annotations.splice(0, state.annotations.length, ...loaded)\n } catch {\n console.warn(\"[agentation] Failed to hydrate annotations from storage\")\n }\n }\n\n // -- CRUD ------------------------------------------------------------------\n\n function saveAnnotation(comment: string, snapshot: SelectionSnapshot): AnnotationV2 {\n const trimmed = comment.trim()\n if (!trimmed) {\n throw new Error(\"[agentation] Annotation comment must not be empty\")\n }\n\n const annotation = buildAnnotation(trimmed, snapshot)\n state.annotations.push(annotation)\n persist()\n bridge.sync?.enqueueUpsert(annotation)\n return annotation\n }\n\n function removeAnnotation(id: string): void {\n const idx = state.annotations.findIndex((a) => a.id === id)\n if (idx < 0) return\n const removed = state.annotations[idx]\n state.annotations.splice(idx, 1)\n persist()\n bridge.sync?.enqueueDelete(removed)\n }\n\n function updateAnnotation(id: string, comment: string): void {\n const trimmed = comment.trim()\n if (!trimmed) return\n\n const idx = state.annotations.findIndex((a) => a.id === id)\n if (idx < 0) return\n\n const updated = { ...state.annotations[idx], comment: trimmed }\n state.annotations.splice(idx, 1, updated)\n persist()\n bridge.sync?.enqueueUpdate(updated)\n }\n\n function clearAll(): void {\n const toDelete = [...state.annotations]\n state.annotations.splice(0, state.annotations.length)\n bridge.storage.clear()\n for (const annotation of toDelete) {\n bridge.sync?.enqueueDelete(annotation)\n }\n }\n\n // -- Export ----------------------------------------------------------------\n\n function exportJSON(): AnnotationExportDocument {\n return formatToJSON([...state.annotations], {\n detailLevel: bridge.options.outputDetail,\n page: buildPageContext(),\n })\n }\n\n function exportMarkdown(): string {\n return formatToMarkdown([...state.annotations], {\n detailLevel: bridge.options.outputDetail,\n page: buildPageContext(),\n })\n }\n\n // -- Persistence -----------------------------------------------------------\n\n function persist(): void {\n try {\n if (state.annotations.length === 0) {\n bridge.storage.clear()\n } else {\n bridge.storage.save([...state.annotations])\n }\n } catch {\n console.warn(\"[agentation] Failed to persist annotations\")\n }\n }\n\n // -- Public store object ---------------------------------------------------\n\n return {\n get annotations() {\n return state.annotations\n },\n get enabled() {\n return state.enabled\n },\n set enabled(value: boolean) {\n state.enabled = value\n },\n hydrate,\n saveAnnotation,\n updateAnnotation,\n removeAnnotation,\n clearAll,\n exportJSON,\n exportMarkdown,\n }\n}\n\n// ---------------------------------------------------------------------------\n// Annotation builder\n// ---------------------------------------------------------------------------\n\nfunction buildAnnotation(comment: string, snapshot: SelectionSnapshot): AnnotationV2 {\n const { element, source, elementName, selectedText, isMultiSelect } = snapshot\n const identified = identifyElement(element)\n\n return {\n id: generateId(),\n schemaVersion: 1,\n timestamp: new Date().toISOString(),\n url: window.location.href,\n elementSelector: isMultiSelect ? elementName : (identified.name || elementName),\n elementText: selectedText,\n comment,\n source: { ...source },\n metadata: buildMetadata(snapshot),\n }\n}\n\nfunction buildMetadata(snapshot: SelectionSnapshot): Record<string, unknown> {\n const {\n element,\n rect,\n elementPath,\n source,\n selectedText,\n isMultiSelect = false,\n multiSelectElements,\n elementBoundingBoxes,\n } = snapshot\n\n const fixed = !isMultiSelect && isFixedPosition(element)\n\n // For multi-select, try to get live bounding boxes from the DOM elements\n const liveBoxes = multiSelectElements\n ?.filter((el) => document.contains(el))\n .map((el) => {\n const elRect = el.getBoundingClientRect()\n return elRect.width > 0 && elRect.height > 0\n ? toDocumentBox(elRect, isFixedPosition(el))\n : null\n })\n .filter((box): box is BoundingBox => box !== null)\n\n const selectionBoxes = liveBoxes?.length ? liveBoxes : elementBoundingBoxes\n const boundingBox = toDocumentBox(rect, isMultiSelect ? false : fixed)\n\n const raw: Record<string, unknown> = {\n elementPath: elementPath || getElementPath(element) || undefined,\n fullPath: getFullElementPath(element) || undefined,\n cssClasses: getElementClasses(element) || undefined,\n boundingBox,\n elementLocator: isMultiSelect ? undefined : buildElementLocator(element),\n nearbyText: getNearbyText(element) || undefined,\n nearbyElements: getNearbyElements(element) || undefined,\n computedStyles: getForensicComputedStyles(element) || undefined,\n accessibility: getAccessibilityInfo(element) || undefined,\n isMultiSelect: isMultiSelect || undefined,\n elementBoundingBoxes: selectionBoxes?.length ? selectionBoxes : undefined,\n isFixed: isMultiSelect ? undefined : fixed,\n project_area: buildProjectArea(snapshot),\n context_hints: buildContextHints({\n element,\n source,\n selectedText,\n nearbyText: getNearbyText(element) || undefined,\n isMultiSelect,\n }),\n }\n\n // Strip undefined entries for clean JSON\n return Object.fromEntries(\n Object.entries(raw).filter(([, v]) => v !== undefined),\n )\n}\n\nfunction buildProjectArea(snapshot: SelectionSnapshot): string | undefined {\n const route = window.location.pathname || \"/\"\n const hierarchy = snapshot.source.componentHierarchy || snapshot.source.componentName\n const landmark = getLandmarkLabel(snapshot.element)\n\n const parts = [route, hierarchy, landmark].filter(Boolean)\n return parts.length > 0 ? parts.join(\" :: \") : undefined\n}\n\nfunction buildContextHints(input: {\n element: HTMLElement\n source: SelectionSnapshot[\"source\"]\n selectedText?: string\n nearbyText?: string\n isMultiSelect?: boolean\n}): string[] | undefined {\n const hints = new Set<string>()\n const { element, source, selectedText, nearbyText, isMultiSelect } = input\n\n const pushHint = (label: string, value: string | null | undefined) => {\n const trimmed = value?.trim()\n if (!trimmed) return\n hints.add(`${label}: ${trimmed.slice(0, 120)}`)\n }\n\n pushHint(\"route\", window.location.pathname || \"/\")\n pushHint(\"component\", source.componentName)\n pushHint(\"componentHierarchy\", source.componentHierarchy)\n pushHint(\"framework\", source.framework)\n pushHint(\"selectedText\", selectedText)\n pushHint(\"nearbyText\", nearbyText)\n pushHint(\"heading\", findClosestHeadingText(element))\n pushHint(\"landmark\", getLandmarkLabel(element))\n pushHint(\"role\", element.getAttribute(\"role\"))\n pushHint(\"ariaLabel\", element.getAttribute(\"aria-label\"))\n pushHint(\"name\", element.getAttribute(\"name\"))\n pushHint(\"placeholder\", element.getAttribute(\"placeholder\"))\n pushHint(\"title\", element.getAttribute(\"title\"))\n pushHint(\"testId\", element.getAttribute(\"data-testid\") || element.getAttribute(\"data-test\"))\n pushHint(\"id\", element.id || undefined)\n pushHint(\"multiSelect\", isMultiSelect ? \"true\" : undefined)\n\n return hints.size > 0 ? [...hints].slice(0, 8) : undefined\n}\n\nfunction toDocumentBox(rect: DOMRectReadOnly, isFixed: boolean): BoundingBox {\n return {\n x: isFixed ? rect.left : rect.left + window.scrollX,\n y: isFixed ? rect.top : rect.top + window.scrollY,\n width: rect.width,\n height: rect.height,\n }\n}\n\n// ---------------------------------------------------------------------------\n// Helpers\n// ---------------------------------------------------------------------------\n\nfunction buildPageContext(): ExportPageContext {\n return {\n pathname: window.location.pathname,\n viewport: { width: window.innerWidth, height: window.innerHeight },\n url: window.location.href,\n userAgent: navigator.userAgent,\n timestamp: new Date().toISOString(),\n devicePixelRatio: window.devicePixelRatio,\n }\n}\n\nfunction generateId(): string {\n if (typeof crypto !== \"undefined\" && typeof crypto.randomUUID === \"function\") {\n return crypto.randomUUID()\n }\n return `${Date.now()}-${Math.random().toString(36).slice(2, 8)}`\n}\n\nfunction findClosestHeadingText(element: HTMLElement): string | undefined {\n const heading = element.closest(\"section, article, main, aside, form, dialog\")\n ?.querySelector<HTMLElement>(\"h1, h2, h3, h4, h5, h6\")\n ?? element.closest<HTMLElement>(\"label\")\n\n return heading?.innerText.trim() || undefined\n}\n\nfunction getLandmarkLabel(element: HTMLElement): string | undefined {\n const landmark = element.closest<HTMLElement>(\n \"[role], main, header, nav, aside, footer, section, article, form, dialog\",\n )\n if (!landmark) return undefined\n\n const role = landmark.getAttribute(\"role\") || landmark.tagName.toLowerCase()\n const label = landmark.getAttribute(\"aria-label\")\n || landmark.getAttribute(\"data-testid\")\n || landmark.id\n\n return label ? `${role}:${label}` : role\n}\n\nfunction isFixedPosition(element: HTMLElement): boolean {\n let current: HTMLElement | null = element\n while (current && current !== document.body) {\n const position = window.getComputedStyle(current).position\n if (position === \"fixed\" || position === \"sticky\") return true\n current = current.parentElement\n }\n return false\n}\n","import { reactive } from \"vue\"\nimport type { HoverSnapshot, SelectionSnapshot } from \"../types.js\"\n\n// ---------------------------------------------------------------------------\n// Selection state — tracks hover, click-select, and drag-select interactions\n// ---------------------------------------------------------------------------\n\nexport interface SelectionState {\n readonly hovered: HoverSnapshot | null\n readonly selected: SelectionSnapshot | null\n setHovered(snapshot: HoverSnapshot): void\n clearHovered(): void\n select(snapshot: SelectionSnapshot): void\n clearSelection(): void\n}\n\n/**\n * Creates a singleton selection state manager.\n *\n * Called once by OverlayRoot during setup; runtime event listeners\n * drive state via `setHovered()` / `select()`.\n */\nexport function createSelectionState(): SelectionState {\n const state = reactive({\n hovered: null as HoverSnapshot | null,\n selected: null as SelectionSnapshot | null,\n })\n\n return {\n get hovered() {\n return state.hovered\n },\n get selected() {\n return state.selected\n },\n\n setHovered(snapshot: HoverSnapshot) {\n // Suppress hover updates while an element is selected\n if (state.selected) return\n state.hovered = snapshot\n },\n\n clearHovered() {\n state.hovered = null\n },\n\n select(snapshot: SelectionSnapshot) {\n state.selected = snapshot\n state.hovered = null\n },\n\n clearSelection() {\n state.selected = null\n },\n }\n}\n","import { reactive } from \"vue\"\nimport type { AreaSelectionMatch, AreaSelectionRect } from \"../types.js\"\n\n// ---------------------------------------------------------------------------\n// Area selection state — tracks drag-to-select rectangle + matched elements\n// ---------------------------------------------------------------------------\n\nexport interface AreaSelectionState {\n readonly active: boolean\n readonly rect: AreaSelectionRect | null\n readonly matched: readonly AreaSelectionMatch[]\n start(x: number, y: number): void\n update(x: number, y: number): void\n setMatched(matches: AreaSelectionMatch[]): void\n clear(): void\n}\n\n/**\n * Creates a singleton area-selection state manager.\n *\n * Activated when the user drags on the page (pointerdown → pointermove).\n * The rectangle and matched elements are updated in real time by the\n * runtime bootstrap layer; the Vue DragSelectionLayer reads them reactively.\n */\nexport function createAreaSelectionState(): AreaSelectionState {\n const state = reactive({\n active: false,\n origin: null as { x: number; y: number } | null,\n rect: null as AreaSelectionRect | null,\n matched: [] as AreaSelectionMatch[],\n })\n\n return {\n get active() {\n return state.active\n },\n get rect() {\n return state.rect\n },\n get matched() {\n return state.matched\n },\n\n start(x: number, y: number) {\n state.active = true\n state.origin = { x, y }\n state.rect = normalizeRect(x, y, x, y)\n state.matched.splice(0, state.matched.length)\n },\n\n update(x: number, y: number) {\n if (!state.origin) return\n state.rect = normalizeRect(state.origin.x, state.origin.y, x, y)\n },\n\n setMatched(matches: AreaSelectionMatch[]) {\n state.matched.splice(0, state.matched.length, ...matches)\n },\n\n clear() {\n state.active = false\n state.origin = null\n state.rect = null\n state.matched.splice(0, state.matched.length)\n },\n }\n}\n\n// ---------------------------------------------------------------------------\n// Helpers\n// ---------------------------------------------------------------------------\n\nfunction normalizeRect(\n startX: number,\n startY: number,\n endX: number,\n endY: number,\n): AreaSelectionRect {\n const left = Math.min(startX, endX)\n const top = Math.min(startY, endY)\n const right = Math.max(startX, endX)\n const bottom = Math.max(startY, endY)\n\n return { left, top, right, bottom, width: right - left, height: bottom - top }\n}\n","import { computed, reactive } from \"vue\"\nimport type { AnnotationV2 } from \"@liuovo/agentation-vue-core\"\nimport type { SelectionState } from \"./useSelection.js\"\n\n// ---------------------------------------------------------------------------\n// Overlay state — manages popover visibility & position\n// ---------------------------------------------------------------------------\n\nconst POPOVER_OFFSET = 12\nconst POPOVER_MARGIN = 12\nconst POPOVER_WIDTH = 280\nconst POPOVER_HEIGHT = 260\n\nexport interface OverlayPosition {\n top: number\n left: number\n}\n\nexport interface OverlayState {\n readonly popoverVisible: boolean\n readonly popoverPosition: OverlayPosition | null\n /** The annotation currently being edited, or null for create mode. */\n readonly editingAnnotation: AnnotationV2 | null\n /** Incremented when a visible popover should replay its attention animation. */\n readonly shakeTick?: number\n showPopover(): void\n hidePopover(): void\n /** Open the popover in edit mode, anchored to the given rect. */\n showEditPopover(annotation: AnnotationV2, anchorRect: DOMRectReadOnly): void\n}\n\n/**\n * Creates overlay state driven by the selection state.\n *\n * The popover becomes visible when `showPopover()` is called\n * (typically right after `select()`), and auto-positions itself\n * relative to the selected element's bounding rect.\n */\nexport function createOverlayState(selection: SelectionState): OverlayState {\n const state = reactive({\n visible: false,\n editingAnnotation: null as AnnotationV2 | null,\n editAnchorRect: null as DOMRectReadOnly | null,\n shakeTick: 0,\n })\n\n const popoverVisible = computed(\n () => state.visible && (selection.selected !== null || state.editingAnnotation !== null),\n )\n\n const popoverPosition = computed<OverlayPosition | null>(() => {\n if (!popoverVisible.value) return null\n\n // Edit mode: use the anchor rect from the marker\n if (state.editingAnnotation && state.editAnchorRect) {\n return computePopoverPosition(state.editAnchorRect)\n }\n\n // Create mode: use the selected element's rect\n if (selection.selected) {\n return computePopoverPosition(selection.selected.rect)\n }\n\n return null\n })\n\n return {\n get popoverVisible() {\n return popoverVisible.value\n },\n get popoverPosition() {\n return popoverPosition.value\n },\n get editingAnnotation() {\n return state.editingAnnotation\n },\n get shakeTick() {\n return state.shakeTick\n },\n\n showPopover() {\n if (!selection.selected) return\n if (state.visible) {\n state.shakeTick += 1\n }\n state.editingAnnotation = null\n state.editAnchorRect = null\n state.visible = true\n },\n\n hidePopover() {\n state.visible = false\n state.editingAnnotation = null\n state.editAnchorRect = null\n },\n\n showEditPopover(annotation: AnnotationV2, anchorRect: DOMRectReadOnly) {\n if (state.visible) {\n state.shakeTick += 1\n }\n state.editingAnnotation = annotation\n state.editAnchorRect = anchorRect\n state.visible = true\n },\n }\n}\n\n// ---------------------------------------------------------------------------\n// Position computation\n// ---------------------------------------------------------------------------\n\nfunction computePopoverPosition(rect: DOMRectReadOnly): OverlayPosition {\n const vw = typeof window !== \"undefined\" ? window.innerWidth : 1024\n const vh = typeof window !== \"undefined\" ? window.innerHeight : 768\n\n // Prefer below the element\n const preferredTop = rect.bottom + POPOVER_OFFSET\n const fallbackTop = Math.max(POPOVER_MARGIN, rect.top - POPOVER_HEIGHT - POPOVER_OFFSET)\n const top = preferredTop + POPOVER_HEIGHT <= vh - POPOVER_MARGIN\n ? preferredTop\n : fallbackTop\n\n // Center horizontally, clamped to viewport\n const maxLeft = Math.max(POPOVER_MARGIN, vw - POPOVER_WIDTH - POPOVER_MARGIN)\n const centeredLeft = rect.left + rect.width / 2 - POPOVER_WIDTH / 2\n const left = Math.min(Math.max(centeredLeft, POPOVER_MARGIN), maxLeft)\n\n return { top, left }\n}\n","import type { ExportExcludeField } from \"@liuovo/agentation-vue-core\"\n\nexport const COPY_EXCLUDE_FIELDS = [\n \"projectArea\",\n \"contextHints\",\n \"sourceLocation\",\n \"component\",\n \"componentHierarchy\",\n \"framework\",\n \"elementPath\",\n \"fullDomPath\",\n \"cssClasses\",\n \"position\",\n \"selectedText\",\n \"context\",\n \"computedStyles\",\n \"accessibility\",\n \"nearbyElements\",\n \"url\",\n \"timestamp\",\n \"viewport\",\n \"userAgent\",\n \"devicePixelRatio\",\n] as const satisfies readonly ExportExcludeField[]\n","import { reactive, watch } from \"vue\"\nimport type { ExportExcludeField, OutputDetailLevel } from \"@liuovo/agentation-vue-core\"\nimport { DEFAULT_LOCALE, isValidLocale } from \"../i18n/index.js\"\nimport type { ColorKey, Locale } from \"../i18n/types.js\"\nimport { COPY_EXCLUDE_FIELDS } from \"../copy-fields.js\"\n\n// ---------------------------------------------------------------------------\n// Settings state — persistent user preferences\n// ---------------------------------------------------------------------------\n\nconst STORAGE_KEY = \"agentation-vue-settings\"\n\nexport const COLOR_OPTIONS = [\n { key: \"purple\" as const, value: \"#AF52DE\" },\n { key: \"blue\" as const, value: \"#3c82f7\" },\n { key: \"cyan\" as const, value: \"#5AC8FA\" },\n { key: \"green\" as const, value: \"#34C759\" },\n { key: \"yellow\" as const, value: \"#FFD60A\" },\n { key: \"orange\" as const, value: \"#FF9500\" },\n { key: \"red\" as const, value: \"#FF3B30\" },\n] as const satisfies ReadonlyArray<{ key: ColorKey; value: string }>\n\nexport const DEFAULT_ANNOTATION_COLOR = \"#3c82f7\"\n\nexport type CopyFormat = \"json\" | \"markdown\"\n\nexport interface SettingsState {\n /** Level of detail in export output. */\n outputDetail: OutputDetailLevel\n /** Whether dark mode is active. */\n darkMode: boolean\n /** Whether annotation mode is enabled on load. */\n enabled: boolean\n /** Whether component source resolution is shown. */\n componentSourceEnabled: boolean\n /** Accent colour for annotation markers. */\n annotationColor: string\n /** Whether annotation markers are visible. */\n showMarkers: boolean\n /** Preferred export format for copy actions. */\n copyFormat: CopyFormat\n /** Prompt prefix prepended before clipboard output. */\n copyPrefix: string\n /** Export detail fields to remove from clipboard output. */\n copyExcludeFields: ExportExcludeField[]\n /** Whether to clear annotations after a successful copy. */\n autoClearAfterCopy: boolean\n /** Whether page interactions are blocked while annotating. */\n blockInteractions: boolean\n /** Current UI locale. */\n locale: Locale\n /** Webhook endpoint URL. */\n webhookUrl: string\n /** Whether webhooks auto-send is enabled. */\n webhooksEnabled: boolean\n\n /** Toggle between dark and light mode. */\n toggleDarkMode(): void\n}\n\ninterface PersistedSettings {\n outputDetail?: OutputDetailLevel\n darkMode?: boolean\n enabled?: boolean\n componentSourceEnabled?: boolean\n annotationColor?: string\n showMarkers?: boolean\n copyFormat?: CopyFormat\n copyPrefix?: string\n copyExcludeFields?: ExportExcludeField[]\n autoClearAfterCopy?: boolean\n blockInteractions?: boolean\n locale?: Locale\n webhookUrl?: string\n webhooksEnabled?: boolean\n}\n\n/**\n * Creates the settings state with layered priority:\n * plugin config < localStorage < runtime toggle\n */\nexport function createSettingsState(defaults?: Partial<PersistedSettings>): SettingsState {\n const persisted = loadSettings()\n\n const state = reactive({\n outputDetail: persisted.outputDetail ?? defaults?.outputDetail ?? \"standard\",\n darkMode: persisted.darkMode ?? defaults?.darkMode ?? true,\n enabled: persisted.enabled ?? defaults?.enabled ?? true,\n componentSourceEnabled: persisted.componentSourceEnabled ?? defaults?.componentSourceEnabled ?? true,\n annotationColor: persisted.annotationColor ?? defaults?.annotationColor ?? DEFAULT_ANNOTATION_COLOR,\n showMarkers: persisted.showMarkers ?? defaults?.showMarkers ?? true,\n copyFormat: persisted.copyFormat ?? defaults?.copyFormat ?? \"markdown\",\n copyPrefix: persisted.copyPrefix ?? defaults?.copyPrefix ?? \"\",\n copyExcludeFields: normalizeCopyExcludeFields(persisted.copyExcludeFields)\n ?? normalizeCopyExcludeFields(defaults?.copyExcludeFields)\n ?? [],\n autoClearAfterCopy: persisted.autoClearAfterCopy ?? defaults?.autoClearAfterCopy ?? false,\n blockInteractions: persisted.blockInteractions ?? defaults?.blockInteractions ?? true,\n locale: normalizeLocale(persisted.locale) ?? normalizeLocale(defaults?.locale) ?? DEFAULT_LOCALE,\n webhookUrl: persisted.webhookUrl ?? defaults?.webhookUrl ?? \"\",\n webhooksEnabled: persisted.webhooksEnabled ?? defaults?.webhooksEnabled ?? false,\n })\n\n // Persist on every change\n watch(\n () => ({\n outputDetail: state.outputDetail,\n darkMode: state.darkMode,\n enabled: state.enabled,\n componentSourceEnabled: state.componentSourceEnabled,\n annotationColor: state.annotationColor,\n showMarkers: state.showMarkers,\n copyFormat: state.copyFormat,\n copyPrefix: state.copyPrefix,\n copyExcludeFields: state.copyExcludeFields,\n autoClearAfterCopy: state.autoClearAfterCopy,\n blockInteractions: state.blockInteractions,\n locale: state.locale,\n webhookUrl: state.webhookUrl,\n webhooksEnabled: state.webhooksEnabled,\n }),\n (settings) => saveSettings(settings),\n { deep: true },\n )\n\n return {\n get outputDetail() { return state.outputDetail },\n set outputDetail(v: OutputDetailLevel) { state.outputDetail = v },\n get darkMode() { return state.darkMode },\n set darkMode(v: boolean) { state.darkMode = v },\n get enabled() { return state.enabled },\n set enabled(v: boolean) { state.enabled = v },\n get componentSourceEnabled() { return state.componentSourceEnabled },\n set componentSourceEnabled(v: boolean) { state.componentSourceEnabled = v },\n get annotationColor() { return state.annotationColor },\n set annotationColor(v: string) { state.annotationColor = v },\n get showMarkers() { return state.showMarkers },\n set showMarkers(v: boolean) { state.showMarkers = v },\n get copyFormat() { return state.copyFormat },\n set copyFormat(v: CopyFormat) { state.copyFormat = v },\n get copyPrefix() { return state.copyPrefix },\n set copyPrefix(v: string) { state.copyPrefix = v },\n get copyExcludeFields() { return state.copyExcludeFields },\n set copyExcludeFields(v: ExportExcludeField[]) { state.copyExcludeFields = normalizeCopyExcludeFields(v) ?? [] },\n get autoClearAfterCopy() { return state.autoClearAfterCopy },\n set autoClearAfterCopy(v: boolean) { state.autoClearAfterCopy = v },\n get blockInteractions() { return state.blockInteractions },\n set blockInteractions(v: boolean) { state.blockInteractions = v },\n get locale() { return state.locale },\n set locale(v: Locale) { state.locale = normalizeLocale(v) ?? DEFAULT_LOCALE },\n get webhookUrl() { return state.webhookUrl },\n set webhookUrl(v: string) { state.webhookUrl = v },\n get webhooksEnabled() { return state.webhooksEnabled },\n set webhooksEnabled(v: boolean) { state.webhooksEnabled = v },\n\n toggleDarkMode() {\n state.darkMode = !state.darkMode\n },\n }\n}\n\n// ---------------------------------------------------------------------------\n// localStorage helpers\n// ---------------------------------------------------------------------------\n\nfunction normalizeLocale(value: unknown): Locale | undefined {\n return isValidLocale(value) ? value : undefined\n}\n\nfunction normalizeCopyExcludeFields(value: unknown): ExportExcludeField[] | undefined {\n if (!Array.isArray(value)) return undefined\n\n const allowed = new Set<ExportExcludeField>(COPY_EXCLUDE_FIELDS)\n return [...new Set(\n value.filter((field): field is ExportExcludeField => allowed.has(field as ExportExcludeField)),\n )]\n}\n\nfunction loadSettings(): PersistedSettings {\n if (typeof window === \"undefined\") return {}\n try {\n const raw = window.localStorage.getItem(STORAGE_KEY)\n if (!raw) return {}\n const parsed = JSON.parse(raw) as PersistedSettings & { locale?: unknown }\n return {\n ...parsed,\n locale: normalizeLocale(parsed.locale),\n copyExcludeFields: normalizeCopyExcludeFields(parsed.copyExcludeFields) ?? [],\n }\n } catch {\n return {}\n }\n}\n\nfunction saveSettings(settings: PersistedSettings): void {\n if (typeof window === \"undefined\") return\n try {\n window.localStorage.setItem(STORAGE_KEY, JSON.stringify(settings))\n } catch {\n // silent — localStorage may be full or disabled\n }\n}\n","// =============================================================================\n// Freeze Animations\n// =============================================================================\n//\n// Pauses CSS animations/transitions, WAAPI animations, and videos.\n//\n// We intentionally do NOT monkey-patch timer APIs or requestAnimationFrame.\n// Global timer/rAF patching also freezes framework scheduling and overlay\n// interactions, which breaks marker rendering and panel updates.\n//\n// Import it explicitly only when animation freezing is needed —\n// do NOT re-export from the package barrel (index.ts).\n// =============================================================================\n\n// Exclude selectors — agentation UI elements should never be frozen.\n// Include the runtime containers directly so teleported overlay content is\n// always whitelisted even if a child node misses a marker attribute.\nconst EXCLUDE_SELECTORS = [\n \"#agentation-app\",\n \"#agentation-overlay\",\n \"[data-agentation-root]\",\n \"[data-feedback-toolbar]\",\n \"[data-annotation-popup]\",\n \"[data-annotation-marker]\",\n]\nconst NOT_SELECTORS = EXCLUDE_SELECTORS\n .flatMap((selector) => [`:not(${selector})`, `:not(${selector} *)`])\n .join(\"\")\n\nconst STYLE_ID = \"feedback-freeze-styles\"\nconst STATE_KEY = \"__agentation_freeze\"\n\n// ---------------------------------------------------------------------------\n// Shared mutable state on window (survives HMR module re-execution)\n// ---------------------------------------------------------------------------\ninterface FreezeState {\n frozen: boolean\n origSetTimeout: typeof setTimeout\n origSetInterval: typeof setInterval\n pausedAnimations: Animation[]\n}\n\nfunction getState(): FreezeState {\n if (typeof window === \"undefined\") {\n return {\n frozen: false,\n origSetTimeout: setTimeout,\n origSetInterval: setInterval,\n pausedAnimations: [],\n }\n }\n\n const w = window as Window & { [STATE_KEY]?: FreezeState }\n if (!w[STATE_KEY]) {\n w[STATE_KEY] = {\n frozen: false,\n origSetTimeout: window.setTimeout.bind(window),\n origSetInterval: window.setInterval.bind(window),\n pausedAnimations: [],\n }\n }\n return w[STATE_KEY]\n}\n\nconst _s = getState()\n\n// ---------------------------------------------------------------------------\n// Exports — timing functions kept stable for overlay UI helpers\n// ---------------------------------------------------------------------------\nexport const originalSetTimeout = _s.origSetTimeout\nexport const originalSetInterval = _s.origSetInterval\n\n// ---------------------------------------------------------------------------\n// Freeze / Unfreeze\n// ---------------------------------------------------------------------------\n\nfunction isAgentationElement(el: Element | null): boolean {\n let current: Element | null = el\n\n while (current) {\n if (EXCLUDE_SELECTORS.some((selector) => current?.matches?.(selector) || current?.closest?.(selector))) {\n return true\n }\n\n const root = current.getRootNode()\n current = root instanceof ShadowRoot\n ? root.host\n : current.parentElement\n }\n\n return false\n}\n\nexport function freeze(): void {\n if (typeof document === \"undefined\") return\n if (_s.frozen) return\n _s.frozen = true\n\n // CSS injection — pause CSS animations and kill transitions\n let style = document.getElementById(STYLE_ID)\n if (!style) {\n style = document.createElement(\"style\")\n style.id = STYLE_ID\n }\n style.textContent = `\n *${NOT_SELECTORS},\n *${NOT_SELECTORS}::before,\n *${NOT_SELECTORS}::after {\n animation-play-state: paused !important;\n transition: none !important;\n }\n `\n document.head.appendChild(style)\n\n // WAAPI — pause only RUNNING non-agentation animations and store references\n _s.pausedAnimations = []\n try {\n document.getAnimations().forEach((anim) => {\n if (anim.playState !== \"running\") return\n const target = (anim.effect as KeyframeEffect)?.target as Element | null\n if (!isAgentationElement(target)) {\n anim.pause()\n _s.pausedAnimations.push(anim)\n }\n })\n } catch {\n // getAnimations may not be available in all environments\n }\n\n // Pause videos\n document.querySelectorAll(\"video\").forEach((video) => {\n if (!video.paused) {\n video.dataset.wasPaused = \"false\"\n video.pause()\n }\n })\n}\n\nexport function unfreeze(): void {\n if (typeof document === \"undefined\") return\n if (!_s.frozen) return\n _s.frozen = false\n\n // WAAPI — resume the exact animations we paused BEFORE removing CSS\n for (const anim of _s.pausedAnimations) {\n try {\n anim.play()\n } catch (e) {\n console.warn(\"[agentation] Error resuming animation:\", e)\n }\n }\n _s.pausedAnimations = []\n\n // Now remove CSS injection\n document.getElementById(STYLE_ID)?.remove()\n\n // Resume videos\n document.querySelectorAll(\"video\").forEach((video) => {\n if (video.dataset.wasPaused === \"false\") {\n video.play().catch(() => {})\n delete video.dataset.wasPaused\n }\n })\n}\n","import { readonly, ref } from \"vue\"\nimport {\n freeze,\n unfreeze,\n originalSetTimeout,\n} from \"@liuovo/agentation-vue-core/dom/freeze-animations\"\n\n// ---------------------------------------------------------------------------\n// Freeze state composable — controls page animation freezing\n// ---------------------------------------------------------------------------\n\n/**\n * Reactive wrapper around the core freeze-animations module.\n *\n * Exposes a `isFrozen` ref, a `toggleFreeze()` action, and a `cleanup()`\n * function that should be called on unmount to ensure animations are restored.\n *\n * The `originalSetTimeout` re-export lets components schedule work that\n * must fire even while the page is frozen (toolbar entrance, toast timers, etc.).\n */\nexport interface FreezeState {\n /** Whether page animations are currently frozen. */\n readonly isFrozen: Readonly<ReturnType<typeof ref<boolean>>>\n /** Toggle between frozen and unfrozen. */\n toggleFreeze(): void\n /** Force unfreeze — call on unmount to prevent leaked frozen state. */\n cleanup(): void\n}\n\nexport { originalSetTimeout }\n\nexport function createFreezeState(): FreezeState {\n const isFrozen = ref(false)\n\n function toggleFreeze(): void {\n if (isFrozen.value) {\n unfreeze()\n isFrozen.value = false\n } else {\n freeze()\n isFrozen.value = true\n }\n }\n\n function cleanup(): void {\n if (isFrozen.value) {\n unfreeze()\n isFrozen.value = false\n }\n }\n\n return {\n isFrozen: readonly(isFrozen),\n toggleFreeze,\n cleanup,\n }\n}\n","import { ref } from \"vue\"\nimport { formatToJSON, formatToMarkdown, type ExportPageContext } from \"@liuovo/agentation-vue-core\"\nimport { originalSetTimeout } from \"./useFreezeState.js\"\nimport type { AnnotationsStore } from \"./useAnnotationsStore.js\"\nimport type { SettingsState } from \"./useSettings.js\"\n\n// ---------------------------------------------------------------------------\n// Export composable — clipboard write + download fallback\n// ---------------------------------------------------------------------------\n\nexport type ExportFormat = \"json\" | \"markdown\"\n\nexport interface ExportActions {\n /** Currently active copy feedback, or null. */\n readonly copyFeedback: ExportFormat | null\n /** Export annotations as JSON to clipboard. */\n exportJSON(): Promise<void>\n /** Export annotations as Markdown to clipboard. */\n exportMarkdown(): Promise<void>\n}\n\n/**\n * Creates export actions bound to a store and settings state.\n * Handles clipboard write with \"Copied!\" feedback and download fallback.\n */\nexport function createExportActions(\n store: AnnotationsStore,\n settings: SettingsState,\n): ExportActions {\n const copyFeedback = ref<ExportFormat | null>(null)\n\n async function writeClipboard(text: string): Promise<boolean> {\n try {\n await navigator.clipboard.writeText(text)\n return true\n } catch {\n downloadFallback(text, \"agentation-export.txt\")\n return false\n }\n }\n\n function flash(kind: ExportFormat): void {\n copyFeedback.value = kind\n originalSetTimeout(() => {\n if (copyFeedback.value === kind) copyFeedback.value = null\n }, 1400)\n }\n\n function downloadFallback(content: string, filename: string): void {\n const blob = new Blob([content], { type: \"text/plain\" })\n const url = URL.createObjectURL(blob)\n const a = document.createElement(\"a\")\n a.href = url\n a.download = filename\n a.click()\n URL.revokeObjectURL(url)\n }\n\n async function exportJSON(): Promise<void> {\n const payload = buildClipboardPayload(\"json\")\n if (await writeClipboard(payload)) flash(\"json\")\n }\n\n async function exportMarkdown(): Promise<void> {\n const payload = buildClipboardPayload(\"markdown\")\n if (await writeClipboard(payload)) flash(\"markdown\")\n }\n\n function buildClipboardPayload(format: ExportFormat): string {\n const page = getPageContext()\n\n const payload = format === \"json\"\n ? JSON.stringify(formatToJSON([...store.annotations], {\n detailLevel: settings.outputDetail,\n page,\n excludeFields: settings.copyExcludeFields,\n }), null, 2)\n : formatToMarkdown([...store.annotations], {\n detailLevel: settings.outputDetail,\n page,\n excludeFields: settings.copyExcludeFields,\n })\n\n return prependCopyPrefix(payload)\n }\n\n function getPageContext(): ExportPageContext {\n return store.exportJSON().page\n }\n\n function prependCopyPrefix(payload: string): string {\n const prefix = settings.copyPrefix.replace(/\\r\\n/g, \"\\n\").trim()\n return prefix ? `${prefix}\\n${payload}` : payload\n }\n\n return {\n get copyFeedback() { return copyFeedback.value },\n exportJSON,\n exportMarkdown,\n }\n}\n","import { onMounted, onUnmounted } from \"vue\"\nimport type { AnnotationsStore } from \"./useAnnotationsStore.js\"\nimport type { ExportActions } from \"./useExport.js\"\nimport type { FreezeState } from \"./useFreezeState.js\"\nimport type { OverlayState } from \"./useOverlay.js\"\nimport type { SelectionState } from \"./useSelection.js\"\nimport type { SettingsState } from \"./useSettings.js\"\n\n// ---------------------------------------------------------------------------\n// Keyboard shortcuts composable\n// ---------------------------------------------------------------------------\n\n/**\n * Registers global keyboard shortcuts scoped to the agentation overlay.\n *\n * Global shortcuts (work with modifiers):\n * - `Cmd/Ctrl+Shift+F`: Toggle annotation mode\n *\n * Single-key shortcuts (ignored while typing):\n * - `P`: Toggle animation freeze\n * - `H`: Toggle marker visibility\n * - `C`: Copy the currently selected export format\n * - `X`: Clear all annotations\n * - `Escape`: Dismiss popover → deselect → disable annotation mode\n *\n * Must be called inside a Vue component `setup()`.\n */\nexport function useKeyboardShortcuts(deps: {\n store: AnnotationsStore\n selection: SelectionState\n overlay: OverlayState\n settings: SettingsState\n exportActions?: ExportActions\n freezeState?: FreezeState\n}): void {\n const { store, selection, overlay, settings, exportActions, freezeState } = deps\n\n function isOwnElement(el: Element): boolean {\n return !!el.closest(\"[data-agentation-root]\")\n }\n\n function onKeydown(e: KeyboardEvent): void {\n if (e.isComposing) return\n\n const active = document.activeElement\n\n // Cmd/Ctrl+Shift+F → toggle annotation mode\n if ((e.metaKey || e.ctrlKey) && e.shiftKey && e.code === \"KeyF\") {\n e.preventDefault()\n store.enabled = !store.enabled\n if (!store.enabled) {\n selection.clearHovered()\n selection.clearSelection()\n overlay.hidePopover()\n }\n return\n }\n\n // Escape — priority chain\n if (e.key === \"Escape\") {\n if (isEditableField(active) && !isOwnElement(active)) return\n\n // 1. Dismiss popover if visible\n if (overlay.popoverVisible) {\n e.preventDefault()\n selection.clearSelection()\n overlay.hidePopover()\n return\n }\n\n // 2. Deselect if selected\n if (selection.selected) {\n e.preventDefault()\n selection.clearSelection()\n return\n }\n\n // 3. Disable annotation mode\n if (store.enabled) {\n e.preventDefault()\n store.enabled = false\n selection.clearHovered()\n return\n }\n }\n\n // --- Single-key shortcuts (skip while typing or with modifiers) ------\n if (isEditableField(active) || isEditableField(e.target)) return\n if (e.metaKey || e.ctrlKey || e.altKey) return\n\n const key = e.key.toLowerCase()\n\n // P → toggle animation freeze (works even with 0 annotations)\n if (key === \"p\") {\n e.preventDefault()\n freezeState?.toggleFreeze()\n return\n }\n\n if (store.annotations.length === 0) return\n\n // H → toggle marker visibility\n if (key === \"h\") {\n e.preventDefault()\n settings.showMarkers = !settings.showMarkers\n return\n }\n\n // C → copy current export format\n if (key === \"c\") {\n e.preventDefault()\n if (settings.copyFormat === \"json\") {\n void exportActions?.exportJSON()\n } else {\n void exportActions?.exportMarkdown()\n }\n return\n }\n\n // X → clear all annotations\n if (key === \"x\") {\n e.preventDefault()\n store.clearAll()\n selection.clearHovered()\n selection.clearSelection()\n overlay.hidePopover()\n }\n }\n\n onMounted(() => {\n document.addEventListener(\"keydown\", onKeydown, true)\n })\n\n onUnmounted(() => {\n document.removeEventListener(\"keydown\", onKeydown, true)\n })\n}\n\n// ---------------------------------------------------------------------------\n// Helpers\n// ---------------------------------------------------------------------------\n\nfunction isEditableField(target: EventTarget | null): target is HTMLElement {\n return target instanceof HTMLElement\n && (\n target.tagName === \"INPUT\"\n || target.tagName === \"TEXTAREA\"\n || target.tagName === \"SELECT\"\n || target.isContentEditable\n )\n}\n","import { inject, type InjectionKey } from \"vue\"\n\n/**\n * Type-safe inject that throws if the value is missing.\n * Use in components that require a provided dependency.\n */\nexport function injectStrict<T>(key: InjectionKey<T>, name: string): T {\n const value = inject(key)\n if (value === undefined) {\n throw new Error(`[agentation] Missing required injection: ${name}`)\n }\n return value\n}\n","import { h, type CSSProperties, type FunctionalComponent, type VNodeChild } from \"vue\"\n\n// ---------------------------------------------------------------------------\n// Icon props\n// ---------------------------------------------------------------------------\n\ninterface IconProps {\n size?: number\n style?: CSSProperties\n}\n\ninterface CopyAnimatedProps extends IconProps {\n copied?: boolean\n}\n\ninterface JsonAnimatedProps extends IconProps {\n copied?: boolean\n}\n\n// ---------------------------------------------------------------------------\n// Helpers\n// ---------------------------------------------------------------------------\n\nfunction svg(\n size: number,\n viewBox: string,\n children: VNodeChild[],\n style?: CSSProperties,\n) {\n return h(\n \"svg\",\n {\n width: size,\n height: size,\n viewBox,\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n \"aria-hidden\": \"true\",\n focusable: \"false\",\n style,\n },\n children,\n )\n}\n\n// ---------------------------------------------------------------------------\n// Icons\n// ---------------------------------------------------------------------------\n\n/** List with sparkle — collapsed toolbar icon. */\nexport const IconListSparkle: FunctionalComponent<IconProps> = (props) => {\n const s = props.size ?? 24\n return svg(s, \"0 0 24 24\", [\n h(\"path\", { d: \"M11.5 12L5.5 12\", stroke: \"currentColor\", \"stroke-width\": 1.5, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n h(\"path\", { d: \"M18.5 6.75L5.5 6.75\", stroke: \"currentColor\", \"stroke-width\": 1.5, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n h(\"path\", { d: \"M9.25 17.25L5.5 17.25\", stroke: \"currentColor\", \"stroke-width\": 1.5, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n h(\"path\", {\n d: \"M16 12.75L16.5179 13.9677C16.8078 14.6494 17.3506 15.1922 18.0323 15.4821L19.25 16L18.0323 16.5179C17.3506 16.8078 16.8078 17.3506 16.5179 18.0323L16 19.25L15.4821 18.0323C15.1922 17.3506 14.6494 16.8078 13.9677 16.5179L12.75 16L13.9677 15.4821C14.6494 15.1922 15.1922 14.6494 15.4821 13.9677L16 12.75Z\",\n stroke: \"currentColor\", \"stroke-width\": 1.5, \"stroke-linejoin\": \"round\",\n }),\n ], props.style)\n}\n\n/** Animated copy icon — cross-fades between copy and green checkmark circle. */\nexport const IconCopyAnimated: FunctionalComponent<CopyAnimatedProps> = (props) => {\n const s = props.size ?? 24\n const copied = props.copied ?? false\n const transition = \"opacity 0.2s ease, transform 0.2s ease\"\n\n return svg(s, \"0 0 24 24\", [\n // Copy state\n h(\"g\", { style: { opacity: copied ? 0 : 1, transform: copied ? \"scale(0.8)\" : \"scale(1)\", transformOrigin: \"center\", transition } }, [\n h(\"path\", { d: \"M4.75 11.25C4.75 10.4216 5.42157 9.75 6.25 9.75H12.75C13.5784 9.75 14.25 10.4216 14.25 11.25V17.75C14.25 18.5784 13.5784 19.25 12.75 19.25H6.25C5.42157 19.25 4.75 18.5784 4.75 17.75V11.25Z\", stroke: \"currentColor\", \"stroke-width\": 1.5 }),\n h(\"path\", { d: \"M17.25 14.25H17.75C18.5784 14.25 19.25 13.5784 19.25 12.75V6.25C19.25 5.42157 18.5784 4.75 17.75 4.75H11.25C10.4216 4.75 9.75 5.42157 9.75 6.25V6.75\", stroke: \"currentColor\", \"stroke-width\": 1.5, \"stroke-linecap\": \"round\" }),\n ]),\n // Checkmark state\n h(\"g\", { style: { opacity: copied ? 1 : 0, transform: copied ? \"scale(1)\" : \"scale(0.8)\", transformOrigin: \"center\", transition } }, [\n h(\"path\", { d: \"M12 20C7.58172 20 4 16.4182 4 12C4 7.58172 7.58172 4 12 4C16.4182 4 20 7.58172 20 12C20 16.4182 16.4182 20 12 20Z\", stroke: \"#22c55e\", \"stroke-width\": 1.5, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n h(\"path\", { d: \"M15 10L11 14.25L9.25 12.25\", stroke: \"#22c55e\", \"stroke-width\": 1.5, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n ]),\n ], props.style)\n}\n\n/** Markdown/file-text icon — Lucide-style document outline. */\nexport const IconMarkdown: FunctionalComponent<IconProps> = (props) => {\n const s = props.size ?? 18\n return svg(s, \"0 0 20 20\", [\n h(\"path\", {\n d: \"M7 2.75H10.9393C11.3369 2.75 11.7182 2.90804 12 3.18934L14.8107 6C15.092 6.28181 15.25 6.66304 15.25 7.06066V16.25C15.25 17.0784 14.5784 17.75 13.75 17.75H7C6.17157 17.75 5.5 17.0784 5.5 16.25V4.25C5.5 3.42157 6.17157 2.75 7 2.75Z\",\n stroke: \"currentColor\",\n \"stroke-width\": 1.5,\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n }),\n h(\"path\", {\n d: \"M11 2.75V5.75C11 6.30228 11.4477 6.75 12 6.75H15\",\n stroke: \"currentColor\",\n \"stroke-width\": 1.5,\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n }),\n h(\"path\", {\n d: \"M7.75 10.25H13\",\n stroke: \"currentColor\",\n \"stroke-width\": 1.5,\n \"stroke-linecap\": \"round\",\n }),\n h(\"path\", {\n d: \"M7.75 13H13\",\n stroke: \"currentColor\",\n \"stroke-width\": 1.5,\n \"stroke-linecap\": \"round\",\n }),\n h(\"path\", {\n d: \"M7.75 15.75H11.25\",\n stroke: \"currentColor\",\n \"stroke-width\": 1.5,\n \"stroke-linecap\": \"round\",\n }),\n ], props.style)\n}\n\n/** Animated markdown icon — cross-fades between file-text and green checkmark. */\nexport const IconMarkdownAnimated: FunctionalComponent<CopyAnimatedProps> = (props) => {\n const s = props.size ?? 20\n const copied = props.copied ?? false\n const transition = \"opacity 0.2s ease, transform 0.2s ease\"\n\n return svg(s, \"0 0 20 20\", [\n h(\"g\", { style: { opacity: copied ? 0 : 1, transform: copied ? \"scale(0.82)\" : \"scale(1)\", transformOrigin: \"center\", transition } }, [\n h(\"path\", {\n d: \"M7 2.75H10.9393C11.3369 2.75 11.7182 2.90804 12 3.18934L14.8107 6C15.092 6.28181 15.25 6.66304 15.25 7.06066V16.25C15.25 17.0784 14.5784 17.75 13.75 17.75H7C6.17157 17.75 5.5 17.0784 5.5 16.25V4.25C5.5 3.42157 6.17157 2.75 7 2.75Z\",\n stroke: \"currentColor\",\n \"stroke-width\": 1.5,\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n }),\n h(\"path\", {\n d: \"M11 2.75V5.75C11 6.30228 11.4477 6.75 12 6.75H15\",\n stroke: \"currentColor\",\n \"stroke-width\": 1.5,\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n }),\n h(\"path\", {\n d: \"M7.75 10.25H13\",\n stroke: \"currentColor\",\n \"stroke-width\": 1.5,\n \"stroke-linecap\": \"round\",\n }),\n h(\"path\", {\n d: \"M7.75 13H13\",\n stroke: \"currentColor\",\n \"stroke-width\": 1.5,\n \"stroke-linecap\": \"round\",\n }),\n h(\"path\", {\n d: \"M7.75 15.75H11.25\",\n stroke: \"currentColor\",\n \"stroke-width\": 1.5,\n \"stroke-linecap\": \"round\",\n }),\n ]),\n h(\"g\", { style: { opacity: copied ? 1 : 0, transform: copied ? \"scale(1)\" : \"scale(0.82)\", transformOrigin: \"center\", transition } }, [\n h(\"path\", {\n d: \"M10 17A7 7 0 1 0 10 3a7 7 0 0 0 0 14Z\",\n stroke: \"#22c55e\",\n \"stroke-width\": 1.5,\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n }),\n h(\"path\", {\n d: \"M13 8.5L9.5 12L7.75 10.25\",\n stroke: \"#22c55e\",\n \"stroke-width\": 1.5,\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n }),\n ]),\n ], props.style)\n}\n\n/** Trash icon — filled style. */\nexport const IconTrashAlt: FunctionalComponent<IconProps> = (props) => {\n const s = props.size ?? 16\n return svg(s, \"0 0 24 24\", [\n h(\"path\", {\n d: \"M13.5 4C14.7426 4 15.75 5.00736 15.75 6.25V7H18.5C18.9142 7 19.25 7.33579 19.25 7.75C19.25 8.16421 18.9142 8.5 18.5 8.5H17.9678L17.6328 16.2217C17.61 16.7475 17.5912 17.1861 17.5469 17.543C17.5015 17.9087 17.4225 18.2506 17.2461 18.5723C16.9747 19.0671 16.5579 19.4671 16.0518 19.7168C15.7227 19.8791 15.3772 19.9422 15.0098 19.9717C14.6514 20.0004 14.2126 20 13.6865 20H10.3135C9.78735 20 9.34856 20.0004 8.99023 19.9717C8.62278 19.9422 8.27729 19.8791 7.94824 19.7168C7.44205 19.4671 7.02532 19.0671 6.75391 18.5723C6.57751 18.2506 6.49853 17.9087 6.45312 17.543C6.40883 17.1861 6.39005 16.7475 6.36719 16.2217L6.03223 8.5H5.5C5.08579 8.5 4.75 8.16421 4.75 7.75C4.75 7.33579 5.08579 7 5.5 7H8.25V6.25C8.25 5.00736 9.25736 4 10.5 4H13.5ZM7.86621 16.1562C7.89013 16.7063 7.90624 17.0751 7.94141 17.3584C7.97545 17.6326 8.02151 17.7644 8.06934 17.8516C8.19271 18.0763 8.38239 18.2577 8.6123 18.3711C8.70153 18.4151 8.83504 18.4545 9.11035 18.4766C9.39482 18.4994 9.76335 18.5 10.3135 18.5H13.6865C14.2367 18.5 14.6052 18.4994 14.8896 18.4766C15.165 18.4545 15.2985 18.4151 15.3877 18.3711C15.6176 18.2577 15.8073 18.0763 15.9307 17.8516C15.9785 17.7644 16.0245 17.6326 16.0586 17.3584C16.0938 17.0751 16.1099 16.7063 16.1338 16.1562L16.4668 8.5H7.5332L7.86621 16.1562ZM9.97656 10.75C10.3906 10.7371 10.7371 11.0626 10.75 11.4766L10.875 15.4766C10.8879 15.8906 10.5624 16.2371 10.1484 16.25C9.73443 16.2629 9.38794 15.9374 9.375 15.5234L9.25 11.5234C9.23706 11.1094 9.56255 10.7629 9.97656 10.75ZM14.0244 10.75C14.4384 10.7635 14.7635 11.1105 14.75 11.5244L14.6201 15.5244C14.6066 15.9384 14.2596 16.2634 13.8457 16.25C13.4317 16.2365 13.1067 15.8896 13.1201 15.4756L13.251 11.4756C13.2645 11.0617 13.6105 10.7366 14.0244 10.75ZM10.5 5.5C10.0858 5.5 9.75 5.83579 9.75 6.25V7H14.25V6.25C14.25 5.83579 13.9142 5.5 13.5 5.5H10.5Z\",\n fill: \"currentColor\",\n }),\n ], props.style)\n}\n\n/** Eye icon — Lucide-style visible state. */\nexport const IconEye: FunctionalComponent<IconProps> = (props) => {\n const s = props.size ?? 24\n return svg(s, \"0 0 24 24\", [\n h(\"path\", {\n d: \"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0\",\n stroke: \"currentColor\",\n \"stroke-width\": 2,\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n }),\n h(\"circle\", {\n cx: 12,\n cy: 12,\n r: 3,\n stroke: \"currentColor\",\n \"stroke-width\": 2,\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n }),\n ], props.style)\n}\n\n/** Eye-off icon — Lucide-style hidden state. */\nexport const IconEyeOff: FunctionalComponent<IconProps> = (props) => {\n const s = props.size ?? 24\n return svg(s, \"0 0 24 24\", [\n h(\"path\", {\n d: \"M10.733 5.076A10.744 10.744 0 0 1 21.938 12 10.75 10.75 0 0 1 18.084 16.268\",\n stroke: \"currentColor\",\n \"stroke-width\": 2,\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n }),\n h(\"path\", {\n d: \"M14.084 14.158a3 3 0 0 1-4.242-4.242\",\n stroke: \"currentColor\",\n \"stroke-width\": 2,\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n }),\n h(\"path\", {\n d: \"M17.479 17.499A10.75 10.75 0 0 1 2.062 12 10.75 10.75 0 0 1 6.17 7.412\",\n stroke: \"currentColor\",\n \"stroke-width\": 2,\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n }),\n h(\"path\", {\n d: \"m2 2 20 20\",\n stroke: \"currentColor\",\n \"stroke-width\": 2,\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n }),\n ], props.style)\n}\n\n/** Animated eye icon — cross-fades between open and closed (with slash). */\nexport const IconEyeAnimated: FunctionalComponent<{ isOpen?: boolean } & IconProps> = (props) => {\n const s = props.size ?? 24\n const isOpen = props.isOpen ?? true\n\n return svg(s, \"0 0 24 24\", [\n // Open state\n h(\"g\", { style: { opacity: isOpen ? 1 : 0, transition: \"opacity 0.2s ease\" } }, [\n h(\"path\", { d: \"M3.91752 12.7539C3.65127 12.2996 3.65037 11.7515 3.9149 11.2962C4.9042 9.59346 7.72688 5.49994 12 5.49994C16.2731 5.49994 19.0958 9.59346 20.0851 11.2962C20.3496 11.7515 20.3487 12.2996 20.0825 12.7539C19.0908 14.4459 16.2694 18.4999 12 18.4999C7.73064 18.4999 4.90918 14.4459 3.91752 12.7539Z\", stroke: \"currentColor\", \"stroke-width\": 1.5, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n h(\"path\", { d: \"M12 14.8261C13.5608 14.8261 14.8261 13.5608 14.8261 12C14.8261 10.4392 13.5608 9.17392 12 9.17392C10.4392 9.17392 9.17391 10.4392 9.17391 12C9.17391 13.5608 10.4392 14.8261 12 14.8261Z\", stroke: \"currentColor\", \"stroke-width\": 1.5, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n ]),\n // Closed state (with slash)\n h(\"g\", { style: { opacity: isOpen ? 0 : 1, transition: \"opacity 0.2s ease\" } }, [\n h(\"path\", { d: \"M18.6025 9.28503C18.9174 8.9701 19.4364 8.99481 19.7015 9.35271C20.1484 9.95606 20.4943 10.507 20.7342 10.9199C21.134 11.6086 21.1329 12.4454 20.7303 13.1328C20.2144 14.013 19.2151 15.5225 17.7723 16.8193C16.3293 18.1162 14.3852 19.2497 12.0008 19.25C11.4192 19.25 10.8638 19.1823 10.3355 19.0613C9.77966 18.934 9.63498 18.2525 10.0382 17.8493C10.2412 17.6463 10.5374 17.573 10.8188 17.6302C11.1993 17.7076 11.5935 17.75 12.0008 17.75C13.8848 17.7497 15.4867 16.8568 16.7693 15.7041C18.0522 14.5511 18.9606 13.1867 19.4363 12.375C19.5656 12.1543 19.5659 11.8943 19.4373 11.6729C19.2235 11.3049 18.921 10.8242 18.5364 10.3003C18.3085 9.98991 18.3302 9.5573 18.6025 9.28503ZM12.0008 4.75C12.5814 4.75006 13.1358 4.81803 13.6632 4.93953C14.2182 5.06741 14.362 5.74812 13.9593 6.15091C13.7558 6.35435 13.4589 6.42748 13.1771 6.36984C12.7983 6.29239 12.4061 6.25006 12.0008 6.25C10.1167 6.25 8.51415 7.15145 7.23028 8.31543C5.94678 9.47919 5.03918 10.8555 4.56426 11.6729C4.43551 11.8945 4.43582 12.1542 4.56524 12.375C4.77587 12.7343 5.07189 13.2012 5.44718 13.7105C5.67623 14.0213 5.65493 14.4552 5.38193 14.7282C5.0671 15.0431 4.54833 15.0189 4.28292 14.6614C3.84652 14.0736 3.50813 13.5369 3.27129 13.1328C2.86831 12.4451 2.86717 11.6088 3.26739 10.9199C3.78185 10.0345 4.77959 8.51239 6.22247 7.2041C7.66547 5.89584 9.61202 4.75 12.0008 4.75Z\", fill: \"currentColor\" }),\n h(\"path\", { d: \"M5 19L19 5\", stroke: \"currentColor\", \"stroke-width\": 1.5, \"stroke-linecap\": \"round\" }),\n ]),\n ], props.style)\n}\n\n/** Pause icon — Lucide-style paused state. */\nexport const IconPause: FunctionalComponent<IconProps> = (props) => {\n const s = props.size ?? 24\n return svg(s, \"0 0 24 24\", [\n h(\"rect\", {\n x: 6,\n y: 4,\n width: 4,\n height: 16,\n rx: 1,\n fill: \"currentColor\",\n }),\n h(\"rect\", {\n x: 14,\n y: 4,\n width: 4,\n height: 16,\n rx: 1,\n fill: \"currentColor\",\n }),\n ], props.style)\n}\n\n/** Play icon — Lucide-style resume state. */\nexport const IconPlay: FunctionalComponent<IconProps> = (props) => {\n const s = props.size ?? 24\n return svg(s, \"0 0 24 24\", [\n h(\"path\", {\n d: \"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z\",\n fill: \"currentColor\",\n }),\n ], props.style)\n}\n\n/** Gear / settings icon. */\nexport const IconGear: FunctionalComponent<IconProps> = (props) => {\n const s = props.size ?? 16\n return svg(s, \"0 0 24 24\", [\n h(\"path\", { d: \"M10.6504 5.81117C10.9939 4.39628 13.0061 4.39628 13.3496 5.81117C13.5715 6.72517 14.6187 7.15891 15.4219 6.66952C16.6652 5.91193 18.0881 7.33479 17.3305 8.57815C16.8411 9.38134 17.2748 10.4285 18.1888 10.6504C19.6037 10.9939 19.6037 13.0061 18.1888 13.3496C17.2748 13.5715 16.8411 14.6187 17.3305 15.4219C18.0881 16.6652 16.6652 18.0881 15.4219 17.3305C14.6187 16.8411 13.5715 17.2748 13.3496 18.1888C13.0061 19.6037 10.9939 19.6037 10.6504 18.1888C10.4285 17.2748 9.38135 16.8411 8.57815 17.3305C7.33479 18.0881 5.91193 16.6652 6.66952 15.4219C7.15891 14.6187 6.72517 13.5715 5.81117 13.3496C4.39628 13.0061 4.39628 10.9939 5.81117 10.6504C6.72517 10.4285 7.15891 9.38134 6.66952 8.57815C5.91193 7.33479 7.33479 5.91192 8.57815 6.66952C9.38135 7.15891 10.4285 6.72517 10.6504 5.81117Z\", stroke: \"currentColor\", \"stroke-width\": 1.5, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n h(\"circle\", { cx: 12, cy: 12, r: 2.5, stroke: \"currentColor\", \"stroke-width\": 1.5 }),\n ], props.style)\n}\n\n/** Connected nodes icon — used for MCP & webhooks controls. */\nexport const IconConnectedNodes: FunctionalComponent<IconProps> = (props) => {\n const s = props.size ?? 18\n return svg(s, \"0 0 24 24\", [\n h(\"path\", { d: \"M9.25 7H14.75\", stroke: \"currentColor\", \"stroke-width\": 1.5, \"stroke-linecap\": \"round\" }),\n h(\"path\", { d: \"M8.89062 8.54688L11.25 14\", stroke: \"currentColor\", \"stroke-width\": 1.5, \"stroke-linecap\": \"round\" }),\n h(\"path\", { d: \"M15.1094 8.54688L12.75 14\", stroke: \"currentColor\", \"stroke-width\": 1.5, \"stroke-linecap\": \"round\" }),\n h(\"circle\", { cx: 7, cy: 7, r: 2.25, stroke: \"currentColor\", \"stroke-width\": 1.5 }),\n h(\"circle\", { cx: 17, cy: 7, r: 2.25, stroke: \"currentColor\", \"stroke-width\": 1.5 }),\n h(\"circle\", { cx: 12, cy: 17, r: 2.25, stroke: \"currentColor\", \"stroke-width\": 1.5 }),\n ], props.style)\n}\n\n/** Large X mark — close/exit icon (filled). */\nexport const IconXmarkLarge: FunctionalComponent<IconProps> = (props) => {\n const s = props.size ?? 24\n return svg(s, \"0 0 24 24\", [\n h(\"path\", { d: \"M16.7198 6.21973C17.0127 5.92683 17.4874 5.92683 17.7803 6.21973C18.0732 6.51262 18.0732 6.9874 17.7803 7.28027L13.0606 12L17.7803 16.7197C18.0732 17.0126 18.0732 17.4874 17.7803 17.7803C17.4875 18.0731 17.0127 18.0731 16.7198 17.7803L12.0001 13.0605L7.28033 17.7803C6.98746 18.0731 6.51268 18.0731 6.21979 17.7803C5.92689 17.4874 5.92689 17.0126 6.21979 16.7197L10.9395 12L6.21979 7.28027C5.92689 6.98738 5.92689 6.51262 6.21979 6.21973C6.51268 5.92683 6.98744 5.92683 7.28033 6.21973L12.0001 10.9395L16.7198 6.21973Z\", fill: \"currentColor\" }),\n ], props.style)\n}\n\n/** Sun icon — light mode indicator. */\nexport const IconSun: FunctionalComponent<IconProps> = (props) => {\n const s = props.size ?? 16\n return svg(s, \"0 0 20 20\", [\n h(\"path\", { d: \"M9.99999 12.7082C11.4958 12.7082 12.7083 11.4956 12.7083 9.99984C12.7083 8.50407 11.4958 7.2915 9.99999 7.2915C8.50422 7.2915 7.29166 8.50407 7.29166 9.99984C7.29166 11.4956 8.50422 12.7082 9.99999 12.7082Z\", stroke: \"currentColor\", \"stroke-width\": 1.25, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n h(\"path\", { d: \"M10 3.9585V5.05698\", stroke: \"currentColor\", \"stroke-width\": 1.25, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n h(\"path\", { d: \"M10 14.9429V16.0414\", stroke: \"currentColor\", \"stroke-width\": 1.25, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n h(\"path\", { d: \"M5.7269 5.72656L6.50682 6.50649\", stroke: \"currentColor\", \"stroke-width\": 1.25, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n h(\"path\", { d: \"M13.4932 13.4932L14.2731 14.2731\", stroke: \"currentColor\", \"stroke-width\": 1.25, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n h(\"path\", { d: \"M3.95834 10H5.05683\", stroke: \"currentColor\", \"stroke-width\": 1.25, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n h(\"path\", { d: \"M14.9432 10H16.0417\", stroke: \"currentColor\", \"stroke-width\": 1.25, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n h(\"path\", { d: \"M5.7269 14.2731L6.50682 13.4932\", stroke: \"currentColor\", \"stroke-width\": 1.25, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n h(\"path\", { d: \"M13.4932 6.50649L14.2731 5.72656\", stroke: \"currentColor\", \"stroke-width\": 1.25, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n ], props.style)\n}\n\n/** Moon icon — dark mode indicator. */\nexport const IconMoon: FunctionalComponent<IconProps> = (props) => {\n const s = props.size ?? 16\n return svg(s, \"0 0 20 20\", [\n h(\"path\", { d: \"M15.5 10.4955C15.4037 11.5379 15.0124 12.5314 14.3721 13.3596C13.7317 14.1878 12.8688 14.8165 11.8841 15.1722C10.8995 15.5278 9.83397 15.5957 8.81217 15.3679C7.79038 15.1401 6.8546 14.6259 6.11434 13.8857C5.37408 13.1454 4.85995 12.2096 4.63211 11.1878C4.40427 10.166 4.47215 9.10048 4.82781 8.11585C5.18346 7.13123 5.81218 6.26825 6.64039 5.62791C7.4686 4.98756 8.46206 4.59634 9.5045 4.5C8.89418 5.32569 8.60049 6.34302 8.67685 7.36695C8.75321 8.39087 9.19454 9.35339 9.92058 10.0794C10.6466 10.8055 11.6091 11.2468 12.6331 11.3231C13.657 11.3995 14.6743 11.1058 15.5 10.4955Z\", stroke: \"currentColor\", \"stroke-width\": 1.13793, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n ], props.style)\n}\n\n/** Animated pause/play — cross-fades between pause bars and play triangle. */\nexport const IconPausePlayAnimated: FunctionalComponent<{ isPaused?: boolean } & IconProps> = (props) => {\n const s = props.size ?? 24\n const isPaused = props.isPaused ?? false\n\n return svg(s, \"0 0 24 24\", [\n // Pause bars\n h(\"path\", { d: \"M8 6L8 18\", stroke: \"currentColor\", \"stroke-width\": 1.5, \"stroke-linecap\": \"round\", style: { opacity: isPaused ? 0 : 1, transition: \"opacity 0.15s ease\" } }),\n h(\"path\", { d: \"M16 18L16 6\", stroke: \"currentColor\", \"stroke-width\": 1.5, \"stroke-linecap\": \"round\", style: { opacity: isPaused ? 0 : 1, transition: \"opacity 0.15s ease\" } }),\n // Play triangle\n h(\"path\", { d: \"M17.75 10.701C18.75 11.2783 18.75 12.7217 17.75 13.299L8.75 18.4952C7.75 19.0725 6.5 18.3509 6.5 17.1962L6.5 6.80384C6.5 5.64914 7.75 4.92746 8.75 5.50481L17.75 10.701Z\", stroke: \"currentColor\", \"stroke-width\": 1.5, style: { opacity: isPaused ? 1 : 0, transition: \"opacity 0.15s ease\" } }),\n ], props.style)\n}\n\n/** Small animated checkmark — draw + bounce effect. */\nexport const IconCheckSmallAnimated: FunctionalComponent<IconProps> = (props) => {\n const s = props.size ?? 14\n return svg(s, \"0 0 14 14\", [\n h(\"style\", \"@keyframes ag-check-draw{0%{stroke-dashoffset:12}to{stroke-dashoffset:0}}@keyframes ag-check-bounce{0%{transform:scale(.5);opacity:0}50%{transform:scale(1.12);opacity:1}75%{transform:scale(.95)}to{transform:scale(1)}}\"),\n h(\"path\", {\n d: \"M3.9375 7L6.125 9.1875L10.5 4.8125\",\n stroke: \"currentColor\", \"stroke-width\": 1.5, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\",\n style: {\n strokeDasharray: 12,\n strokeDashoffset: 0,\n transformOrigin: \"center\",\n animation: \"ag-check-draw 0.18s ease-out, ag-check-bounce 0.3s cubic-bezier(0.34, 1.56, 0.64, 1)\",\n },\n }),\n ], props.style)\n}\n\n/** Small X for close actions. */\nexport const IconClose: FunctionalComponent<IconProps> = (props) => {\n const s = props.size ?? 16\n return svg(s, \"0 0 16 16\", [\n h(\"path\", { d: \"M4 4l8 8M12 4l-8 8\", stroke: \"currentColor\", \"stroke-width\": 1.5, \"stroke-linecap\": \"round\" }),\n ], props.style)\n}\n\n/** JSON bracket icon — for JSON export. */\nexport const IconJson: FunctionalComponent<IconProps> = (props) => {\n const s = props.size ?? 16\n return svg(s, \"0 0 16 16\", [\n h(\"path\", { d: \"M4.5 3C3.67 3 3 3.67 3 4.5v2c0 .55-.45 1-1 1v1c.55 0 1 .45 1 1v2c0 .83.67 1.5 1.5 1.5\", stroke: \"currentColor\", \"stroke-width\": 1.25, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n h(\"path\", { d: \"M11.5 3c.83 0 1.5.67 1.5 1.5v2c0 .55.45 1 1 1v1c-.55 0-1 .45-1 1v2c0 .83-.67 1.5-1.5 1.5\", stroke: \"currentColor\", \"stroke-width\": 1.25, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n ], props.style)\n}\n\n/** Help icon — circle with question mark. */\nexport const IconHelp: FunctionalComponent<IconProps> = (props) => {\n const s = props.size ?? 20\n return svg(s, \"0 0 20 20\", [\n h(\"circle\", { cx: 10, cy: 10.5, r: 5.25, stroke: \"currentColor\", \"stroke-width\": 1.25 }),\n h(\"path\", { d: \"M8.5 8.75C8.5 7.92 9.17 7.25 10 7.25C10.83 7.25 11.5 7.92 11.5 8.75C11.5 9.58 10.83 10.25 10 10.25V11\", stroke: \"currentColor\", \"stroke-width\": 1.25, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n h(\"circle\", { cx: 10, cy: 13, r: 0.75, fill: \"currentColor\" }),\n ], props.style)\n}\n\n/** Left chevron — back navigation. */\nexport const IconChevronLeft: FunctionalComponent<IconProps> = (props) => {\n const s = props.size ?? 16\n return svg(s, \"0 0 16 16\", [\n h(\"path\", { d: \"M8.5 3.5L4 8L8.5 12.5\", stroke: \"currentColor\", \"stroke-width\": 1.5, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n ], props.style)\n}\n\n/** Right chevron — forward navigation. */\nexport const IconChevronRight: FunctionalComponent<IconProps> = (props) => {\n const s = props.size ?? 16\n return svg(s, \"0 0 16 16\", [\n h(\"path\", { d: \"M8.5 11.5L12 8L8.5 4.5\", stroke: \"currentColor\", \"stroke-width\": 1.5, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n ], props.style)\n}\n\n/** Animated JSON icon — cross-fades between JSON brackets and green checkmark. */\nexport const IconJsonAnimated: FunctionalComponent<JsonAnimatedProps> = (props) => {\n const s = props.size ?? 16\n const copied = props.copied ?? false\n const transition = \"opacity 0.2s ease, transform 0.2s ease\"\n\n return svg(s, \"0 0 16 16\", [\n // JSON brackets state\n h(\"g\", { style: { opacity: copied ? 0 : 1, transform: copied ? \"scale(0.8)\" : \"scale(1)\", transformOrigin: \"center\", transition } }, [\n h(\"path\", { d: \"M4.5 3C3.67 3 3 3.67 3 4.5v2c0 .55-.45 1-1 1v1c.55 0 1 .45 1 1v2c0 .83.67 1.5 1.5 1.5\", stroke: \"currentColor\", \"stroke-width\": 1.25, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n h(\"path\", { d: \"M11.5 3c.83 0 1.5.67 1.5 1.5v2c0 .55.45 1 1 1v1c-.55 0-1 .45-1 1v2c0 .83-.67 1.5-1.5 1.5\", stroke: \"currentColor\", \"stroke-width\": 1.25, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n ]),\n // Green checkmark state\n h(\"g\", { style: { opacity: copied ? 1 : 0, transform: copied ? \"scale(1)\" : \"scale(0.8)\", transformOrigin: \"center\", transition } }, [\n h(\"path\", { d: \"M8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12Z\", stroke: \"#22c55e\", \"stroke-width\": 1.25, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n h(\"path\", { d: \"M10.5 6.5L7.5 10L5.75 8.25\", stroke: \"#22c55e\", \"stroke-width\": 1.25, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }),\n ]),\n ], props.style)\n}\n","<script setup lang=\"ts\">\nimport {\n computed,\n nextTick,\n onBeforeUnmount,\n ref,\n watch,\n} from \"vue\"\nimport {\n getForensicComputedStyles,\n parseComputedStylesString,\n type AnnotationV2,\n type AnnotationStatus,\n} from \"@liuovo/agentation-vue-core\"\nimport {\n ANNOTATIONS_STORE_KEY,\n I18N_KEY,\n OVERLAY_KEY,\n SELECTION_KEY,\n SETTINGS_KEY,\n} from \"../injection-keys.js\"\nimport { injectStrict } from \"../utils.js\"\nimport { originalSetTimeout } from \"../composables/useFreezeState.js\"\nimport { IconTrashAlt } from \"./icons.js\"\n\nconst store = injectStrict(ANNOTATIONS_STORE_KEY, \"annotations store\")\nconst selection = injectStrict(SELECTION_KEY, \"selection state\")\nconst overlay = injectStrict(OVERLAY_KEY, \"overlay state\")\nconst settings = injectStrict(SETTINGS_KEY, \"settings state\")\nconst i18n = injectStrict(I18N_KEY, \"i18n state\")\n\nconst comment = ref(\"\")\nconst stylesExpanded = ref(false)\nconst shaking = ref(false)\nconst textareaRef = ref<HTMLTextAreaElement | null>(null)\n\nconst messages = computed(() => i18n.messages)\n\nconst snapshot = computed(() => selection.selected)\nconst position = computed(() => overlay.popoverPosition)\nconst editingAnnotation = computed(() => overlay.editingAnnotation)\n\nconst isCreateMode = computed(\n () => overlay.popoverVisible && snapshot.value !== null && position.value !== null && !editingAnnotation.value,\n)\n\nconst isEditMode = computed(\n () => overlay.popoverVisible && editingAnnotation.value !== null && position.value !== null,\n)\n\nconst isOpen = computed(() => isCreateMode.value || isEditMode.value)\n\nconst accentColor = computed(() => {\n return isMultiSelect(editingAnnotation.value)\n || snapshot.value?.isMultiSelect\n ? \"#34C759\"\n : settings.annotationColor\n})\n\nconst popoverStyle = computed(() => {\n const pos = position.value\n if (!pos) return undefined\n\n return {\n top: `${pos.top}px`,\n left: `${pos.left}px`,\n \"--ag-popover-accent\": accentColor.value,\n }\n})\n\nconst displayName = computed(() => {\n if (editingAnnotation.value) return editingAnnotation.value.elementSelector\n return snapshot.value?.elementName ?? \"\"\n})\n\nconst displaySource = computed(() => {\n if (!settings.componentSourceEnabled) return \"\"\n\n if (editingAnnotation.value) {\n const src = editingAnnotation.value.source\n return src.file\n ? (src.line ? `${src.file}:${src.line}` : src.file)\n : \"\"\n }\n\n return snapshot.value?.source.file\n ? (snapshot.value.source.line\n ? `${snapshot.value.source.file}:${snapshot.value.source.line}`\n : snapshot.value.source.file)\n : \"\"\n})\n\nconst selectedText = computed(() => {\n return editingAnnotation.value?.elementText ?? snapshot.value?.selectedText ?? \"\"\n})\nconst threadMessages = computed(() => editingAnnotation.value?.thread ?? [])\nconst workflowStatus = computed<AnnotationStatus>(\n () => editingAnnotation.value?.status ?? \"pending\",\n)\nconst workflowStatusLabel = computed(() => getStatusLabel(workflowStatus.value))\nconst workflowStatusTone = computed(() => getStatusTone(workflowStatus.value))\n\nconst computedStyles = computed(() => {\n if (editingAnnotation.value) {\n return getAnnotationComputedStyles(editingAnnotation.value)\n }\n\n const selectedElement = snapshot.value?.element\n if (!selectedElement) return undefined\n\n return parseComputedStylesString(getForensicComputedStyles(selectedElement))\n})\n\nconst styleEntries = computed(() => Object.entries(computedStyles.value ?? {}))\nconst hasComputedStyles = computed(() => styleEntries.value.length > 0)\n\nlet shakeTimer: ReturnType<typeof setTimeout> | null = null\n\nwatch(\n [isOpen, () => editingAnnotation.value?.id, () => snapshot.value?.element],\n async ([open]) => {\n if (!open) {\n comment.value = \"\"\n stylesExpanded.value = false\n return\n }\n\n comment.value = editingAnnotation.value?.comment ?? \"\"\n stylesExpanded.value = false\n\n await nextTick()\n focusTextarea()\n },\n { immediate: true },\n)\n\nwatch(\n () => overlay.shakeTick ?? 0,\n (tick, previousTick) => {\n if (!isOpen.value) return\n if (tick === previousTick) return\n shake()\n },\n)\n\nonBeforeUnmount(() => {\n if (shakeTimer) {\n window.clearTimeout(shakeTimer)\n }\n})\n\nfunction save(): void {\n const trimmed = comment.value.trim()\n if (!trimmed) return\n\n if (editingAnnotation.value) {\n try {\n store.updateAnnotation(editingAnnotation.value.id, trimmed)\n } catch (err) {\n console.warn(\"[agentation] Failed to update annotation:\", err)\n return\n }\n } else {\n const snap = snapshot.value\n if (!snap) return\n\n try {\n store.saveAnnotation(trimmed, snap)\n } catch (err) {\n console.warn(\"[agentation] Failed to save annotation:\", err)\n return\n }\n }\n\n dismiss()\n}\n\nfunction deleteAnnotation(): void {\n if (!editingAnnotation.value) return\n store.removeAnnotation(editingAnnotation.value.id)\n dismiss()\n}\n\nfunction dismiss(): void {\n comment.value = \"\"\n stylesExpanded.value = false\n selection.clearSelection()\n overlay.hidePopover()\n}\n\nfunction focusTextarea(): void {\n const textarea = textareaRef.value\n if (!textarea) return\n textarea.focus()\n textarea.selectionStart = textarea.selectionEnd = textarea.value.length\n textarea.scrollTop = textarea.scrollHeight\n}\n\nfunction shake(): void {\n if (shakeTimer) {\n window.clearTimeout(shakeTimer)\n }\n\n shaking.value = false\n\n void nextTick(() => {\n shaking.value = true\n shakeTimer = originalSetTimeout(() => {\n shaking.value = false\n focusTextarea()\n shakeTimer = null\n }, 250)\n })\n}\n\nfunction onKeydown(event: KeyboardEvent): void {\n if (event.isComposing) return\n\n if (event.key === \"Enter\" && !event.shiftKey) {\n event.preventDefault()\n save()\n }\n\n if (event.key === \"Escape\") {\n event.preventDefault()\n dismiss()\n }\n}\n\nfunction getStatusLabel(status: AnnotationStatus): string {\n switch (status) {\n case \"acknowledged\":\n return messages.value.workflow.statusAcknowledged\n case \"resolved\":\n return messages.value.workflow.statusResolved\n case \"dismissed\":\n return messages.value.workflow.statusDismissed\n default:\n return messages.value.workflow.statusPending\n }\n}\n\nfunction getStatusTone(status: AnnotationStatus): \"pending\" | \"acknowledged\" | \"resolved\" | \"dismissed\" {\n switch (status) {\n case \"acknowledged\":\n case \"resolved\":\n case \"dismissed\":\n return status\n default:\n return \"pending\"\n }\n}\n\nfunction getRoleLabel(role: \"human\" | \"agent\"): string {\n return role === \"agent\"\n ? messages.value.workflow.roleAgent\n : messages.value.workflow.roleHuman\n}\n\nfunction formatTimestamp(timestamp: string | number): string {\n const date = typeof timestamp === \"number\"\n ? new Date(timestamp)\n : new Date(timestamp)\n\n if (Number.isNaN(date.getTime())) {\n return \"\"\n }\n\n return new Intl.DateTimeFormat(undefined, {\n month: \"short\",\n day: \"numeric\",\n hour: \"2-digit\",\n minute: \"2-digit\",\n }).format(date)\n}\n\nfunction isMultiSelect(annotation: AnnotationV2 | null): boolean {\n const metadata = annotation?.metadata as { isMultiSelect?: unknown } | undefined\n return metadata?.isMultiSelect === true\n}\n\nfunction getAnnotationComputedStyles(annotation: AnnotationV2): Record<string, string> | undefined {\n const metadata = annotation.metadata as { computedStyles?: unknown } | undefined\n const raw = metadata?.computedStyles\n\n if (typeof raw === \"string\") {\n return parseComputedStylesString(raw)\n }\n\n if (raw && typeof raw === \"object\") {\n return Object.fromEntries(\n Object.entries(raw).filter((entry): entry is [string, string] => typeof entry[1] === \"string\"),\n )\n }\n\n return undefined\n}\n</script>\n\n<template>\n <Transition name=\"popover\">\n <div\n v-if=\"isOpen\"\n class=\"popover\"\n :class=\"{ light: !settings.darkMode, shaking }\"\n :style=\"popoverStyle\"\n data-annotation-popup\n @click.stop\n >\n <div class=\"header\">\n <button\n v-if=\"hasComputedStyles\"\n class=\"header-toggle\"\n type=\"button\"\n :aria-expanded=\"stylesExpanded\"\n @click=\"stylesExpanded = !stylesExpanded\"\n >\n <svg\n class=\"chevron\"\n :class=\"{ expanded: stylesExpanded }\"\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 14 14\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M5.5 10.25L9 7.25L5.75 4\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n <span class=\"element-name\">{{ displayName }}</span>\n </button>\n\n <span v-else class=\"element-name\">{{ displayName }}</span>\n </div>\n\n <div v-if=\"displaySource\" class=\"source-file\">\n {{ displaySource }}\n </div>\n\n <div v-if=\"editingAnnotation\" class=\"workflow-summary\">\n <div class=\"status-row\">\n <span class=\"status-pill\" :data-status=\"workflowStatusTone\">\n {{ workflowStatusLabel }}\n </span>\n <span v-if=\"threadMessages.length\" class=\"thread-count\">\n {{ messages.workflow.replyCount(threadMessages.length) }}\n </span>\n </div>\n\n <div v-if=\"threadMessages.length\" class=\"thread-block\">\n <div class=\"thread-title\">{{ messages.workflow.thread }}</div>\n <div class=\"thread-list\">\n <div\n v-for=\"message in threadMessages.slice(-4)\"\n :key=\"message.id\"\n class=\"thread-item\"\n :data-role=\"message.role\"\n >\n <div class=\"thread-meta\">\n <span>{{ getRoleLabel(message.role) }}</span>\n <span>{{ formatTimestamp(message.timestamp) }}</span>\n </div>\n <div class=\"thread-content\">{{ message.content }}</div>\n </div>\n </div>\n </div>\n </div>\n\n <div\n v-if=\"hasComputedStyles\"\n class=\"styles-wrapper\"\n :class=\"{ expanded: stylesExpanded }\"\n >\n <div class=\"styles-inner\">\n <div class=\"styles-block\">\n <div\n v-for=\"[property, value] in styleEntries\"\n :key=\"property\"\n class=\"style-line\"\n >\n <span class=\"style-property\">{{ property }}</span>\n :\n <span class=\"style-value\">{{ value }}</span>;\n </div>\n </div>\n </div>\n </div>\n\n <div v-if=\"selectedText\" class=\"quote\">\n &ldquo;{{ selectedText.slice(0, 80) }}{{ selectedText.length > 80 ? \"...\" : \"\" }}&rdquo;\n </div>\n\n <textarea\n ref=\"textareaRef\"\n v-model=\"comment\"\n class=\"textarea\"\n rows=\"2\"\n :placeholder=\"editingAnnotation ? messages.popover.editPlaceholder : messages.popover.createPlaceholder\"\n @keydown=\"onKeydown\"\n />\n\n <div class=\"actions\">\n <div class=\"delete-wrapper\">\n <button\n v-if=\"editingAnnotation\"\n class=\"delete-button\"\n type=\"button\"\n :title=\"messages.popover.deleteAnnotation\"\n :aria-label=\"messages.popover.deleteAnnotation\"\n @click=\"deleteAnnotation\"\n >\n <IconTrashAlt :size=\"22\" />\n </button>\n </div>\n\n <button class=\"btn-ghost\" type=\"button\" @click=\"dismiss\">\n {{ messages.popover.cancel }}\n </button>\n\n <button\n class=\"btn-primary\"\n type=\"button\"\n :disabled=\"!comment.trim()\"\n :style=\"{ backgroundColor: accentColor }\"\n @click=\"save\"\n >\n {{ editingAnnotation ? messages.popover.update : messages.popover.save }}\n </button>\n </div>\n </div>\n </Transition>\n</template>\n\n<style scoped>\n:deep(svg[fill=\"none\"]) { fill: none !important; }\n\n@keyframes popoverShake {\n 0%, 100% { transform: scale(1) translateX(0); }\n 20% { transform: scale(1) translateX(-3px); }\n 40% { transform: scale(1) translateX(3px); }\n 60% { transform: scale(1) translateX(-2px); }\n 80% { transform: scale(1) translateX(2px); }\n}\n\n.popover {\n position: fixed;\n z-index: 100001;\n width: 280px;\n padding: 12px 16px 14px;\n border-radius: 16px;\n background: #1a1a1a;\n box-shadow:\n 0 4px 24px rgba(0, 0, 0, 0.3),\n 0 0 0 1px rgba(255, 255, 255, 0.08);\n color: rgba(255, 255, 255, 0.92);\n pointer-events: auto;\n cursor: default;\n will-change: transform, opacity;\n}\n\n.popover.light {\n background: #ffffff;\n box-shadow:\n 0 4px 24px rgba(15, 23, 42, 0.12),\n 0 0 0 1px rgba(15, 23, 42, 0.06);\n color: rgba(15, 23, 42, 0.92);\n}\n\n.popover.shaking {\n animation: popoverShake 0.25s ease-out;\n}\n\n.popover-enter-active {\n transition:\n opacity 0.2s ease,\n transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),\n filter 0.2s ease;\n}\n\n.popover-leave-active {\n transition:\n opacity 0.15s ease-in,\n transform 0.15s ease-in,\n filter 0.15s ease-in;\n}\n\n.popover-enter-from,\n.popover-leave-to {\n opacity: 0;\n transform: scale(0.95) translateY(4px);\n filter: blur(4px);\n}\n\n.header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 4px;\n}\n\n.header-toggle {\n display: flex;\n align-items: center;\n gap: 4px;\n width: 100%;\n min-width: 0;\n padding: 0;\n border: none;\n background: transparent;\n color: inherit;\n cursor: pointer;\n text-align: left;\n}\n\n.element-name {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 12px;\n font-weight: 400;\n color: rgba(255, 255, 255, 0.56);\n}\n\n.light .element-name {\n color: rgba(15, 23, 42, 0.62);\n}\n\n.chevron {\n flex-shrink: 0;\n color: rgba(255, 255, 255, 0.48);\n transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);\n}\n\n.chevron.expanded {\n transform: rotate(90deg);\n}\n\n.light .chevron {\n color: rgba(15, 23, 42, 0.4);\n}\n\n.source-file {\n margin-bottom: 8px;\n font-size: 11px;\n line-height: 1.4;\n color: rgba(255, 255, 255, 0.38);\n font-family: ui-monospace, SFMono-Regular, \"SF Mono\", Menlo, Consolas, monospace;\n word-break: break-all;\n}\n\n.light .source-file {\n color: rgba(15, 23, 42, 0.42);\n}\n\n.workflow-summary {\n margin-bottom: 8px;\n}\n\n.status-row {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.status-pill {\n display: inline-flex;\n align-items: center;\n height: 22px;\n padding: 0 8px;\n border-radius: 999px;\n font-size: 11px;\n font-weight: 600;\n letter-spacing: 0.01em;\n}\n\n.status-pill[data-status=\"pending\"] {\n background: rgba(59, 130, 246, 0.16);\n color: #93c5fd;\n}\n\n.status-pill[data-status=\"acknowledged\"] {\n background: rgba(14, 165, 233, 0.16);\n color: #67e8f9;\n}\n\n.status-pill[data-status=\"resolved\"] {\n background: rgba(34, 197, 94, 0.16);\n color: #86efac;\n}\n\n.status-pill[data-status=\"dismissed\"] {\n background: rgba(148, 163, 184, 0.18);\n color: #cbd5e1;\n}\n\n.light .status-pill[data-status=\"pending\"] {\n background: rgba(59, 130, 246, 0.1);\n color: #1d4ed8;\n}\n\n.light .status-pill[data-status=\"acknowledged\"] {\n background: rgba(14, 165, 233, 0.1);\n color: #0f766e;\n}\n\n.light .status-pill[data-status=\"resolved\"] {\n background: rgba(34, 197, 94, 0.1);\n color: #15803d;\n}\n\n.light .status-pill[data-status=\"dismissed\"] {\n background: rgba(148, 163, 184, 0.14);\n color: #475569;\n}\n\n.thread-count {\n font-size: 11px;\n color: rgba(255, 255, 255, 0.46);\n}\n\n.light .thread-count {\n color: rgba(15, 23, 42, 0.44);\n}\n\n.thread-block {\n margin-top: 8px;\n padding: 8px;\n border-radius: 10px;\n background: rgba(255, 255, 255, 0.04);\n}\n\n.light .thread-block {\n background: rgba(15, 23, 42, 0.04);\n}\n\n.thread-title {\n margin-bottom: 6px;\n font-size: 11px;\n font-weight: 600;\n color: rgba(255, 255, 255, 0.62);\n}\n\n.light .thread-title {\n color: rgba(15, 23, 42, 0.58);\n}\n\n.thread-list {\n display: flex;\n flex-direction: column;\n gap: 6px;\n max-height: 144px;\n overflow: auto;\n}\n\n.thread-item {\n padding: 7px 8px;\n border-radius: 8px;\n background: rgba(15, 23, 42, 0.24);\n}\n\n.thread-item[data-role=\"human\"] {\n background: rgba(59, 130, 246, 0.1);\n}\n\n.light .thread-item {\n background: rgba(15, 23, 42, 0.06);\n}\n\n.light .thread-item[data-role=\"human\"] {\n background: rgba(59, 130, 246, 0.08);\n}\n\n.thread-meta {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n margin-bottom: 4px;\n font-size: 10px;\n color: rgba(255, 255, 255, 0.48);\n}\n\n.light .thread-meta {\n color: rgba(15, 23, 42, 0.46);\n}\n\n.thread-content {\n font-size: 12px;\n line-height: 1.45;\n color: rgba(255, 255, 255, 0.86);\n white-space: pre-wrap;\n word-break: break-word;\n}\n\n.light .thread-content {\n color: rgba(15, 23, 42, 0.8);\n}\n\n.styles-wrapper {\n display: grid;\n grid-template-rows: 0fr;\n transition: grid-template-rows 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n}\n\n.styles-wrapper.expanded {\n grid-template-rows: 1fr;\n}\n\n.styles-inner {\n overflow: hidden;\n}\n\n.styles-block {\n margin-bottom: 8px;\n padding: 8px 10px;\n border-radius: 6px;\n background: rgba(255, 255, 255, 0.05);\n font-size: 11px;\n line-height: 1.5;\n font-family: ui-monospace, SFMono-Regular, \"SF Mono\", Menlo, Consolas, monospace;\n}\n\n.light .styles-block {\n background: rgba(15, 23, 42, 0.03);\n}\n\n.style-line {\n color: rgba(255, 255, 255, 0.85);\n word-break: break-word;\n}\n\n.light .style-line {\n color: rgba(15, 23, 42, 0.76);\n}\n\n.style-property {\n color: #c792ea;\n}\n\n.light .style-property {\n color: #7c3aed;\n}\n\n.style-value {\n color: inherit;\n margin-left: 2px;\n}\n\n.quote {\n margin-bottom: 8px;\n padding: 6px 8px;\n border-radius: 4px;\n background: rgba(255, 255, 255, 0.05);\n color: rgba(255, 255, 255, 0.6);\n font-size: 12px;\n font-style: italic;\n line-height: 1.45;\n}\n\n.light .quote {\n background: rgba(15, 23, 42, 0.04);\n color: rgba(15, 23, 42, 0.58);\n}\n\n.textarea {\n width: 100%;\n padding: 8px 10px;\n border: 1px solid rgba(255, 255, 255, 0.15);\n border-radius: 8px;\n background: rgba(255, 255, 255, 0.05);\n color: #ffffff;\n resize: none;\n outline: none;\n font: inherit;\n font-size: 13px;\n line-height: 1.45;\n transition: border-color 0.15s ease, box-shadow 0.15s ease;\n}\n\n.textarea::placeholder {\n color: rgba(255, 255, 255, 0.35);\n}\n\n.textarea:focus {\n border-color: var(--ag-popover-accent, #3c82f7);\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--ag-popover-accent, #3c82f7) 18%, transparent);\n}\n\n.light .textarea {\n background: rgba(15, 23, 42, 0.03);\n color: #1a1a1a;\n border-color: rgba(15, 23, 42, 0.12);\n}\n\n.light .textarea::placeholder {\n color: rgba(15, 23, 42, 0.38);\n}\n\n.textarea::-webkit-scrollbar {\n width: 6px;\n}\n\n.textarea::-webkit-scrollbar-track {\n background: transparent;\n}\n\n.textarea::-webkit-scrollbar-thumb {\n background: rgba(255, 255, 255, 0.2);\n border-radius: 3px;\n}\n\n.light .textarea::-webkit-scrollbar-thumb {\n background: rgba(15, 23, 42, 0.15);\n}\n\n.actions {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: 6px;\n margin-top: 8px;\n}\n\n.delete-wrapper {\n margin-right: auto;\n}\n\n.delete-button {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n padding: 0;\n border: none;\n border-radius: 50%;\n background: transparent;\n color: rgba(255, 255, 255, 0.42);\n cursor: pointer;\n transition:\n background-color 0.15s ease,\n color 0.15s ease,\n transform 0.1s ease;\n}\n\n.delete-button:hover {\n background: rgba(255, 59, 48, 0.25);\n color: #ff3b30;\n}\n\n.delete-button:active {\n transform: scale(0.92);\n}\n\n.light .delete-button {\n color: rgba(15, 23, 42, 0.42);\n}\n\n.light .delete-button:hover {\n background: rgba(255, 59, 48, 0.14);\n}\n\n.btn-ghost,\n.btn-primary {\n border: none;\n border-radius: 999px;\n padding: 6px 14px;\n font: inherit;\n font-size: 12px;\n font-weight: 500;\n cursor: pointer;\n transition:\n background-color 0.15s ease,\n color 0.15s ease,\n opacity 0.15s ease,\n transform 0.1s ease,\n filter 0.15s ease;\n}\n\n.btn-ghost {\n background: transparent;\n color: rgba(255, 255, 255, 0.52);\n}\n\n.btn-ghost:hover {\n background: rgba(255, 255, 255, 0.1);\n color: rgba(255, 255, 255, 0.82);\n}\n\n.light .btn-ghost {\n color: rgba(15, 23, 42, 0.5);\n}\n\n.light .btn-ghost:hover {\n background: rgba(15, 23, 42, 0.06);\n color: rgba(15, 23, 42, 0.76);\n}\n\n.btn-primary {\n color: #ffffff;\n}\n\n.btn-primary:hover:not(:disabled) {\n filter: brightness(0.94);\n}\n\n.btn-primary:active:not(:disabled) {\n transform: scale(0.97);\n}\n\n.btn-primary:disabled {\n opacity: 0.45;\n cursor: not-allowed;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { computed } from \"vue\"\nimport { AREA_SELECTION_KEY } from \"../injection-keys.js\"\nimport { injectStrict } from \"../utils.js\"\n\nconst areaSelection = injectStrict(AREA_SELECTION_KEY, \"area selection state\")\n\nconst selectionRectStyle = computed(() => {\n const rect = areaSelection.rect\n if (!rect) return null\n return {\n top: `${rect.top}px`,\n left: `${rect.left}px`,\n width: `${rect.width}px`,\n height: `${rect.height}px`,\n }\n})\n\nconst matchedBoxes = computed(() => {\n if (!areaSelection.active) return []\n return areaSelection.matched\n .filter((item) => document.contains(item.element))\n .map((item, index) => {\n const rect = item.element.getBoundingClientRect()\n return { key: `match-${index}`, top: rect.top, left: rect.left, width: rect.width, height: rect.height }\n })\n .filter((box) => box.width > 0 && box.height > 0)\n})\n</script>\n\n<template>\n <div v-if=\"areaSelection.active && selectionRectStyle\" class=\"drag-selection-layer\" aria-hidden=\"true\">\n <div\n v-for=\"box in matchedBoxes\"\n :key=\"box.key\"\n class=\"matched-box\"\n :style=\"{ top: `${box.top}px`, left: `${box.left}px`, width: `${box.width}px`, height: `${box.height}px` }\"\n />\n <div class=\"selection-rect\" :style=\"selectionRectStyle\" />\n </div>\n</template>\n\n<style scoped>\n.drag-selection-layer {\n position: fixed;\n inset: 0;\n z-index: 99997;\n pointer-events: none;\n}\n\n.matched-box {\n position: fixed;\n border: 2px solid var(--ag-selected, #f59e0b);\n border-radius: 4px;\n background: color-mix(in srgb, var(--ag-selected, #f59e0b) 10%, transparent);\n}\n\n.selection-rect {\n position: fixed;\n border: 1.5px dashed var(--ag-accent, #3b82f6);\n border-radius: 6px;\n background: color-mix(in srgb, var(--ag-accent, #3b82f6) 8%, transparent);\n box-shadow: 0 0 0 1px color-mix(in srgb, var(--ag-accent, #3b82f6) 20%, transparent);\n}\n\n@media (prefers-reduced-motion: reduce) {\n .matched-box,\n .selection-rect {\n transition: none;\n }\n}\n</style>\n","<script setup lang=\"ts\">\nimport { computed, onMounted, onUnmounted, reactive, watch } from \"vue\"\nimport { AREA_SELECTION_KEY, SELECTION_KEY } from \"../injection-keys.js\"\nimport { injectStrict } from \"../utils.js\"\n\ninterface HighlightBox {\n key: string\n isSelected: boolean\n top: number\n left: number\n width: number\n height: number\n}\n\nconst selection = injectStrict(SELECTION_KEY, \"selection state\")\nconst areaSelection = injectStrict(AREA_SELECTION_KEY, \"area selection state\")\n\nconst state = reactive({\n boxes: [] as HighlightBox[],\n})\n\nconst boxes = computed(() =>\n state.boxes.map((box) => ({\n ...box,\n style: {\n top: `${box.top}px`,\n left: `${box.left}px`,\n width: `${box.width}px`,\n height: `${box.height}px`,\n },\n })),\n)\n\nwatch(\n () => [selection.hovered, selection.selected, areaSelection.active] as const,\n () => syncBoxes(),\n { immediate: true },\n)\n\nonMounted(() => {\n window.addEventListener(\"scroll\", syncBoxes, true)\n window.addEventListener(\"resize\", syncBoxes)\n})\n\nonUnmounted(() => {\n window.removeEventListener(\"scroll\", syncBoxes, true)\n window.removeEventListener(\"resize\", syncBoxes)\n})\n\nfunction syncBoxes(): void {\n // Hide highlights during area drag (DragSelectionLayer handles visuals)\n if (areaSelection.active) {\n state.boxes = []\n return\n }\n\n const selected = selection.selected\n\n // Multi-select: show highlight per selected element\n if (selected?.multiSelectElements?.length) {\n const next = selected.multiSelectElements\n .filter((el) => document.contains(el))\n .map((el, index) => {\n const rect = el.getBoundingClientRect()\n return rect.width > 0 && rect.height > 0\n ? { key: `selected-${index}`, isSelected: true, top: rect.top, left: rect.left, width: rect.width, height: rect.height }\n : null\n })\n .filter((box): box is HighlightBox => box !== null)\n\n if (next.length > 0) {\n state.boxes = next\n return\n }\n }\n\n // Fallback for persisted multi-select (no live DOM refs)\n if (selected?.isMultiSelect && selected.elementBoundingBoxes?.length) {\n state.boxes = selected.elementBoundingBoxes\n .map((bb, index) => ({\n key: `selected-${index}`,\n isSelected: true,\n top: bb.y - window.scrollY,\n left: bb.x - window.scrollX,\n width: bb.width,\n height: bb.height,\n }))\n .filter((box) => box.width > 0 && box.height > 0)\n return\n }\n\n // Single-element: hover or selected\n const snapshot = selected ?? selection.hovered\n if (!snapshot) {\n state.boxes = []\n return\n }\n\n const rect = snapshot.element.getBoundingClientRect()\n if (rect.width <= 0 && rect.height <= 0) {\n state.boxes = []\n return\n }\n\n state.boxes = [{\n key: selected ? \"selected\" : \"hovered\",\n isSelected: selected !== null,\n top: rect.top,\n left: rect.left,\n width: rect.width,\n height: rect.height,\n }]\n}\n</script>\n\n<template>\n <div class=\"highlight-layer\" aria-hidden=\"true\">\n <TransitionGroup name=\"highlight\">\n <div\n v-for=\"box in boxes\"\n :key=\"box.key\"\n class=\"highlight-box\"\n :class=\"{ selected: box.isSelected }\"\n :style=\"box.style\"\n />\n </TransitionGroup>\n </div>\n</template>\n\n<style scoped>\n.highlight-layer {\n position: fixed;\n inset: 0;\n z-index: 99999;\n pointer-events: none;\n}\n\n.highlight-box {\n position: fixed;\n border: 2px solid var(--ag-accent, #3b82f6);\n border-radius: 4px;\n background: color-mix(in srgb, var(--ag-accent, #3b82f6) 8%, transparent);\n transition:\n top 0.06s ease-out,\n left 0.06s ease-out,\n width 0.06s ease-out,\n height 0.06s ease-out,\n border-color 0.12s ease,\n background-color 0.12s ease;\n}\n\n.highlight-box.selected {\n border-color: var(--ag-selected, #f59e0b);\n background: color-mix(in srgb, var(--ag-selected, #f59e0b) 10%, transparent);\n}\n\n.highlight-enter-active,\n.highlight-leave-active {\n transition: opacity 0.15s ease;\n}\n\n.highlight-enter-from,\n.highlight-leave-to {\n opacity: 0;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .highlight-box {\n transition: none;\n }\n\n .highlight-enter-active,\n .highlight-leave-active {\n transition: none;\n }\n}\n</style>\n","<script setup lang=\"ts\">\nimport { computed, onMounted, onUnmounted, reactive, ref } from \"vue\"\nimport type { AnnotationStatus, AnnotationV2 } from \"@liuovo/agentation-vue-core\"\nimport { findAnnotationTarget } from \"../annotation-target.js\"\nimport { ANNOTATIONS_STORE_KEY, I18N_KEY, OVERLAY_KEY, SETTINGS_KEY } from \"../injection-keys.js\"\nimport { injectStrict } from \"../utils.js\"\n\ninterface BoundingBox {\n x: number\n y: number\n width: number\n height: number\n}\n\ninterface MarkerPosition {\n id: string\n number: number\n top: number\n left: number\n annotation: AnnotationV2\n}\n\nconst store = injectStrict(ANNOTATIONS_STORE_KEY, \"annotations store\")\nconst overlay = injectStrict(OVERLAY_KEY, \"overlay state\")\nconst settings = injectStrict(SETTINGS_KEY, \"settings state\")\nconst i18n = injectStrict(I18N_KEY, \"i18n state\")\n\nconst hoveredId = ref<string | null>(null)\nconst messages = computed(() => i18n.messages)\nconst syncVersion = ref(0)\n\nconst scroll = reactive({\n x: window.scrollX,\n y: window.scrollY,\n})\n\nconst showMarkers = computed(() => settings.showMarkers)\nconst annotationColor = computed(() => settings.annotationColor || \"#3c82f7\")\n\nconst markers = computed<MarkerPosition[]>(() => {\n syncVersion.value\n\n return store.annotations\n .map((annotation, index) => {\n const metadata = annotation.metadata as { isMultiSelect?: boolean } | undefined\n\n if (metadata?.isMultiSelect) {\n const bb = getBoundingBox(annotation)\n if (!bb) return null\n\n return {\n id: annotation.id,\n number: index + 1,\n top: bb.y - scroll.y,\n left: bb.x + bb.width / 2 - scroll.x,\n annotation,\n }\n }\n\n const liveTarget = findAnnotationTarget(annotation)\n if (!liveTarget) return null\n\n const liveRect = liveTarget.getBoundingClientRect()\n\n return {\n id: annotation.id,\n number: index + 1,\n top: liveRect.top,\n left: liveRect.left + liveRect.width / 2,\n annotation,\n }\n })\n .filter((m): m is MarkerPosition => m !== null)\n})\n\nlet syncFrame: number | null = null\nlet resizeObserver: ResizeObserver | null = null\nlet mutationObserver: MutationObserver | null = null\n\nonMounted(() => {\n window.addEventListener(\"scroll\", scheduleLayoutSync, true)\n window.addEventListener(\"resize\", scheduleLayoutSync)\n document.addEventListener(\"load\", scheduleLayoutSync, true)\n document.addEventListener(\"transitionend\", scheduleLayoutSync, true)\n document.addEventListener(\"animationend\", scheduleLayoutSync, true)\n\n if (typeof ResizeObserver !== \"undefined\") {\n resizeObserver = new ResizeObserver(() => scheduleLayoutSync())\n resizeObserver.observe(document.documentElement)\n if (document.body) {\n resizeObserver.observe(document.body)\n }\n }\n\n mutationObserver = new MutationObserver(() => scheduleLayoutSync())\n mutationObserver.observe(document.documentElement, {\n subtree: true,\n childList: true,\n characterData: true,\n })\n mutationObserver.observe(document.documentElement, {\n attributes: true,\n attributeFilter: [\"class\", \"style\"],\n })\n if (document.body) {\n mutationObserver.observe(document.body, {\n attributes: true,\n attributeFilter: [\"class\", \"style\"],\n })\n }\n\n scheduleLayoutSync()\n})\n\nonUnmounted(() => {\n window.removeEventListener(\"scroll\", scheduleLayoutSync, true)\n window.removeEventListener(\"resize\", scheduleLayoutSync)\n document.removeEventListener(\"load\", scheduleLayoutSync, true)\n document.removeEventListener(\"transitionend\", scheduleLayoutSync, true)\n document.removeEventListener(\"animationend\", scheduleLayoutSync, true)\n resizeObserver?.disconnect()\n mutationObserver?.disconnect()\n if (syncFrame !== null) {\n window.cancelAnimationFrame(syncFrame)\n }\n})\n\nfunction scheduleLayoutSync(): void {\n if (syncFrame !== null) return\n\n syncFrame = window.requestAnimationFrame(() => {\n syncFrame = null\n syncLayout()\n })\n}\n\nfunction syncLayout(): void {\n scroll.x = window.scrollX\n scroll.y = window.scrollY\n syncVersion.value += 1\n}\n\nfunction onMarkerHover(id: string): void {\n hoveredId.value = id\n}\n\nfunction onMarkerLeave(): void {\n hoveredId.value = null\n}\n\nfunction onMarkerClick(marker: MarkerPosition, event: MouseEvent): void {\n event.stopPropagation()\n hoveredId.value = null\n\n const btn = event.currentTarget as HTMLElement\n const rect = btn.getBoundingClientRect()\n overlay.showEditPopover(marker.annotation, rect)\n}\n\nfunction truncate(text: string, max = 72): string {\n return text.length > max ? `${text.slice(0, max)}…` : text\n}\n\nfunction getStatus(annotation: AnnotationV2): AnnotationStatus {\n return annotation.status ?? \"pending\"\n}\n\nfunction getStatusLabel(annotation: AnnotationV2): string {\n switch (getStatus(annotation)) {\n case \"acknowledged\":\n return messages.value.workflow.statusAcknowledged\n case \"resolved\":\n return messages.value.workflow.statusResolved\n case \"dismissed\":\n return messages.value.workflow.statusDismissed\n default:\n return messages.value.workflow.statusPending\n }\n}\n\nfunction getMarkerColor(annotation: AnnotationV2): string {\n switch (getStatus(annotation)) {\n case \"acknowledged\":\n return \"#0ea5e9\"\n case \"resolved\":\n return \"#22c55e\"\n case \"dismissed\":\n return \"#94a3b8\"\n default:\n return annotationColor.value\n }\n}\n\nfunction getBoundingBox(annotation: AnnotationV2): BoundingBox | undefined {\n return (annotation.metadata as { boundingBox?: BoundingBox } | undefined)?.boundingBox\n}\n</script>\n\n<template>\n <div v-if=\"showMarkers\" class=\"marker-layer\" aria-hidden=\"true\" data-annotation-marker>\n <TransitionGroup name=\"marker\">\n <div\n v-for=\"marker in markers\"\n :key=\"marker.id\"\n class=\"marker-wrapper\"\n :style=\"{ top: `${marker.top}px`, left: `${marker.left}px` }\"\n >\n <button\n class=\"marker-dot\"\n :class=\"[{ hovered: hoveredId === marker.id }, `status-${getStatus(marker.annotation)}`]\"\n :style=\"{ backgroundColor: hoveredId === marker.id ? '#ff3b30' : getMarkerColor(marker.annotation) }\"\n type=\"button\"\n :aria-label=\"messages.marker.annotationAria(marker.number)\"\n @click.stop=\"onMarkerClick(marker, $event)\"\n @mouseenter=\"onMarkerHover(marker.id)\"\n @mouseleave=\"onMarkerLeave\"\n >\n {{ marker.number }}\n </button>\n\n <!-- Tooltip (below marker) -->\n <Transition name=\"tooltip\">\n <div\n v-if=\"hoveredId === marker.id\"\n class=\"tooltip\"\n >\n <div class=\"tooltip-element\">{{ marker.annotation.elementSelector }}</div>\n <div class=\"tooltip-meta\">\n <span class=\"tooltip-status\" :data-status=\"getStatus(marker.annotation)\">\n {{ getStatusLabel(marker.annotation) }}\n </span>\n <span v-if=\"marker.annotation.thread?.length\" class=\"tooltip-thread\">\n {{ messages.workflow.replyCount(marker.annotation.thread.length) }}\n </span>\n </div>\n <div class=\"tooltip-comment\">{{ truncate(marker.annotation.comment) }}</div>\n <div class=\"tooltip-hint\">{{ messages.marker.clickToEdit }}</div>\n </div>\n </Transition>\n </div>\n </TransitionGroup>\n </div>\n</template>\n\n<style scoped>\n@keyframes markerIn {\n 0% { opacity: 0; transform: translate(-50%, -50%) scale(0.3); }\n 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }\n}\n\n@keyframes markerOut {\n 0% { opacity: 1; transform: translate(-50%, -50%) scale(1); }\n 100% { opacity: 0; transform: translate(-50%, -50%) scale(0.3); }\n}\n\n.marker-layer {\n position: fixed;\n inset: 0;\n z-index: 99998;\n pointer-events: none;\n}\n\n.marker-wrapper {\n position: fixed;\n pointer-events: none;\n}\n\n.marker-dot {\n position: absolute;\n transform: translate(-50%, -50%) scale(1);\n width: 22px;\n height: 22px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border: none;\n border-radius: 50%;\n color: white;\n font-size: 11px;\n font-weight: 600;\n line-height: 1;\n box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2), inset 0 0 0 1px rgba(0, 0, 0, 0.04);\n cursor: pointer;\n pointer-events: auto;\n user-select: none;\n will-change: transform, background-color;\n z-index: 1;\n transition: background-color 0.15s ease, transform 0.1s ease;\n}\n\n.marker-dot:hover {\n transform: translate(-50%, -50%) scale(1.1);\n z-index: 2;\n}\n\n.marker-dot.hovered {\n background-color: #ff3b30;\n}\n\n/* Marker enter/exit animations */\n.marker-enter-active {\n animation: markerIn 0.25s cubic-bezier(0.22, 1, 0.36, 1) both;\n}\n.marker-leave-active {\n animation: markerOut 0.2s ease-out both;\n pointer-events: none;\n}\n\n/* Tooltip — positioned below marker */\n.tooltip {\n position: absolute;\n top: calc(50% + 18px);\n left: 50%;\n /* Counter-scale: 1/1.1 ≈ 0.909 to offset parent hover scale */\n transform: translateX(-50%) scale(0.909);\n z-index: 100002;\n background: #1a1a1a;\n padding: 8px 12px;\n border-radius: 12px;\n font-family: system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif;\n font-weight: 400;\n color: #fff;\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.08);\n min-width: 120px;\n max-width: 200px;\n pointer-events: none;\n cursor: default;\n white-space: nowrap;\n overflow: hidden;\n}\n\n.tooltip-enter-active {\n transition: opacity 0.1s ease-out, transform 0.1s ease-out;\n}\n.tooltip-leave-active {\n transition: opacity 0.08s ease-in;\n}\n.tooltip-enter-from {\n opacity: 0;\n transform: translateX(-50%) translateY(2px) scale(0.891);\n}\n.tooltip-leave-to {\n opacity: 0;\n}\n\n.tooltip-element {\n font-size: 12px;\n font-style: italic;\n color: rgba(255, 255, 255, 0.6);\n margin-bottom: 4px;\n line-height: 1.4;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.tooltip-comment {\n font-size: 13px;\n line-height: 1.4;\n color: #fff;\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 2px;\n}\n\n.tooltip-meta {\n display: flex;\n align-items: center;\n gap: 6px;\n margin-bottom: 4px;\n font-size: 10px;\n}\n\n.tooltip-status {\n display: inline-flex;\n align-items: center;\n padding: 2px 6px;\n border-radius: 999px;\n font-weight: 600;\n background: rgba(148, 163, 184, 0.18);\n color: #cbd5e1;\n}\n\n.tooltip-status[data-status=\"pending\"] {\n background: rgba(59, 130, 246, 0.16);\n color: #93c5fd;\n}\n\n.tooltip-status[data-status=\"acknowledged\"] {\n background: rgba(14, 165, 233, 0.16);\n color: #67e8f9;\n}\n\n.tooltip-status[data-status=\"resolved\"] {\n background: rgba(34, 197, 94, 0.16);\n color: #86efac;\n}\n\n.tooltip-thread {\n color: rgba(255, 255, 255, 0.48);\n}\n\n.tooltip-hint {\n font-size: 10px;\n color: rgba(255, 255, 255, 0.5);\n margin-top: 6px;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .marker-dot { transition: none; }\n .marker-enter-active,\n .marker-leave-active { animation: none; }\n .tooltip-enter-active,\n .tooltip-leave-active { transition: none; }\n}\n</style>\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\n/** @deprecated Use Vue's built-in `watch` instead. This function will be removed in future version. */\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 Vue's built-in `watch` instead. This function will be removed in future version. */\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(watchPausable(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(watchPausable(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, promiseTimeout, provideLocal, pxValue, syncRef, throttleFilter, timestamp, toArray, toRef, toRefs, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useDebounceFn, useIntervalFn, useThrottleFn, useTimeoutFn, watchIgnorable, watchImmediate, watchOnce, watchPausable, 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 = null, window: window$1 = defaultWindow, once = false } = options;\n\tconst isActive = shallowRef(false);\n\tconst intervalLimit = computed(() => {\n\t\tconst limit = toValue(fpsLimit);\n\t\treturn limit ? 1e3 / limit : 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\treturn 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}\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 } = watchPausable(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\nfunction getDefaultScheduler$8(options) {\n\tif (\"interval\" in options || \"immediate\" in options) {\n\t\tconst { interval = 1e3, immediate = false } = options;\n\t\treturn (cb) => useIntervalFn(cb, interval, { immediate });\n\t}\n\treturn (cb) => useIntervalFn(cb, 1e3, { immediate: false });\n}\n/**\n* Reactive countdown timer in seconds.\n*\n* @param initialCountdown\n* @param options\n*\n* @see https://vueuse.org/useCountdown\n*/\nfunction useCountdown(initialCountdown, options = {}) {\n\tconst remaining = shallowRef(toValue(initialCountdown));\n\tconst { scheduler = getDefaultScheduler$8(options), onTick, onComplete } = options;\n\tconst controls = scheduler(() => {\n\t\tconst value = remaining.value - 1;\n\t\tremaining.value = value < 0 ? 0 : value;\n\t\tonTick === null || onTick === void 0 || onTick();\n\t\tif (remaining.value <= 0) {\n\t\t\tcontrols.pause();\n\t\t\tonComplete === null || onComplete === void 0 || onComplete();\n\t\t}\n\t});\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\tcontrols.pause();\n\t\treset();\n\t};\n\tconst resume = () => {\n\t\tif (!controls.isActive.value) {\n\t\t\tif (remaining.value > 0) controls.resume();\n\t\t}\n\t};\n\tconst start = (countdown) => {\n\t\treset(countdown);\n\t\tcontrols.resume();\n\t};\n\treturn {\n\t\tremaining,\n\t\treset,\n\t\tstop,\n\t\tstart,\n\t\tpause: controls.pause,\n\t\tresume,\n\t\tisActive: controls.isActive\n\t};\n}\n\n//#endregion\n//#region useCssSupports/index.ts\nfunction useCssSupports(...args) {\n\tlet options = {};\n\tif (typeof toValue(args.at(-1)) === \"object\") options = args.pop();\n\tconst [prop, value] = args;\n\tconst { window: window$1 = defaultWindow, ssrValue = false } = options;\n\tconst isMounted = useMounted();\n\treturn { isSupported: computed(() => {\n\t\tisMounted.value;\n\t\tif (!isClient) return ssrValue;\n\t\treturn args.length === 2 ? window$1 === null || window$1 === void 0 ? void 0 : window$1.CSS.supports(toValue(prop), toValue(value)) : window$1 === null || window$1 === void 0 ? void 0 : window$1.CSS.supports(toValue(prop));\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\nconst defaultScrollConfig = {\n\tspeed: 2,\n\tmargin: 30,\n\tdirection: \"both\"\n};\nfunction clampContainerScroll(container) {\n\tif (container.scrollLeft > container.scrollWidth - container.clientWidth) container.scrollLeft = Math.max(0, container.scrollWidth - container.clientWidth);\n\tif (container.scrollTop > container.scrollHeight - container.clientHeight) container.scrollTop = Math.max(0, container.scrollHeight - container.clientHeight);\n}\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, _toValue2, _toValue3, _scrollConfig$directi;\n\tconst { pointerTypes, preventDefault: preventDefault$1, stopPropagation, exact, onMove, onEnd, onStart, initialValue, axis = \"both\", draggingElement = defaultWindow, containerElement, handle: draggingHandle = target, buttons = [0], restrictInView, autoScroll = false } = 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 scrollConfig = toValue(autoScroll);\n\tconst scrollSettings = typeof scrollConfig === \"object\" ? {\n\t\tspeed: (_toValue2 = toValue(scrollConfig.speed)) !== null && _toValue2 !== void 0 ? _toValue2 : defaultScrollConfig.speed,\n\t\tmargin: (_toValue3 = toValue(scrollConfig.margin)) !== null && _toValue3 !== void 0 ? _toValue3 : defaultScrollConfig.margin,\n\t\tdirection: (_scrollConfig$directi = scrollConfig.direction) !== null && _scrollConfig$directi !== void 0 ? _scrollConfig$directi : defaultScrollConfig.direction\n\t} : defaultScrollConfig;\n\tconst getScrollAxisValues = (value) => typeof value === \"number\" ? [value, value] : [value.x, value.y];\n\tconst handleAutoScroll = (container, targetRect, position$1) => {\n\t\tconst { clientWidth, clientHeight, scrollLeft, scrollTop, scrollWidth, scrollHeight } = container;\n\t\tconst [marginX, marginY] = getScrollAxisValues(scrollSettings.margin);\n\t\tconst [speedX, speedY] = getScrollAxisValues(scrollSettings.speed);\n\t\tlet deltaX = 0;\n\t\tlet deltaY = 0;\n\t\tif (scrollSettings.direction === \"x\" || scrollSettings.direction === \"both\") {\n\t\t\tif (position$1.x < marginX && scrollLeft > 0) deltaX = -speedX;\n\t\t\telse if (position$1.x + targetRect.width > clientWidth - marginX && scrollLeft < scrollWidth - clientWidth) deltaX = speedX;\n\t\t}\n\t\tif (scrollSettings.direction === \"y\" || scrollSettings.direction === \"both\") {\n\t\t\tif (position$1.y < marginY && scrollTop > 0) deltaY = -speedY;\n\t\t\telse if (position$1.y + targetRect.height > clientHeight - marginY && scrollTop < scrollHeight - clientHeight) deltaY = speedY;\n\t\t}\n\t\tif (deltaX || deltaY) container.scrollBy({\n\t\t\tleft: deltaX,\n\t\t\ttop: deltaY,\n\t\t\tbehavior: \"auto\"\n\t\t});\n\t};\n\tlet autoScrollInterval = null;\n\tconst startAutoScroll = () => {\n\t\tconst container = toValue(containerElement);\n\t\tif (container && !autoScrollInterval) autoScrollInterval = setInterval(() => {\n\t\t\tconst targetRect = toValue(target).getBoundingClientRect();\n\t\t\tconst { x, y } = position.value;\n\t\t\tconst relativePosition = {\n\t\t\t\tx: x - container.scrollLeft,\n\t\t\t\ty: y - container.scrollTop\n\t\t\t};\n\t\t\tif (relativePosition.x >= 0 && relativePosition.y >= 0) {\n\t\t\t\thandleAutoScroll(container, targetRect, relativePosition);\n\t\t\t\trelativePosition.x += container.scrollLeft;\n\t\t\t\trelativePosition.y += container.scrollTop;\n\t\t\t\tposition.value = relativePosition;\n\t\t\t}\n\t\t}, 1e3 / 60);\n\t};\n\tconst stopAutoScroll = () => {\n\t\tif (autoScrollInterval) {\n\t\t\tclearInterval(autoScrollInterval);\n\t\t\tautoScrollInterval = null;\n\t\t}\n\t};\n\tconst isPointerNearEdge = (pointer, container, margin, targetRect) => {\n\t\tconst [marginX, marginY] = typeof margin === \"number\" ? [margin, margin] : [margin.x, margin.y];\n\t\tconst { clientWidth, clientHeight } = container;\n\t\treturn pointer.x < marginX || pointer.x + targetRect.width > clientWidth - marginX || pointer.y < marginY || pointer.y + targetRect.height > clientHeight - marginY;\n\t};\n\tconst checkAutoScroll = () => {\n\t\tif (toValue(options.disabled) || !pressedDelta.value) return;\n\t\tconst container = toValue(containerElement);\n\t\tif (!container) return;\n\t\tconst targetRect = toValue(target).getBoundingClientRect();\n\t\tconst { x, y } = position.value;\n\t\tif (isPointerNearEdge({\n\t\t\tx: x - container.scrollLeft,\n\t\t\ty: y - container.scrollTop\n\t\t}, container, scrollSettings.margin, targetRect)) startAutoScroll();\n\t\telse stopAutoScroll();\n\t};\n\tif (toValue(autoScroll)) watch(position, checkAutoScroll);\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 + (autoScroll ? 0 : container.scrollLeft) : targetRect.left),\n\t\t\ty: e.clientY - (container ? targetRect.top - containerRect.top + (autoScroll ? 0 : 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\tif (container instanceof HTMLElement) clampContainerScroll(container);\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\tif (toValue(autoScroll) && container) {\n\t\t\tif (autoScrollInterval === null) handleAutoScroll(container, targetRect, {\n\t\t\t\tx,\n\t\t\t\ty\n\t\t\t});\n\t\t\tx += container.scrollLeft;\n\t\t\ty += container.scrollTop;\n\t\t}\n\t\tif (container && (restrictInView || autoScroll)) {\n\t\t\tif (axis !== \"y\") {\n\t\t\t\tconst relativeX = x - container.scrollLeft;\n\t\t\t\tif (relativeX < 0) x = container.scrollLeft;\n\t\t\t\telse if (relativeX > container.clientWidth - targetRect.width) x = container.clientWidth - targetRect.width + container.scrollLeft;\n\t\t\t}\n\t\t\tif (axis !== \"x\") {\n\t\t\t\tconst relativeY = y - container.scrollTop;\n\t\t\t\tif (relativeY < 0) y = container.scrollTop;\n\t\t\t\telse if (relativeY > container.clientHeight - targetRect.height) y = container.clientHeight - targetRect.height + container.scrollTop;\n\t\t\t}\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\tif (autoScroll) stopAutoScroll();\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(() => `\n left: ${position.value.x}px;\n top: ${position.value.y}px;\n ${autoScroll ? \"text-wrap: nowrap;\" : \"\"}\n `)\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\nfunction getDefaultScheduler$7(options) {\n\tif (\"interval\" in options || \"immediate\" in options) {\n\t\tconst { interval = \"requestAnimationFrame\", immediate = true } = options;\n\t\treturn interval === \"requestAnimationFrame\" ? (cb) => useRafFn(cb, { immediate }) : (cb) => useIntervalFn(cb, interval, { immediate });\n\t}\n\treturn useRafFn;\n}\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, scheduler = getDefaultScheduler$7(options) } = 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\treturn {\n\t\tisSupported,\n\t\telement,\n\t\t...scheduler(() => {\n\t\t\tvar _document$elementsFro, _document$elementFrom;\n\t\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\t})\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, 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\ttoValue(rootMargin),\n\t\tisActive.value\n\t], ([targets$1, root$1, rootMargin$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: rootMargin$1,\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\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 || promise.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) promise.value = Promise.all([onLoadMore(state), new Promise((resolve) => setTimeout(resolve, interval))]).finally(() => {\n\t\t\tpromise.value = null;\n\t\t\tnextTick(() => checkAndLoad());\n\t\t});\n\t}\n\ttryOnUnmounted(watch(() => [\n\t\tstate.arrivedState[direction],\n\t\tisElementVisible.value,\n\t\tcanLoad.value\n\t], checkAndLoad, {\n\t\timmediate: true,\n\t\tflush: \"post\"\n\t}));\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 = Boolean(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\nfunction getDefaultScheduler$6(options) {\n\tif (\"interval\" in options || \"immediate\" in options || \"immediateCallback\" in options) {\n\t\tconst { interval = 1e3, immediate, immediateCallback } = options;\n\t\treturn (cb) => useIntervalFn(cb, interval, {\n\t\t\timmediate,\n\t\t\timmediateCallback\n\t\t});\n\t}\n\treturn useIntervalFn;\n}\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 { scheduler = getDefaultScheduler$6 } = options;\n\t\tscheduler(() => {\n\t\t\tmemory.value = performance.memory;\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\nfunction getDefaultScheduler$5(options) {\n\tif (\"interval\" in options || \"immediate\" in options) {\n\t\tconst { interval = \"requestAnimationFrame\", immediate = true } = options;\n\t\treturn interval === \"requestAnimationFrame\" ? (fn) => useRafFn(fn, { immediate }) : (fn) => useIntervalFn(fn, interval, options);\n\t}\n\treturn useRafFn;\n}\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, scheduler = getDefaultScheduler$5(options) } = options;\n\tconst now = ref(/* @__PURE__ */ new Date());\n\tconst update = () => now.value = /* @__PURE__ */ new Date();\n\tconst controls = scheduler(update);\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}\nfunction getDefaultScheduler$4(options) {\n\tif (\"updateInterval\" in options) {\n\t\tconst { updateInterval = 3e4 } = options;\n\t\treturn (cb) => useIntervalFn(cb, updateInterval);\n\t}\n\treturn (cb) => useIntervalFn(cb, 3e4);\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, scheduler = getDefaultScheduler$4(options) } = options;\n\tconst { now,...controls } = useNow({\n\t\tscheduler,\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 getDefaultScheduler$3(options) {\n\tif (\"updateInterval\" in options) {\n\t\tconst { updateInterval = 3e4 } = options;\n\t\treturn (cb) => useIntervalFn(cb, updateInterval);\n\t}\n\treturn (cb) => useIntervalFn(cb, 3e4);\n}\nfunction useTimeAgoIntl(time, options = {}) {\n\tconst { controls: exposeControls = false, scheduler = getDefaultScheduler$3(options) } = options;\n\tconst { now,...controls } = useNow({\n\t\tscheduler,\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 getDefaultScheduler$2(options) {\n\tif (\"interval\" in options || \"immediate\" in options) {\n\t\tconst { interval = \"requestAnimationFrame\", immediate = true } = options;\n\t\treturn interval === \"requestAnimationFrame\" ? (cb) => useRafFn(cb, { immediate }) : (cb) => useIntervalFn(cb, interval, { immediate });\n\t}\n\treturn useRafFn;\n}\nfunction useTimestamp(options = {}) {\n\tconst { controls: exposeControls = false, offset = 0, scheduler = getDefaultScheduler$2(options), callback } = options;\n\tconst ts = shallowRef(timestamp() + offset);\n\tconst update = () => ts.value = timestamp() + offset;\n\tconst controls = scheduler(callback ? () => {\n\t\tupdate();\n\t\tcallback(ts.value);\n\t} : update);\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 } = watchPausable(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\nfunction getDefaultScheduler$1(options = { interval: 0 }) {\n\tconst { interval } = options;\n\tif (interval === 0) return;\n\treturn (fn) => useIntervalFn(fn, interval, {\n\t\timmediate: false,\n\t\timmediateCallback: false\n\t});\n}\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 = [], scheduler = getDefaultScheduler$1(options), navigator: navigator$1 = defaultNavigator } = options || {};\n\tconst isSupported = /* @__PURE__ */ useSupported(() => typeof navigator$1 !== \"undefined\" && \"vibrate\" in navigator$1);\n\tconst patternRef = toRef(pattern);\n\tconst vibrate = (pattern$1 = patternRef.value) => {\n\t\tif (isSupported.value) navigator$1.vibrate(pattern$1);\n\t};\n\tconst intervalControls = scheduler === null || scheduler === void 0 ? void 0 : scheduler(vibrate);\n\tconst stop = () => {\n\t\tif (isSupported.value) navigator$1.vibrate(0);\n\t\tintervalControls === null || intervalControls === void 0 || intervalControls.pause();\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}\nfunction getDefaultScheduler(options) {\n\tif (\"interval\" in options) {\n\t\tconst { interval = 1e3 } = options;\n\t\treturn (cb) => useIntervalFn(cb, interval, { immediate: false });\n\t}\n\treturn (cb) => useIntervalFn(cb, 1e3, { immediate: false });\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, scheduler = getDefaultScheduler(resolveNestedOptions(options.heartbeat)), pongTimeout = 1e3 } = resolveNestedOptions(options.heartbeat);\n\t\tconst { pause, resume } = scheduler(() => {\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});\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, useCssSupports, 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 { useDraggable } from \"@vueuse/core\"\nimport {\n computed,\n onMounted,\n onUnmounted,\n ref,\n shallowRef,\n type ComputedRef,\n type CSSProperties,\n type Ref,\n} from \"vue\"\n\n// ---------------------------------------------------------------------------\n// Types\n// ---------------------------------------------------------------------------\n\nconst STORAGE_KEY = \"agentation-vue-toolbar-position\"\nconst POSITION_SANITY_MULTIPLIER = 3\nconst POSITION_SANITY_MIN_LIMIT = 5000\n\nexport interface ToolbarPosition {\n x: number\n y: number\n}\n\nexport interface ToolbarDragState {\n readonly position: Readonly<Ref<ToolbarPosition | null>>\n readonly isDragging: Readonly<Ref<boolean>>\n readonly justFinishedDrag: Readonly<Ref<boolean>>\n readonly toolbarStyle: ComputedRef<CSSProperties | undefined>\n bindToolbarRef(element: HTMLElement | null): void\n onMouseDown(event: MouseEvent): void\n consumeJustFinishedDrag(): boolean\n syncConstraints(): void\n}\n\n// ---------------------------------------------------------------------------\n// Composable\n// ---------------------------------------------------------------------------\n\n/**\n * Drag composable for the toolbar, powered by @vueuse/core `useDraggable`.\n *\n * Fully reactive — VueUse's `x`/`y` refs are the single source of truth\n * for position. `toolbarStyle` derives from them so Vue's `:style` binding\n * and the drag position are always in sync. No direct DOM writes needed.\n */\nexport function useToolbarDrag(options: {\n padding?: number\n toolbarHeight?: number\n dragThreshold?: number\n} = {}): ToolbarDragState {\n const padding = options.padding ?? 20\n const toolbarHeight = options.toolbarHeight ?? 44\n const dragThreshold = options.dragThreshold ?? 5\n\n // --- Element ref for useDraggable ----------------------------------------\n const toolbarEl = shallowRef<HTMLElement | null>(null)\n\n // --- Whether a position has been set (saved or dragged) ------------------\n // When false, toolbar uses its default CSS position (right/bottom).\n const hasPosition = ref(false)\n\n // --- Drag state ----------------------------------------------------------\n const isDragging = ref(false)\n const justFinishedDrag = ref(false)\n\n interface DragSession {\n pointerX: number\n pointerY: number\n startX: number\n startY: number\n }\n let session: DragSession | null = null\n let cachedWrapperWidth = 297\n let cachedContentWidth = 44\n\n function updateMeasurements(): void {\n const el = toolbarEl.value\n if (!el) return\n\n cachedWrapperWidth = el.offsetWidth || cachedWrapperWidth\n\n const content = el.querySelector<HTMLElement>(\".toolbar-container\")\n if (content) {\n cachedContentWidth = content.offsetWidth || cachedContentWidth\n }\n }\n\n // --- Viewport constraint -------------------------------------------------\n function constrain(pos: ToolbarPosition): ToolbarPosition {\n if (typeof window === \"undefined\") return pos\n const rawOffset = cachedWrapperWidth - cachedContentWidth\n const maxReasonableOffset = window.innerWidth + padding\n const contentOffset = Math.max(0, Math.min(rawOffset, maxReasonableOffset))\n const minX = padding - contentOffset\n const maxX = window.innerWidth - cachedWrapperWidth - padding\n const maxY = window.innerHeight - toolbarHeight - padding\n return {\n x: Math.max(minX, Math.min(Math.max(minX, maxX), pos.x)),\n y: Math.max(padding, Math.min(Math.max(padding, maxY), pos.y)),\n }\n }\n\n // --- Interaction locking -------------------------------------------------\n const DRAG_CLASS = \"agentation-dragging\"\n\n function lockInteraction(): void {\n document.documentElement.classList.add(DRAG_CLASS)\n }\n\n function unlockInteraction(): void {\n document.documentElement.classList.remove(DRAG_CLASS)\n }\n\n // --- Hit-test filter (ignore interactive children) -----------------------\n function isIgnoredTarget(target: EventTarget | null): boolean {\n return target instanceof Element\n && Boolean(target.closest(\"button, input, textarea, select, [data-no-drag]\"))\n }\n\n // --- Load saved position for initialValue --------------------------------\n const saved = loadPosition()\n if (saved) hasPosition.value = true\n const initialPos = saved\n ? (typeof window !== \"undefined\" ? constrain(saved) : saved)\n : { x: 0, y: 0 }\n\n // --- useDraggable (pointer event lifecycle) ------------------------------\n const { x, y } = useDraggable(toolbarEl, {\n initialValue: initialPos,\n preventDefault: true,\n\n onStart(_pos, event) {\n if (event.pointerType === \"mouse\" && event.button !== 0) return false\n if (isIgnoredTarget(event.target)) return false\n\n const el = toolbarEl.value\n if (!el) return false\n\n updateMeasurements()\n justFinishedDrag.value = false\n\n // First drag with no saved position: adopt current CSS position\n if (!hasPosition.value) {\n const rect = el.getBoundingClientRect()\n x.value = rect.left\n y.value = rect.top\n hasPosition.value = true\n }\n\n session = {\n pointerX: event.clientX,\n pointerY: event.clientY,\n startX: x.value,\n startY: y.value,\n }\n },\n\n onMove(dragPos, event) {\n if (!session) return\n\n // Enforce drag threshold before committing to drag mode\n if (!isDragging.value) {\n const dx = event.clientX - session.pointerX\n const dy = event.clientY - session.pointerY\n if (dx * dx + dy * dy <= dragThreshold * dragThreshold) {\n // Snap back to start (undo VueUse's premature position update)\n x.value = session.startX\n y.value = session.startY\n return\n }\n isDragging.value = true\n lockInteraction()\n }\n\n // Apply viewport constraint\n const constrained = constrain(dragPos)\n x.value = constrained.x\n y.value = constrained.y\n },\n\n onEnd() {\n if (session && isDragging.value) {\n savePosition({ x: x.value, y: y.value })\n justFinishedDrag.value = true\n unlockInteraction()\n }\n isDragging.value = false\n session = null\n },\n })\n\n // --- Derived state -------------------------------------------------------\n\n const position = computed<ToolbarPosition | null>(() => {\n if (!hasPosition.value) return null\n return { x: x.value, y: y.value }\n })\n\n const toolbarStyle = computed<CSSProperties | undefined>(() => {\n if (!hasPosition.value) return undefined\n return {\n left: `${x.value}px`,\n top: `${y.value}px`,\n right: \"auto\",\n bottom: \"auto\",\n }\n })\n\n // --- Window blur handler (abort drag cleanly) ----------------------------\n function onWindowBlur(): void {\n if (session && isDragging.value) {\n savePosition({ x: x.value, y: y.value })\n justFinishedDrag.value = true\n unlockInteraction()\n }\n isDragging.value = false\n session = null\n }\n\n // --- Resize handler (re-constrain saved position) ------------------------\n function onResize(): void {\n updateMeasurements()\n if (isDragging.value || !hasPosition.value) return\n const constrained = constrain({ x: x.value, y: y.value })\n x.value = constrained.x\n y.value = constrained.y\n savePosition(constrained)\n }\n\n function syncConstraints(): void {\n updateMeasurements()\n if (!hasPosition.value) return\n const constrained = constrain({ x: x.value, y: y.value })\n x.value = constrained.x\n y.value = constrained.y\n savePosition(constrained)\n }\n\n let postMountTimer: number | null = null\n let postMountRaf: number | null = null\n\n function schedulePostMountSync(): void {\n if (typeof window === \"undefined\") return\n postMountRaf = window.requestAnimationFrame(() => {\n syncConstraints()\n postMountTimer = window.setTimeout(() => {\n syncConstraints()\n postMountTimer = null\n }, 120)\n postMountRaf = null\n })\n }\n\n // --- Public API ----------------------------------------------------------\n\n function bindToolbarRef(element: HTMLElement | null): void {\n if (toolbarEl.value === element) return\n toolbarEl.value = element\n updateMeasurements()\n }\n\n /** Noop — retained for API compatibility. Drag is now handled by useDraggable. */\n function onMouseDown(_event: MouseEvent): void {}\n\n function consumeJustFinishedDrag(): boolean {\n const v = justFinishedDrag.value\n justFinishedDrag.value = false\n return v\n }\n\n // --- Lifecycle -----------------------------------------------------------\n\n onMounted(() => {\n // Re-constrain on mount (window size may differ from when position was saved)\n updateMeasurements()\n if (hasPosition.value) {\n const constrained = constrain({ x: x.value, y: y.value })\n x.value = constrained.x\n y.value = constrained.y\n savePosition(constrained)\n }\n\n schedulePostMountSync()\n\n window.addEventListener(\"resize\", onResize)\n window.addEventListener(\"blur\", onWindowBlur)\n })\n\n onUnmounted(() => {\n if (isDragging.value) unlockInteraction()\n isDragging.value = false\n session = null\n if (postMountTimer != null) {\n window.clearTimeout(postMountTimer)\n postMountTimer = null\n }\n if (postMountRaf != null) {\n window.cancelAnimationFrame(postMountRaf)\n postMountRaf = null\n }\n window.removeEventListener(\"resize\", onResize)\n window.removeEventListener(\"blur\", onWindowBlur)\n })\n\n return {\n position,\n isDragging,\n justFinishedDrag,\n toolbarStyle,\n bindToolbarRef,\n onMouseDown,\n consumeJustFinishedDrag,\n syncConstraints,\n }\n}\n\n// ---------------------------------------------------------------------------\n// localStorage helpers\n// ---------------------------------------------------------------------------\n\nfunction loadPosition(): ToolbarPosition | null {\n if (typeof window === \"undefined\") return null\n try {\n const raw = window.localStorage.getItem(STORAGE_KEY)\n if (!raw) return null\n const parsed = JSON.parse(raw) as Partial<ToolbarPosition>\n if (typeof parsed.x !== \"number\" || typeof parsed.y !== \"number\") return null\n if (!Number.isFinite(parsed.x) || !Number.isFinite(parsed.y)) return null\n\n const limitX = Math.max(window.innerWidth * POSITION_SANITY_MULTIPLIER, POSITION_SANITY_MIN_LIMIT)\n const limitY = Math.max(window.innerHeight * POSITION_SANITY_MULTIPLIER, POSITION_SANITY_MIN_LIMIT)\n if (Math.abs(parsed.x) > limitX || Math.abs(parsed.y) > limitY) {\n window.localStorage.removeItem(STORAGE_KEY)\n return null\n }\n\n return { x: parsed.x, y: parsed.y }\n } catch {\n return null\n }\n}\n\nfunction savePosition(pos: ToolbarPosition): void {\n if (typeof window === \"undefined\") return\n try {\n window.localStorage.setItem(STORAGE_KEY, JSON.stringify(pos))\n } catch {\n // silent\n }\n}\n","<script setup lang=\"ts\">\nimport { ref, onBeforeUnmount } from \"vue\"\nimport { originalSetTimeout } from \"../composables/useFreezeState.js\"\n\ndefineProps<{\n content: string\n}>()\n\nconst visible = ref(false)\nconst position = ref({ top: 0, left: 0 })\nconst triggerRef = ref<HTMLElement | null>(null)\n\nlet hoverTimer: ReturnType<typeof setTimeout> | null = null\n\nfunction onMouseEnter(e: MouseEvent): void {\n const trigger = (e.currentTarget as HTMLElement)?.firstElementChild as HTMLElement | null\n triggerRef.value = trigger\n hoverTimer = originalSetTimeout(() => {\n if (!triggerRef.value) return\n const rect = triggerRef.value.getBoundingClientRect()\n position.value = {\n top: rect.top + rect.height / 2,\n left: rect.left - 8,\n }\n visible.value = true\n }, 500)\n}\n\nfunction onMouseLeave(): void {\n if (hoverTimer) {\n clearTimeout(hoverTimer)\n hoverTimer = null\n }\n visible.value = false\n triggerRef.value = null\n}\n\nonBeforeUnmount(() => {\n if (hoverTimer) {\n clearTimeout(hoverTimer)\n }\n})\n</script>\n\n<template>\n <span\n class=\"ag-tooltip-trigger\"\n @mouseenter=\"onMouseEnter\"\n @mouseleave=\"onMouseLeave\"\n >\n <slot />\n <Teleport to=\"body\">\n <Transition name=\"ag-tooltip\">\n <div\n v-if=\"visible\"\n data-feedback-toolbar\n :style=\"{\n position: 'fixed',\n top: `${position.top}px`,\n left: `${position.left}px`,\n transform: 'translate(-100%, -50%)',\n zIndex: 100010,\n maxWidth: '180px',\n padding: '6px 10px',\n borderRadius: '8px',\n background: '#383838',\n color: 'rgba(255, 255, 255, 0.9)',\n fontSize: '11px',\n lineHeight: '1.4',\n fontFamily: 'system-ui, -apple-system, sans-serif',\n fontWeight: '400',\n letterSpacing: '-0.01em',\n boxShadow: '0 4px 12px rgba(0, 0, 0, 0.3)',\n pointerEvents: 'none',\n whiteSpace: 'normal',\n }\"\n >\n {{ content }}\n </div>\n </Transition>\n </Teleport>\n </span>\n</template>\n\n<style scoped>\n.ag-tooltip-trigger {\n display: inline-flex;\n align-items: center;\n}\n\n.ag-tooltip-enter-active {\n transition: opacity 0.15s ease;\n}\n\n.ag-tooltip-leave-active {\n transition: opacity 0.1s ease;\n}\n\n.ag-tooltip-enter-from,\n.ag-tooltip-leave-to {\n opacity: 0;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { computed, nextTick, onMounted, onUnmounted, ref, watch, type ComponentPublicInstance, type CSSProperties } from \"vue\"\nimport { ANNOTATIONS_STORE_KEY, FREEZE_KEY, I18N_KEY, OVERLAY_KEY, RUNTIME_BRIDGE_KEY, SELECTION_KEY, SETTINGS_KEY } from \"../injection-keys.js\"\nimport { COPY_EXCLUDE_FIELDS } from \"../copy-fields.js\"\nimport { COLOR_OPTIONS } from \"../composables/useSettings.js\"\nimport { originalSetTimeout } from \"../composables/useFreezeState.js\"\nimport { useToolbarDrag } from \"../composables/useToolbarDrag.js\"\nimport { SUPPORTED_LOCALES, LOCALE_LABELS } from \"../i18n/index.js\"\nimport { injectStrict } from \"../utils.js\"\nimport type { ExportActions } from \"../composables/useExport.js\"\nimport {\n IconChevronLeft,\n IconChevronRight,\n IconCheckSmallAnimated,\n IconConnectedNodes,\n IconCopyAnimated,\n IconEye,\n IconEyeOff,\n IconGear,\n IconHelp,\n IconJson,\n IconListSparkle,\n IconMarkdown,\n IconMoon,\n IconPause,\n IconPlay,\n IconSun,\n IconTrashAlt,\n IconXmarkLarge,\n} from \"./icons.js\"\nimport AgTooltip from \"./AgTooltip.vue\"\n\nconst OUTPUT_DETAIL_KEYS = [\"compact\", \"standard\", \"detailed\", \"forensic\"] as const\nconst SETTINGS_PAGE_KEYS = [\"main\", \"copy\", \"automations\"] as const\nconst HELP_ICON_SIZE = 16\nconst SETTINGS_PANEL_MAX_HEIGHT = 520\n\ntype SettingsPage = typeof SETTINGS_PAGE_KEYS[number]\n\nconst props = defineProps<{\n exportActions: ExportActions\n}>()\n\nconst store = injectStrict(ANNOTATIONS_STORE_KEY, \"annotations store\")\nconst selection = injectStrict(SELECTION_KEY, \"selection state\")\nconst overlay = injectStrict(OVERLAY_KEY, \"overlay state\")\nconst settings = injectStrict(SETTINGS_KEY, \"settings state\")\nconst i18n = injectStrict(I18N_KEY, \"i18n state\")\nconst freezeState = injectStrict(FREEZE_KEY, \"freeze state\")\nconst bridge = injectStrict(RUNTIME_BRIDGE_KEY, \"runtime bridge\")\n\nconst toolbarRef = ref<HTMLElement | null>(null)\nconst mainSettingsPageRef = ref<HTMLElement | null>(null)\nconst copySettingsPageRef = ref<HTMLElement | null>(null)\nconst automationsSettingsPageRef = ref<HTMLElement | null>(null)\nconst expanded = ref(false)\nconst settingsOpen = ref(false)\nconst settingsPage = ref<SettingsPage>(\"main\")\nconst settingsPagesHeight = ref<number | null>(null)\nconst guideCopyFeedback = ref<string | null>(null)\nconst showEntranceAnimation = ref(false)\nconst drag = useToolbarDrag({})\n\nconst count = computed(() => store.annotations.length)\nconst hasAnnotations = computed(() => count.value > 0)\nconst isLight = computed(() => !settings.darkMode)\nconst isFrozen = computed(() => freezeState.isFrozen.value)\nconst copyFormat = computed(() => settings.copyFormat)\nconst isMarkdownFormat = computed(() => copyFormat.value === \"markdown\")\nconst copyFeedbackActive = computed(() => props.exportActions.copyFeedback === copyFormat.value)\nconst showMarkers = computed(() => settings.showMarkers)\nconst panelOpen = computed(() => settingsOpen.value)\nconst messages = computed(() => i18n.messages)\nconst settingsPageIndex = computed(() => SETTINGS_PAGE_KEYS.indexOf(settingsPage.value))\nconst settingsPagesStyle = computed<CSSProperties>(() => {\n const pageCount = SETTINGS_PAGE_KEYS.length\n return {\n \"--ag-settings-page-count\": String(pageCount),\n width: `${pageCount * 100}%`,\n transform: `translateX(-${(settingsPageIndex.value * 100) / pageCount}%)`,\n ...(settingsPagesHeight.value === null ? {} : { height: `${settingsPagesHeight.value}px` }),\n } as CSSProperties\n})\nconst currentOutputDetailLabel = computed(() => messages.value.outputDetail[settings.outputDetail])\nconst settingsPanelPlacement = computed(\n () => (drag.position.value?.y ?? Number.POSITIVE_INFINITY) < 230 ? \"below\" : \"above\",\n)\nconst mcpConnected = computed(() => !!bridge.sync)\nconst syncInfo = computed(() => bridge.sync?.info)\nconst apiEndpoint = computed(() => syncInfo.value?.endpoint ?? \"http://localhost:4747\")\nconst mcpHttpEndpoint = computed(() => syncInfo.value?.mcpHttpUrl ?? \"http://localhost:4748/mcp\")\nconst mcpSseEndpoint = computed(() => syncInfo.value?.mcpSseUrl ?? \"http://localhost:4748/sse\")\nconst cliCommand = computed(() => {\n const apiPort = extractPort(apiEndpoint.value) ?? 4747\n const mcpPort = extractPort(syncInfo.value?.mcpEndpoint ?? \"\") ?? 4748\n return `npx agentation-vue-mcp server --port ${apiPort} --mcp-port ${mcpPort}`\n})\nconst claudeCommand = computed(() => {\n const apiPort = extractPort(apiEndpoint.value) ?? 4747\n const mcpPort = extractPort(syncInfo.value?.mcpEndpoint ?? \"\") ?? 4748\n return `claude mcp add agentation -- npx agentation-vue-mcp server --port ${apiPort} --mcp-port ${mcpPort}`\n})\nconst webhookTargets = computed(() => (\n settings.webhooksEnabled\n ? settings.webhookUrl\n .split(/[\\n,]/)\n .map((item) => item.trim())\n .filter(Boolean)\n : []\n))\nconst webhookEnv = computed(() => {\n if (webhookTargets.value.length === 1) {\n return `AGENTATION_WEBHOOK_URL=${webhookTargets.value[0]}`\n }\n\n if (webhookTargets.value.length > 1) {\n return `AGENTATION_WEBHOOKS=${webhookTargets.value.join(\",\")}`\n }\n\n return \"AGENTATION_WEBHOOK_URL=https://example.com/webhook\\nAGENTATION_WEBHOOKS=https://a.example/webhook,https://b.example/webhook\"\n})\nconst connectionCards = computed(() => [\n { key: \"mcp-http\", label: messages.value.settings.mcpHttpEndpointLabel, value: mcpHttpEndpoint.value },\n { key: \"mcp-sse\", label: messages.value.settings.mcpSseEndpointLabel, value: mcpSseEndpoint.value },\n])\nconst integrationCards = computed(() => [\n { key: \"cli-command\", label: messages.value.settings.cliCommandLabel, value: cliCommand.value },\n { key: \"claude-command\", label: messages.value.settings.claudeCommandLabel, value: claudeCommand.value },\n { key: \"cursor-endpoint\", label: messages.value.settings.cursorEndpointLabel, value: mcpHttpEndpoint.value },\n { key: \"codex-endpoint\", label: messages.value.settings.codexEndpointLabel, value: mcpSseEndpoint.value },\n])\n\n// Sync toolbar expanded state → annotation mode.\n// Collapsing disables selection; expanding re-enables it.\n// `immediate` ensures store.enabled = false on startup (expanded starts false).\nwatch(expanded, async (isExpanded) => {\n if (!isExpanded) {\n closeSettingsPanel()\n selection.clearHovered()\n selection.clearSelection()\n overlay.hidePopover()\n }\n store.enabled = isExpanded\n await nextTick()\n drag.syncConstraints()\n}, { immediate: true })\n\nlet entranceTimer: ReturnType<typeof setTimeout> | null = null\nlet guideCopyTimer: ReturnType<typeof setTimeout> | null = null\n\nonMounted(() => {\n document.addEventListener(\"pointerdown\", onOutsideClick, true)\n window.addEventListener(\"resize\", syncSettingsPanelHeight)\n showEntranceAnimation.value = true\n entranceTimer = originalSetTimeout(() => {\n showEntranceAnimation.value = false\n entranceTimer = null\n }, 760)\n})\n\nonUnmounted(() => {\n document.removeEventListener(\"pointerdown\", onOutsideClick, true)\n window.removeEventListener(\"resize\", syncSettingsPanelHeight)\n if (entranceTimer) window.clearTimeout(entranceTimer)\n if (guideCopyTimer) window.clearTimeout(guideCopyTimer)\n})\n\nfunction onOutsideClick(e: PointerEvent): void {\n if (!panelOpen.value) return\n if (isEventInsideToolbar(e)) return\n closeSettingsPanel()\n}\n\nfunction setToolbarRef(element: Element | ComponentPublicInstance | null): void {\n const el = element instanceof HTMLElement ? element : null\n toolbarRef.value = el\n drag.bindToolbarRef(el)\n}\n\nfunction isEventInsideToolbar(event: Event): boolean {\n const toolbar = toolbarRef.value\n if (!toolbar) return false\n\n const path = typeof event.composedPath === \"function\" ? event.composedPath() : []\n if (path.length > 0) {\n return path.some((entry) => entry instanceof Node && toolbar.contains(entry))\n }\n\n return event.target instanceof Node && toolbar.contains(event.target)\n}\n\n// --- Actions ---\n\nfunction handleClick(): void {\n if (expanded.value) return\n if (drag.consumeJustFinishedDrag()) return\n expanded.value = true\n}\n\nfunction close(): void {\n closeSettingsPanel()\n expanded.value = false\n if (isFrozen.value) {\n freezeState.toggleFreeze()\n }\n}\n\nfunction toggleFreeze(): void {\n freezeState.toggleFreeze()\n}\n\nfunction toggleMarkers(): void {\n settings.showMarkers = !showMarkers.value\n}\n\nfunction closeSettingsPanel(): void {\n settingsOpen.value = false\n settingsPage.value = \"main\"\n}\n\nfunction toggleSettingsPanel(): void {\n if (settingsOpen.value) {\n closeSettingsPanel()\n return\n }\n settingsPage.value = \"main\"\n settingsOpen.value = true\n}\n\nfunction openAutomationsPanel(): void {\n settingsOpen.value = true\n settingsPage.value = \"automations\"\n}\n\nfunction openCopySettingsPanel(): void {\n settingsOpen.value = true\n settingsPage.value = \"copy\"\n}\n\nfunction showMainSettings(): void {\n settingsPage.value = \"main\"\n}\n\nfunction toggleCopyExcludedField(field: typeof COPY_EXCLUDE_FIELDS[number]): void {\n settings.copyExcludeFields = settings.copyExcludeFields.includes(field)\n ? settings.copyExcludeFields.filter((item) => item !== field)\n : [...settings.copyExcludeFields, field]\n}\n\nwatch(\n [panelOpen, settingsPage, messages, mcpHttpEndpoint, mcpSseEndpoint, cliCommand, claudeCommand, webhookEnv, () => settings.copyExcludeFields.length],\n async ([isOpen]) => {\n if (!isOpen) {\n settingsPagesHeight.value = null\n return\n }\n await nextTick()\n syncSettingsPanelHeight()\n },\n { flush: \"post\" },\n)\n\nfunction clearAll(): void {\n store.clearAll()\n selection.clearHovered()\n selection.clearSelection()\n overlay.hidePopover()\n}\n\nfunction cycleOutputDetail(): void {\n const idx = OUTPUT_DETAIL_KEYS.findIndex((k) => k === settings.outputDetail)\n settings.outputDetail = OUTPUT_DETAIL_KEYS[(idx + 1) % OUTPUT_DETAIL_KEYS.length]\n}\n\nfunction exportCurrentFormat(): Promise<void> {\n return isMarkdownFormat.value\n ? props.exportActions.exportMarkdown()\n : props.exportActions.exportJSON()\n}\n\nfunction extractPort(input: string): number | null {\n try {\n const url = new URL(input)\n const fallback = url.protocol === \"https:\" ? 443 : 80\n const port = parseInt(url.port || String(fallback), 10)\n return Number.isFinite(port) ? port : null\n } catch {\n return null\n }\n}\n\nasync function copyGuideValue(key: string, value: string): Promise<void> {\n const copied = await writeTextToClipboard(value)\n if (!copied) return\n\n guideCopyFeedback.value = key\n if (guideCopyTimer) {\n window.clearTimeout(guideCopyTimer)\n }\n\n guideCopyTimer = originalSetTimeout(() => {\n if (guideCopyFeedback.value === key) {\n guideCopyFeedback.value = null\n }\n guideCopyTimer = null\n }, 1400)\n}\n\nasync function writeTextToClipboard(text: string): Promise<boolean> {\n if (typeof navigator !== \"undefined\" && navigator.clipboard?.writeText) {\n try {\n await navigator.clipboard.writeText(text)\n return true\n } catch {\n // Fall through to legacy copy.\n }\n }\n\n if (typeof document === \"undefined\") return false\n\n const textarea = document.createElement(\"textarea\")\n textarea.value = text\n textarea.setAttribute(\"readonly\", \"true\")\n textarea.style.position = \"fixed\"\n textarea.style.opacity = \"0\"\n textarea.style.pointerEvents = \"none\"\n document.body.appendChild(textarea)\n textarea.select()\n\n try {\n return document.execCommand(\"copy\")\n } catch {\n return false\n } finally {\n textarea.remove()\n }\n}\n\nfunction syncSettingsPanelHeight(): void {\n if (!panelOpen.value) {\n settingsPagesHeight.value = null\n return\n }\n\n const activePage = settingsPage.value === \"copy\"\n ? copySettingsPageRef.value\n : settingsPage.value === \"automations\"\n ? automationsSettingsPageRef.value\n : mainSettingsPageRef.value\n\n if (!activePage) return\n\n settingsPagesHeight.value = Math.min(activePage.scrollHeight, getMaxSettingsPanelHeight())\n}\n\nfunction getMaxSettingsPanelHeight(): number {\n if (typeof window === \"undefined\") return SETTINGS_PANEL_MAX_HEIGHT\n return Math.min(SETTINGS_PANEL_MAX_HEIGHT, Math.round(window.innerHeight * 0.72))\n}\n</script>\n\n<template>\n <div :ref=\"setToolbarRef\" class=\"toolbar\" :class=\"{ dragging: drag.isDragging.value }\"\n :style=\"drag.toolbarStyle.value\" data-feedback-toolbar>\n <div class=\"toolbar-container\" :class=\"{\n collapsed: !expanded,\n expanded,\n light: isLight,\n dragging: drag.isDragging.value,\n entrance: showEntranceAnimation,\n }\" :role=\"expanded ? undefined : 'button'\" :tabindex=\"expanded ? -1 : 0\" @click=\"handleClick\"\n @keydown.enter.prevent=\"expanded = true\" @keydown.space.prevent=\"expanded = true\">\n <!-- Collapsed: icon + badge -->\n <div class=\"toggle-content\" :class=\"expanded ? 'hidden' : 'visible'\">\n <IconListSparkle :size=\"24\" />\n <span v-if=\"hasAnnotations\" class=\"badge\" :class=\"{ entrance: showEntranceAnimation }\"\n :style=\"{ backgroundColor: settings.annotationColor }\">\n {{ count }}\n </span>\n </div>\n\n <!-- Expanded: controls row -->\n <div class=\"controls-content\" :class=\"expanded ? 'visible' : 'hidden'\">\n <button class=\"control-btn\" :class=\"{ light: isLight }\" type=\"button\"\n :title=\"isFrozen ? messages.toolbar.resume : messages.toolbar.pause\"\n :aria-label=\"isFrozen ? messages.toolbar.resumeAria : messages.toolbar.pauseAria\"\n :data-state=\"isFrozen ? 'paused' : undefined\" @click.stop=\"toggleFreeze\">\n <IconPlay v-if=\"isFrozen\" :size=\"24\" />\n <IconPause v-else :size=\"24\" />\n </button>\n\n <button class=\"control-btn\" :class=\"{ light: isLight }\" type=\"button\"\n :title=\"showMarkers ? messages.toolbar.hideMarkers : messages.toolbar.showMarkers\"\n :aria-label=\"showMarkers ? messages.toolbar.hideMarkersAria : messages.toolbar.showMarkersAria\"\n :data-state=\"showMarkers ? undefined : 'hidden'\" :disabled=\"!hasAnnotations\" @click.stop=\"toggleMarkers\">\n <IconEye v-if=\"showMarkers\" :size=\"24\" />\n <IconEyeOff v-else :size=\"24\" />\n </button>\n\n <button class=\"control-btn\" :class=\"{ light: isLight }\" type=\"button\"\n :title=\"isMarkdownFormat ? messages.toolbar.copyMarkdown : messages.toolbar.copyJson\"\n :aria-label=\"isMarkdownFormat ? messages.toolbar.copyMarkdownAria : messages.toolbar.copyJsonAria\"\n :disabled=\"!hasAnnotations\" :data-active=\"copyFeedbackActive || undefined\"\n @click.stop=\"void exportCurrentFormat()\">\n <IconCopyAnimated :size=\"24\" :copied=\"copyFeedbackActive\" />\n </button>\n\n <button class=\"control-btn\" :class=\"{ light: isLight }\" type=\"button\" :title=\"messages.toolbar.clearAll\"\n :aria-label=\"messages.toolbar.clearAllAria\" :disabled=\"!hasAnnotations\" data-danger @click.stop=\"clearAll\">\n <IconTrashAlt :size=\"18\" />\n </button>\n\n <div class=\"divider\" :class=\"{ light: isLight }\" />\n\n <button class=\"control-btn\" :class=\"{ light: isLight }\" type=\"button\" :title=\"messages.toolbar.settings\"\n :aria-label=\"messages.toolbar.toggleSettingsAria\" :data-active=\"panelOpen || undefined\"\n @click.stop=\"toggleSettingsPanel\">\n <IconGear :size=\"20\" />\n </button>\n\n <button class=\"control-btn\" :class=\"{ light: isLight }\" type=\"button\" :title=\"messages.toolbar.closeToolbar\"\n :aria-label=\"messages.toolbar.closeToolbarAria\" @click.stop=\"close\">\n <IconXmarkLarge :size=\"20\" />\n </button>\n </div>\n\n <!-- Settings / automations panel -->\n <Transition name=\"settings-panel\">\n <div v-if=\"expanded && panelOpen\" class=\"settings-panel\" :class=\"{\n light: isLight,\n below: settingsPanelPlacement === 'below',\n }\" data-no-drag @click.stop>\n <div class=\"settings-pages\" :style=\"settingsPagesStyle\">\n <div ref=\"mainSettingsPageRef\" class=\"settings-page\">\n <div class=\"settings-header\" :class=\"{ light: isLight }\">\n <span class=\"settings-brand\" :class=\"{ light: isLight }\">\n <span class=\"settings-slash\" :style=\"{ color: settings.annotationColor }\">/</span>agentation\n </span>\n <button class=\"theme-toggle\" :class=\"{ light: isLight }\" type=\"button\"\n :title=\"settings.darkMode ? messages.settings.lightMode : messages.settings.darkMode\"\n :aria-label=\"settings.darkMode ? messages.settings.switchToLightAria : messages.settings.switchToDarkAria\"\n @click=\"settings.toggleDarkMode()\">\n <span class=\"theme-icon-wrapper\">\n <Transition name=\"theme-icon\" mode=\"out-in\">\n <span :key=\"settings.darkMode ? 'sun' : 'moon'\" class=\"theme-icon\">\n <IconSun v-if=\"settings.darkMode\" :size=\"16\" />\n <IconMoon v-else :size=\"16\" />\n </span>\n </Transition>\n </span>\n </button>\n </div>\n\n <div class=\"settings-section\">\n <div class=\"settings-row\">\n <span class=\"settings-label\" :class=\"{ light: isLight }\">{{ messages.settings.language }}</span>\n <div class=\"locale-switch\" :class=\"{ light: isLight }\" role=\"group\"\n :aria-label=\"messages.settings.language\">\n <button v-for=\"loc in SUPPORTED_LOCALES\" :key=\"loc\" class=\"locale-btn\"\n :class=\"{ active: settings.locale === loc, light: isLight }\" type=\"button\" :lang=\"loc\"\n :aria-pressed=\"settings.locale === loc\" @click=\"settings.locale = loc\">\n {{ LOCALE_LABELS[loc] }}\n </button>\n </div>\n </div>\n </div>\n\n <div class=\"settings-section\">\n <div class=\"settings-row\">\n <span class=\"settings-label-with-help\">\n <span class=\"settings-label\" :class=\"{ light: isLight }\">{{ messages.settings.outputDetail }}</span>\n <AgTooltip :content=\"messages.settings.outputDetailHelp\">\n <IconHelp :size=\"HELP_ICON_SIZE\"\n :style=\"{ color: isLight ? 'rgba(0,0,0,0.3)' : 'rgba(255,255,255,0.3)', cursor: 'help' }\" />\n </AgTooltip>\n </span>\n <button class=\"cycle-btn\" :class=\"{ light: isLight }\" type=\"button\" @click=\"cycleOutputDetail\">\n <Transition name=\"cycle-text\" mode=\"out-in\">\n <span :key=\"settings.outputDetail\" class=\"cycle-text\">{{ currentOutputDetailLabel }}</span>\n </Transition>\n <span class=\"cycle-dots\">\n <span v-for=\"k in OUTPUT_DETAIL_KEYS\" :key=\"k\" class=\"cycle-dot\"\n :class=\"{ active: k === settings.outputDetail, light: isLight }\" />\n </span>\n </button>\n </div>\n </div>\n\n <div class=\"settings-section\">\n <div class=\"settings-row\">\n <span class=\"settings-label\" :class=\"{ light: isLight }\">{{ messages.settings.exportFormat }}</span>\n <div class=\"format-switch\" :class=\"{ light: isLight }\"\n :style=\"{ '--ag-format-accent': settings.annotationColor }\" role=\"group\"\n :aria-label=\"messages.settings.exportFormat\">\n <button class=\"format-btn\" :class=\"{ light: isLight, active: settings.copyFormat === 'markdown' }\"\n type=\"button\" :title=\"messages.toolbar.copyMarkdown\"\n :aria-label=\"messages.settings.exportFormatMarkdownAria\"\n :aria-pressed=\"settings.copyFormat === 'markdown'\" @click=\"settings.copyFormat = 'markdown'\">\n <IconMarkdown :size=\"18\" />\n </button>\n <button class=\"format-btn\" :class=\"{ light: isLight, active: settings.copyFormat === 'json' }\"\n type=\"button\" :title=\"messages.toolbar.copyJson\"\n :aria-label=\"messages.settings.exportFormatJsonAria\"\n :aria-pressed=\"settings.copyFormat === 'json'\" @click=\"settings.copyFormat = 'json'\">\n <IconJson :size=\"16\" />\n </button>\n </div>\n </div>\n </div>\n\n <div class=\"settings-section\">\n <button class=\"nav-btn\" :class=\"{ light: isLight }\" type=\"button\" @click=\"openCopySettingsPanel\">\n <span class=\"nav-btn-left\">\n <IconCopyAnimated :size=\"18\" />\n <span>{{ messages.settings.copySettings }}</span>\n </span>\n <span class=\"nav-btn-right\">\n <IconChevronRight :size=\"16\" />\n </span>\n </button>\n </div>\n\n <div class=\"settings-section\">\n <span class=\"settings-label\" :class=\"{ light: isLight }\">{{ messages.settings.markerColour }}</span>\n <div class=\"color-row\">\n <button v-for=\"c in COLOR_OPTIONS\" :key=\"c.key\" class=\"color-ring\"\n :class=\"{ selected: settings.annotationColor === c.value }\"\n :style=\"{ borderColor: settings.annotationColor === c.value ? c.value : 'transparent' }\"\n type=\"button\" :title=\"messages.colors[c.key]\" @click=\"settings.annotationColor = c.value\">\n <span class=\"color-dot\" :class=\"{ selected: settings.annotationColor === c.value }\"\n :style=\"{ backgroundColor: c.value }\" />\n </button>\n </div>\n </div>\n\n <div class=\"settings-section\">\n <label class=\"toggle-row\">\n <input class=\"sr-only\" type=\"checkbox\" :checked=\"settings.autoClearAfterCopy\"\n @change=\"settings.autoClearAfterCopy = ($event.target as HTMLInputElement).checked\">\n <span class=\"checkbox\" :class=\"{ checked: settings.autoClearAfterCopy, light: isLight }\">\n <IconCheckSmallAnimated v-if=\"settings.autoClearAfterCopy\" :size=\"14\" />\n </span>\n <span class=\"toggle-label\" :class=\"{ light: isLight }\">{{ messages.settings.clearOnCopy }}</span>\n </label>\n\n <label class=\"toggle-row\">\n <input class=\"sr-only\" type=\"checkbox\" :checked=\"settings.blockInteractions\"\n @change=\"settings.blockInteractions = ($event.target as HTMLInputElement).checked\">\n <span class=\"checkbox\" :class=\"{ checked: settings.blockInteractions, light: isLight }\">\n <IconCheckSmallAnimated v-if=\"settings.blockInteractions\" :size=\"14\" />\n </span>\n <span class=\"toggle-label\" :class=\"{ light: isLight }\">{{ messages.settings.blockPageInteractions\n }}</span>\n <AgTooltip :content=\"messages.settings.blockInteractionsHelp\">\n <IconHelp :size=\"HELP_ICON_SIZE\"\n :style=\"{ color: isLight ? 'rgba(0,0,0,0.3)' : 'rgba(255,255,255,0.3)', cursor: 'help', marginLeft: '2px' }\" />\n </AgTooltip>\n </label>\n\n <label class=\"toggle-row\">\n <input class=\"sr-only\" type=\"checkbox\" :checked=\"settings.componentSourceEnabled\"\n @change=\"settings.componentSourceEnabled = ($event.target as HTMLInputElement).checked\">\n <span class=\"checkbox\" :class=\"{ checked: settings.componentSourceEnabled, light: isLight }\">\n <IconCheckSmallAnimated v-if=\"settings.componentSourceEnabled\" :size=\"14\" />\n </span>\n <span class=\"toggle-label\" :class=\"{ light: isLight }\">{{ messages.settings.componentSource }}</span>\n <AgTooltip :content=\"messages.settings.componentSourceHelp\">\n <IconHelp :size=\"HELP_ICON_SIZE\"\n :style=\"{ color: isLight ? 'rgba(0,0,0,0.3)' : 'rgba(255,255,255,0.3)', cursor: 'help', marginLeft: '2px' }\" />\n </AgTooltip>\n </label>\n </div>\n\n <div class=\"settings-section\">\n <button class=\"nav-btn\" :class=\"{ light: isLight }\" type=\"button\" @click=\"openAutomationsPanel\">\n <span class=\"nav-btn-left\">\n <IconConnectedNodes :size=\"18\" />\n <span>{{ messages.settings.manageMcpWebhooks }}</span>\n </span>\n <span class=\"nav-btn-right\">\n <span class=\"nav-status-indicator\"\n :title=\"mcpConnected ? messages.settings.mcpStatusConnected : messages.settings.mcpStatusDisconnected\"\n :aria-label=\"mcpConnected ? messages.settings.mcpStatusConnected : messages.settings.mcpStatusDisconnected\">\n <span class=\"status-dot\" :class=\"mcpConnected ? 'connected' : 'disconnected'\" />\n </span>\n <IconChevronRight :size=\"16\" />\n </span>\n </button>\n </div>\n </div>\n\n <div ref=\"copySettingsPageRef\" class=\"settings-page\">\n <div class=\"settings-header automations-header\" :class=\"{ light: isLight }\">\n <button class=\"back-btn\" :class=\"{ light: isLight }\" type=\"button\" @click=\"showMainSettings\">\n <IconChevronLeft :size=\"16\" />\n <span>{{ messages.settings.copySettings }}</span>\n </button>\n </div>\n\n <div class=\"settings-section\">\n <p class=\"settings-description\" :class=\"{ light: isLight }\">\n {{ messages.settings.copySettingsDescription }}\n </p>\n </div>\n\n <div class=\"settings-section\">\n <div class=\"settings-row\">\n <span class=\"settings-label\" :class=\"{ light: isLight }\">{{ messages.settings.copyPrefix }}</span>\n </div>\n <p class=\"settings-description\" :class=\"{ light: isLight }\">\n {{ messages.settings.copyPrefixDescription }}\n </p>\n <textarea class=\"copy-prefix-input\" :class=\"{ light: isLight }\" :value=\"settings.copyPrefix\"\n :placeholder=\"messages.settings.copyPrefixPlaceholder\"\n :style=\"{ borderColor: settings.annotationColor }\" rows=\"3\" spellcheck=\"false\"\n @input=\"settings.copyPrefix = ($event.target as HTMLTextAreaElement).value\" />\n </div>\n\n <div class=\"settings-section\">\n <div class=\"settings-row\">\n <span class=\"settings-label\" :class=\"{ light: isLight }\">{{ messages.settings.copyExclusions }}</span>\n </div>\n <p class=\"settings-description\" :class=\"{ light: isLight }\">\n {{ messages.settings.copyExclusionsDescription }}\n </p>\n\n <div class=\"copy-field-list\">\n <label v-for=\"field in COPY_EXCLUDE_FIELDS\" :key=\"field\" class=\"toggle-row copy-field-row\">\n <input class=\"sr-only\" type=\"checkbox\" :checked=\"settings.copyExcludeFields.includes(field)\"\n @change=\"toggleCopyExcludedField(field)\">\n <span class=\"checkbox\"\n :class=\"{ checked: settings.copyExcludeFields.includes(field), light: isLight }\">\n <IconCheckSmallAnimated v-if=\"settings.copyExcludeFields.includes(field)\" :size=\"14\" />\n </span>\n <span class=\"toggle-label\" :class=\"{ light: isLight }\">\n {{ messages.settings.copyFieldLabels[field] }}\n </span>\n </label>\n </div>\n </div>\n </div>\n\n <div ref=\"automationsSettingsPageRef\" class=\"settings-page\">\n <div class=\"settings-header automations-header\" :class=\"{ light: isLight }\">\n <button class=\"back-btn\" :class=\"{ light: isLight }\" type=\"button\" @click=\"showMainSettings\">\n <IconChevronLeft :size=\"16\" />\n <span>{{ messages.settings.manageMcpWebhooks }}</span>\n </button>\n </div>\n\n <div class=\"settings-section\">\n <div class=\"settings-row\">\n <span class=\"settings-label\" :class=\"{ light: isLight }\">{{ messages.settings.mcpConnection }}</span>\n <span class=\"mcp-status\" :class=\"{ light: isLight }\">\n <span class=\"status-dot\" :class=\"mcpConnected ? 'connected' : 'disconnected'\" />\n {{ mcpConnected ? messages.settings.mcpStatusConnected : messages.settings.mcpStatusDisconnected }}\n </span>\n </div>\n </div>\n\n <div class=\"settings-section\">\n <div class=\"settings-row\">\n <span class=\"settings-label-with-help\">\n <span class=\"settings-label\" :class=\"{ light: isLight }\">{{ messages.settings.webhooks }}</span>\n <AgTooltip :content=\"messages.settings.webhooksDescription\">\n <IconHelp :size=\"HELP_ICON_SIZE\"\n :style=\"{ color: isLight ? 'rgba(0,0,0,0.3)' : 'rgba(255,255,255,0.3)', cursor: 'help' }\" />\n </AgTooltip>\n </span>\n </div>\n\n <label class=\"toggle-row webhook-toggle\">\n <input class=\"sr-only\" type=\"checkbox\" :checked=\"settings.webhooksEnabled\"\n @change=\"settings.webhooksEnabled = ($event.target as HTMLInputElement).checked\">\n <span class=\"checkbox\" :class=\"{ checked: settings.webhooksEnabled, light: isLight }\">\n <IconCheckSmallAnimated v-if=\"settings.webhooksEnabled\" :size=\"14\" />\n </span>\n <span class=\"toggle-label\" :class=\"{ light: isLight }\">{{ messages.settings.webhooksAutoSend }}</span>\n </label>\n\n <p class=\"settings-description\" :class=\"{ light: isLight }\">\n {{ messages.settings.webhooksDescription }}\n </p>\n\n <textarea class=\"webhook-url\" :class=\"{ light: isLight }\" :value=\"settings.webhookUrl\"\n :placeholder=\"messages.settings.webhooksUrlPlaceholder\"\n :style=\"{ borderColor: settings.annotationColor }\" rows=\"2\" spellcheck=\"false\"\n @input=\"settings.webhookUrl = ($event.target as HTMLTextAreaElement).value\" />\n </div>\n\n <div class=\"settings-section\">\n <div class=\"guide-card\" :class=\"{ light: isLight }\">\n <div class=\"guide-card-title\">{{ messages.settings.mcpConnection }}</div>\n <p class=\"settings-description\" :class=\"{ light: isLight }\">\n {{ messages.settings.mcpDescription }}\n </p>\n </div>\n </div>\n\n <div class=\"settings-section\">\n <div class=\"guide-grid\">\n <div v-for=\"item in connectionCards\" :key=\"item.key\" class=\"guide-card\" :class=\"{ light: isLight }\">\n <div class=\"guide-card-header\">\n <div class=\"guide-card-title\">{{ item.label }}</div>\n <button class=\"guide-copy-btn\" :class=\"{ light: isLight }\" type=\"button\"\n :title=\"messages.settings.copyValueAria(item.label)\"\n :aria-label=\"messages.settings.copyValueAria(item.label)\"\n :data-copied=\"guideCopyFeedback === item.key || undefined\"\n @click=\"void copyGuideValue(item.key, item.value)\">\n <IconCopyAnimated :size=\"16\" :copied=\"guideCopyFeedback === item.key\" />\n </button>\n </div>\n <pre class=\"guide-code\" :class=\"{ light: isLight }\">{{ item.value }}</pre>\n </div>\n </div>\n </div>\n\n <div class=\"settings-section\">\n <div class=\"guide-grid\">\n <div v-for=\"item in integrationCards\" :key=\"item.key\" class=\"guide-card\" :class=\"{ light: isLight }\">\n <div class=\"guide-card-header\">\n <div class=\"guide-card-title\">{{ item.label }}</div>\n <button class=\"guide-copy-btn\" :class=\"{ light: isLight }\" type=\"button\"\n :title=\"messages.settings.copyValueAria(item.label)\"\n :aria-label=\"messages.settings.copyValueAria(item.label)\"\n :data-copied=\"guideCopyFeedback === item.key || undefined\"\n @click=\"void copyGuideValue(item.key, item.value)\">\n <IconCopyAnimated :size=\"16\" :copied=\"guideCopyFeedback === item.key\" />\n </button>\n </div>\n <pre class=\"guide-code\" :class=\"{ light: isLight }\">{{ item.value }}</pre>\n </div>\n </div>\n </div>\n\n <div class=\"settings-section\">\n <div class=\"guide-card\" :class=\"{ light: isLight }\">\n <div class=\"guide-card-header\">\n <div class=\"guide-card-title\">{{ messages.settings.webhookEnvLabel }}</div>\n <button class=\"guide-copy-btn\" :class=\"{ light: isLight }\" type=\"button\"\n :title=\"messages.settings.copyValueAria(messages.settings.webhookEnvLabel)\"\n :aria-label=\"messages.settings.copyValueAria(messages.settings.webhookEnvLabel)\"\n :data-copied=\"guideCopyFeedback === 'webhook-env' || undefined\"\n @click=\"void copyGuideValue('webhook-env', webhookEnv)\">\n <IconCopyAnimated :size=\"16\" :copied=\"guideCopyFeedback === 'webhook-env'\" />\n </button>\n </div>\n <p class=\"settings-description\" :class=\"{ light: isLight }\">\n {{ messages.settings.webhookDescriptionLong }}\n </p>\n <pre class=\"guide-code\" :class=\"{ light: isLight }\">{{ webhookEnv }}</pre>\n </div>\n </div>\n </div>\n </div>\n </div>\n </Transition>\n </div>\n </div>\n</template>\n\n<style scoped>\n/* Protect stroke-based SVG icons */\n:deep(svg[fill=\"none\"]) {\n fill: none !important;\n}\n\n@keyframes toolbarEnter {\n from {\n opacity: 0;\n transform: scale(0.5) rotate(90deg);\n }\n\n to {\n opacity: 1;\n transform: scale(1) rotate(0deg);\n }\n}\n\n@keyframes badgeEnter {\n from {\n opacity: 0;\n transform: scale(0);\n }\n\n to {\n opacity: 1;\n transform: scale(1);\n }\n}\n\n@keyframes themeIconIn {\n 0% {\n opacity: 0;\n transform: scale(0.8) rotate(-30deg);\n }\n\n 100% {\n opacity: 1;\n transform: scale(1) rotate(0deg);\n }\n}\n\n@keyframes cycleTextIn {\n 0% {\n opacity: 0;\n transform: translateY(-6px);\n }\n\n 100% {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n/* --- Toolbar wrapper ------------------------------------------------- */\n\n.toolbar {\n --ag-toolbar-expanded-width: 280px;\n position: fixed;\n right: 20px;\n bottom: 20px;\n width: var(--ag-toolbar-expanded-width);\n z-index: 100000;\n pointer-events: none;\n font-family: system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif;\n}\n\n.toolbar.dragging {\n cursor: grabbing;\n will-change: left, top;\n}\n\n/* --- Toolbar container ------------------------------------------------ */\n\n.toolbar-container {\n position: relative;\n margin-left: auto;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 44px;\n background: #1a1a1a;\n color: #fff;\n border: none;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), 0 4px 16px rgba(0, 0, 0, 0.1);\n pointer-events: auto;\n user-select: none;\n cursor: grab;\n touch-action: none;\n will-change: width, transform;\n transition:\n width 0.4s cubic-bezier(0.19, 1, 0.22, 1),\n border-radius 0.4s cubic-bezier(0.19, 1, 0.22, 1),\n transform 0.4s cubic-bezier(0.19, 1, 0.22, 1),\n background-color 0.25s ease,\n box-shadow 0.25s ease;\n}\n\n.toolbar-container.dragging {\n transition:\n width 0.4s cubic-bezier(0.19, 1, 0.22, 1),\n border-radius 0.4s cubic-bezier(0.19, 1, 0.22, 1),\n background-color 0.25s ease,\n box-shadow 0.25s ease;\n}\n\n.toolbar-container.entrance {\n animation: toolbarEnter 0.5s cubic-bezier(0.34, 1.2, 0.64, 1) both;\n}\n\n/* Collapsed circle */\n.toolbar-container.collapsed {\n width: 44px;\n border-radius: 22px;\n padding: 0;\n cursor: pointer;\n}\n\n.toolbar-container.collapsed:hover {\n background: #2a2a2a;\n}\n\n.toolbar-container.collapsed:active {\n transform: scale(0.95);\n}\n\n/* Expanded pill */\n.toolbar-container.expanded {\n width: var(--ag-toolbar-expanded-width);\n border-radius: 24px;\n padding: 6px;\n}\n\n/* Light mode */\n.toolbar-container.light {\n background: #fff;\n color: rgba(0, 0, 0, 0.85);\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 4px 16px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.04);\n}\n\n.toolbar-container.light.collapsed:hover {\n background: #f5f5f5;\n}\n\n/* --- Toggle content (collapsed icon) --------------------------------- */\n\n.toggle-content {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n transform-origin: center;\n transition:\n opacity 0.12s cubic-bezier(0.19, 1, 0.22, 1),\n transform 0.2s cubic-bezier(0.19, 1, 0.22, 1);\n}\n\n.toggle-content.visible {\n opacity: 1;\n visibility: visible;\n pointer-events: auto;\n transform: scale(1);\n}\n\n.toggle-content.hidden {\n opacity: 0;\n visibility: hidden;\n pointer-events: none;\n transform: scale(0.72);\n}\n\n/* --- Controls row (expanded) ----------------------------------------- */\n\n.controls-content {\n display: flex;\n align-items: center;\n gap: 6px;\n transform-origin: center;\n will-change: opacity, transform, filter;\n transition:\n filter 0.45s cubic-bezier(0.19, 1, 0.22, 1),\n opacity 0.35s cubic-bezier(0.19, 1, 0.22, 1),\n transform 0.35s cubic-bezier(0.19, 1, 0.22, 1);\n}\n\n.controls-content.visible {\n opacity: 1;\n visibility: visible;\n pointer-events: auto;\n filter: blur(0);\n transform: scale(1);\n}\n\n.controls-content.hidden {\n opacity: 0;\n visibility: hidden;\n pointer-events: none;\n filter: blur(10px);\n transform: scale(0.4);\n}\n\n/* --- Badge ----------------------------------------------------------- */\n\n.badge {\n position: absolute;\n top: -13px;\n right: -13px;\n min-width: 18px;\n height: 18px;\n padding: 0 5px;\n border-radius: 9px;\n background: #3c82f7;\n color: #fff;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 10px;\n font-weight: 600;\n line-height: 1;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15), inset 0 0 0 1px rgba(255, 255, 255, 0.04);\n will-change: transform, opacity;\n transition:\n transform 0.3s ease,\n opacity 0.2s ease;\n transform: scale(1);\n}\n\n.badge.entrance {\n animation: badgeEnter 0.3s cubic-bezier(0.34, 1.2, 0.64, 1) 0.32s both;\n}\n\n/* --- Control buttons ------------------------------------------------- */\n\n.control-btn {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 34px;\n height: 34px;\n border: none;\n border-radius: 50%;\n background: transparent;\n color: rgba(255, 255, 255, 0.85);\n cursor: pointer;\n transition:\n background-color 0.15s ease,\n color 0.15s ease,\n transform 0.1s ease,\n opacity 0.2s ease;\n}\n\n.control-btn:hover:not(:disabled):not([data-active]):not([data-state]) {\n background: rgba(255, 255, 255, 0.12);\n color: #fff;\n}\n\n.control-btn:active:not(:disabled) {\n transform: scale(0.92);\n}\n\n.control-btn:disabled {\n opacity: 0.35;\n cursor: not-allowed;\n}\n\n.control-btn[data-active] {\n color: #3c82f7;\n background: rgba(60, 130, 247, 0.25);\n}\n\n.control-btn[data-state=\"paused\"] {\n color: #f59e0b;\n background: rgba(245, 158, 11, 0.18);\n}\n\n.control-btn[data-state=\"hidden\"] {\n color: rgba(255, 255, 255, 0.45);\n background: rgba(255, 255, 255, 0.06);\n}\n\n.control-btn[data-danger]:hover:not(:disabled):not([data-active]) {\n background: rgba(255, 59, 48, 0.25);\n color: #ff3b30;\n}\n\n/* Light variants */\n.control-btn.light {\n color: rgba(0, 0, 0, 0.5);\n}\n\n.control-btn.light:hover:not(:disabled):not([data-active]):not([data-state]) {\n background: rgba(0, 0, 0, 0.06);\n color: rgba(0, 0, 0, 0.85);\n}\n\n.control-btn.light[data-active] {\n color: #3c82f7;\n background: rgba(60, 130, 247, 0.15);\n}\n\n.control-btn.light[data-state=\"paused\"] {\n color: #b45309;\n background: rgba(245, 158, 11, 0.14);\n}\n\n.control-btn.light[data-state=\"hidden\"] {\n color: rgba(0, 0, 0, 0.35);\n background: rgba(0, 0, 0, 0.04);\n}\n\n.control-btn.light[data-danger]:hover:not(:disabled):not([data-active]) {\n background: rgba(255, 59, 48, 0.15);\n color: #ff3b30;\n}\n\n/* --- Divider --------------------------------------------------------- */\n\n.divider {\n width: 1px;\n height: 12px;\n margin: 0 2px;\n background: rgba(255, 255, 255, 0.15);\n}\n\n.divider.light {\n background: rgba(0, 0, 0, 0.1);\n}\n\n/* --- Settings panel -------------------------------------------------- */\n\n.settings-panel {\n position: absolute;\n right: 5px;\n bottom: calc(100% + 8px);\n width: min(344px, calc(100vw - 24px));\n z-index: 1;\n background: #1a1a1a;\n border-radius: 16px;\n padding: 0;\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.08);\n cursor: default;\n --ag-settings-shift: 8px;\n transform-origin: bottom right;\n will-change: opacity, transform, filter;\n overflow: hidden;\n}\n\n.settings-panel.below {\n top: calc(100% + 8px);\n bottom: auto;\n --ag-settings-shift: -8px;\n transform-origin: top right;\n}\n\n.settings-panel.light {\n background: #fff;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 4px 16px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.04);\n}\n\n.settings-panel-enter-active {\n transition:\n opacity 0.2s ease,\n transform 0.2s ease,\n filter 0.2s ease;\n}\n\n.settings-panel-leave-active {\n pointer-events: none;\n transition:\n opacity 0.1s ease,\n transform 0.1s ease,\n filter 0.1s ease;\n}\n\n.settings-panel-enter-from,\n.settings-panel-leave-to {\n opacity: 0;\n transform: translateY(var(--ag-settings-shift)) scale(0.95);\n filter: blur(5px);\n}\n\n.settings-panel-enter-to,\n.settings-panel-leave-from {\n opacity: 1;\n transform: translateY(0) scale(1);\n filter: blur(0);\n}\n\n/* --- Settings header ------------------------------------------------- */\n\n.settings-header {\n position: sticky;\n top: -13px;\n z-index: 2;\n display: flex;\n align-items: center;\n min-height: 24px;\n margin: -13px -16px 8px;\n background: #1a1a1a;\n padding: 13px 16px 9px;\n border-bottom: 1px solid rgba(255, 255, 255, 0.07);\n box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);\n}\n\n.settings-header.light {\n background: #fff;\n border-bottom-color: rgba(0, 0, 0, 0.08);\n box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);\n}\n\n.automations-header {\n padding-top: 20px;\n padding-bottom: 20px;\n}\n\n.settings-brand {\n font-size: 13px;\n font-weight: 600;\n letter-spacing: -0.01em;\n color: #fff;\n}\n\n.settings-brand.light {\n color: rgba(0, 0, 0, 0.85);\n}\n\n.theme-toggle {\n margin-left: auto;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 22px;\n height: 22px;\n border: none;\n border-radius: 6px;\n background: transparent;\n color: rgba(255, 255, 255, 0.4);\n cursor: pointer;\n}\n\n.theme-toggle:hover {\n background: rgba(255, 255, 255, 0.1);\n color: rgba(255, 255, 255, 0.8);\n}\n\n.theme-toggle.light {\n color: rgba(0, 0, 0, 0.4);\n}\n\n.theme-toggle.light:hover {\n background: rgba(0, 0, 0, 0.06);\n color: rgba(0, 0, 0, 0.7);\n}\n\n.theme-icon-wrapper {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 16px;\n height: 16px;\n}\n\n.theme-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.theme-icon-enter-active {\n animation: themeIconIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);\n}\n\n.theme-icon-leave-active {\n position: absolute;\n inset: 0;\n transition:\n opacity 0.15s ease,\n transform 0.15s ease;\n}\n\n.theme-icon-leave-to {\n opacity: 0;\n transform: scale(0.82) rotate(18deg);\n}\n\n/* --- Settings sections ----------------------------------------------- */\n\n.settings-section+.settings-section {\n margin-top: 8px;\n padding-top: 8px;\n border-top: 1px solid rgba(255, 255, 255, 0.07);\n}\n\n.settings-panel.light .settings-section+.settings-section {\n border-top-color: rgba(0, 0, 0, 0.08);\n}\n\n.settings-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n min-height: 24px;\n}\n\n.settings-label {\n font-size: 13px;\n font-weight: 400;\n letter-spacing: -0.01em;\n color: rgba(255, 255, 255, 0.5);\n}\n\n.settings-label.light {\n color: rgba(0, 0, 0, 0.5);\n}\n\n/* --- Locale switch --------------------------------------------------- */\n\n.locale-switch {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n padding: 2px;\n border-radius: 999px;\n background: rgba(255, 255, 255, 0.06);\n}\n\n.locale-switch.light {\n background: rgba(0, 0, 0, 0.04);\n}\n\n.locale-btn {\n appearance: none;\n border: none;\n border-radius: 999px;\n background: transparent;\n color: rgba(255, 255, 255, 0.65);\n padding: 4px 9px;\n font-size: 12px;\n font-weight: 500;\n line-height: 1.2;\n cursor: pointer;\n white-space: nowrap;\n transition:\n background-color 0.15s ease,\n color 0.15s ease,\n transform 0.1s ease;\n}\n\n.locale-btn:hover {\n background: rgba(255, 255, 255, 0.08);\n color: #fff;\n}\n\n.locale-btn:active {\n transform: scale(0.97);\n}\n\n.locale-btn.active {\n background: rgba(255, 255, 255, 0.12);\n color: #fff;\n}\n\n.locale-btn.light {\n color: rgba(0, 0, 0, 0.55);\n}\n\n.locale-btn.light:hover {\n background: rgba(0, 0, 0, 0.04);\n color: rgba(0, 0, 0, 0.85);\n}\n\n.locale-btn.light.active {\n background: rgba(0, 0, 0, 0.06);\n color: rgba(0, 0, 0, 0.85);\n}\n\n/* --- Export format switch -------------------------------------------- */\n\n.format-switch {\n display: inline-flex;\n align-items: center;\n gap: 12px;\n padding: 0;\n}\n\n.format-btn {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 22px;\n height: 22px;\n padding: 0;\n border: none;\n background: transparent;\n color: rgba(255, 255, 255, 0.36);\n cursor: pointer;\n transition:\n color 0.15s ease,\n transform 0.15s ease,\n opacity 0.15s ease;\n}\n\n.format-btn::after {\n content: \"\";\n position: absolute;\n left: 50%;\n bottom: -5px;\n width: 0;\n height: 2px;\n border-radius: 999px;\n background: currentColor;\n opacity: 0;\n transform: translateX(-50%);\n transition:\n width 0.15s ease,\n opacity 0.15s ease;\n}\n\n.format-btn:hover {\n color: #fff;\n}\n\n.format-btn:active {\n transform: scale(0.96);\n}\n\n.format-btn.active {\n color: var(--ag-format-accent, #3c82f7);\n transform: scale(1.08);\n}\n\n.format-btn.active::after {\n width: 14px;\n opacity: 1;\n}\n\n.format-btn.light {\n color: rgba(0, 0, 0, 0.32);\n}\n\n.format-btn.light:hover {\n color: rgba(0, 0, 0, 0.8);\n}\n\n.format-btn.light.active {\n color: var(--ag-format-accent, #3c82f7);\n}\n\n/* --- Cycle button ---------------------------------------------------- */\n\n.cycle-btn {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 0;\n border: none;\n background: transparent;\n color: #fff;\n cursor: pointer;\n font-size: 13px;\n font-weight: 500;\n letter-spacing: -0.01em;\n}\n\n.cycle-btn.light {\n color: rgba(0, 0, 0, 0.85);\n}\n\n.cycle-text {\n display: inline-block;\n}\n\n.cycle-text-enter-active {\n animation: cycleTextIn 0.2s ease-out;\n}\n\n.cycle-dots {\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n\n.cycle-dot {\n width: 3px;\n height: 3px;\n border-radius: 50%;\n background: rgba(255, 255, 255, 0.3);\n transform: scale(0.667);\n transition:\n background-color 0.25s ease-out,\n transform 0.25s ease-out;\n}\n\n.cycle-dot.active {\n background: #fff;\n transform: scale(1);\n}\n\n.cycle-dot.light {\n background: rgba(0, 0, 0, 0.2);\n}\n\n.cycle-dot.light.active {\n background: rgba(0, 0, 0, 0.7);\n}\n\n/* --- Colour picker --------------------------------------------------- */\n\n.color-row {\n display: flex;\n gap: 8px;\n margin-top: 8px;\n}\n\n.color-ring {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n padding: 0;\n border: 2px solid transparent;\n border-radius: 50%;\n background: transparent;\n cursor: pointer;\n transition:\n border-color 0.18s ease,\n transform 0.15s ease;\n}\n\n.color-ring:hover {\n transform: scale(1.08);\n}\n\n.color-ring:active {\n transform: scale(0.95);\n}\n\n.color-dot {\n display: block;\n width: 16px;\n height: 16px;\n border-radius: 50%;\n transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1);\n}\n\n.color-dot.selected {\n transform: scale(0.83);\n}\n\n/* --- Toggle rows (checkboxes) ---------------------------------------- */\n\n.toggle-row {\n display: flex;\n align-items: center;\n gap: 8px;\n cursor: pointer;\n}\n\n.toggle-row+.toggle-row {\n margin-top: 12px;\n}\n\n.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0 0 0 0);\n white-space: nowrap;\n border: 0;\n}\n\n.checkbox {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 14px;\n height: 14px;\n flex-shrink: 0;\n border: 1px solid rgba(255, 255, 255, 0.2);\n border-radius: 4px;\n background: rgba(255, 255, 255, 0.05);\n transition:\n background-color 0.15s ease,\n border-color 0.15s ease,\n transform 0.1s ease;\n}\n\n.checkbox :deep(svg) {\n color: #1a1a1a;\n}\n\n.checkbox.checked {\n border-color: rgba(255, 255, 255, 0.3);\n background: #fff;\n}\n\n.checkbox.light {\n border-color: rgba(0, 0, 0, 0.15);\n background: #fff;\n}\n\n.checkbox.light.checked {\n border-color: #1a1a1a;\n background: #1a1a1a;\n}\n\n.checkbox.light.checked :deep(svg) {\n color: #fff;\n}\n\n.toggle-label {\n font-size: 13px;\n font-weight: 400;\n letter-spacing: -0.01em;\n color: rgba(255, 255, 255, 0.85);\n}\n\n.toggle-label.light {\n color: rgba(0, 0, 0, 0.5);\n}\n\n.copy-field-list {\n display: grid;\n gap: 10px;\n margin-top: 10px;\n}\n\n.copy-field-row+.copy-field-row {\n margin-top: 0;\n}\n\n.webhook-toggle {\n margin-top: 8px;\n}\n\n.copy-prefix-input,\n.webhook-url {\n display: block;\n width: 100%;\n margin-top: 8px;\n padding: 8px 10px;\n border: 1px solid rgba(255, 255, 255, 0.15);\n border-radius: 8px;\n background: rgba(255, 255, 255, 0.04);\n color: #fff;\n font-size: 12px;\n line-height: 1.45;\n outline: none;\n transition: border-color 0.15s ease;\n}\n\n.copy-prefix-input {\n resize: none;\n font-family: inherit;\n}\n\n.webhook-url {\n font-family: ui-monospace, SFMono-Regular, Menlo, monospace;\n resize: vertical;\n}\n\n.copy-prefix-input:focus,\n.webhook-url:focus {\n border-color: inherit;\n}\n\n.copy-prefix-input::placeholder,\n.webhook-url::placeholder {\n color: rgba(255, 255, 255, 0.25);\n}\n\n.copy-prefix-input.light,\n.webhook-url.light {\n border-color: rgba(0, 0, 0, 0.12);\n background: rgba(0, 0, 0, 0.02);\n color: rgba(0, 0, 0, 0.85);\n}\n\n.copy-prefix-input.light::placeholder,\n.webhook-url.light::placeholder {\n color: rgba(0, 0, 0, 0.3);\n}\n\n/* --- Settings page slider -------------------------------------------- */\n\n.settings-pages {\n display: flex;\n align-items: flex-start;\n transition:\n transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),\n height 0.2s ease;\n}\n\n.settings-page {\n flex: 0 0 calc(100% / var(--ag-settings-page-count, 2));\n width: calc(100% / var(--ag-settings-page-count, 2));\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n min-width: 0;\n max-height: min(72vh, 520px);\n overflow-y: auto;\n overscroll-behavior: contain;\n padding: 13px 16px 16px;\n}\n\n/* --- Label with help icon -------------------------------------------- */\n\n.settings-label-with-help {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n}\n\n/* --- Nav button (MCP/Webhooks) --------------------------------------- */\n\n.nav-btn {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n padding: 8px 6px;\n border: none;\n border-radius: 8px;\n background: transparent;\n color: rgba(255, 255, 255, 0.85);\n font-size: 12px;\n font-weight: 500;\n letter-spacing: -0.01em;\n cursor: pointer;\n transition: background-color 0.15s ease;\n}\n\n.nav-btn:hover {\n background: rgba(255, 255, 255, 0.06);\n}\n\n.nav-btn.light {\n color: rgba(0, 0, 0, 0.7);\n}\n\n.nav-btn.light:hover {\n background: rgba(0, 0, 0, 0.04);\n}\n\n.nav-btn-left {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.nav-btn-right {\n display: flex;\n align-items: center;\n gap: 8px;\n margin-left: 12px;\n}\n\n.nav-status-indicator {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 12px;\n height: 12px;\n}\n\n/* --- Status dot ------------------------------------------------------ */\n\n.status-dot {\n display: inline-block;\n width: 7px;\n height: 7px;\n border-radius: 50%;\n flex-shrink: 0;\n}\n\n.status-dot.connected {\n background: #22c55e;\n box-shadow: 0 0 4px rgba(34, 197, 94, 0.4);\n}\n\n.status-dot.disconnected {\n background: rgba(255, 255, 255, 0.25);\n}\n\n.settings-panel.light .status-dot.disconnected {\n background: rgba(0, 0, 0, 0.2);\n}\n\n/* --- Back button ----------------------------------------------------- */\n\n.back-btn {\n display: flex;\n align-items: center;\n gap: 4px;\n padding: 0;\n border: none;\n background: transparent;\n color: rgba(255, 255, 255, 0.85);\n font-size: 13px;\n font-weight: 600;\n letter-spacing: -0.01em;\n cursor: pointer;\n transition: color 0.15s ease;\n}\n\n.back-btn:hover {\n color: #fff;\n}\n\n.back-btn.light {\n color: rgba(0, 0, 0, 0.7);\n}\n\n.back-btn.light:hover {\n color: rgba(0, 0, 0, 0.95);\n}\n\n/* --- MCP status label ------------------------------------------------ */\n\n.mcp-status {\n display: flex;\n align-items: center;\n gap: 6px;\n font-size: 12px;\n font-weight: 500;\n color: rgba(255, 255, 255, 0.6);\n}\n\n.mcp-status.light {\n color: rgba(0, 0, 0, 0.5);\n}\n\n.settings-header .mcp-status {\n margin-left: auto;\n justify-content: flex-end;\n text-align: right;\n}\n\n/* --- Settings description -------------------------------------------- */\n\n.settings-description {\n margin: 6px 0 0;\n font-size: 11px;\n line-height: 1.45;\n color: rgba(255, 255, 255, 0.4);\n}\n\n.settings-description.light {\n color: rgba(0, 0, 0, 0.4);\n}\n\n/* --- Get started guide ----------------------------------------------- */\n\n.guide-grid {\n display: grid;\n grid-template-columns: 1fr;\n gap: 8px;\n}\n\n.guide-card {\n padding: 10px 12px;\n border: 1px solid rgba(255, 255, 255, 0.08);\n border-radius: 10px;\n background: rgba(255, 255, 255, 0.035);\n}\n\n.guide-card.light {\n border-color: rgba(0, 0, 0, 0.08);\n background: rgba(0, 0, 0, 0.02);\n}\n\n.guide-card+.guide-card {\n margin-top: 8px;\n}\n\n.guide-card-header {\n display: flex;\n align-items: center;\n gap: 12px;\n}\n\n.guide-card-title {\n font-size: 11px;\n font-weight: 700;\n letter-spacing: 0.01em;\n color: rgba(255, 255, 255, 0.82);\n}\n\n.guide-copy-btn {\n margin-left: auto;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n padding: 0;\n border: none;\n border-radius: 6px;\n background: transparent;\n color: rgba(255, 255, 255, 0.42);\n cursor: pointer;\n flex-shrink: 0;\n transition:\n background-color 0.15s ease,\n color 0.15s ease,\n transform 0.1s ease;\n}\n\n.guide-copy-btn:hover {\n background: rgba(255, 255, 255, 0.08);\n color: rgba(255, 255, 255, 0.88);\n}\n\n.guide-copy-btn:active {\n transform: scale(0.94);\n}\n\n.guide-copy-btn[data-copied] {\n color: #22c55e;\n}\n\n.guide-copy-btn.light {\n color: rgba(0, 0, 0, 0.38);\n}\n\n.guide-copy-btn.light:hover {\n background: rgba(0, 0, 0, 0.05);\n color: rgba(0, 0, 0, 0.74);\n}\n\n.settings-panel.light .guide-card-title {\n color: rgba(0, 0, 0, 0.74);\n}\n\n.guide-code {\n margin: 8px 0 0;\n padding: 8px 10px;\n border-radius: 8px;\n background: rgba(15, 23, 42, 0.68);\n color: #e2e8f0;\n font-size: 11px;\n line-height: 1.45;\n white-space: pre-wrap;\n word-break: break-word;\n font-family: ui-monospace, SFMono-Regular, Menlo, monospace;\n}\n\n.guide-code.light {\n background: rgba(241, 245, 249, 0.95);\n color: rgba(15, 23, 42, 0.9);\n}\n\n/* Global: applied to <html> during toolbar drag */\n:global(html.agentation-dragging) {\n cursor: grabbing !important;\n user-select: none !important;\n -webkit-user-select: none !important;\n}\n\n@media (prefers-reduced-motion: reduce) {\n\n .toolbar-container,\n .toggle-content,\n .controls-content,\n .badge,\n .control-btn,\n .settings-panel,\n .theme-icon,\n .cycle-text,\n .cycle-dot,\n .locale-btn,\n .format-btn,\n .color-ring,\n .color-dot,\n .checkbox {\n animation: none !important;\n transition: none !important;\n filter: none !important;\n }\n}\n</style>\n","<script setup lang=\"ts\">\nimport { markRaw, onMounted, onUnmounted, provide, ref, watch } from \"vue\"\nimport {\n AREA_SELECTION_KEY,\n ANNOTATIONS_STORE_KEY,\n FREEZE_KEY,\n I18N_KEY,\n OVERLAY_KEY,\n RUNTIME_BRIDGE_KEY,\n SELECTION_KEY,\n SETTINGS_KEY,\n} from \"../injection-keys.js\"\nimport { createOverlayState } from \"../composables/useOverlay.js\"\nimport { createExportActions } from \"../composables/useExport.js\"\nimport { createI18nState } from \"../composables/useI18n.js\"\nimport { createFreezeState, originalSetTimeout } from \"../composables/useFreezeState.js\"\nimport { useKeyboardShortcuts } from \"../composables/useKeyboard.js\"\nimport type { AnnotationsStore } from \"../composables/useAnnotationsStore.js\"\nimport type { AreaSelectionState } from \"../composables/useAreaSelection.js\"\nimport type { SelectionState } from \"../composables/useSelection.js\"\nimport type { SettingsState } from \"../composables/useSettings.js\"\nimport type { RuntimeBridge, UiNotification } from \"../types.js\"\nimport AnnotationPopover from \"./AnnotationPopover.vue\"\nimport DragSelectionLayer from \"./DragSelectionLayer.vue\"\nimport HighlightLayer from \"./HighlightLayer.vue\"\nimport MarkerLayer from \"./MarkerLayer.vue\"\nimport Toolbar from \"./Toolbar.vue\"\n\nconst props = defineProps<{\n bridge: RuntimeBridge\n store: AnnotationsStore\n selection: SelectionState\n settings: SettingsState\n areaSelection: AreaSelectionState\n}>()\n\nconst overlay = createOverlayState(props.selection)\nconst settings = props.settings\nconst i18n = createI18nState(() => settings.locale)\nconst freezeState = createFreezeState()\nconst exportActions = createExportActions(props.store, settings)\nconst toast = ref<(UiNotification & { id: number }) | null>(null)\n\n// Provide all dependencies to the component tree.\n// markRaw the bridge because it contains DOM nodes and functions\n// that must not be made reactive.\nprovide(RUNTIME_BRIDGE_KEY, markRaw(props.bridge))\nprovide(ANNOTATIONS_STORE_KEY, props.store)\nprovide(SELECTION_KEY, props.selection)\nprovide(AREA_SELECTION_KEY, props.areaSelection)\nprovide(OVERLAY_KEY, overlay)\nprovide(SETTINGS_KEY, settings)\nprovide(I18N_KEY, i18n)\nprovide(FREEZE_KEY, freezeState)\n\n// Register keyboard shortcuts\nuseKeyboardShortcuts({\n store: props.store,\n selection: props.selection,\n overlay,\n settings,\n exportActions,\n freezeState,\n})\n\nonMounted(() => {\n props.bridge.overlayRoot.dataset.agentationRoot = \"\"\n props.store.hydrate()\n // Kick off initial sync (flushes any unsynced annotations to the server).\n void props.bridge.sync?.init()\n})\n\nlet toastTimer: ReturnType<typeof setTimeout> | null = null\nlet unsubscribeNotifications: (() => void) | null = null\nlet unsubscribeSync: (() => void) | null = null\n\nonMounted(() => {\n unsubscribeNotifications = props.bridge.subscribeNotifications?.((notification) => {\n if (toastTimer) {\n clearTimeout(toastTimer)\n }\n\n toast.value = {\n ...notification,\n id: Date.now(),\n }\n\n toastTimer = originalSetTimeout(() => {\n toast.value = null\n toastTimer = null\n }, notification.duration ?? 2600)\n }) ?? null\n\n unsubscribeSync = props.bridge.sync?.subscribe((event) => {\n if (event.type === \"reconciled\") {\n props.store.hydrate()\n if (event.source === \"remote\" && event.annotationCount !== undefined) {\n props.bridge.notify?.({\n kind: \"info\",\n duration: 2200,\n message: i18n.messages.notifications.remoteSyncUpdated(event.annotationCount),\n })\n }\n return\n }\n\n if (event.type === \"error\" && event.message) {\n props.bridge.notify?.({\n kind: \"warning\",\n duration: 2600,\n message: i18n.messages.notifications.syncFailed(event.message),\n })\n }\n }) ?? null\n})\n\nonUnmounted(() => {\n unsubscribeNotifications?.()\n unsubscribeSync?.()\n if (toastTimer) {\n clearTimeout(toastTimer)\n }\n delete props.bridge.overlayRoot.dataset.agentationRoot\n freezeState.cleanup()\n})\n\n// Auto-show popover when an element is selected;\n// auto-hide when selection is cleared.\nwatch(\n () => props.selection.selected,\n (selected) => {\n if (selected) {\n overlay.showPopover()\n } else {\n overlay.hidePopover()\n }\n },\n)\n\n// Sync dark mode CSS vars to overlayRoot so Teleported layers inherit them.\nwatch(\n () => settings.darkMode,\n (isDark) => {\n props.bridge.overlayRoot.dataset.agTheme = isDark ? \"dark\" : \"light\"\n },\n { immediate: true },\n)\n\n// Sync outputDetail from settings back to bridge so export uses current setting.\nwatch(\n () => settings.outputDetail,\n (outputDetail) => {\n props.bridge.options.outputDetail = outputDetail\n },\n { immediate: true },\n)\n\n// Sync locale to the Teleport target so marker labels inherit the right language.\nwatch(\n () => i18n.locale,\n (locale) => {\n props.bridge.overlayRoot.lang = locale\n },\n { immediate: true },\n)\n</script>\n\n<template>\n <div\n class=\"agentation-root\"\n :class=\"{ dark: settings.darkMode, light: !settings.darkMode }\"\n :lang=\"i18n.locale\"\n data-agentation-root\n >\n <Toolbar :export-actions=\"exportActions\" />\n <AnnotationPopover />\n\n <Transition name=\"toast\">\n <div\n v-if=\"toast\"\n class=\"toast\"\n :data-kind=\"toast.kind ?? 'info'\"\n role=\"status\"\n aria-live=\"polite\"\n >\n {{ toast.message }}\n </div>\n </Transition>\n\n <Teleport :to=\"bridge.overlayRoot\">\n <HighlightLayer />\n <DragSelectionLayer />\n <MarkerLayer />\n </Teleport>\n </div>\n</template>\n\n<style scoped>\n.agentation-root {\n position: fixed;\n inset: 0;\n z-index: 99999;\n pointer-events: none;\n font-size: 16px;\n line-height: 1.5;\n font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;\n}\n\n/* Dark theme (default) */\n.agentation-root.dark {\n --ag-bg: #1e293b;\n --ag-bg-surface: rgba(30, 41, 59, 0.96);\n --ag-bg-elevated: rgba(15, 23, 42, 0.72);\n --ag-text: #e2e8f0;\n --ag-muted: #94a3b8;\n --ag-border: rgba(148, 163, 184, 0.24);\n --ag-accent: #3b82f6;\n --ag-selected: #f59e0b;\n --ag-shadow: 0 16px 48px rgba(15, 23, 42, 0.35);\n color: var(--ag-text);\n}\n\n/* Light theme */\n.agentation-root.light {\n --ag-bg: #ffffff;\n --ag-bg-surface: rgba(255, 255, 255, 0.96);\n --ag-bg-elevated: rgba(241, 245, 249, 0.72);\n --ag-text: #1e293b;\n --ag-muted: #64748b;\n --ag-border: rgba(148, 163, 184, 0.3);\n --ag-accent: #3b82f6;\n --ag-selected: #f59e0b;\n --ag-shadow: 0 16px 48px rgba(148, 163, 184, 0.2);\n color: var(--ag-text);\n}\n\n/*\n * Teleported layers (HighlightLayer, MarkerLayer) render inside\n * bridge.overlayRoot which is outside .agentation-root in the DOM.\n * We use :global selectors keyed by data-ag-theme to propagate\n * CSS variables into the Teleport target.\n */\n:global([data-ag-theme=\"dark\"]) {\n --ag-bg: #1e293b;\n --ag-bg-surface: rgba(30, 41, 59, 0.96);\n --ag-bg-elevated: rgba(15, 23, 42, 0.72);\n --ag-text: #e2e8f0;\n --ag-muted: #94a3b8;\n --ag-border: rgba(148, 163, 184, 0.24);\n --ag-accent: #3b82f6;\n --ag-selected: #f59e0b;\n --ag-shadow: 0 16px 48px rgba(15, 23, 42, 0.35);\n color: var(--ag-text);\n font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;\n}\n\n:global([data-ag-theme=\"light\"]) {\n --ag-bg: #ffffff;\n --ag-bg-surface: rgba(255, 255, 255, 0.96);\n --ag-bg-elevated: rgba(241, 245, 249, 0.72);\n --ag-text: #1e293b;\n --ag-muted: #64748b;\n --ag-border: rgba(148, 163, 184, 0.3);\n --ag-accent: #3b82f6;\n --ag-selected: #f59e0b;\n --ag-shadow: 0 16px 48px rgba(148, 163, 184, 0.2);\n color: var(--ag-text);\n font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;\n}\n\n:global([data-ag-theme]) {\n font-size: 16px;\n line-height: 1.5;\n}\n\n.agentation-root,\n.agentation-root :deep(*),\n:global([data-ag-theme]),\n:global([data-ag-theme] *) {\n box-sizing: border-box;\n}\n\n.agentation-root :deep(button),\n.agentation-root :deep(textarea),\n:global([data-ag-theme] button),\n:global([data-ag-theme] textarea) {\n font: inherit;\n}\n\n.toast {\n position: fixed;\n left: 50%;\n bottom: 32px;\n transform: translateX(-50%);\n max-width: min(420px, calc(100vw - 32px));\n padding: 10px 14px;\n border-radius: 12px;\n background: rgba(15, 23, 42, 0.92);\n color: rgba(255, 255, 255, 0.92);\n box-shadow: 0 12px 32px rgba(15, 23, 42, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.06);\n font-size: 12px;\n line-height: 1.45;\n letter-spacing: -0.01em;\n pointer-events: none;\n z-index: 100010;\n}\n\n.toast[data-kind=\"warning\"] {\n background: rgba(35, 25, 6, 0.94);\n color: rgba(255, 244, 214, 0.96);\n box-shadow: 0 12px 32px rgba(146, 64, 14, 0.22), 0 0 0 1px rgba(245, 158, 11, 0.18);\n}\n\n.light .toast {\n background: rgba(255, 255, 255, 0.96);\n color: rgba(15, 23, 42, 0.9);\n box-shadow: 0 12px 32px rgba(148, 163, 184, 0.24), 0 0 0 1px rgba(15, 23, 42, 0.08);\n}\n\n.light .toast[data-kind=\"warning\"] {\n background: rgba(255, 251, 235, 0.98);\n color: #92400e;\n box-shadow: 0 12px 32px rgba(251, 191, 36, 0.18), 0 0 0 1px rgba(245, 158, 11, 0.2);\n}\n\n.toast-enter-active,\n.toast-leave-active {\n transition:\n opacity 0.18s ease,\n transform 0.18s cubic-bezier(0.22, 1, 0.36, 1),\n filter 0.18s ease;\n}\n\n.toast-enter-from,\n.toast-leave-to {\n opacity: 0;\n transform: translateX(-50%) translateY(8px) scale(0.96);\n filter: blur(4px);\n}\n</style>\n","// Types\nexport type {\n RuntimeBridge,\n RuntimeStorageBridge,\n RuntimeSyncBridge,\n RuntimeSyncEvent,\n RuntimeSyncInfo,\n UiNotification,\n BoundingBox,\n AreaSelectionRect,\n AreaSelectionMatch,\n HoverSnapshot,\n SelectionSnapshot,\n} from \"./types.js\"\n\n// Injection keys\nexport {\n AREA_SELECTION_KEY,\n ANNOTATIONS_STORE_KEY,\n I18N_KEY,\n OVERLAY_KEY,\n RUNTIME_BRIDGE_KEY,\n SELECTION_KEY,\n SETTINGS_KEY,\n} from \"./injection-keys.js\"\n\n// I18n\nexport type { Locale, Messages, ColorKey } from \"./i18n/types.js\"\nexport {\n DEFAULT_LOCALE,\n SUPPORTED_LOCALES,\n LOCALE_LABELS,\n isValidLocale,\n resolveMessages,\n} from \"./i18n/index.js\"\nexport type { I18nState } from \"./composables/useI18n.js\"\nexport { createI18nState } from \"./composables/useI18n.js\"\n\n// Composables\nexport type { AnnotationsStore } from \"./composables/useAnnotationsStore.js\"\nexport { createAnnotationsStore } from \"./composables/useAnnotationsStore.js\"\nexport type { SelectionState } from \"./composables/useSelection.js\"\nexport { createSelectionState } from \"./composables/useSelection.js\"\nexport type { AreaSelectionState } from \"./composables/useAreaSelection.js\"\nexport { createAreaSelectionState } from \"./composables/useAreaSelection.js\"\nexport type { OverlayState, OverlayPosition } from \"./composables/useOverlay.js\"\nexport { createOverlayState } from \"./composables/useOverlay.js\"\nexport type { SettingsState } from \"./composables/useSettings.js\"\nexport { createSettingsState } from \"./composables/useSettings.js\"\nexport type { ExportActions, ExportFormat } from \"./composables/useExport.js\"\nexport { createExportActions } from \"./composables/useExport.js\"\nexport { useKeyboardShortcuts } from \"./composables/useKeyboard.js\"\n\nexport const AGENTATION_UI_STYLE_HREF = \"\"\n\n// Components\nimport OverlayRoot from \"./components/OverlayRoot.vue\"\n\nexport { OverlayRoot }\n"],"names":["RUNTIME_BRIDGE_KEY","ANNOTATIONS_STORE_KEY","SELECTION_KEY","AREA_SELECTION_KEY","OVERLAY_KEY","SETTINGS_KEY","I18N_KEY","FREEZE_KEY","en","n","count","label","names","remaining","message","zhCN","SUPPORTED_LOCALES","DEFAULT_LOCALE","LOCALE_LABELS","MESSAGE_CATALOGS","localeSet","isValidLocale","value","resolveMessages","locale","createI18nState","resolvedLocale","computed","toValue","messages","buildElementLocator","element","rect","classes","isStableClass","text","normalizeText","generateSelector","findAnnotationTarget","annotation","metadata","locator","getElementLocator","exact","querySelectorDeep","tag","candidates","querySelectorAllDeep","exactTextMatches","candidate","ranked","scoreCandidate","a","b","parseElementLocator","parsed","item","isBoundingBox","attr","selector","isUniqueSelector","stableClasses","buildPathSelector","segments","current","depth","segment","siblings","child","fallback","root","getSearchRoots","found","isOwnElement","results","node","roots","queue","score","candidateText","_a","classList","cls","dx","dy","distance","pattern","box","isFiniteNumber","createAnnotationsStore","bridge","state","reactive","hydrate","loaded","saveAnnotation","comment","snapshot","trimmed","buildAnnotation","persist","removeAnnotation","id","idx","removed","updateAnnotation","updated","clearAll","toDelete","exportJSON","formatToJSON","buildPageContext","exportMarkdown","formatToMarkdown","source","elementName","selectedText","isMultiSelect","identified","identifyElement","generateId","buildMetadata","elementPath","multiSelectElements","elementBoundingBoxes","fixed","isFixedPosition","liveBoxes","el","elRect","toDocumentBox","selectionBoxes","boundingBox","raw","getElementPath","getFullElementPath","getElementClasses","getNearbyText","getNearbyElements","getForensicComputedStyles","getAccessibilityInfo","buildProjectArea","buildContextHints","v","route","hierarchy","landmark","getLandmarkLabel","parts","input","hints","nearbyText","pushHint","findClosestHeadingText","isFixed","heading","role","position","createSelectionState","createAreaSelectionState","x","y","normalizeRect","matches","startX","startY","endX","endY","left","top","right","bottom","POPOVER_OFFSET","POPOVER_MARGIN","POPOVER_WIDTH","POPOVER_HEIGHT","createOverlayState","selection","popoverVisible","popoverPosition","computePopoverPosition","anchorRect","vw","vh","preferredTop","fallbackTop","maxLeft","centeredLeft","COPY_EXCLUDE_FIELDS","STORAGE_KEY","COLOR_OPTIONS","DEFAULT_ANNOTATION_COLOR","createSettingsState","defaults","persisted","loadSettings","normalizeCopyExcludeFields","normalizeLocale","watch","settings","saveSettings","allowed","field","EXCLUDE_SELECTORS","NOT_SELECTORS","STYLE_ID","STATE_KEY","getState","w","_s","originalSetTimeout","isAgentationElement","_b","freeze","style","anim","target","video","unfreeze","e","createFreezeState","isFrozen","ref","toggleFreeze","cleanup","readonly","createExportActions","store","copyFeedback","writeClipboard","downloadFallback","flash","kind","content","filename","blob","url","payload","buildClipboardPayload","format","page","getPageContext","prependCopyPrefix","prefix","useKeyboardShortcuts","deps","overlay","exportActions","freezeState","onKeydown","active","isEditableField","key","onMounted","onUnmounted","injectStrict","name","inject","svg","size","viewBox","children","h","IconListSparkle","props","s","IconCopyAnimated","copied","transition","IconMarkdown","IconTrashAlt","IconEye","IconEyeOff","IconPause","IconPlay","IconGear","IconConnectedNodes","IconXmarkLarge","IconSun","IconMoon","IconCheckSmallAnimated","IconJson","IconHelp","IconChevronLeft","IconChevronRight","i18n","stylesExpanded","shaking","textareaRef","editingAnnotation","isCreateMode","isEditMode","isOpen","accentColor","popoverStyle","pos","displayName","displaySource","src","threadMessages","workflowStatus","workflowStatusLabel","getStatusLabel","workflowStatusTone","getStatusTone","computedStyles","getAnnotationComputedStyles","selectedElement","parseComputedStylesString","styleEntries","hasComputedStyles","shakeTimer","open","nextTick","focusTextarea","tick","previousTick","shake","onBeforeUnmount","save","err","snap","dismiss","deleteAnnotation","textarea","event","status","getRoleLabel","formatTimestamp","timestamp","date","entry","_createBlock","_Transition","_createElementBlock","_unref","_createElementVNode","_hoisted_1","_cache","$event","_normalizeClass","_hoisted_3","_toDisplayString","_hoisted_4","_hoisted_5","_openBlock","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_Fragment","_renderList","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","property","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_22","_hoisted_23","_createVNode","_hoisted_25","areaSelection","selectionRectStyle","matchedBoxes","index","_normalizeStyle","boxes","syncBoxes","selected","next","bb","_TransitionGroup","hoveredId","syncVersion","scroll","showMarkers","annotationColor","markers","getBoundingBox","liveTarget","liveRect","m","syncFrame","resizeObserver","mutationObserver","scheduleLayoutSync","syncLayout","onMarkerHover","onMarkerLeave","onMarkerClick","marker","truncate","max","getStatus","getMarkerColor","_withModifiers","_hoisted_2","isClient","toString","isObject","val","toArray","toRefs","objectRef","options","isRef","toRefs$1","result","customRef","_toValue","copy","newObject","watchImmediate","cb","defaultWindow","unrefElement","elRef","_$el","plain","useEventListener","args","register","listener","firstParamTargets","test","_firstParamTargets$va","_firstParamTargets$va2","unref","raw_targets","raw_events","raw_listeners","raw_options","_","onCleanup","optionsClone","cleanups","fn","defaultScrollConfig","clampContainerScroll","container","useDraggable","_toValue2","_toValue3","_scrollConfig$directi","pointerTypes","preventDefault$1","stopPropagation","onMove","onEnd","onStart","initialValue","axis","draggingElement","containerElement","draggingHandle","buttons","restrictInView","autoScroll","pressedDelta","filterEvent","handleEvent","scrollConfig","scrollSettings","getScrollAxisValues","handleAutoScroll","targetRect","position$1","clientWidth","clientHeight","scrollLeft","scrollTop","scrollWidth","scrollHeight","marginX","marginY","speedX","speedY","deltaX","deltaY","autoScrollInterval","startAutoScroll","relativePosition","stopAutoScroll","isPointerNearEdge","pointer","margin","checkAutoScroll","start","_container$getBoundin","containerRect","move","relativeX","relativeY","end","config","_options$capture","POSITION_SANITY_MULTIPLIER","POSITION_SANITY_MIN_LIMIT","useToolbarDrag","padding","toolbarHeight","dragThreshold","toolbarEl","shallowRef","hasPosition","isDragging","justFinishedDrag","session","cachedWrapperWidth","cachedContentWidth","updateMeasurements","constrain","rawOffset","maxReasonableOffset","contentOffset","minX","maxX","maxY","DRAG_CLASS","lockInteraction","unlockInteraction","isIgnoredTarget","saved","loadPosition","initialPos","_pos","dragPos","constrained","savePosition","toolbarStyle","onWindowBlur","onResize","syncConstraints","postMountTimer","postMountRaf","schedulePostMountSync","bindToolbarRef","onMouseDown","_event","consumeJustFinishedDrag","limitX","limitY","visible","triggerRef","hoverTimer","onMouseEnter","trigger","onMouseLeave","_renderSlot","_ctx","_Teleport","__props","HELP_ICON_SIZE","SETTINGS_PANEL_MAX_HEIGHT","OUTPUT_DETAIL_KEYS","SETTINGS_PAGE_KEYS","toolbarRef","mainSettingsPageRef","copySettingsPageRef","automationsSettingsPageRef","expanded","settingsOpen","settingsPage","settingsPagesHeight","guideCopyFeedback","showEntranceAnimation","drag","hasAnnotations","isLight","copyFormat","isMarkdownFormat","copyFeedbackActive","panelOpen","settingsPageIndex","settingsPagesStyle","pageCount","currentOutputDetailLabel","settingsPanelPlacement","mcpConnected","syncInfo","apiEndpoint","mcpHttpEndpoint","mcpSseEndpoint","cliCommand","apiPort","extractPort","mcpPort","claudeCommand","webhookTargets","webhookEnv","connectionCards","integrationCards","isExpanded","closeSettingsPanel","entranceTimer","guideCopyTimer","onOutsideClick","syncSettingsPanelHeight","isEventInsideToolbar","setToolbarRef","toolbar","path","handleClick","close","toggleMarkers","toggleSettingsPanel","openAutomationsPanel","openCopySettingsPanel","showMainSettings","toggleCopyExcludedField","cycleOutputDetail","k","exportCurrentFormat","port","copyGuideValue","writeTextToClipboard","activePage","getMaxSettingsPanelHeight","loc","_hoisted_13","AgTooltip","_hoisted_24","_hoisted_26","_hoisted_27","c","_hoisted_29","_hoisted_30","_hoisted_32","_hoisted_34","_hoisted_36","_hoisted_37","_hoisted_38","_hoisted_40","_hoisted_41","_hoisted_42","_hoisted_44","_hoisted_45","_hoisted_46","_hoisted_48","_hoisted_49","_createTextVNode","_hoisted_50","_hoisted_51","_hoisted_52","_hoisted_53","_hoisted_56","_hoisted_57","_hoisted_58","_hoisted_59","_hoisted_60","_hoisted_61","_hoisted_63","_hoisted_64","_hoisted_65","_hoisted_66","_hoisted_68","_hoisted_69","_hoisted_70","toast","provide","markRaw","toastTimer","unsubscribeNotifications","unsubscribeSync","notification","_c","_d","isDark","outputDetail","Toolbar","AnnotationPopover","HighlightLayer","DragSelectionLayer","MarkerLayer","AGENTATION_UI_STYLE_HREF"],"mappings":";;AAUO,MAAMA,KAAkD,OAAO,2BAA2B,GACpFC,KAAwD,OAAO,8BAA8B,GAC7FC,KAA8C,OAAO,sBAAsB,GAC3EC,KAAu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